@oxyhq/services 5.13.4 → 5.13.11

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 (170) hide show
  1. package/lib/commonjs/core/HttpClient.js +1 -1
  2. package/lib/commonjs/core/HttpClient.js.map +1 -1
  3. package/lib/commonjs/core/OxyServices.js +91 -30
  4. package/lib/commonjs/core/OxyServices.js.map +1 -1
  5. package/lib/commonjs/core/index.js +0 -7
  6. package/lib/commonjs/core/index.js.map +1 -1
  7. package/lib/commonjs/i18n/locales/en-US.json +222 -6
  8. package/lib/commonjs/index.js +0 -7
  9. package/lib/commonjs/index.js.map +1 -1
  10. package/lib/commonjs/lib/sonner.js.map +1 -1
  11. package/lib/commonjs/ui/components/GroupedItem.js +24 -22
  12. package/lib/commonjs/ui/components/GroupedItem.js.map +1 -1
  13. package/lib/commonjs/ui/components/OxyProvider.js +35 -14
  14. package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
  15. package/lib/commonjs/ui/navigation/routes.js +36 -1
  16. package/lib/commonjs/ui/navigation/routes.js.map +1 -1
  17. package/lib/commonjs/ui/screens/AccountOverviewScreen.js +150 -5
  18. package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
  19. package/lib/commonjs/ui/screens/AccountSettingsScreen.js +475 -319
  20. package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
  21. package/lib/commonjs/ui/screens/AccountVerificationScreen.js +217 -0
  22. package/lib/commonjs/ui/screens/AccountVerificationScreen.js.map +1 -0
  23. package/lib/commonjs/ui/screens/FileManagementScreen.js +911 -213
  24. package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
  25. package/lib/commonjs/ui/screens/HelpSupportScreen.js +131 -0
  26. package/lib/commonjs/ui/screens/HelpSupportScreen.js.map +1 -0
  27. package/lib/commonjs/ui/screens/HistoryViewScreen.js +258 -0
  28. package/lib/commonjs/ui/screens/HistoryViewScreen.js.map +1 -0
  29. package/lib/commonjs/ui/screens/LegalDocumentsScreen.js +211 -0
  30. package/lib/commonjs/ui/screens/LegalDocumentsScreen.js.map +1 -0
  31. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +0 -1
  32. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  33. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +307 -0
  34. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -0
  35. package/lib/commonjs/ui/screens/ProfileScreen.js +1 -7
  36. package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
  37. package/lib/commonjs/ui/screens/SavesCollectionsScreen.js +205 -0
  38. package/lib/commonjs/ui/screens/SavesCollectionsScreen.js.map +1 -0
  39. package/lib/commonjs/ui/screens/SearchSettingsScreen.js +239 -0
  40. package/lib/commonjs/ui/screens/SearchSettingsScreen.js.map +1 -0
  41. package/lib/commonjs/ui/screens/SignInScreen.js +14 -29
  42. package/lib/commonjs/ui/screens/SignInScreen.js.map +1 -1
  43. package/lib/commonjs/utils/asyncUtils.js +1 -0
  44. package/lib/commonjs/utils/asyncUtils.js.map +1 -1
  45. package/lib/commonjs/utils/cache.js +4 -4
  46. package/lib/commonjs/utils/cache.js.map +1 -1
  47. package/lib/commonjs/utils/index.js +0 -6
  48. package/lib/commonjs/utils/index.js.map +1 -1
  49. package/lib/module/core/HttpClient.js +1 -1
  50. package/lib/module/core/HttpClient.js.map +1 -1
  51. package/lib/module/core/OxyServices.js +90 -29
  52. package/lib/module/core/OxyServices.js.map +1 -1
  53. package/lib/module/core/index.js +1 -1
  54. package/lib/module/core/index.js.map +1 -1
  55. package/lib/module/i18n/locales/en-US.json +222 -6
  56. package/lib/module/index.js +1 -1
  57. package/lib/module/index.js.map +1 -1
  58. package/lib/module/lib/sonner.js.map +1 -1
  59. package/lib/module/ui/components/GroupedItem.js +24 -22
  60. package/lib/module/ui/components/GroupedItem.js.map +1 -1
  61. package/lib/module/ui/components/OxyProvider.js +40 -17
  62. package/lib/module/ui/components/OxyProvider.js.map +1 -1
  63. package/lib/module/ui/navigation/routes.js +36 -1
  64. package/lib/module/ui/navigation/routes.js.map +1 -1
  65. package/lib/module/ui/screens/AccountOverviewScreen.js +151 -6
  66. package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
  67. package/lib/module/ui/screens/AccountSettingsScreen.js +475 -319
  68. package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
  69. package/lib/module/ui/screens/AccountVerificationScreen.js +212 -0
  70. package/lib/module/ui/screens/AccountVerificationScreen.js.map +1 -0
  71. package/lib/module/ui/screens/FileManagementScreen.js +913 -212
  72. package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
  73. package/lib/module/ui/screens/HelpSupportScreen.js +126 -0
  74. package/lib/module/ui/screens/HelpSupportScreen.js.map +1 -0
  75. package/lib/module/ui/screens/HistoryViewScreen.js +253 -0
  76. package/lib/module/ui/screens/HistoryViewScreen.js.map +1 -0
  77. package/lib/module/ui/screens/LegalDocumentsScreen.js +206 -0
  78. package/lib/module/ui/screens/LegalDocumentsScreen.js.map +1 -0
  79. package/lib/module/ui/screens/PremiumSubscriptionScreen.js +0 -1
  80. package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  81. package/lib/module/ui/screens/PrivacySettingsScreen.js +302 -0
  82. package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -0
  83. package/lib/module/ui/screens/ProfileScreen.js +1 -7
  84. package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
  85. package/lib/module/ui/screens/SavesCollectionsScreen.js +200 -0
  86. package/lib/module/ui/screens/SavesCollectionsScreen.js.map +1 -0
  87. package/lib/module/ui/screens/SearchSettingsScreen.js +234 -0
  88. package/lib/module/ui/screens/SearchSettingsScreen.js.map +1 -0
  89. package/lib/module/ui/screens/SignInScreen.js +14 -29
  90. package/lib/module/ui/screens/SignInScreen.js.map +1 -1
  91. package/lib/module/utils/asyncUtils.js +1 -0
  92. package/lib/module/utils/asyncUtils.js.map +1 -1
  93. package/lib/module/utils/cache.js +3 -3
  94. package/lib/module/utils/cache.js.map +1 -1
  95. package/lib/module/utils/index.js +1 -1
  96. package/lib/module/utils/index.js.map +1 -1
  97. package/lib/typescript/core/OxyServices.d.ts +35 -23
  98. package/lib/typescript/core/OxyServices.d.ts.map +1 -1
  99. package/lib/typescript/core/index.d.ts +1 -1
  100. package/lib/typescript/core/index.d.ts.map +1 -1
  101. package/lib/typescript/index.d.ts +1 -1
  102. package/lib/typescript/index.d.ts.map +1 -1
  103. package/lib/typescript/lib/sonner.d.ts +1 -0
  104. package/lib/typescript/lib/sonner.d.ts.map +1 -1
  105. package/lib/typescript/types/expo-document-picker.d.ts +36 -0
  106. package/lib/typescript/ui/components/GroupedItem.d.ts.map +1 -1
  107. package/lib/typescript/ui/components/OxyProvider.d.ts.map +1 -1
  108. package/lib/typescript/ui/navigation/routes.d.ts +1 -1
  109. package/lib/typescript/ui/navigation/routes.d.ts.map +1 -1
  110. package/lib/typescript/ui/screens/AccountOverviewScreen.d.ts.map +1 -1
  111. package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
  112. package/lib/typescript/ui/screens/AccountVerificationScreen.d.ts +5 -0
  113. package/lib/typescript/ui/screens/AccountVerificationScreen.d.ts.map +1 -0
  114. package/lib/typescript/ui/screens/FileManagementScreen.d.ts.map +1 -1
  115. package/lib/typescript/ui/screens/HelpSupportScreen.d.ts +5 -0
  116. package/lib/typescript/ui/screens/HelpSupportScreen.d.ts.map +1 -0
  117. package/lib/typescript/ui/screens/HistoryViewScreen.d.ts +5 -0
  118. package/lib/typescript/ui/screens/HistoryViewScreen.d.ts.map +1 -0
  119. package/lib/typescript/ui/screens/LegalDocumentsScreen.d.ts +5 -0
  120. package/lib/typescript/ui/screens/LegalDocumentsScreen.d.ts.map +1 -0
  121. package/lib/typescript/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
  122. package/lib/typescript/ui/screens/PrivacySettingsScreen.d.ts +5 -0
  123. package/lib/typescript/ui/screens/PrivacySettingsScreen.d.ts.map +1 -0
  124. package/lib/typescript/ui/screens/ProfileScreen.d.ts.map +1 -1
  125. package/lib/typescript/ui/screens/SavesCollectionsScreen.d.ts +5 -0
  126. package/lib/typescript/ui/screens/SavesCollectionsScreen.d.ts.map +1 -0
  127. package/lib/typescript/ui/screens/SearchSettingsScreen.d.ts +5 -0
  128. package/lib/typescript/ui/screens/SearchSettingsScreen.d.ts.map +1 -0
  129. package/lib/typescript/ui/screens/SignInScreen.d.ts.map +1 -1
  130. package/lib/typescript/utils/asyncUtils.d.ts.map +1 -1
  131. package/lib/typescript/utils/cache.d.ts +3 -3
  132. package/lib/typescript/utils/cache.d.ts.map +1 -1
  133. package/lib/typescript/utils/index.d.ts +1 -1
  134. package/lib/typescript/utils/index.d.ts.map +1 -1
  135. package/package.json +1 -1
  136. package/src/core/HttpClient.ts +1 -1
  137. package/src/core/OxyServices.ts +88 -30
  138. package/src/core/index.ts +1 -1
  139. package/src/i18n/locales/en-US.json +222 -6
  140. package/src/index.ts +1 -1
  141. package/src/lib/sonner.ts +1 -0
  142. package/src/types/expo-document-picker.d.ts +36 -0
  143. package/src/ui/components/GroupedItem.tsx +23 -21
  144. package/src/ui/components/OxyProvider.tsx +33 -11
  145. package/src/ui/navigation/routes.ts +42 -0
  146. package/src/ui/screens/AccountOverviewScreen.tsx +175 -5
  147. package/src/ui/screens/AccountSettingsScreen.tsx +521 -360
  148. package/src/ui/screens/AccountVerificationScreen.tsx +235 -0
  149. package/src/ui/screens/FileManagementScreen.tsx +934 -208
  150. package/src/ui/screens/HelpSupportScreen.tsx +143 -0
  151. package/src/ui/screens/HistoryViewScreen.tsx +280 -0
  152. package/src/ui/screens/LegalDocumentsScreen.tsx +220 -0
  153. package/src/ui/screens/PremiumSubscriptionScreen.tsx +0 -1
  154. package/src/ui/screens/PrivacySettingsScreen.tsx +332 -0
  155. package/src/ui/screens/ProfileScreen.tsx +1 -8
  156. package/src/ui/screens/SavesCollectionsScreen.tsx +222 -0
  157. package/src/ui/screens/SearchSettingsScreen.tsx +219 -0
  158. package/src/ui/screens/SignInScreen.tsx +19 -35
  159. package/src/utils/asyncUtils.ts +1 -0
  160. package/src/utils/cache.ts +3 -3
  161. package/src/utils/index.ts +1 -1
  162. package/lib/commonjs/ui/components/StepBasedScreen.README.md +0 -337
  163. package/lib/commonjs/ui/components/internal/TextField.md +0 -436
  164. package/lib/commonjs/ui/styles/FONTS.md +0 -126
  165. package/lib/module/ui/components/StepBasedScreen.README.md +0 -337
  166. package/lib/module/ui/components/internal/TextField.md +0 -436
  167. package/lib/module/ui/styles/FONTS.md +0 -126
  168. package/src/ui/components/StepBasedScreen.README.md +0 -337
  169. package/src/ui/components/internal/TextField.md +0 -436
  170. package/src/ui/styles/FONTS.md +0 -126
@@ -0,0 +1,131 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _sonner = require("../../lib/sonner");
10
+ var _components = require("../components");
11
+ var _useI18n = require("../hooks/useI18n");
12
+ var _jsxRuntime = require("react/jsx-runtime");
13
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
14
+ const HelpSupportScreen = ({
15
+ onClose,
16
+ theme,
17
+ goBack
18
+ }) => {
19
+ const {
20
+ t
21
+ } = (0, _useI18n.useI18n)();
22
+ const handleContactSupport = (0, _react.useMemo)(() => () => {
23
+ // In a real implementation, this would open a contact form or email
24
+ _reactNative.Linking.openURL('mailto:support@oxy.so?subject=Support Request').catch(() => {
25
+ _sonner.toast.error(t('help.contactError') || 'Failed to open email client');
26
+ });
27
+ }, [t]);
28
+ const handleFAQ = (0, _react.useMemo)(() => () => {
29
+ // In a real implementation, this would navigate to FAQ screen
30
+ _sonner.toast.info(t('help.faqComing') || 'FAQ coming soon');
31
+ }, [t]);
32
+ const handleReportBug = (0, _react.useMemo)(() => () => {
33
+ // In a real implementation, this would open a bug report form
34
+ _reactNative.Linking.openURL('mailto:bugs@oxy.so?subject=Bug Report').catch(() => {
35
+ _sonner.toast.error(t('help.reportError') || 'Failed to open email client');
36
+ });
37
+ }, [t]);
38
+ const themeStyles = (0, _react.useMemo)(() => {
39
+ const isDarkTheme = theme === 'dark';
40
+ return {
41
+ textColor: isDarkTheme ? '#FFFFFF' : '#000000',
42
+ backgroundColor: isDarkTheme ? '#121212' : '#FFFFFF',
43
+ secondaryBackgroundColor: isDarkTheme ? '#222222' : '#F5F5F5',
44
+ borderColor: isDarkTheme ? '#444444' : '#E0E0E0'
45
+ };
46
+ }, [theme]);
47
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
48
+ style: [styles.container, {
49
+ backgroundColor: themeStyles.backgroundColor
50
+ }],
51
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Header, {
52
+ title: t('help.title') || 'Help & Support',
53
+ theme: theme,
54
+ onBack: goBack || onClose,
55
+ variant: "minimal",
56
+ elevation: "subtle"
57
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.ScrollView, {
58
+ style: styles.content,
59
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Section, {
60
+ title: t('help.options') || 'Get Help',
61
+ theme: theme,
62
+ isFirst: true,
63
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.GroupedSection, {
64
+ items: [{
65
+ id: 'faq',
66
+ icon: 'help-circle',
67
+ iconColor: '#007AFF',
68
+ title: t('help.faq.title') || 'Frequently Asked Questions',
69
+ subtitle: t('help.faq.subtitle') || 'Find answers to common questions',
70
+ onPress: handleFAQ
71
+ }, {
72
+ id: 'contact',
73
+ icon: 'mail',
74
+ iconColor: '#32D74B',
75
+ title: t('help.contact.title') || 'Contact Support',
76
+ subtitle: t('help.contact.subtitle') || 'Get help from our support team',
77
+ onPress: handleContactSupport
78
+ }, {
79
+ id: 'report-bug',
80
+ icon: 'bug',
81
+ iconColor: '#FF9500',
82
+ title: t('help.reportBug.title') || 'Report a Bug',
83
+ subtitle: t('help.reportBug.subtitle') || 'Help us improve by reporting issues',
84
+ onPress: handleReportBug
85
+ }],
86
+ theme: theme
87
+ })
88
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Section, {
89
+ title: t('help.resources') || 'Resources',
90
+ theme: theme,
91
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.GroupedSection, {
92
+ items: [{
93
+ id: 'documentation',
94
+ icon: 'document-text',
95
+ iconColor: '#8E8E93',
96
+ title: t('help.documentation.title') || 'Documentation',
97
+ subtitle: t('help.documentation.subtitle') || 'User guides and tutorials',
98
+ onPress: () => {
99
+ _reactNative.Linking.openURL('https://docs.oxy.so').catch(() => {
100
+ _sonner.toast.error(t('help.linkError') || 'Failed to open link');
101
+ });
102
+ }
103
+ }, {
104
+ id: 'community',
105
+ icon: 'people',
106
+ iconColor: '#5856D6',
107
+ title: t('help.community.title') || 'Community',
108
+ subtitle: t('help.community.subtitle') || 'Join our community',
109
+ onPress: () => {
110
+ _reactNative.Linking.openURL('https://community.oxy.so').catch(() => {
111
+ _sonner.toast.error(t('help.linkError') || 'Failed to open link');
112
+ });
113
+ }
114
+ }],
115
+ theme: theme
116
+ })
117
+ })]
118
+ })]
119
+ });
120
+ };
121
+ const styles = _reactNative.StyleSheet.create({
122
+ container: {
123
+ flex: 1
124
+ },
125
+ content: {
126
+ flex: 1,
127
+ padding: 16
128
+ }
129
+ });
130
+ var _default = exports.default = /*#__PURE__*/_react.default.memo(HelpSupportScreen);
131
+ //# sourceMappingURL=HelpSupportScreen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_sonner","_components","_useI18n","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","HelpSupportScreen","onClose","theme","goBack","useI18n","handleContactSupport","useMemo","Linking","openURL","catch","toast","error","handleFAQ","info","handleReportBug","themeStyles","isDarkTheme","textColor","backgroundColor","secondaryBackgroundColor","borderColor","jsxs","View","style","styles","container","children","jsx","Header","title","onBack","variant","elevation","ScrollView","content","Section","isFirst","GroupedSection","items","id","icon","iconColor","subtitle","onPress","StyleSheet","create","flex","padding","_default","exports","React","memo"],"sourceRoot":"../../../../src","sources":["ui/screens/HelpSupportScreen.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AASA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AAA2C,IAAAK,WAAA,GAAAL,OAAA;AAAA,SAAAD,wBAAAO,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAT,uBAAA,YAAAA,CAAAO,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,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
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _OxyContext = require("../context/OxyContext");
10
+ var _sonner = require("../../lib/sonner");
11
+ var _confirmAction = require("../utils/confirmAction");
12
+ var _components = require("../components");
13
+ var _useI18n = require("../hooks/useI18n");
14
+ var _jsxRuntime = require("react/jsx-runtime");
15
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
16
+ const HistoryViewScreen = ({
17
+ onClose,
18
+ theme,
19
+ goBack
20
+ }) => {
21
+ const {
22
+ user
23
+ } = (0, _OxyContext.useOxy)();
24
+ const {
25
+ t
26
+ } = (0, _useI18n.useI18n)();
27
+ const [history, setHistory] = (0, _react.useState)([]);
28
+ const [isLoading, setIsLoading] = (0, _react.useState)(true);
29
+ const [isDeleting, setIsDeleting] = (0, _react.useState)(false);
30
+
31
+ // Helper to get storage
32
+ const getStorage = async () => {
33
+ const isReactNative = typeof navigator !== 'undefined' && navigator.product === 'ReactNative';
34
+ if (isReactNative) {
35
+ try {
36
+ const asyncStorageModule = await Promise.resolve().then(() => _interopRequireWildcard(require('@react-native-async-storage/async-storage')));
37
+ const storage = asyncStorageModule.default;
38
+ return {
39
+ getItem: storage.getItem.bind(storage),
40
+ setItem: storage.setItem.bind(storage),
41
+ removeItem: storage.removeItem.bind(storage)
42
+ };
43
+ } catch (error) {
44
+ console.error('AsyncStorage not available:', error);
45
+ throw new Error('AsyncStorage is required in React Native environment');
46
+ }
47
+ } else {
48
+ // Use localStorage for web
49
+ return {
50
+ getItem: async key => {
51
+ if (typeof window !== 'undefined' && window.localStorage) {
52
+ return window.localStorage.getItem(key);
53
+ }
54
+ return null;
55
+ },
56
+ setItem: async (key, value) => {
57
+ if (typeof window !== 'undefined' && window.localStorage) {
58
+ window.localStorage.setItem(key, value);
59
+ }
60
+ },
61
+ removeItem: async key => {
62
+ if (typeof window !== 'undefined' && window.localStorage) {
63
+ window.localStorage.removeItem(key);
64
+ }
65
+ }
66
+ };
67
+ }
68
+ };
69
+
70
+ // Load history from storage
71
+ _react.default.useEffect(() => {
72
+ const loadHistory = async () => {
73
+ try {
74
+ setIsLoading(true);
75
+ // In a real implementation, this would fetch from API or local storage
76
+ // For now, we'll use a mock implementation
77
+ const storage = await getStorage();
78
+ const historyKey = `history_${user?.id || 'guest'}`;
79
+ const stored = await storage.getItem(historyKey);
80
+ if (stored) {
81
+ const parsed = JSON.parse(stored);
82
+ setHistory(parsed.map(item => ({
83
+ ...item,
84
+ timestamp: new Date(item.timestamp)
85
+ })));
86
+ } else {
87
+ setHistory([]);
88
+ }
89
+ } catch (error) {
90
+ setHistory([]);
91
+ } finally {
92
+ setIsLoading(false);
93
+ }
94
+ };
95
+ loadHistory();
96
+ }, [user?.id]);
97
+ const handleDeleteLast15Minutes = (0, _react.useCallback)(async () => {
98
+ (0, _confirmAction.confirmAction)(t('history.deleteLast15Minutes.confirm') || 'Delete last 15 minutes of history?', async () => {
99
+ try {
100
+ setIsDeleting(true);
101
+ const fifteenMinutesAgo = new Date(Date.now() - 15 * 60 * 1000);
102
+ const filtered = history.filter(item => item.timestamp < fifteenMinutesAgo);
103
+ setHistory(filtered);
104
+
105
+ // Save to storage
106
+ const storage = await getStorage();
107
+ const historyKey = `history_${user?.id || 'guest'}`;
108
+ await storage.setItem(historyKey, JSON.stringify(filtered));
109
+ _sonner.toast.success(t('history.deleteLast15Minutes.success') || 'Last 15 minutes deleted');
110
+ } catch (error) {
111
+ console.error('Failed to delete history:', error);
112
+ _sonner.toast.error(t('history.deleteLast15Minutes.error') || 'Failed to delete history');
113
+ } finally {
114
+ setIsDeleting(false);
115
+ }
116
+ });
117
+ }, [history, user?.id, t]);
118
+ const handleClearAll = (0, _react.useCallback)(async () => {
119
+ (0, _confirmAction.confirmAction)(t('history.clearAll.confirm') || 'Clear all history? This cannot be undone.', async () => {
120
+ try {
121
+ setIsDeleting(true);
122
+ setHistory([]);
123
+
124
+ // Clear from storage
125
+ const storage = await getStorage();
126
+ const historyKey = `history_${user?.id || 'guest'}`;
127
+ await storage.removeItem(historyKey);
128
+ _sonner.toast.success(t('history.clearAll.success') || 'History cleared');
129
+ } catch (error) {
130
+ console.error('Failed to clear history:', error);
131
+ _sonner.toast.error(t('history.clearAll.error') || 'Failed to clear history');
132
+ } finally {
133
+ setIsDeleting(false);
134
+ }
135
+ });
136
+ }, [user?.id, t]);
137
+ const themeStyles = (0, _react.useMemo)(() => {
138
+ const isDarkTheme = theme === 'dark';
139
+ return {
140
+ textColor: isDarkTheme ? '#FFFFFF' : '#000000',
141
+ backgroundColor: isDarkTheme ? '#121212' : '#FFFFFF',
142
+ secondaryBackgroundColor: isDarkTheme ? '#222222' : '#F5F5F5',
143
+ borderColor: isDarkTheme ? '#444444' : '#E0E0E0'
144
+ };
145
+ }, [theme]);
146
+ const formatTime = date => {
147
+ const now = new Date();
148
+ const diff = now.getTime() - date.getTime();
149
+ const minutes = Math.floor(diff / 60000);
150
+ const hours = Math.floor(minutes / 60);
151
+ const days = Math.floor(hours / 24);
152
+ if (minutes < 1) return t('history.justNow') || 'Just now';
153
+ if (minutes < 60) return `${minutes} ${t('history.minutesAgo') || 'minutes ago'}`;
154
+ if (hours < 24) return `${hours} ${t('history.hoursAgo') || 'hours ago'}`;
155
+ if (days < 7) return `${days} ${t('history.daysAgo') || 'days ago'}`;
156
+ return date.toLocaleDateString();
157
+ };
158
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
159
+ style: [styles.container, {
160
+ backgroundColor: themeStyles.backgroundColor
161
+ }],
162
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Header, {
163
+ title: t('history.title') || 'History',
164
+ theme: theme,
165
+ onBack: goBack || onClose,
166
+ variant: "minimal",
167
+ elevation: "subtle"
168
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.ScrollView, {
169
+ style: styles.content,
170
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Section, {
171
+ title: t('history.actions') || 'Actions',
172
+ theme: theme,
173
+ isFirst: true,
174
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.GroupedSection, {
175
+ items: [{
176
+ id: 'delete-last-15',
177
+ icon: 'time-outline',
178
+ iconColor: '#FF9500',
179
+ title: t('history.deleteLast15Minutes.title') || 'Delete Last 15 Minutes',
180
+ subtitle: t('history.deleteLast15Minutes.subtitle') || 'Remove recent history entries',
181
+ onPress: handleDeleteLast15Minutes,
182
+ disabled: isDeleting || history.length === 0
183
+ }, {
184
+ id: 'clear-all',
185
+ icon: 'trash-outline',
186
+ iconColor: '#FF3B30',
187
+ title: t('history.clearAll.title') || 'Clear All History',
188
+ subtitle: t('history.clearAll.subtitle') || 'Remove all history entries',
189
+ onPress: handleClearAll,
190
+ disabled: isDeleting || history.length === 0
191
+ }],
192
+ theme: theme
193
+ })
194
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Section, {
195
+ title: t('history.recent') || 'Recent History',
196
+ theme: theme,
197
+ children: isLoading ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
198
+ style: styles.loadingContainer,
199
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
200
+ size: "large",
201
+ color: themeStyles.textColor
202
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
203
+ style: [styles.loadingText, {
204
+ color: themeStyles.textColor
205
+ }],
206
+ children: t('history.loading') || 'Loading history...'
207
+ })]
208
+ }) : history.length === 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
209
+ style: styles.emptyContainer,
210
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
211
+ style: [styles.emptyText, {
212
+ color: themeStyles.textColor
213
+ }],
214
+ children: t('history.empty') || 'No history yet'
215
+ })
216
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.GroupedSection, {
217
+ items: history.map(item => ({
218
+ id: item.id,
219
+ icon: item.type === 'search' ? 'search' : 'globe',
220
+ iconColor: item.type === 'search' ? '#007AFF' : '#32D74B',
221
+ title: item.query,
222
+ subtitle: formatTime(item.timestamp)
223
+ })),
224
+ theme: theme
225
+ })
226
+ })]
227
+ })]
228
+ });
229
+ };
230
+ const styles = _reactNative.StyleSheet.create({
231
+ container: {
232
+ flex: 1
233
+ },
234
+ content: {
235
+ flex: 1,
236
+ padding: 16
237
+ },
238
+ loadingContainer: {
239
+ padding: 40,
240
+ alignItems: 'center',
241
+ justifyContent: 'center'
242
+ },
243
+ loadingText: {
244
+ marginTop: 12,
245
+ fontSize: 16
246
+ },
247
+ emptyContainer: {
248
+ padding: 40,
249
+ alignItems: 'center',
250
+ justifyContent: 'center'
251
+ },
252
+ emptyText: {
253
+ fontSize: 16,
254
+ textAlign: 'center'
255
+ }
256
+ });
257
+ var _default = exports.default = /*#__PURE__*/_react.default.memo(HistoryViewScreen);
258
+ //# sourceMappingURL=HistoryViewScreen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_OxyContext","_sonner","_confirmAction","_components","_useI18n","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","HistoryViewScreen","onClose","theme","goBack","user","useOxy","useI18n","history","setHistory","useState","isLoading","setIsLoading","isDeleting","setIsDeleting","getStorage","isReactNative","navigator","product","asyncStorageModule","Promise","resolve","then","storage","getItem","bind","setItem","removeItem","error","console","Error","key","window","localStorage","value","React","useEffect","loadHistory","historyKey","id","stored","parsed","JSON","parse","map","item","timestamp","Date","handleDeleteLast15Minutes","useCallback","confirmAction","fifteenMinutesAgo","now","filtered","filter","stringify","toast","success","handleClearAll","themeStyles","useMemo","isDarkTheme","textColor","backgroundColor","secondaryBackgroundColor","borderColor","formatTime","date","diff","getTime","minutes","Math","floor","hours","days","toLocaleDateString","jsxs","View","style","styles","container","children","jsx","Header","title","onBack","variant","elevation","ScrollView","content","Section","isFirst","GroupedSection","items","icon","iconColor","subtitle","onPress","disabled","length","loadingContainer","ActivityIndicator","size","color","Text","loadingText","emptyContainer","emptyText","type","query","StyleSheet","create","flex","padding","alignItems","justifyContent","marginTop","fontSize","textAlign","_default","exports","memo"],"sourceRoot":"../../../../src","sources":["ui/screens/HistoryViewScreen.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AASA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,cAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AAA2C,IAAAO,WAAA,GAAAP,OAAA;AAAA,SAAAD,wBAAAS,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAX,uBAAA,YAAAA,CAAAS,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CA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;EACpB,CAAC;EACDV,WAAW,EAAE;IACTW,SAAS,EAAE,EAAE;IACbC,QAAQ,EAAE;EACd,CAAC;EACDX,cAAc,EAAE;IACZO,OAAO,EAAE,EAAE;IACXC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EACpB,CAAC;EACDR,SAAS,EAAE;IACPU,QAAQ,EAAE,EAAE;IACZC,SAAS,EAAE;EACf;AACJ,CAAC,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAhI,OAAA,gBAEY2C,cAAK,CAACsF,IAAI,CAACxH,iBAAiB,CAAC","ignoreList":[]}
@@ -0,0 +1,211 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _sonner = require("../../lib/sonner");
10
+ var _components = require("../components");
11
+ var _useI18n = require("../hooks/useI18n");
12
+ var _jsxRuntime = require("react/jsx-runtime");
13
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
14
+ const LegalDocumentsScreen = ({
15
+ onClose,
16
+ theme,
17
+ goBack,
18
+ initialStep
19
+ }) => {
20
+ const {
21
+ t
22
+ } = (0, _useI18n.useI18n)();
23
+ const [loading, setLoading] = (0, _react.useState)(false);
24
+
25
+ // Policy URLs from Oxy Transparency Center
26
+ const POLICY_URLS = {
27
+ privacy: 'https://oxy.so/company/transparency/policies/privacy',
28
+ terms: 'https://oxy.so/company/transparency/policies/terms-of-service',
29
+ community: 'https://oxy.so/company/transparency/policies/community-guidelines',
30
+ dataRetention: 'https://oxy.so/company/transparency/policies/data-retention',
31
+ contentModeration: 'https://oxy.so/company/transparency/policies/content-moderation',
32
+ childSafety: 'https://oxy.so/company/transparency/policies/child-safety',
33
+ cookie: 'https://oxy.so/company/transparency/policies/cookies'
34
+ };
35
+
36
+ // Determine which document to show based on initialStep
37
+ const documentType = initialStep === 1 ? 'privacy' : initialStep === 2 ? 'terms' : initialStep === 3 ? 'community' : initialStep === 4 ? 'dataRetention' : initialStep === 5 ? 'contentModeration' : initialStep === 6 ? 'childSafety' : initialStep === 7 ? 'cookie' : null;
38
+
39
+ // Generic handler to open any policy URL
40
+ const handleOpenPolicy = (0, _react.useCallback)(policyKey => {
41
+ return async () => {
42
+ try {
43
+ setLoading(true);
44
+ const url = POLICY_URLS[policyKey];
45
+ const canOpen = await _reactNative.Linking.canOpenURL(url);
46
+ if (canOpen) {
47
+ await _reactNative.Linking.openURL(url);
48
+ } else {
49
+ _sonner.toast.error(t('legal.openError') || 'Failed to open document');
50
+ }
51
+ } catch (error) {
52
+ console.error(`Failed to open ${policyKey} policy:`, error);
53
+ _sonner.toast.error(t('legal.openError') || 'Failed to open document');
54
+ } finally {
55
+ setLoading(false);
56
+ }
57
+ };
58
+ }, [t]);
59
+ const themeStyles = (0, _react.useMemo)(() => {
60
+ const isDarkTheme = theme === 'dark';
61
+ return {
62
+ textColor: isDarkTheme ? '#FFFFFF' : '#000000',
63
+ backgroundColor: isDarkTheme ? '#121212' : '#FFFFFF',
64
+ secondaryBackgroundColor: isDarkTheme ? '#222222' : '#F5F5F5',
65
+ borderColor: isDarkTheme ? '#444444' : '#E0E0E0'
66
+ };
67
+ }, [theme]);
68
+
69
+ // If a specific document type is requested, open it directly
70
+ _react.default.useEffect(() => {
71
+ if (documentType) {
72
+ handleOpenPolicy(documentType)();
73
+ }
74
+ }, [documentType, handleOpenPolicy]);
75
+
76
+ // Get policy title for display
77
+ const getPolicyTitle = key => {
78
+ const titles = {
79
+ privacy: t('legal.privacyPolicy.title') || 'Privacy Policy',
80
+ terms: t('legal.termsOfService.title') || 'Terms of Service',
81
+ community: t('legal.communityGuidelines.title') || 'Community Guidelines',
82
+ dataRetention: t('legal.dataRetention.title') || 'Data Retention Policy',
83
+ contentModeration: t('legal.contentModeration.title') || 'Content Moderation Policy',
84
+ childSafety: t('legal.childSafety.title') || 'Child Safety Policy',
85
+ cookie: t('legal.cookiePolicy.title') || 'Cookie Policy'
86
+ };
87
+ return titles[key] || 'Document';
88
+ };
89
+
90
+ // If a specific document type is requested, show loading state while opening
91
+ if (documentType) {
92
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
93
+ style: [styles.container, {
94
+ backgroundColor: themeStyles.backgroundColor
95
+ }],
96
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Header, {
97
+ title: getPolicyTitle(documentType),
98
+ theme: theme,
99
+ onBack: goBack || onClose,
100
+ variant: "minimal",
101
+ elevation: "subtle"
102
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
103
+ style: styles.loadingContainer,
104
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
105
+ size: "large",
106
+ color: themeStyles.textColor
107
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
108
+ style: [styles.loadingText, {
109
+ color: themeStyles.textColor
110
+ }],
111
+ children: t('legal.opening') || 'Opening document...'
112
+ })]
113
+ })]
114
+ });
115
+ }
116
+
117
+ // Default: show both options
118
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
119
+ style: [styles.container, {
120
+ backgroundColor: themeStyles.backgroundColor
121
+ }],
122
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Header, {
123
+ title: t('legal.title') || 'Legal Documents',
124
+ theme: theme,
125
+ onBack: goBack || onClose,
126
+ variant: "minimal",
127
+ elevation: "subtle"
128
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
129
+ style: styles.content,
130
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Section, {
131
+ title: t('legal.policies') || 'Policies & Guidelines',
132
+ theme: theme,
133
+ isFirst: true,
134
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.GroupedSection, {
135
+ items: [{
136
+ id: 'privacy-policy',
137
+ icon: 'shield-checkmark',
138
+ iconColor: '#30D158',
139
+ title: t('legal.privacyPolicy.title') || 'Privacy Policy',
140
+ subtitle: t('legal.privacyPolicy.subtitle') || 'How we handle your data',
141
+ onPress: handleOpenPolicy('privacy')
142
+ }, {
143
+ id: 'terms-of-service',
144
+ icon: 'document-text',
145
+ iconColor: '#007AFF',
146
+ title: t('legal.termsOfService.title') || 'Terms of Service',
147
+ subtitle: t('legal.termsOfService.subtitle') || 'Terms and conditions of use',
148
+ onPress: handleOpenPolicy('terms')
149
+ }, {
150
+ id: 'community-guidelines',
151
+ icon: 'people',
152
+ iconColor: '#5856D6',
153
+ title: t('legal.communityGuidelines.title') || 'Community Guidelines',
154
+ subtitle: t('legal.communityGuidelines.subtitle') || 'Rules and expectations for our community',
155
+ onPress: handleOpenPolicy('community')
156
+ }, {
157
+ id: 'data-retention',
158
+ icon: 'time',
159
+ iconColor: '#FF9500',
160
+ title: t('legal.dataRetention.title') || 'Data Retention Policy',
161
+ subtitle: t('legal.dataRetention.subtitle') || 'How long we keep your data',
162
+ onPress: handleOpenPolicy('dataRetention')
163
+ }, {
164
+ id: 'content-moderation',
165
+ icon: 'eye',
166
+ iconColor: '#FF3B30',
167
+ title: t('legal.contentModeration.title') || 'Content Moderation Policy',
168
+ subtitle: t('legal.contentModeration.subtitle') || 'How we moderate content',
169
+ onPress: handleOpenPolicy('contentModeration')
170
+ }, {
171
+ id: 'child-safety',
172
+ icon: 'heart',
173
+ iconColor: '#FF2D55',
174
+ title: t('legal.childSafety.title') || 'Child Safety Policy',
175
+ subtitle: t('legal.childSafety.subtitle') || 'Protecting minors on our platform',
176
+ onPress: handleOpenPolicy('childSafety')
177
+ }, {
178
+ id: 'cookie-policy',
179
+ icon: 'cookie',
180
+ iconColor: '#8E8E93',
181
+ title: t('legal.cookiePolicy.title') || 'Cookie Policy',
182
+ subtitle: t('legal.cookiePolicy.subtitle') || 'How we use cookies and similar technologies',
183
+ onPress: handleOpenPolicy('cookie')
184
+ }],
185
+ theme: theme
186
+ })
187
+ })
188
+ })]
189
+ });
190
+ };
191
+ const styles = _reactNative.StyleSheet.create({
192
+ container: {
193
+ flex: 1
194
+ },
195
+ content: {
196
+ flex: 1,
197
+ padding: 16
198
+ },
199
+ loadingContainer: {
200
+ flex: 1,
201
+ alignItems: 'center',
202
+ justifyContent: 'center',
203
+ gap: 16
204
+ },
205
+ loadingText: {
206
+ fontSize: 16,
207
+ marginTop: 12
208
+ }
209
+ });
210
+ var _default = exports.default = /*#__PURE__*/_react.default.memo(LegalDocumentsScreen);
211
+ //# sourceMappingURL=LegalDocumentsScreen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_sonner","_components","_useI18n","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","LegalDocumentsScreen","onClose","theme","goBack","initialStep","useI18n","loading","setLoading","useState","POLICY_URLS","privacy","terms","community","dataRetention","contentModeration","childSafety","cookie","documentType","handleOpenPolicy","useCallback","policyKey","url","canOpen","Linking","canOpenURL","openURL","toast","error","console","themeStyles","useMemo","isDarkTheme","textColor","backgroundColor","secondaryBackgroundColor","borderColor","React","useEffect","getPolicyTitle","key","titles","jsxs","View","style","styles","container","children","jsx","Header","title","onBack","variant","elevation","loadingContainer","ActivityIndicator","size","color","Text","loadingText","ScrollView","content","Section","isFirst","GroupedSection","items","id","icon","iconColor","subtitle","onPress","StyleSheet","create","flex","padding","alignItems","justifyContent","gap","fontSize","marginTop","_default","exports","memo"],"sourceRoot":"../../../../src","sources":["ui/screens/LegalDocumentsScreen.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAUA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AAA2C,IAAAK,WAAA,GAAAL,OAAA;AAAA,SAAAD,wBAAAO,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAT,uBAAA,YAAAA,CAAAO,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAA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