@adobe/react-native-aepmessaging 7.2.1 → 7.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (293) hide show
  1. package/RCTAEPMessaging.podspec +1 -1
  2. package/README.md +145 -16
  3. package/android/src/main/java/com/adobe/marketing/mobile/reactnative/messaging/RCTAEPMessagingConstants.java +3 -0
  4. package/android/src/main/java/com/adobe/marketing/mobile/reactnative/messaging/RCTAEPMessagingModule.java +103 -33
  5. package/babel.config.js +3 -0
  6. package/dist/module/Messaging.js +334 -0
  7. package/dist/module/Messaging.js.map +1 -0
  8. package/dist/module/index.js +30 -0
  9. package/dist/module/index.js.map +1 -0
  10. package/dist/module/models/ContentCard.js +24 -0
  11. package/dist/module/models/ContentCard.js.map +1 -0
  12. package/dist/{models → module/models}/HTMLProposition.js +8 -9
  13. package/dist/module/models/HTMLProposition.js.map +1 -0
  14. package/dist/module/models/InAppMessage.js +4 -0
  15. package/dist/module/models/InAppMessage.js.map +1 -0
  16. package/dist/module/models/JSONProposition.js +22 -0
  17. package/dist/module/models/JSONProposition.js.map +1 -0
  18. package/dist/module/models/Message.js +182 -0
  19. package/dist/module/models/Message.js.map +1 -0
  20. package/dist/module/models/MessagingDelegate.js +4 -0
  21. package/dist/module/models/MessagingDelegate.js.map +1 -0
  22. package/dist/module/models/MessagingEdgeEventType.js +24 -0
  23. package/dist/module/models/MessagingEdgeEventType.js.map +1 -0
  24. package/dist/module/models/MessagingProposition.js +57 -0
  25. package/dist/module/models/MessagingProposition.js.map +1 -0
  26. package/dist/module/models/MessagingPropositionItem.js +4 -0
  27. package/dist/module/models/MessagingPropositionItem.js.map +1 -0
  28. package/dist/module/models/PersonalizationSchema.js +26 -0
  29. package/dist/module/models/PersonalizationSchema.js.map +1 -0
  30. package/dist/module/models/PropositionItem.js +113 -0
  31. package/dist/module/models/PropositionItem.js.map +1 -0
  32. package/dist/module/models/ScopeDetails.js +2 -0
  33. package/dist/module/models/ScopeDetails.js.map +1 -0
  34. package/dist/{models/JSONProposition.js → module/models/index.js} +14 -12
  35. package/dist/module/models/index.js.map +1 -0
  36. package/dist/module/ui/components/Button/Button.js +57 -0
  37. package/dist/module/ui/components/Button/Button.js.map +1 -0
  38. package/dist/module/ui/components/Button/Button.spec.js +476 -0
  39. package/dist/module/ui/components/Button/Button.spec.js.map +1 -0
  40. package/dist/module/ui/components/ContentCardView/ContentCardView.js +257 -0
  41. package/dist/module/ui/components/ContentCardView/ContentCardView.js.map +1 -0
  42. package/dist/module/ui/components/ContentCardView/ContentCardView.spec.js +363 -0
  43. package/dist/module/ui/components/ContentCardView/ContentCardView.spec.js.map +1 -0
  44. package/dist/module/ui/components/DismissButton/DismissButton.js +70 -0
  45. package/dist/module/ui/components/DismissButton/DismissButton.js.map +1 -0
  46. package/dist/module/ui/components/DismissButton/DismissButton.spec.js +279 -0
  47. package/dist/module/ui/components/DismissButton/DismissButton.spec.js.map +1 -0
  48. package/dist/module/ui/components/FullScreenCenterView/FullScreenCenterView.js +34 -0
  49. package/dist/module/ui/components/FullScreenCenterView/FullScreenCenterView.js.map +1 -0
  50. package/dist/module/ui/components/Inbox/EmptyState.js +64 -0
  51. package/dist/module/ui/components/Inbox/EmptyState.js.map +1 -0
  52. package/dist/module/ui/components/Inbox/Inbox.js +235 -0
  53. package/dist/module/ui/components/Inbox/Inbox.js.map +1 -0
  54. package/dist/module/ui/components/Inbox/Inbox.spec.js +847 -0
  55. package/dist/module/ui/components/Inbox/Inbox.spec.js.map +1 -0
  56. package/dist/module/ui/components/Pagination/Pagination.js +176 -0
  57. package/dist/module/ui/components/Pagination/Pagination.js.map +1 -0
  58. package/dist/module/ui/components/Pagination/Pagination.spec.js +193 -0
  59. package/dist/module/ui/components/Pagination/Pagination.spec.js.map +1 -0
  60. package/dist/module/ui/components/UnreadIcon/UnreadIcon.js +184 -0
  61. package/dist/module/ui/components/UnreadIcon/UnreadIcon.js.map +1 -0
  62. package/dist/module/ui/components/UnreadIcon/UnreadIcon.spec.js +815 -0
  63. package/dist/module/ui/components/UnreadIcon/UnreadIcon.spec.js.map +1 -0
  64. package/dist/{models/ContentCard.js → module/ui/components/index.js} +12 -12
  65. package/dist/module/ui/components/index.js.map +1 -0
  66. package/dist/module/ui/hooks/index.js +18 -0
  67. package/dist/module/ui/hooks/index.js.map +1 -0
  68. package/dist/module/ui/hooks/useAspectRatio.js +33 -0
  69. package/dist/module/ui/hooks/useAspectRatio.js.map +1 -0
  70. package/dist/module/ui/hooks/useAspectRatio.spec.js +65 -0
  71. package/dist/module/ui/hooks/useAspectRatio.spec.js.map +1 -0
  72. package/dist/module/ui/hooks/useContentCardUI.js +51 -0
  73. package/dist/module/ui/hooks/useContentCardUI.js.map +1 -0
  74. package/dist/module/ui/hooks/useContentCardUI.spec.js +85 -0
  75. package/dist/module/ui/hooks/useContentCardUI.spec.js.map +1 -0
  76. package/dist/module/ui/hooks/useInbox.js +49 -0
  77. package/dist/module/ui/hooks/useInbox.js.map +1 -0
  78. package/dist/module/ui/hooks/useInbox.spec.js +93 -0
  79. package/dist/module/ui/hooks/useInbox.spec.js.map +1 -0
  80. package/dist/module/ui/hooks/useInboxSettings.js +26 -0
  81. package/dist/module/ui/hooks/useInboxSettings.js.map +1 -0
  82. package/dist/module/ui/hooks/useInboxSettings.spec.js +50 -0
  83. package/dist/module/ui/hooks/useInboxSettings.spec.js.map +1 -0
  84. package/dist/module/ui/index.js +10 -0
  85. package/dist/module/ui/index.js.map +1 -0
  86. package/dist/module/ui/providers/InboxProvider.js +27 -0
  87. package/dist/module/ui/providers/InboxProvider.js.map +1 -0
  88. package/dist/module/ui/theme/Theme.js +2 -0
  89. package/dist/module/ui/theme/Theme.js.map +1 -0
  90. package/dist/module/ui/theme/ThemeProvider.js +112 -0
  91. package/dist/module/ui/theme/ThemeProvider.js.map +1 -0
  92. package/dist/{models/InAppMessage.js → module/ui/theme/index.js} +6 -3
  93. package/dist/module/ui/theme/index.js.map +1 -0
  94. package/dist/module/ui/types/ContentViewEvent.js +2 -0
  95. package/dist/module/ui/types/ContentViewEvent.js.map +1 -0
  96. package/dist/module/ui/types/Templates.js +26 -0
  97. package/dist/module/ui/types/Templates.js.map +1 -0
  98. package/dist/{models/ScopeDetails.js → module/ui/types/index.js} +6 -3
  99. package/dist/module/ui/types/index.js.map +1 -0
  100. package/dist/module/ui/utils/generateCardHash.js +50 -0
  101. package/dist/module/ui/utils/generateCardHash.js.map +1 -0
  102. package/dist/module/ui/utils/generateCardHash.spec.js +103 -0
  103. package/dist/module/ui/utils/generateCardHash.spec.js.map +1 -0
  104. package/dist/module/ui/utils/inboxStorage.js +65 -0
  105. package/dist/module/ui/utils/inboxStorage.js.map +1 -0
  106. package/dist/module/ui/utils/inboxStorage.spec.js +123 -0
  107. package/dist/module/ui/utils/inboxStorage.spec.js.map +1 -0
  108. package/dist/module/ui/utils/index.js +5 -0
  109. package/dist/module/ui/utils/index.js.map +1 -0
  110. package/dist/{Messaging.d.ts → typescript/Messaging.d.ts} +23 -7
  111. package/dist/typescript/Messaging.d.ts.map +1 -0
  112. package/dist/{index.d.ts → typescript/index.d.ts} +4 -2
  113. package/dist/typescript/index.d.ts.map +1 -0
  114. package/dist/typescript/models/ContentCard.d.ts +57 -0
  115. package/dist/typescript/models/ContentCard.d.ts.map +1 -0
  116. package/dist/{models → typescript/models}/HTMLProposition.d.ts +1 -0
  117. package/dist/typescript/models/HTMLProposition.d.ts.map +1 -0
  118. package/dist/{models → typescript/models}/InAppMessage.d.ts +1 -0
  119. package/dist/typescript/models/InAppMessage.d.ts.map +1 -0
  120. package/dist/{models → typescript/models}/JSONProposition.d.ts +1 -0
  121. package/dist/typescript/models/JSONProposition.d.ts.map +1 -0
  122. package/dist/{models → typescript/models}/Message.d.ts +14 -0
  123. package/dist/typescript/models/Message.d.ts.map +1 -0
  124. package/dist/{models → typescript/models}/MessagingDelegate.d.ts +1 -0
  125. package/dist/typescript/models/MessagingDelegate.d.ts.map +1 -0
  126. package/dist/{models → typescript/models}/MessagingEdgeEventType.d.ts +1 -0
  127. package/dist/typescript/models/MessagingEdgeEventType.d.ts.map +1 -0
  128. package/dist/{models → typescript/models}/MessagingProposition.d.ts +1 -0
  129. package/dist/typescript/models/MessagingProposition.d.ts.map +1 -0
  130. package/dist/{models → typescript/models}/MessagingPropositionItem.d.ts +1 -0
  131. package/dist/typescript/models/MessagingPropositionItem.d.ts.map +1 -0
  132. package/dist/{models → typescript/models}/PersonalizationSchema.d.ts +2 -0
  133. package/dist/typescript/models/PersonalizationSchema.d.ts.map +1 -0
  134. package/dist/{models → typescript/models}/PropositionItem.d.ts +1 -0
  135. package/dist/typescript/models/PropositionItem.d.ts.map +1 -0
  136. package/dist/{models → typescript/models}/ScopeDetails.d.ts +1 -0
  137. package/dist/typescript/models/ScopeDetails.d.ts.map +1 -0
  138. package/dist/typescript/models/index.d.ts +11 -0
  139. package/dist/typescript/models/index.d.ts.map +1 -0
  140. package/dist/typescript/ui/components/Button/Button.d.ts +14 -0
  141. package/dist/typescript/ui/components/Button/Button.d.ts.map +1 -0
  142. package/dist/typescript/ui/components/Button/Button.spec.d.ts +2 -0
  143. package/dist/typescript/ui/components/Button/Button.spec.d.ts.map +1 -0
  144. package/dist/typescript/ui/components/ContentCardView/ContentCardView.d.ts +39 -0
  145. package/dist/typescript/ui/components/ContentCardView/ContentCardView.d.ts.map +1 -0
  146. package/dist/typescript/ui/components/ContentCardView/ContentCardView.spec.d.ts +2 -0
  147. package/dist/typescript/ui/components/ContentCardView/ContentCardView.spec.d.ts.map +1 -0
  148. package/dist/typescript/ui/components/DismissButton/DismissButton.d.ts +13 -0
  149. package/dist/typescript/ui/components/DismissButton/DismissButton.d.ts.map +1 -0
  150. package/dist/typescript/ui/components/DismissButton/DismissButton.spec.d.ts +2 -0
  151. package/dist/typescript/ui/components/DismissButton/DismissButton.spec.d.ts.map +1 -0
  152. package/dist/typescript/ui/components/FullScreenCenterView/FullScreenCenterView.d.ts +5 -0
  153. package/dist/typescript/ui/components/FullScreenCenterView/FullScreenCenterView.d.ts.map +1 -0
  154. package/dist/typescript/ui/components/Inbox/EmptyState.d.ts +19 -0
  155. package/dist/typescript/ui/components/Inbox/EmptyState.d.ts.map +1 -0
  156. package/dist/typescript/ui/components/Inbox/Inbox.d.ts +21 -0
  157. package/dist/typescript/ui/components/Inbox/Inbox.d.ts.map +1 -0
  158. package/dist/typescript/ui/components/Inbox/Inbox.spec.d.ts +2 -0
  159. package/dist/typescript/ui/components/Inbox/Inbox.spec.d.ts.map +1 -0
  160. package/dist/typescript/ui/components/Pagination/Pagination.d.ts +14 -0
  161. package/dist/typescript/ui/components/Pagination/Pagination.d.ts.map +1 -0
  162. package/dist/typescript/ui/components/Pagination/Pagination.spec.d.ts +2 -0
  163. package/dist/typescript/ui/components/Pagination/Pagination.spec.d.ts.map +1 -0
  164. package/dist/typescript/ui/components/UnreadIcon/UnreadIcon.d.ts +14 -0
  165. package/dist/typescript/ui/components/UnreadIcon/UnreadIcon.d.ts.map +1 -0
  166. package/dist/typescript/ui/components/UnreadIcon/UnreadIcon.spec.d.ts +2 -0
  167. package/dist/typescript/ui/components/UnreadIcon/UnreadIcon.spec.d.ts.map +1 -0
  168. package/dist/typescript/ui/components/index.d.ts +10 -0
  169. package/dist/typescript/ui/components/index.d.ts.map +1 -0
  170. package/dist/typescript/ui/hooks/index.d.ts +4 -0
  171. package/dist/typescript/ui/hooks/index.d.ts.map +1 -0
  172. package/dist/typescript/ui/hooks/useAspectRatio.d.ts +3 -0
  173. package/dist/typescript/ui/hooks/useAspectRatio.d.ts.map +1 -0
  174. package/dist/typescript/ui/hooks/useAspectRatio.spec.d.ts +2 -0
  175. package/dist/typescript/ui/hooks/useAspectRatio.spec.d.ts.map +1 -0
  176. package/dist/typescript/ui/hooks/useContentCardUI.d.ts +14 -0
  177. package/dist/typescript/ui/hooks/useContentCardUI.d.ts.map +1 -0
  178. package/dist/typescript/ui/hooks/useContentCardUI.spec.d.ts +2 -0
  179. package/dist/typescript/ui/hooks/useContentCardUI.spec.d.ts.map +1 -0
  180. package/dist/typescript/ui/hooks/useInbox.d.ts +12 -0
  181. package/dist/typescript/ui/hooks/useInbox.d.ts.map +1 -0
  182. package/dist/typescript/ui/hooks/useInbox.spec.d.ts +2 -0
  183. package/dist/typescript/ui/hooks/useInbox.spec.d.ts.map +1 -0
  184. package/dist/typescript/ui/hooks/useInboxSettings.d.ts +7 -0
  185. package/dist/typescript/ui/hooks/useInboxSettings.d.ts.map +1 -0
  186. package/dist/typescript/ui/hooks/useInboxSettings.spec.d.ts +2 -0
  187. package/dist/typescript/ui/hooks/useInboxSettings.spec.d.ts.map +1 -0
  188. package/dist/typescript/ui/index.d.ts +8 -0
  189. package/dist/typescript/ui/index.d.ts.map +1 -0
  190. package/dist/typescript/ui/providers/InboxProvider.d.ts +56 -0
  191. package/dist/typescript/ui/providers/InboxProvider.d.ts.map +1 -0
  192. package/dist/typescript/ui/theme/Theme.d.ts +44 -0
  193. package/dist/typescript/ui/theme/Theme.d.ts.map +1 -0
  194. package/dist/typescript/ui/theme/ThemeProvider.d.ts +21 -0
  195. package/dist/typescript/ui/theme/ThemeProvider.d.ts.map +1 -0
  196. package/dist/typescript/ui/theme/index.d.ts +3 -0
  197. package/dist/typescript/ui/theme/index.d.ts.map +1 -0
  198. package/dist/typescript/ui/types/ContentViewEvent.d.ts +9 -0
  199. package/dist/typescript/ui/types/ContentViewEvent.d.ts.map +1 -0
  200. package/dist/typescript/ui/types/Templates.d.ts +43 -0
  201. package/dist/typescript/ui/types/Templates.d.ts.map +1 -0
  202. package/dist/typescript/ui/types/index.d.ts +3 -0
  203. package/dist/typescript/ui/types/index.d.ts.map +1 -0
  204. package/dist/typescript/ui/utils/generateCardHash.d.ts +21 -0
  205. package/dist/typescript/ui/utils/generateCardHash.d.ts.map +1 -0
  206. package/dist/typescript/ui/utils/generateCardHash.spec.d.ts +2 -0
  207. package/dist/typescript/ui/utils/generateCardHash.spec.d.ts.map +1 -0
  208. package/dist/typescript/ui/utils/inboxStorage.d.ts +20 -0
  209. package/dist/typescript/ui/utils/inboxStorage.d.ts.map +1 -0
  210. package/dist/typescript/ui/utils/inboxStorage.spec.d.ts +2 -0
  211. package/dist/typescript/ui/utils/inboxStorage.spec.d.ts.map +1 -0
  212. package/dist/typescript/ui/utils/index.d.ts +3 -0
  213. package/dist/typescript/ui/utils/index.d.ts.map +1 -0
  214. package/ios/src/RCTAEPMessaging.mm +15 -0
  215. package/ios/src/RCTAEPMessaging.swift +61 -3
  216. package/ios/src/RCTAEPMessagingConstants.swift +4 -1
  217. package/jest.config.js +15 -0
  218. package/package.json +33 -5
  219. package/src/Messaging.ts +288 -32
  220. package/src/index.ts +3 -3
  221. package/src/models/ContentCard.ts +52 -27
  222. package/src/models/HTMLProposition.ts +1 -1
  223. package/src/models/JSONProposition.ts +1 -1
  224. package/src/models/Message.ts +50 -0
  225. package/src/models/PersonalizationSchema.ts +1 -0
  226. package/src/models/index.ts +22 -0
  227. package/src/ui/components/Button/Button.spec.tsx +496 -0
  228. package/src/ui/components/Button/Button.tsx +76 -0
  229. package/src/ui/components/ContentCardView/ContentCardView.spec.tsx +278 -0
  230. package/src/ui/components/ContentCardView/ContentCardView.tsx +400 -0
  231. package/src/ui/components/DismissButton/DismissButton.spec.tsx +314 -0
  232. package/src/ui/components/DismissButton/DismissButton.tsx +100 -0
  233. package/src/ui/components/FullScreenCenterView/FullScreenCenterView.tsx +32 -0
  234. package/src/ui/components/Inbox/EmptyState.tsx +89 -0
  235. package/src/ui/components/Inbox/Inbox.spec.tsx +478 -0
  236. package/src/ui/components/Inbox/Inbox.tsx +275 -0
  237. package/src/ui/components/Pagination/Pagination.spec.tsx +159 -0
  238. package/src/ui/components/Pagination/Pagination.tsx +222 -0
  239. package/src/ui/components/UnreadIcon/UnreadIcon.spec.tsx +878 -0
  240. package/src/ui/components/UnreadIcon/UnreadIcon.tsx +234 -0
  241. package/src/ui/components/index.ts +22 -0
  242. package/{dist/models/MessagingPropositionItem.js → src/ui/hooks/index.ts} +5 -4
  243. package/src/ui/hooks/useAspectRatio.spec.tsx +66 -0
  244. package/src/ui/hooks/useAspectRatio.tsx +39 -0
  245. package/src/ui/hooks/useContentCardUI.spec.tsx +82 -0
  246. package/src/ui/hooks/useContentCardUI.ts +48 -0
  247. package/src/ui/hooks/useInbox.spec.tsx +87 -0
  248. package/src/ui/hooks/useInbox.ts +46 -0
  249. package/src/ui/hooks/useInboxSettings.spec.tsx +41 -0
  250. package/src/ui/hooks/useInboxSettings.ts +24 -0
  251. package/src/ui/index.ts +7 -0
  252. package/src/ui/providers/InboxProvider.tsx +79 -0
  253. package/src/ui/theme/Theme.ts +57 -0
  254. package/src/ui/theme/ThemeProvider.tsx +120 -0
  255. package/src/ui/theme/index.ts +14 -0
  256. package/src/ui/types/ContentViewEvent.ts +20 -0
  257. package/src/ui/types/Templates.ts +77 -0
  258. package/src/ui/types/index.ts +14 -0
  259. package/src/ui/utils/generateCardHash.spec.tsx +86 -0
  260. package/src/ui/utils/generateCardHash.ts +59 -0
  261. package/src/ui/utils/inboxStorage.spec.tsx +136 -0
  262. package/src/ui/utils/inboxStorage.ts +64 -0
  263. package/src/ui/utils/index.ts +3 -0
  264. package/tutorials/ContentCardCustomizationGuide.md +661 -0
  265. package/tutorials/ContentCards.md +419 -0
  266. package/tutorials/In-App Messaging.md +31 -0
  267. package/tutorials/Inbox.md +515 -0
  268. package/tutorials/resources/image-only-template.png +0 -0
  269. package/tutorials/resources/large-image-template.png +0 -0
  270. package/tutorials/resources/small-image-template.png +0 -0
  271. package/dist/Messaging.js +0 -151
  272. package/dist/Messaging.js.map +0 -1
  273. package/dist/index.js +0 -34
  274. package/dist/index.js.map +0 -1
  275. package/dist/models/ContentCard.d.ts +0 -51
  276. package/dist/models/ContentCard.js.map +0 -1
  277. package/dist/models/HTMLProposition.js.map +0 -1
  278. package/dist/models/InAppMessage.js.map +0 -1
  279. package/dist/models/JSONProposition.js.map +0 -1
  280. package/dist/models/Message.js +0 -114
  281. package/dist/models/Message.js.map +0 -1
  282. package/dist/models/MessagingDelegate.js +0 -14
  283. package/dist/models/MessagingDelegate.js.map +0 -1
  284. package/dist/models/MessagingEdgeEventType.js +0 -24
  285. package/dist/models/MessagingEdgeEventType.js.map +0 -1
  286. package/dist/models/MessagingProposition.js +0 -59
  287. package/dist/models/MessagingProposition.js.map +0 -1
  288. package/dist/models/MessagingPropositionItem.js.map +0 -1
  289. package/dist/models/PersonalizationSchema.js +0 -25
  290. package/dist/models/PersonalizationSchema.js.map +0 -1
  291. package/dist/models/PropositionItem.js +0 -78
  292. package/dist/models/PropositionItem.js.map +0 -1
  293. package/dist/models/ScopeDetails.js.map +0 -1
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+
3
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
4
+ /*
5
+ Copyright 2026 Adobe. All rights reserved.
6
+ This file is licensed to you under the Apache License, Version 2.0 (the
7
+ "License"); you may not use this file except in compliance with the License.
8
+ You may obtain a copy of the License at
9
+ http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law
10
+ or agreed to in writing, software distributed under the License is
11
+ distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF
12
+ ANY KIND, either express or implied. See the License for the specific
13
+ language governing permissions and limitations under the License.
14
+ */
15
+ import { Pressable, StyleSheet, Text } from "react-native";
16
+ import { useTheme } from "../../theme/index.js";
17
+
18
+ /** Props for the DismissButton component. Extends the PressableProps from react-native. */
19
+
20
+ const DismissButton = ({
21
+ onPress,
22
+ type,
23
+ textStyle,
24
+ style,
25
+ ...props
26
+ }) => {
27
+ const {
28
+ colors
29
+ } = useTheme();
30
+ return /*#__PURE__*/React.createElement(Pressable, _extends({
31
+ accessibilityLabel: "Dismiss Button",
32
+ onPress: onPress,
33
+ style: state => [styles.container, type === "simple" && styles.simple, type === "circle" && [styles.circle, {
34
+ backgroundColor: `${colors.textPrimary}1A`
35
+ }], state.pressed && styles.pressed, typeof style === "function" ? style(state) : style]
36
+ }, props), /*#__PURE__*/React.createElement(Text, {
37
+ style: [styles.text, {
38
+ color: colors.textPrimary
39
+ }, textStyle]
40
+ }, '\u00D7'));
41
+ };
42
+ export default DismissButton;
43
+ const styles = StyleSheet.create({
44
+ container: {
45
+ position: "absolute",
46
+ top: 6,
47
+ right: 6,
48
+ justifyContent: "center",
49
+ alignItems: "center",
50
+ minWidth: 18,
51
+ minHeight: 18
52
+ },
53
+ pressed: {
54
+ opacity: 0.7
55
+ },
56
+ simple: {
57
+ backgroundColor: "transparent"
58
+ },
59
+ circle: {
60
+ borderRadius: 10,
61
+ width: 18,
62
+ height: 18
63
+ },
64
+ text: {
65
+ fontSize: 14,
66
+ fontWeight: "bold",
67
+ textAlign: "center"
68
+ }
69
+ });
70
+ //# sourceMappingURL=DismissButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Pressable","StyleSheet","Text","useTheme","DismissButton","onPress","type","textStyle","style","props","colors","React","createElement","_extends","accessibilityLabel","state","styles","container","simple","circle","backgroundColor","textPrimary","pressed","text","color","create","position","top","right","justifyContent","alignItems","minWidth","minHeight","opacity","borderRadius","width","height","fontSize","fontWeight","textAlign"],"sourceRoot":"../../../../../src","sources":["ui/components/DismissButton/DismissButton.tsx"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SACEA,SAAS,EAETC,UAAU,EACVC,IAAI,QAEC,cAAc;AACrB,SAASC,QAAQ,QAAQ,sBAAa;;AAEtC;;AAUA,MAAMC,aAAa,GAAGA,CAAC;EACrBC,OAAO;EACPC,IAAI;EACJC,SAAS;EACTC,KAAK;EACL,GAAGC;AACe,CAAC,KAAK;EACxB,MAAM;IAAEC;EAAO,CAAC,GAAGP,QAAQ,CAAC,CAAC;EAE7B,oBACEQ,KAAA,CAAAC,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":[]}
@@ -0,0 +1,279 @@
1
+ "use strict";
2
+
3
+ /*
4
+ Copyright 2026 Adobe. All rights reserved.
5
+ This file is licensed to you under the Apache License, Version 2.0 (the
6
+ "License"); you may not use this file except in compliance with the License.
7
+ You may obtain a copy of the License at
8
+ http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law
9
+ or agreed to in writing, software distributed under the License is
10
+ distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF
11
+ ANY KIND, either express or implied. See the License for the specific
12
+ language governing permissions and limitations under the License.
13
+ */
14
+ import { render, screen, fireEvent } from '@testing-library/react-native';
15
+ import { useColorScheme } from 'react-native';
16
+ import DismissButton from "./DismissButton.js";
17
+
18
+ // Mock useColorScheme
19
+ jest.mock('react-native/Libraries/Utilities/useColorScheme');
20
+ const mockUseColorScheme = useColorScheme;
21
+ describe('DismissButton', () => {
22
+ const mockOnPress = jest.fn();
23
+ beforeEach(() => {
24
+ jest.clearAllMocks();
25
+ mockUseColorScheme.mockReturnValue('light');
26
+ });
27
+ describe('Basic rendering', () => {
28
+ it('should render a dismiss button with type "simple"', () => {
29
+ render(/*#__PURE__*/React.createElement(DismissButton, {
30
+ onPress: mockOnPress,
31
+ type: "simple"
32
+ }));
33
+ const button = screen.getByText('\u00D7');
34
+ expect(button).toBeTruthy();
35
+ });
36
+ it('should render a dismiss button with type "circle"', () => {
37
+ render(/*#__PURE__*/React.createElement(DismissButton, {
38
+ onPress: mockOnPress,
39
+ type: "circle"
40
+ }));
41
+ const button = screen.getByText('\u00D7');
42
+ expect(button).toBeTruthy();
43
+ });
44
+ it('should display "×" as the button text', () => {
45
+ render(/*#__PURE__*/React.createElement(DismissButton, {
46
+ onPress: mockOnPress,
47
+ type: "simple"
48
+ }));
49
+ expect(screen.getByText('\u00D7')).toBeTruthy();
50
+ });
51
+ });
52
+ describe('Press handling', () => {
53
+ it('should call onPress when the button is pressed', () => {
54
+ render(/*#__PURE__*/React.createElement(DismissButton, {
55
+ onPress: mockOnPress,
56
+ type: "simple"
57
+ }));
58
+ const button = screen.getByText('\u00D7');
59
+ fireEvent.press(button);
60
+ expect(mockOnPress).toHaveBeenCalledTimes(1);
61
+ });
62
+ it('should call onPress multiple times when pressed multiple times', () => {
63
+ render(/*#__PURE__*/React.createElement(DismissButton, {
64
+ onPress: mockOnPress,
65
+ type: "circle"
66
+ }));
67
+ const button = screen.getByText('\u00D7');
68
+ fireEvent.press(button);
69
+ fireEvent.press(button);
70
+ fireEvent.press(button);
71
+ expect(mockOnPress).toHaveBeenCalledTimes(3);
72
+ });
73
+ });
74
+ describe('Color scheme handling', () => {
75
+ it('should apply light color scheme styles', () => {
76
+ mockUseColorScheme.mockReturnValue('light');
77
+ render(/*#__PURE__*/React.createElement(DismissButton, {
78
+ onPress: mockOnPress,
79
+ type: "simple"
80
+ }));
81
+ const text = screen.getByText('\u00D7');
82
+ expect(JSON.stringify(text.props.style)).toContain('#000000');
83
+ });
84
+ it('should apply dark color scheme styles', () => {
85
+ mockUseColorScheme.mockReturnValue('dark');
86
+ render(/*#__PURE__*/React.createElement(DismissButton, {
87
+ onPress: mockOnPress,
88
+ type: "simple"
89
+ }));
90
+ const text = screen.getByText('\u00D7');
91
+ expect(JSON.stringify(text.props.style)).toContain('#FFFFFF');
92
+ });
93
+ it('should apply correct background color for circle type in light mode', () => {
94
+ mockUseColorScheme.mockReturnValue('light');
95
+ const {
96
+ getByTestId
97
+ } = render(/*#__PURE__*/React.createElement(DismissButton, {
98
+ onPress: mockOnPress,
99
+ type: "circle",
100
+ testID: "dismiss-button"
101
+ }));
102
+ const button = getByTestId('dismiss-button');
103
+ const styles = JSON.stringify(button.props.style);
104
+ expect(styles).toContain('#0000001A');
105
+ });
106
+ it('should apply correct background color for circle type in dark mode', () => {
107
+ mockUseColorScheme.mockReturnValue('dark');
108
+ const {
109
+ getByTestId
110
+ } = render(/*#__PURE__*/React.createElement(DismissButton, {
111
+ onPress: mockOnPress,
112
+ type: "circle",
113
+ testID: "dismiss-button"
114
+ }));
115
+ const button = getByTestId('dismiss-button');
116
+ const styles = JSON.stringify(button.props.style);
117
+ expect(styles).toContain('#FFFFFF1A');
118
+ });
119
+ });
120
+ describe('Type variations', () => {
121
+ it('should apply simple type styles', () => {
122
+ const {
123
+ getByTestId
124
+ } = render(/*#__PURE__*/React.createElement(DismissButton, {
125
+ onPress: mockOnPress,
126
+ type: "simple",
127
+ testID: "dismiss-button"
128
+ }));
129
+ const button = getByTestId('dismiss-button');
130
+ expect(button.props.style).toEqual(expect.arrayContaining([expect.objectContaining({
131
+ backgroundColor: 'transparent'
132
+ })]));
133
+ });
134
+ it('should apply circle type styles', () => {
135
+ const {
136
+ getByTestId
137
+ } = render(/*#__PURE__*/React.createElement(DismissButton, {
138
+ onPress: mockOnPress,
139
+ type: "circle",
140
+ testID: "dismiss-button"
141
+ }));
142
+ const button = getByTestId('dismiss-button');
143
+ const styles = JSON.stringify(button.props.style);
144
+ expect(styles).toContain('"borderRadius":10');
145
+ expect(styles).toContain('"width":18');
146
+ expect(styles).toContain('"height":18');
147
+ });
148
+ });
149
+ describe('Custom props and styles', () => {
150
+ it('should accept and apply custom style props', () => {
151
+ const customStyle = {
152
+ opacity: 0.5
153
+ };
154
+ const {
155
+ getByTestId
156
+ } = render(/*#__PURE__*/React.createElement(DismissButton, {
157
+ onPress: mockOnPress,
158
+ type: "simple",
159
+ style: customStyle,
160
+ testID: "dismiss-button"
161
+ }));
162
+ const button = getByTestId('dismiss-button');
163
+ expect(button.props.style).toEqual(expect.arrayContaining([expect.objectContaining({
164
+ opacity: 0.5
165
+ })]));
166
+ });
167
+ it('should accept function-based style props', () => {
168
+ const styleFn = jest.fn().mockReturnValue({
169
+ opacity: 0.8
170
+ });
171
+ const {
172
+ getByTestId
173
+ } = render(/*#__PURE__*/React.createElement(DismissButton, {
174
+ onPress: mockOnPress,
175
+ type: "simple",
176
+ style: styleFn,
177
+ testID: "dismiss-button"
178
+ }));
179
+ expect(styleFn).toHaveBeenCalled();
180
+ const button = getByTestId('dismiss-button');
181
+ expect(button.props.style).toEqual(expect.arrayContaining([expect.objectContaining({
182
+ opacity: 0.8
183
+ })]));
184
+ });
185
+ it('should accept additional Pressable props', () => {
186
+ const {
187
+ getByTestId
188
+ } = render(/*#__PURE__*/React.createElement(DismissButton, {
189
+ onPress: mockOnPress,
190
+ type: "simple",
191
+ testID: "dismiss-button",
192
+ disabled: true,
193
+ accessibilityLabel: "Close button"
194
+ }));
195
+ const button = getByTestId('dismiss-button');
196
+ expect(button.props.accessibilityState?.disabled).toBe(true);
197
+ expect(button.props.accessibilityLabel).toBe('Close button');
198
+ });
199
+ });
200
+ describe('Accessibility', () => {
201
+ it('should be accessible by default', () => {
202
+ const {
203
+ getByTestId
204
+ } = render(/*#__PURE__*/React.createElement(DismissButton, {
205
+ onPress: mockOnPress,
206
+ type: "simple",
207
+ testID: "dismiss-button"
208
+ }));
209
+ const button = getByTestId('dismiss-button');
210
+ expect(button).toBeTruthy();
211
+ });
212
+ it('should accept custom accessibility props', () => {
213
+ const {
214
+ getByTestId
215
+ } = render(/*#__PURE__*/React.createElement(DismissButton, {
216
+ onPress: mockOnPress,
217
+ type: "simple",
218
+ testID: "dismiss-button",
219
+ accessibilityLabel: "Dismiss notification",
220
+ accessibilityHint: "Double tap to close this notification"
221
+ }));
222
+ const button = getByTestId('dismiss-button');
223
+ expect(button.props.accessibilityLabel).toBe('Dismiss notification');
224
+ expect(button.props.accessibilityHint).toBe('Double tap to close this notification');
225
+ });
226
+ });
227
+ describe('Positioning and layout', () => {
228
+ it('should have absolute positioning styles', () => {
229
+ const {
230
+ getByTestId
231
+ } = render(/*#__PURE__*/React.createElement(DismissButton, {
232
+ onPress: mockOnPress,
233
+ type: "simple",
234
+ testID: "dismiss-button"
235
+ }));
236
+ const button = getByTestId('dismiss-button');
237
+ expect(button.props.style).toEqual(expect.arrayContaining([expect.objectContaining({
238
+ position: 'absolute',
239
+ top: 6,
240
+ right: 6
241
+ })]));
242
+ });
243
+ it('should have minimum dimensions', () => {
244
+ const {
245
+ getByTestId
246
+ } = render(/*#__PURE__*/React.createElement(DismissButton, {
247
+ onPress: mockOnPress,
248
+ type: "simple",
249
+ testID: "dismiss-button"
250
+ }));
251
+ const button = getByTestId('dismiss-button');
252
+ expect(button.props.style).toEqual(expect.arrayContaining([expect.objectContaining({
253
+ minWidth: 18,
254
+ minHeight: 18
255
+ })]));
256
+ });
257
+ });
258
+ describe('Edge cases', () => {
259
+ it('should handle undefined color scheme gracefully', () => {
260
+ mockUseColorScheme.mockReturnValue(undefined);
261
+ expect(() => {
262
+ render(/*#__PURE__*/React.createElement(DismissButton, {
263
+ onPress: mockOnPress,
264
+ type: "simple"
265
+ }));
266
+ }).not.toThrow();
267
+ });
268
+ it('should handle null color scheme gracefully', () => {
269
+ mockUseColorScheme.mockReturnValue(null);
270
+ expect(() => {
271
+ render(/*#__PURE__*/React.createElement(DismissButton, {
272
+ onPress: mockOnPress,
273
+ type: "simple"
274
+ }));
275
+ }).not.toThrow();
276
+ });
277
+ });
278
+ });
279
+ //# sourceMappingURL=DismissButton.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["render","screen","fireEvent","useColorScheme","DismissButton","jest","mock","mockUseColorScheme","describe","mockOnPress","fn","beforeEach","clearAllMocks","mockReturnValue","it","React","createElement","onPress","type","button","getByText","expect","toBeTruthy","press","toHaveBeenCalledTimes","text","JSON","stringify","props","style","toContain","getByTestId","testID","styles","toEqual","arrayContaining","objectContaining","backgroundColor","customStyle","opacity","styleFn","toHaveBeenCalled","disabled","accessibilityLabel","accessibilityState","toBe","accessibilityHint","position","top","right","minWidth","minHeight","undefined","not","toThrow"],"sourceRoot":"../../../../../src","sources":["ui/components/DismissButton/DismissButton.spec.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,MAAM,EAAEC,MAAM,EAAEC,SAAS,QAAQ,+BAA+B;AACzE,SAASC,cAAc,QAAQ,cAAc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QAAQ;QACbc,MAAM,EAAC;MAAgB,CACxB,CACH,CAAC;MAED,MAAMb,MAAM,GAAGY,WAAW,CAAC,gBAAgB,CAAC;MAC5CV,MAAM,CAACF,MAAM,CAACS,KAAK,CAACC,KAAK,CAAC,CAACK,OAAO,CAChCb,MAAM,CAACc,eAAe,CAAC,CACrBd,MAAM,CAACe,gBAAgB,CAAC;QACtBc,QAAQ,EAAE,EAAE;QACZC,SAAS,EAAE;MACb,CAAC,CAAC,CACH,CACH,CAAC;IACH,CAAC,CAAC;EACJ,CAAC,CAAC;EAEF3C,QAAQ,CAAC,YAAY,EAAE,MAAM;IAC3BM,EAAE,CAAC,iDAAiD,EAAE,MAAM;MAC1DP,kBAAkB,CAACM,eAAe,CAACuC,SAAgB,CAAC;MAEpD/B,MAAM,CAAC,MAAM;QACXrB,MAAM,cAACe,KAAA,CAAAC,aAAA,CAACZ,aAAa;UAACa,OAAO,EAAER,WAAY;UAACS,IAAI,EAAC;QAAQ,CAAE,CAAC,CAAC;MAC/D,CAAC,CAAC,CAACmC,GAAG,CAACC,OAAO,CAAC,CAAC;IAClB,CAAC,CAAC;IAEFxC,EAAE,CAAC,4CAA4C,EAAE,MAAM;MACrDP,kBAAkB,CAACM,eAAe,CAAC,IAAW,CAAC;MAE/CQ,MAAM,CAAC,MAAM;QACXrB,MAAM,cAACe,KAAA,CAAAC,aAAA,CAACZ,aAAa;UAACa,OAAO,EAAER,WAAY;UAACS,IAAI,EAAC;QAAQ,CAAE,CAAC,CAAC;MAC/D,CAAC,CAAC,CAACmC,GAAG,CAACC,OAAO,CAAC,CAAC;IAClB,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+
3
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
4
+ /*
5
+ Copyright 2026 Adobe. All rights reserved.
6
+ This file is licensed to you under the Apache License, Version 2.0 (the
7
+ "License"); you may not use this file except in compliance with the License.
8
+ You may obtain a copy of the License at
9
+ http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law
10
+ or agreed to in writing, software distributed under the License is
11
+ distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF
12
+ ANY KIND, either express or implied. See the License for the specific
13
+ language governing permissions and limitations under the License.
14
+ */
15
+
16
+ import { StyleSheet, View } from "react-native";
17
+ const FullScreenCenterView = ({
18
+ children,
19
+ style,
20
+ ...rest
21
+ }) => {
22
+ return /*#__PURE__*/React.createElement(View, _extends({
23
+ style: [styles.container, style]
24
+ }, rest), children);
25
+ };
26
+ export default FullScreenCenterView;
27
+ const styles = StyleSheet.create({
28
+ container: {
29
+ flex: 1,
30
+ justifyContent: "center",
31
+ alignItems: "center"
32
+ }
33
+ });
34
+ //# sourceMappingURL=FullScreenCenterView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["StyleSheet","View","FullScreenCenterView","children","style","rest","React","createElement","_extends","styles","container","create","flex","justifyContent","alignItems"],"sourceRoot":"../../../../../src","sources":["ui/components/FullScreenCenterView/FullScreenCenterView.tsx"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,UAAU,EAAEC,IAAI,QAAmB,cAAc;AAE1D,MAAMC,oBAAoB,GAAGA,CAAC;EAAEC,QAAQ;EAAEC,KAAK;EAAE,GAAGC;AAAmC,CAAC,KAAK;EAC3F,oBACEC,KAAA,CAAAC,aAAA,CAACN,IAAI,EAAAO,QAAA;IAACJ,KAAK,EAAE,CAACK,MAAM,CAACC,SAAS,EAAEN,KAAK;EAAE,GAAKC,IAAI,GAC7CF,QACG,CAAC;AAEX,CAAC;AAED,eAAeD,oBAAoB;AAEnC,MAAMO,MAAM,GAAGT,UAAU,CAACW,MAAM,CAAC;EAC/BD,SAAS,EAAE;IACTE,IAAI,EAAE,CAAC;IACPC,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+
3
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
4
+ /*
5
+ Copyright 2026 Adobe. All rights reserved.
6
+ This file is licensed to you under the Apache License, Version 2.0 (the
7
+ "License"); you may not use this file except in compliance with the License.
8
+ You may obtain a copy of the License at
9
+ http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law
10
+ or agreed to in writing, software distributed under the License is
11
+ distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF
12
+ ANY KIND, either express or implied. See the License for the specific
13
+ language governing permissions and limitations under the License.
14
+ */
15
+
16
+ import { Image, StyleSheet, Text } from "react-native";
17
+ import useAspectRatio from "../../hooks/useAspectRatio.js";
18
+ import { useTheme } from "../../theme/index.js";
19
+ import FullScreenCenterView from "../FullScreenCenterView/FullScreenCenterView.js";
20
+ /**
21
+ * @experimental First React Native inbox UI — subject to change while we expand testing.
22
+ */
23
+ const EmptyState = ({
24
+ image,
25
+ text,
26
+ styleOverrides,
27
+ InboxProps,
28
+ ImageProps,
29
+ TextProps
30
+ }) => {
31
+ const {
32
+ colors
33
+ } = useTheme();
34
+ const ratio = useAspectRatio(image);
35
+ return /*#__PURE__*/React.createElement(FullScreenCenterView, _extends({
36
+ style: [styles.container, styleOverrides?.container]
37
+ }, InboxProps), image && /*#__PURE__*/React.createElement(Image, _extends({
38
+ source: {
39
+ uri: image
40
+ },
41
+ style: [styles.image, {
42
+ aspectRatio: ratio
43
+ }, styleOverrides?.image],
44
+ resizeMode: "contain"
45
+ }, ImageProps)), /*#__PURE__*/React.createElement(Text, _extends({
46
+ style: [styles.text, {
47
+ color: colors.textPrimary
48
+ }, styleOverrides?.text]
49
+ }, TextProps), text));
50
+ };
51
+ export default EmptyState;
52
+ const styles = StyleSheet.create({
53
+ image: {
54
+ width: '50%'
55
+ },
56
+ text: {
57
+ fontWeight: '600',
58
+ fontSize: 16
59
+ },
60
+ container: {
61
+ gap: 16
62
+ }
63
+ });
64
+ //# sourceMappingURL=EmptyState.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Image","StyleSheet","Text","useAspectRatio","useTheme","FullScreenCenterView","EmptyState","image","text","styleOverrides","InboxProps","ImageProps","TextProps","colors","ratio","React","createElement","_extends","style","styles","container","source","uri","aspectRatio","resizeMode","color","textPrimary","create","width","fontWeight","fontSize","gap"],"sourceRoot":"../../../../../src","sources":["ui/components/Inbox/EmptyState.tsx"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SACEA,KAAK,EAGLC,UAAU,EACVC,IAAI,QAKC,cAAc;AACrB,OAAOC,cAAc,MAAM,+BAA4B;AACvD,SAASC,QAAQ,QAAQ,sBAAa;AACtC,OAAOC,oBAAoB,MAAM,iDAA8C;AAe/E;AACA;AACA;AACA,MAAMC,UAAqC,GAAGA,CAAC;EAC7CC,KAAK;EACLC,IAAI;EACJC,cAAc;EACdC,UAAU;EACVC,UAAU;EACVC;AACF,CAAC,KAAK;EACJ,MAAM;IAAEC;EAAO,CAAC,GAAGT,QAAQ,CAAC,CAAC;EAC7B,MAAMU,KAAK,GAAGX,cAAc,CAACI,KAAK,CAAC;EAEnC,oBACEQ,KAAA,CAAAC,aAAA,CAACX,oBAAoB,EAAAY,QAAA;IACnBC,KAAK,EAAE,CAACC,MAAM,CAACC,SAAS,EAAEX,cAAc,EAAEW,SAAS;EAAE,GACjDV,UAAU,GAEbH,KAAK,iBAAIQ,KAAA,CAAAC,aAAA,CAAChB,KAAK,EAAAiB,QAAA;IACdI,MAAM,EAAE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