@ui5/webcomponents-base 0.0.0-78035f8e7 → 0.0.0-8393c7cdd

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 (361) hide show
  1. package/.eslintignore +3 -0
  2. package/CHANGELOG.md +378 -0
  3. package/README.md +53 -7
  4. package/bundle.esm.js +20 -20
  5. package/dist/AssetRegistry.js +8 -7
  6. package/dist/Boot.js +59 -0
  7. package/dist/CSP.js +59 -0
  8. package/dist/CustomElementsRegistry.js +60 -4
  9. package/dist/CustomElementsScope.js +30 -0
  10. package/dist/CustomElementsScopeUtils.js +108 -0
  11. package/dist/DOMObserver.js +65 -0
  12. package/dist/Device.js +71 -773
  13. package/dist/EventProvider.js +30 -26
  14. package/dist/FeaturesRegistry.js +4 -1
  15. package/dist/FontFace.js +19 -62
  16. package/dist/InitialConfiguration.js +43 -8
  17. package/dist/Keys.js +125 -0
  18. package/dist/ManagedStyles.js +83 -0
  19. package/dist/MediaRange.js +109 -0
  20. package/dist/{util/parseProperties.js → PropertiesFileFormat.js} +6 -0
  21. package/dist/Render.js +175 -0
  22. package/dist/RenderQueue.js +41 -17
  23. package/dist/RenderScheduler.js +24 -158
  24. package/dist/Runtimes.js +107 -0
  25. package/dist/StaticArea.js +1 -29
  26. package/dist/StaticAreaItem.js +58 -62
  27. package/dist/SystemCSSVars.js +4 -25
  28. package/dist/Theming.js +2 -1
  29. package/dist/UI5Element.js +398 -354
  30. package/dist/UI5ElementMetadata.js +158 -18
  31. package/dist/asset-registries/Icons.js +118 -14
  32. package/dist/asset-registries/Illustrations.js +30 -0
  33. package/dist/asset-registries/LocaleData.js +105 -66
  34. package/dist/asset-registries/Themes.js +29 -34
  35. package/dist/asset-registries/i18n.js +64 -47
  36. package/dist/assets/bundle.esm.742a0a2e.js +43 -0
  37. package/dist/assets-meta/IconCollectionsAlias.js +18 -0
  38. package/dist/config/AnimationMode.js +11 -1
  39. package/dist/config/Icons.js +52 -0
  40. package/dist/config/Language.js +33 -6
  41. package/dist/config/Theme.js +25 -0
  42. package/dist/css/BusyIndicator.css +80 -0
  43. package/dist/css/FontFace.css +66 -0
  44. package/dist/css/OverrideFontFace.css +32 -0
  45. package/dist/css/SystemCSSVars.css +17 -0
  46. package/dist/delegate/ItemNavigation.js +244 -170
  47. package/dist/delegate/ResizeHandler.js +78 -37
  48. package/dist/delegate/ScrollEnablement.js +49 -20
  49. package/dist/features/F6Navigation.js +110 -0
  50. package/dist/features/OpenUI5Enablement.js +119 -0
  51. package/dist/features/OpenUI5Support.js +42 -7
  52. package/dist/generated/AssetParameters.js +1 -1
  53. package/dist/generated/VersionInfo.js +10 -0
  54. package/dist/generated/css/BusyIndicator.css.js +5 -0
  55. package/dist/generated/css/FontFace.css.js +5 -0
  56. package/dist/generated/css/OverrideFontFace.css.js +5 -0
  57. package/dist/generated/css/SystemCSSVars.css.js +5 -0
  58. package/dist/i18nBundle.js +39 -5
  59. package/dist/locale/applyDirection.js +6 -4
  60. package/dist/locale/directionChange.js +32 -0
  61. package/dist/locale/getEffectiveDir.js +28 -0
  62. package/dist/locale/getLocale.js +12 -2
  63. package/dist/locale/languageChange.js +1 -1
  64. package/dist/renderer/LitRenderer.js +43 -7
  65. package/dist/renderer/directives/style-map.js +72 -0
  66. package/dist/renderer/executeTemplate.js +34 -0
  67. package/dist/sap/base/Log.js +241 -0
  68. package/dist/sap/base/assert.js +8 -0
  69. package/dist/sap/base/security/URLListValidator.js +148 -0
  70. package/dist/sap/base/security/encodeCSS.js +14 -0
  71. package/dist/sap/base/security/encodeXML.js +23 -0
  72. package/dist/sap/base/security/sanitizeHTML.js +16 -0
  73. package/dist/sap/base/strings/toHex.js +8 -0
  74. package/dist/sap/base/util/now.js +7 -0
  75. package/dist/sap/ui/thirdparty/caja-html-sanitizer.js +3585 -0
  76. package/dist/theming/CustomStyle.js +47 -6
  77. package/dist/theming/ThemeLoaded.js +22 -0
  78. package/dist/theming/applyTheme.js +13 -15
  79. package/dist/theming/getConstructableStyle.js +15 -10
  80. package/dist/theming/getEffectiveLinksHrefs.js +27 -0
  81. package/dist/theming/getEffectiveStyle.js +32 -8
  82. package/dist/theming/getStylesString.js +15 -0
  83. package/dist/theming/getThemeDesignerTheme.js +25 -5
  84. package/dist/theming/preloadLinks.js +23 -0
  85. package/dist/types/CSSColor.js +9 -0
  86. package/dist/types/CalendarType.js +1 -1
  87. package/dist/types/DOMReference.js +24 -0
  88. package/dist/types/DataType.js +13 -1
  89. package/dist/types/Float.js +4 -0
  90. package/dist/types/Integer.js +4 -0
  91. package/dist/types/InvisibleMessageMode.js +30 -0
  92. package/dist/types/ItemNavigationBehavior.js +2 -7
  93. package/dist/types/PopupState.js +1 -1
  94. package/dist/types/ValueState.js +1 -1
  95. package/dist/updateShadowRoot.js +29 -0
  96. package/dist/util/AriaLabelHelper.js +39 -0
  97. package/dist/util/Caret.js +32 -0
  98. package/dist/util/ColorConversion.js +398 -0
  99. package/dist/util/FocusableElements.js +22 -9
  100. package/dist/util/HTMLSanitizer.js +7 -0
  101. package/dist/util/InvisibleMessage.js +69 -0
  102. package/dist/util/PopupUtils.js +93 -0
  103. package/dist/util/SlotsHelper.js +43 -0
  104. package/dist/util/TabbableElements.js +5 -1
  105. package/dist/util/arraysAreEqual.js +15 -0
  106. package/dist/util/clamp.js +12 -0
  107. package/dist/util/createLinkInHead.js +19 -0
  108. package/dist/util/debounce.js +17 -0
  109. package/dist/util/escapeRegex.js +10 -0
  110. package/dist/util/generateHighlightedMarkup.js +42 -0
  111. package/dist/util/getActiveElement.js +11 -0
  112. package/dist/util/getClassCopy.js +10 -0
  113. package/dist/util/getEffectiveContentDensity.js +5 -0
  114. package/dist/util/getEffectiveScrollbarStyle.js +5 -0
  115. package/dist/util/getNormalizedTarget.js +16 -0
  116. package/dist/util/isDefaultSlotProvided.js +11 -0
  117. package/dist/util/isElementInView.js +15 -0
  118. package/dist/util/isNodeHidden.js +1 -1
  119. package/dist/util/isNodeTabbable.js +4 -4
  120. package/dist/util/isValidPropertyName.js +6 -5
  121. package/hash.txt +1 -0
  122. package/index.js +1 -1
  123. package/lib/generate-asset-parameters/index.js +8 -5
  124. package/lib/generate-styles/index.js +26 -0
  125. package/lib/generate-version-info/index.js +32 -0
  126. package/package-scripts.js +37 -28
  127. package/package.json +20 -13
  128. package/src/AssetRegistry.js +8 -7
  129. package/src/Boot.js +59 -0
  130. package/src/CSP.js +59 -0
  131. package/src/CustomElementsRegistry.js +60 -4
  132. package/src/CustomElementsScope.js +30 -0
  133. package/src/CustomElementsScopeUtils.js +108 -0
  134. package/src/DOMObserver.js +65 -0
  135. package/src/Device.js +71 -773
  136. package/src/EventProvider.js +30 -26
  137. package/src/FeaturesRegistry.js +4 -1
  138. package/src/FontFace.js +19 -62
  139. package/src/InitialConfiguration.js +43 -8
  140. package/src/Keys.js +125 -0
  141. package/src/ManagedStyles.js +83 -0
  142. package/src/MediaRange.js +109 -0
  143. package/src/{util/parseProperties.js → PropertiesFileFormat.js} +6 -0
  144. package/src/Render.js +175 -0
  145. package/src/RenderQueue.js +41 -17
  146. package/src/RenderScheduler.js +24 -158
  147. package/src/Runtimes.js +107 -0
  148. package/src/StaticArea.js +1 -29
  149. package/src/StaticAreaItem.js +58 -62
  150. package/src/SystemCSSVars.js +4 -25
  151. package/src/Theming.js +2 -1
  152. package/src/UI5Element.js +398 -354
  153. package/src/UI5ElementMetadata.js +158 -18
  154. package/src/asset-registries/Icons.js +118 -14
  155. package/src/asset-registries/Illustrations.js +30 -0
  156. package/src/asset-registries/LocaleData.js +105 -66
  157. package/src/asset-registries/Themes.js +29 -34
  158. package/src/asset-registries/i18n.js +64 -47
  159. package/src/assets-meta/IconCollectionsAlias.js +18 -0
  160. package/src/config/AnimationMode.js +11 -1
  161. package/src/config/Icons.js +52 -0
  162. package/src/config/Language.js +33 -6
  163. package/src/config/Theme.js +25 -0
  164. package/src/css/BusyIndicator.css +80 -0
  165. package/src/css/FontFace.css +66 -0
  166. package/src/css/OverrideFontFace.css +32 -0
  167. package/src/css/SystemCSSVars.css +17 -0
  168. package/src/delegate/ItemNavigation.js +244 -170
  169. package/src/delegate/ResizeHandler.js +78 -37
  170. package/src/delegate/ScrollEnablement.js +49 -20
  171. package/src/features/F6Navigation.js +110 -0
  172. package/src/features/OpenUI5Enablement.js +119 -0
  173. package/src/features/OpenUI5Support.js +42 -7
  174. package/src/i18nBundle.js +39 -5
  175. package/src/locale/applyDirection.js +6 -4
  176. package/src/locale/directionChange.js +32 -0
  177. package/src/locale/getEffectiveDir.js +28 -0
  178. package/src/locale/getLocale.js +12 -2
  179. package/src/locale/languageChange.js +1 -1
  180. package/src/renderer/LitRenderer.js +43 -7
  181. package/src/renderer/directives/style-map.js +72 -0
  182. package/src/renderer/executeTemplate.js +34 -0
  183. package/src/theming/CustomStyle.js +47 -6
  184. package/src/theming/ThemeLoaded.js +22 -0
  185. package/src/theming/applyTheme.js +13 -15
  186. package/src/theming/getConstructableStyle.js +15 -10
  187. package/src/theming/getEffectiveLinksHrefs.js +27 -0
  188. package/src/theming/getEffectiveStyle.js +32 -8
  189. package/src/theming/getStylesString.js +15 -0
  190. package/src/theming/getThemeDesignerTheme.js +25 -5
  191. package/src/theming/preloadLinks.js +23 -0
  192. package/src/types/CSSColor.js +9 -0
  193. package/src/types/CalendarType.js +1 -1
  194. package/src/types/DOMReference.js +24 -0
  195. package/src/types/DataType.js +13 -1
  196. package/src/types/Float.js +4 -0
  197. package/src/types/Integer.js +4 -0
  198. package/src/types/InvisibleMessageMode.js +30 -0
  199. package/src/types/ItemNavigationBehavior.js +2 -7
  200. package/src/types/PopupState.js +1 -1
  201. package/src/types/ValueState.js +1 -1
  202. package/src/updateShadowRoot.js +29 -0
  203. package/src/util/AriaLabelHelper.js +39 -0
  204. package/src/util/Caret.js +32 -0
  205. package/src/util/ColorConversion.js +398 -0
  206. package/src/util/FocusableElements.js +22 -9
  207. package/src/util/HTMLSanitizer.js +7 -0
  208. package/src/util/InvisibleMessage.js +69 -0
  209. package/src/util/PopupUtils.js +93 -0
  210. package/src/util/SlotsHelper.js +43 -0
  211. package/src/util/TabbableElements.js +5 -1
  212. package/src/util/arraysAreEqual.js +15 -0
  213. package/src/util/clamp.js +12 -0
  214. package/src/util/createLinkInHead.js +19 -0
  215. package/src/util/debounce.js +17 -0
  216. package/src/util/escapeRegex.js +10 -0
  217. package/src/util/generateHighlightedMarkup.js +42 -0
  218. package/src/util/getActiveElement.js +11 -0
  219. package/src/util/getClassCopy.js +10 -0
  220. package/src/util/getEffectiveContentDensity.js +5 -0
  221. package/src/util/getEffectiveScrollbarStyle.js +5 -0
  222. package/src/util/getNormalizedTarget.js +16 -0
  223. package/src/util/isDefaultSlotProvided.js +11 -0
  224. package/src/util/isElementInView.js +15 -0
  225. package/src/util/isNodeHidden.js +1 -1
  226. package/src/util/isNodeTabbable.js +4 -4
  227. package/src/util/isValidPropertyName.js +6 -5
  228. package/used-modules.txt +10 -0
  229. package/bundle.es5.js +0 -28
  230. package/config/.eslintrc.js +0 -3
  231. package/config/rollup.config.js +0 -1
  232. package/dist/SVGIconRegistry.js +0 -62
  233. package/dist/boot.js +0 -34
  234. package/dist/compatibility/DOMObserver.js +0 -62
  235. package/dist/compatibility/patchNodeValue.js +0 -24
  236. package/dist/compatibility/whenPolyfillLoaded.js +0 -26
  237. package/dist/delegate/CustomResize.js +0 -78
  238. package/dist/delegate/NativeResize.js +0 -44
  239. package/dist/features/PropertiesFormatSupport.js +0 -8
  240. package/dist/features/browsersupport/Edge.js +0 -6
  241. package/dist/features/browsersupport/IE11.js +0 -41
  242. package/dist/features/browsersupport/IE11WithWebComponentsPolyfill.js +0 -5
  243. package/dist/renderer/ifDefined.js +0 -21
  244. package/dist/resources/bundle.es5.js +0 -212
  245. package/dist/resources/bundle.es5.js.map +0 -1
  246. package/dist/resources/bundle.esm.js +0 -129
  247. package/dist/resources/bundle.esm.js.map +0 -1
  248. package/dist/test-resources/assets/Themes.js +0 -13
  249. package/dist/test-resources/elements/Child.js +0 -35
  250. package/dist/test-resources/elements/Generic.js +0 -84
  251. package/dist/test-resources/elements/GenericExt.js +0 -26
  252. package/dist/test-resources/elements/NoShadowDOM.js +0 -13
  253. package/dist/test-resources/elements/Parent.js +0 -37
  254. package/dist/test-resources/elements/WithStaticArea.js +0 -76
  255. package/dist/test-resources/pages/AllTestElements.html +0 -42
  256. package/dist/test-resources/pages/Configuration.html +0 -20
  257. package/dist/test-resources/pages/ConfigurationScript.html +0 -36
  258. package/dist/test-resources/pages/assets/messagebundle_de.properties +0 -1
  259. package/dist/test-resources/pages/assets/messagebundle_en.properties +0 -1
  260. package/dist/test-resources/pages/assets/messagebundle_es.properties +0 -1
  261. package/dist/test-resources/pages/assets/messagebundle_fr.properties +0 -1
  262. package/dist/test-resources/pages/i18n.html +0 -40
  263. package/dist/test-resources/specs/ConfigurationChange.spec.js +0 -25
  264. package/dist/test-resources/specs/ConfigurationScript.spec.js +0 -61
  265. package/dist/test-resources/specs/ConfigurationURL.spec.js +0 -45
  266. package/dist/test-resources/specs/CustomTheme.spec.js +0 -25
  267. package/dist/test-resources/specs/StaticArea.spec.js +0 -34
  268. package/dist/test-resources/specs/Theming.spec.js +0 -31
  269. package/dist/test-resources/specs/UI5ElementInvalidation.js +0 -258
  270. package/dist/test-resources/specs/UI5ElementLifecycle.js +0 -93
  271. package/dist/test-resources/specs/UI5ElementListenForChildPropChanges.spec.js +0 -101
  272. package/dist/test-resources/specs/UI5ElementMetadataExt.js +0 -40
  273. package/dist/test-resources/specs/UI5ElementPropertyValidation.js +0 -12
  274. package/dist/test-resources/specs/UI5ElementPropsAndAttrs.spec.js +0 -65
  275. package/dist/test-resources/specs/UI5ElementShadowDOM.js +0 -22
  276. package/dist/test-resources/specs/UI5ElementSlots.js +0 -34
  277. package/dist/theming/CSSVarsPonyfill.js +0 -24
  278. package/dist/theming/adaptCSSForIE.js +0 -90
  279. package/dist/theming/createComponentStyleTag.js +0 -49
  280. package/dist/theming/createThemePropertiesStyleTag.js +0 -20
  281. package/dist/thirdparty/Array.from.js +0 -16
  282. package/dist/thirdparty/Array.prototype.fill.js +0 -44
  283. package/dist/thirdparty/Array.prototype.find.js +0 -46
  284. package/dist/thirdparty/Array.prototype.includes.js +0 -51
  285. package/dist/thirdparty/Element.prototype.closest.js +0 -11
  286. package/dist/thirdparty/Element.prototype.matches.js +0 -6
  287. package/dist/thirdparty/Map.prototype.keys.js +0 -9
  288. package/dist/thirdparty/Number.isInteger.js +0 -5
  289. package/dist/thirdparty/Number.isNaN.js +0 -1
  290. package/dist/thirdparty/Number.parseInt.js +0 -1
  291. package/dist/thirdparty/Object.assign.js +0 -31
  292. package/dist/thirdparty/Object.entries.js +0 -11
  293. package/dist/thirdparty/Symbol.js +0 -2
  294. package/dist/thirdparty/WeakSet.js +0 -27
  295. package/dist/thirdparty/es6-string-methods.js +0 -182
  296. package/dist/thirdparty/events-polyfills.js +0 -89
  297. package/dist/thirdparty/fetch.js +0 -1
  298. package/dist/thirdparty/template.js +0 -600
  299. package/dist/thirdparty/webcomponents-sd-ce-pf.js +0 -318
  300. package/dist/util/findNodeOwner.js +0 -35
  301. package/dist/util/getEffectiveAriaLabelText.js +0 -28
  302. package/dist/util/isSlot.js +0 -3
  303. package/dist/webcomponentsjs/LICENSE.md +0 -19
  304. package/dist/webcomponentsjs/README.md +0 -229
  305. package/dist/webcomponentsjs/bundles/webcomponents-ce.js +0 -63
  306. package/dist/webcomponentsjs/bundles/webcomponents-ce.js.map +0 -1
  307. package/dist/webcomponentsjs/bundles/webcomponents-sd-ce-pf.js +0 -297
  308. package/dist/webcomponentsjs/bundles/webcomponents-sd-ce-pf.js.map +0 -1
  309. package/dist/webcomponentsjs/bundles/webcomponents-sd-ce.js +0 -208
  310. package/dist/webcomponentsjs/bundles/webcomponents-sd-ce.js.map +0 -1
  311. package/dist/webcomponentsjs/bundles/webcomponents-sd.js +0 -166
  312. package/dist/webcomponentsjs/bundles/webcomponents-sd.js.map +0 -1
  313. package/dist/webcomponentsjs/custom-elements-es5-adapter.js +0 -15
  314. package/dist/webcomponentsjs/package.json +0 -46
  315. package/dist/webcomponentsjs/src/entrypoints/custom-elements-es5-adapter-index.js +0 -16
  316. package/dist/webcomponentsjs/src/entrypoints/webcomponents-bundle-index.js +0 -53
  317. package/dist/webcomponentsjs/src/entrypoints/webcomponents-ce-index.js +0 -17
  318. package/dist/webcomponentsjs/src/entrypoints/webcomponents-sd-ce-index.js +0 -19
  319. package/dist/webcomponentsjs/src/entrypoints/webcomponents-sd-ce-pf-index.js +0 -28
  320. package/dist/webcomponentsjs/src/entrypoints/webcomponents-sd-index.js +0 -18
  321. package/dist/webcomponentsjs/webcomponents-bundle.js +0 -298
  322. package/dist/webcomponentsjs/webcomponents-bundle.js.map +0 -1
  323. package/dist/webcomponentsjs/webcomponents-loader.js +0 -185
  324. package/src/SVGIconRegistry.js +0 -62
  325. package/src/boot.js +0 -34
  326. package/src/compatibility/DOMObserver.js +0 -62
  327. package/src/compatibility/patchNodeValue.js +0 -24
  328. package/src/compatibility/whenPolyfillLoaded.js +0 -26
  329. package/src/delegate/CustomResize.js +0 -78
  330. package/src/delegate/NativeResize.js +0 -44
  331. package/src/features/PropertiesFormatSupport.js +0 -8
  332. package/src/features/browsersupport/Edge.js +0 -6
  333. package/src/features/browsersupport/IE11.js +0 -41
  334. package/src/features/browsersupport/IE11WithWebComponentsPolyfill.js +0 -5
  335. package/src/renderer/ifDefined.js +0 -21
  336. package/src/theming/CSSVarsPonyfill.js +0 -24
  337. package/src/theming/adaptCSSForIE.js +0 -90
  338. package/src/theming/createComponentStyleTag.js +0 -49
  339. package/src/theming/createThemePropertiesStyleTag.js +0 -20
  340. package/src/thirdparty/Array.from.js +0 -16
  341. package/src/thirdparty/Array.prototype.fill.js +0 -44
  342. package/src/thirdparty/Array.prototype.find.js +0 -46
  343. package/src/thirdparty/Array.prototype.includes.js +0 -51
  344. package/src/thirdparty/Element.prototype.closest.js +0 -11
  345. package/src/thirdparty/Element.prototype.matches.js +0 -6
  346. package/src/thirdparty/Map.prototype.keys.js +0 -9
  347. package/src/thirdparty/Number.isInteger.js +0 -5
  348. package/src/thirdparty/Number.isNaN.js +0 -1
  349. package/src/thirdparty/Number.parseInt.js +0 -1
  350. package/src/thirdparty/Object.assign.js +0 -31
  351. package/src/thirdparty/Object.entries.js +0 -11
  352. package/src/thirdparty/Symbol.js +0 -2
  353. package/src/thirdparty/WeakSet.js +0 -27
  354. package/src/thirdparty/es6-string-methods.js +0 -182
  355. package/src/thirdparty/events-polyfills.js +0 -89
  356. package/src/thirdparty/fetch.js +0 -1
  357. package/src/thirdparty/template.js +0 -600
  358. package/src/thirdparty/webcomponents-sd-ce-pf.js +0 -318
  359. package/src/util/findNodeOwner.js +0 -35
  360. package/src/util/getEffectiveAriaLabelText.js +0 -28
  361. package/src/util/isSlot.js +0 -3
@@ -1,9 +1,7 @@
1
- import { fetchJsonOnce, fetchTextOnce } from "../util/FetchHelper.js";
2
1
  import { DEFAULT_THEME } from "../generated/AssetParameters.js";
3
- import getFileExtension from "../util/getFileExtension.js";
4
2
 
5
- const themeURLs = new Map();
6
3
  const themeStyles = new Map();
4
+ const loaders = new Map();
7
5
  const registeredPackages = new Set();
8
6
  const registeredThemes = new Set();
9
7
 
@@ -15,29 +13,19 @@ const registeredThemes = new Set();
15
13
  * Example usage:
16
14
  * 1) Pass the CSS Vars as a string directly.
17
15
  * registerThemeProperties("my-package", "my_theme", ":root{--var1: red;}");
18
- * 2) Pass the CSS Vars as an object directly
19
- * registerThemeProperties("my-package", "my_theme", {"_": ":root{--var1: red;}"});
20
- * 3) Pass a URL to a CSS file, containing the CSS Vars. Will be fetched on demand, not upon registration.
21
- * registerThemeProperties("my-package", "my_theme", "http://url/to/my/theme.css");
22
- * 4) Pass a URL to a JSON file, containing the CSS Vars in its "_" property. Will be fetched on demand, not upon registration.
23
- * registerThemeProperties("my-package", "my_theme", "http://url/to/my/theme.json");
24
16
  *
25
17
  * @public
26
18
  * @param packageName - the NPM package for which CSS Vars are registered
27
19
  * @param themeName - the theme which the CSS Vars implement
28
- * @param style - can be one of four options: a string, an object with a "_" property, URL to a CSS file, or URL to a JSON file with a "_" property
20
+ * @param style - the style content directly
21
+ * @deprecated
29
22
  */
30
- const registerThemeProperties = (packageName, themeName, style) => {
31
- if (style._) {
32
- // JSON object like ({"_": ":root"})
33
- themeStyles.set(`${packageName}_${themeName}`, style._);
34
- } else if (style.includes(":root") || style === "") {
35
- // pure string, including empty string
36
- themeStyles.set(`${packageName}_${themeName}`, style);
37
- } else {
38
- // url for fetching
39
- themeURLs.set(`${packageName}_${themeName}`, style);
40
- }
23
+ const registerThemeProperties = (_packageName, _themeName, _style) => {
24
+ throw new Error("`registerThemeProperties` has been depracated. Use `registerThemePropertiesLoader` instead.");
25
+ };
26
+
27
+ const registerThemePropertiesLoader = (packageName, themeName, loader) => {
28
+ loaders.set(`${packageName}/${themeName}`, loader);
41
29
  registeredPackages.add(packageName);
42
30
  registeredThemes.add(themeName);
43
31
  };
@@ -50,25 +38,31 @@ const getThemeProperties = async (packageName, themeName) => {
50
38
 
51
39
  if (!registeredThemes.has(themeName)) {
52
40
  const regThemesStr = [...registeredThemes.values()].join(", ");
53
- console.warn(`You have requested a non-registered theme - falling back to ${DEFAULT_THEME}. Registered themes are: ${regThemesStr}`); /* eslint-disable-line */
54
- return themeStyles.get(`${packageName}_${DEFAULT_THEME}`);
41
+ console.warn(`You have requested a non-registered theme ${themeName} - falling back to ${DEFAULT_THEME}. Registered themes are: ${regThemesStr}`); /* eslint-disable-line */
42
+ return _getThemeProperties(packageName, DEFAULT_THEME);
55
43
  }
56
44
 
57
- const data = await fetchThemeProperties(packageName, themeName);
58
- const themeProps = data._ || data;
59
-
60
- themeStyles.set(`${packageName}_${themeName}`, themeProps);
61
- return themeProps;
45
+ return _getThemeProperties(packageName, themeName);
62
46
  };
63
47
 
64
- const fetchThemeProperties = async (packageName, themeName) => {
65
- const url = themeURLs.get(`${packageName}_${themeName}`);
66
-
67
- if (!url) {
68
- throw new Error(`You have to import the ${packageName}/dist/Assets.js module to switch to additional themes`);
48
+ const _getThemeProperties = async (packageName, themeName) => {
49
+ const loader = loaders.get(`${packageName}/${themeName}`);
50
+ if (!loader) {
51
+ // no themes for package
52
+ console.error(`Theme [${themeName}] not registered for package [${packageName}]`); /* eslint-disable-line */
53
+ return;
54
+ }
55
+ let data;
56
+ try {
57
+ data = await loader(themeName);
58
+ } catch (e) {
59
+ console.error(packageName, e.message); /* eslint-disable-line */
60
+ return;
69
61
  }
62
+ const themeProps = data._ || data;
70
63
 
71
- return getFileExtension(url) === ".css" ? fetchTextOnce(url) : fetchJsonOnce(url);
64
+ themeStyles.set(`${packageName}_${themeName}`, themeProps);
65
+ return themeProps;
72
66
  };
73
67
 
74
68
  const getRegisteredPackages = () => {
@@ -80,6 +74,7 @@ const isThemeRegistered = theme => {
80
74
  };
81
75
 
82
76
  export {
77
+ registerThemePropertiesLoader,
83
78
  registerThemeProperties,
84
79
  getThemeProperties,
85
80
  getRegisteredPackages,
@@ -1,21 +1,33 @@
1
- import { getFeature } from "../FeaturesRegistry.js";
2
1
  import getLocale from "../locale/getLocale.js";
3
2
  import { attachLanguageChange } from "../locale/languageChange.js";
4
- import { fetchTextOnce } from "../util/FetchHelper.js";
5
3
  import normalizeLocale from "../locale/normalizeLocale.js";
6
4
  import nextFallbackLocale from "../locale/nextFallbackLocale.js";
7
5
  import { DEFAULT_LANGUAGE } from "../generated/AssetParameters.js";
6
+ import { getFetchDefaultLanguage } from "../config/Language.js";
7
+
8
+ // contains package names for which the warning has been shown
9
+ const warningShown = new Set();
10
+ const reportedErrors = new Set();
8
11
 
9
12
  const bundleData = new Map();
10
- const bundleURLs = new Map();
13
+ const bundlePromises = new Map();
14
+ const loaders = new Map();
11
15
 
12
16
  /**
13
- * Sets a map with texts and ID the are related to.
14
- * @param {string} packageName package ID that the i18n bundle will be related to
15
- * @param {Object} data an object with string locales as keys and text translataions as values
17
+ * Registers i18n loader function for given package and locale.
18
+ *
16
19
  * @public
20
+ * @param {string} packageName for which package this loader can fetch data
21
+ * @param {string} localeId locale that this loader can handle
22
+ * @param {function} loader async function that will be passed a localeId and should return a JSON object
17
23
  */
18
- const setI18nBundleData = (packageName, data) => {
24
+ const registerI18nLoader = (packageName, localeId, loader) => {
25
+ // register loader by key
26
+ const bundleKey = `${packageName}/${localeId}`;
27
+ loaders.set(bundleKey, loader);
28
+ };
29
+
30
+ const _setI18nBundleData = (packageName, data) => {
19
31
  bundleData.set(packageName, data);
20
32
  };
21
33
 
@@ -24,18 +36,36 @@ const getI18nBundleData = packageName => {
24
36
  };
25
37
 
26
38
  /**
27
- * Registers a map of locale/url information, to be used by the <code>fetchI18nBundle</code> method.
28
- * Note: In order to be able to register ".properties" files, you must import the following module:
29
- * import "@ui5/webcomponents-base/dist/features/PropertiesFormatSupport.js";
30
- *
31
- * @param {string} packageName package ID that the i18n bundle will be related to
32
- * @param {Object} bundle an object with string locales as keys and the URLs (in .json or .properties format - see the note above) where the corresponding locale can be fetched from, f.e {"en": "path/en.json", ...}
33
- *
34
39
  * @public
40
+ * @deprecated
35
41
  */
36
- const registerI18nBundle = (packageName, bundle) => {
37
- const oldBundle = bundleURLs.get(packageName) || {};
38
- bundleURLs.set(packageName, Object.assign({}, oldBundle, bundle));
42
+ const registerI18nBundle = (_packageName, _bundle) => {
43
+ throw new Error("This method has been removed. Use `registerI18nLoader` instead.");
44
+ };
45
+
46
+ const _hasLoader = (packageName, localeId) => {
47
+ const bundleKey = `${packageName}/${localeId}`;
48
+ return loaders.has(bundleKey);
49
+ };
50
+
51
+ // load bundle over the network once
52
+ const _loadMessageBundleOnce = (packageName, localeId) => {
53
+ const bundleKey = `${packageName}/${localeId}`;
54
+ const loadMessageBundle = loaders.get(bundleKey);
55
+
56
+ if (!bundlePromises.get(bundleKey)) {
57
+ bundlePromises.set(bundleKey, loadMessageBundle(localeId));
58
+ }
59
+
60
+ return bundlePromises.get(bundleKey);
61
+ };
62
+
63
+ const _showAssetsWarningOnce = packageName => {
64
+ if (!warningShown.has(packageName)) {
65
+ console.warn(`[${packageName}]: Message bundle assets are not configured. Falling back to English texts.`, /* eslint-disable-line */
66
+ ` Add \`import "${packageName}/dist/Assets.js"\` in your bundle and make sure your build tool supports dynamic imports and JSON imports. See section "Assets" in the documentation for more information.`); /* eslint-disable-line */
67
+ warningShown.add(packageName);
68
+ }
39
69
  };
40
70
 
41
71
  /**
@@ -48,48 +78,35 @@ const registerI18nBundle = (packageName, bundle) => {
48
78
  * @public
49
79
  */
50
80
  const fetchI18nBundle = async packageName => {
51
- const bundlesForPackage = bundleURLs.get(packageName);
52
-
53
- if (!bundlesForPackage) {
54
- console.warn(`Message bundle assets are not configured. Falling back to English texts.`, /* eslint-disable-line */
55
- ` You need to import ${packageName}/dist/Assets.js with a build tool that supports JSON imports.`); /* eslint-disable-line */
56
- return;
57
- }
58
-
59
81
  const language = getLocale().getLanguage();
82
+ const region = getLocale().getRegion();
83
+ let localeId = normalizeLocale(language + (region ? `-${region}` : ``));
60
84
 
61
- let localeId = normalizeLocale(language);
62
- while (localeId !== DEFAULT_LANGUAGE && !bundlesForPackage[localeId]) {
85
+ while (localeId !== DEFAULT_LANGUAGE && !_hasLoader(packageName, localeId)) {
63
86
  localeId = nextFallbackLocale(localeId);
64
87
  }
65
88
 
66
- if (!bundlesForPackage[localeId]) {
67
- setI18nBundleData(packageName, null); // reset for the default language (if data was set for a previous language)
89
+ // use default language unless configured to always fetch it from the network
90
+ const fetchDefaultLanguage = getFetchDefaultLanguage();
91
+ if (localeId === DEFAULT_LANGUAGE && !fetchDefaultLanguage) {
92
+ _setI18nBundleData(packageName, null); // reset for the default language (if data was set for a previous language)
68
93
  return;
69
94
  }
70
95
 
71
- const bundleURL = bundlesForPackage[localeId];
72
-
73
- if (typeof bundleURL === "object") { // inlined from build
74
- setI18nBundleData(packageName, bundleURL);
96
+ if (!_hasLoader(packageName, localeId)) {
97
+ _showAssetsWarningOnce(packageName);
75
98
  return;
76
99
  }
77
100
 
78
- const content = await fetchTextOnce(bundleURL);
79
- let parser;
80
- if (content.startsWith("{")) {
81
- parser = JSON.parse;
82
- } else {
83
- const PropertiesFormatSupport = getFeature("PropertiesFormatSupport");
84
- if (!PropertiesFormatSupport) {
85
- throw new Error(`In order to support .properties files, please: import "@ui5/webcomponents-base/dist/features/PropertiesFormatSupport.js";`);
101
+ try {
102
+ const data = await _loadMessageBundleOnce(packageName, localeId);
103
+ _setI18nBundleData(packageName, data);
104
+ } catch (e) {
105
+ if (!reportedErrors.has(e.message)) {
106
+ reportedErrors.add(e.message);
107
+ console.error(e.message); /* eslint-disable-line */
86
108
  }
87
- parser = PropertiesFormatSupport.parser;
88
109
  }
89
-
90
- const data = parser(content);
91
-
92
- setI18nBundleData(packageName, data);
93
110
  };
94
111
 
95
112
  // When the language changes dynamically (the user calls setLanguage), re-fetch all previously fetched bundles
@@ -99,8 +116,8 @@ attachLanguageChange(() => {
99
116
  });
100
117
 
101
118
  export {
119
+ registerI18nLoader,
102
120
  fetchI18nBundle,
103
121
  registerI18nBundle,
104
- setI18nBundleData,
105
122
  getI18nBundleData,
106
123
  };
@@ -0,0 +1,43 @@
1
+ const Cs=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))n(r);new MutationObserver(r=>{for(const i of r)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function s(r){const i={};return r.integrity&&(i.integrity=r.integrity),r.referrerpolicy&&(i.referrerPolicy=r.referrerpolicy),r.crossorigin==="use-credentials"?i.credentials="include":r.crossorigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(r){if(r.ep)return;r.ep=!0;const i=s(r);fetch(r.href,i)}};Cs();const ut={themes:{default:"sap_fiori_3",all:["sap_fiori_3","sap_fiori_3_dark","sap_belize","sap_belize_hcb","sap_belize_hcw","sap_fiori_3_hcb","sap_fiori_3_hcw","sap_horizon","sap_horizon_dark","sap_horizon_hcb","sap_horizon_hcw","sap_horizon_exp"]},languages:{default:"en",all:["ar","bg","ca","cs","cy","da","de","el","en","en_GB","en_US_sappsd","en_US_saprigi","en_US_saptrc","es","es_MX","et","fi","fr","fr_CA","hi","hr","hu","in","it","iw","ja","kk","ko","lt","lv","ms","nl","no","pl","pt_PT","pt","ro","ru","sh","sk","sl","sv","th","tr","uk","vi","zh_CN","zh_TW"]},locales:{default:"en",all:["ar","ar_EG","ar_SA","bg","ca","cs","da","de","de_AT","de_CH","el","el_CY","en","en_AU","en_GB","en_HK","en_IE","en_IN","en_NZ","en_PG","en_SG","en_ZA","es","es_AR","es_BO","es_CL","es_CO","es_MX","es_PE","es_UY","es_VE","et","fa","fi","fr","fr_BE","fr_CA","fr_CH","fr_LU","he","hi","hr","hu","id","it","it_CH","ja","kk","ko","lt","lv","ms","nb","nl","nl_BE","pl","pt","pt_PT","ro","ru","ru_UA","sk","sl","sr","sr_Latn","sv","th","tr","uk","vi","zh_CN","zh_HK","zh_SG","zh_TW"]}},xt=ut.themes.default,Nt=ut.languages.default,E=ut.locales.default,ee=ut.locales.all;var ke=()=>{const e=navigator.languages,t=()=>navigator.language;return e&&e[0]||t()||navigator.userLanguage||navigator.browserLanguage||Nt},He={},Be=He.hasOwnProperty,Es=He.toString,Fe=Be.toString,Ts=Fe.call(Object),se=function(e){var t,s;return!e||Es.call(e)!=="[object Object]"?!1:(t=Object.getPrototypeOf(e),t?(s=Be.call(t,"constructor")&&t.constructor,typeof s=="function"&&Fe.call(s)===Ts):!0)},Ms=Object.create(null),je=function(){var e,t,s,n,r,i,o=arguments[2]||{},a=3,c=arguments.length,l=arguments[0]||!1,h=arguments[1]?void 0:Ms;for(typeof o!="object"&&typeof o!="function"&&(o={});a<c;a++)if((r=arguments[a])!=null)for(n in r)e=o[n],s=r[n],!(n==="__proto__"||o===s)&&(l&&s&&(se(s)||(t=Array.isArray(s)))?(t?(t=!1,i=e&&Array.isArray(e)?e:[]):i=e&&se(e)?e:{},o[n]=je(l,arguments[1],i,s)):s!==h&&(o[n]=s));return o},Zt=function(){var e=[!0,!1];return e.push.apply(e,arguments),je.apply(null,e)};const Ve=new Map,Ls=(e,t)=>{Ve.set(e,t)},_=e=>Ve.get(e);let ne=!1,m={animationMode:"full",theme:xt,rtl:null,language:null,calendarType:null,noConflict:!1,formatSettings:{},fetchDefaultLanguage:!1};const Os=()=>(S(),m.animationMode),Ps=()=>(S(),m.theme),Is=()=>(S(),m.rtl),Ds=()=>(S(),m.language),Rs=()=>(S(),m.fetchDefaultLanguage),xs=()=>(S(),m.noConflict),Ns=()=>(S(),m.calendarType),Us=()=>(S(),m.formatSettings),it=new Map;it.set("true",!0);it.set("false",!1);const ks=()=>{const e=document.querySelector("[data-ui5-config]")||document.querySelector("[data-id='sap-ui-config']");let t;if(e){try{t=JSON.parse(e.innerHTML)}catch{console.warn("Incorrect data-sap-ui-config format. Please use JSON")}t&&(m=Zt(m,t))}},Hs=()=>{const e=new URLSearchParams(window.location.search);e.forEach((t,s)=>{const n=s.split("sap-").length;n===0||n===s.split("sap-ui-").length||re(s,t,"sap")}),e.forEach((t,s)=>{!s.startsWith("sap-ui")||re(s,t,"sap-ui")})},Bs=(e,t)=>e==="theme"&&t.includes("@")?t.split("@")[0]:t,re=(e,t,s)=>{const n=t.toLowerCase(),r=e.split(`${s}-`)[1];it.has(t)&&(t=it.get(n)),t=Bs(r,t),m[r]=t},Fs=()=>{const e=_("OpenUI5Support");if(!e||!e.isLoaded())return;const t=e.getConfigurationSettingsObject();m=Zt(m,t)},S=()=>{ne||(ks(),Hs(),Fs(),ne=!0)};class T{constructor(){this._eventRegistry=new Map}attachEvent(t,s){const n=this._eventRegistry,r=n.get(t);if(!Array.isArray(r)){n.set(t,[s]);return}r.includes(s)||r.push(s)}detachEvent(t,s){const n=this._eventRegistry,r=n.get(t);if(!r)return;const i=r.indexOf(s);i!==-1&&r.splice(i,1),r.length===0&&n.delete(t)}fireEvent(t,s){const r=this._eventRegistry.get(t);return r?r.map(i=>i.call(this,s)):[]}fireEventAsync(t,s){return Promise.all(this.fireEvent(t,s))}isHandlerAttached(t,s){const r=this._eventRegistry.get(t);return r?r.includes(s):!1}hasListeners(t){return!!this._eventRegistry.get(t)}}const js=new T,Vs="languageChange",ze=e=>{js.attachEvent(Vs,e)},ie=10;class zs{constructor(){this.list=[],this.lookup=new Set}add(t){this.lookup.has(t)||(this.list.push(t),this.lookup.add(t))}remove(t){!this.lookup.has(t)||(this.list=this.list.filter(s=>s!==t),this.lookup.delete(t))}shift(){const t=this.list.shift();if(t)return this.lookup.delete(t),t}isEmpty(){return this.list.length===0}isAdded(t){return this.lookup.has(t)}process(t){let s;const n=new Map;for(s=this.shift();s;){const r=n.get(s)||0;if(r>ie)throw new Error(`Web component processed too many times this task, max allowed is: ${ie}`);t(s),n.set(s,r+1),s=this.shift()}}}const We=e=>{const t=[];return e.forEach(s=>{t.push(s)}),t},Ze=(e,t=document.body)=>{let s=document.querySelector(e);return s||(s=document.createElement(e),t.insertBefore(s,t.firstChild))},Ws=()=>Ze("ui5-shared-resources",document.head),M=(e,t)=>{const s=e.split(".");let n=Ws();for(let r=0;r<s.length;r++){const i=s[r],o=r===s.length-1;Object.prototype.hasOwnProperty.call(n,i)||(n[i]=o?t:{}),n=n[i]}return n},oe={version:"0.0.0-8393c7cdd",major:0,minor:0,patch:0,suffix:"-8393c7cdd",isNext:!0,buildTime:1661930740};let Q,Zs="";const yt=new Map,V=M("Runtimes",[]),qs=()=>{Q===void 0&&(Q=V.length,V.push({...oe,alias:Zs,description:`Runtime ${Q} - ver ${oe.version}`}))},qe=()=>Q,Gs=(e,t)=>{const s=`${e},${t}`;if(yt.has(s))return yt.get(s);const n=V[e],r=V[t];if(!n||!r)throw new Error("Invalid runtime index supplied");if(n.isNext||r.isNext)return n.buildTime-r.buildTime;const i=n.major-r.major;if(i)return i;const o=n.minor-r.minor;if(o)return o;const a=n.patch-r.patch;if(a)return a;const l=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"}).compare(n.suffix,r.suffix);return yt.set(s,l),l},Ks=()=>V,Ge=M("Tags",new Map),qt=new Set;let C={},_t;const Ke="unknown",ae=e=>{qt.add(e),Ge.set(e,qe())},Js=e=>qt.has(e),Xs=()=>We(qt),Ys=e=>{let t=Ge.get(e);t===void 0&&(t=Ke),C[t]=C[t]||new Set,C[t].add(e),_t||(_t=setTimeout(()=>{Qs(),C={},_t=void 0},1e3))},Qs=()=>{const e=Ks(),t=qe(),s=e[t];let n="Multiple UI5 Web Components instances detected.";e.length>1&&(n=`${n}
2
+ Loading order (versions before 1.1.0 not listed): ${e.map(r=>`
3
+ ${r.description}`).join("")}`),Object.keys(C).forEach(r=>{let i,o;r===Ke?(i=1,o={description:"Older unknown runtime"}):(i=Gs(t,r),o=e[r]);let a;i>0?a="an older":i<0?a="a newer":a="the same",n=`${n}
4
+
5
+ "${s.description}" failed to define ${C[r].size} tag(s) as they were defined by a runtime of ${a} version "${o.description}": ${We(C[r]).sort().join(", ")}.`,i>0?n=`${n}
6
+ WARNING! If your code uses features of the above web components, unavailable in ${o.description}, it might not work as expected!`:n=`${n}
7
+ Since the above web components were defined by the same or newer version runtime, they should be compatible with your code.`}),n=`${n}
8
+
9
+ To prevent other runtimes from defining tags that you use, consider using scoping or have third-party libraries use scoping: https://github.com/SAP/ui5-webcomponents/blob/main/docs/2-advanced/03-scoping.md.`,console.warn(n)},Je=new Set,tn=e=>{Je.add(e)},en=e=>Je.has(e),Gt=new Set,sn=new T,R=new zs;let O,tt,wt,J;const Xe=async e=>{R.add(e),await rn()},Ye=e=>{sn.fireEvent("beforeComponentRender",e),Gt.add(e),e._render()},nn=e=>{R.remove(e),Gt.delete(e)},rn=async()=>{J||(J=new Promise(e=>{window.requestAnimationFrame(()=>{R.process(Ye),J=null,e(),wt||(wt=setTimeout(()=>{wt=void 0,R.isEmpty()&&cn()},200))})})),await J},on=()=>O||(O=new Promise(e=>{tt=e,window.requestAnimationFrame(()=>{R.isEmpty()&&(O=void 0,e())})}),O),an=()=>{const e=Xs().map(t=>customElements.whenDefined(t));return Promise.all(e)},Kt=async()=>{await an(),await on()},cn=()=>{!R.isEmpty()||tt&&(tt(),tt=void 0,O=void 0)},Jt=async e=>{Gt.forEach(t=>{const s=t.constructor.getMetadata().getTag(),n=en(t.constructor),r=t.constructor.getMetadata().isLanguageAware(),i=t.constructor.getMetadata().isThemeAware();(!e||e.tag===s||e.rtlAware&&n||e.languageAware&&r||e.themeAware&&i)&&Xe(t)}),await Kt()};let vt,Ut;const ot=()=>(vt===void 0&&(vt=Ds()),vt),ln=e=>{Ut=e},un=()=>(Ut===void 0&&ln(Rs()),Ut),dn=/^((?:[A-Z]{2,3}(?:-[A-Z]{3}){0,3})|[A-Z]{4}|[A-Z]{5,8})(?:-([A-Z]{4}))?(?:-([A-Z]{2}|[0-9]{3}))?((?:-[0-9A-Z]{5,8}|-[0-9][0-9A-Z]{3})*)((?:-[0-9A-WYZ](?:-[0-9A-Z]{2,8})+)*)(?:-(X(?:-[0-9A-Z]{1,8})+))?$/i;class hn{constructor(t){const s=dn.exec(t.replace(/_/g,"-"));if(s===null)throw new Error(`The given language ${t} does not adhere to BCP-47.`);this.sLocaleId=t,this.sLanguage=s[1]||null,this.sScript=s[2]||null,this.sRegion=s[3]||null,this.sVariant=s[4]&&s[4].slice(1)||null,this.sExtension=s[5]&&s[5].slice(1)||null,this.sPrivateUse=s[6]||null,this.sLanguage&&(this.sLanguage=this.sLanguage.toLowerCase()),this.sScript&&(this.sScript=this.sScript.toLowerCase().replace(/^[a-z]/,n=>n.toUpperCase())),this.sRegion&&(this.sRegion=this.sRegion.toUpperCase())}getLanguage(){return this.sLanguage}getScript(){return this.sScript}getRegion(){return this.sRegion}getVariant(){return this.sVariant}getVariantSubtags(){return this.sVariant?this.sVariant.split("-"):[]}getExtension(){return this.sExtension}getExtensionSubtags(){return this.sExtension?this.sExtension.slice(2).split("-"):[]}getPrivateUse(){return this.sPrivateUse}getPrivateUseSubtags(){return this.sPrivateUse?this.sPrivateUse.slice(2).split("-"):[]}hasPrivateUseSubtag(t){return this.getPrivateUseSubtags().indexOf(t)>=0}toString(){const t=[this.sLanguage];return this.sScript&&t.push(this.sScript),this.sRegion&&t.push(this.sRegion),this.sVariant&&t.push(this.sVariant),this.sExtension&&t.push(this.sExtension),this.sPrivateUse&&t.push(this.sPrivateUse),t.join("-")}}const At=new Map,Qe=e=>(At.has(e)||At.set(e,new hn(e)),At.get(e)),ce=e=>{try{if(e&&typeof e=="string")return Qe(e)}catch{}},kt=e=>e?ce(e):ot()?Qe(ot()):ce(ke()),fn=/^((?:[A-Z]{2,3}(?:-[A-Z]{3}){0,3})|[A-Z]{4}|[A-Z]{5,8})(?:-([A-Z]{4}))?(?:-([A-Z]{2}|[0-9]{3}))?((?:-[0-9A-Z]{5,8}|-[0-9][0-9A-Z]{3})*)((?:-[0-9A-WYZ](?:-[0-9A-Z]{2,8})+)*)(?:-(X(?:-[0-9A-Z]{1,8})+))?$/i,le=/(?:^|-)(saptrc|sappsd)(?:-|$)/i,pn={he:"iw",yi:"ji",id:"in",sr:"sh"},gn=e=>{let t;if(!e)return E;if(typeof e=="string"&&(t=fn.exec(e.replace(/_/g,"-")))){let s=t[1].toLowerCase(),n=t[3]?t[3].toUpperCase():void 0;const r=t[2]?t[2].toLowerCase():void 0,i=t[4]?t[4].slice(1):void 0,o=t[6];return s=pn[s]||s,o&&(t=le.exec(o))||i&&(t=le.exec(i))?`en_US_${t[1].toLowerCase()}`:(s==="zh"&&!n&&(r==="hans"?n="CN":r==="hant"&&(n="TW")),s+(n?"_"+n+(i?"_"+i.replace("-","_"):""):""))}},mn=e=>{if(!e)return E;if(e==="zh_HK")return"zh_TW";const t=e.lastIndexOf("_");return t>=0?e.slice(0,t):e!==E?E:""},ue=new Set,de=new Set,Xt=new Map,St=new Map,Yt=new Map,yn=(e,t,s)=>{const n=`${e}/${t}`;Yt.set(n,s)},he=(e,t)=>{Xt.set(e,t)},_n=e=>Xt.get(e),fe=(e,t)=>{const s=`${e}/${t}`;return Yt.has(s)},wn=(e,t)=>{const s=`${e}/${t}`,n=Yt.get(s);return St.get(s)||St.set(s,n(t)),St.get(s)},vn=e=>{ue.has(e)||(console.warn(`[${e}]: Message bundle assets are not configured. Falling back to English texts.`,` Add \`import "${e}/dist/Assets.js"\` in your bundle and make sure your build tool supports dynamic imports and JSON imports. See section "Assets" in the documentation for more information.`),ue.add(e))},ts=async e=>{const t=kt().getLanguage(),s=kt().getRegion();let n=gn(t+(s?`-${s}`:""));for(;n!==Nt&&!fe(e,n);)n=mn(n);const r=un();if(n===Nt&&!r){he(e,null);return}if(!fe(e,n)){vn(e);return}try{const i=await wn(e,n);he(e,i)}catch(i){de.has(i.message)||(de.add(i.message),console.error(i.message))}};ze(()=>{const e=[...Xt.keys()];return Promise.all(e.map(ts))});const An=new Map,at=new Map,bt=new Map,pe=new Set;let ge=!1;const Sn={iw:"he",ji:"yi",in:"id"},me=e=>{ge||(console.warn(`[LocaleData] Supported locale "${e}" not configured, import the "Assets.js" module from the webcomponents package you are using.`),ge=!0)},bn=(e,t,s)=>{e=e&&Sn[e]||e,e==="no"&&(e="nb"),e==="zh"&&!t&&(s==="Hans"?t="CN":s==="Hant"&&(t="TW")),(e==="sh"||e==="sr"&&s==="Latn")&&(e="sr",t="Latn");let n=`${e}_${t}`;return ee.includes(n)||(n=e,ee.includes(n))?at.has(n)?n:(me(n),E):E},ye=(e,t)=>{An.set(e,t)},$n=e=>{const t=at.get(e);return bt.get(e)||bt.set(e,t(e)),bt.get(e)},Cn=async(e,t,s)=>{const n=bn(e,t,s),r=_("OpenUI5Support");if(r){const i=r.getLocaleDataObject();if(i){ye(n,i);return}}try{const i=await $n(n);ye(n,i)}catch(i){pe.has(i.message)||(pe.add(i.message),console.error(i.message))}},En=(e,t)=>{at.set(e,t)};En("en",async e=>(await fetch("https://sdk.openui5.org/1.103.0/resources/sap/ui/core/cldr/en.json")).json());ze(()=>{const e=kt();return Cn(e.getLanguage(),e.getRegion(),e.getScript())});const es=new Map,ss=new Map,ns=new Set,ct=new Set,b=(e,t,s)=>{ss.set(`${e}/${t}`,s),ns.add(e),ct.add(t)},rs=async(e,t)=>{const s=es.get(`${e}_${t}`);if(s!==void 0)return s;if(!ct.has(t)){const n=[...ct.values()].join(", ");return console.warn(`You have requested a non-registered theme ${t} - falling back to ${xt}. Registered themes are: ${n}`),_e(e,xt)}return _e(e,t)},_e=async(e,t)=>{const s=ss.get(`${e}/${t}`);if(!s){console.error(`Theme [${t}] not registered for package [${e}]`);return}let n;try{n=await s(t)}catch(i){console.error(e,i.message);return}const r=n._||n;return es.set(`${e}_${t}`,r),r},is=()=>ns,Tn=e=>ct.has(e),we={"SAP-icons-TNT":"tnt",BusinessSuiteInAppSymbols:"business-suite",horizon:"SAP-icons-v5"},Mn=(e,t={})=>{const s=document.createElement("style");return s.type="text/css",Object.entries(t).forEach(n=>s.setAttribute(...n)),s.textContent=e,document.head.appendChild(s),s},dt=(e,t)=>t?`${e}|${t}`:e,ht=(e,t,s="")=>{const n=typeof e=="string"?e:e.content;if(document.adoptedStyleSheets){const r=new CSSStyleSheet;r.replaceSync(n),r._ui5StyleId=dt(t,s),document.adoptedStyleSheets=[...document.adoptedStyleSheets,r]}else{const r={};r[t]=s,Mn(n,r)}},Ln=(e,t,s="")=>{const n=typeof e=="string"?e:e.content;document.adoptedStyleSheets?document.adoptedStyleSheets.find(r=>r._ui5StyleId===dt(t,s)).replaceSync(n||""):document.querySelector(`head>style[${t}="${s}"]`).textContent=n||""},ft=(e,t="")=>document.adoptedStyleSheets?!!document.adoptedStyleSheets.find(s=>s._ui5StyleId===dt(e,t)):!!document.querySelector(`head>style[${e}="${t}"]`),On=(e,t="")=>{if(document.adoptedStyleSheets)document.adoptedStyleSheets=document.adoptedStyleSheets.filter(s=>s._ui5StyleId!==dt(e,t));else{const s=document.querySelector(`head > style[${e}="${t}"]`);s&&s.parentElement.removeChild(s)}},os=(e,t,s="")=>{ft(t,s)?Ln(e,t,s):ht(e,t,s)},P=new Set,Pn=()=>{let e=document.querySelector(".sapThemeMetaData-Base-baseLib")||document.querySelector(".sapThemeMetaData-UI5-sap-ui-core");if(e)return getComputedStyle(e).backgroundImage;e=document.createElement("span"),e.style.display="none",e.classList.add("sapThemeMetaData-Base-baseLib"),document.body.appendChild(e);let t=getComputedStyle(e).backgroundImage;return t==="none"&&(e.classList.add("sapThemeMetaData-UI5-sap-ui-core"),t=getComputedStyle(e).backgroundImage),document.body.removeChild(e),t},In=e=>{const t=/\(["']?data:text\/plain;utf-8,(.*?)['"]?\)$/i.exec(e);if(t&&t.length>=2){let s=t[1];if(s=s.replace(/\\"/g,'"'),s.charAt(0)!=="{"&&s.charAt(s.length-1)!=="}")try{s=decodeURIComponent(s)}catch{P.has("decode")||(console.warn("Malformed theme metadata string, unable to decodeURIComponent"),P.add("decode"));return}try{return JSON.parse(s)}catch{P.has("parse")||(console.warn("Malformed theme metadata string, unable to parse JSON"),P.add("parse"))}}},Dn=e=>{let t,s;try{t=e.Path.match(/\.([^.]+)\.css_variables$/)[1],s=e.Extends[0]}catch{P.has("object")||(console.warn("Malformed theme metadata Object",e),P.add("object"));return}return{themeName:t,baseThemeName:s}},Rn=()=>{const e=Pn();if(!e||e==="none")return;const t=In(e);return Dn(t)},xn=new T,Nn="themeLoaded",Un=e=>xn.fireEvent(Nn,e),z="@ui5/webcomponents-theming",kn=()=>is().has(z),Hn=async e=>{if(!kn())return;const t=await rs(z,e);t&&os(t,"data-ui5-theme-properties",z)},Bn=()=>{On("data-ui5-theme-properties",z)},Fn=async e=>{is().forEach(async s=>{if(s===z)return;const n=await rs(s,e);n&&os(n,"data-ui5-theme-properties",s)})},jn=()=>{const e=Rn();if(e)return e;const t=_("OpenUI5Support");if(t&&t.cssVariablesLoaded())return{themeName:t.getConfigurationSettingsObject().theme}},as=async e=>{const t=jn();!t||e!==t.themeName?await Hn(e):Bn();const s=Tn(e)?e:t&&t.baseThemeName;await Fn(s),Un(e)};let I;const pt=()=>(I===void 0&&(I=Ps()),I),cs=async e=>{I!==e&&(I=e,await as(I),await Jt({themeAware:!0}))},Vn=e=>pt().startsWith(e),zn=new Map,ls=()=>{const e=pt(),t=zn.get(e);return t||(Vn("sap_horizon")?"SAP-icons-v5":"SAP-icons")},ve=new Map,lt=M("SVGIcons.registry",new Map),$t=M("SVGIcons.promises",new Map),Ae="ICON_NOT_FOUND",Wn=async e=>{if(!$t.has(e)){if(!ve.has(e))throw new Error(`No loader registered for the ${e} icons collection. Probably you forgot to import the "AllIcons.js" module for the respective package.`);const t=ve.get(e);$t.set(e,t(e))}return $t.get(e)},Zn=e=>{Object.keys(e.data).forEach(t=>{const s=e.data[t];qn(t,{pathData:s.path||s.paths,ltr:s.ltr,accData:s.acc,collection:e.collection,packageName:e.packageName})})},qn=(e,{pathData:t,ltr:s,accData:n,collection:r,packageName:i}={})=>{r||(r=ls());const o=`${r}/${e}`;lt.set(o,{pathData:t,ltr:s,accData:n,packageName:i})},Gn=e=>{e.startsWith("sap-icon://")&&(e=e.replace("sap-icon://",""));let t;[e,t]=e.split("/").reverse(),t=t||ls(),t=Jn(t),e=e.replace("icon-","");const s=`${t}/${e}`;return{name:e,collection:t,registryKey:s}},Ct=async e=>{const{collection:t,registryKey:s}=Gn(e);let n=Ae;try{n=await Wn(t)}catch(r){console.error(r.message)}return n===Ae?n:(lt.has(s)||Zn(n),lt.get(s))},Kn=async()=>(await Ct("edit"),await Ct("tnt/arrow"),await Ct("business-suite/3d"),Array.from(lt.keys())),Jn=e=>we[e]?we[e]:e,Ht=M("PopupUtilsData",{});Ht.currentZIndex=Ht.currentZIndex||100;const us=()=>Ht.currentZIndex,w=()=>{const e=window.sap;return e&&e.ui&&typeof e.ui.getCore=="function"&&e.ui.getCore()},Xn=()=>!!w(),Yn=()=>{const e=w();return e?new Promise(t=>{e.attachInit(()=>{window.sap.ui.require(["sap/ui/core/LocaleData","sap/ui/core/Popup"],(s,n)=>{n.setInitialZIndex(us()),t()})})}):Promise.resolve()},Qn=()=>{const e=w();if(!e)return;const t=e.getConfiguration(),s=window.sap.ui.require("sap/ui/core/LocaleData");return{animationMode:t.getAnimationMode(),language:t.getLanguage(),theme:t.getTheme(),rtl:t.getRTL(),calendarType:t.getCalendarType(),formatSettings:{firstDayOfWeek:s?s.getInstance(t.getLocale()).getFirstDayOfWeek():void 0}}},tr=()=>{const e=w();if(!e)return;const t=e.getConfiguration();return window.sap.ui.require("sap/ui/core/LocaleData").getInstance(t.getLocale())._get()},er=()=>{const e=w(),t=e.getConfiguration();e.attachThemeChanged(async()=>{await cs(t.getTheme())})},sr=()=>{!w()||er()},nr=()=>{if(!w())return;const t=[...document.head.children].find(s=>s.id==="sap-ui-theme-sap.ui.core");if(!!t)return!!t.href.match(/\/css(-|_)variables\.css/)},rr=()=>w()?window.sap.ui.require("sap/ui/core/Popup").getNextZIndex():void 0,ir=()=>{if(!w())return;window.sap.ui.require("sap/ui/core/Popup").setInitialZIndex(us())},or={isLoaded:Xn,init:Yn,getConfigurationSettingsObject:Qn,getLocaleDataObject:tr,attachListeners:sr,cssVariablesLoaded:nr,getNextZIndex:rr,setInitialZIndex:ir};Ls("OpenUI5Support",or);const ar=()=>new Promise(e=>{document.body?e():document.addEventListener("DOMContentLoaded",()=>{e()})});var cr={packageName:"@ui5/webcomponents-base",fileName:"FontFace.css",content:`@font-face{font-family:"72";font-style:normal;font-weight:400;src:local("72"),url(https://sdk.openui5.org/resources/sap/ui/core/themes/sap_fiori_3/fonts/72-Regular.woff2?ui5-webcomponents) format("woff2")}@font-face{font-family:"72full";font-style:normal;font-weight:400;src:local('72-full'),url(https://sdk.openui5.org/resources/sap/ui/core/themes/sap_fiori_3/fonts/72-Regular-full.woff2?ui5-webcomponents) format("woff2")}@font-face{font-family:"72";font-style:normal;font-weight:700;src:local('72-Bold'),url(https://sdk.openui5.org/resources/sap/ui/core/themes/sap_fiori_3/fonts/72-Bold.woff2?ui5-webcomponents) format("woff2")}@font-face{font-family:"72full";font-style:normal;font-weight:700;src:local('72-Bold-full'),url(https://sdk.openui5.org/resources/sap/ui/core/themes/sap_fiori_3/fonts/72-Bold-full.woff2?ui5-webcomponents) format("woff2")}@font-face{font-family:'72-Bold';font-style:normal;src:local('72-Bold'),url(https://sdk.openui5.org/resources/sap/ui/core/themes/sap_fiori_3/fonts/72-Bold.woff2?ui5-webcomponents) format("woff2")}@font-face{font-family:'72-Boldfull';font-style:normal;src:url(https://sdk.openui5.org/resources/sap/ui/core/themes/sap_fiori_3/fonts/72-Bold-full.woff2?ui5-webcomponents) format("woff2")}@font-face{font-family:'72-Light';font-style:normal;src:local('72-Light'),url(https://sdk.openui5.org/resources/sap/ui/core/themes/sap_fiori_3/fonts/72-Light.woff2?ui5-webcomponents) format("woff2")}@font-face{font-family:'72-Lightfull';font-style:normal;src:url(https://sdk.openui5.org/resources/sap/ui/core/themes/sap_fiori_3/fonts/72-Light-full.woff2?ui5-webcomponents) format("woff2")}@font-face{font-family:"72Black";font-style:bold;font-weight:900;src:local('72Black'),url(https://sdk.openui5.org.com/resources/sap/ui/core/themes/sap_horizon/fonts/72-Black.woff2?ui5-webcomponents) format("woff2")}`},lr={packageName:"@ui5/webcomponents-base",fileName:"OverrideFontFace.css",content:"@font-face{font-family:'72override';unicode-range:U+0102-0103,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EB7,U+1EB8-1EC7,U+1EC8-1ECB,U+1ECC-1EE3,U+1EE4-1EF1,U+1EF4-1EF7;src:local('Arial'),local('Helvetica'),local('sans-serif')}"};const ur=()=>{const e=_("OpenUI5Support");(!e||!e.isLoaded())&&dr(),hr()},dr=()=>{ft("data-ui5-font-face")||ht(cr,"data-ui5-font-face")},hr=()=>{ft("data-ui5-font-face-override")||ht(lr,"data-ui5-font-face-override")};var fr={packageName:"@ui5/webcomponents-base",fileName:"SystemCSSVars.css",content:":root{--_ui5_content_density:cozy}.sapUiSizeCompact,.ui5-content-density-compact,[data-ui5-compact-size]{--_ui5_content_density:compact}[dir=rtl]{--_ui5_dir:rtl}[dir=ltr]{--_ui5_dir:ltr}"};const pr=()=>{ft("data-ui5-system-css-vars")||ht(fr,"data-ui5-system-css-vars")};let X;const gr=async()=>X||(X=new Promise(async e=>{qs();const t=_("OpenUI5Support"),s=_("F6Navigation");t?await t.init():s&&s.init(),await ar(),await as(pt()),t&&t.attachListeners(),ur(),pr(),e()}),X);class F{static isValid(t){}static attributeToProperty(t){return t}static propertyToAttribute(t){return`${t}`}static valuesAreEqual(t,s){return t===s}static generateTypeAccessors(t){Object.keys(t).forEach(s=>{Object.defineProperty(this,s,{get(){return t[s]}})})}}const et=(e,t,s=!1)=>{if(typeof e!="function"||typeof t!="function")return!1;if(s&&e===t)return!0;let n=e;do n=Object.getPrototypeOf(n);while(n!==null&&n!==t);return n===t},Et=new Map,Tt=new Map,Se=e=>{if(!Et.has(e)){const t=mr(e.split("-"));Et.set(e,t)}return Et.get(e)},ds=e=>{if(!Tt.has(e)){const t=e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();Tt.set(e,t)}return Tt.get(e)},mr=e=>e.map((t,s)=>s===0?t.toLowerCase():t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()).join(""),yr=e=>{if(!(e instanceof HTMLElement))return"default";const t=e.getAttribute("slot");if(t){const s=t.match(/^(.+?)-\d+$/);return s?s[1]:t}return"default"},Bt=e=>e&&e instanceof HTMLElement&&e.localName==="slot",hs=e=>Bt(e)?e.assignedNodes({flatten:!0}).filter(t=>t instanceof HTMLElement):[e],_r=e=>{const t=(s,n)=>s.concat(hs(n));return e.reduce(t,[])};let wr,be={include:[/^ui5-/],exclude:[]};const Mt=new Map,fs=()=>wr,Ft=e=>{if(!Mt.has(e)){const t=be.include.some(s=>e.match(s))&&!be.exclude.some(s=>e.match(s));Mt.set(e,t)}return Mt.get(e)},jt=e=>{if(Ft(e))return fs()};class vr{constructor(t){this.metadata=t}getInitialState(){if(Object.prototype.hasOwnProperty.call(this,"_initialState"))return this._initialState;const t={},s=this.slotsAreManaged(),n=this.getProperties();for(const r in n){const i=n[r].type,o=n[r].defaultValue;i===Boolean?(t[r]=!1,o!==void 0&&console.warn("The 'defaultValue' metadata key is ignored for all booleans properties, they would be initialized with 'false' by default")):n[r].multiple?t[r]=[]:i===Object?t[r]="defaultValue"in n[r]?n[r].defaultValue:{}:i===String?t[r]="defaultValue"in n[r]?n[r].defaultValue:"":t[r]=o}if(s){const r=this.getSlots();for(const[i,o]of Object.entries(r)){const a=o.propertyName||i;t[a]=[]}}return this._initialState=t,t}static validatePropertyValue(t,s){return s.multiple?t.map(r=>$e(r,s)):$e(t,s)}static validateSlotValue(t,s){return Ar(t,s)}getPureTag(){return this.metadata.tag}getTag(){const t=this.metadata.tag,s=jt(t);return s?`${t}-${s}`:t}getAltTag(){const t=this.metadata.altTag;if(!t)return;const s=jt(t);return s?`${t}-${s}`:t}hasAttribute(t){const s=this.getProperties()[t];return s.type!==Object&&!s.noAttribute&&!s.multiple}getPropertiesList(){return Object.keys(this.getProperties())}getAttributesList(){return this.getPropertiesList().filter(this.hasAttribute,this).map(ds)}getSlots(){return this.metadata.slots||{}}canSlotText(){const t=this.getSlots().default;return t&&t.type===Node}hasSlots(){return!!Object.entries(this.getSlots()).length}hasIndividualSlots(){return this.slotsAreManaged()&&Object.entries(this.getSlots()).some(([t,s])=>s.individualSlots)}slotsAreManaged(){return!!this.metadata.managedSlots}supportsF6FastNavigation(){return!!this.metadata.fastNavigation}getProperties(){return this.metadata.properties||{}}getEvents(){return this.metadata.events||{}}isLanguageAware(){return!!this.metadata.languageAware}isThemeAware(){return!!this.metadata.themeAware}shouldInvalidateOnChildChange(t,s,n){const r=this.getSlots()[t].invalidateOnChildChange;if(r===void 0)return!1;if(typeof r=="boolean")return r;if(typeof r=="object"){if(s==="property"){if(r.properties===void 0)return!1;if(typeof r.properties=="boolean")return r.properties;if(Array.isArray(r.properties))return r.properties.includes(n);throw new Error("Wrong format for invalidateOnChildChange.properties: boolean or array is expected")}if(s==="slot"){if(r.slots===void 0)return!1;if(typeof r.slots=="boolean")return r.slots;if(Array.isArray(r.slots))return r.slots.includes(n);throw new Error("Wrong format for invalidateOnChildChange.slots: boolean or array is expected")}}throw new Error("Wrong format for invalidateOnChildChange: boolean or object is expected")}}const $e=(e,t)=>{const s=t.type;if(s===Boolean)return typeof e=="boolean"?e:!1;if(s===String)return typeof e=="string"||typeof e=="undefined"||e===null?e:e.toString();if(s===Object)return typeof e=="object"?e:t.defaultValue;if(et(s,F))return s.isValid(e)?e:t.defaultValue},Ar=(e,t)=>(e&&hs(e).forEach(s=>{if(!(s instanceof t.type))throw new Error(`${s} is not of type ${t.type}`)}),e);customElements.get("ui5-static-area")||customElements.define("ui5-static-area",class extends HTMLElement{});const Sr=(e,t)=>{const s=br(t),n=fs();return e(t,s,n)},br=e=>{const t=e.constructor.getMetadata().getPureTag(),s=e.constructor.getUniqueDependencies().map(n=>n.getMetadata().getPureTag()).filter(Ft);return Ft(t)&&s.push(t),s},$r=M("CustomStyle.eventProvider",new T),Cr="CustomCSSChange",Qt=e=>{$r.attachEvent(Cr,e)},Ce=M("CustomStyle.customCSSFor",{});Qt(e=>{Jt({tag:e})});const Er=e=>Ce[e]?Ce[e].join(""):"",Lt=e=>Array.isArray(e)?ps(e.filter(t=>!!t)).map(t=>typeof t=="string"?t:t.content).join(" "):typeof e=="string"?e:e.content,ps=e=>e.reduce((t,s)=>t.concat(Array.isArray(s)?ps(s):s),[]),st=new Map;Qt(e=>{st.delete(`${e}_normal`)});const gs=(e,t=!1)=>{const s=e.getMetadata().getTag(),n=`${s}_${t?"static":"normal"}`,r=_("OpenUI5Enablement");if(!st.has(n)){let i,o="";if(r&&(o=Lt(r.getBusyIndicatorStyles())),t)i=Lt(e.staticAreaStyles);else{const a=Er(s)||"";i=`${Lt(e.styles)} ${a}`}i=`${i} ${o}`,st.set(n,i)}return st.get(n)},nt=new Map;Qt(e=>{nt.delete(`${e}_normal`)});const Tr=(e,t=!1)=>{const n=`${e.getMetadata().getTag()}_${t?"static":"normal"}`;if(!nt.has(n)){const r=gs(e,t),i=new CSSStyleSheet;i.replaceSync(r),nt.set(n,[i])}return nt.get(n)},Vt=(e,t=!1)=>{let s;const n=t?"staticAreaTemplate":"template",r=t?e.staticAreaItem.shadowRoot:e.shadowRoot,i=Sr(e.constructor[n],e);document.adoptedStyleSheets?r.adoptedStyleSheets=Tr(e.constructor,t):s=gs(e.constructor,t),e.constructor.render(i,r,s,t,{host:e})},Mr="--_ui5_content_density",Lr=e=>getComputedStyle(e).getPropertyValue(Mr);var Or=e=>{const t=/\$([-a-z0-9A-Z._]+)(?::([^$]*))?\$/.exec(e);return t&&t[2]?t[2].split(/,/):null};const Pr={iw:"he",ji:"yi",in:"id",sh:"sr"},Ir=Or("$cldr-rtl-locales:ar,fa,he$")||[],Dr=e=>(e=e&&Pr[e]||e,Ir.indexOf(e)>=0),ms=()=>{const e=Is();return e!==null?!!e:Dr(ot()||ke())},Rr="--_ui5_dir",ys=e=>{const t=window.document,s=["ltr","rtl"],n=getComputedStyle(e).getPropertyValue(Rr);return s.includes(n)?n:s.includes(e.dir)?e.dir:s.includes(t.documentElement.dir)?t.documentElement.dir:s.includes(t.body.dir)?t.body.dir:ms()?"rtl":void 0};class j extends HTMLElement{constructor(){super(),this._rendered=!1,this.attachShadow({mode:"open"})}setOwnerElement(t){this.ownerElement=t,this.classList.add(this.ownerElement._id),this.ownerElement.hasAttribute("data-ui5-static-stable")&&this.setAttribute("data-ui5-stable",this.ownerElement.getAttribute("data-ui5-static-stable"))}update(){this._rendered&&(this._updateContentDensity(),this._updateDirection(),Vt(this.ownerElement,!0))}_updateContentDensity(){Lr(this.ownerElement)==="compact"?(this.classList.add("sapUiSizeCompact"),this.classList.add("ui5-content-density-compact")):(this.classList.remove("sapUiSizeCompact"),this.classList.remove("ui5-content-density-compact"))}_updateDirection(){const t=ys(this.ownerElement);t?this.setAttribute("dir",t):this.removeAttribute("dir")}async getDomRef(){return this._updateContentDensity(),this._rendered||(this._rendered=!0,Vt(this.ownerElement,!0)),await Kt(),this.shadowRoot}static getTag(){const t="ui5-static-area-item",s=jt(t);return s?`${t}-${s}`:t}static createInstance(){return customElements.get(j.getTag())||customElements.define(j.getTag(),j),document.createElement(this.getTag())}}const zt=new WeakMap;let xr=(e,t,s)=>{const n=new MutationObserver(t);return n.observe(e,s),n},Nr=e=>{e.disconnect()};const Ur=(e,t,s)=>{const n=xr(e,t,s);zt.set(e,n)},kr=e=>{const t=zt.get(e);t&&(Nr(t),zt.delete(e))},Hr=["value-changed"],Br=e=>Hr.includes(e);let rt;const Fr=e=>{const t=te();return!(t.events&&t.events.includes&&t.events.includes(e))},te=()=>(rt===void 0&&(rt=xs()),rt),jr=e=>{const t=te();return Br(e)?!1:t===!0?!0:!Fr(e)},Vr=e=>{rt=e},zr=["disabled","title","hidden","role","draggable"],Ee=e=>zr.includes(e)||e.startsWith("aria")?!0:![HTMLElement,Element,Node].some(s=>s.prototype.hasOwnProperty(e)),Te=(e,t)=>{if(e.length!==t.length)return!1;for(let s=0;s<e.length;s++)if(e[s]!==t[s])return!1;return!0},Wr=(e,t)=>class extends e{constructor(){super(),t&&t()}};let Zr=0;const Me=new Map,Ot=new Map;function H(e){this._suppressInvalidation||(this.onInvalidation(e),this._changedState.push(e),Xe(this),this._eventProvider.fireEvent("invalidate",{...e,target:this}))}let Le={};class L extends HTMLElement{constructor(){super(),this._changedState=[],this._suppressInvalidation=!0,this._inDOM=!1,this._fullyConnected=!1,this._childChangeListeners=new Map,this._slotChangeListeners=new Map,this._eventProvider=new T;let t;this._domRefReadyPromise=new Promise(s=>{t=s}),this._domRefReadyPromise._deferredResolve=t,this._doNotSyncAttributes=new Set,this._initializeState(),this._upgradeAllProperties(),this.constructor._needsShadowDOM()&&this.attachShadow({mode:"open"})}get _id(){return this.__id||(this.__id=`ui5wc_${++Zr}`),this.__id}async connectedCallback(){this.setAttribute(this.constructor.getMetadata().getPureTag(),""),this.constructor.getMetadata().supportsF6FastNavigation()&&this.setAttribute("data-sap-ui-fastnavgroup","true");const t=this.constructor.getMetadata().slotsAreManaged();this._inDOM=!0,t&&(this._startObservingDOMChildren(),await this._processChildren()),this._inDOM&&(Ye(this),this._domRefReadyPromise._deferredResolve(),this._fullyConnected=!0,typeof this.onEnterDOM=="function"&&this.onEnterDOM())}disconnectedCallback(){const t=this.constructor.getMetadata().slotsAreManaged();this._inDOM=!1,t&&this._stopObservingDOMChildren(),this._fullyConnected&&(typeof this.onExitDOM=="function"&&this.onExitDOM(),this._fullyConnected=!1),this.staticAreaItem&&this.staticAreaItem.parentElement&&this.staticAreaItem.parentElement.removeChild(this.staticAreaItem),nn(this)}_startObservingDOMChildren(){if(!this.constructor.getMetadata().hasSlots())return;const s=this.constructor.getMetadata().canSlotText(),n={childList:!0,subtree:s,characterData:s};Ur(this,this._processChildren.bind(this),n)}_stopObservingDOMChildren(){kr(this)}async _processChildren(){this.constructor.getMetadata().hasSlots()&&await this._updateSlots()}async _updateSlots(){const t=this.constructor.getMetadata().getSlots(),s=this.constructor.getMetadata().canSlotText(),n=Array.from(s?this.childNodes:this.children),r=new Map,i=new Map;for(const[h,d]of Object.entries(t)){const u=d.propertyName||h;i.set(u,h),r.set(u,[...this._state[u]]),this._clearSlot(h,d)}const o=new Map,a=new Map,c=n.map(async(h,d)=>{const u=yr(h),p=t[u];if(p===void 0){const g=Object.keys(t).join(", ");console.warn(`Unknown slotName: ${u}, ignoring`,h,`Valid values are: ${g}`);return}if(p.individualSlots){const g=(o.get(u)||0)+1;o.set(u,g),h._individualSlot=`${u}-${g}`}if(h instanceof HTMLElement){const g=h.localName;if(g.includes("-")){if(!window.customElements.get(g)){const bs=window.customElements.whenDefined(g);let K=Me.get(g);K||(K=new Promise($s=>setTimeout($s,1e3)),Me.set(g,K)),await Promise.race([bs,K])}window.customElements.upgrade(h)}}h=this.constructor.getMetadata().constructor.validateSlotValue(h,p),h.isUI5Element&&p.invalidateOnChildChange&&(h.attachInvalidate||h._attachChange).bind(h)(this._getChildChangeListener(u)),Bt(h)&&this._attachSlotChange(h,u);const v=p.propertyName||u;a.has(v)?a.get(v).push({child:h,idx:d}):a.set(v,[{child:h,idx:d}])});await Promise.all(c),a.forEach((h,d)=>{this._state[d]=h.sort((u,p)=>u.idx-p.idx).map(u=>u.child)});let l=!1;for(const[h,d]of Object.entries(t)){const u=d.propertyName||h;Te(r.get(u),this._state[u])||(H.call(this,{type:"slot",name:i.get(u),reason:"children"}),l=!0)}l||H.call(this,{type:"slot",name:"default",reason:"textcontent"})}_clearSlot(t,s){const n=s.propertyName||t;this._state[n].forEach(i=>{i&&i.isUI5Element&&(i.detachInvalidate||i._detachChange).bind(i)(this._getChildChangeListener(t)),Bt(i)&&this._detachSlotChange(i,t)}),this._state[n]=[]}attachInvalidate(t){this._eventProvider.attachEvent("invalidate",t)}detachInvalidate(t){this._eventProvider.detachEvent("invalidate",t)}_onChildChange(t,s){!this.constructor.getMetadata().shouldInvalidateOnChildChange(t,s.type,s.name)||H.call(this,{type:"slot",name:t,reason:"childchange",child:s.target})}attributeChangedCallback(t,s,n){if(this._doNotSyncAttributes.has(t))return;const r=this.constructor.getMetadata().getProperties(),i=t.replace(/^ui5-/,""),o=Se(i);if(r.hasOwnProperty(o)){const a=r[o].type;a===Boolean?n=n!==null:et(a,F)&&(n=a.attributeToProperty(n)),this[o]=n}}_updateAttribute(t,s){if(!this.constructor.getMetadata().hasAttribute(t))return;const r=this.constructor.getMetadata().getProperties()[t].type,i=ds(t),o=this.getAttribute(i);if(r===Boolean)s===!0&&o===null?this.setAttribute(i,""):s===!1&&o!==null&&this.removeAttribute(i);else if(et(r,F)){const a=r.propertyToAttribute(s);a===null?(this._doNotSyncAttributes.add(i),this.removeAttribute(i),this._doNotSyncAttributes.delete(i)):this.setAttribute(i,a)}else typeof s!="object"&&o!==s&&this.setAttribute(i,s)}_upgradeProperty(t){if(this.hasOwnProperty(t)){const s=this[t];delete this[t],this[t]=s}}_upgradeAllProperties(){this.constructor.getMetadata().getPropertiesList().forEach(this._upgradeProperty,this)}_initializeState(){this._state={...this.constructor.getMetadata().getInitialState()}}_getChildChangeListener(t){return this._childChangeListeners.has(t)||this._childChangeListeners.set(t,this._onChildChange.bind(this,t)),this._childChangeListeners.get(t)}_getSlotChangeListener(t){return this._slotChangeListeners.has(t)||this._slotChangeListeners.set(t,this._onSlotChange.bind(this,t)),this._slotChangeListeners.get(t)}_attachSlotChange(t,s){t.addEventListener("slotchange",this._getSlotChangeListener(s))}_detachSlotChange(t,s){t.removeEventListener("slotchange",this._getSlotChangeListener(s))}_onSlotChange(t){H.call(this,{type:"slot",name:t,reason:"slotchange"})}onInvalidation(t){}_render(){const t=this.constructor.getMetadata().hasIndividualSlots();this._suppressInvalidation=!0,typeof this.onBeforeRendering=="function"&&this.onBeforeRendering(),this._onComponentStateFinalized&&this._onComponentStateFinalized(),this._suppressInvalidation=!1,this._changedState=[],this.constructor._needsShadowDOM()&&Vt(this),this.staticAreaItem&&this.staticAreaItem.update(),t&&this._assignIndividualSlotsToChildren(),typeof this.onAfterRendering=="function"&&this.onAfterRendering()}_assignIndividualSlotsToChildren(){Array.from(this.children).forEach(s=>{s._individualSlot&&s.setAttribute("slot",s._individualSlot)})}_waitForDomRef(){return this._domRefReadyPromise}getDomRef(){if(typeof this._getRealDomRef=="function")return this._getRealDomRef();if(!this.shadowRoot||this.shadowRoot.children.length===0)return;const t=[...this.shadowRoot.children].filter(s=>!["link","style"].includes(s.localName));return t.length!==1&&console.warn(`The shadow DOM for ${this.constructor.getMetadata().getTag()} does not have a top level element, the getDomRef() method might not work as expected`),t[0]}getFocusDomRef(){const t=this.getDomRef();if(t)return t.querySelector("[data-sap-focus-ref]")||t}async getFocusDomRefAsync(){return await this._waitForDomRef(),this.getFocusDomRef()}async focus(){await this._waitForDomRef();const t=this.getFocusDomRef();t&&typeof t.focus=="function"&&t.focus()}fireEvent(t,s,n=!1,r=!0){const i=this._fireEvent(t,s,n,r),o=Se(t);return o!==t?i&&this._fireEvent(o,s,n):i}_fireEvent(t,s,n=!1,r=!0){const i=new CustomEvent(`ui5-${t}`,{detail:s,composed:!1,bubbles:r,cancelable:n}),o=this.dispatchEvent(i);if(jr(t))return o;const a=new CustomEvent(t,{detail:s,composed:!1,bubbles:r,cancelable:n});return this.dispatchEvent(a)&&o}getSlottedNodes(t){return _r(this[t])}get effectiveDir(){return tn(this.constructor),ys(this)}get isUI5Element(){return!0}static get observedAttributes(){return this.getMetadata().getAttributesList()}static _needsShadowDOM(){return!!this.template}static _needsStaticArea(){return!!this.staticAreaTemplate}getStaticAreaItemDomRef(){if(!this.constructor._needsStaticArea())throw new Error("This component does not use the static area");return this.staticAreaItem||(this.staticAreaItem=j.createInstance(),this.staticAreaItem.setOwnerElement(this)),this.staticAreaItem.parentElement||Ze("ui5-static-area").appendChild(this.staticAreaItem),this.staticAreaItem.getDomRef()}static _generateAccessors(){const t=this.prototype,s=this.getMetadata().slotsAreManaged(),n=this.getMetadata().getProperties();for(const[r,i]of Object.entries(n)){if(Ee(r)||console.warn(`"${r}" is not a valid property name. Use a name that does not collide with DOM APIs`),i.type===Boolean&&i.defaultValue)throw new Error(`Cannot set a default value for property "${r}". All booleans are false by default.`);if(i.type===Array)throw new Error(`Wrong type for property "${r}". Properties cannot be of type Array - use "multiple: true" and set "type" to the single value type, such as "String", "Object", etc...`);if(i.type===Object&&i.defaultValue)throw new Error(`Cannot set a default value for property "${r}". All properties of type "Object" are empty objects by default.`);if(i.multiple&&i.defaultValue)throw new Error(`Cannot set a default value for property "${r}". All multiple properties are empty arrays by default.`);Object.defineProperty(t,r,{get(){if(this._state[r]!==void 0)return this._state[r];const o=i.defaultValue;return i.type===Boolean?!1:i.type===String?o:i.multiple?[]:o},set(o){let a;o=this.constructor.getMetadata().constructor.validatePropertyValue(o,i);const c=this._state[r];i.multiple&&i.compareValues?a=!Te(c,o):et(i.type,F)?a=!i.type.valuesAreEqual(c,o):a=c!==o,a&&(this._state[r]=o,H.call(this,{type:"property",name:r,newValue:o,oldValue:c}),this._updateAttribute(r,o))}})}if(s){const r=this.getMetadata().getSlots();for(const[i,o]of Object.entries(r)){Ee(i)||console.warn(`"${i}" is not a valid property name. Use a name that does not collide with DOM APIs`);const a=o.propertyName||i;Object.defineProperty(t,a,{get(){return this._state[a]!==void 0?this._state[a]:[]},set(){throw new Error("Cannot set slot content directly, use the DOM APIs (appendChild, removeChild, etc...)")}})}}}static get metadata(){return Le}static set metadata(t){Le=t}static get styles(){return""}static get staticAreaStyles(){return""}static get dependencies(){return[]}static getUniqueDependencies(){if(!Ot.has(this)){const t=this.dependencies.filter((s,n,r)=>r.indexOf(s)===n);Ot.set(this,t)}return Ot.get(this)}static whenDependenciesDefined(){return Promise.all(this.getUniqueDependencies().map(t=>t.define()))}static async onDefine(){return Promise.resolve()}static async define(){await gr(),await Promise.all([this.whenDependenciesDefined(),this.onDefine()]);const t=this.getMetadata().getTag(),s=this.getMetadata().getAltTag(),n=Js(t),r=customElements.get(t);return r&&!n?Ys(t):r||(this._generateAccessors(),ae(t),window.customElements.define(t,this),s&&!customElements.get(s)&&(ae(s),window.customElements.define(s,Wr(this,()=>{console.log(`The ${s} tag is deprecated and will be removed in the next release, please use ${t} instead.`)})))),this}static getMetadata(){if(this.hasOwnProperty("_metadata"))return this._metadata;const t=[this.metadata];let s=this;for(;s!==L;)s=Object.getPrototypeOf(s),t.unshift(s.metadata);const n=Zt({},...t);return this._metadata=new vr(n),this._metadata}}/**
10
+ * @license
11
+ * Copyright 2017 Google LLC
12
+ * SPDX-License-Identifier: BSD-3-Clause
13
+ */var Pt;const x=globalThis.trustedTypes,Oe=x?x.createPolicy("lit-html",{createHTML:e=>e}):void 0,A=`lit$${(Math.random()+"").slice(9)}$`,_s="?"+A,qr=`<${_s}>`,N=document,W=(e="")=>N.createComment(e),Z=e=>e===null||typeof e!="object"&&typeof e!="function",ws=Array.isArray,Gr=e=>{var t;return ws(e)||typeof((t=e)===null||t===void 0?void 0:t[Symbol.iterator])=="function"},B=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Pe=/-->/g,Ie=/>/g,$=/>|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g,De=/'/g,Re=/"/g,vs=/^(?:script|style|textarea|title)$/i,Kr=e=>(t,...s)=>({_$litType$:e,strings:t,values:s}),Jr=Kr(1),U=Symbol.for("lit-noChange"),f=Symbol.for("lit-nothing"),xe=new WeakMap,Xr=(e,t,s)=>{var n,r;const i=(n=s==null?void 0:s.renderBefore)!==null&&n!==void 0?n:t;let o=i._$litPart$;if(o===void 0){const a=(r=s==null?void 0:s.renderBefore)!==null&&r!==void 0?r:null;i._$litPart$=o=new G(t.insertBefore(W(),a),a,void 0,s!=null?s:{})}return o._$AI(e),o},D=N.createTreeWalker(N,129,null,!1),Yr=(e,t)=>{const s=e.length-1,n=[];let r,i=t===2?"<svg>":"",o=B;for(let c=0;c<s;c++){const l=e[c];let h,d,u=-1,p=0;for(;p<l.length&&(o.lastIndex=p,d=o.exec(l),d!==null);)p=o.lastIndex,o===B?d[1]==="!--"?o=Pe:d[1]!==void 0?o=Ie:d[2]!==void 0?(vs.test(d[2])&&(r=RegExp("</"+d[2],"g")),o=$):d[3]!==void 0&&(o=$):o===$?d[0]===">"?(o=r!=null?r:B,u=-1):d[1]===void 0?u=-2:(u=o.lastIndex-d[2].length,h=d[1],o=d[3]===void 0?$:d[3]==='"'?Re:De):o===Re||o===De?o=$:o===Pe||o===Ie?o=B:(o=$,r=void 0);const v=o===$&&e[c+1].startsWith("/>")?" ":"";i+=o===B?l+qr:u>=0?(n.push(h),l.slice(0,u)+"$lit$"+l.slice(u)+A+v):l+A+(u===-2?(n.push(void 0),c):v)}const a=i+(e[s]||"<?>")+(t===2?"</svg>":"");if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return[Oe!==void 0?Oe.createHTML(a):a,n]};class q{constructor({strings:t,_$litType$:s},n){let r;this.parts=[];let i=0,o=0;const a=t.length-1,c=this.parts,[l,h]=Yr(t,s);if(this.el=q.createElement(l,n),D.currentNode=this.el.content,s===2){const d=this.el.content,u=d.firstChild;u.remove(),d.append(...u.childNodes)}for(;(r=D.nextNode())!==null&&c.length<a;){if(r.nodeType===1){if(r.hasAttributes()){const d=[];for(const u of r.getAttributeNames())if(u.endsWith("$lit$")||u.startsWith(A)){const p=h[o++];if(d.push(u),p!==void 0){const v=r.getAttribute(p.toLowerCase()+"$lit$").split(A),g=/([.?@])?(.*)/.exec(p);c.push({type:1,index:i,name:g[2],strings:v,ctor:g[1]==="."?ti:g[1]==="?"?si:g[1]==="@"?ni:gt})}else c.push({type:6,index:i})}for(const u of d)r.removeAttribute(u)}if(vs.test(r.tagName)){const d=r.textContent.split(A),u=d.length-1;if(u>0){r.textContent=x?x.emptyScript:"";for(let p=0;p<u;p++)r.append(d[p],W()),D.nextNode(),c.push({type:2,index:++i});r.append(d[u],W())}}}else if(r.nodeType===8)if(r.data===_s)c.push({type:2,index:i});else{let d=-1;for(;(d=r.data.indexOf(A,d+1))!==-1;)c.push({type:7,index:i}),d+=A.length-1}i++}}static createElement(t,s){const n=N.createElement("template");return n.innerHTML=t,n}}function k(e,t,s=e,n){var r,i,o,a;if(t===U)return t;let c=n!==void 0?(r=s._$Cl)===null||r===void 0?void 0:r[n]:s._$Cu;const l=Z(t)?void 0:t._$litDirective$;return(c==null?void 0:c.constructor)!==l&&((i=c==null?void 0:c._$AO)===null||i===void 0||i.call(c,!1),l===void 0?c=void 0:(c=new l(e),c._$AT(e,s,n)),n!==void 0?((o=(a=s)._$Cl)!==null&&o!==void 0?o:a._$Cl=[])[n]=c:s._$Cu=c),c!==void 0&&(t=k(e,c._$AS(e,t.values),c,n)),t}class Qr{constructor(t,s){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=s}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var s;const{el:{content:n},parts:r}=this._$AD,i=((s=t==null?void 0:t.creationScope)!==null&&s!==void 0?s:N).importNode(n,!0);D.currentNode=i;let o=D.nextNode(),a=0,c=0,l=r[0];for(;l!==void 0;){if(a===l.index){let h;l.type===2?h=new G(o,o.nextSibling,this,t):l.type===1?h=new l.ctor(o,l.name,l.strings,this,t):l.type===6&&(h=new ri(o,this,t)),this.v.push(h),l=r[++c]}a!==(l==null?void 0:l.index)&&(o=D.nextNode(),a++)}return i}m(t){let s=0;for(const n of this.v)n!==void 0&&(n.strings!==void 0?(n._$AI(t,n,s),s+=n.strings.length-2):n._$AI(t[s])),s++}}class G{constructor(t,s,n,r){var i;this.type=2,this._$AH=f,this._$AN=void 0,this._$AA=t,this._$AB=s,this._$AM=n,this.options=r,this._$Cg=(i=r==null?void 0:r.isConnected)===null||i===void 0||i}get _$AU(){var t,s;return(s=(t=this._$AM)===null||t===void 0?void 0:t._$AU)!==null&&s!==void 0?s:this._$Cg}get parentNode(){let t=this._$AA.parentNode;const s=this._$AM;return s!==void 0&&t.nodeType===11&&(t=s.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,s=this){t=k(this,t,s),Z(t)?t===f||t==null||t===""?(this._$AH!==f&&this._$AR(),this._$AH=f):t!==this._$AH&&t!==U&&this.$(t):t._$litType$!==void 0?this.T(t):t.nodeType!==void 0?this.k(t):Gr(t)?this.S(t):this.$(t)}M(t,s=this._$AB){return this._$AA.parentNode.insertBefore(t,s)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==f&&Z(this._$AH)?this._$AA.nextSibling.data=t:this.k(N.createTextNode(t)),this._$AH=t}T(t){var s;const{values:n,_$litType$:r}=t,i=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=q.createElement(r.h,this.options)),r);if(((s=this._$AH)===null||s===void 0?void 0:s._$AD)===i)this._$AH.m(n);else{const o=new Qr(i,this),a=o.p(this.options);o.m(n),this.k(a),this._$AH=o}}_$AC(t){let s=xe.get(t.strings);return s===void 0&&xe.set(t.strings,s=new q(t)),s}S(t){ws(this._$AH)||(this._$AH=[],this._$AR());const s=this._$AH;let n,r=0;for(const i of t)r===s.length?s.push(n=new G(this.M(W()),this.M(W()),this,this.options)):n=s[r],n._$AI(i),r++;r<s.length&&(this._$AR(n&&n._$AB.nextSibling,r),s.length=r)}_$AR(t=this._$AA.nextSibling,s){var n;for((n=this._$AP)===null||n===void 0||n.call(this,!1,!0,s);t&&t!==this._$AB;){const r=t.nextSibling;t.remove(),t=r}}setConnected(t){var s;this._$AM===void 0&&(this._$Cg=t,(s=this._$AP)===null||s===void 0||s.call(this,t))}}class gt{constructor(t,s,n,r,i){this.type=1,this._$AH=f,this._$AN=void 0,this.element=t,this.name=s,this._$AM=r,this.options=i,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=f}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,s=this,n,r){const i=this.strings;let o=!1;if(i===void 0)t=k(this,t,s,0),o=!Z(t)||t!==this._$AH&&t!==U,o&&(this._$AH=t);else{const a=t;let c,l;for(t=i[0],c=0;c<i.length-1;c++)l=k(this,a[n+c],s,c),l===U&&(l=this._$AH[c]),o||(o=!Z(l)||l!==this._$AH[c]),l===f?t=f:t!==f&&(t+=(l!=null?l:"")+i[c+1]),this._$AH[c]=l}o&&!r&&this.C(t)}C(t){t===f?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t!=null?t:"")}}class ti extends gt{constructor(){super(...arguments),this.type=3}C(t){this.element[this.name]=t===f?void 0:t}}const ei=x?x.emptyScript:"";class si extends gt{constructor(){super(...arguments),this.type=4}C(t){t&&t!==f?this.element.setAttribute(this.name,ei):this.element.removeAttribute(this.name)}}class ni extends gt{constructor(t,s,n,r,i){super(t,s,n,r,i),this.type=5}_$AI(t,s=this){var n;if((t=(n=k(this,t,s,0))!==null&&n!==void 0?n:f)===U)return;const r=this._$AH,i=t===f&&r!==f||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,o=t!==f&&(r===f||i);i&&this.element.removeEventListener(this.name,this,r),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var s,n;typeof this._$AH=="function"?this._$AH.call((n=(s=this.options)===null||s===void 0?void 0:s.host)!==null&&n!==void 0?n:this.element,t):this._$AH.handleEvent(t)}}class ri{constructor(t,s,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=s,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){k(this,t)}}const Ne=window.litHtmlPolyfillSupport;Ne==null||Ne(q,G),((Pt=globalThis.litHtmlVersions)!==null&&Pt!==void 0?Pt:globalThis.litHtmlVersions=[]).push("2.2.2");/**
14
+ * @license
15
+ * Copyright 2017 Google LLC
16
+ * SPDX-License-Identifier: BSD-3-Clause
17
+ */const ii={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6};class oi{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,s,n){this._$Ct=t,this._$AM=s,this._$Ci=n}_$AS(t,s){return this.update(t,s)}update(t,s){return this.render(...s)}}/**
18
+ * @license
19
+ * Copyright 2017 Google LLC
20
+ * SPDX-License-Identifier: BSD-3-Clause
21
+ */class Ue extends oi{constructor(t){if(super(t),this.it=f,t.type!==ii.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===f||t==null)return this.ft=void 0,this.it=t;if(t===U)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this.ft;this.it=t;const s=[t];return s.raw=s,this.ft={_$litType$:this.constructor.resultType,strings:s,values:[]}}}Ue.directiveName="unsafeHTML",Ue.resultType=1;const y=(...e)=>{const t=_("LitStatic");return(t?t.html:Jr)(...e)},mt=(e,t,s,n,{host:r}={})=>{const i=_("OpenUI5Enablement");i&&!n&&(e=i.wrapTemplateResultInBusyMarkup(y,r,e)),typeof s=="string"?e=y`<style>${s}</style>${e}`:Array.isArray(s)&&s.length&&(e=y`${s.map(o=>y`<link type="text/css" rel="stylesheet" href="${o}">`)}${e}`),Xr(e,t,{host:r})},ai={tag:"ui5-test-generic",properties:{strProp:{type:String},boolProp:{type:Boolean},objectProp:{type:Object},noAttributeProp:{type:String,noAttribute:!0},multiProp:{type:String,multiple:!0},defaultValueProp:{type:String,defaultValue:"Hello"}},managedSlots:!0,slots:{default:{type:Node},other:{type:HTMLElement},individual:{type:HTMLElement,individualSlots:!0},named:{type:HTMLElement,propertyName:"items"}}};class As extends L{static get metadata(){return ai}static get render(){return mt}static get template(){return t=>y`<div><p>
22
+ <slot></slot>
23
+ <slot name="other"></slot>
24
+ <slot name="individual-1"></slot>
25
+ <slot name="individual-2"></slot>
26
+ </p></div>`}static get styles(){return`:host {
27
+ display: inline-block;
28
+ border: 1px solid black;
29
+ color: var(--var1);
30
+ }`}onBeforeRendering(){}onAfterRendering(){}onEnterDOM(){}onExitDOM(){}}As.define();const ci={tag:"ui5-test-no-shadow"};class li extends L{static get metadata(){return ci}}li.define();const ui={tag:"ui5-test-parent",managedSlots:!0,slots:{default:{type:Node,invalidateOnChildChange:{properties:["prop1"]}},items:{type:HTMLElement,invalidateOnChildChange:{properties:!0}}}};class di extends L{static get metadata(){return ui}static get render(){return mt}static get template(){return t=>y`<div>
31
+ <slot></slot>
32
+ </div>`}}di.define();const hi={tag:"ui5-test-child",properties:{prop1:{type:String},prop2:{type:String},prop3:{type:String}}};class fi extends L{static get metadata(){return hi}static get render(){return mt}static get template(){return t=>y`<div></div>`}}fi.define();const pi={tag:"ui5-with-static-area",properties:{staticContent:{type:Boolean}},slots:{}};class gi extends L{static get metadata(){return pi}static get render(){return mt}static get template(){return t=>y`
33
+ <div dir=${t.effectiveDir}>
34
+ WithStaticArea works!
35
+ </div>`}static get staticAreaTemplate(){return t=>y`
36
+ <div class="ui5-with-static-area-content">
37
+ Static area content.
38
+ </div>`}static get styles(){return`
39
+ :host {
40
+ display: inline-block;
41
+ border: 1px solid black;
42
+ color: red;
43
+ }`}async addStaticArea(){if(!this.staticContent)return;const t=await this.getStaticAreaItemDomRef();return this.responsivePopover=t.querySelector(".ui5-with-static-area-content"),this.responsivePopover}onBeforeRendering(){this.addStaticArea()}onAfterRendering(){}onEnterDOM(){}onExitDOM(){}}gi.define();const mi={tag:"ui5-test-generic-ext",properties:{extProp:{type:String},strProp:{defaultValue:"Ext"}},slots:{extSlot:{type:HTMLElement}}};class yi extends As{static get metadata(){return mi}}yi.define();const _i=":root{ --var1: red; }",wi=":root{ --var1: green; }",vi=":root{ --var1: blue; }",Ai=":root{ --var1: orange; }",Si=":root{ --var1: orange; }",bi=":root{ --var1: yellow; }",$i=":root{ --var1: yellow; }";b("@ui5/webcomponents-base-test","sap_fiori_3",()=>_i);b("@ui5/webcomponents-base-test","sap_fiori_3_dark",()=>wi);b("@ui5/webcomponents-base-test","sap_belize",()=>vi);b("@ui5/webcomponents-base-test","sap_belize_hcb",()=>Ai);b("@ui5/webcomponents-base-test","sap_belize_hcw",()=>Si);b("@ui5/webcomponents-base-test","sap_fiori_3_hcb",()=>bi);b("@ui5/webcomponents-base-test","sap_fiori_3_hcw",()=>$i);const Ci=/('')|'([^']+(?:''[^']*)*)(?:'|$)|\{([0-9]+(?:\s*,[^{}]*)?)\}|[{}]/g,Ei=(e,t)=>(t=t||[],e.replace(Ci,(s,n,r,i,o)=>{if(n)return"'";if(r)return r.replace(/''/g,"'");if(i)return String(t[parseInt(i)]);throw new Error(`[i18n]: pattern syntax error at pos ${o}`)})),It=new Map;class Ti{constructor(t){this.packageName=t}getText(t,...s){if(typeof t=="string"&&(t={key:t,defaultText:t}),!t||!t.key)return"";const n=_n(this.packageName);n&&!n[t.key]&&console.warn(`Key ${t.key} not found in the i18n bundle, the default text will be used`);const r=n&&n[t.key]?n[t.key]:t.defaultText||t.key;return s.length?Ei(r,s):r}}const Mi=e=>{if(It.has(e))return It.get(e);const t=new Ti(e);return It.set(e,t),t},Li=async e=>(await ts(e),Mi(e));let Dt;const Oi=()=>(Dt===void 0&&(Dt=Os()),Dt),Ss={Gregorian:"Gregorian",Islamic:"Islamic",Japanese:"Japanese",Buddhist:"Buddhist",Persian:"Persian"};class Wt extends F{static isValid(t){return!!Ss[t]}}Wt.generateTypeAccessors(Ss);let Y;const Pi=()=>(Y===void 0&&(Y=Ns()),Wt.isValid(Y)?Y:Wt.Gregorian);let Rt;const Ii=()=>(Rt===void 0&&(Rt=Us()),Rt.firstDayOfWeek),Di=new T,Ri="directionChange",xi=()=>Di.fireEvent(Ri),Ni=async()=>{const e=xi();await Promise.all(e),await Jt({rtlAware:!0})};window.registerThemePropertiesLoader=b;window["sap-ui-webcomponents-bundle"]={configuration:{getAnimationMode:Oi,getLanguage:ot,getTheme:pt,setTheme:cs,getNoConflict:te,setNoConflict:Vr,getCalendarType:Pi,getRTL:ms,getFirstDayOfWeek:Ii},getIconNames:Kn,registerI18nLoader:yn,getI18nBundle:Li,renderFinished:Kt,applyDirection:Ni,EventProvider:T};
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Supported icon collection names and aliases.
3
+ *
4
+ * Users might specify a collection, using both the key and the value in the following key-value pairs,
5
+ * e.g the following pairs are completely exchangeable:
6
+ * "SAP-icons-TNT/actor" and "tnt/actor", "BusinessSuiteInAppSymbols/3d" and "business-suite/3d",
7
+ * "SAP-icons-v5/accept" and "horizon/accept".
8
+ *
9
+ * Note: technically, in the code we maintain the collections under the "value" name - "tnt", "business-suite",
10
+ * SAP-icons-v5" and "SAP-icons"(which does not have an alias).
11
+ */
12
+ const IconCollectionsAlias = {
13
+ "SAP-icons-TNT": "tnt",
14
+ "BusinessSuiteInAppSymbols": "business-suite",
15
+ "horizon": "SAP-icons-v5",
16
+ };
17
+
18
+ export default IconCollectionsAlias;
@@ -1,4 +1,5 @@
1
1
  import { getAnimationMode as getConfiguredAnimationMode } from "../InitialConfiguration.js";
2
+ import AnimationMode from "../types/AnimationMode.js";
2
3
 
3
4
  let animationMode;
4
5
 
@@ -10,4 +11,13 @@ const getAnimationMode = () => {
10
11
  return animationMode;
11
12
  };
12
13
 
13
- export { getAnimationMode }; // eslint-disable-line
14
+ const setAnimationMode = newAnimationMode => {
15
+ if (Object.values(AnimationMode).includes(newAnimationMode)) {
16
+ animationMode = newAnimationMode;
17
+ }
18
+ };
19
+
20
+ export {
21
+ getAnimationMode,
22
+ setAnimationMode,
23
+ };
@@ -0,0 +1,52 @@
1
+ import { getTheme, isThemeFamily } from "./Theme.js";
2
+
3
+ const IconCollectionConfiguration = new Map();
4
+
5
+ /**
6
+ * Sets the default icon collection (v4 or v5) per theme,
7
+ * which will be applied in case icon collection is not specified.
8
+ *
9
+ * Note: by default SAP-icons-v5 is used in SAP Horizon and SAP-icons-v4 for all the rest.
10
+ * @param {String} theme
11
+ * @param {String} collectionName
12
+ */
13
+ const setDefaultIconCollection = (theme, collectionName) => {
14
+ if (collectionName === "horizon") {
15
+ collectionName = "SAP-icons-v5";
16
+ }
17
+
18
+ IconCollectionConfiguration.set(theme, collectionName);
19
+ };
20
+
21
+ /**
22
+ * Returns the default icon collection (v4 or v5) for given theme,
23
+ * that is configured.
24
+ *
25
+ * @param {String} theme
26
+ * @returns {String}
27
+ */
28
+ const getDefaultIconCollection = theme => {
29
+ return IconCollectionConfiguration.get(theme);
30
+ };
31
+
32
+ /**
33
+ * Returns the effective icon collection that will be applied for icon web components
34
+ * whenever namespace is not specified.
35
+ * @returns {String}
36
+ */
37
+ const getEffectiveDefaultIconCollection = () => {
38
+ const currentTheme = getTheme();
39
+ const currentThemeConfiguration = IconCollectionConfiguration.get(currentTheme);
40
+
41
+ if (currentThemeConfiguration) {
42
+ return currentThemeConfiguration;
43
+ }
44
+
45
+ return isThemeFamily("sap_horizon") ? "SAP-icons-v5" : "SAP-icons";
46
+ };
47
+
48
+ export {
49
+ setDefaultIconCollection,
50
+ getDefaultIconCollection,
51
+ getEffectiveDefaultIconCollection,
52
+ };
@@ -1,8 +1,12 @@
1
- import { getLanguage as getConfiguredLanguage } from "../InitialConfiguration.js";
1
+ import {
2
+ getLanguage as getConfiguredLanguage,
3
+ getFetchDefaultLanguage as getConfiguredFetchDefaultLanguage,
4
+ } from "../InitialConfiguration.js";
2
5
  import { fireLanguageChange } from "../locale/languageChange.js";
3
- import RenderScheduler from "../RenderScheduler.js";
6
+ import { reRenderAllUI5Elements } from "../Render.js";
4
7
 
5
8
  let language;
9
+ let fetchDefaultLanguage;
6
10
 
7
11
  /**
8
12
  * Returns the currently configured language, or the browser language as a fallback
@@ -29,13 +33,36 @@ const setLanguage = async newLanguage => {
29
33
 
30
34
  language = newLanguage;
31
35
 
32
- const listenersResults = fireLanguageChange(newLanguage);
33
- await Promise.all(listenersResults);
34
- RenderScheduler.reRenderAllUI5Elements({ languageAware: true });
35
- return RenderScheduler.whenFinished();
36
+ await fireLanguageChange(newLanguage);
37
+ await reRenderAllUI5Elements({ languageAware: true });
38
+ };
39
+
40
+ /**
41
+ * Defines if the default language, that is inlined, should be
42
+ * fetched over the network instead of using the inlined one.
43
+ * <b>Note:</b> By default the language will not be fetched.
44
+ *
45
+ * @param {Boolean} fetchDefaultLanguage
46
+ */
47
+ const setFetchDefaultLanguage = fetchDefaultLang => {
48
+ fetchDefaultLanguage = fetchDefaultLang;
49
+ };
50
+
51
+ /**
52
+ * Returns if the default language, that is inlined, should be fetched over the network.
53
+ * @returns {Boolean}
54
+ */
55
+ const getFetchDefaultLanguage = () => {
56
+ if (fetchDefaultLanguage === undefined) {
57
+ setFetchDefaultLanguage(getConfiguredFetchDefaultLanguage());
58
+ }
59
+
60
+ return fetchDefaultLanguage;
36
61
  };
37
62
 
38
63
  export {
39
64
  getLanguage,
40
65
  setLanguage,
66
+ setFetchDefaultLanguage,
67
+ getFetchDefaultLanguage,
41
68
  };
@@ -1,4 +1,5 @@
1
1
  import { getTheme as getConfiguredTheme } from "../InitialConfiguration.js";
2
+ import { reRenderAllUI5Elements } from "../Render.js";
2
3
  import applyTheme from "../theming/applyTheme.js";
3
4
 
4
5
  let theme;
@@ -20,9 +21,33 @@ const setTheme = async newTheme => {
20
21
 
21
22
  // Update CSS Custom Properties
22
23
  await applyTheme(theme);
24
+ await reRenderAllUI5Elements({ themeAware: true });
25
+ };
26
+
27
+ /**
28
+ * Returns if the given theme name is the one currently applied.
29
+ * @private
30
+ * @param {String}
31
+ * @returns {boolean}
32
+ */
33
+ const isTheme = _theme => {
34
+ const currentTheme = getTheme();
35
+ return currentTheme === _theme || currentTheme === `${_theme}_exp`;
36
+ };
37
+
38
+ /**
39
+ * Returns if the current theme is part of given theme family
40
+ * @private
41
+ * @param {String} the theme family
42
+ * @returns {boolean}
43
+ */
44
+ const isThemeFamily = _theme => {
45
+ return getTheme().startsWith(_theme);
23
46
  };
24
47
 
25
48
  export {
26
49
  getTheme,
27
50
  setTheme,
51
+ isTheme,
52
+ isThemeFamily,
28
53
  };