@ebrains/components 0.0.1-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1089) hide show
  1. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  2. package/dist/cjs/arrow-diagonal-black-0eb8640e.js +5 -0
  3. package/dist/cjs/arrow-right-3e38e8a9.js +7 -0
  4. package/dist/cjs/bluesky-eb0d6051.js +16 -0
  5. package/dist/cjs/chevron-down-27344777.js +14 -0
  6. package/dist/cjs/chevron-left-6fc9c6ef.js +13 -0
  7. package/dist/cjs/chevron-right-6d95a117.js +7 -0
  8. package/dist/cjs/chevron-up-e37d7713.js +14 -0
  9. package/dist/cjs/close-51284af5.js +7 -0
  10. package/dist/cjs/color-ac51ccf7.js +342 -0
  11. package/dist/cjs/color-primary-palette.cjs.entry.js +43 -0
  12. package/dist/cjs/color-primary-palette_6.cjs.entry.js +327 -0
  13. package/dist/cjs/color-secondary-palette.cjs.entry.js +68 -0
  14. package/dist/cjs/color-support-palette.cjs.entry.js +59 -0
  15. package/dist/cjs/components.cjs.js +52 -0
  16. package/dist/cjs/copy-53102d0c.js +7 -0
  17. package/dist/cjs/correct-use-of-colors.cjs.entry.js +68 -0
  18. package/dist/cjs/eds-accordion.cjs.entry.js +92 -0
  19. package/dist/cjs/eds-accordion_23.cjs.entry.js +1886 -0
  20. package/dist/cjs/eds-alert.cjs.entry.js +95 -0
  21. package/dist/cjs/eds-avatar.cjs.entry.js +73 -0
  22. package/dist/cjs/eds-block-break.cjs.entry.js +20 -0
  23. package/dist/cjs/eds-breadcrumb.cjs.entry.js +152 -0
  24. package/dist/cjs/eds-button.cjs.entry.js +233 -0
  25. package/dist/cjs/eds-card-desc.cjs.entry.js +26 -0
  26. package/dist/cjs/eds-card-desc_3.cjs.entry.js +117 -0
  27. package/dist/cjs/eds-card-generic.cjs.entry.js +93 -0
  28. package/dist/cjs/eds-card-project.cjs.entry.js +67 -0
  29. package/dist/cjs/eds-card-section.cjs.entry.js +43 -0
  30. package/dist/cjs/eds-card-tags.cjs.entry.js +21 -0
  31. package/dist/cjs/eds-card-title.cjs.entry.js +56 -0
  32. package/dist/cjs/eds-card-tool.cjs.entry.js +79 -0
  33. package/dist/cjs/eds-card-wrapper.cjs.entry.js +32 -0
  34. package/dist/cjs/eds-code-block.cjs.entry.js +2472 -0
  35. package/dist/cjs/eds-components-section.cjs.entry.js +96 -0
  36. package/dist/cjs/eds-docs-palettes.cjs.entry.js +27 -0
  37. package/dist/cjs/eds-docs-tokens.cjs.entry.js +35 -0
  38. package/dist/cjs/eds-dropdown.cjs.entry.js +129 -0
  39. package/dist/cjs/eds-footer.cjs.entry.js +49 -0
  40. package/dist/cjs/eds-form.cjs.entry.js +249 -0
  41. package/dist/cjs/eds-frame.cjs.entry.js +91 -0
  42. package/dist/cjs/eds-fullscreen-menu.cjs.entry.js +99 -0
  43. package/dist/cjs/eds-header.cjs.entry.js +96 -0
  44. package/dist/cjs/eds-icon-arrow-diagonal.cjs.entry.js +18 -0
  45. package/dist/cjs/eds-icon-arrow-right.cjs.entry.js +18 -0
  46. package/dist/cjs/eds-icon-bluesky.cjs.entry.js +18 -0
  47. package/dist/cjs/eds-icon-chevron-down.cjs.entry.js +18 -0
  48. package/dist/cjs/eds-icon-chevron-left.cjs.entry.js +18 -0
  49. package/dist/cjs/eds-icon-chevron-right.cjs.entry.js +18 -0
  50. package/dist/cjs/eds-icon-chevron-up.cjs.entry.js +18 -0
  51. package/dist/cjs/eds-icon-close.cjs.entry.js +18 -0
  52. package/dist/cjs/eds-icon-copy.cjs.entry.js +18 -0
  53. package/dist/cjs/eds-icon-eu.cjs.entry.js +18 -0
  54. package/dist/cjs/eds-icon-facebook.cjs.entry.js +18 -0
  55. package/dist/cjs/eds-icon-gitlab.cjs.entry.js +18 -0
  56. package/dist/cjs/eds-icon-linkedin.cjs.entry.js +18 -0
  57. package/dist/cjs/eds-icon-loader.cjs.entry.js +18 -0
  58. package/dist/cjs/eds-icon-mastodon.cjs.entry.js +18 -0
  59. package/dist/cjs/eds-icon-menu.cjs.entry.js +18 -0
  60. package/dist/cjs/eds-icon-more.cjs.entry.js +18 -0
  61. package/dist/cjs/eds-icon-search.cjs.entry.js +18 -0
  62. package/dist/cjs/eds-icon-success.cjs.entry.js +18 -0
  63. package/dist/cjs/eds-icon-twitter.cjs.entry.js +18 -0
  64. package/dist/cjs/eds-icon-user.cjs.entry.js +18 -0
  65. package/dist/cjs/eds-icon-wrapper.cjs.entry.js +40 -0
  66. package/dist/cjs/eds-icon-youtube.cjs.entry.js +18 -0
  67. package/dist/cjs/eds-img.cjs.entry.js +57 -0
  68. package/dist/cjs/eds-input-field.cjs.entry.js +72 -0
  69. package/dist/cjs/eds-input-footer.cjs.entry.js +21 -0
  70. package/dist/cjs/eds-input-label.cjs.entry.js +20 -0
  71. package/dist/cjs/eds-input-range.cjs.entry.js +39 -0
  72. package/dist/cjs/eds-input-search.cjs.entry.js +41 -0
  73. package/dist/cjs/eds-input-select.cjs.entry.js +30 -0
  74. package/dist/cjs/eds-input.cjs.entry.js +68 -0
  75. package/dist/cjs/eds-link.cjs.entry.js +211 -0
  76. package/dist/cjs/eds-login.cjs.entry.js +72 -0
  77. package/dist/cjs/eds-logo.cjs.entry.js +76 -0
  78. package/dist/cjs/eds-matomo-notice.cjs.entry.js +109 -0
  79. package/dist/cjs/eds-modal.cjs.entry.js +46 -0
  80. package/dist/cjs/eds-navigator.cjs.entry.js +43 -0
  81. package/dist/cjs/eds-pagination.cjs.entry.js +211 -0
  82. package/dist/cjs/eds-progress-bar.cjs.entry.js +28 -0
  83. package/dist/cjs/eds-rating.cjs.entry.js +57 -0
  84. package/dist/cjs/eds-section-core.cjs.entry.js +23 -0
  85. package/dist/cjs/eds-section-core_2.cjs.entry.js +59 -0
  86. package/dist/cjs/eds-section-heading.cjs.entry.js +41 -0
  87. package/dist/cjs/eds-social-networks.cjs.entry.js +65 -0
  88. package/dist/cjs/eds-svg-repository.cjs.entry.js +32 -0
  89. package/dist/cjs/eds-tab.cjs.entry.js +40 -0
  90. package/dist/cjs/eds-table.cjs.entry.js +142 -0
  91. package/dist/cjs/eds-tabs-content.cjs.entry.js +133 -0
  92. package/dist/cjs/eds-tabs.cjs.entry.js +122 -0
  93. package/dist/cjs/eds-tag.cjs.entry.js +44 -0
  94. package/dist/cjs/eds-toast-manager.cjs.entry.js +45 -0
  95. package/dist/cjs/eds-toast.cjs.entry.js +53 -0
  96. package/dist/cjs/eds-tooltip.cjs.entry.js +99 -0
  97. package/dist/cjs/eds-user-modal.cjs.entry.js +47 -0
  98. package/dist/cjs/eds-user.cjs.entry.js +90 -0
  99. package/dist/cjs/eu-b9665157.js +32 -0
  100. package/dist/cjs/facebook-7aa65e57.js +16 -0
  101. package/dist/cjs/gradient-primary-palette.cjs.entry.js +45 -0
  102. package/dist/cjs/gradient-secondary-palette.cjs.entry.js +79 -0
  103. package/dist/cjs/gradient-support-palette.cjs.entry.js +63 -0
  104. package/dist/cjs/incorrect-use-of-colors.cjs.entry.js +50 -0
  105. package/dist/cjs/index-1ff5f25c.js +48 -0
  106. package/dist/cjs/index-2cc3495f.js +2149 -0
  107. package/dist/cjs/index-383d2951.js +3449 -0
  108. package/dist/cjs/index-96a4261e.js +405 -0
  109. package/dist/cjs/index-ab9fbefe.js +48 -0
  110. package/dist/cjs/index-f62478aa.js +1837 -0
  111. package/dist/cjs/index.cjs.js +2 -0
  112. package/dist/cjs/keycloak-5aaa21af.js +1900 -0
  113. package/dist/cjs/keycloak-940b83c1.js +1910 -0
  114. package/dist/cjs/linkedin-46b0dd56.js +30 -0
  115. package/dist/cjs/loader-5efe2c21.js +35 -0
  116. package/dist/cjs/loader.cjs.js +15 -0
  117. package/dist/cjs/logo-color-6c787ac1.js +117 -0
  118. package/dist/cjs/logo-color-margins-b49c0f46.js +120 -0
  119. package/dist/cjs/logo-space.cjs.entry.js +20 -0
  120. package/dist/cjs/logo-variations-horizontal.cjs.entry.js +30 -0
  121. package/dist/cjs/logo-variations-vertical.cjs.entry.js +30 -0
  122. package/dist/cjs/logo-white-no-bg-4a0e0f4b.js +1039 -0
  123. package/dist/cjs/logo-wrong-usage.cjs.entry.js +20 -0
  124. package/dist/cjs/mastodon-20c5bb7d.js +16 -0
  125. package/dist/cjs/menu-7050a6d1.js +13 -0
  126. package/dist/cjs/mono-2f3cd653.js +13 -0
  127. package/dist/cjs/more-1d3dd8bc.js +15 -0
  128. package/dist/cjs/search-5533d877.js +14 -0
  129. package/dist/cjs/shadow-css-988e4292.js +334 -0
  130. package/dist/cjs/success-ef661a11.js +20 -0
  131. package/dist/cjs/toastManager-1fb1a402.js +33 -0
  132. package/dist/cjs/token-list.cjs.entry.js +253 -0
  133. package/dist/cjs/token-list_3.cjs.entry.js +300 -0
  134. package/dist/cjs/token-radii.cjs.entry.js +25 -0
  135. package/dist/cjs/token-ratios.cjs.entry.js +29 -0
  136. package/dist/cjs/token-shadows.cjs.entry.js +34 -0
  137. package/dist/cjs/token-spacing.cjs.entry.js +16 -0
  138. package/dist/cjs/token-typography.cjs.entry.js +230 -0
  139. package/dist/cjs/twitter-73956e9a.js +16 -0
  140. package/dist/cjs/user-a3c2230f.js +18 -0
  141. package/dist/cjs/youtube-c238a461.js +16 -0
  142. package/dist/collection/collection-manifest.json +107 -0
  143. package/dist/collection/components/eds-accordion/eds-accordion.css +258 -0
  144. package/dist/collection/components/eds-accordion/eds-accordion.js +246 -0
  145. package/dist/collection/components/eds-accordion/eds-accordion.stories.js +87 -0
  146. package/dist/collection/components/eds-alert/eds-alert.css +607 -0
  147. package/dist/collection/components/eds-alert/eds-alert.js +204 -0
  148. package/dist/collection/components/eds-alert/eds-alert.stories.js +52 -0
  149. package/dist/collection/components/eds-avatar/eds-avatar.css +149 -0
  150. package/dist/collection/components/eds-avatar/eds-avatar.js +210 -0
  151. package/dist/collection/components/eds-avatar/eds-avatar.stories.js +65 -0
  152. package/dist/collection/components/eds-block-break/eds-block-break.css +49 -0
  153. package/dist/collection/components/eds-block-break/eds-block-break.js +51 -0
  154. package/dist/collection/components/eds-breadcrump/eds-breadcrumb.css +111 -0
  155. package/dist/collection/components/eds-breadcrump/eds-breadcrumb.stories.js +32 -0
  156. package/dist/collection/components/eds-breadcrump/eds-breadcrump.js +220 -0
  157. package/dist/collection/components/eds-button/eds-button.css +7140 -0
  158. package/dist/collection/components/eds-button/eds-button.js +487 -0
  159. package/dist/collection/components/eds-button/eds-button.stories.js +47 -0
  160. package/dist/collection/components/eds-cards/eds-card-composer/eds-card-desc/eds-card-desc.css +41 -0
  161. package/dist/collection/components/eds-cards/eds-card-composer/eds-card-desc/eds-card-desc.js +102 -0
  162. package/dist/collection/components/eds-cards/eds-card-composer/eds-card-desc/eds-card-desc.stories.js +31 -0
  163. package/dist/collection/components/eds-cards/eds-card-composer/eds-card-tags/eds-card-tags.css +9 -0
  164. package/dist/collection/components/eds-cards/eds-card-composer/eds-card-tags/eds-card-tags.js +63 -0
  165. package/dist/collection/components/eds-cards/eds-card-composer/eds-card-title/eds-card-title.css +92 -0
  166. package/dist/collection/components/eds-cards/eds-card-composer/eds-card-title/eds-card-title.js +169 -0
  167. package/dist/collection/components/eds-cards/eds-card-composer/eds-card-wrapper/eds-card-wrapper.js +86 -0
  168. package/dist/collection/components/eds-cards/eds-card-generic/eds-card-generic.css +103 -0
  169. package/dist/collection/components/eds-cards/eds-card-generic/eds-card-generic.js +324 -0
  170. package/dist/collection/components/eds-cards/eds-card-generic/eds-card-generic.stories.js +124 -0
  171. package/dist/collection/components/eds-cards/eds-card-project/eds-card-project.js +227 -0
  172. package/dist/collection/components/eds-cards/eds-card-tool/eds-card-tool.css +103 -0
  173. package/dist/collection/components/eds-cards/eds-card-tool/eds-card-tool.js +314 -0
  174. package/dist/collection/components/eds-code-block/eds-code-block.css +177 -0
  175. package/dist/collection/components/eds-code-block/eds-code-block.js +86 -0
  176. package/dist/collection/components/eds-dropdown/eds-dropdown.css +117 -0
  177. package/dist/collection/components/eds-dropdown/eds-dropdown.js +356 -0
  178. package/dist/collection/components/eds-form/eds-form.css +7143 -0
  179. package/dist/collection/components/eds-form/eds-form.js +482 -0
  180. package/dist/collection/components/eds-form/eds-form.stories.js +89 -0
  181. package/dist/collection/components/eds-frame/eds-frame.js +266 -0
  182. package/dist/collection/components/eds-frame/eds-frame.stories.js +67 -0
  183. package/dist/collection/components/eds-icon-wrapper/eds-icon-wrapper.js +92 -0
  184. package/dist/collection/components/eds-icons/chevron/eds-icon-chevron-down/eds-icon-chevron-down.js +36 -0
  185. package/dist/collection/components/eds-icons/chevron/eds-icon-chevron-left/eds-icon-chevron-left.js +36 -0
  186. package/dist/collection/components/eds-icons/chevron/eds-icon-chevron-right/eds-icon-chevron-right.js +36 -0
  187. package/dist/collection/components/eds-icons/chevron/eds-icon-chevron-up/eds-icon-chevron-up.js +36 -0
  188. package/dist/collection/components/eds-icons/eds-icon-arrow-diagonal/eds-icon-arrow-diagonal.js +36 -0
  189. package/dist/collection/components/eds-icons/eds-icon-arrow-right/eds-icon-arrow-right.js +36 -0
  190. package/dist/collection/components/eds-icons/eds-icon-close/eds-icon-close.js +36 -0
  191. package/dist/collection/components/eds-icons/eds-icon-copy/eds-icon-copy.js +36 -0
  192. package/dist/collection/components/eds-icons/eds-icon-eu/eds-icon-eu.js +36 -0
  193. package/dist/collection/components/eds-icons/eds-icon-gitlab/eds-icon-gitlab.js +36 -0
  194. package/dist/collection/components/eds-icons/eds-icon-loader/eds-icon-loader.js +36 -0
  195. package/dist/collection/components/eds-icons/eds-icon-menu/eds-icon-menu.js +36 -0
  196. package/dist/collection/components/eds-icons/eds-icon-more/eds-icon-more.js +36 -0
  197. package/dist/collection/components/eds-icons/eds-icon-search/eds-icon-search.js +36 -0
  198. package/dist/collection/components/eds-icons/eds-icon-success/eds-icon-success.js +36 -0
  199. package/dist/collection/components/eds-icons/eds-icon-user/eds-icon-user.js +36 -0
  200. package/dist/collection/components/eds-icons/social/eds-icon-bluesky/eds-icon-bluesky.js +36 -0
  201. package/dist/collection/components/eds-icons/social/eds-icon-facebook/eds-icon-facebook.js +36 -0
  202. package/dist/collection/components/eds-icons/social/eds-icon-linkedin/eds-icon-linkedin.js +36 -0
  203. package/dist/collection/components/eds-icons/social/eds-icon-mastodon/eds-icon-mastodon.js +36 -0
  204. package/dist/collection/components/eds-icons/social/eds-icon-twitter/eds-icon-twitter.js +36 -0
  205. package/dist/collection/components/eds-icons/social/eds-icon-youtube/eds-icon-youtube.js +36 -0
  206. package/dist/collection/components/eds-img/eds-img.css +83 -0
  207. package/dist/collection/components/eds-img/eds-img.js +246 -0
  208. package/dist/collection/components/eds-img/eds-img.stories.js +101 -0
  209. package/dist/collection/components/eds-input-elements/eds-input/eds-input.js +336 -0
  210. package/dist/collection/components/eds-input-elements/eds-input-footer/eds-input-footer.js +105 -0
  211. package/dist/collection/components/eds-input-elements/eds-input-label/eds-input-label.js +90 -0
  212. package/dist/collection/components/eds-input-elements/eds-input-range/eds-input-range.js +197 -0
  213. package/dist/collection/components/eds-input-elements/eds-input-search/eds-input-search.js +176 -0
  214. package/dist/collection/components/eds-input-elements/eds-input-select/eds-input-select.js +203 -0
  215. package/dist/collection/components/eds-input-field/eds-input-field.css +7151 -0
  216. package/dist/collection/components/eds-input-field/eds-input-field.js +419 -0
  217. package/dist/collection/components/eds-input-field/eds-input-field.stories.js +205 -0
  218. package/dist/collection/components/eds-link/eds-link.css +7164 -0
  219. package/dist/collection/components/eds-link/eds-link.js +482 -0
  220. package/dist/collection/components/eds-link/eds-link.stories.js +86 -0
  221. package/dist/collection/components/eds-logo/eds-logo.css +47 -0
  222. package/dist/collection/components/eds-logo/eds-logo.js +150 -0
  223. package/dist/collection/components/eds-logo/eds-logo.stories.js +38 -0
  224. package/dist/collection/components/eds-modal/eds-modal.css +203 -0
  225. package/dist/collection/components/eds-modal/eds-modal.js +175 -0
  226. package/dist/collection/components/eds-modal/eds-modal.stories.js +64 -0
  227. package/dist/collection/components/eds-navigator/eds-navigator.js +147 -0
  228. package/dist/collection/components/eds-navigator/eds-navigator.stories.js +101 -0
  229. package/dist/collection/components/eds-pagination/eds-pagination.css +120 -0
  230. package/dist/collection/components/eds-pagination/eds-pagination.js +414 -0
  231. package/dist/collection/components/eds-pagination/eds-pagination.stories.js +141 -0
  232. package/dist/collection/components/eds-progress-bar/eds-progress-bar.css +62 -0
  233. package/dist/collection/components/eds-progress-bar/eds-progress-bar.js +79 -0
  234. package/dist/collection/components/eds-progress-bar/eds-progress-bar.stories.js +25 -0
  235. package/dist/collection/components/eds-rating/eds-rating.css +74 -0
  236. package/dist/collection/components/eds-rating/eds-rating.js +138 -0
  237. package/dist/collection/components/eds-rating/eds-rating.stories.js +76 -0
  238. package/dist/collection/components/eds-section/eds-section-core/eds-section-core.css +0 -0
  239. package/dist/collection/components/eds-section/eds-section-core/eds-section-core.js +91 -0
  240. package/dist/collection/components/eds-section/eds-section-core/eds-section-core.stories.js +74 -0
  241. package/dist/collection/components/eds-section/eds-section-heading/eds-section-heading.js +137 -0
  242. package/dist/collection/components/eds-tab/eds-tab.js +109 -0
  243. package/dist/collection/components/eds-table/eds-table.css +138 -0
  244. package/dist/collection/components/eds-table/eds-table.js +281 -0
  245. package/dist/collection/components/eds-table/eds-table.stories.js +173 -0
  246. package/dist/collection/components/eds-tag/eds-tag.css +56 -0
  247. package/dist/collection/components/eds-tag/eds-tag.js +94 -0
  248. package/dist/collection/components/eds-tag/eds-tag.stories.js +27 -0
  249. package/dist/collection/components/eds-toast/eds-toast.js +108 -0
  250. package/dist/collection/components/eds-toast/eds-toast.stories.js +38 -0
  251. package/dist/collection/components/eds-tooltip/eds-tooltip.css +94 -0
  252. package/dist/collection/components/eds-tooltip/eds-tooltip.js +170 -0
  253. package/dist/collection/components/eds-tooltip/eds-tooltip.stories.js +21 -0
  254. package/dist/collection/eds-docs-ui/colors/color-palette/primary.js +39 -0
  255. package/dist/collection/eds-docs-ui/colors/color-palette/secondary.js +85 -0
  256. package/dist/collection/eds-docs-ui/colors/color-palette/support.js +55 -0
  257. package/dist/collection/eds-docs-ui/colors/gradient-palette/primary.js +41 -0
  258. package/dist/collection/eds-docs-ui/colors/gradient-palette/secondary.js +75 -0
  259. package/dist/collection/eds-docs-ui/colors/gradient-palette/support.js +59 -0
  260. package/dist/collection/eds-docs-ui/colors/use-of-colors/correct-use-of-colors.js +66 -0
  261. package/dist/collection/eds-docs-ui/colors/use-of-colors/incorrect-use-of-colors.js +48 -0
  262. package/dist/collection/eds-docs-ui/design-tokens/token-list/token-list.js +98 -0
  263. package/dist/collection/eds-docs-ui/design-tokens/token-list/token-list.stories.js +44 -0
  264. package/dist/collection/eds-docs-ui/design-tokens/token-radii/token-radii.js +11 -0
  265. package/dist/collection/eds-docs-ui/design-tokens/token-ratios/token-ratios.js +15 -0
  266. package/dist/collection/eds-docs-ui/design-tokens/token-shadows/token-shadows.js +11 -0
  267. package/dist/collection/eds-docs-ui/design-tokens/token-spacing/token-spacing.js +10 -0
  268. package/dist/collection/eds-docs-ui/design-tokens/token-typography/token-typography.js +27 -0
  269. package/dist/collection/eds-docs-ui/eds-components-section/eds-components-section.js +58 -0
  270. package/dist/collection/eds-docs-ui/eds-docs-palettes/eds-docs-palettes.js +44 -0
  271. package/dist/collection/eds-docs-ui/eds-docs-tokens/eds-docs-tokens.js +52 -0
  272. package/dist/collection/eds-docs-ui/eds-svg-repository/eds-svg-repository.js +27 -0
  273. package/dist/collection/eds-docs-ui/functional/angular.js +2 -0
  274. package/dist/collection/eds-docs-ui/functional/installation.js +2 -0
  275. package/dist/collection/eds-docs-ui/functional/overview.js +2 -0
  276. package/dist/collection/eds-docs-ui/functional/react.js +2 -0
  277. package/dist/collection/eds-docs-ui/functional/usage.js +2 -0
  278. package/dist/collection/eds-docs-ui/functional/vue.js +2 -0
  279. package/dist/collection/eds-docs-ui/logo/logo-space/logo-space.css +53 -0
  280. package/dist/collection/eds-docs-ui/logo/logo-space/logo-space.js +22 -0
  281. package/dist/collection/eds-docs-ui/logo/logo-variations/horizontal/logo-variations-horizontal.css +60 -0
  282. package/dist/collection/eds-docs-ui/logo/logo-variations/horizontal/logo-variations-horizontal.js +73 -0
  283. package/dist/collection/eds-docs-ui/logo/logo-variations/vertical/logo-variations-vertical.css +64 -0
  284. package/dist/collection/eds-docs-ui/logo/logo-variations/vertical/logo-variations-vertical.js +73 -0
  285. package/dist/collection/eds-docs-ui/logo/logo-wrong-usage/logo-wrong-usage.css +206 -0
  286. package/dist/collection/eds-docs-ui/logo/logo-wrong-usage/logo-wrong-usage.js +22 -0
  287. package/dist/collection/index.js +1 -0
  288. package/dist/collection/shared-ui/eds-card-section/eds-card-section.css +153 -0
  289. package/dist/collection/shared-ui/eds-card-section/eds-card-section.js +93 -0
  290. package/dist/collection/shared-ui/eds-card-section/eds-card-section.stories.js +74 -0
  291. package/dist/collection/shared-ui/eds-footer/eds-footer.css +0 -0
  292. package/dist/collection/shared-ui/eds-footer/eds-footer.js +214 -0
  293. package/dist/collection/shared-ui/eds-footer/eds-footer.stories.js +50 -0
  294. package/dist/collection/shared-ui/eds-fullscreen-menu/eds-fullscreen-menu.css +0 -0
  295. package/dist/collection/shared-ui/eds-fullscreen-menu/eds-fullscreen-menu.js +215 -0
  296. package/dist/collection/shared-ui/eds-header/eds-header.css +0 -0
  297. package/dist/collection/shared-ui/eds-header/eds-header.js +286 -0
  298. package/dist/collection/shared-ui/eds-header/eds-header.stories.js +70 -0
  299. package/dist/collection/shared-ui/eds-login/eds-login.js +154 -0
  300. package/dist/collection/shared-ui/eds-login/eds-login.stories.js +37 -0
  301. package/dist/collection/shared-ui/eds-matomo-notice/eds-matomo-notice.css +105 -0
  302. package/dist/collection/shared-ui/eds-matomo-notice/eds-matomo-notice.js +164 -0
  303. package/dist/collection/shared-ui/eds-matomo-notice/eds-matomo-notice.stories.js +34 -0
  304. package/dist/collection/shared-ui/eds-social-networks/eds-social-network.css +124 -0
  305. package/dist/collection/shared-ui/eds-social-networks/eds-social-networks.js +92 -0
  306. package/dist/collection/shared-ui/eds-tabs/eds-tabs.css +0 -0
  307. package/dist/collection/shared-ui/eds-tabs/eds-tabs.js +213 -0
  308. package/dist/collection/shared-ui/eds-tabs/eds-tabs.stories.js +49 -0
  309. package/dist/collection/shared-ui/eds-tabs-content/eds-tabs-content.js +194 -0
  310. package/dist/collection/shared-ui/eds-tabs-content/eds-tabs-content.stories.js +112 -0
  311. package/dist/collection/shared-ui/eds-toast-manager/eds-toast-manager.css +37 -0
  312. package/dist/collection/shared-ui/eds-toast-manager/eds-toast-manager.js +50 -0
  313. package/dist/collection/shared-ui/eds-toast-manager/eds-toast-manager.stories.js +25 -0
  314. package/dist/collection/shared-ui/eds-user/eds-user.js +171 -0
  315. package/dist/collection/shared-ui/eds-user-modal/eds-user-modal.css +0 -0
  316. package/dist/collection/shared-ui/eds-user-modal/eds-user-modal.js +119 -0
  317. package/dist/collection/utils/keycloak.js +79 -0
  318. package/dist/collection/utils/toastManager.js +29 -0
  319. package/dist/components/analytics.js +43 -0
  320. package/dist/components/app-globals-0f993ce5.js +3 -0
  321. package/dist/components/arrow-diagonal-black.js +3 -0
  322. package/dist/components/arrow-right.js +5 -0
  323. package/dist/components/bluesky.js +14 -0
  324. package/dist/components/chevron-down.js +12 -0
  325. package/dist/components/chevron-left.js +11 -0
  326. package/dist/components/chevron-right.js +5 -0
  327. package/dist/components/chevron-up.js +12 -0
  328. package/dist/components/close.js +5 -0
  329. package/dist/components/color-primary-palette.d.ts +11 -0
  330. package/dist/components/color-primary-palette.entry.js +39 -0
  331. package/dist/components/color-primary-palette.js +6 -0
  332. package/dist/components/color-secondary-palette.d.ts +11 -0
  333. package/dist/components/color-secondary-palette.entry.js +64 -0
  334. package/dist/components/color-secondary-palette.js +6 -0
  335. package/dist/components/color-support-palette.d.ts +11 -0
  336. package/dist/components/color-support-palette.entry.js +55 -0
  337. package/dist/components/color-support-palette.js +6 -0
  338. package/dist/components/color.js +296 -0
  339. package/dist/components/components.css +7177 -0
  340. package/dist/components/components.esm.js +47 -0
  341. package/dist/components/copy.js +5 -0
  342. package/dist/components/correct-use-of-colors.d.ts +11 -0
  343. package/dist/components/correct-use-of-colors.entry.js +64 -0
  344. package/dist/components/correct-use-of-colors.js +93 -0
  345. package/dist/components/eds-accordion.d.ts +11 -0
  346. package/dist/components/eds-accordion.entry.js +88 -0
  347. package/dist/components/eds-accordion.js +6 -0
  348. package/dist/components/eds-accordion2.js +125 -0
  349. package/dist/components/eds-alert.d.ts +11 -0
  350. package/dist/components/eds-alert.entry.js +91 -0
  351. package/dist/components/eds-alert.js +6 -0
  352. package/dist/components/eds-alert2.js +125 -0
  353. package/dist/components/eds-avatar.d.ts +11 -0
  354. package/dist/components/eds-avatar.entry.js +69 -0
  355. package/dist/components/eds-avatar.js +6 -0
  356. package/dist/components/eds-avatar2.js +97 -0
  357. package/dist/components/eds-block-break.d.ts +11 -0
  358. package/dist/components/eds-block-break.entry.js +16 -0
  359. package/dist/components/eds-block-break.js +6 -0
  360. package/dist/components/eds-block-break2.js +33 -0
  361. package/dist/components/eds-breadcrumb.d.ts +11 -0
  362. package/dist/components/eds-breadcrumb.entry.js +148 -0
  363. package/dist/components/eds-breadcrumb.js +186 -0
  364. package/dist/components/eds-button.d.ts +11 -0
  365. package/dist/components/eds-button.entry.js +229 -0
  366. package/dist/components/eds-button.js +6 -0
  367. package/dist/components/eds-button2.js +264 -0
  368. package/dist/components/eds-card-desc.d.ts +11 -0
  369. package/dist/components/eds-card-desc.entry.js +22 -0
  370. package/dist/components/eds-card-desc.js +6 -0
  371. package/dist/components/eds-card-desc2.js +42 -0
  372. package/dist/components/eds-card-generic.d.ts +11 -0
  373. package/dist/components/eds-card-generic.entry.js +89 -0
  374. package/dist/components/eds-card-generic.js +6 -0
  375. package/dist/components/eds-card-generic2.js +147 -0
  376. package/dist/components/eds-card-project.d.ts +11 -0
  377. package/dist/components/eds-card-project.entry.js +63 -0
  378. package/dist/components/eds-card-project.js +108 -0
  379. package/dist/components/eds-card-section.d.ts +11 -0
  380. package/dist/components/eds-card-section.entry.js +39 -0
  381. package/dist/components/eds-card-section.js +96 -0
  382. package/dist/components/eds-card-tags.d.ts +11 -0
  383. package/dist/components/eds-card-tags.entry.js +17 -0
  384. package/dist/components/eds-card-tags.js +44 -0
  385. package/dist/components/eds-card-title.d.ts +11 -0
  386. package/dist/components/eds-card-title.entry.js +52 -0
  387. package/dist/components/eds-card-title.js +6 -0
  388. package/dist/components/eds-card-title2.js +74 -0
  389. package/dist/components/eds-card-tool.d.ts +11 -0
  390. package/dist/components/eds-card-tool.entry.js +75 -0
  391. package/dist/components/eds-card-tool.js +136 -0
  392. package/dist/components/eds-card-wrapper.d.ts +11 -0
  393. package/dist/components/eds-card-wrapper.entry.js +28 -0
  394. package/dist/components/eds-card-wrapper.js +49 -0
  395. package/dist/components/eds-code-block.d.ts +11 -0
  396. package/dist/components/eds-code-block.entry.js +2468 -0
  397. package/dist/components/eds-code-block.js +6 -0
  398. package/dist/components/eds-code-block2.js +2493 -0
  399. package/dist/components/eds-components-section.d.ts +11 -0
  400. package/dist/components/eds-components-section.entry.js +92 -0
  401. package/dist/components/eds-components-section.js +147 -0
  402. package/dist/components/eds-docs-palettes.d.ts +11 -0
  403. package/dist/components/eds-docs-palettes.entry.js +23 -0
  404. package/dist/components/eds-docs-palettes.js +96 -0
  405. package/dist/components/eds-docs-tokens.d.ts +11 -0
  406. package/dist/components/eds-docs-tokens.entry.js +31 -0
  407. package/dist/components/eds-docs-tokens.js +80 -0
  408. package/dist/components/eds-dropdown.d.ts +11 -0
  409. package/dist/components/eds-dropdown.entry.js +125 -0
  410. package/dist/components/eds-dropdown.js +6 -0
  411. package/dist/components/eds-dropdown2.js +163 -0
  412. package/dist/components/eds-footer.d.ts +11 -0
  413. package/dist/components/eds-footer.entry.js +45 -0
  414. package/dist/components/eds-footer.js +6 -0
  415. package/dist/components/eds-footer2.js +97 -0
  416. package/dist/components/eds-form.d.ts +11 -0
  417. package/dist/components/eds-form.entry.js +245 -0
  418. package/dist/components/eds-form.js +346 -0
  419. package/dist/components/eds-frame.d.ts +11 -0
  420. package/dist/components/eds-frame.entry.js +87 -0
  421. package/dist/components/eds-frame.js +127 -0
  422. package/dist/components/eds-fullscreen-menu.d.ts +11 -0
  423. package/dist/components/eds-fullscreen-menu.entry.js +95 -0
  424. package/dist/components/eds-fullscreen-menu.js +166 -0
  425. package/dist/components/eds-header.d.ts +11 -0
  426. package/dist/components/eds-header.entry.js +92 -0
  427. package/dist/components/eds-header.js +175 -0
  428. package/dist/components/eds-icon-arrow-diagonal.d.ts +11 -0
  429. package/dist/components/eds-icon-arrow-diagonal.entry.js +14 -0
  430. package/dist/components/eds-icon-arrow-diagonal.js +33 -0
  431. package/dist/components/eds-icon-arrow-right.d.ts +11 -0
  432. package/dist/components/eds-icon-arrow-right.entry.js +14 -0
  433. package/dist/components/eds-icon-arrow-right.js +33 -0
  434. package/dist/components/eds-icon-bluesky.d.ts +11 -0
  435. package/dist/components/eds-icon-bluesky.entry.js +14 -0
  436. package/dist/components/eds-icon-bluesky.js +33 -0
  437. package/dist/components/eds-icon-chevron-down.d.ts +11 -0
  438. package/dist/components/eds-icon-chevron-down.entry.js +14 -0
  439. package/dist/components/eds-icon-chevron-down.js +33 -0
  440. package/dist/components/eds-icon-chevron-left.d.ts +11 -0
  441. package/dist/components/eds-icon-chevron-left.entry.js +14 -0
  442. package/dist/components/eds-icon-chevron-left.js +33 -0
  443. package/dist/components/eds-icon-chevron-right.d.ts +11 -0
  444. package/dist/components/eds-icon-chevron-right.entry.js +14 -0
  445. package/dist/components/eds-icon-chevron-right.js +33 -0
  446. package/dist/components/eds-icon-chevron-up.d.ts +11 -0
  447. package/dist/components/eds-icon-chevron-up.entry.js +14 -0
  448. package/dist/components/eds-icon-chevron-up.js +33 -0
  449. package/dist/components/eds-icon-close.d.ts +11 -0
  450. package/dist/components/eds-icon-close.entry.js +14 -0
  451. package/dist/components/eds-icon-close.js +33 -0
  452. package/dist/components/eds-icon-copy.d.ts +11 -0
  453. package/dist/components/eds-icon-copy.entry.js +14 -0
  454. package/dist/components/eds-icon-copy.js +33 -0
  455. package/dist/components/eds-icon-eu.d.ts +11 -0
  456. package/dist/components/eds-icon-eu.entry.js +14 -0
  457. package/dist/components/eds-icon-eu.js +33 -0
  458. package/dist/components/eds-icon-facebook.d.ts +11 -0
  459. package/dist/components/eds-icon-facebook.entry.js +14 -0
  460. package/dist/components/eds-icon-facebook.js +33 -0
  461. package/dist/components/eds-icon-gitlab.d.ts +11 -0
  462. package/dist/components/eds-icon-gitlab.entry.js +14 -0
  463. package/dist/components/eds-icon-gitlab.js +33 -0
  464. package/dist/components/eds-icon-linkedin.d.ts +11 -0
  465. package/dist/components/eds-icon-linkedin.entry.js +14 -0
  466. package/dist/components/eds-icon-linkedin.js +33 -0
  467. package/dist/components/eds-icon-loader.d.ts +11 -0
  468. package/dist/components/eds-icon-loader.entry.js +14 -0
  469. package/dist/components/eds-icon-loader.js +33 -0
  470. package/dist/components/eds-icon-mastodon.d.ts +11 -0
  471. package/dist/components/eds-icon-mastodon.entry.js +14 -0
  472. package/dist/components/eds-icon-mastodon.js +33 -0
  473. package/dist/components/eds-icon-menu.d.ts +11 -0
  474. package/dist/components/eds-icon-menu.entry.js +14 -0
  475. package/dist/components/eds-icon-menu.js +33 -0
  476. package/dist/components/eds-icon-more.d.ts +11 -0
  477. package/dist/components/eds-icon-more.entry.js +14 -0
  478. package/dist/components/eds-icon-more.js +33 -0
  479. package/dist/components/eds-icon-search.d.ts +11 -0
  480. package/dist/components/eds-icon-search.entry.js +14 -0
  481. package/dist/components/eds-icon-search.js +33 -0
  482. package/dist/components/eds-icon-success.d.ts +11 -0
  483. package/dist/components/eds-icon-success.entry.js +14 -0
  484. package/dist/components/eds-icon-success.js +33 -0
  485. package/dist/components/eds-icon-twitter.d.ts +11 -0
  486. package/dist/components/eds-icon-twitter.entry.js +14 -0
  487. package/dist/components/eds-icon-twitter.js +33 -0
  488. package/dist/components/eds-icon-user.d.ts +11 -0
  489. package/dist/components/eds-icon-user.entry.js +14 -0
  490. package/dist/components/eds-icon-user.js +33 -0
  491. package/dist/components/eds-icon-wrapper.d.ts +11 -0
  492. package/dist/components/eds-icon-wrapper.entry.js +36 -0
  493. package/dist/components/eds-icon-wrapper.js +6 -0
  494. package/dist/components/eds-icon-wrapper2.js +56 -0
  495. package/dist/components/eds-icon-youtube.d.ts +11 -0
  496. package/dist/components/eds-icon-youtube.entry.js +14 -0
  497. package/dist/components/eds-icon-youtube.js +33 -0
  498. package/dist/components/eds-img.d.ts +11 -0
  499. package/dist/components/eds-img.entry.js +53 -0
  500. package/dist/components/eds-img.js +6 -0
  501. package/dist/components/eds-img2.js +80 -0
  502. package/dist/components/eds-input-field.d.ts +11 -0
  503. package/dist/components/eds-input-field.entry.js +68 -0
  504. package/dist/components/eds-input-field.js +6 -0
  505. package/dist/components/eds-input-field2.js +145 -0
  506. package/dist/components/eds-input-footer.d.ts +11 -0
  507. package/dist/components/eds-input-footer.entry.js +17 -0
  508. package/dist/components/eds-input-footer.js +6 -0
  509. package/dist/components/eds-input-footer2.js +43 -0
  510. package/dist/components/eds-input-label.d.ts +11 -0
  511. package/dist/components/eds-input-label.entry.js +16 -0
  512. package/dist/components/eds-input-label.js +6 -0
  513. package/dist/components/eds-input-label2.js +35 -0
  514. package/dist/components/eds-input-range.d.ts +11 -0
  515. package/dist/components/eds-input-range.entry.js +35 -0
  516. package/dist/components/eds-input-range.js +6 -0
  517. package/dist/components/eds-input-range2.js +59 -0
  518. package/dist/components/eds-input-search.d.ts +11 -0
  519. package/dist/components/eds-input-search.entry.js +37 -0
  520. package/dist/components/eds-input-search.js +6 -0
  521. package/dist/components/eds-input-search2.js +65 -0
  522. package/dist/components/eds-input-select.d.ts +11 -0
  523. package/dist/components/eds-input-select.entry.js +26 -0
  524. package/dist/components/eds-input-select.js +6 -0
  525. package/dist/components/eds-input-select2.js +56 -0
  526. package/dist/components/eds-input.d.ts +11 -0
  527. package/dist/components/eds-input.entry.js +64 -0
  528. package/dist/components/eds-input.js +6 -0
  529. package/dist/components/eds-input2.js +103 -0
  530. package/dist/components/eds-link.d.ts +11 -0
  531. package/dist/components/eds-link.entry.js +207 -0
  532. package/dist/components/eds-link.js +6 -0
  533. package/dist/components/eds-link2.js +243 -0
  534. package/dist/components/eds-login.d.ts +11 -0
  535. package/dist/components/eds-login.entry.js +68 -0
  536. package/dist/components/eds-login.js +103 -0
  537. package/dist/components/eds-logo.d.ts +11 -0
  538. package/dist/components/eds-logo.entry.js +72 -0
  539. package/dist/components/eds-logo.js +6 -0
  540. package/dist/components/eds-logo2.js +90 -0
  541. package/dist/components/eds-matomo-notice.d.ts +11 -0
  542. package/dist/components/eds-matomo-notice.entry.js +105 -0
  543. package/dist/components/eds-matomo-notice.js +144 -0
  544. package/dist/components/eds-modal.d.ts +11 -0
  545. package/dist/components/eds-modal.entry.js +42 -0
  546. package/dist/components/eds-modal.js +80 -0
  547. package/dist/components/eds-navigator.d.ts +11 -0
  548. package/dist/components/eds-navigator.entry.js +39 -0
  549. package/dist/components/eds-navigator.js +75 -0
  550. package/dist/components/eds-pagination.d.ts +11 -0
  551. package/dist/components/eds-pagination.entry.js +207 -0
  552. package/dist/components/eds-pagination.js +6 -0
  553. package/dist/components/eds-pagination2.js +249 -0
  554. package/dist/components/eds-progress-bar.d.ts +11 -0
  555. package/dist/components/eds-progress-bar.entry.js +24 -0
  556. package/dist/components/eds-progress-bar.js +45 -0
  557. package/dist/components/eds-rating.d.ts +11 -0
  558. package/dist/components/eds-rating.entry.js +53 -0
  559. package/dist/components/eds-rating.js +76 -0
  560. package/dist/components/eds-section-core.d.ts +11 -0
  561. package/dist/components/eds-section-core.entry.js +19 -0
  562. package/dist/components/eds-section-core.js +6 -0
  563. package/dist/components/eds-section-core2.js +43 -0
  564. package/dist/components/eds-section-heading.d.ts +11 -0
  565. package/dist/components/eds-section-heading.entry.js +37 -0
  566. package/dist/components/eds-section-heading.js +6 -0
  567. package/dist/components/eds-section-heading2.js +57 -0
  568. package/dist/components/eds-social-networks.d.ts +11 -0
  569. package/dist/components/eds-social-networks.entry.js +61 -0
  570. package/dist/components/eds-social-networks.js +6 -0
  571. package/dist/components/eds-social-networks2.js +90 -0
  572. package/dist/components/eds-svg-repository.d.ts +11 -0
  573. package/dist/components/eds-svg-repository.entry.js +28 -0
  574. package/dist/components/eds-svg-repository.js +112 -0
  575. package/dist/components/eds-tab.d.ts +11 -0
  576. package/dist/components/eds-tab.entry.js +36 -0
  577. package/dist/components/eds-tab.js +6 -0
  578. package/dist/components/eds-tab2.js +55 -0
  579. package/dist/components/eds-table.d.ts +11 -0
  580. package/dist/components/eds-table.entry.js +138 -0
  581. package/dist/components/eds-table.js +6 -0
  582. package/dist/components/eds-table2.js +229 -0
  583. package/dist/components/eds-tabs-content.d.ts +11 -0
  584. package/dist/components/eds-tabs-content.entry.js +129 -0
  585. package/dist/components/eds-tabs-content.js +159 -0
  586. package/dist/components/eds-tabs.d.ts +11 -0
  587. package/dist/components/eds-tabs.entry.js +118 -0
  588. package/dist/components/eds-tabs.js +149 -0
  589. package/dist/components/eds-tag.d.ts +11 -0
  590. package/dist/components/eds-tag.entry.js +40 -0
  591. package/dist/components/eds-tag.js +6 -0
  592. package/dist/components/eds-tag2.js +58 -0
  593. package/dist/components/eds-toast-manager.d.ts +11 -0
  594. package/dist/components/eds-toast-manager.entry.js +41 -0
  595. package/dist/components/eds-toast-manager.js +78 -0
  596. package/dist/components/eds-toast.d.ts +11 -0
  597. package/dist/components/eds-toast.entry.js +49 -0
  598. package/dist/components/eds-toast.js +6 -0
  599. package/dist/components/eds-toast2.js +80 -0
  600. package/dist/components/eds-tooltip.d.ts +11 -0
  601. package/dist/components/eds-tooltip.entry.js +95 -0
  602. package/dist/components/eds-tooltip.js +119 -0
  603. package/dist/components/eds-user-modal.d.ts +11 -0
  604. package/dist/components/eds-user-modal.entry.js +43 -0
  605. package/dist/components/eds-user-modal.js +6 -0
  606. package/dist/components/eds-user-modal2.js +90 -0
  607. package/dist/components/eds-user.d.ts +11 -0
  608. package/dist/components/eds-user.entry.js +86 -0
  609. package/dist/components/eds-user.js +6 -0
  610. package/dist/components/eds-user2.js +150 -0
  611. package/dist/components/eu.js +30 -0
  612. package/dist/components/facebook.js +14 -0
  613. package/dist/components/gradient-primary-palette.d.ts +11 -0
  614. package/dist/components/gradient-primary-palette.entry.js +41 -0
  615. package/dist/components/gradient-primary-palette.js +6 -0
  616. package/dist/components/gradient-secondary-palette.d.ts +11 -0
  617. package/dist/components/gradient-secondary-palette.entry.js +75 -0
  618. package/dist/components/gradient-secondary-palette.js +6 -0
  619. package/dist/components/gradient-support-palette.d.ts +11 -0
  620. package/dist/components/gradient-support-palette.entry.js +59 -0
  621. package/dist/components/gradient-support-palette.js +6 -0
  622. package/dist/components/incorrect-use-of-colors.d.ts +11 -0
  623. package/dist/components/incorrect-use-of-colors.entry.js +46 -0
  624. package/dist/components/incorrect-use-of-colors.js +63 -0
  625. package/dist/components/index-144c9ae8.js +46 -0
  626. package/dist/components/index-360dc790.js +401 -0
  627. package/dist/components/index-a9afa43f.js +1802 -0
  628. package/dist/components/index-b384416e.js +3023 -0
  629. package/dist/components/index.d.ts +33 -0
  630. package/dist/components/index.esm.js +1 -0
  631. package/dist/components/index.js +1 -0
  632. package/dist/components/index2.js +401 -0
  633. package/dist/components/index3.js +46 -0
  634. package/dist/components/index4.js +1802 -0
  635. package/dist/components/keycloak-b647d452.js +1903 -0
  636. package/dist/components/keycloak.js +1903 -0
  637. package/dist/components/linkedin.js +28 -0
  638. package/dist/components/loader.js +33 -0
  639. package/dist/components/logo-color-margins.js +118 -0
  640. package/dist/components/logo-color.js +115 -0
  641. package/dist/components/logo-space.d.ts +11 -0
  642. package/dist/components/logo-space.entry.js +16 -0
  643. package/dist/components/logo-space.js +34 -0
  644. package/dist/components/logo-variations-horizontal.d.ts +11 -0
  645. package/dist/components/logo-variations-horizontal.entry.js +26 -0
  646. package/dist/components/logo-variations-horizontal.js +53 -0
  647. package/dist/components/logo-variations-vertical.d.ts +11 -0
  648. package/dist/components/logo-variations-vertical.entry.js +26 -0
  649. package/dist/components/logo-variations-vertical.js +53 -0
  650. package/dist/components/logo-white-no-bg.js +1029 -0
  651. package/dist/components/logo-wrong-usage.d.ts +11 -0
  652. package/dist/components/logo-wrong-usage.entry.js +16 -0
  653. package/dist/components/logo-wrong-usage.js +34 -0
  654. package/dist/components/mastodon.js +14 -0
  655. package/dist/components/menu.js +11 -0
  656. package/dist/components/mono.js +11 -0
  657. package/dist/components/more.js +13 -0
  658. package/dist/components/p-0611bbac.entry.js +1 -0
  659. package/dist/components/p-0a195bfe.entry.js +1 -0
  660. package/dist/components/p-0a6262b7.entry.js +1 -0
  661. package/dist/components/p-0be28996.js +1 -0
  662. package/dist/components/p-0e6d43c5.js +1 -0
  663. package/dist/components/p-112122d6.js +1 -0
  664. package/dist/components/p-11a4ef34.entry.js +1 -0
  665. package/dist/components/p-145d8e4d.entry.js +1 -0
  666. package/dist/components/p-1a1b8e28.entry.js +1 -0
  667. package/dist/components/p-1d94d663.entry.js +1 -0
  668. package/dist/components/p-1ded61bd.js +1 -0
  669. package/dist/components/p-200ad980.entry.js +9 -0
  670. package/dist/components/p-2066b033.js +1 -0
  671. package/dist/components/p-219d9f68.entry.js +1 -0
  672. package/dist/components/p-22ee5374.entry.js +1 -0
  673. package/dist/components/p-25eb1801.entry.js +1 -0
  674. package/dist/components/p-2692f93d.js +1 -0
  675. package/dist/components/p-2728a189.entry.js +1 -0
  676. package/dist/components/p-29041952.js +1 -0
  677. package/dist/components/p-2b14f03a.entry.js +1 -0
  678. package/dist/components/p-3048bdec.entry.js +1 -0
  679. package/dist/components/p-32e6c4df.js +1 -0
  680. package/dist/components/p-36c0f3ee.entry.js +1 -0
  681. package/dist/components/p-373119b3.js +1 -0
  682. package/dist/components/p-378d371f.entry.js +1 -0
  683. package/dist/components/p-3dbf2ac9.entry.js +1 -0
  684. package/dist/components/p-42dfb426.entry.js +1 -0
  685. package/dist/components/p-4541cb5f.entry.js +1 -0
  686. package/dist/components/p-4587d0ef.js +1 -0
  687. package/dist/components/p-4687b64c.js +1 -0
  688. package/dist/components/p-46d0716d.js +1 -0
  689. package/dist/components/p-49a5eef5.entry.js +1 -0
  690. package/dist/components/p-50e27321.js +1 -0
  691. package/dist/components/p-513bf756.entry.js +1 -0
  692. package/dist/components/p-52a487ee.entry.js +1 -0
  693. package/dist/components/p-54b8f143.js +1 -0
  694. package/dist/components/p-55444767.entry.js +1 -0
  695. package/dist/components/p-5ab1d64a.js +1 -0
  696. package/dist/components/p-5b900a2c.entry.js +1 -0
  697. package/dist/components/p-5d046674.js +1 -0
  698. package/dist/components/p-5edc806a.entry.js +1 -0
  699. package/dist/components/p-606d8f86.entry.js +1 -0
  700. package/dist/components/p-64d4a6e0.entry.js +1 -0
  701. package/dist/components/p-677f60bc.entry.js +1 -0
  702. package/dist/components/p-6bc00fad.entry.js +1 -0
  703. package/dist/components/p-6cb8c52d.entry.js +1 -0
  704. package/dist/components/p-6f601454.entry.js +1 -0
  705. package/dist/components/p-763cbe2f.entry.js +1 -0
  706. package/dist/components/p-77a81dfa.entry.js +1 -0
  707. package/dist/components/p-7a2b35b4.entry.js +1 -0
  708. package/dist/components/p-81899237.js +1 -0
  709. package/dist/components/p-81d2a9be.entry.js +1 -0
  710. package/dist/components/p-82453a66.entry.js +1 -0
  711. package/dist/components/p-83ff4a95.js +1 -0
  712. package/dist/components/p-877403df.entry.js +1 -0
  713. package/dist/components/p-8983de37.js +1 -0
  714. package/dist/components/p-8c1be2b6.entry.js +1 -0
  715. package/dist/components/p-923e4d23.entry.js +1 -0
  716. package/dist/components/p-94b74ae8.entry.js +1 -0
  717. package/dist/components/p-9c05e349.entry.js +1 -0
  718. package/dist/components/p-9c5a453b.js +1 -0
  719. package/dist/components/p-9c74a5dd.entry.js +1 -0
  720. package/dist/components/p-abcdf35f.js +1 -0
  721. package/dist/components/p-ac083317.entry.js +1 -0
  722. package/dist/components/p-ad79cc3c.entry.js +1 -0
  723. package/dist/components/p-aefcb641.js +1 -0
  724. package/dist/components/p-b4055691.entry.js +1 -0
  725. package/dist/components/p-b544f216.entry.js +1 -0
  726. package/dist/components/p-b822abb7.js +1 -0
  727. package/dist/components/p-b94318f2.entry.js +1 -0
  728. package/dist/components/p-bad2a33a.entry.js +1 -0
  729. package/dist/components/p-bfd2fdf1.entry.js +1 -0
  730. package/dist/components/p-c0afe524.entry.js +1 -0
  731. package/dist/components/p-c11d93cf.entry.js +1 -0
  732. package/dist/components/p-c16b3c0c.entry.js +1 -0
  733. package/dist/components/p-c3c61db1.entry.js +1 -0
  734. package/dist/components/p-c8e7c854.js +1 -0
  735. package/dist/components/p-c9c417de.js +1 -0
  736. package/dist/components/p-caf2af08.entry.js +1 -0
  737. package/dist/components/p-d80de13e.entry.js +1 -0
  738. package/dist/components/p-ddd005a3.entry.js +1 -0
  739. package/dist/components/p-e04097a2.entry.js +1 -0
  740. package/dist/components/p-e1255160.js +1 -0
  741. package/dist/components/p-e2e715a2.entry.js +1 -0
  742. package/dist/components/p-e639818b.entry.js +1 -0
  743. package/dist/components/p-e69ff916.entry.js +1 -0
  744. package/dist/components/p-e80f4f24.js +1 -0
  745. package/dist/components/p-e9a1fb1e.js +2 -0
  746. package/dist/components/p-ec95188c.entry.js +1 -0
  747. package/dist/components/p-ecbb679f.js +1 -0
  748. package/dist/components/p-ece618b3.js +1 -0
  749. package/dist/components/p-f04946a5.entry.js +1 -0
  750. package/dist/components/p-fa1276cc.entry.js +1 -0
  751. package/dist/components/p-ff6b25a1.entry.js +1 -0
  752. package/dist/components/primary.js +65 -0
  753. package/dist/components/primary2.js +67 -0
  754. package/dist/components/search.js +12 -0
  755. package/dist/components/secondary.js +92 -0
  756. package/dist/components/secondary2.js +107 -0
  757. package/dist/components/shadow-css-423dab2c.js +332 -0
  758. package/dist/components/success.js +18 -0
  759. package/dist/components/support.js +81 -0
  760. package/dist/components/support2.js +85 -0
  761. package/dist/components/toastManager-b716afd8.js +31 -0
  762. package/dist/components/toastManager.js +31 -0
  763. package/dist/components/token-list.d.ts +11 -0
  764. package/dist/components/token-list.entry.js +249 -0
  765. package/dist/components/token-list.js +6 -0
  766. package/dist/components/token-list2.js +277 -0
  767. package/dist/components/token-radii.d.ts +11 -0
  768. package/dist/components/token-radii.entry.js +21 -0
  769. package/dist/components/token-radii.js +6 -0
  770. package/dist/components/token-radii2.js +47 -0
  771. package/dist/components/token-ratios.d.ts +11 -0
  772. package/dist/components/token-ratios.entry.js +25 -0
  773. package/dist/components/token-ratios.js +54 -0
  774. package/dist/components/token-shadows.d.ts +11 -0
  775. package/dist/components/token-shadows.entry.js +30 -0
  776. package/dist/components/token-shadows.js +6 -0
  777. package/dist/components/token-shadows2.js +56 -0
  778. package/dist/components/token-spacing.d.ts +11 -0
  779. package/dist/components/token-spacing.entry.js +12 -0
  780. package/dist/components/token-spacing.js +29 -0
  781. package/dist/components/token-typography.d.ts +11 -0
  782. package/dist/components/token-typography.entry.js +226 -0
  783. package/dist/components/token-typography.js +255 -0
  784. package/dist/components/twitter.js +14 -0
  785. package/dist/components/user.js +16 -0
  786. package/dist/components/youtube.js +14 -0
  787. package/dist/esm/app-globals-0f993ce5.js +3 -0
  788. package/dist/esm/arrow-diagonal-black-8f0494c3.js +3 -0
  789. package/dist/esm/arrow-right-9322ba8a.js +5 -0
  790. package/dist/esm/bluesky-cc5edd2d.js +14 -0
  791. package/dist/esm/chevron-down-6144c823.js +12 -0
  792. package/dist/esm/chevron-left-ca6c66e1.js +11 -0
  793. package/dist/esm/chevron-right-b88ed2d4.js +5 -0
  794. package/dist/esm/chevron-up-c66bd477.js +12 -0
  795. package/dist/esm/close-87fc0d63.js +5 -0
  796. package/dist/esm/color-49aa977d.js +338 -0
  797. package/dist/esm/color-primary-palette.entry.js +39 -0
  798. package/dist/esm/color-primary-palette_6.entry.js +318 -0
  799. package/dist/esm/color-secondary-palette.entry.js +64 -0
  800. package/dist/esm/color-support-palette.entry.js +55 -0
  801. package/dist/esm/components.js +47 -0
  802. package/dist/esm/copy-03b72cb6.js +5 -0
  803. package/dist/esm/correct-use-of-colors.entry.js +64 -0
  804. package/dist/esm/eds-accordion.entry.js +88 -0
  805. package/dist/esm/eds-accordion_23.entry.js +1860 -0
  806. package/dist/esm/eds-alert.entry.js +91 -0
  807. package/dist/esm/eds-avatar.entry.js +69 -0
  808. package/dist/esm/eds-block-break.entry.js +16 -0
  809. package/dist/esm/eds-breadcrumb.entry.js +148 -0
  810. package/dist/esm/eds-button.entry.js +229 -0
  811. package/dist/esm/eds-card-desc.entry.js +22 -0
  812. package/dist/esm/eds-card-desc_3.entry.js +111 -0
  813. package/dist/esm/eds-card-generic.entry.js +89 -0
  814. package/dist/esm/eds-card-project.entry.js +63 -0
  815. package/dist/esm/eds-card-section.entry.js +39 -0
  816. package/dist/esm/eds-card-tags.entry.js +17 -0
  817. package/dist/esm/eds-card-title.entry.js +52 -0
  818. package/dist/esm/eds-card-tool.entry.js +75 -0
  819. package/dist/esm/eds-card-wrapper.entry.js +28 -0
  820. package/dist/esm/eds-code-block.entry.js +2468 -0
  821. package/dist/esm/eds-components-section.entry.js +92 -0
  822. package/dist/esm/eds-docs-palettes.entry.js +23 -0
  823. package/dist/esm/eds-docs-tokens.entry.js +31 -0
  824. package/dist/esm/eds-dropdown.entry.js +125 -0
  825. package/dist/esm/eds-footer.entry.js +45 -0
  826. package/dist/esm/eds-form.entry.js +245 -0
  827. package/dist/esm/eds-frame.entry.js +87 -0
  828. package/dist/esm/eds-fullscreen-menu.entry.js +95 -0
  829. package/dist/esm/eds-header.entry.js +92 -0
  830. package/dist/esm/eds-icon-arrow-diagonal.entry.js +14 -0
  831. package/dist/esm/eds-icon-arrow-right.entry.js +14 -0
  832. package/dist/esm/eds-icon-bluesky.entry.js +14 -0
  833. package/dist/esm/eds-icon-chevron-down.entry.js +14 -0
  834. package/dist/esm/eds-icon-chevron-left.entry.js +14 -0
  835. package/dist/esm/eds-icon-chevron-right.entry.js +14 -0
  836. package/dist/esm/eds-icon-chevron-up.entry.js +14 -0
  837. package/dist/esm/eds-icon-close.entry.js +14 -0
  838. package/dist/esm/eds-icon-copy.entry.js +14 -0
  839. package/dist/esm/eds-icon-eu.entry.js +14 -0
  840. package/dist/esm/eds-icon-facebook.entry.js +14 -0
  841. package/dist/esm/eds-icon-gitlab.entry.js +14 -0
  842. package/dist/esm/eds-icon-linkedin.entry.js +14 -0
  843. package/dist/esm/eds-icon-loader.entry.js +14 -0
  844. package/dist/esm/eds-icon-mastodon.entry.js +14 -0
  845. package/dist/esm/eds-icon-menu.entry.js +14 -0
  846. package/dist/esm/eds-icon-more.entry.js +14 -0
  847. package/dist/esm/eds-icon-search.entry.js +14 -0
  848. package/dist/esm/eds-icon-success.entry.js +14 -0
  849. package/dist/esm/eds-icon-twitter.entry.js +14 -0
  850. package/dist/esm/eds-icon-user.entry.js +14 -0
  851. package/dist/esm/eds-icon-wrapper.entry.js +36 -0
  852. package/dist/esm/eds-icon-youtube.entry.js +14 -0
  853. package/dist/esm/eds-img.entry.js +53 -0
  854. package/dist/esm/eds-input-field.entry.js +68 -0
  855. package/dist/esm/eds-input-footer.entry.js +17 -0
  856. package/dist/esm/eds-input-label.entry.js +16 -0
  857. package/dist/esm/eds-input-range.entry.js +35 -0
  858. package/dist/esm/eds-input-search.entry.js +37 -0
  859. package/dist/esm/eds-input-select.entry.js +26 -0
  860. package/dist/esm/eds-input.entry.js +64 -0
  861. package/dist/esm/eds-link.entry.js +207 -0
  862. package/dist/esm/eds-login.entry.js +68 -0
  863. package/dist/esm/eds-logo.entry.js +72 -0
  864. package/dist/esm/eds-matomo-notice.entry.js +105 -0
  865. package/dist/esm/eds-modal.entry.js +42 -0
  866. package/dist/esm/eds-navigator.entry.js +39 -0
  867. package/dist/esm/eds-pagination.entry.js +207 -0
  868. package/dist/esm/eds-progress-bar.entry.js +24 -0
  869. package/dist/esm/eds-rating.entry.js +53 -0
  870. package/dist/esm/eds-section-core.entry.js +19 -0
  871. package/dist/esm/eds-section-core_2.entry.js +54 -0
  872. package/dist/esm/eds-section-heading.entry.js +37 -0
  873. package/dist/esm/eds-social-networks.entry.js +61 -0
  874. package/dist/esm/eds-svg-repository.entry.js +28 -0
  875. package/dist/esm/eds-tab.entry.js +36 -0
  876. package/dist/esm/eds-table.entry.js +138 -0
  877. package/dist/esm/eds-tabs-content.entry.js +129 -0
  878. package/dist/esm/eds-tabs.entry.js +118 -0
  879. package/dist/esm/eds-tag.entry.js +40 -0
  880. package/dist/esm/eds-toast-manager.entry.js +41 -0
  881. package/dist/esm/eds-toast.entry.js +49 -0
  882. package/dist/esm/eds-tooltip.entry.js +95 -0
  883. package/dist/esm/eds-user-modal.entry.js +43 -0
  884. package/dist/esm/eds-user.entry.js +86 -0
  885. package/dist/esm/eu-9ddde93a.js +30 -0
  886. package/dist/esm/facebook-9cb5c17f.js +14 -0
  887. package/dist/esm/gradient-primary-palette.entry.js +41 -0
  888. package/dist/esm/gradient-secondary-palette.entry.js +75 -0
  889. package/dist/esm/gradient-support-palette.entry.js +59 -0
  890. package/dist/esm/incorrect-use-of-colors.entry.js +46 -0
  891. package/dist/esm/index-144c9ae8.js +46 -0
  892. package/dist/esm/index-360dc790.js +401 -0
  893. package/dist/esm/index-39c58238.js +46 -0
  894. package/dist/esm/index-a9afa43f.js +1802 -0
  895. package/dist/esm/index-b384416e.js +3416 -0
  896. package/dist/esm/index-f1426055.js +2121 -0
  897. package/dist/esm/index.js +1 -0
  898. package/dist/esm/keycloak-13893af6.js +1893 -0
  899. package/dist/esm/keycloak-b647d452.js +1903 -0
  900. package/dist/esm/linkedin-e8650abb.js +28 -0
  901. package/dist/esm/loader-66341740.js +33 -0
  902. package/dist/esm/loader.js +11 -0
  903. package/dist/esm/logo-color-7f1fd803.js +115 -0
  904. package/dist/esm/logo-color-margins-ff8ce71b.js +118 -0
  905. package/dist/esm/logo-space.entry.js +16 -0
  906. package/dist/esm/logo-variations-horizontal.entry.js +26 -0
  907. package/dist/esm/logo-variations-vertical.entry.js +26 -0
  908. package/dist/esm/logo-white-no-bg-f382f86f.js +1029 -0
  909. package/dist/esm/logo-wrong-usage.entry.js +16 -0
  910. package/dist/esm/mastodon-3703ec61.js +14 -0
  911. package/dist/esm/menu-340ea948.js +11 -0
  912. package/dist/esm/mono-53f70232.js +11 -0
  913. package/dist/esm/more-4449d549.js +13 -0
  914. package/dist/esm/search-fbcd79c2.js +12 -0
  915. package/dist/esm/shadow-css-423dab2c.js +332 -0
  916. package/dist/esm/success-443809da.js +18 -0
  917. package/dist/esm/toastManager-b716afd8.js +31 -0
  918. package/dist/esm/token-list.entry.js +249 -0
  919. package/dist/esm/token-list_3.entry.js +294 -0
  920. package/dist/esm/token-radii.entry.js +21 -0
  921. package/dist/esm/token-ratios.entry.js +25 -0
  922. package/dist/esm/token-shadows.entry.js +30 -0
  923. package/dist/esm/token-spacing.entry.js +12 -0
  924. package/dist/esm/token-typography.entry.js +226 -0
  925. package/dist/esm/twitter-ac21b505.js +14 -0
  926. package/dist/esm/user-71ebdc15.js +16 -0
  927. package/dist/esm/youtube-efbfbdc4.js +14 -0
  928. package/dist/hydrate/index.d.ts +242 -0
  929. package/dist/hydrate/index.js +31353 -0
  930. package/dist/hydrate/index.mjs +31345 -0
  931. package/dist/hydrate/package.json +12 -0
  932. package/dist/index.cjs.js +1 -0
  933. package/dist/index.js +1 -0
  934. package/dist/stencil.config.js +64 -0
  935. package/dist/types/Users/nigeor/Documents/Projects/EBRAINS/ebrains-ui-ecosystem/packages/components/.stencil/packages/components/stencil.config.d.ts +2 -0
  936. package/dist/types/Users/nigeor/Documents/Projects/EBRAINS/ebrains-ui-ecosystem/packages/components/.stencil/packages/svgs/src/index.d.ts +1 -0
  937. package/dist/types/Users/nigeor/Documents/Projects/EBRAINS/ebrains-ui-ecosystem/packages/components/.stencil/packages/svgs/src/lib/svgs.d.ts +46 -0
  938. package/dist/types/Users/nigeor/Documents/Projects/EBRAINS/ebrains-ui-ecosystem/packages/components/.stencil/packages/utils/src/index.d.ts +3 -0
  939. package/dist/types/Users/nigeor/Documents/Projects/EBRAINS/ebrains-ui-ecosystem/packages/components/.stencil/packages/utils/src/lib/analytics.d.ts +23 -0
  940. package/dist/types/Users/nigeor/Documents/Projects/EBRAINS/ebrains-ui-ecosystem/packages/components/.stencil/packages/utils/src/lib/color.d.ts +8 -0
  941. package/dist/types/Users/nigeor/Documents/Projects/EBRAINS/ebrains-ui-ecosystem/packages/components/.stencil/packages/utils/src/lib/keycloak.d.ts +30 -0
  942. package/dist/types/Users/nigeor/Documents/Projects/EBRAINS/ebrains-ui-ecosystem/packages/components/.stencil/packages/utils/src/lib/render.d.ts +8 -0
  943. package/dist/types/components/eds-accordion/eds-accordion.d.ts +81 -0
  944. package/dist/types/components/eds-accordion/eds-accordion.stories.d.ts +61 -0
  945. package/dist/types/components/eds-alert/eds-alert.d.ts +43 -0
  946. package/dist/types/components/eds-alert/eds-alert.stories.d.ts +46 -0
  947. package/dist/types/components/eds-avatar/eds-avatar.d.ts +57 -0
  948. package/dist/types/components/eds-avatar/eds-avatar.stories.d.ts +63 -0
  949. package/dist/types/components/eds-block-break/eds-block-break.d.ts +15 -0
  950. package/dist/types/components/eds-breadcrump/eds-breadcrumb.stories.d.ts +29 -0
  951. package/dist/types/components/eds-breadcrump/eds-breadcrump.d.ts +97 -0
  952. package/dist/types/components/eds-button/eds-button.d.ts +75 -0
  953. package/dist/types/components/eds-button/eds-button.stories.d.ts +62 -0
  954. package/dist/types/components/eds-cards/eds-card-composer/eds-card-desc/eds-card-desc.d.ts +23 -0
  955. package/dist/types/components/eds-cards/eds-card-composer/eds-card-desc/eds-card-desc.stories.d.ts +32 -0
  956. package/dist/types/components/eds-cards/eds-card-composer/eds-card-tags/eds-card-tags.d.ts +15 -0
  957. package/dist/types/components/eds-cards/eds-card-composer/eds-card-title/eds-card-title.d.ts +38 -0
  958. package/dist/types/components/eds-cards/eds-card-composer/eds-card-wrapper/eds-card-wrapper.d.ts +23 -0
  959. package/dist/types/components/eds-cards/eds-card-generic/eds-card-generic.d.ts +87 -0
  960. package/dist/types/components/eds-cards/eds-card-generic/eds-card-generic.stories.d.ts +94 -0
  961. package/dist/types/components/eds-cards/eds-card-project/eds-card-project.d.ts +54 -0
  962. package/dist/types/components/eds-cards/eds-card-tool/eds-card-tool.d.ts +79 -0
  963. package/dist/types/components/eds-code-block/eds-code-block.d.ts +15 -0
  964. package/dist/types/components/eds-dropdown/eds-dropdown.d.ts +120 -0
  965. package/dist/types/components/eds-form/eds-form.d.ts +112 -0
  966. package/dist/types/components/eds-form/eds-form.stories.d.ts +47 -0
  967. package/dist/types/components/eds-frame/eds-frame.d.ts +42 -0
  968. package/dist/types/components/eds-frame/eds-frame.stories.d.ts +45 -0
  969. package/dist/types/components/eds-icon-wrapper/eds-icon-wrapper.d.ts +28 -0
  970. package/dist/types/components/eds-icons/chevron/eds-icon-chevron-down/eds-icon-chevron-down.d.ts +10 -0
  971. package/dist/types/components/eds-icons/chevron/eds-icon-chevron-left/eds-icon-chevron-left.d.ts +10 -0
  972. package/dist/types/components/eds-icons/chevron/eds-icon-chevron-right/eds-icon-chevron-right.d.ts +10 -0
  973. package/dist/types/components/eds-icons/chevron/eds-icon-chevron-up/eds-icon-chevron-up.d.ts +10 -0
  974. package/dist/types/components/eds-icons/eds-icon-arrow-diagonal/eds-icon-arrow-diagonal.d.ts +10 -0
  975. package/dist/types/components/eds-icons/eds-icon-arrow-right/eds-icon-arrow-right.d.ts +10 -0
  976. package/dist/types/components/eds-icons/eds-icon-close/eds-icon-close.d.ts +10 -0
  977. package/dist/types/components/eds-icons/eds-icon-copy/eds-icon-copy.d.ts +10 -0
  978. package/dist/types/components/eds-icons/eds-icon-eu/eds-icon-eu.d.ts +10 -0
  979. package/dist/types/components/eds-icons/eds-icon-gitlab/eds-icon-gitlab.d.ts +10 -0
  980. package/dist/types/components/eds-icons/eds-icon-loader/eds-icon-loader.d.ts +10 -0
  981. package/dist/types/components/eds-icons/eds-icon-menu/eds-icon-menu.d.ts +10 -0
  982. package/dist/types/components/eds-icons/eds-icon-more/eds-icon-more.d.ts +10 -0
  983. package/dist/types/components/eds-icons/eds-icon-search/eds-icon-search.d.ts +10 -0
  984. package/dist/types/components/eds-icons/eds-icon-success/eds-icon-success.d.ts +10 -0
  985. package/dist/types/components/eds-icons/eds-icon-user/eds-icon-user.d.ts +10 -0
  986. package/dist/types/components/eds-icons/social/eds-icon-bluesky/eds-icon-bluesky.d.ts +10 -0
  987. package/dist/types/components/eds-icons/social/eds-icon-facebook/eds-icon-facebook.d.ts +10 -0
  988. package/dist/types/components/eds-icons/social/eds-icon-linkedin/eds-icon-linkedin.d.ts +10 -0
  989. package/dist/types/components/eds-icons/social/eds-icon-mastodon/eds-icon-mastodon.d.ts +10 -0
  990. package/dist/types/components/eds-icons/social/eds-icon-twitter/eds-icon-twitter.d.ts +10 -0
  991. package/dist/types/components/eds-icons/social/eds-icon-youtube/eds-icon-youtube.d.ts +10 -0
  992. package/dist/types/components/eds-img/eds-img.d.ts +70 -0
  993. package/dist/types/components/eds-img/eds-img.stories.d.ts +76 -0
  994. package/dist/types/components/eds-input-elements/eds-input/eds-input.d.ts +35 -0
  995. package/dist/types/components/eds-input-elements/eds-input-footer/eds-input-footer.d.ts +14 -0
  996. package/dist/types/components/eds-input-elements/eds-input-label/eds-input-label.d.ts +10 -0
  997. package/dist/types/components/eds-input-elements/eds-input-range/eds-input-range.d.ts +25 -0
  998. package/dist/types/components/eds-input-elements/eds-input-search/eds-input-search.d.ts +25 -0
  999. package/dist/types/components/eds-input-elements/eds-input-select/eds-input-select.d.ts +21 -0
  1000. package/dist/types/components/eds-input-field/eds-input-field.d.ts +98 -0
  1001. package/dist/types/components/eds-input-field/eds-input-field.stories.d.ts +92 -0
  1002. package/dist/types/components/eds-link/eds-link.d.ts +83 -0
  1003. package/dist/types/components/eds-link/eds-link.stories.d.ts +74 -0
  1004. package/dist/types/components/eds-logo/eds-logo.d.ts +54 -0
  1005. package/dist/types/components/eds-logo/eds-logo.stories.d.ts +25 -0
  1006. package/dist/types/components/eds-modal/eds-modal.d.ts +44 -0
  1007. package/dist/types/components/eds-modal/eds-modal.stories.d.ts +14 -0
  1008. package/dist/types/components/eds-navigator/eds-navigator.d.ts +42 -0
  1009. package/dist/types/components/eds-navigator/eds-navigator.stories.d.ts +46 -0
  1010. package/dist/types/components/eds-pagination/eds-pagination.d.ts +98 -0
  1011. package/dist/types/components/eds-pagination/eds-pagination.stories.d.ts +108 -0
  1012. package/dist/types/components/eds-progress-bar/eds-progress-bar.d.ts +12 -0
  1013. package/dist/types/components/eds-progress-bar/eds-progress-bar.stories.d.ts +24 -0
  1014. package/dist/types/components/eds-rating/eds-rating.d.ts +36 -0
  1015. package/dist/types/components/eds-rating/eds-rating.stories.d.ts +51 -0
  1016. package/dist/types/components/eds-section/eds-section-core/eds-section-core.d.ts +28 -0
  1017. package/dist/types/components/eds-section/eds-section-core/eds-section-core.stories.d.ts +26 -0
  1018. package/dist/types/components/eds-section/eds-section-heading/eds-section-heading.d.ts +38 -0
  1019. package/dist/types/components/eds-tab/eds-tab.d.ts +15 -0
  1020. package/dist/types/components/eds-table/eds-table.d.ts +66 -0
  1021. package/dist/types/components/eds-table/eds-table.stories.d.ts +147 -0
  1022. package/dist/types/components/eds-tag/eds-tag.d.ts +34 -0
  1023. package/dist/types/components/eds-tag/eds-tag.stories.d.ts +28 -0
  1024. package/dist/types/components/eds-toast/eds-toast.d.ts +28 -0
  1025. package/dist/types/components/eds-toast/eds-toast.stories.d.ts +33 -0
  1026. package/dist/types/components/eds-tooltip/eds-tooltip.d.ts +47 -0
  1027. package/dist/types/components/eds-tooltip/eds-tooltip.stories.d.ts +19 -0
  1028. package/dist/types/components.d.ts +4918 -0
  1029. package/dist/types/eds-docs-ui/colors/color-palette/primary.d.ts +7 -0
  1030. package/dist/types/eds-docs-ui/colors/color-palette/secondary.d.ts +8 -0
  1031. package/dist/types/eds-docs-ui/colors/color-palette/support.d.ts +7 -0
  1032. package/dist/types/eds-docs-ui/colors/gradient-palette/primary.d.ts +7 -0
  1033. package/dist/types/eds-docs-ui/colors/gradient-palette/secondary.d.ts +7 -0
  1034. package/dist/types/eds-docs-ui/colors/gradient-palette/support.d.ts +7 -0
  1035. package/dist/types/eds-docs-ui/colors/use-of-colors/correct-use-of-colors.d.ts +10 -0
  1036. package/dist/types/eds-docs-ui/colors/use-of-colors/incorrect-use-of-colors.d.ts +10 -0
  1037. package/dist/types/eds-docs-ui/design-tokens/token-list/token-list.d.ts +11 -0
  1038. package/dist/types/eds-docs-ui/design-tokens/token-list/token-list.stories.d.ts +25 -0
  1039. package/dist/types/eds-docs-ui/design-tokens/token-radii/token-radii.d.ts +6 -0
  1040. package/dist/types/eds-docs-ui/design-tokens/token-ratios/token-ratios.d.ts +6 -0
  1041. package/dist/types/eds-docs-ui/design-tokens/token-shadows/token-shadows.d.ts +6 -0
  1042. package/dist/types/eds-docs-ui/design-tokens/token-spacing/token-spacing.d.ts +6 -0
  1043. package/dist/types/eds-docs-ui/design-tokens/token-typography/token-typography.d.ts +6 -0
  1044. package/dist/types/eds-docs-ui/eds-components-section/eds-components-section.d.ts +9 -0
  1045. package/dist/types/eds-docs-ui/eds-docs-palettes/eds-docs-palettes.d.ts +9 -0
  1046. package/dist/types/eds-docs-ui/eds-docs-tokens/eds-docs-tokens.d.ts +9 -0
  1047. package/dist/types/eds-docs-ui/eds-svg-repository/eds-svg-repository.d.ts +7 -0
  1048. package/dist/types/eds-docs-ui/functional/angular.d.ts +2 -0
  1049. package/dist/types/eds-docs-ui/functional/installation.d.ts +2 -0
  1050. package/dist/types/eds-docs-ui/functional/overview.d.ts +2 -0
  1051. package/dist/types/eds-docs-ui/functional/react.d.ts +2 -0
  1052. package/dist/types/eds-docs-ui/functional/usage.d.ts +2 -0
  1053. package/dist/types/eds-docs-ui/functional/vue.d.ts +2 -0
  1054. package/dist/types/eds-docs-ui/logo/logo-space/logo-space.d.ts +6 -0
  1055. package/dist/types/eds-docs-ui/logo/logo-variations/horizontal/logo-variations-horizontal.d.ts +12 -0
  1056. package/dist/types/eds-docs-ui/logo/logo-variations/vertical/logo-variations-vertical.d.ts +12 -0
  1057. package/dist/types/eds-docs-ui/logo/logo-wrong-usage/logo-wrong-usage.d.ts +6 -0
  1058. package/dist/types/index.d.ts +1 -0
  1059. package/dist/types/shared-ui/eds-card-section/eds-card-section.d.ts +43 -0
  1060. package/dist/types/shared-ui/eds-card-section/eds-card-section.stories.d.ts +33 -0
  1061. package/dist/types/shared-ui/eds-footer/eds-footer.d.ts +74 -0
  1062. package/dist/types/shared-ui/eds-footer/eds-footer.stories.d.ts +43 -0
  1063. package/dist/types/shared-ui/eds-fullscreen-menu/eds-fullscreen-menu.d.ts +57 -0
  1064. package/dist/types/shared-ui/eds-header/eds-header.d.ts +98 -0
  1065. package/dist/types/shared-ui/eds-header/eds-header.stories.d.ts +53 -0
  1066. package/dist/types/shared-ui/eds-login/eds-login.d.ts +50 -0
  1067. package/dist/types/shared-ui/eds-login/eds-login.stories.d.ts +33 -0
  1068. package/dist/types/shared-ui/eds-matomo-notice/eds-matomo-notice.d.ts +77 -0
  1069. package/dist/types/shared-ui/eds-matomo-notice/eds-matomo-notice.stories.d.ts +30 -0
  1070. package/dist/types/shared-ui/eds-social-networks/eds-social-networks.d.ts +25 -0
  1071. package/dist/types/shared-ui/eds-tabs/eds-tabs.d.ts +43 -0
  1072. package/dist/types/shared-ui/eds-tabs/eds-tabs.stories.d.ts +14 -0
  1073. package/dist/types/shared-ui/eds-tabs-content/eds-tabs-content.d.ts +36 -0
  1074. package/dist/types/shared-ui/eds-tabs-content/eds-tabs-content.stories.d.ts +16 -0
  1075. package/dist/types/shared-ui/eds-toast-manager/eds-toast-manager.d.ts +19 -0
  1076. package/dist/types/shared-ui/eds-toast-manager/eds-toast-manager.stories.d.ts +12 -0
  1077. package/dist/types/shared-ui/eds-user/eds-user.d.ts +81 -0
  1078. package/dist/types/shared-ui/eds-user-modal/eds-user-modal.d.ts +47 -0
  1079. package/dist/types/stencil-public-runtime.d.ts +1678 -0
  1080. package/dist/types/types/global.d.ts +10 -0
  1081. package/dist/types/utils/keycloak.d.ts +31 -0
  1082. package/dist/types/utils/toastManager.d.ts +15 -0
  1083. package/loader/cdn.js +1 -0
  1084. package/loader/index.cjs.js +1 -0
  1085. package/loader/index.d.ts +24 -0
  1086. package/loader/index.es2017.js +1 -0
  1087. package/loader/index.js +2 -0
  1088. package/loader/package.json +11 -0
  1089. package/package.json +20 -0
@@ -0,0 +1,1910 @@
1
+ 'use strict';
2
+
3
+ /*
4
+ * Copyright 2016 Red Hat, Inc. and/or its affiliates
5
+ * and other contributors as indicated by the @author tags.
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
19
+ function Keycloak (config) {
20
+ if (!(this instanceof Keycloak)) {
21
+ throw new Error("The 'Keycloak' constructor must be invoked with 'new'.")
22
+ }
23
+
24
+ if (typeof config !== 'string' && !isObject(config)) {
25
+ throw new Error("The 'Keycloak' constructor must be provided with a configuration object, or a URL to a JSON configuration file.");
26
+ }
27
+
28
+ if (isObject(config)) {
29
+ const requiredProperties = 'oidcProvider' in config
30
+ ? ['clientId']
31
+ : ['url', 'realm', 'clientId'];
32
+
33
+ for (const property of requiredProperties) {
34
+ if (!config[property]) {
35
+ throw new Error(`The configuration object is missing the required '${property}' property.`);
36
+ }
37
+ }
38
+ }
39
+
40
+ var kc = this;
41
+ var adapter;
42
+ var refreshQueue = [];
43
+ var callbackStorage;
44
+
45
+ var loginIframe = {
46
+ enable: true,
47
+ callbackList: [],
48
+ interval: 5
49
+ };
50
+
51
+ kc.didInitialize = false;
52
+
53
+ var useNonce = true;
54
+ var logInfo = createLogger(console.info);
55
+ var logWarn = createLogger(console.warn);
56
+
57
+ if (!globalThis.isSecureContext) {
58
+ logWarn(
59
+ "[KEYCLOAK] Keycloak JS must be used in a 'secure context' to function properly as it relies on browser APIs that are otherwise not available.\n" +
60
+ "Continuing to run your application insecurely will lead to unexpected behavior and breakage.\n\n" +
61
+ "For more information see: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts"
62
+ );
63
+ }
64
+
65
+ kc.init = function (initOptions) {
66
+ if (kc.didInitialize) {
67
+ throw new Error("A 'Keycloak' instance can only be initialized once.");
68
+ }
69
+
70
+ kc.didInitialize = true;
71
+
72
+ kc.authenticated = false;
73
+
74
+ callbackStorage = createCallbackStorage();
75
+ var adapters = ['default', 'cordova', 'cordova-native'];
76
+
77
+ if (initOptions && adapters.indexOf(initOptions.adapter) > -1) {
78
+ adapter = loadAdapter(initOptions.adapter);
79
+ } else if (initOptions && typeof initOptions.adapter === "object") {
80
+ adapter = initOptions.adapter;
81
+ } else {
82
+ if (window.Cordova || window.cordova) {
83
+ adapter = loadAdapter('cordova');
84
+ } else {
85
+ adapter = loadAdapter();
86
+ }
87
+ }
88
+
89
+ if (initOptions) {
90
+ if (typeof initOptions.useNonce !== 'undefined') {
91
+ useNonce = initOptions.useNonce;
92
+ }
93
+
94
+ if (typeof initOptions.checkLoginIframe !== 'undefined') {
95
+ loginIframe.enable = initOptions.checkLoginIframe;
96
+ }
97
+
98
+ if (initOptions.checkLoginIframeInterval) {
99
+ loginIframe.interval = initOptions.checkLoginIframeInterval;
100
+ }
101
+
102
+ if (initOptions.onLoad === 'login-required') {
103
+ kc.loginRequired = true;
104
+ }
105
+
106
+ if (initOptions.responseMode) {
107
+ if (initOptions.responseMode === 'query' || initOptions.responseMode === 'fragment') {
108
+ kc.responseMode = initOptions.responseMode;
109
+ } else {
110
+ throw 'Invalid value for responseMode';
111
+ }
112
+ }
113
+
114
+ if (initOptions.flow) {
115
+ switch (initOptions.flow) {
116
+ case 'standard':
117
+ kc.responseType = 'code';
118
+ break;
119
+ case 'implicit':
120
+ kc.responseType = 'id_token token';
121
+ break;
122
+ case 'hybrid':
123
+ kc.responseType = 'code id_token token';
124
+ break;
125
+ default:
126
+ throw 'Invalid value for flow';
127
+ }
128
+ kc.flow = initOptions.flow;
129
+ }
130
+
131
+ if (initOptions.timeSkew != null) {
132
+ kc.timeSkew = initOptions.timeSkew;
133
+ }
134
+
135
+ if(initOptions.redirectUri) {
136
+ kc.redirectUri = initOptions.redirectUri;
137
+ }
138
+
139
+ if (initOptions.silentCheckSsoRedirectUri) {
140
+ kc.silentCheckSsoRedirectUri = initOptions.silentCheckSsoRedirectUri;
141
+ }
142
+
143
+ if (typeof initOptions.silentCheckSsoFallback === 'boolean') {
144
+ kc.silentCheckSsoFallback = initOptions.silentCheckSsoFallback;
145
+ } else {
146
+ kc.silentCheckSsoFallback = true;
147
+ }
148
+
149
+ if (typeof initOptions.pkceMethod !== "undefined") {
150
+ if (initOptions.pkceMethod !== "S256" && initOptions.pkceMethod !== false) {
151
+ throw new TypeError(`Invalid value for pkceMethod', expected 'S256' or false but got ${initOptions.pkceMethod}.`);
152
+ }
153
+
154
+ kc.pkceMethod = initOptions.pkceMethod;
155
+ } else {
156
+ kc.pkceMethod = "S256";
157
+ }
158
+
159
+ if (typeof initOptions.enableLogging === 'boolean') {
160
+ kc.enableLogging = initOptions.enableLogging;
161
+ } else {
162
+ kc.enableLogging = false;
163
+ }
164
+
165
+ if (initOptions.logoutMethod === 'POST') {
166
+ kc.logoutMethod = 'POST';
167
+ } else {
168
+ kc.logoutMethod = 'GET';
169
+ }
170
+
171
+ if (typeof initOptions.scope === 'string') {
172
+ kc.scope = initOptions.scope;
173
+ }
174
+
175
+ if (typeof initOptions.acrValues === 'string') {
176
+ kc.acrValues = initOptions.acrValues;
177
+ }
178
+
179
+ if (typeof initOptions.messageReceiveTimeout === 'number' && initOptions.messageReceiveTimeout > 0) {
180
+ kc.messageReceiveTimeout = initOptions.messageReceiveTimeout;
181
+ } else {
182
+ kc.messageReceiveTimeout = 10000;
183
+ }
184
+ }
185
+
186
+ if (!kc.responseMode) {
187
+ kc.responseMode = 'fragment';
188
+ }
189
+ if (!kc.responseType) {
190
+ kc.responseType = 'code';
191
+ kc.flow = 'standard';
192
+ }
193
+
194
+ var promise = createPromise();
195
+
196
+ var initPromise = createPromise();
197
+ initPromise.promise.then(function() {
198
+ kc.onReady && kc.onReady(kc.authenticated);
199
+ promise.setSuccess(kc.authenticated);
200
+ }).catch(function(error) {
201
+ promise.setError(error);
202
+ });
203
+
204
+ var configPromise = loadConfig();
205
+
206
+ function onLoad() {
207
+ var doLogin = function(prompt) {
208
+ if (!prompt) {
209
+ options.prompt = 'none';
210
+ }
211
+
212
+ if (initOptions && initOptions.locale) {
213
+ options.locale = initOptions.locale;
214
+ }
215
+ kc.login(options).then(function () {
216
+ initPromise.setSuccess();
217
+ }).catch(function (error) {
218
+ initPromise.setError(error);
219
+ });
220
+ };
221
+
222
+ var checkSsoSilently = async function() {
223
+ var ifrm = document.createElement("iframe");
224
+ var src = await kc.createLoginUrl({prompt: 'none', redirectUri: kc.silentCheckSsoRedirectUri});
225
+ ifrm.setAttribute("src", src);
226
+ ifrm.setAttribute("sandbox", "allow-storage-access-by-user-activation allow-scripts allow-same-origin");
227
+ ifrm.setAttribute("title", "keycloak-silent-check-sso");
228
+ ifrm.style.display = "none";
229
+ document.body.appendChild(ifrm);
230
+
231
+ var messageCallback = function(event) {
232
+ if (event.origin !== window.location.origin || ifrm.contentWindow !== event.source) {
233
+ return;
234
+ }
235
+
236
+ var oauth = parseCallback(event.data);
237
+ processCallback(oauth, initPromise);
238
+
239
+ document.body.removeChild(ifrm);
240
+ window.removeEventListener("message", messageCallback);
241
+ };
242
+
243
+ window.addEventListener("message", messageCallback);
244
+ };
245
+
246
+ var options = {};
247
+ switch (initOptions.onLoad) {
248
+ case 'check-sso':
249
+ if (loginIframe.enable) {
250
+ setupCheckLoginIframe().then(function() {
251
+ checkLoginIframe().then(function (unchanged) {
252
+ if (!unchanged) {
253
+ kc.silentCheckSsoRedirectUri ? checkSsoSilently() : doLogin(false);
254
+ } else {
255
+ initPromise.setSuccess();
256
+ }
257
+ }).catch(function (error) {
258
+ initPromise.setError(error);
259
+ });
260
+ });
261
+ } else {
262
+ kc.silentCheckSsoRedirectUri ? checkSsoSilently() : doLogin(false);
263
+ }
264
+ break;
265
+ case 'login-required':
266
+ doLogin(true);
267
+ break;
268
+ default:
269
+ throw 'Invalid value for onLoad';
270
+ }
271
+ }
272
+
273
+ function processInit() {
274
+ var callback = parseCallback(window.location.href);
275
+
276
+ if (callback) {
277
+ window.history.replaceState(window.history.state, null, callback.newUrl);
278
+ }
279
+
280
+ if (callback && callback.valid) {
281
+ return setupCheckLoginIframe().then(function() {
282
+ processCallback(callback, initPromise);
283
+ }).catch(function (error) {
284
+ initPromise.setError(error);
285
+ });
286
+ } else if (initOptions) {
287
+ if (initOptions.token && initOptions.refreshToken) {
288
+ setToken(initOptions.token, initOptions.refreshToken, initOptions.idToken);
289
+
290
+ if (loginIframe.enable) {
291
+ setupCheckLoginIframe().then(function() {
292
+ checkLoginIframe().then(function (unchanged) {
293
+ if (unchanged) {
294
+ kc.onAuthSuccess && kc.onAuthSuccess();
295
+ initPromise.setSuccess();
296
+ scheduleCheckIframe();
297
+ } else {
298
+ initPromise.setSuccess();
299
+ }
300
+ }).catch(function (error) {
301
+ initPromise.setError(error);
302
+ });
303
+ });
304
+ } else {
305
+ kc.updateToken(-1).then(function() {
306
+ kc.onAuthSuccess && kc.onAuthSuccess();
307
+ initPromise.setSuccess();
308
+ }).catch(function(error) {
309
+ kc.onAuthError && kc.onAuthError();
310
+ if (initOptions.onLoad) {
311
+ onLoad();
312
+ } else {
313
+ initPromise.setError(error);
314
+ }
315
+ });
316
+ }
317
+ } else if (initOptions.onLoad) {
318
+ onLoad();
319
+ } else {
320
+ initPromise.setSuccess();
321
+ }
322
+ } else {
323
+ initPromise.setSuccess();
324
+ }
325
+ }
326
+
327
+ configPromise.then(function () {
328
+ check3pCookiesSupported()
329
+ .then(processInit)
330
+ .catch(function (error) {
331
+ promise.setError(error);
332
+ });
333
+ });
334
+ configPromise.catch(function (error) {
335
+ promise.setError(error);
336
+ });
337
+
338
+ return promise.promise;
339
+ };
340
+
341
+ kc.login = function (options) {
342
+ return adapter.login(options);
343
+ };
344
+
345
+ function generateRandomData(len) {
346
+ if (typeof crypto === "undefined" || typeof crypto.getRandomValues === "undefined") {
347
+ throw new Error("Web Crypto API is not available.");
348
+ }
349
+
350
+ return crypto.getRandomValues(new Uint8Array(len));
351
+ }
352
+
353
+ function generateCodeVerifier(len) {
354
+ return generateRandomString(len, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789');
355
+ }
356
+
357
+ function generateRandomString(len, alphabet){
358
+ var randomData = generateRandomData(len);
359
+ var chars = new Array(len);
360
+ for (var i = 0; i < len; i++) {
361
+ chars[i] = alphabet.charCodeAt(randomData[i] % alphabet.length);
362
+ }
363
+ return String.fromCharCode.apply(null, chars);
364
+ }
365
+
366
+ async function generatePkceChallenge(pkceMethod, codeVerifier) {
367
+ if (pkceMethod !== "S256") {
368
+ throw new TypeError(`Invalid value for 'pkceMethod', expected 'S256' but got '${pkceMethod}'.`);
369
+ }
370
+
371
+ // hash codeVerifier, then encode as url-safe base64 without padding
372
+ const hashBytes = new Uint8Array(await sha256Digest(codeVerifier));
373
+ const encodedHash = bytesToBase64(hashBytes)
374
+ .replace(/\+/g, '-')
375
+ .replace(/\//g, '_')
376
+ .replace(/\=/g, '');
377
+
378
+ return encodedHash;
379
+ }
380
+
381
+ function buildClaimsParameter(requestedAcr){
382
+ var claims = {
383
+ id_token: {
384
+ acr: requestedAcr
385
+ }
386
+ };
387
+ return JSON.stringify(claims);
388
+ }
389
+
390
+ kc.createLoginUrl = async function(options) {
391
+ var state = createUUID();
392
+ var nonce = createUUID();
393
+
394
+ var redirectUri = adapter.redirectUri(options);
395
+
396
+ var callbackState = {
397
+ state: state,
398
+ nonce: nonce,
399
+ redirectUri: encodeURIComponent(redirectUri),
400
+ loginOptions: options
401
+ };
402
+
403
+ if (options && options.prompt) {
404
+ callbackState.prompt = options.prompt;
405
+ }
406
+
407
+ var baseUrl;
408
+ if (options && options.action == 'register') {
409
+ baseUrl = kc.endpoints.register();
410
+ } else {
411
+ baseUrl = kc.endpoints.authorize();
412
+ }
413
+
414
+ var scope = options && options.scope || kc.scope;
415
+ if (!scope) {
416
+ // if scope is not set, default to "openid"
417
+ scope = "openid";
418
+ } else if (scope.indexOf("openid") === -1) {
419
+ // if openid scope is missing, prefix the given scopes with it
420
+ scope = "openid " + scope;
421
+ }
422
+
423
+ var url = baseUrl
424
+ + '?client_id=' + encodeURIComponent(kc.clientId)
425
+ + '&redirect_uri=' + encodeURIComponent(redirectUri)
426
+ + '&state=' + encodeURIComponent(state)
427
+ + '&response_mode=' + encodeURIComponent(kc.responseMode)
428
+ + '&response_type=' + encodeURIComponent(kc.responseType)
429
+ + '&scope=' + encodeURIComponent(scope);
430
+ if (useNonce) {
431
+ url = url + '&nonce=' + encodeURIComponent(nonce);
432
+ }
433
+
434
+ if (options && options.prompt) {
435
+ url += '&prompt=' + encodeURIComponent(options.prompt);
436
+ }
437
+
438
+ if (options && typeof options.maxAge === 'number') {
439
+ url += '&max_age=' + encodeURIComponent(options.maxAge);
440
+ }
441
+
442
+ if (options && options.loginHint) {
443
+ url += '&login_hint=' + encodeURIComponent(options.loginHint);
444
+ }
445
+
446
+ if (options && options.idpHint) {
447
+ url += '&kc_idp_hint=' + encodeURIComponent(options.idpHint);
448
+ }
449
+
450
+ if (options && options.action && options.action != 'register') {
451
+ url += '&kc_action=' + encodeURIComponent(options.action);
452
+ }
453
+
454
+ if (options && options.locale) {
455
+ url += '&ui_locales=' + encodeURIComponent(options.locale);
456
+ }
457
+
458
+ if (options && options.acr) {
459
+ var claimsParameter = buildClaimsParameter(options.acr);
460
+ url += '&claims=' + encodeURIComponent(claimsParameter);
461
+ }
462
+
463
+ if ((options && options.acrValues) || kc.acrValues) {
464
+ url += '&acr_values=' + encodeURIComponent(options.acrValues || kc.acrValues);
465
+ }
466
+
467
+ if (kc.pkceMethod) {
468
+ try {
469
+ const codeVerifier = generateCodeVerifier(96);
470
+ const pkceChallenge = await generatePkceChallenge(kc.pkceMethod, codeVerifier);
471
+
472
+ callbackState.pkceCodeVerifier = codeVerifier;
473
+
474
+ url += '&code_challenge=' + pkceChallenge;
475
+ url += '&code_challenge_method=' + kc.pkceMethod;
476
+ } catch (error) {
477
+ throw new Error("Failed to generate PKCE challenge.", { cause: error });
478
+ }
479
+ }
480
+
481
+ callbackStorage.add(callbackState);
482
+
483
+ return url;
484
+ };
485
+
486
+ kc.logout = function(options) {
487
+ return adapter.logout(options);
488
+ };
489
+
490
+ kc.createLogoutUrl = function(options) {
491
+
492
+ const logoutMethod = options?.logoutMethod ?? kc.logoutMethod;
493
+ if (logoutMethod === 'POST') {
494
+ return kc.endpoints.logout();
495
+ }
496
+
497
+ var url = kc.endpoints.logout()
498
+ + '?client_id=' + encodeURIComponent(kc.clientId)
499
+ + '&post_logout_redirect_uri=' + encodeURIComponent(adapter.redirectUri(options, false));
500
+
501
+ if (kc.idToken) {
502
+ url += '&id_token_hint=' + encodeURIComponent(kc.idToken);
503
+ }
504
+
505
+ return url;
506
+ };
507
+
508
+ kc.register = function (options) {
509
+ return adapter.register(options);
510
+ };
511
+
512
+ kc.createRegisterUrl = async function(options) {
513
+ if (!options) {
514
+ options = {};
515
+ }
516
+ options.action = 'register';
517
+ return await kc.createLoginUrl(options);
518
+ };
519
+
520
+ kc.createAccountUrl = function(options) {
521
+ var realm = getRealmUrl();
522
+ var url = undefined;
523
+ if (typeof realm !== 'undefined') {
524
+ url = realm
525
+ + '/account'
526
+ + '?referrer=' + encodeURIComponent(kc.clientId)
527
+ + '&referrer_uri=' + encodeURIComponent(adapter.redirectUri(options));
528
+ }
529
+ return url;
530
+ };
531
+
532
+ kc.accountManagement = function() {
533
+ return adapter.accountManagement();
534
+ };
535
+
536
+ kc.hasRealmRole = function (role) {
537
+ var access = kc.realmAccess;
538
+ return !!access && access.roles.indexOf(role) >= 0;
539
+ };
540
+
541
+ kc.hasResourceRole = function(role, resource) {
542
+ if (!kc.resourceAccess) {
543
+ return false;
544
+ }
545
+
546
+ var access = kc.resourceAccess[resource || kc.clientId];
547
+ return !!access && access.roles.indexOf(role) >= 0;
548
+ };
549
+
550
+ kc.loadUserProfile = function() {
551
+ var url = getRealmUrl() + '/account';
552
+ var req = new XMLHttpRequest();
553
+ req.open('GET', url, true);
554
+ req.setRequestHeader('Accept', 'application/json');
555
+ req.setRequestHeader('Authorization', 'bearer ' + kc.token);
556
+
557
+ var promise = createPromise();
558
+
559
+ req.onreadystatechange = function () {
560
+ if (req.readyState == 4) {
561
+ if (req.status == 200) {
562
+ kc.profile = JSON.parse(req.responseText);
563
+ promise.setSuccess(kc.profile);
564
+ } else {
565
+ promise.setError();
566
+ }
567
+ }
568
+ };
569
+
570
+ req.send();
571
+
572
+ return promise.promise;
573
+ };
574
+
575
+ kc.loadUserInfo = function() {
576
+ var url = kc.endpoints.userinfo();
577
+ var req = new XMLHttpRequest();
578
+ req.open('GET', url, true);
579
+ req.setRequestHeader('Accept', 'application/json');
580
+ req.setRequestHeader('Authorization', 'bearer ' + kc.token);
581
+
582
+ var promise = createPromise();
583
+
584
+ req.onreadystatechange = function () {
585
+ if (req.readyState == 4) {
586
+ if (req.status == 200) {
587
+ kc.userInfo = JSON.parse(req.responseText);
588
+ promise.setSuccess(kc.userInfo);
589
+ } else {
590
+ promise.setError();
591
+ }
592
+ }
593
+ };
594
+
595
+ req.send();
596
+
597
+ return promise.promise;
598
+ };
599
+
600
+ kc.isTokenExpired = function(minValidity) {
601
+ if (!kc.tokenParsed || (!kc.refreshToken && kc.flow != 'implicit' )) {
602
+ throw 'Not authenticated';
603
+ }
604
+
605
+ if (kc.timeSkew == null) {
606
+ logInfo('[KEYCLOAK] Unable to determine if token is expired as timeskew is not set');
607
+ return true;
608
+ }
609
+
610
+ var expiresIn = kc.tokenParsed['exp'] - Math.ceil(new Date().getTime() / 1000) + kc.timeSkew;
611
+ if (minValidity) {
612
+ if (isNaN(minValidity)) {
613
+ throw 'Invalid minValidity';
614
+ }
615
+ expiresIn -= minValidity;
616
+ }
617
+ return expiresIn < 0;
618
+ };
619
+
620
+ kc.updateToken = function(minValidity) {
621
+ var promise = createPromise();
622
+
623
+ if (!kc.refreshToken) {
624
+ promise.setError();
625
+ return promise.promise;
626
+ }
627
+
628
+ minValidity = minValidity || 5;
629
+
630
+ var exec = function() {
631
+ var refreshToken = false;
632
+ if (minValidity == -1) {
633
+ refreshToken = true;
634
+ logInfo('[KEYCLOAK] Refreshing token: forced refresh');
635
+ } else if (!kc.tokenParsed || kc.isTokenExpired(minValidity)) {
636
+ refreshToken = true;
637
+ logInfo('[KEYCLOAK] Refreshing token: token expired');
638
+ }
639
+
640
+ if (!refreshToken) {
641
+ promise.setSuccess(false);
642
+ } else {
643
+ var params = 'grant_type=refresh_token&' + 'refresh_token=' + kc.refreshToken;
644
+ var url = kc.endpoints.token();
645
+
646
+ refreshQueue.push(promise);
647
+
648
+ if (refreshQueue.length == 1) {
649
+ var req = new XMLHttpRequest();
650
+ req.open('POST', url, true);
651
+ req.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
652
+ req.withCredentials = true;
653
+
654
+ params += '&client_id=' + encodeURIComponent(kc.clientId);
655
+
656
+ var timeLocal = new Date().getTime();
657
+
658
+ req.onreadystatechange = function () {
659
+ if (req.readyState == 4) {
660
+ if (req.status == 200) {
661
+ logInfo('[KEYCLOAK] Token refreshed');
662
+
663
+ timeLocal = (timeLocal + new Date().getTime()) / 2;
664
+
665
+ var tokenResponse = JSON.parse(req.responseText);
666
+
667
+ setToken(tokenResponse['access_token'], tokenResponse['refresh_token'], tokenResponse['id_token'], timeLocal);
668
+
669
+ kc.onAuthRefreshSuccess && kc.onAuthRefreshSuccess();
670
+ for (var p = refreshQueue.pop(); p != null; p = refreshQueue.pop()) {
671
+ p.setSuccess(true);
672
+ }
673
+ } else {
674
+ logWarn('[KEYCLOAK] Failed to refresh token');
675
+
676
+ if (req.status == 400) {
677
+ kc.clearToken();
678
+ }
679
+
680
+ kc.onAuthRefreshError && kc.onAuthRefreshError();
681
+ for (var p = refreshQueue.pop(); p != null; p = refreshQueue.pop()) {
682
+ p.setError(true);
683
+ }
684
+ }
685
+ }
686
+ };
687
+
688
+ req.send(params);
689
+ }
690
+ }
691
+ };
692
+
693
+ if (loginIframe.enable) {
694
+ var iframePromise = checkLoginIframe();
695
+ iframePromise.then(function() {
696
+ exec();
697
+ }).catch(function(error) {
698
+ promise.setError(error);
699
+ });
700
+ } else {
701
+ exec();
702
+ }
703
+
704
+ return promise.promise;
705
+ };
706
+
707
+ kc.clearToken = function() {
708
+ if (kc.token) {
709
+ setToken(null, null, null);
710
+ kc.onAuthLogout && kc.onAuthLogout();
711
+ if (kc.loginRequired) {
712
+ kc.login();
713
+ }
714
+ }
715
+ };
716
+
717
+ function getRealmUrl() {
718
+ if (typeof kc.authServerUrl !== 'undefined') {
719
+ if (kc.authServerUrl.charAt(kc.authServerUrl.length - 1) == '/') {
720
+ return kc.authServerUrl + 'realms/' + encodeURIComponent(kc.realm);
721
+ } else {
722
+ return kc.authServerUrl + '/realms/' + encodeURIComponent(kc.realm);
723
+ }
724
+ } else {
725
+ return undefined;
726
+ }
727
+ }
728
+
729
+ function getOrigin() {
730
+ if (!window.location.origin) {
731
+ return window.location.protocol + "//" + window.location.hostname + (window.location.port ? ':' + window.location.port: '');
732
+ } else {
733
+ return window.location.origin;
734
+ }
735
+ }
736
+
737
+ function processCallback(oauth, promise) {
738
+ var code = oauth.code;
739
+ var error = oauth.error;
740
+ var prompt = oauth.prompt;
741
+
742
+ var timeLocal = new Date().getTime();
743
+
744
+ if (oauth['kc_action_status']) {
745
+ kc.onActionUpdate && kc.onActionUpdate(oauth['kc_action_status'], oauth['kc_action']);
746
+ }
747
+
748
+ if (error) {
749
+ if (prompt != 'none') {
750
+ if (oauth.error_description && oauth.error_description === "authentication_expired") {
751
+ kc.login(oauth.loginOptions);
752
+ } else {
753
+ var errorData = { error: error, error_description: oauth.error_description };
754
+ kc.onAuthError && kc.onAuthError(errorData);
755
+ promise && promise.setError(errorData);
756
+ }
757
+ } else {
758
+ promise && promise.setSuccess();
759
+ }
760
+ return;
761
+ } else if ((kc.flow != 'standard') && (oauth.access_token || oauth.id_token)) {
762
+ authSuccess(oauth.access_token, null, oauth.id_token, true);
763
+ }
764
+
765
+ if ((kc.flow != 'implicit') && code) {
766
+ var params = 'code=' + code + '&grant_type=authorization_code';
767
+ var url = kc.endpoints.token();
768
+
769
+ var req = new XMLHttpRequest();
770
+ req.open('POST', url, true);
771
+ req.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
772
+
773
+ params += '&client_id=' + encodeURIComponent(kc.clientId);
774
+ params += '&redirect_uri=' + oauth.redirectUri;
775
+
776
+ if (oauth.pkceCodeVerifier) {
777
+ params += '&code_verifier=' + oauth.pkceCodeVerifier;
778
+ }
779
+
780
+ req.withCredentials = true;
781
+
782
+ req.onreadystatechange = function() {
783
+ if (req.readyState == 4) {
784
+ if (req.status == 200) {
785
+
786
+ var tokenResponse = JSON.parse(req.responseText);
787
+ authSuccess(tokenResponse['access_token'], tokenResponse['refresh_token'], tokenResponse['id_token'], kc.flow === 'standard');
788
+ scheduleCheckIframe();
789
+ } else {
790
+ kc.onAuthError && kc.onAuthError();
791
+ promise && promise.setError();
792
+ }
793
+ }
794
+ };
795
+
796
+ req.send(params);
797
+ }
798
+
799
+ function authSuccess(accessToken, refreshToken, idToken, fulfillPromise) {
800
+ timeLocal = (timeLocal + new Date().getTime()) / 2;
801
+
802
+ setToken(accessToken, refreshToken, idToken, timeLocal);
803
+
804
+ if (useNonce && (kc.idTokenParsed && kc.idTokenParsed.nonce != oauth.storedNonce)) {
805
+ logInfo('[KEYCLOAK] Invalid nonce, clearing token');
806
+ kc.clearToken();
807
+ promise && promise.setError();
808
+ } else {
809
+ if (fulfillPromise) {
810
+ kc.onAuthSuccess && kc.onAuthSuccess();
811
+ promise && promise.setSuccess();
812
+ }
813
+ }
814
+ }
815
+
816
+ }
817
+
818
+ function loadConfig() {
819
+ var promise = createPromise();
820
+ var configUrl;
821
+
822
+ if (typeof config === 'string') {
823
+ configUrl = config;
824
+ }
825
+
826
+ function setupOidcEndoints(oidcConfiguration) {
827
+ if (! oidcConfiguration) {
828
+ kc.endpoints = {
829
+ authorize: function() {
830
+ return getRealmUrl() + '/protocol/openid-connect/auth';
831
+ },
832
+ token: function() {
833
+ return getRealmUrl() + '/protocol/openid-connect/token';
834
+ },
835
+ logout: function() {
836
+ return getRealmUrl() + '/protocol/openid-connect/logout';
837
+ },
838
+ checkSessionIframe: function() {
839
+ return getRealmUrl() + '/protocol/openid-connect/login-status-iframe.html';
840
+ },
841
+ thirdPartyCookiesIframe: function() {
842
+ return getRealmUrl() + '/protocol/openid-connect/3p-cookies/step1.html';
843
+ },
844
+ register: function() {
845
+ return getRealmUrl() + '/protocol/openid-connect/registrations';
846
+ },
847
+ userinfo: function() {
848
+ return getRealmUrl() + '/protocol/openid-connect/userinfo';
849
+ }
850
+ };
851
+ } else {
852
+ kc.endpoints = {
853
+ authorize: function() {
854
+ return oidcConfiguration.authorization_endpoint;
855
+ },
856
+ token: function() {
857
+ return oidcConfiguration.token_endpoint;
858
+ },
859
+ logout: function() {
860
+ if (!oidcConfiguration.end_session_endpoint) {
861
+ throw "Not supported by the OIDC server";
862
+ }
863
+ return oidcConfiguration.end_session_endpoint;
864
+ },
865
+ checkSessionIframe: function() {
866
+ if (!oidcConfiguration.check_session_iframe) {
867
+ throw "Not supported by the OIDC server";
868
+ }
869
+ return oidcConfiguration.check_session_iframe;
870
+ },
871
+ register: function() {
872
+ throw 'Redirection to "Register user" page not supported in standard OIDC mode';
873
+ },
874
+ userinfo: function() {
875
+ if (!oidcConfiguration.userinfo_endpoint) {
876
+ throw "Not supported by the OIDC server";
877
+ }
878
+ return oidcConfiguration.userinfo_endpoint;
879
+ }
880
+ };
881
+ }
882
+ }
883
+
884
+ if (configUrl) {
885
+ var req = new XMLHttpRequest();
886
+ req.open('GET', configUrl, true);
887
+ req.setRequestHeader('Accept', 'application/json');
888
+
889
+ req.onreadystatechange = function () {
890
+ if (req.readyState == 4) {
891
+ if (req.status == 200 || fileLoaded(req)) {
892
+ var config = JSON.parse(req.responseText);
893
+
894
+ kc.authServerUrl = config['auth-server-url'];
895
+ kc.realm = config['realm'];
896
+ kc.clientId = config['resource'];
897
+ setupOidcEndoints(null);
898
+ promise.setSuccess();
899
+ } else {
900
+ promise.setError();
901
+ }
902
+ }
903
+ };
904
+
905
+ req.send();
906
+ } else {
907
+ kc.clientId = config.clientId;
908
+
909
+ var oidcProvider = config['oidcProvider'];
910
+ if (!oidcProvider) {
911
+ kc.authServerUrl = config.url;
912
+ kc.realm = config.realm;
913
+ setupOidcEndoints(null);
914
+ promise.setSuccess();
915
+ } else {
916
+ if (typeof oidcProvider === 'string') {
917
+ var oidcProviderConfigUrl;
918
+ if (oidcProvider.charAt(oidcProvider.length - 1) == '/') {
919
+ oidcProviderConfigUrl = oidcProvider + '.well-known/openid-configuration';
920
+ } else {
921
+ oidcProviderConfigUrl = oidcProvider + '/.well-known/openid-configuration';
922
+ }
923
+ var req = new XMLHttpRequest();
924
+ req.open('GET', oidcProviderConfigUrl, true);
925
+ req.setRequestHeader('Accept', 'application/json');
926
+
927
+ req.onreadystatechange = function () {
928
+ if (req.readyState == 4) {
929
+ if (req.status == 200 || fileLoaded(req)) {
930
+ var oidcProviderConfig = JSON.parse(req.responseText);
931
+ setupOidcEndoints(oidcProviderConfig);
932
+ promise.setSuccess();
933
+ } else {
934
+ promise.setError();
935
+ }
936
+ }
937
+ };
938
+
939
+ req.send();
940
+ } else {
941
+ setupOidcEndoints(oidcProvider);
942
+ promise.setSuccess();
943
+ }
944
+ }
945
+ }
946
+
947
+ return promise.promise;
948
+ }
949
+
950
+ function fileLoaded(xhr) {
951
+ return xhr.status == 0 && xhr.responseText && xhr.responseURL.startsWith('file:');
952
+ }
953
+
954
+ function setToken(token, refreshToken, idToken, timeLocal) {
955
+ if (kc.tokenTimeoutHandle) {
956
+ clearTimeout(kc.tokenTimeoutHandle);
957
+ kc.tokenTimeoutHandle = null;
958
+ }
959
+
960
+ if (refreshToken) {
961
+ kc.refreshToken = refreshToken;
962
+ kc.refreshTokenParsed = decodeToken(refreshToken);
963
+ } else {
964
+ delete kc.refreshToken;
965
+ delete kc.refreshTokenParsed;
966
+ }
967
+
968
+ if (idToken) {
969
+ kc.idToken = idToken;
970
+ kc.idTokenParsed = decodeToken(idToken);
971
+ } else {
972
+ delete kc.idToken;
973
+ delete kc.idTokenParsed;
974
+ }
975
+
976
+ if (token) {
977
+ kc.token = token;
978
+ kc.tokenParsed = decodeToken(token);
979
+ kc.sessionId = kc.tokenParsed.sid;
980
+ kc.authenticated = true;
981
+ kc.subject = kc.tokenParsed.sub;
982
+ kc.realmAccess = kc.tokenParsed.realm_access;
983
+ kc.resourceAccess = kc.tokenParsed.resource_access;
984
+
985
+ if (timeLocal) {
986
+ kc.timeSkew = Math.floor(timeLocal / 1000) - kc.tokenParsed.iat;
987
+ }
988
+
989
+ if (kc.timeSkew != null) {
990
+ logInfo('[KEYCLOAK] Estimated time difference between browser and server is ' + kc.timeSkew + ' seconds');
991
+
992
+ if (kc.onTokenExpired) {
993
+ var expiresIn = (kc.tokenParsed['exp'] - (new Date().getTime() / 1000) + kc.timeSkew) * 1000;
994
+ logInfo('[KEYCLOAK] Token expires in ' + Math.round(expiresIn / 1000) + ' s');
995
+ if (expiresIn <= 0) {
996
+ kc.onTokenExpired();
997
+ } else {
998
+ kc.tokenTimeoutHandle = setTimeout(kc.onTokenExpired, expiresIn);
999
+ }
1000
+ }
1001
+ }
1002
+ } else {
1003
+ delete kc.token;
1004
+ delete kc.tokenParsed;
1005
+ delete kc.subject;
1006
+ delete kc.realmAccess;
1007
+ delete kc.resourceAccess;
1008
+
1009
+ kc.authenticated = false;
1010
+ }
1011
+ }
1012
+
1013
+ function createUUID() {
1014
+ if (typeof crypto === "undefined" || typeof crypto.randomUUID === "undefined") {
1015
+ throw new Error("Web Crypto API is not available.");
1016
+ }
1017
+
1018
+ return crypto.randomUUID();
1019
+ }
1020
+
1021
+ function parseCallback(url) {
1022
+ var oauth = parseCallbackUrl(url);
1023
+ if (!oauth) {
1024
+ return;
1025
+ }
1026
+
1027
+ var oauthState = callbackStorage.get(oauth.state);
1028
+
1029
+ if (oauthState) {
1030
+ oauth.valid = true;
1031
+ oauth.redirectUri = oauthState.redirectUri;
1032
+ oauth.storedNonce = oauthState.nonce;
1033
+ oauth.prompt = oauthState.prompt;
1034
+ oauth.pkceCodeVerifier = oauthState.pkceCodeVerifier;
1035
+ oauth.loginOptions = oauthState.loginOptions;
1036
+ }
1037
+
1038
+ return oauth;
1039
+ }
1040
+
1041
+ function parseCallbackUrl(url) {
1042
+ var supportedParams;
1043
+ switch (kc.flow) {
1044
+ case 'standard':
1045
+ supportedParams = ['code', 'state', 'session_state', 'kc_action_status', 'kc_action', 'iss'];
1046
+ break;
1047
+ case 'implicit':
1048
+ supportedParams = ['access_token', 'token_type', 'id_token', 'state', 'session_state', 'expires_in', 'kc_action_status', 'kc_action', 'iss'];
1049
+ break;
1050
+ case 'hybrid':
1051
+ supportedParams = ['access_token', 'token_type', 'id_token', 'code', 'state', 'session_state', 'expires_in', 'kc_action_status', 'kc_action', 'iss'];
1052
+ break;
1053
+ }
1054
+
1055
+ supportedParams.push('error');
1056
+ supportedParams.push('error_description');
1057
+ supportedParams.push('error_uri');
1058
+
1059
+ var queryIndex = url.indexOf('?');
1060
+ var fragmentIndex = url.indexOf('#');
1061
+
1062
+ var newUrl;
1063
+ var parsed;
1064
+
1065
+ if (kc.responseMode === 'query' && queryIndex !== -1) {
1066
+ newUrl = url.substring(0, queryIndex);
1067
+ parsed = parseCallbackParams(url.substring(queryIndex + 1, fragmentIndex !== -1 ? fragmentIndex : url.length), supportedParams);
1068
+ if (parsed.paramsString !== '') {
1069
+ newUrl += '?' + parsed.paramsString;
1070
+ }
1071
+ if (fragmentIndex !== -1) {
1072
+ newUrl += url.substring(fragmentIndex);
1073
+ }
1074
+ } else if (kc.responseMode === 'fragment' && fragmentIndex !== -1) {
1075
+ newUrl = url.substring(0, fragmentIndex);
1076
+ parsed = parseCallbackParams(url.substring(fragmentIndex + 1), supportedParams);
1077
+ if (parsed.paramsString !== '') {
1078
+ newUrl += '#' + parsed.paramsString;
1079
+ }
1080
+ }
1081
+
1082
+ if (parsed && parsed.oauthParams) {
1083
+ if (kc.flow === 'standard' || kc.flow === 'hybrid') {
1084
+ if ((parsed.oauthParams.code || parsed.oauthParams.error) && parsed.oauthParams.state) {
1085
+ parsed.oauthParams.newUrl = newUrl;
1086
+ return parsed.oauthParams;
1087
+ }
1088
+ } else if (kc.flow === 'implicit') {
1089
+ if ((parsed.oauthParams.access_token || parsed.oauthParams.error) && parsed.oauthParams.state) {
1090
+ parsed.oauthParams.newUrl = newUrl;
1091
+ return parsed.oauthParams;
1092
+ }
1093
+ }
1094
+ }
1095
+ }
1096
+
1097
+ function parseCallbackParams(paramsString, supportedParams) {
1098
+ var p = paramsString.split('&');
1099
+ var result = {
1100
+ paramsString: '',
1101
+ oauthParams: {}
1102
+ };
1103
+ for (var i = 0; i < p.length; i++) {
1104
+ var split = p[i].indexOf("=");
1105
+ var key = p[i].slice(0, split);
1106
+ if (supportedParams.indexOf(key) !== -1) {
1107
+ result.oauthParams[key] = p[i].slice(split + 1);
1108
+ } else {
1109
+ if (result.paramsString !== '') {
1110
+ result.paramsString += '&';
1111
+ }
1112
+ result.paramsString += p[i];
1113
+ }
1114
+ }
1115
+ return result;
1116
+ }
1117
+
1118
+ function createPromise() {
1119
+ // Need to create a native Promise which also preserves the
1120
+ // interface of the custom promise type previously used by the API
1121
+ var p = {
1122
+ setSuccess: function(result) {
1123
+ p.resolve(result);
1124
+ },
1125
+
1126
+ setError: function(result) {
1127
+ p.reject(result);
1128
+ }
1129
+ };
1130
+ p.promise = new Promise(function(resolve, reject) {
1131
+ p.resolve = resolve;
1132
+ p.reject = reject;
1133
+ });
1134
+
1135
+ return p;
1136
+ }
1137
+
1138
+ // Function to extend existing native Promise with timeout
1139
+ function applyTimeoutToPromise(promise, timeout, errorMessage) {
1140
+ var timeoutHandle = null;
1141
+ var timeoutPromise = new Promise(function (resolve, reject) {
1142
+ timeoutHandle = setTimeout(function () {
1143
+ reject({ "error": errorMessage || "Promise is not settled within timeout of " + timeout + "ms" });
1144
+ }, timeout);
1145
+ });
1146
+
1147
+ return Promise.race([promise, timeoutPromise]).finally(function () {
1148
+ clearTimeout(timeoutHandle);
1149
+ });
1150
+ }
1151
+
1152
+ function setupCheckLoginIframe() {
1153
+ var promise = createPromise();
1154
+
1155
+ if (!loginIframe.enable) {
1156
+ promise.setSuccess();
1157
+ return promise.promise;
1158
+ }
1159
+
1160
+ if (loginIframe.iframe) {
1161
+ promise.setSuccess();
1162
+ return promise.promise;
1163
+ }
1164
+
1165
+ var iframe = document.createElement('iframe');
1166
+ loginIframe.iframe = iframe;
1167
+
1168
+ iframe.onload = function() {
1169
+ var authUrl = kc.endpoints.authorize();
1170
+ if (authUrl.charAt(0) === '/') {
1171
+ loginIframe.iframeOrigin = getOrigin();
1172
+ } else {
1173
+ loginIframe.iframeOrigin = authUrl.substring(0, authUrl.indexOf('/', 8));
1174
+ }
1175
+ promise.setSuccess();
1176
+ };
1177
+
1178
+ var src = kc.endpoints.checkSessionIframe();
1179
+ iframe.setAttribute('src', src );
1180
+ iframe.setAttribute('sandbox', 'allow-storage-access-by-user-activation allow-scripts allow-same-origin');
1181
+ iframe.setAttribute('title', 'keycloak-session-iframe' );
1182
+ iframe.style.display = 'none';
1183
+ document.body.appendChild(iframe);
1184
+
1185
+ var messageCallback = function(event) {
1186
+ if ((event.origin !== loginIframe.iframeOrigin) || (loginIframe.iframe.contentWindow !== event.source)) {
1187
+ return;
1188
+ }
1189
+
1190
+ if (!(event.data == 'unchanged' || event.data == 'changed' || event.data == 'error')) {
1191
+ return;
1192
+ }
1193
+
1194
+
1195
+ if (event.data != 'unchanged') {
1196
+ kc.clearToken();
1197
+ }
1198
+
1199
+ var callbacks = loginIframe.callbackList.splice(0, loginIframe.callbackList.length);
1200
+
1201
+ for (var i = callbacks.length - 1; i >= 0; --i) {
1202
+ var promise = callbacks[i];
1203
+ if (event.data == 'error') {
1204
+ promise.setError();
1205
+ } else {
1206
+ promise.setSuccess(event.data == 'unchanged');
1207
+ }
1208
+ }
1209
+ };
1210
+
1211
+ window.addEventListener('message', messageCallback, false);
1212
+
1213
+ return promise.promise;
1214
+ }
1215
+
1216
+ function scheduleCheckIframe() {
1217
+ if (loginIframe.enable) {
1218
+ if (kc.token) {
1219
+ setTimeout(function() {
1220
+ checkLoginIframe().then(function(unchanged) {
1221
+ if (unchanged) {
1222
+ scheduleCheckIframe();
1223
+ }
1224
+ });
1225
+ }, loginIframe.interval * 1000);
1226
+ }
1227
+ }
1228
+ }
1229
+
1230
+ function checkLoginIframe() {
1231
+ var promise = createPromise();
1232
+
1233
+ if (loginIframe.iframe && loginIframe.iframeOrigin ) {
1234
+ var msg = kc.clientId + ' ' + (kc.sessionId ? kc.sessionId : '');
1235
+ loginIframe.callbackList.push(promise);
1236
+ var origin = loginIframe.iframeOrigin;
1237
+ if (loginIframe.callbackList.length == 1) {
1238
+ loginIframe.iframe.contentWindow.postMessage(msg, origin);
1239
+ }
1240
+ } else {
1241
+ promise.setSuccess();
1242
+ }
1243
+
1244
+ return promise.promise;
1245
+ }
1246
+
1247
+ function check3pCookiesSupported() {
1248
+ var promise = createPromise();
1249
+
1250
+ if (loginIframe.enable || kc.silentCheckSsoRedirectUri) {
1251
+ var iframe = document.createElement('iframe');
1252
+ iframe.setAttribute('src', kc.endpoints.thirdPartyCookiesIframe());
1253
+ iframe.setAttribute('sandbox', 'allow-storage-access-by-user-activation allow-scripts allow-same-origin');
1254
+ iframe.setAttribute('title', 'keycloak-3p-check-iframe' );
1255
+ iframe.style.display = 'none';
1256
+ document.body.appendChild(iframe);
1257
+
1258
+ var messageCallback = function(event) {
1259
+ if (iframe.contentWindow !== event.source) {
1260
+ return;
1261
+ }
1262
+
1263
+ if (event.data !== "supported" && event.data !== "unsupported") {
1264
+ return;
1265
+ } else if (event.data === "unsupported") {
1266
+ logWarn(
1267
+ "[KEYCLOAK] Your browser is blocking access to 3rd-party cookies, this means:\n\n" +
1268
+ " - It is not possible to retrieve tokens without redirecting to the Keycloak server (a.k.a. no support for silent authentication).\n" +
1269
+ " - It is not possible to automatically detect changes to the session status (such as the user logging out in another tab).\n\n" +
1270
+ "For more information see: https://www.keycloak.org/docs/latest/securing_apps/#_modern_browsers"
1271
+ );
1272
+
1273
+ loginIframe.enable = false;
1274
+ if (kc.silentCheckSsoFallback) {
1275
+ kc.silentCheckSsoRedirectUri = false;
1276
+ }
1277
+ }
1278
+
1279
+ document.body.removeChild(iframe);
1280
+ window.removeEventListener("message", messageCallback);
1281
+ promise.setSuccess();
1282
+ };
1283
+
1284
+ window.addEventListener('message', messageCallback, false);
1285
+ } else {
1286
+ promise.setSuccess();
1287
+ }
1288
+
1289
+ return applyTimeoutToPromise(promise.promise, kc.messageReceiveTimeout, "Timeout when waiting for 3rd party check iframe message.");
1290
+ }
1291
+
1292
+ function loadAdapter(type) {
1293
+ if (!type || type == 'default') {
1294
+ return {
1295
+ login: async function(options) {
1296
+ window.location.assign(await kc.createLoginUrl(options));
1297
+ return createPromise().promise;
1298
+ },
1299
+
1300
+ logout: async function(options) {
1301
+
1302
+ const logoutMethod = options?.logoutMethod ?? kc.logoutMethod;
1303
+ if (logoutMethod === "GET") {
1304
+ window.location.replace(kc.createLogoutUrl(options));
1305
+ return;
1306
+ }
1307
+
1308
+ const logoutUrl = kc.createLogoutUrl(options);
1309
+ const response = await fetch(logoutUrl, {
1310
+ method: "POST",
1311
+ headers: {
1312
+ "Content-Type": "application/x-www-form-urlencoded"
1313
+ },
1314
+ body: new URLSearchParams({
1315
+ id_token_hint: kc.idToken,
1316
+ client_id: kc.clientId,
1317
+ post_logout_redirect_uri: adapter.redirectUri(options, false)
1318
+ })
1319
+ });
1320
+
1321
+ if (response.redirected) {
1322
+ window.location.href = response.url;
1323
+ return;
1324
+ }
1325
+
1326
+ if (response.ok) {
1327
+ window.location.reload();
1328
+ return;
1329
+ }
1330
+
1331
+ throw new Error("Logout failed, request returned an error code.");
1332
+ },
1333
+
1334
+ register: function(options) {
1335
+ window.location.assign(kc.createRegisterUrl(options));
1336
+ return createPromise().promise;
1337
+ },
1338
+
1339
+ accountManagement : function() {
1340
+ var accountUrl = kc.createAccountUrl();
1341
+ if (typeof accountUrl !== 'undefined') {
1342
+ window.location.href = accountUrl;
1343
+ } else {
1344
+ throw "Not supported by the OIDC server";
1345
+ }
1346
+ return createPromise().promise;
1347
+ },
1348
+
1349
+ redirectUri: function(options, encodeHash) {
1350
+ if (arguments.length == 1) {
1351
+ encodeHash = true;
1352
+ }
1353
+
1354
+ if (options && options.redirectUri) {
1355
+ return options.redirectUri;
1356
+ } else if (kc.redirectUri) {
1357
+ return kc.redirectUri;
1358
+ } else {
1359
+ return location.href;
1360
+ }
1361
+ }
1362
+ };
1363
+ }
1364
+
1365
+ if (type == 'cordova') {
1366
+ loginIframe.enable = false;
1367
+ var cordovaOpenWindowWrapper = function(loginUrl, target, options) {
1368
+ if (window.cordova && window.cordova.InAppBrowser) {
1369
+ // Use inappbrowser for IOS and Android if available
1370
+ return window.cordova.InAppBrowser.open(loginUrl, target, options);
1371
+ } else {
1372
+ return window.open(loginUrl, target, options);
1373
+ }
1374
+ };
1375
+
1376
+ var shallowCloneCordovaOptions = function (userOptions) {
1377
+ if (userOptions && userOptions.cordovaOptions) {
1378
+ return Object.keys(userOptions.cordovaOptions).reduce(function (options, optionName) {
1379
+ options[optionName] = userOptions.cordovaOptions[optionName];
1380
+ return options;
1381
+ }, {});
1382
+ } else {
1383
+ return {};
1384
+ }
1385
+ };
1386
+
1387
+ var formatCordovaOptions = function (cordovaOptions) {
1388
+ return Object.keys(cordovaOptions).reduce(function (options, optionName) {
1389
+ options.push(optionName+"="+cordovaOptions[optionName]);
1390
+ return options;
1391
+ }, []).join(",");
1392
+ };
1393
+
1394
+ var createCordovaOptions = function (userOptions) {
1395
+ var cordovaOptions = shallowCloneCordovaOptions(userOptions);
1396
+ cordovaOptions.location = 'no';
1397
+ if (userOptions && userOptions.prompt == 'none') {
1398
+ cordovaOptions.hidden = 'yes';
1399
+ }
1400
+ return formatCordovaOptions(cordovaOptions);
1401
+ };
1402
+
1403
+ var getCordovaRedirectUri = function() {
1404
+ return kc.redirectUri || 'http://localhost';
1405
+ };
1406
+
1407
+ return {
1408
+ login: async function(options) {
1409
+ var promise = createPromise();
1410
+
1411
+ var cordovaOptions = createCordovaOptions(options);
1412
+ var loginUrl = await kc.createLoginUrl(options);
1413
+ var ref = cordovaOpenWindowWrapper(loginUrl, '_blank', cordovaOptions);
1414
+ var completed = false;
1415
+
1416
+ var closed = false;
1417
+ var closeBrowser = function() {
1418
+ closed = true;
1419
+ ref.close();
1420
+ };
1421
+
1422
+ ref.addEventListener('loadstart', function(event) {
1423
+ if (event.url.indexOf(getCordovaRedirectUri()) == 0) {
1424
+ var callback = parseCallback(event.url);
1425
+ processCallback(callback, promise);
1426
+ closeBrowser();
1427
+ completed = true;
1428
+ }
1429
+ });
1430
+
1431
+ ref.addEventListener('loaderror', function(event) {
1432
+ if (!completed) {
1433
+ if (event.url.indexOf(getCordovaRedirectUri()) == 0) {
1434
+ var callback = parseCallback(event.url);
1435
+ processCallback(callback, promise);
1436
+ closeBrowser();
1437
+ completed = true;
1438
+ } else {
1439
+ promise.setError();
1440
+ closeBrowser();
1441
+ }
1442
+ }
1443
+ });
1444
+
1445
+ ref.addEventListener('exit', function(event) {
1446
+ if (!closed) {
1447
+ promise.setError({
1448
+ reason: "closed_by_user"
1449
+ });
1450
+ }
1451
+ });
1452
+
1453
+ return promise.promise;
1454
+ },
1455
+
1456
+ logout: function(options) {
1457
+ var promise = createPromise();
1458
+
1459
+ var logoutUrl = kc.createLogoutUrl(options);
1460
+ var ref = cordovaOpenWindowWrapper(logoutUrl, '_blank', 'location=no,hidden=yes,clearcache=yes');
1461
+
1462
+ var error;
1463
+
1464
+ ref.addEventListener('loadstart', function(event) {
1465
+ if (event.url.indexOf(getCordovaRedirectUri()) == 0) {
1466
+ ref.close();
1467
+ }
1468
+ });
1469
+
1470
+ ref.addEventListener('loaderror', function(event) {
1471
+ if (event.url.indexOf(getCordovaRedirectUri()) == 0) {
1472
+ ref.close();
1473
+ } else {
1474
+ error = true;
1475
+ ref.close();
1476
+ }
1477
+ });
1478
+
1479
+ ref.addEventListener('exit', function(event) {
1480
+ if (error) {
1481
+ promise.setError();
1482
+ } else {
1483
+ kc.clearToken();
1484
+ promise.setSuccess();
1485
+ }
1486
+ });
1487
+
1488
+ return promise.promise;
1489
+ },
1490
+
1491
+ register : function(options) {
1492
+ var promise = createPromise();
1493
+ var registerUrl = kc.createRegisterUrl();
1494
+ var cordovaOptions = createCordovaOptions(options);
1495
+ var ref = cordovaOpenWindowWrapper(registerUrl, '_blank', cordovaOptions);
1496
+ ref.addEventListener('loadstart', function(event) {
1497
+ if (event.url.indexOf(getCordovaRedirectUri()) == 0) {
1498
+ ref.close();
1499
+ var oauth = parseCallback(event.url);
1500
+ processCallback(oauth, promise);
1501
+ }
1502
+ });
1503
+ return promise.promise;
1504
+ },
1505
+
1506
+ accountManagement : function() {
1507
+ var accountUrl = kc.createAccountUrl();
1508
+ if (typeof accountUrl !== 'undefined') {
1509
+ var ref = cordovaOpenWindowWrapper(accountUrl, '_blank', 'location=no');
1510
+ ref.addEventListener('loadstart', function(event) {
1511
+ if (event.url.indexOf(getCordovaRedirectUri()) == 0) {
1512
+ ref.close();
1513
+ }
1514
+ });
1515
+ } else {
1516
+ throw "Not supported by the OIDC server";
1517
+ }
1518
+ },
1519
+
1520
+ redirectUri: function(options) {
1521
+ return getCordovaRedirectUri();
1522
+ }
1523
+ }
1524
+ }
1525
+
1526
+ if (type == 'cordova-native') {
1527
+ loginIframe.enable = false;
1528
+
1529
+ return {
1530
+ login: async function(options) {
1531
+ var promise = createPromise();
1532
+ var loginUrl = await kc.createLoginUrl(options);
1533
+
1534
+ universalLinks.subscribe('keycloak', function(event) {
1535
+ universalLinks.unsubscribe('keycloak');
1536
+ window.cordova.plugins.browsertab.close();
1537
+ var oauth = parseCallback(event.url);
1538
+ processCallback(oauth, promise);
1539
+ });
1540
+
1541
+ window.cordova.plugins.browsertab.openUrl(loginUrl);
1542
+ return promise.promise;
1543
+ },
1544
+
1545
+ logout: function(options) {
1546
+ var promise = createPromise();
1547
+ var logoutUrl = kc.createLogoutUrl(options);
1548
+
1549
+ universalLinks.subscribe('keycloak', function(event) {
1550
+ universalLinks.unsubscribe('keycloak');
1551
+ window.cordova.plugins.browsertab.close();
1552
+ kc.clearToken();
1553
+ promise.setSuccess();
1554
+ });
1555
+
1556
+ window.cordova.plugins.browsertab.openUrl(logoutUrl);
1557
+ return promise.promise;
1558
+ },
1559
+
1560
+ register : function(options) {
1561
+ var promise = createPromise();
1562
+ var registerUrl = kc.createRegisterUrl(options);
1563
+ universalLinks.subscribe('keycloak' , function(event) {
1564
+ universalLinks.unsubscribe('keycloak');
1565
+ window.cordova.plugins.browsertab.close();
1566
+ var oauth = parseCallback(event.url);
1567
+ processCallback(oauth, promise);
1568
+ });
1569
+ window.cordova.plugins.browsertab.openUrl(registerUrl);
1570
+ return promise.promise;
1571
+
1572
+ },
1573
+
1574
+ accountManagement : function() {
1575
+ var accountUrl = kc.createAccountUrl();
1576
+ if (typeof accountUrl !== 'undefined') {
1577
+ window.cordova.plugins.browsertab.openUrl(accountUrl);
1578
+ } else {
1579
+ throw "Not supported by the OIDC server";
1580
+ }
1581
+ },
1582
+
1583
+ redirectUri: function(options) {
1584
+ if (options && options.redirectUri) {
1585
+ return options.redirectUri;
1586
+ } else if (kc.redirectUri) {
1587
+ return kc.redirectUri;
1588
+ } else {
1589
+ return "http://localhost";
1590
+ }
1591
+ }
1592
+ }
1593
+ }
1594
+
1595
+ throw 'invalid adapter type: ' + type;
1596
+ }
1597
+
1598
+ var LocalStorage = function() {
1599
+ if (!(this instanceof LocalStorage)) {
1600
+ return new LocalStorage();
1601
+ }
1602
+
1603
+ localStorage.setItem('kc-test', 'test');
1604
+ localStorage.removeItem('kc-test');
1605
+
1606
+ var cs = this;
1607
+
1608
+ function clearExpired() {
1609
+ var time = new Date().getTime();
1610
+ for (var i = 0; i < localStorage.length; i++) {
1611
+ var key = localStorage.key(i);
1612
+ if (key && key.indexOf('kc-callback-') == 0) {
1613
+ var value = localStorage.getItem(key);
1614
+ if (value) {
1615
+ try {
1616
+ var expires = JSON.parse(value).expires;
1617
+ if (!expires || expires < time) {
1618
+ localStorage.removeItem(key);
1619
+ }
1620
+ } catch (err) {
1621
+ localStorage.removeItem(key);
1622
+ }
1623
+ }
1624
+ }
1625
+ }
1626
+ }
1627
+
1628
+ cs.get = function(state) {
1629
+ if (!state) {
1630
+ return;
1631
+ }
1632
+
1633
+ var key = 'kc-callback-' + state;
1634
+ var value = localStorage.getItem(key);
1635
+ if (value) {
1636
+ localStorage.removeItem(key);
1637
+ value = JSON.parse(value);
1638
+ }
1639
+
1640
+ clearExpired();
1641
+ return value;
1642
+ };
1643
+
1644
+ cs.add = function(state) {
1645
+ clearExpired();
1646
+
1647
+ var key = 'kc-callback-' + state.state;
1648
+ state.expires = new Date().getTime() + (60 * 60 * 1000);
1649
+ localStorage.setItem(key, JSON.stringify(state));
1650
+ };
1651
+ };
1652
+
1653
+ var CookieStorage = function() {
1654
+ if (!(this instanceof CookieStorage)) {
1655
+ return new CookieStorage();
1656
+ }
1657
+
1658
+ var cs = this;
1659
+
1660
+ cs.get = function(state) {
1661
+ if (!state) {
1662
+ return;
1663
+ }
1664
+
1665
+ var value = getCookie('kc-callback-' + state);
1666
+ setCookie('kc-callback-' + state, '', cookieExpiration(-100));
1667
+ if (value) {
1668
+ return JSON.parse(value);
1669
+ }
1670
+ };
1671
+
1672
+ cs.add = function(state) {
1673
+ setCookie('kc-callback-' + state.state, JSON.stringify(state), cookieExpiration(60));
1674
+ };
1675
+
1676
+ cs.removeItem = function(key) {
1677
+ setCookie(key, '', cookieExpiration(-100));
1678
+ };
1679
+
1680
+ var cookieExpiration = function (minutes) {
1681
+ var exp = new Date();
1682
+ exp.setTime(exp.getTime() + (minutes*60*1000));
1683
+ return exp;
1684
+ };
1685
+
1686
+ var getCookie = function (key) {
1687
+ var name = key + '=';
1688
+ var ca = document.cookie.split(';');
1689
+ for (var i = 0; i < ca.length; i++) {
1690
+ var c = ca[i];
1691
+ while (c.charAt(0) == ' ') {
1692
+ c = c.substring(1);
1693
+ }
1694
+ if (c.indexOf(name) == 0) {
1695
+ return c.substring(name.length, c.length);
1696
+ }
1697
+ }
1698
+ return '';
1699
+ };
1700
+
1701
+ var setCookie = function (key, value, expirationDate) {
1702
+ var cookie = key + '=' + value + '; '
1703
+ + 'expires=' + expirationDate.toUTCString() + '; ';
1704
+ document.cookie = cookie;
1705
+ };
1706
+ };
1707
+
1708
+ function createCallbackStorage() {
1709
+ try {
1710
+ return new LocalStorage();
1711
+ } catch (err) {
1712
+ }
1713
+
1714
+ return new CookieStorage();
1715
+ }
1716
+
1717
+ function createLogger(fn) {
1718
+ return function() {
1719
+ if (kc.enableLogging) {
1720
+ fn.apply(console, Array.prototype.slice.call(arguments));
1721
+ }
1722
+ };
1723
+ }
1724
+ }
1725
+
1726
+ /**
1727
+ * @param {ArrayBuffer} bytes
1728
+ * @see https://developer.mozilla.org/en-US/docs/Glossary/Base64#the_unicode_problem
1729
+ */
1730
+ function bytesToBase64(bytes) {
1731
+ const binString = String.fromCodePoint(...bytes);
1732
+ return btoa(binString);
1733
+ }
1734
+
1735
+ /**
1736
+ * @param {string} message
1737
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/digest#basic_example
1738
+ */
1739
+ async function sha256Digest(message) {
1740
+ const encoder = new TextEncoder();
1741
+ const data = encoder.encode(message);
1742
+
1743
+ if (typeof crypto === "undefined" || typeof crypto.subtle === "undefined") {
1744
+ throw new Error("Web Crypto API is not available.");
1745
+ }
1746
+
1747
+ return await crypto.subtle.digest("SHA-256", data);
1748
+ }
1749
+
1750
+ /**
1751
+ * @param {string} token
1752
+ */
1753
+ function decodeToken(token) {
1754
+ const [header, payload] = token.split(".");
1755
+
1756
+ if (typeof payload !== "string") {
1757
+ throw new Error("Unable to decode token, payload not found.");
1758
+ }
1759
+
1760
+ let decoded;
1761
+
1762
+ try {
1763
+ decoded = base64UrlDecode(payload);
1764
+ } catch (error) {
1765
+ throw new Error("Unable to decode token, payload is not a valid Base64URL value.", { cause: error });
1766
+ }
1767
+
1768
+ try {
1769
+ return JSON.parse(decoded);
1770
+ } catch (error) {
1771
+ throw new Error("Unable to decode token, payload is not a valid JSON value.", { cause: error });
1772
+ }
1773
+ }
1774
+
1775
+ /**
1776
+ * @param {string} input
1777
+ */
1778
+ function base64UrlDecode(input) {
1779
+ let output = input
1780
+ .replaceAll("-", "+")
1781
+ .replaceAll("_", "/");
1782
+
1783
+ switch (output.length % 4) {
1784
+ case 0:
1785
+ break;
1786
+ case 2:
1787
+ output += "==";
1788
+ break;
1789
+ case 3:
1790
+ output += "=";
1791
+ break;
1792
+ default:
1793
+ throw new Error("Input is not of the correct length.");
1794
+ }
1795
+
1796
+ try {
1797
+ return b64DecodeUnicode(output);
1798
+ } catch (error) {
1799
+ return atob(output);
1800
+ }
1801
+ }
1802
+
1803
+ /**
1804
+ * @param {string} input
1805
+ */
1806
+ function b64DecodeUnicode(input) {
1807
+ return decodeURIComponent(atob(input).replace(/(.)/g, (m, p) => {
1808
+ let code = p.charCodeAt(0).toString(16).toUpperCase();
1809
+
1810
+ if (code.length < 2) {
1811
+ code = "0" + code;
1812
+ }
1813
+
1814
+ return "%" + code;
1815
+ }));
1816
+ }
1817
+
1818
+ /**
1819
+ * Check if the input is an object that can be operated on.
1820
+ * @param {unknown} input
1821
+ */
1822
+ function isObject(input) {
1823
+ return typeof input === 'object' && input !== null;
1824
+ }
1825
+
1826
+ let keycloak = null;
1827
+ // Initialize Keycloak with an optional silent check
1828
+ function initKeycloak(config, silentCheck = true) {
1829
+ if (!keycloak) {
1830
+ keycloak = new Keycloak({
1831
+ url: config.url,
1832
+ realm: config.realm,
1833
+ clientId: config.clientId
1834
+ });
1835
+ }
1836
+ return keycloak
1837
+ .init({
1838
+ onLoad: silentCheck ? 'check-sso' : 'login-required',
1839
+ checkLoginIframe: false
1840
+ //silentCheckSsoRedirectUri: `${window.location.origin}/silent-check-sso.html`, // Ensure this file is set up
1841
+ })
1842
+ .then((authenticated) => authenticated)
1843
+ .catch((error) => {
1844
+ // eslint-disable-next-line
1845
+ console.error('Failed to initialize Keycloak:', error);
1846
+ return false;
1847
+ });
1848
+ }
1849
+ // Get the username of the authenticated user
1850
+ function getUsername() {
1851
+ if (keycloak && keycloak.tokenParsed) {
1852
+ return keycloak.tokenParsed.preferred_username || 'Unknown';
1853
+ }
1854
+ return 'Unknown';
1855
+ }
1856
+ function getUser() {
1857
+ if ((keycloak === null || keycloak === void 0 ? void 0 : keycloak.authenticated) && (keycloak === null || keycloak === void 0 ? void 0 : keycloak.idTokenParsed)) {
1858
+ return {
1859
+ fullname: keycloak.idTokenParsed.name,
1860
+ email: keycloak.idTokenParsed.email,
1861
+ lastname: keycloak.idTokenParsed.family_name,
1862
+ firstname: keycloak.idTokenParsed.given_name,
1863
+ username: keycloak.idTokenParsed.preferred_username,
1864
+ background: 'grey', // Optional custom value
1865
+ token: keycloak.token,
1866
+ sub: keycloak.idTokenParsed.sub
1867
+ };
1868
+ }
1869
+ return {};
1870
+ }
1871
+ // Log in the user
1872
+ function login() {
1873
+ if (keycloak) {
1874
+ keycloak.login();
1875
+ }
1876
+ else {
1877
+ // eslint-disable-next-line
1878
+ console.error('Keycloak is not initialized.');
1879
+ }
1880
+ }
1881
+ // Log out the user
1882
+ function logout() {
1883
+ if (keycloak) {
1884
+ keycloak.logout();
1885
+ }
1886
+ else {
1887
+ // eslint-disable-next-line
1888
+ console.error('Keycloak is not initialized.');
1889
+ }
1890
+ }
1891
+ // Check if the user is authenticated
1892
+ function isAuthenticated() {
1893
+ return !!(keycloak === null || keycloak === void 0 ? void 0 : keycloak.authenticated);
1894
+ }
1895
+ async function checkServerAvailability(url) {
1896
+ try {
1897
+ const response = await fetch(url, { method: 'HEAD', mode: 'no-cors' });
1898
+ return response.ok || response.type === 'opaque';
1899
+ }
1900
+ catch (_a) {
1901
+ return false;
1902
+ }
1903
+ }
1904
+
1905
+ exports.checkServerAvailability = checkServerAvailability;
1906
+ exports.getUser = getUser;
1907
+ exports.initKeycloak = initKeycloak;
1908
+ exports.isAuthenticated = isAuthenticated;
1909
+ exports.login = login;
1910
+ exports.logout = logout;