posthog-react-native 4.2.1 → 4.3.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 (204) hide show
  1. package/LICENSE +245 -0
  2. package/dist/PostHogContext.js.map +1 -0
  3. package/dist/PostHogProvider.js +1 -0
  4. package/dist/PostHogProvider.js.map +1 -0
  5. package/dist/autocapture.js +1 -0
  6. package/dist/autocapture.js.map +1 -0
  7. package/dist/frameworks/wix-navigation.js.map +1 -0
  8. package/{lib/posthog-react-native/src → dist}/hooks/useFeatureFlag.d.ts +1 -1
  9. package/dist/hooks/useFeatureFlag.js.map +1 -0
  10. package/{lib/posthog-react-native/src → dist}/hooks/useFeatureFlags.d.ts +1 -1
  11. package/dist/hooks/useFeatureFlags.js.map +1 -0
  12. package/dist/hooks/useNavigationTracker.js.map +1 -0
  13. package/dist/hooks/usePostHog.js.map +1 -0
  14. package/dist/index.d.ts +10 -0
  15. package/dist/index.js +1 -0
  16. package/dist/index.js.map +1 -0
  17. package/dist/native-deps.js +1 -0
  18. package/dist/native-deps.js.map +1 -0
  19. package/dist/optional/OptionalAsyncStorage.js.map +1 -0
  20. package/dist/optional/OptionalExpoApplication.js.map +1 -0
  21. package/dist/optional/OptionalExpoDevice.js.map +1 -0
  22. package/dist/optional/OptionalExpoFileSystem.js.map +1 -0
  23. package/dist/optional/OptionalExpoLocalization.js.map +1 -0
  24. package/dist/optional/OptionalReactNativeDeviceInfo.js.map +1 -0
  25. package/dist/optional/OptionalReactNativeLocalize.js.map +1 -0
  26. package/dist/optional/OptionalReactNativeNavigation.js.map +1 -0
  27. package/dist/optional/OptionalReactNativeNavigationWix.js.map +1 -0
  28. package/dist/optional/OptionalReactNativeSafeArea.js.map +1 -0
  29. package/dist/optional/OptionalSessionReplay.js.map +1 -0
  30. package/{lib/posthog-react-native/src → dist}/posthog-rn.d.ts +2 -1
  31. package/dist/posthog-rn.js +1 -0
  32. package/dist/posthog-rn.js.map +1 -0
  33. package/dist/storage.js +1 -0
  34. package/dist/storage.js.map +1 -0
  35. package/{lib/posthog-react-native/src → dist}/surveys/PostHogSurveyProvider.d.ts +1 -1
  36. package/dist/surveys/PostHogSurveyProvider.js +1 -0
  37. package/dist/surveys/PostHogSurveyProvider.js.map +1 -0
  38. package/{lib/posthog-react-native/src → dist}/surveys/components/BottomSection.d.ts +0 -1
  39. package/dist/surveys/components/BottomSection.js +1 -0
  40. package/dist/surveys/components/BottomSection.js.map +1 -0
  41. package/{lib/posthog-react-native/src → dist}/surveys/components/Cancel.d.ts +0 -1
  42. package/dist/surveys/components/Cancel.js +1 -0
  43. package/dist/surveys/components/Cancel.js.map +1 -0
  44. package/{lib/posthog-react-native/src → dist}/surveys/components/ConfirmationMessage.d.ts +1 -2
  45. package/dist/surveys/components/ConfirmationMessage.js +1 -0
  46. package/dist/surveys/components/ConfirmationMessage.js.map +1 -0
  47. package/{lib/posthog-react-native/src → dist}/surveys/components/QuestionHeader.d.ts +1 -2
  48. package/dist/surveys/components/QuestionHeader.js +1 -0
  49. package/dist/surveys/components/QuestionHeader.js.map +1 -0
  50. package/{lib/posthog-react-native/src → dist}/surveys/components/QuestionTypes.d.ts +1 -2
  51. package/dist/surveys/components/QuestionTypes.js +1 -0
  52. package/dist/surveys/components/QuestionTypes.js.map +1 -0
  53. package/{lib/posthog-react-native/src → dist}/surveys/components/SurveyModal.d.ts +1 -2
  54. package/dist/surveys/components/SurveyModal.js +1 -0
  55. package/dist/surveys/components/SurveyModal.js.map +1 -0
  56. package/{lib/posthog-react-native/src → dist}/surveys/components/Surveys.d.ts +1 -2
  57. package/dist/surveys/components/Surveys.js +1 -0
  58. package/dist/surveys/components/Surveys.js.map +1 -0
  59. package/{lib/posthog-react-native/src → dist}/surveys/getActiveMatchingSurveys.d.ts +1 -1
  60. package/dist/surveys/getActiveMatchingSurveys.js +1 -0
  61. package/dist/surveys/getActiveMatchingSurveys.js.map +1 -0
  62. package/dist/surveys/icons.js +1 -0
  63. package/dist/surveys/icons.js.map +1 -0
  64. package/{lib/posthog-react-native/src → dist}/surveys/index.d.ts +1 -1
  65. package/dist/surveys/index.js.map +1 -0
  66. package/{lib/posthog-react-native/src → dist}/surveys/surveys-utils.d.ts +1 -1
  67. package/dist/surveys/surveys-utils.js +1 -0
  68. package/dist/surveys/surveys-utils.js.map +1 -0
  69. package/{lib/posthog-react-native/src → dist}/surveys/useActivatedSurveys.d.ts +1 -1
  70. package/dist/surveys/useActivatedSurveys.js.map +1 -0
  71. package/dist/surveys/useSurveyStorage.js +1 -0
  72. package/dist/surveys/useSurveyStorage.js.map +1 -0
  73. package/dist/types.js.map +1 -0
  74. package/dist/version.d.ts +1 -0
  75. package/dist/version.js +1 -0
  76. package/dist/version.js.map +1 -0
  77. package/package.json +33 -19
  78. package/lib/posthog-core/src/eventemitter.d.ts +0 -8
  79. package/lib/posthog-core/src/eventemitter.js +0 -1
  80. package/lib/posthog-core/src/eventemitter.js.map +0 -1
  81. package/lib/posthog-core/src/featureFlagUtils.d.ts +0 -34
  82. package/lib/posthog-core/src/featureFlagUtils.js +0 -1
  83. package/lib/posthog-core/src/featureFlagUtils.js.map +0 -1
  84. package/lib/posthog-core/src/gzip.d.ts +0 -9
  85. package/lib/posthog-core/src/gzip.js +0 -1
  86. package/lib/posthog-core/src/gzip.js.map +0 -1
  87. package/lib/posthog-core/src/index.d.ts +0 -260
  88. package/lib/posthog-core/src/index.js +0 -1
  89. package/lib/posthog-core/src/index.js.map +0 -1
  90. package/lib/posthog-core/src/types.d.ts +0 -439
  91. package/lib/posthog-core/src/types.js +0 -1
  92. package/lib/posthog-core/src/types.js.map +0 -1
  93. package/lib/posthog-core/src/utils.d.ts +0 -23
  94. package/lib/posthog-core/src/utils.js +0 -1
  95. package/lib/posthog-core/src/utils.js.map +0 -1
  96. package/lib/posthog-core/src/vendor/uuidv7.d.ts +0 -179
  97. package/lib/posthog-core/src/vendor/uuidv7.js +0 -7
  98. package/lib/posthog-core/src/vendor/uuidv7.js.map +0 -1
  99. package/lib/posthog-react-native/index.d.ts +0 -10
  100. package/lib/posthog-react-native/index.js +0 -1
  101. package/lib/posthog-react-native/index.js.map +0 -1
  102. package/lib/posthog-react-native/src/PostHogContext.js.map +0 -1
  103. package/lib/posthog-react-native/src/PostHogProvider.js +0 -1
  104. package/lib/posthog-react-native/src/PostHogProvider.js.map +0 -1
  105. package/lib/posthog-react-native/src/autocapture.js +0 -1
  106. package/lib/posthog-react-native/src/autocapture.js.map +0 -1
  107. package/lib/posthog-react-native/src/frameworks/wix-navigation.js.map +0 -1
  108. package/lib/posthog-react-native/src/hooks/useFeatureFlag.js.map +0 -1
  109. package/lib/posthog-react-native/src/hooks/useFeatureFlags.js.map +0 -1
  110. package/lib/posthog-react-native/src/hooks/useNavigationTracker.js.map +0 -1
  111. package/lib/posthog-react-native/src/hooks/usePostHog.js.map +0 -1
  112. package/lib/posthog-react-native/src/legacy.d.ts +0 -4
  113. package/lib/posthog-react-native/src/legacy.js +0 -1
  114. package/lib/posthog-react-native/src/legacy.js.map +0 -1
  115. package/lib/posthog-react-native/src/native-deps.js +0 -1
  116. package/lib/posthog-react-native/src/native-deps.js.map +0 -1
  117. package/lib/posthog-react-native/src/optional/OptionalAsyncStorage.js.map +0 -1
  118. package/lib/posthog-react-native/src/optional/OptionalExpoApplication.js.map +0 -1
  119. package/lib/posthog-react-native/src/optional/OptionalExpoDevice.js.map +0 -1
  120. package/lib/posthog-react-native/src/optional/OptionalExpoFileSystem.js.map +0 -1
  121. package/lib/posthog-react-native/src/optional/OptionalExpoLocalization.js.map +0 -1
  122. package/lib/posthog-react-native/src/optional/OptionalReactNativeDeviceInfo.js.map +0 -1
  123. package/lib/posthog-react-native/src/optional/OptionalReactNativeLocalize.js.map +0 -1
  124. package/lib/posthog-react-native/src/optional/OptionalReactNativeNavigation.js.map +0 -1
  125. package/lib/posthog-react-native/src/optional/OptionalReactNativeNavigationWix.js.map +0 -1
  126. package/lib/posthog-react-native/src/optional/OptionalReactNativeSafeArea.js.map +0 -1
  127. package/lib/posthog-react-native/src/optional/OptionalSessionReplay.js.map +0 -1
  128. package/lib/posthog-react-native/src/posthog-rn.js +0 -1
  129. package/lib/posthog-react-native/src/posthog-rn.js.map +0 -1
  130. package/lib/posthog-react-native/src/storage.js +0 -1
  131. package/lib/posthog-react-native/src/storage.js.map +0 -1
  132. package/lib/posthog-react-native/src/surveys/PostHogSurveyProvider.js +0 -1
  133. package/lib/posthog-react-native/src/surveys/PostHogSurveyProvider.js.map +0 -1
  134. package/lib/posthog-react-native/src/surveys/components/BottomSection.js +0 -1
  135. package/lib/posthog-react-native/src/surveys/components/BottomSection.js.map +0 -1
  136. package/lib/posthog-react-native/src/surveys/components/Cancel.js +0 -1
  137. package/lib/posthog-react-native/src/surveys/components/Cancel.js.map +0 -1
  138. package/lib/posthog-react-native/src/surveys/components/ConfirmationMessage.js +0 -1
  139. package/lib/posthog-react-native/src/surveys/components/ConfirmationMessage.js.map +0 -1
  140. package/lib/posthog-react-native/src/surveys/components/QuestionHeader.js +0 -1
  141. package/lib/posthog-react-native/src/surveys/components/QuestionHeader.js.map +0 -1
  142. package/lib/posthog-react-native/src/surveys/components/QuestionTypes.js +0 -1
  143. package/lib/posthog-react-native/src/surveys/components/QuestionTypes.js.map +0 -1
  144. package/lib/posthog-react-native/src/surveys/components/SurveyModal.js +0 -1
  145. package/lib/posthog-react-native/src/surveys/components/SurveyModal.js.map +0 -1
  146. package/lib/posthog-react-native/src/surveys/components/Surveys.js +0 -1
  147. package/lib/posthog-react-native/src/surveys/components/Surveys.js.map +0 -1
  148. package/lib/posthog-react-native/src/surveys/getActiveMatchingSurveys.js +0 -1
  149. package/lib/posthog-react-native/src/surveys/getActiveMatchingSurveys.js.map +0 -1
  150. package/lib/posthog-react-native/src/surveys/icons.js +0 -1
  151. package/lib/posthog-react-native/src/surveys/icons.js.map +0 -1
  152. package/lib/posthog-react-native/src/surveys/index.js.map +0 -1
  153. package/lib/posthog-react-native/src/surveys/surveys-utils.js +0 -1
  154. package/lib/posthog-react-native/src/surveys/surveys-utils.js.map +0 -1
  155. package/lib/posthog-react-native/src/surveys/useActivatedSurveys.js.map +0 -1
  156. package/lib/posthog-react-native/src/surveys/useSurveyStorage.js +0 -1
  157. package/lib/posthog-react-native/src/surveys/useSurveyStorage.js.map +0 -1
  158. package/lib/posthog-react-native/src/types.js.map +0 -1
  159. package/lib/posthog-react-native/src/version.d.ts +0 -1
  160. package/lib/posthog-react-native/src/version.js +0 -1
  161. package/lib/posthog-react-native/src/version.js.map +0 -1
  162. package/lib/posthog-react-native/tsconfig.tsbuildinfo +0 -1
  163. /package/{lib/posthog-react-native/src → dist}/PostHogContext.d.ts +0 -0
  164. /package/{lib/posthog-react-native/src → dist}/PostHogContext.js +0 -0
  165. /package/{lib/posthog-react-native/src → dist}/PostHogProvider.d.ts +0 -0
  166. /package/{lib/posthog-react-native/src → dist}/autocapture.d.ts +0 -0
  167. /package/{lib/posthog-react-native/src → dist}/frameworks/wix-navigation.d.ts +0 -0
  168. /package/{lib/posthog-react-native/src → dist}/frameworks/wix-navigation.js +0 -0
  169. /package/{lib/posthog-react-native/src → dist}/hooks/useFeatureFlag.js +0 -0
  170. /package/{lib/posthog-react-native/src → dist}/hooks/useFeatureFlags.js +0 -0
  171. /package/{lib/posthog-react-native/src → dist}/hooks/useNavigationTracker.d.ts +0 -0
  172. /package/{lib/posthog-react-native/src → dist}/hooks/useNavigationTracker.js +0 -0
  173. /package/{lib/posthog-react-native/src → dist}/hooks/usePostHog.d.ts +0 -0
  174. /package/{lib/posthog-react-native/src → dist}/hooks/usePostHog.js +0 -0
  175. /package/{lib/posthog-react-native/src → dist}/native-deps.d.ts +0 -0
  176. /package/{lib/posthog-react-native/src → dist}/optional/OptionalAsyncStorage.d.ts +0 -0
  177. /package/{lib/posthog-react-native/src → dist}/optional/OptionalAsyncStorage.js +0 -0
  178. /package/{lib/posthog-react-native/src → dist}/optional/OptionalExpoApplication.d.ts +0 -0
  179. /package/{lib/posthog-react-native/src → dist}/optional/OptionalExpoApplication.js +0 -0
  180. /package/{lib/posthog-react-native/src → dist}/optional/OptionalExpoDevice.d.ts +0 -0
  181. /package/{lib/posthog-react-native/src → dist}/optional/OptionalExpoDevice.js +0 -0
  182. /package/{lib/posthog-react-native/src → dist}/optional/OptionalExpoFileSystem.d.ts +0 -0
  183. /package/{lib/posthog-react-native/src → dist}/optional/OptionalExpoFileSystem.js +0 -0
  184. /package/{lib/posthog-react-native/src → dist}/optional/OptionalExpoLocalization.d.ts +0 -0
  185. /package/{lib/posthog-react-native/src → dist}/optional/OptionalExpoLocalization.js +0 -0
  186. /package/{lib/posthog-react-native/src → dist}/optional/OptionalReactNativeDeviceInfo.d.ts +0 -0
  187. /package/{lib/posthog-react-native/src → dist}/optional/OptionalReactNativeDeviceInfo.js +0 -0
  188. /package/{lib/posthog-react-native/src → dist}/optional/OptionalReactNativeLocalize.d.ts +0 -0
  189. /package/{lib/posthog-react-native/src → dist}/optional/OptionalReactNativeLocalize.js +0 -0
  190. /package/{lib/posthog-react-native/src → dist}/optional/OptionalReactNativeNavigation.d.ts +0 -0
  191. /package/{lib/posthog-react-native/src → dist}/optional/OptionalReactNativeNavigation.js +0 -0
  192. /package/{lib/posthog-react-native/src → dist}/optional/OptionalReactNativeNavigationWix.d.ts +0 -0
  193. /package/{lib/posthog-react-native/src → dist}/optional/OptionalReactNativeNavigationWix.js +0 -0
  194. /package/{lib/posthog-react-native/src → dist}/optional/OptionalReactNativeSafeArea.d.ts +0 -0
  195. /package/{lib/posthog-react-native/src → dist}/optional/OptionalReactNativeSafeArea.js +0 -0
  196. /package/{lib/posthog-react-native/src → dist}/optional/OptionalSessionReplay.d.ts +0 -0
  197. /package/{lib/posthog-react-native/src → dist}/optional/OptionalSessionReplay.js +0 -0
  198. /package/{lib/posthog-react-native/src → dist}/storage.d.ts +0 -0
  199. /package/{lib/posthog-react-native/src → dist}/surveys/icons.d.ts +0 -0
  200. /package/{lib/posthog-react-native/src → dist}/surveys/index.js +0 -0
  201. /package/{lib/posthog-react-native/src → dist}/surveys/useActivatedSurveys.js +0 -0
  202. /package/{lib/posthog-react-native/src → dist}/surveys/useSurveyStorage.d.ts +0 -0
  203. /package/{lib/posthog-react-native/src → dist}/types.d.ts +0 -0
  204. /package/{lib/posthog-react-native/src → dist}/types.js +0 -0
package/LICENSE ADDED
@@ -0,0 +1,245 @@
1
+ Copyright 2020 Posthog / Hiberly, Inc.
2
+
3
+ Copyright 2015 Mixpanel, Inc.
4
+
5
+ Licensed under the Apache License, Version 2.0 (the "License");
6
+ you may not use this work except in compliance with the License.
7
+ You may obtain a copy of the License below, or at:
8
+
9
+ http://www.apache.org/licenses/LICENSE-2.0
10
+
11
+ Unless required by applicable law or agreed to in writing, software
12
+ distributed under the License is distributed on an "AS IS" BASIS,
13
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ See the License for the specific language governing permissions and
15
+ limitations under the License.
16
+
17
+ Apache License
18
+ Version 2.0, January 2004
19
+ http://www.apache.org/licenses/
20
+
21
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
22
+
23
+ 1. Definitions.
24
+
25
+ "License" shall mean the terms and conditions for use, reproduction,
26
+ and distribution as defined by Sections 1 through 9 of this document.
27
+
28
+ "Licensor" shall mean the copyright owner or entity authorized by
29
+ the copyright owner that is granting the License.
30
+
31
+ "Legal Entity" shall mean the union of the acting entity and all
32
+ other entities that control, are controlled by, or are under common
33
+ control with that entity. For the purposes of this definition,
34
+ "control" means (i) the power, direct or indirect, to cause the
35
+ direction or management of such entity, whether by contract or
36
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
37
+ outstanding shares, or (iii) beneficial ownership of such entity.
38
+
39
+ "You" (or "Your") shall mean an individual or Legal Entity
40
+ exercising permissions granted by this License.
41
+
42
+ "Source" form shall mean the preferred form for making modifications,
43
+ including but not limited to software source code, documentation
44
+ source, and configuration files.
45
+
46
+ "Object" form shall mean any form resulting from mechanical
47
+ transformation or translation of a Source form, including but
48
+ not limited to compiled object code, generated documentation,
49
+ and conversions to other media types.
50
+
51
+ "Work" shall mean the work of authorship, whether in Source or
52
+ Object form, made available under the License, as indicated by a
53
+ copyright notice that is included in or attached to the work
54
+ (an example is provided in the Appendix below).
55
+
56
+ "Derivative Works" shall mean any work, whether in Source or Object
57
+ form, that is based on (or derived from) the Work and for which the
58
+ editorial revisions, annotations, elaborations, or other modifications
59
+ represent, as a whole, an original work of authorship. For the purposes
60
+ of this License, Derivative Works shall not include works that remain
61
+ separable from, or merely link (or bind by name) to the interfaces of,
62
+ the Work and Derivative Works thereof.
63
+
64
+ "Contribution" shall mean any work of authorship, including
65
+ the original version of the Work and any modifications or additions
66
+ to that Work or Derivative Works thereof, that is intentionally
67
+ submitted to Licensor for inclusion in the Work by the copyright owner
68
+ or by an individual or Legal Entity authorized to submit on behalf of
69
+ the copyright owner. For the purposes of this definition, "submitted"
70
+ means any form of electronic, verbal, or written communication sent
71
+ to the Licensor or its representatives, including but not limited to
72
+ communication on electronic mailing lists, source code control systems,
73
+ and issue tracking systems that are managed by, or on behalf of, the
74
+ Licensor for the purpose of discussing and improving the Work, but
75
+ excluding communication that is conspicuously marked or otherwise
76
+ designated in writing by the copyright owner as "Not a Contribution."
77
+
78
+ "Contributor" shall mean Licensor and any individual or Legal Entity
79
+ on behalf of whom a Contribution has been received by Licensor and
80
+ subsequently incorporated within the Work.
81
+
82
+ 2. Grant of Copyright License. Subject to the terms and conditions of
83
+ this License, each Contributor hereby grants to You a perpetual,
84
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
85
+ copyright license to reproduce, prepare Derivative Works of,
86
+ publicly display, publicly perform, sublicense, and distribute the
87
+ Work and such Derivative Works in Source or Object form.
88
+
89
+ 3. Grant of Patent License. Subject to the terms and conditions of
90
+ this License, each Contributor hereby grants to You a perpetual,
91
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
92
+ (except as stated in this section) patent license to make, have made,
93
+ use, offer to sell, sell, import, and otherwise transfer the Work,
94
+ where such license applies only to those patent claims licensable
95
+ by such Contributor that are necessarily infringed by their
96
+ Contribution(s) alone or by combination of their Contribution(s)
97
+ with the Work to which such Contribution(s) was submitted. If You
98
+ institute patent litigation against any entity (including a
99
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
100
+ or a Contribution incorporated within the Work constitutes direct
101
+ or contributory patent infringement, then any patent licenses
102
+ granted to You under this License for that Work shall terminate
103
+ as of the date such litigation is filed.
104
+
105
+ 4. Redistribution. You may reproduce and distribute copies of the
106
+ Work or Derivative Works thereof in any medium, with or without
107
+ modifications, and in Source or Object form, provided that You
108
+ meet the following conditions:
109
+
110
+ (a) You must give any other recipients of the Work or
111
+ Derivative Works a copy of this License; and
112
+
113
+ (b) You must cause any modified files to carry prominent notices
114
+ stating that You changed the files; and
115
+
116
+ (c) You must retain, in the Source form of any Derivative Works
117
+ that You distribute, all copyright, patent, trademark, and
118
+ attribution notices from the Source form of the Work,
119
+ excluding those notices that do not pertain to any part of
120
+ the Derivative Works; and
121
+
122
+ (d) If the Work includes a "NOTICE" text file as part of its
123
+ distribution, then any Derivative Works that You distribute must
124
+ include a readable copy of the attribution notices contained
125
+ within such NOTICE file, excluding those notices that do not
126
+ pertain to any part of the Derivative Works, in at least one
127
+ of the following places: within a NOTICE text file distributed
128
+ as part of the Derivative Works; within the Source form or
129
+ documentation, if provided along with the Derivative Works; or,
130
+ within a display generated by the Derivative Works, if and
131
+ wherever such third-party notices normally appear. The contents
132
+ of the NOTICE file are for informational purposes only and
133
+ do not modify the License. You may add Your own attribution
134
+ notices within Derivative Works that You distribute, alongside
135
+ or as an addendum to the NOTICE text from the Work, provided
136
+ that such additional attribution notices cannot be construed
137
+ as modifying the License.
138
+
139
+ You may add Your own copyright statement to Your modifications and
140
+ may provide additional or different license terms and conditions
141
+ for use, reproduction, or distribution of Your modifications, or
142
+ for any such Derivative Works as a whole, provided Your use,
143
+ reproduction, and distribution of the Work otherwise complies with
144
+ the conditions stated in this License.
145
+
146
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
147
+ any Contribution intentionally submitted for inclusion in the Work
148
+ by You to the Licensor shall be under the terms and conditions of
149
+ this License, without any additional terms or conditions.
150
+ Notwithstanding the above, nothing herein shall supersede or modify
151
+ the terms of any separate license agreement you may have executed
152
+ with Licensor regarding such Contributions.
153
+
154
+ 6. Trademarks. This License does not grant permission to use the trade
155
+ names, trademarks, service marks, or product names of the Licensor,
156
+ except as required for reasonable and customary use in describing the
157
+ origin of the Work and reproducing the content of the NOTICE file.
158
+
159
+ 7. Disclaimer of Warranty. Unless required by applicable law or
160
+ agreed to in writing, Licensor provides the Work (and each
161
+ Contributor provides its Contributions) on an "AS IS" BASIS,
162
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
163
+ implied, including, without limitation, any warranties or conditions
164
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
165
+ PARTICULAR PURPOSE. You are solely responsible for determining the
166
+ appropriateness of using or redistributing the Work and assume any
167
+ risks associated with Your exercise of permissions under this License.
168
+
169
+ 8. Limitation of Liability. In no event and under no legal theory,
170
+ whether in tort (including negligence), contract, or otherwise,
171
+ unless required by applicable law (such as deliberate and grossly
172
+ negligent acts) or agreed to in writing, shall any Contributor be
173
+ liable to You for damages, including any direct, indirect, special,
174
+ incidental, or consequential damages of any character arising as a
175
+ result of this License or out of the use or inability to use the
176
+ Work (including but not limited to damages for loss of goodwill,
177
+ work stoppage, computer failure or malfunction, or any and all
178
+ other commercial damages or losses), even if such Contributor
179
+ has been advised of the possibility of such damages.
180
+
181
+ 9. Accepting Warranty or Additional Liability. While redistributing
182
+ the Work or Derivative Works thereof, You may choose to offer,
183
+ and charge a fee for, acceptance of support, warranty, indemnity,
184
+ or other liability obligations and/or rights consistent with this
185
+ License. However, in accepting such obligations, You may act only
186
+ on Your own behalf and on Your sole responsibility, not on behalf
187
+ of any other Contributor, and only if You agree to indemnify,
188
+ defend, and hold each Contributor harmless for any liability
189
+ incurred by, or claims asserted against, such Contributor by reason
190
+ of your accepting any such warranty or additional liability.
191
+
192
+ END OF TERMS AND CONDITIONS
193
+
194
+ APPENDIX: How to apply the Apache License to your work.
195
+
196
+ To apply the Apache License to your work, attach the following
197
+ boilerplate notice, with the fields enclosed by brackets "[]"
198
+ replaced with your own identifying information. (Don't include
199
+ the brackets!) The text should be enclosed in the appropriate
200
+ comment syntax for the file format. We also recommend that a
201
+ file or class name and description of purpose be included on the
202
+ same "printed page" as the copyright notice for easier
203
+ identification within third-party archives.
204
+
205
+ Copyright [yyyy] [name of copyright owner]
206
+
207
+ Licensed under the Apache License, Version 2.0 (the "License");
208
+ you may not use this file except in compliance with the License.
209
+ You may obtain a copy of the License at
210
+
211
+ http://www.apache.org/licenses/LICENSE-2.0
212
+
213
+ Unless required by applicable law or agreed to in writing, software
214
+ distributed under the License is distributed on an "AS IS" BASIS,
215
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
216
+ See the License for the specific language governing permissions and
217
+ limitations under the License.
218
+
219
+
220
+ ---
221
+
222
+ Some files in this codebase contain code from getsentry/sentry-javascript by Software, Inc. dba Sentry.
223
+ In such cases it is explicitly stated in the file header. This license only applies to the relevant code in such cases.
224
+
225
+ MIT License
226
+
227
+ Copyright (c) 2012 Functional Software, Inc. dba Sentry
228
+
229
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
230
+ this software and associated documentation files (the "Software"), to deal in
231
+ the Software without restriction, including without limitation the rights to
232
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
233
+ of the Software, and to permit persons to whom the Software is furnished to do
234
+ so, subject to the following conditions:
235
+
236
+ The above copyright notice and this permission notice shall be included in all
237
+ copies or substantial portions of the Software.
238
+
239
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
240
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
241
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
242
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
243
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
244
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
245
+ SOFTWARE.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PostHogContext.js","sourceRoot":"","sources":["../src/PostHogContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,CAAC,aAAa,CAAsB,EAAE,MAAM,EAAE,SAA+B,EAAE,CAAC,CAAA"}
@@ -0,0 +1 @@
1
+ "use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _typeof=require("@babel/runtime/helpers/typeof");Object.defineProperty(exports,"__esModule",{value:true});exports.PostHogProvider=void 0;var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _posthogRn=require("./posthog-rn");var _autocapture=require("./autocapture");var _useNavigationTracker=require("./hooks/useNavigationTracker");var _PostHogContext=require("./PostHogContext");var _jsxRuntime=require("react/jsx-runtime");var _this=void 0,_jsxFileName="/home/runner/work/posthog-js/posthog-js/packages/react-native/dist/PostHogProvider.js";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(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(var _t2 in e)"default"!==_t2&&{}.hasOwnProperty.call(e,_t2)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t2))&&(i.get||i.set)?o(f,_t2,i):f[_t2]=e[_t2]);return f;})(e,t);}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable;})),t.push.apply(t,o);}return t;}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r){(0,_defineProperty2["default"])(e,r,t[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));});}return e;}function PostHogNavigationHook(_ref){var options=_ref.options,client=_ref.client;(0,_useNavigationTracker.useNavigationTracker)(options===null||options===void 0?void 0:options.navigation,options===null||options===void 0?void 0:options.navigationRef,client);return null;}var PostHogProvider=exports.PostHogProvider=function PostHogProvider(_ref2){var children=_ref2.children,client=_ref2.client,options=_ref2.options,apiKey=_ref2.apiKey,autocapture=_ref2.autocapture,style=_ref2.style,_ref2$debug=_ref2.debug,debug=_ref2$debug===void 0?false:_ref2$debug;var _a;if(!client&&!apiKey){throw new Error('Either a PostHog client or an apiKey is required. If you want to use the PostHogProvider without a client, please provide an apiKey and the options={ disabled: true }.');}var captureAll=autocapture===true;var captureNone=autocapture===false;var posthog=(0,_react.useMemo)(function(){if(client&&apiKey){console.warn('You have provided both a client and an apiKey to PostHogProvider. The apiKey will be ignored in favour of the client.');}if(client){return client;}var parsedOptions=_objectSpread(_objectSpread({},options),{},{captureAppLifecycleEvents:(options===null||options===void 0?void 0:options.captureAppLifecycleEvents)!==undefined?options.captureAppLifecycleEvents:!captureNone&&captureAll});return new _posthogRn.PostHog(apiKey!==null&&apiKey!==void 0?apiKey:'',parsedOptions);},[client,apiKey]);var autocaptureOptions=(0,_react.useMemo)(function(){return autocapture&&typeof autocapture!=='boolean'?autocapture:{};},[autocapture]);var captureTouches=!captureNone&&posthog&&(captureAll||(autocaptureOptions===null||autocaptureOptions===void 0?void 0:autocaptureOptions.captureTouches));var captureScreens=!captureNone&&posthog&&(captureAll||((_a=autocaptureOptions===null||autocaptureOptions===void 0?void 0:autocaptureOptions.captureScreens)!==null&&_a!==void 0?_a:true));var phLabelProp=(autocaptureOptions===null||autocaptureOptions===void 0?void 0:autocaptureOptions.customLabelProp)||_autocapture.defaultPostHogLabelProp;(0,_react.useEffect)(function(){posthog.debug(debug);},[debug,posthog]);var onTouch=(0,_react.useCallback)(function(type,e){if(!captureTouches){return;}if(type==='end'){(0,_autocapture.autocaptureFromTouchEvent)(e,posthog,autocaptureOptions);}},[captureTouches,posthog,autocaptureOptions]);return(0,_jsxRuntime.jsx)(_reactNative.View,_objectSpread(_objectSpread({},(0,_defineProperty2["default"])({},phLabelProp,'PostHogProvider')),{},{style:style||{flex:1},onTouchEndCapture:captureTouches?function(e){return onTouch('end',e);}:undefined,children:(0,_jsxRuntime.jsxs)(_PostHogContext.PostHogContext.Provider,{value:{client:posthog},children:[captureScreens&&(0,_jsxRuntime.jsx)(PostHogNavigationHook,{options:autocaptureOptions,client:posthog}),children]})}));};
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PostHogProvider.js","sourceRoot":"","sources":["../src/PostHogProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAC9D,OAAO,EAAoC,IAAI,EAAa,MAAM,cAAc,CAAA;AAChF,OAAO,EAAE,OAAO,EAAkB,MAAM,cAAc,CAAA;AACtD,OAAO,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAA;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAA;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAEjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAA;AAYvD,S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C,CAC5B,iBAAiB,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAEzE;MAAA,CAAC,cAAc,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAClD;QAAA,CAAC,cAAc,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,EAAG,CAC1F;QAAA,CAAC,QAAQ,CACX;MAAA,EAAE,cAAc,CAAC,QAAQ,CAC3B;IAAA,EAAE,IAAI,CAAC,CACR,CAAA;AACH,CAAC,CAAA"}
@@ -0,0 +1 @@
1
+ "use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.defaultPostHogLabelProp=exports.autocaptureFromTouchEvent=void 0;var _typeof2=_interopRequireDefault(require("@babel/runtime/helpers/typeof"));var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));function _createForOfIteratorHelper(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=_unsupportedIterableToArray(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var _n=0,F=function F(){};return{s:F,n:function n(){return _n>=r.length?{done:!0}:{done:!1,value:r[_n++]};},e:function e(r){throw r;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var o,a=!0,u=!1;return{s:function s(){t=t.call(r);},n:function n(){var r=t.next();return a=r.done,r;},e:function e(r){u=!0,o=r;},f:function f(){try{a||null==t["return"]||t["return"]();}finally{if(u)throw o;}}};}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}var _flattenStyles=function flattenStyles(styles){var flattened={};if(Array.isArray(styles)){var _iterator=_createForOfIteratorHelper(styles),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var style=_step.value;(0,_extends2["default"])(flattened,_flattenStyles(style));}}catch(err){_iterator.e(err);}finally{_iterator.f();}}else{(0,_extends2["default"])(flattened,styles);}return flattened;};var stringifyStyle=function stringifyStyle(styles){var flattened=_flattenStyles(styles);var str=Object.keys(flattened).map(function(x){return"".concat(x,":").concat(flattened[x]);}).join(';');return str;};var sanitiseLabel=function sanitiseLabel(label){return label.replace(/[^a-z0-9]+/gi,'-');};var defaultPostHogLabelProp=exports.defaultPostHogLabelProp='ph-label';var autocaptureFromTouchEvent=exports.autocaptureFromTouchEvent=function autocaptureFromTouchEvent(e,posthog){var options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var _a,_b;var _options$noCapturePro=options.noCaptureProp,noCaptureProp=_options$noCapturePro===void 0?'ph-no-capture':_options$noCapturePro,_options$customLabelP=options.customLabelProp,customLabelProp=_options$customLabelP===void 0?defaultPostHogLabelProp:_options$customLabelP,_options$maxElementsC=options.maxElementsCaptured,maxElementsCaptured=_options$maxElementsC===void 0?20:_options$maxElementsC,_options$ignoreLabels=options.ignoreLabels,ignoreLabels=_options$ignoreLabels===void 0?[]:_options$ignoreLabels,_options$propsToCaptu=options.propsToCapture,propsToCapture=_options$propsToCaptu===void 0?['style','testID','accessibilityLabel',customLabelProp,'children']:_options$propsToCaptu;if(!e._targetInst){return;}var elements=[];var currentInst=e._targetInst;var _loop=function _loop(){var el={tag_name:''};var props=currentInst.memoizedProps;if(props===null||props===void 0?void 0:props[noCaptureProp]){return{v:void 0};}if(props){Object.keys(props).forEach(function(key){if(!propsToCapture.includes(key)){return;}var value=props[key];if(key==='style'){el.attr__style=stringifyStyle(value);}else if(['string','number','boolean'].includes((0,_typeof2["default"])(value))){if(key==='children'){el.$el_text=typeof value==='string'?value:JSON.stringify(value);}else{el["attr__".concat(key)]=value;}}});}var label=typeof(props===null||props===void 0?void 0:props[customLabelProp])!=='undefined'?"".concat(props[customLabelProp]):((_a=currentInst.elementType)===null||_a===void 0?void 0:_a.displayName)||((_b=currentInst.elementType)===null||_b===void 0?void 0:_b.name);if(label&&!ignoreLabels.includes(label)){el.tag_name=sanitiseLabel(label);elements.push(el);}currentInst=currentInst["return"];},_ret;while(currentInst&&elements.length<maxElementsCaptured){_ret=_loop();if(_ret)return _ret.v;}if(elements.length){var elAttrLabelKey="attr__".concat(customLabelProp);var lastLabel=undefined;for(var i=elements.length-1;i>=0;i--){var element=elements[i];if(element[elAttrLabelKey]){lastLabel=element[elAttrLabelKey];}if(lastLabel){element['tag_name']=lastLabel;}}posthog.autocapture('touch',elements,{$touch_x:e.nativeEvent.pageX,$touch_y:e.nativeEvent.pageY});}};
@@ -0,0 +1 @@
1
+ {"version":3,"file":"autocapture.js","sourceRoot":"","sources":["../src/autocapture.tsx"],"names":[],"mappings":"AAaA,MAAM,aAAa,GAAG,CAAC,MAAW,EAAO,EAAE;IACzC,MAAM,SAAS,GAAQ,EAAE,CAAA;IAEzB,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QAC1B,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;YAC3B,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,aAAa,CAAC,KAAK,CAAC,CAAC,CAAA;QAChD,CAAC;IACH,CAAC;SAAM,CAAC;QACN,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,CAAA;IAClC,CAAC;IAED,OAAO,SAAS,CAAA;AACl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AM,yBAAyB,GAAG,CAAC,OAAgB,EAAE,UAAqC,EAAE,EAAW,EAAE;IAC9G,IAAI,CAAC,gCAAgC,EAAE,CAAC;QACtC,OAAO,KAAK,CAAA;IACd,CAAC;IAED,MAAM,UAAU,GAAG,gCAAgC,CAAC,UAAU,CAAA;IAE9D,uCAAuC;IACvC,UAAU,CAAC,MAAM,EAAE,CAAC,kCAAkC,CAAC,CAAC,EAAE,aAAa,EAAE,SAAS,EAAE,EAAE,EAAE;;QACtF,IAAI,CAAC,CAAC,MAAA,OAAO,CAAC,cAAc,mCAAI,IAAI,CAAC,EAAE,CAAC;YACtC,OAAM;QACR,CAAC;QAED,MAAM,gBAAgB,GACpB,CAAA,MAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,UAAU,0CAAE,WAAW,mDAAG,aAAa,EAAE,SAAS,IAAI,EAAE,CAAC,KAAI,aAAa,IAAI,SAAS,CAAA;QAElG,IAAI,gBAAgB,EAAE,CAAC;YACrB,MAAM,UAAU,GAAG,MAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,UAAU,0CAAE,iBAAiB,mDAAG,gBAAgB,EAAE,SAAS,IAAI,EAAE,CAAC,CAAA;YAC9F,OAAO,CAAC,MAAM,CAAC,gBAAgB,EAAE,UAAU,CAAC,CAAA;QAC9C,CAAC;IACH,CAAC,CAAC,CAAA;IAEF,OAAO,IAAI,CAAA;AACb,CAAC,CAAA"}
@@ -1,4 +1,4 @@
1
- import { JsonType, FeatureFlagValue } from 'posthog-core/src';
1
+ import { JsonType, FeatureFlagValue } from '@posthog/core';
2
2
  import { PostHog } from '../posthog-rn';
3
3
  export declare function useFeatureFlag(flag: string, client?: PostHog): FeatureFlagValue | undefined;
4
4
  export type FeatureFlagWithPayload = [FeatureFlagValue | undefined, JsonType | undefined];
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFeatureFlag.js","sourceRoot":"","sources":["../../src/hooks/useFeatureFlag.ts"],"names":[],"mappings":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,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;QACrF,CAAC,CAAC,CAAA;IACJ,CAAC,EAAE,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAA;IAEnB,OAAO,WAAW,CAAA;AACpB,CAAC"}
@@ -1,3 +1,3 @@
1
1
  import type { PostHog } from '../posthog-rn';
2
- import { PostHogFlagsResponse } from 'posthog-core';
2
+ import { PostHogFlagsResponse } from '@posthog/core';
3
3
  export declare function useFeatureFlags(client?: PostHog): PostHogFlagsResponse['featureFlags'] | undefined;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFeatureFlags.js","sourceRoot":"","sources":["../../src/hooks/useFeatureFlags.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAG3C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC,MAAM,UAAU,eAAe,CAAC,MAAgB;IAC9C,MAAM,aAAa,GAAG,UAAU,EAAE,CAAA;IAClC,MAAM,OAAO,GAAG,MAAM,IAAI,aAAa,CAAA;IACvC,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAC9C,OAAO,CAAC,eAAe,EAAE,CAC1B,CAAA;IAED,SAAS,CAAC,GAAG,EAAE;QACb,eAAe,CAAC,OAAO,CAAC,eAAe,EAAE,CAAC,CAAA;QAC1C,OAAO,OAAO,CAAC,cAAc,CAAC,CAAC,KAAK,EAAE,EAAE;YACtC,eAAe,CAAC,KAAK,CAAC,CAAA;QACxB,CAAC,CAAC,CAAA;IACJ,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAA;IAEb,OAAO,YAAY,CAAA;AACrB,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useNavigationTracker.js","sourceRoot":"","sources":["../../src/hooks/useNavigationTracker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AA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GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,iBAAiB,wDAAG,gBAAgB,EAAE,MAAM,CAAC,CAAA;YACzE,OAAO,CAAC,MAAM,CAAC,gBAAgB,EAAE,UAAU,CAAC,CAAA;QAC9C,CAAC;IACH,CAAC,EAAE,CAAC,UAAU,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAA;IAElC,sDAAsD;IACtD,SAAS,CAAC,GAAG,EAAE;QACb,mJAAmJ;QACnJ,sDAAsD;QACtD,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,UAAU,CAAC,UAAU,EAAE,CAAC,CAAC,CAAA;YACzB,OAAM;QACR,CAAC;QACD,UAAU,EAAE,CAAA;IACd,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAA;AAC1B,CAAC;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAG,6BAA6B;IAC/D,CAAC,CAAC,qBAAqB;IACvB,CAAC,CAAC,6BAA6B,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePostHog.js","sourceRoot":"","sources":["../../src/hooks/usePostHog.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAElD,MAAM,CAAC,MAAM,UAAU,GAAG,GAAY,EAAE;IACtC,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,CAAA;IACnD,OAAO,MAAM,CAAA;AACf,CAAC,CAAA"}
@@ -0,0 +1,10 @@
1
+ import { PostHog } from './posthog-rn';
2
+ export default PostHog;
3
+ export * from './posthog-rn';
4
+ export * from './hooks/useNavigationTracker';
5
+ export * from './hooks/useFeatureFlags';
6
+ export * from './hooks/useFeatureFlag';
7
+ export * from './hooks/usePostHog';
8
+ export * from './PostHogProvider';
9
+ export * from './types';
10
+ export * from './surveys';
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});var _exportNames={};exports["default"]=void 0;var _posthogRn=require("./posthog-rn");Object.keys(_posthogRn).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call(_exportNames,key))return;if(key in exports&&exports[key]===_posthogRn[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _posthogRn[key];}});});var _useNavigationTracker=require("./hooks/useNavigationTracker");Object.keys(_useNavigationTracker).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call(_exportNames,key))return;if(key in exports&&exports[key]===_useNavigationTracker[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _useNavigationTracker[key];}});});var _useFeatureFlags=require("./hooks/useFeatureFlags");Object.keys(_useFeatureFlags).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call(_exportNames,key))return;if(key in exports&&exports[key]===_useFeatureFlags[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _useFeatureFlags[key];}});});var _useFeatureFlag=require("./hooks/useFeatureFlag");Object.keys(_useFeatureFlag).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call(_exportNames,key))return;if(key in exports&&exports[key]===_useFeatureFlag[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _useFeatureFlag[key];}});});var _usePostHog=require("./hooks/usePostHog");Object.keys(_usePostHog).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call(_exportNames,key))return;if(key in exports&&exports[key]===_usePostHog[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _usePostHog[key];}});});var _PostHogProvider=require("./PostHogProvider");Object.keys(_PostHogProvider).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call(_exportNames,key))return;if(key in exports&&exports[key]===_PostHogProvider[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _PostHogProvider[key];}});});var _types=require("./types");Object.keys(_types).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call(_exportNames,key))return;if(key in exports&&exports[key]===_types[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _types[key];}});});var _surveys=require("./surveys");Object.keys(_surveys).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call(_exportNames,key))return;if(key in exports&&exports[key]===_surveys[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _surveys[key];}});});var _default=exports["default"]=_posthogRn.PostHog;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC,eAAe,OAAO,CAAA;AACtB,cAAc,cAAc,CAAA;AAC5B,cAAc,8BAA8B,CAAA;AAC5C,cAAc,yBAAyB,CAAA;AACvC,cAAc,wBAAwB,CAAA;AACtC,cAAc,oBAAoB,CAAA;AAClC,cAAc,mBAAmB,CAAA;AACjC,cAAc,SAAS,CAAA;AACvB,cAAc,WAAW,CAAA"}
@@ -0,0 +1 @@
1
+ "use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _typeof=require("@babel/runtime/helpers/typeof");Object.defineProperty(exports,"__esModule",{value:true});exports.getAppProperties=exports.currentDeviceType=exports.buildOptimisiticAsyncStorage=void 0;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _reactNative=require("react-native");var _OptionalAsyncStorage=require("./optional/OptionalAsyncStorage");var _OptionalExpoApplication=require("./optional/OptionalExpoApplication");var _OptionalExpoDevice=require("./optional/OptionalExpoDevice");var _OptionalExpoFileSystem=require("./optional/OptionalExpoFileSystem");var _OptionalExpoLocalization=require("./optional/OptionalExpoLocalization");var _OptionalReactNativeDeviceInfo=require("./optional/OptionalReactNativeDeviceInfo");var _OptionalReactNativeLocalize=require("./optional/OptionalReactNativeLocalize");function _regeneratorRuntime(){"use strict";_regeneratorRuntime=function _regeneratorRuntime(){return r;};var t,r={},e=Object.prototype,n=e.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,r,e,n){return Object.defineProperty(t,r,{value:e,enumerable:!n,configurable:!n,writable:!n});}try{c({},"");}catch(t){c=function c(t,r,e){return t[r]=e;};}function h(r,e,n,o){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype);return c(a,"_invoke",function(r,e,n){var o=1;return function(i,a){if(3===o)throw Error("Generator is already running");if(4===o){if("throw"===i)throw a;return{value:t,done:!0};}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=d(u,n);if(c){if(c===f)continue;return c;}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(1===o)throw o=4,n.arg;n.dispatchException(n.arg);}else"return"===n.method&&n.abrupt("return",n.arg);o=3;var h=s(r,e,n);if("normal"===h.type){if(o=n.done?4:2,h.arg===f)continue;return{value:h.arg,done:n.done};}"throw"===h.type&&(o=4,n.method="throw",n.arg=h.arg);}};}(r,n,new Context(o||[])),!0),a;}function s(t,r,e){try{return{type:"normal",arg:t.call(r,e)};}catch(t){return{type:"throw",arg:t};}}r.wrap=h;var f={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var l={};c(l,i,function(){return this;});var p=Object.getPrototypeOf,y=p&&p(p(x([])));y&&y!==e&&n.call(y,i)&&(l=y);var v=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(l);function g(t){["next","throw","return"].forEach(function(r){c(t,r,function(t){return this._invoke(r,t);});});}function AsyncIterator(t,r){function e(o,i,a,u){var c=s(t[o],t,i);if("throw"!==c.type){var h=c.arg,f=h.value;return f&&"object"==_typeof(f)&&n.call(f,"__await")?r.resolve(f.__await).then(function(t){e("next",t,a,u);},function(t){e("throw",t,a,u);}):r.resolve(f).then(function(t){h.value=t,a(h);},function(t){return e("throw",t,a,u);});}u(c.arg);}var o;c(this,"_invoke",function(t,n){function i(){return new r(function(r,o){e(t,n,r,o);});}return o=o?o.then(i,i):i();},!0);}function d(r,e){var n=e.method,o=r.i[n];if(o===t)return e.delegate=null,"throw"===n&&r.i["return"]&&(e.method="return",e.arg=t,d(r,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=s(o,r.i,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,f;var a=i.arg;return a?a.done?(e[r.r]=a.value,e.next=r.n,"return"!==e.method&&(e.method="next",e.arg=t),e.delegate=null,f):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f);}function w(t){this.tryEntries.push(t);}function m(r){var e=r[4]||{};e.type="normal",e.arg=t,r[4]=e;}function Context(t){this.tryEntries=[[-1]],t.forEach(w,this),this.reset(!0);}function x(r){if(null!=r){var e=r[i];if(e)return e.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,a=function e(){for(;++o<r.length;)if(n.call(r,o))return e.value=r[o],e.done=!1,e;return e.value=t,e.done=!0,e;};return a.next=a;}}throw new TypeError(_typeof(r)+" is not iterable");}return GeneratorFunction.prototype=GeneratorFunctionPrototype,c(v,"constructor",GeneratorFunctionPrototype),c(GeneratorFunctionPrototype,"constructor",GeneratorFunction),GeneratorFunction.displayName=c(GeneratorFunctionPrototype,u,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name));},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,c(t,u,"GeneratorFunction")),t.prototype=Object.create(v),t;},r.awrap=function(t){return{__await:t};},g(AsyncIterator.prototype),c(AsyncIterator.prototype,a,function(){return this;}),r.AsyncIterator=AsyncIterator,r.async=function(t,e,n,o,i){void 0===i&&(i=Promise);var a=new AsyncIterator(h(t,e,n,o),i);return r.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next();});},g(v),c(v,u,"Generator"),c(v,i,function(){return this;}),c(v,"toString",function(){return"[object Generator]";}),r.keys=function(t){var r=Object(t),e=[];for(var n in r)e.unshift(n);return function t(){for(;e.length;)if((n=e.pop())in r)return t.value=n,t.done=!1,t;return t.done=!0,t;};},r.values=x,Context.prototype={constructor:Context,reset:function reset(r){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(m),!r)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=t);},stop:function stop(){this.done=!0;var t=this.tryEntries[0][4];if("throw"===t.type)throw t.arg;return this.rval;},dispatchException:function dispatchException(r){if(this.done)throw r;var e=this;function n(t){a.type="throw",a.arg=r,e.next=t;}for(var o=e.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i[4],u=this.prev,c=i[1],h=i[2];if(-1===i[0])return n("end"),!1;if(!c&&!h)throw Error("try statement without catch or finally");if(null!=i[0]&&i[0]<=u){if(u<c)return this.method="next",this.arg=t,n(c),!0;if(u<h)return n(h),!1;}}},abrupt:function abrupt(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n[0]>-1&&n[0]<=this.prev&&this.prev<n[2]){var o=n;break;}}o&&("break"===t||"continue"===t)&&o[0]<=r&&r<=o[2]&&(o=null);var i=o?o[4]:{};return i.type=t,i.arg=r,o?(this.method="next",this.next=o[2],f):this.complete(i);},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),f;},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e[2]===t)return this.complete(e[4],e[3]),m(e),f;}},"catch":function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e[0]===t){var n=e[4];if("throw"===n.type){var o=n.arg;m(e);}return o;}}throw Error("illegal catch attempt");},delegateYield:function delegateYield(r,e,n){return this.delegate={i:x(r),r:e,n:n},"next"===this.method&&(this.arg=t),f;}},r;}var getDeviceType=function getDeviceType(){var deviceType='Mobile';if(_reactNative.Platform.OS==='macos'||_reactNative.Platform.OS==='windows'){deviceType='Desktop';}else if(_reactNative.Platform.OS==='web'){deviceType='Web';}return deviceType;};var currentDeviceType=exports.currentDeviceType=getDeviceType();var getAppProperties=exports.getAppProperties=function getAppProperties(){var properties={$device_type:currentDeviceType};if(_OptionalExpoApplication.OptionalExpoApplication){properties.$app_build=_OptionalExpoApplication.OptionalExpoApplication.nativeBuildVersion;properties.$app_name=_OptionalExpoApplication.OptionalExpoApplication.applicationName;properties.$app_namespace=_OptionalExpoApplication.OptionalExpoApplication.applicationId;properties.$app_version=_OptionalExpoApplication.OptionalExpoApplication.nativeApplicationVersion;}else if(_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo){properties.$app_build=returnPropertyIfNotUnknown(_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getBuildNumber());properties.$app_name=returnPropertyIfNotUnknown(_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getApplicationName());properties.$app_namespace=returnPropertyIfNotUnknown(_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getBundleId());properties.$app_version=returnPropertyIfNotUnknown(_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getVersion());}if(_OptionalExpoDevice.OptionalExpoDevice){properties.$device_manufacturer=_OptionalExpoDevice.OptionalExpoDevice.manufacturer;properties.$device_name=_OptionalExpoDevice.OptionalExpoDevice.modelName;if(_reactNative.Platform.OS==='android'){properties.$os_name='Android';}else{properties.$os_name=_OptionalExpoDevice.OptionalExpoDevice.osName;}properties.$os_version=_OptionalExpoDevice.OptionalExpoDevice.osVersion;}else if(_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo){properties.$device_manufacturer=returnPropertyIfNotUnknown(_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getManufacturerSync());properties.$device_name=returnPropertyIfNotUnknown(_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getModel());properties.$os_name=returnPropertyIfNotUnknown(_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getSystemName());properties.$os_version=returnPropertyIfNotUnknown(_OptionalReactNativeDeviceInfo.OptionalReactNativeDeviceInfo.getSystemVersion());}if(_OptionalExpoLocalization.OptionalExpoLocalization){properties.$locale=_OptionalExpoLocalization.OptionalExpoLocalization.locale;properties.$timezone=_OptionalExpoLocalization.OptionalExpoLocalization.timezone;}else if(_OptionalReactNativeLocalize.OptionalReactNativeLocalize){var localesFn=_OptionalReactNativeLocalize.OptionalReactNativeLocalize.getLocales;if(localesFn){var locales=localesFn();if(locales&&locales.length>0){var languageTag=locales[0].languageTag;if(languageTag){properties.$locale=languageTag;}}}var timezoneFn=_OptionalReactNativeLocalize.OptionalReactNativeLocalize.getTimeZone;if(timezoneFn){var timezone=timezoneFn();if(timezone){properties.$timezone=timezone;}}}return properties;};var returnPropertyIfNotUnknown=function returnPropertyIfNotUnknown(value){if(value!=='unknown'){return value;}return null;};var buildOptimisiticAsyncStorage=exports.buildOptimisiticAsyncStorage=function buildOptimisiticAsyncStorage(){if(_OptionalExpoFileSystem.OptionalExpoFileSystem&&_reactNative.Platform.OS!=='web'&&_reactNative.Platform.OS!=='macos'){var filesystem=_OptionalExpoFileSystem.OptionalExpoFileSystem;return{getItem:function getItem(key){return(0,_asyncToGenerator2["default"])(_regeneratorRuntime().mark(function _callee(){var uri,stringContent;return _regeneratorRuntime().wrap(function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:uri=(filesystem.documentDirectory||'')+key;_context.prev=1;_context.next=4;return filesystem.readAsStringAsync(uri);case 4:stringContent=_context.sent;return _context.abrupt("return",stringContent);case 8:_context.prev=8;_context.t0=_context["catch"](1);return _context.abrupt("return",null);case 11:case"end":return _context.stop();}},_callee,null,[[1,8]]);}))();},setItem:function setItem(key,value){return(0,_asyncToGenerator2["default"])(_regeneratorRuntime().mark(function _callee2(){var uri;return _regeneratorRuntime().wrap(function _callee2$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:uri=(filesystem.documentDirectory||'')+key;_context2.next=3;return filesystem.writeAsStringAsync(uri,value);case 3:case"end":return _context2.stop();}},_callee2);}))();}};}if(_OptionalAsyncStorage.OptionalAsyncStorage){return _OptionalAsyncStorage.OptionalAsyncStorage;}throw new Error('PostHog: No storage available. Please install expo-filesystem or react-native-async-storage OR implement a custom storage provider.');};
@@ -0,0 +1 @@
1
+ {"version":3,"file":"native-deps.js","sourceRoot":"","sources":["../src/native-deps.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AACvC,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAA;AACtE,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAA;AAC5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAA;AAClE,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAA;AAC1E,OAAO,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAA;AAC9E,OAAO,EAAE,6BAA6B,EAAE,MAAM,0CAA0C,CAAA;AAExF,OAAO,EAAE,2BAA2B,EAAE,MAAM,wCAAwC,CAAA;AAEpF,MAAM,aAAa,GAAG,GAAW,EAAE;IACjC,IAAI,UAAU,GAAG,QAAQ,CAAA;IAEzB,IAAI,QAAQ,CAAC,EAAE,KAAK,OAAO,IAAI,QAAQ,CAAC,EAAE,KAAK,SAAS,E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AAC;SACF,CAAA;IACH,CAAC;IAED,IAAI,oBAAoB,EAAE,CAAC;QACzB,OAAO,oBAAoB,CAAA;IAC7B,CAAC;IAED,MAAM,IAAI,KAAK,CACb,qIAAqI,CACtI,CAAA;AACH,CAAC,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OptionalAsyncStorage.js","sourceRoot":"","sources":["../../src/optional/OptionalAsyncStorage.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,IAAI,oBAAoB,GAAoC,SAAS,CAAA;AAE5E,IAAI,CAAC;IACH,8DAA8D;IAC9D,oBAAoB,GAAG,OAAO,CAAC,2CAA2C,CAAC,CAAC,OAAO,CAAA;AACrF,CAAC;AAAC,OAAO,CAAC,EAAE,CAAC,CAAA,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OptionalExpoApplication.js","sourceRoot":"","sources":["../../src/optional/OptionalExpoApplication.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAEvC,MAAM,CAAC,IAAI,uBAAuB,GAAuC,SAAS,CAAA;AAElF,IAAI,CAAC;IACH,sBAAsB;IACtB,uBAAuB,GAAG,QAAQ,CAAC,MAAM,CAAC;QACxC,KAAK,EAAE,SAAS;QAChB,OAAO,EAAE,OAAO,CAAC,kBAAkB,CAAC;KACrC,CAAC,CAAA;AACJ,CAAC;AAAC,OAAO,CAAC,EAAE,CAAC,CAAA,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OptionalExpoDevice.js","sourceRoot":"","sources":["../../src/optional/OptionalExpoDevice.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAEvC,MAAM,CAAC,IAAI,kBAAkB,GAAkC,SAAS,CAAA;AAExE,IAAI,CAAC;IACH,sBAAsB;IACtB,kBAAkB,GAAG,QAAQ,CAAC,MAAM,CAAC;QACnC,KAAK,EAAE,SAAS;QAChB,OAAO,EAAE,OAAO,CAAC,aAAa,CAAC;KAChC,CAAC,CAAA;AACJ,CAAC;AAAC,OAAO,CAAC,EAAE,CAAC,CAAA,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OptionalExpoFileSystem.js","sourceRoot":"","sources":["../../src/optional/OptionalExpoFileSystem.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAEvC,MAAM,CAAC,IAAI,sBAAsB,GAAsC,SAAS,CAAA;AAEhF,IAAI,CAAC;IACH,yFAAyF;IACzF,4FAA4F;IAC5F,4DAA4D;IAC5D,sFAAsF;IACtF,4EAA4E;IAC5E,sBAAsB,GAAG,QAAQ,CAAC,MAAM,CAAC;QACvC,KAAK,EAAE,SAAS;QAChB,GAAG,EAAE,SAAS;QACd,OAAO,EAAE,OAAO,CAAC,kBAAkB,CAAC;KACrC,CAAC,CAAA;AACJ,CAAC;AAAC,OAAO,CAAC,EAAE,CAAC,CAAA,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OptionalExpoLocalization.js","sourceRoot":"","sources":["../../src/optional/OptionalExpoLocalization.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAEvC,MAAM,CAAC,IAAI,wBAAwB,GAAwC,SAAS,CAAA;AAEpF,IAAI,CAAC;IACH,sBAAsB;IACtB,wBAAwB,GAAG,QAAQ,CAAC,MAAM,CAAC;QACzC,KAAK,EAAE,SAAS;QAChB,OAAO,EAAE,OAAO,CAAC,mBAAmB,CAAC;KACtC,CAAC,CAAA;AACJ,CAAC;AAAC,OAAO,CAAC,EAAE,CAAC,CAAA,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OptionalReactNativeDeviceInfo.js","sourceRoot":"","sources":["../../src/optional/OptionalReactNativeDeviceInfo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAGvC,MAAM,CAAC,IAAI,6BAA6B,GAA6C,SAAS,CAAA;AAE9F,IAAI,CAAC;IACH,sBAAsB;IACtB,6BAA6B,GAAG,QAAQ,CAAC,MAAM,CAAC;QAC9C,KAAK,EAAE,SAAS;QAChB,OAAO,EAAE,OAAO,CAAC,0BAA0B,CAAC,EAAE,kCAAkC;KACjF,CAAC,CAAA;AACJ,CAAC;AAAC,OAAO,CAAC,EAAE,CAAC,CAAA,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OptionalReactNativeLocalize.js","sourceRoot":"","sources":["../../src/optional/OptionalReactNativeLocalize.ts"],"names":[],"mappings":"AAcA,MAAM,CAAC,IAAI,2BAA2B,GAA2C,SAAS,CAAA;AAE1F,+BAA+B;AAC/B,+DAA+D;AAC/D,IAAI,CAAC;IACH,2BAA2B,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAA;AAChE,CAAC;AAAC,OAAO,CAAC,EAAE,CAAC,CAAA,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OptionalReactNativeNavigation.js","sourceRoot":"","sources":["../../src/optional/OptionalReactNativeNavigation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAEvC,MAAM,CAAC,IAAI,6BAA6B,GAA6C,SAAS,CAAA;AAE9F,IAAI,CAAC;IACH,sBAAsB;IACtB,6BAA6B,GAAG,QAAQ,CAAC,MAAM,CAAC;QAC9C,KAAK,EAAE,SAAS;QAChB,6EAA6E;QAC7E,OAAO,EAAE,OAAO,CAAC,0BAA0B,CAAC;KAC7C,CAAC,CAAA;AACJ,CAAC;AAAC,OAAO,CAAC,EAAE,CAAC,CAAA,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OptionalReactNativeNavigationWix.js","sourceRoot":"","sources":["../../src/optional/OptionalReactNativeNavigationWix.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAGvC,MAAM,CAAC,IAAI,gCAAgC,GAAgD,SAAS,CAAA;AAEpG,IAAI,CAAC;IACH,0BAA0B;IAC1B,gCAAgC,GAAG,QAAQ,CAAC,MAAM,CAAC;QACjD,KAAK,EAAE,SAAS;QAChB,GAAG,EAAE,SAAS;QACd,OAAO,EAAE,OAAO,CAAC,yBAAyB,CAAC;KAC5C,CAAC,CAAA;AACJ,CAAC;AAAC,OAAO,CAAC,EAAE,CAAC,CAAA,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OptionalReactNativeSafeArea.js","sourceRoot":"","sources":["../../src/optional/OptionalReactNativeSafeArea.ts"],"names":[],"mappings":"AAEA,IAAI,kBAAkB,GAAyC,SAAS,CAAA;AAExE,IAAI,CAAC;IACH,kBAAkB,GAAG,OAAO,CAAC,gCAAgC,CAAC,CAAA;AAChE,CAAC;AAAC,OAAO,CAAC,EAAE,CAAC,CAAA,CAAC;AAEd,SAAS,mBAAmB;IAC1B,yFAAyF;IACzF,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAA;AACnD,CAAC;AAED,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAAiC,EAAE;;IAC1E,MAAM,iBAAiB,GAAG,MAAA,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,iBAAiB,mCAAI,mBAAmB,CAAA;IACtF,IAAI,CAAC;QACH,OAAO,iBAAiB,EAAE,CAAA;IAC5B,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,mBAAmB,EAAE,CAAA;IAC9B,CAAC;AACH,CAAC,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OptionalSessionReplay.js","sourceRoot":"","sources":["../../src/optional/OptionalSessionReplay.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAIvC,MAAM,CAAC,IAAI,gCAAgC,GAAuD,SAAS,CAAA;AAE3G,IAAI,CAAC;IACH,gCAAgC,GAAG,QAAQ,CAAC,MAAM,CAAC;QACjD,KAAK,EAAE,SAAS;QAChB,GAAG,EAAE,SAAS;QACd,OAAO,EAAE,OAAO,CAAC,qCAAqC,CAAC,EAAE,uBAAuB;KACjF,CAAC,CAAA;AACJ,CAAC;AAAC,OAAO,CAAC,EAAE,CAAC,CAAA,CAAC"}
@@ -1,6 +1,7 @@
1
- import { PostHogCaptureOptions, PostHogCore, PostHogCoreOptions, PostHogEventProperties, PostHogFetchOptions, PostHogFetchResponse, PostHogPersistedProperty, SurveyResponse } from '../../posthog-core/src';
1
+ import { PostHogCaptureOptions, PostHogCore, PostHogCoreOptions, PostHogEventProperties, PostHogFetchOptions, PostHogFetchResponse, PostHogPersistedProperty, SurveyResponse } from '@posthog/core';
2
2
  import { PostHogAutocaptureOptions, PostHogCustomAppProperties, PostHogCustomStorage, PostHogSessionReplayConfig } from './types';
3
3
  import { OptionalReactNativeSessionReplay } from './optional/OptionalSessionReplay';
4
+ export { PostHogPersistedProperty };
4
5
  export type PostHogOptions = PostHogCoreOptions & {
5
6
  /** Allows you to provide the storage type. By default 'file'.
6
7
  * 'file' will try to load the best available storage, the provided 'customStorage', 'customAsyncStorage' or in-memory storage.
@@ -0,0 +1 @@
1
+ "use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _typeof3=require("@babel/runtime/helpers/typeof");Object.defineProperty(exports,"__esModule",{value:true});exports.PostHog=void 0;Object.defineProperty(exports,"PostHogPersistedProperty",{enumerable:true,get:function get(){return _core.PostHogPersistedProperty;}});var _typeof2=_interopRequireDefault(require("@babel/runtime/helpers/typeof"));var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _get2=_interopRequireDefault(require("@babel/runtime/helpers/get"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var _reactNative=require("react-native");var _core=require("@posthog/core");var _storage=require("./storage");var _version=require("./version");var _nativeDeps=require("./native-deps");var _wixNavigation=require("./frameworks/wix-navigation");var _OptionalSessionReplay=require("./optional/OptionalSessionReplay");function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable;})),t.push.apply(t,o);}return t;}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r){(0,_defineProperty2["default"])(e,r,t[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));});}return e;}function _regeneratorRuntime(){"use strict";_regeneratorRuntime=function _regeneratorRuntime(){return r;};var t,r={},e=Object.prototype,n=e.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,r,e,n){return Object.defineProperty(t,r,{value:e,enumerable:!n,configurable:!n,writable:!n});}try{c({},"");}catch(t){c=function c(t,r,e){return t[r]=e;};}function h(r,e,n,o){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype);return c(a,"_invoke",function(r,e,n){var o=1;return function(i,a){if(3===o)throw Error("Generator is already running");if(4===o){if("throw"===i)throw a;return{value:t,done:!0};}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=d(u,n);if(c){if(c===f)continue;return c;}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(1===o)throw o=4,n.arg;n.dispatchException(n.arg);}else"return"===n.method&&n.abrupt("return",n.arg);o=3;var h=s(r,e,n);if("normal"===h.type){if(o=n.done?4:2,h.arg===f)continue;return{value:h.arg,done:n.done};}"throw"===h.type&&(o=4,n.method="throw",n.arg=h.arg);}};}(r,n,new Context(o||[])),!0),a;}function s(t,r,e){try{return{type:"normal",arg:t.call(r,e)};}catch(t){return{type:"throw",arg:t};}}r.wrap=h;var f={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var l={};c(l,i,function(){return this;});var p=Object.getPrototypeOf,y=p&&p(p(x([])));y&&y!==e&&n.call(y,i)&&(l=y);var v=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(l);function g(t){["next","throw","return"].forEach(function(r){c(t,r,function(t){return this._invoke(r,t);});});}function AsyncIterator(t,r){function e(o,i,a,u){var c=s(t[o],t,i);if("throw"!==c.type){var h=c.arg,f=h.value;return f&&"object"==_typeof3(f)&&n.call(f,"__await")?r.resolve(f.__await).then(function(t){e("next",t,a,u);},function(t){e("throw",t,a,u);}):r.resolve(f).then(function(t){h.value=t,a(h);},function(t){return e("throw",t,a,u);});}u(c.arg);}var o;c(this,"_invoke",function(t,n){function i(){return new r(function(r,o){e(t,n,r,o);});}return o=o?o.then(i,i):i();},!0);}function d(r,e){var n=e.method,o=r.i[n];if(o===t)return e.delegate=null,"throw"===n&&r.i["return"]&&(e.method="return",e.arg=t,d(r,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=s(o,r.i,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,f;var a=i.arg;return a?a.done?(e[r.r]=a.value,e.next=r.n,"return"!==e.method&&(e.method="next",e.arg=t),e.delegate=null,f):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f);}function w(t){this.tryEntries.push(t);}function m(r){var e=r[4]||{};e.type="normal",e.arg=t,r[4]=e;}function Context(t){this.tryEntries=[[-1]],t.forEach(w,this),this.reset(!0);}function x(r){if(null!=r){var e=r[i];if(e)return e.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,a=function e(){for(;++o<r.length;)if(n.call(r,o))return e.value=r[o],e.done=!1,e;return e.value=t,e.done=!0,e;};return a.next=a;}}throw new TypeError(_typeof3(r)+" is not iterable");}return GeneratorFunction.prototype=GeneratorFunctionPrototype,c(v,"constructor",GeneratorFunctionPrototype),c(GeneratorFunctionPrototype,"constructor",GeneratorFunction),GeneratorFunction.displayName=c(GeneratorFunctionPrototype,u,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name));},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,c(t,u,"GeneratorFunction")),t.prototype=Object.create(v),t;},r.awrap=function(t){return{__await:t};},g(AsyncIterator.prototype),c(AsyncIterator.prototype,a,function(){return this;}),r.AsyncIterator=AsyncIterator,r.async=function(t,e,n,o,i){void 0===i&&(i=Promise);var a=new AsyncIterator(h(t,e,n,o),i);return r.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next();});},g(v),c(v,u,"Generator"),c(v,i,function(){return this;}),c(v,"toString",function(){return"[object Generator]";}),r.keys=function(t){var r=Object(t),e=[];for(var n in r)e.unshift(n);return function t(){for(;e.length;)if((n=e.pop())in r)return t.value=n,t.done=!1,t;return t.done=!0,t;};},r.values=x,Context.prototype={constructor:Context,reset:function reset(r){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(m),!r)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=t);},stop:function stop(){this.done=!0;var t=this.tryEntries[0][4];if("throw"===t.type)throw t.arg;return this.rval;},dispatchException:function dispatchException(r){if(this.done)throw r;var e=this;function n(t){a.type="throw",a.arg=r,e.next=t;}for(var o=e.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i[4],u=this.prev,c=i[1],h=i[2];if(-1===i[0])return n("end"),!1;if(!c&&!h)throw Error("try statement without catch or finally");if(null!=i[0]&&i[0]<=u){if(u<c)return this.method="next",this.arg=t,n(c),!0;if(u<h)return n(h),!1;}}},abrupt:function abrupt(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n[0]>-1&&n[0]<=this.prev&&this.prev<n[2]){var o=n;break;}}o&&("break"===t||"continue"===t)&&o[0]<=r&&r<=o[2]&&(o=null);var i=o?o[4]:{};return i.type=t,i.arg=r,o?(this.method="next",this.next=o[2],f):this.complete(i);},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),f;},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e[2]===t)return this.complete(e[4],e[3]),m(e),f;}},"catch":function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e[0]===t){var n=e[4];if("throw"===n.type){var o=n.arg;m(e);}return o;}}throw Error("illegal catch attempt");},delegateYield:function delegateYield(r,e,n){return this.delegate={i:x(r),r:e,n:n},"next"===this.method&&(this.arg=t),f;}},r;}function _callSuper(t,o,e){return o=(0,_getPrototypeOf2["default"])(o),(0,_possibleConstructorReturn2["default"])(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],(0,_getPrototypeOf2["default"])(t).constructor):o.apply(t,e));}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _superPropGet(t,o,e,r){var p=(0,_get2["default"])((0,_getPrototypeOf2["default"])(1&r?t.prototype:t),o,e);return 2&r&&"function"==typeof p?function(t){return p.apply(e,t);}:p;}var PostHog=exports.PostHog=function(_PostHogCore){function PostHog(apiKey,options){var _this;(0,_classCallCheck2["default"])(this,PostHog);var _a,_b,_c,_d;_this=_callSuper(this,PostHog,[apiKey,options]);_this._appProperties={};_this._isInitialized=false;_this._persistence=(_a=options===null||options===void 0?void 0:options.persistence)!==null&&_a!==void 0?_a:'file';_this._disableSurveys=(_b=options===null||options===void 0?void 0:options.disableSurveys)!==null&&_b!==void 0?_b:false;_this._disableRemoteConfig=(_c=options===null||options===void 0?void 0:options.disableRemoteConfig)!==null&&_c!==void 0?_c:false;_this._appProperties=typeof(options===null||options===void 0?void 0:options.customAppProperties)==='function'?options.customAppProperties((0,_nativeDeps.getAppProperties)()):(options===null||options===void 0?void 0:options.customAppProperties)||(0,_nativeDeps.getAppProperties)();_reactNative.AppState.addEventListener('change',function(state){if(state==='unknown'){return;}void _this.flush()["catch"](function(){var _ref=(0,_asyncToGenerator2["default"])(_regeneratorRuntime().mark(function _callee(err){return _regeneratorRuntime().wrap(function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:_context.next=2;return(0,_core.logFlushError)(err);case 2:case"end":return _context.stop();}},_callee);}));return function(_x3){return _ref.apply(this,arguments);};}());if(state==='active'){_this.getSessionId();}});var storagePromise;if(_this._persistence==='file'){_this._storage=new _storage.PostHogRNStorage((_d=options===null||options===void 0?void 0:options.customStorage)!==null&&_d!==void 0?_d:(0,_nativeDeps.buildOptimisiticAsyncStorage)());storagePromise=_this._storage.preloadPromise;}else{_this._storage=new _storage.PostHogRNSyncMemoryStorage();}if(storagePromise){storagePromise["catch"](function(error){console.error('PostHog storage initialization failed:',error);});}var initAfterStorage=function initAfterStorage(){var enablePersistSessionIdAcrossRestart=options===null||options===void 0?void 0:options.enablePersistSessionIdAcrossRestart;if(!enablePersistSessionIdAcrossRestart){_this.setPersistedProperty(_core.PostHogPersistedProperty.SessionId,null);_this.setPersistedProperty(_core.PostHogPersistedProperty.SessionLastTimestamp,null);_this.setPersistedProperty(_core.PostHogPersistedProperty.SessionStartTimestamp,null);}_this.setupBootstrap(options);_this._isInitialized=true;if(_this._disableRemoteConfig===false){_this.reloadRemoteConfigAsync();}else{_this.logMsgIfDebug(function(){return console.info('PostHog Debug',"Remote config is disabled.");});if((options===null||options===void 0?void 0:options.preloadFeatureFlags)!==false){_this.logMsgIfDebug(function(){return console.info('PostHog Debug',"Feature flags will be preloaded from Flags API.");});_this.reloadFeatureFlags();}else{_this.logMsgIfDebug(function(){return console.info('PostHog Debug',"preloadFeatureFlags is disabled.");});}}if(options===null||options===void 0?void 0:options.captureAppLifecycleEvents){void _this.captureAppLifecycleEvents();}void _this.persistAppVersion();void _this.startSessionReplay(options);};if(storagePromise){_this._initPromise=storagePromise.then(initAfterStorage);}else{_this._initPromise=Promise.resolve();initAfterStorage();}return _this;}(0,_inherits2["default"])(PostHog,_PostHogCore);return(0,_createClass2["default"])(PostHog,[{key:"ready",value:function(){var _ready=(0,_asyncToGenerator2["default"])(_regeneratorRuntime().mark(function _callee2(){return _regeneratorRuntime().wrap(function _callee2$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return this._initPromise;case 2:case"end":return _context2.stop();}},_callee2,this);}));function ready(){return _ready.apply(this,arguments);}return ready;}()},{key:"getPersistedProperty",value:function getPersistedProperty(key){return this._storage.getItem(key);}},{key:"setPersistedProperty",value:function setPersistedProperty(key,value){return value!==null?this._storage.setItem(key,value):this._storage.removeItem(key);}},{key:"fetch",value:function(_fetch){function fetch(_x,_x2){return _fetch.apply(this,arguments);}fetch.toString=function(){return _fetch.toString();};return fetch;}(function(url,options){return fetch(url,options);})},{key:"getLibraryId",value:function getLibraryId(){return'posthog-react-native';}},{key:"getLibraryVersion",value:function getLibraryVersion(){return _version.version;}},{key:"getCustomUserAgent",value:function getCustomUserAgent(){if(_reactNative.Platform.OS==='web'){return'';}return"".concat(this.getLibraryId(),"/").concat(this.getLibraryVersion());}},{key:"getCommonEventProperties",value:function getCommonEventProperties(){return _objectSpread(_objectSpread(_objectSpread({},_superPropGet(PostHog,"getCommonEventProperties",this,3)([])),this._appProperties),{},{$screen_height:_reactNative.Dimensions.get('screen').height,$screen_width:_reactNative.Dimensions.get('screen').width});}},{key:"screen",value:function(){var _screen=(0,_asyncToGenerator2["default"])(_regeneratorRuntime().mark(function _callee3(name,properties,options){return _regeneratorRuntime().wrap(function _callee3$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return this._initPromise;case 2:this.registerForSession({$screen_name:name});return _context3.abrupt("return",this.capture('$screen',_objectSpread(_objectSpread({},properties),{},{$screen_name:name}),options));case 4:case"end":return _context3.stop();}},_callee3,this);}));function screen(_x4,_x5,_x6){return _screen.apply(this,arguments);}return screen;}()},{key:"_isEnableSessionReplay",value:function _isEnableSessionReplay(){var _a;return!this.isDisabled&&((_a=this._enableSessionReplay)!==null&&_a!==void 0?_a:false);}},{key:"_resetSessionId",value:function _resetSessionId(reactNativeSessionReplay,sessionId){if(reactNativeSessionReplay){reactNativeSessionReplay.endSession();reactNativeSessionReplay.startSession(sessionId);}}},{key:"getSessionId",value:function getSessionId(){var _this2=this;var sessionId=_superPropGet(PostHog,"getSessionId",this,3)([]);if(!this._isEnableSessionReplay()){return sessionId;}if(sessionId.length>0&&this._currentSessionId&&sessionId!==this._currentSessionId){if(_OptionalSessionReplay.OptionalReactNativeSessionReplay){try{this._resetSessionId(_OptionalSessionReplay.OptionalReactNativeSessionReplay,String(sessionId));this.logMsgIfDebug(function(){return console.info('PostHog Debug',"sessionId rotated from ".concat(_this2._currentSessionId," to ").concat(sessionId,"."));});}catch(e){this.logMsgIfDebug(function(){return console.error('PostHog Debug',"Failed to rotate sessionId: ".concat(e,"."));});}}this._currentSessionId=sessionId;}else{this.logMsgIfDebug(function(){return console.log('PostHog Debug',"sessionId not rotated, sessionId ".concat(sessionId," and currentSessionId ").concat(_this2._currentSessionId,"."));});}return sessionId;}},{key:"resetSessionId",value:function resetSessionId(){_superPropGet(PostHog,"resetSessionId",this,3)([]);if(this._isEnableSessionReplay()&&_OptionalSessionReplay.OptionalReactNativeSessionReplay){try{_OptionalSessionReplay.OptionalReactNativeSessionReplay.endSession();this.logMsgIfDebug(function(){return console.info('PostHog Debug',"Session replay ended.");});}catch(e){this.logMsgIfDebug(function(){return console.error('PostHog Debug',"Session replay failed to end: ".concat(e,"."));});}}}},{key:"identify",value:function identify(distinctId,properties,options){var previousDistinctId=this.getDistinctId();_superPropGet(PostHog,"identify",this,3)([distinctId,properties,options]);if(this._isEnableSessionReplay()&&_OptionalSessionReplay.OptionalReactNativeSessionReplay){try{distinctId=distinctId||previousDistinctId;var anonymousId=this.getAnonymousId();_OptionalSessionReplay.OptionalReactNativeSessionReplay.identify(String(distinctId),String(anonymousId));this.logMsgIfDebug(function(){return console.info('PostHog Debug',"Session replay identified with distinctId ".concat(distinctId," and anonymousId ").concat(anonymousId,"."));});}catch(e){this.logMsgIfDebug(function(){return console.error('PostHog Debug',"Session replay failed to identify: ".concat(e,"."));});}}}},{key:"initReactNativeNavigation",value:function initReactNativeNavigation(options){return(0,_wixNavigation.withReactNativeNavigation)(this,options);}},{key:"getSurveys",value:function(){var _getSurveys=(0,_asyncToGenerator2["default"])(_regeneratorRuntime().mark(function _callee4(){var surveys,surveysFromApi;return _regeneratorRuntime().wrap(function _callee4$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:if(!(this._disableSurveys===true)){_context4.next=4;break;}this.logMsgIfDebug(function(){return console.log('PostHog Debug','Loading surveys is disabled.');});this.setPersistedProperty(_core.PostHogPersistedProperty.Surveys,null);return _context4.abrupt("return",[]);case 4:surveys=this.getPersistedProperty(_core.PostHogPersistedProperty.Surveys);if(!(surveys&&surveys.length>0)){_context4.next=10;break;}this.logMsgIfDebug(function(){return console.log('PostHog Debug','Surveys fetched from storage: ',JSON.stringify(surveys));});return _context4.abrupt("return",surveys);case 10:this.logMsgIfDebug(function(){return console.log('PostHog Debug','No surveys found in storage');});case 11:if(!(this._disableRemoteConfig===true)){_context4.next=18;break;}_context4.next=14;return _superPropGet(PostHog,"getSurveysStateless",this,3)([]);case 14:surveysFromApi=_context4.sent;if(!(surveysFromApi&&surveysFromApi.length>0)){_context4.next=18;break;}this.setPersistedProperty(_core.PostHogPersistedProperty.Surveys,surveysFromApi);return _context4.abrupt("return",surveysFromApi);case 18:return _context4.abrupt("return",[]);case 19:case"end":return _context4.stop();}},_callee4,this);}));function getSurveys(){return _getSurveys.apply(this,arguments);}return getSurveys;}()},{key:"startSessionReplay",value:function(){var _startSessionReplay=(0,_asyncToGenerator2["default"])(_regeneratorRuntime().mark(function _callee5(options){var _a,_b,_c,_d,_e,_ref2,_ref2$maskAllTextInpu,maskAllTextInputs,_ref2$maskAllImages,maskAllImages,_ref2$maskAllSandboxe,maskAllSandboxedViews,_ref2$captureLog,captureLog,_ref2$captureNetworkT,captureNetworkTelemetry,_ref2$iOSdebouncerDel,iOSdebouncerDelayMs,_ref2$androidDebounce,androidDebouncerDelayMs,sdkReplayConfig,sessionReplay,featureFlags,cachedFeatureFlags,cachedSessionReplayConfig,recordingActive,linkedFlag,value,flag,variant,_value,sessionId,sdkOptions;return _regeneratorRuntime().wrap(function _callee5$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:this._enableSessionReplay=options===null||options===void 0?void 0:options.enableSessionReplay;if(this._isEnableSessionReplay()){_context5.next=4;break;}this.logMsgIfDebug(function(){return console.info('PostHog Debug','Session replay is not enabled.');});return _context5.abrupt("return");case 4:_ref2=(_a=options===null||options===void 0?void 0:options.sessionReplayConfig)!==null&&_a!==void 0?_a:{},_ref2$maskAllTextInpu=_ref2.maskAllTextInputs,maskAllTextInputs=_ref2$maskAllTextInpu===void 0?true:_ref2$maskAllTextInpu,_ref2$maskAllImages=_ref2.maskAllImages,maskAllImages=_ref2$maskAllImages===void 0?true:_ref2$maskAllImages,_ref2$maskAllSandboxe=_ref2.maskAllSandboxedViews,maskAllSandboxedViews=_ref2$maskAllSandboxe===void 0?true:_ref2$maskAllSandboxe,_ref2$captureLog=_ref2.captureLog,captureLog=_ref2$captureLog===void 0?true:_ref2$captureLog,_ref2$captureNetworkT=_ref2.captureNetworkTelemetry,captureNetworkTelemetry=_ref2$captureNetworkT===void 0?true:_ref2$captureNetworkT,_ref2$iOSdebouncerDel=_ref2.iOSdebouncerDelayMs,iOSdebouncerDelayMs=_ref2$iOSdebouncerDel===void 0?1000:_ref2$iOSdebouncerDel,_ref2$androidDebounce=_ref2.androidDebouncerDelayMs,androidDebouncerDelayMs=_ref2$androidDebounce===void 0?1000:_ref2$androidDebounce;sdkReplayConfig={maskAllTextInputs:maskAllTextInputs,maskAllImages:maskAllImages,maskAllSandboxedViews:maskAllSandboxedViews,captureLog:captureLog,captureNetworkTelemetry:captureNetworkTelemetry,iOSdebouncerDelayMs:iOSdebouncerDelayMs,androidDebouncerDelayMs:androidDebouncerDelayMs};this.logMsgIfDebug(function(){return console.log('PostHog Debug',"Session replay SDK config: ".concat(JSON.stringify(sdkReplayConfig)));});sessionReplay=(_b=this.getPersistedProperty(_core.PostHogPersistedProperty.SessionReplay))!==null&&_b!==void 0?_b:{};featureFlags=(_c=this.getKnownFeatureFlags())!==null&&_c!==void 0?_c:{};cachedFeatureFlags=(_d=featureFlags)!==null&&_d!==void 0?_d:{};cachedSessionReplayConfig=(_e=sessionReplay)!==null&&_e!==void 0?_e:{};this.logMsgIfDebug(function(){return console.log('PostHog Debug',"Session replay feature flags from flags cached config: ".concat(JSON.stringify(cachedFeatureFlags)));});this.logMsgIfDebug(function(){return console.log('PostHog Debug',"Session replay session recording from flags cached config: ".concat(JSON.stringify(cachedSessionReplayConfig)));});recordingActive=true;linkedFlag=cachedSessionReplayConfig['linkedFlag'];if(typeof linkedFlag==='string'){value=cachedFeatureFlags[linkedFlag];if(typeof value==='boolean'){recordingActive=value;}else if(typeof value==='string'){recordingActive=true;}else{recordingActive=false;}this.logMsgIfDebug(function(){return console.log('PostHog Debug',"Session replay '".concat(linkedFlag,"' linked flag value: '").concat(value,"'"));});}else if(linkedFlag&&(0,_typeof2["default"])(linkedFlag)==='object'){flag=linkedFlag['flag'];variant=linkedFlag['variant'];if(flag&&variant){_value=cachedFeatureFlags[flag];recordingActive=_value===variant;this.logMsgIfDebug(function(){return console.log('PostHog Debug',"Session replay '".concat(flag,"' linked flag variant '").concat(variant,"' and value '").concat(_value,"'"));});}else{this.logMsgIfDebug(function(){return console.log('PostHog Debug',"Session replay '".concat(flag,"' linked flag variant: '").concat(variant,"' does not exist/quota limited."));});recordingActive=false;}}else{this.logMsgIfDebug(function(){return console.log('PostHog Debug',"Session replay has no cached linkedFlag.");});}if(!recordingActive){_context5.next=46;break;}if(!_OptionalSessionReplay.OptionalReactNativeSessionReplay){_context5.next=43;break;}sessionId=this.getSessionId();if(!(sessionId.length===0)){_context5.next=22;break;}this.logMsgIfDebug(function(){return console.warn('PostHog Debug','Session replay enabled but no sessionId found.');});return _context5.abrupt("return");case 22:sdkOptions={apiKey:this.apiKey,host:this.host,debug:this.isDebug,distinctId:this.getDistinctId(),anonymousId:this.getAnonymousId(),sdkVersion:this.getLibraryVersion(),flushAt:this.flushAt};this.logMsgIfDebug(function(){return console.log('PostHog Debug',"Session replay sdk options: ".concat(JSON.stringify(sdkOptions)));});_context5.prev=24;_context5.next=27;return _OptionalSessionReplay.OptionalReactNativeSessionReplay.isEnabled();case 27:if(_context5.sent){_context5.next=33;break;}_context5.next=30;return _OptionalSessionReplay.OptionalReactNativeSessionReplay.start(String(sessionId),sdkOptions,sdkReplayConfig,cachedSessionReplayConfig);case 30:this.logMsgIfDebug(function(){return console.info('PostHog Debug',"Session replay started with sessionId ".concat(sessionId,"."));});_context5.next=35;break;case 33:this._resetSessionId(_OptionalSessionReplay.OptionalReactNativeSessionReplay,String(sessionId));this.logMsgIfDebug(function(){return console.log('PostHog Debug',"Session replay already started with sessionId ".concat(sessionId,"."));});case 35:this._currentSessionId=sessionId;_context5.next=41;break;case 38:_context5.prev=38;_context5.t0=_context5["catch"](24);this.logMsgIfDebug(function(){return console.error('PostHog Debug',"Session replay failed to start: ".concat(_context5.t0,"."));});case 41:_context5.next=44;break;case 43:this.logMsgIfDebug(function(){return console.warn('PostHog Debug','Session replay enabled but not installed.');});case 44:_context5.next=47;break;case 46:this.logMsgIfDebug(function(){return console.info('PostHog Debug','Session replay disabled.');});case 47:case"end":return _context5.stop();}},_callee5,this,[[24,38]]);}));function startSessionReplay(_x7){return _startSessionReplay.apply(this,arguments);}return startSessionReplay;}()},{key:"captureAppLifecycleEvents",value:function(){var _captureAppLifecycleEvents=(0,_asyncToGenerator2["default"])(_regeneratorRuntime().mark(function _callee6(){var _this3=this;var _a,appBuild,appVersion,isMemoryPersistence,properties,prevAppBuild,prevAppVersion,initialUrl;return _regeneratorRuntime().wrap(function _callee6$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:appBuild=this._appProperties.$app_build;appVersion=this._appProperties.$app_version;isMemoryPersistence=this._persistence==='memory';properties={};if(!isMemoryPersistence){prevAppBuild=this.getPersistedProperty(_core.PostHogPersistedProperty.InstalledAppBuild);prevAppVersion=this.getPersistedProperty(_core.PostHogPersistedProperty.InstalledAppVersion);if(!appBuild||!appVersion){this.logMsgIfDebug(function(){return console.warn('PostHog could not track installation/update/open, as the build and version were not set. '+'This can happen if some dependencies are not installed correctly, or if you have provided'+'customAppProperties but not included $app_build or $app_version.');});}if(appBuild){if(!prevAppBuild){this.capture('Application Installed',properties);}else if(prevAppBuild!==appBuild){this.capture('Application Updated',_objectSpread(_objectSpread(_objectSpread({},(0,_core.maybeAdd)('previous_version',prevAppVersion)),(0,_core.maybeAdd)('previous_build',prevAppBuild)),properties));}}}else{this.logMsgIfDebug(function(){return console.warn('PostHog was initialised with persistence set to "memory", capturing native app events (Application Installed and Application Updated) is not supported.');});}_context6.next=7;return _reactNative.Linking.getInitialURL();case 7:_context6.t1=_a=_context6.sent;_context6.t0=_context6.t1!==null;if(!_context6.t0){_context6.next=11;break;}_context6.t0=_a!==void 0;case 11:if(!_context6.t0){_context6.next=15;break;}_context6.t2=_a;_context6.next=16;break;case 15:_context6.t2=undefined;case 16:initialUrl=_context6.t2;this.capture('Application Opened',_objectSpread(_objectSpread({},properties),(0,_core.maybeAdd)('url',initialUrl)));_reactNative.AppState.addEventListener('change',function(state){if(state==='active'){_this3.capture('Application Became Active');}else if(state==='background'){_this3.capture('Application Backgrounded');}});case 19:case"end":return _context6.stop();}},_callee6,this);}));function captureAppLifecycleEvents(){return _captureAppLifecycleEvents.apply(this,arguments);}return captureAppLifecycleEvents;}()},{key:"persistAppVersion",value:function(){var _persistAppVersion=(0,_asyncToGenerator2["default"])(_regeneratorRuntime().mark(function _callee7(){var appBuild,appVersion;return _regeneratorRuntime().wrap(function _callee7$(_context7){while(1)switch(_context7.prev=_context7.next){case 0:appBuild=this._appProperties.$app_build;appVersion=this._appProperties.$app_version;this.setPersistedProperty(_core.PostHogPersistedProperty.InstalledAppBuild,appBuild);this.setPersistedProperty(_core.PostHogPersistedProperty.InstalledAppVersion,appVersion);case 4:case"end":return _context7.stop();}},_callee7,this);}));function persistAppVersion(){return _persistAppVersion.apply(this,arguments);}return persistAppVersion;}()}]);}(_core.PostHogCore);
@@ -0,0 +1 @@
1
+ {"version":3,"file":"posthog-rn.js","sourceRoot":"","sources":["../src/posthog-rn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAEtE,OAAO,EAGL,WAAW,EAKX,wBAAwB,EAExB,aAAa,EACb,QAAQ,GAET,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,gBAAgB,EAAE,0BAA0B,EAAE,MAAM,WAAW,CAAA;AACxE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,E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AAE,YAAY,CAAC;wBAC3C,GAAG,UAAU;qBACd,CAAC,CAAA;gBACJ,CAAC;YACH,CAAC;QACH,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,aAAa,CAAC,GAAG,EAAE,CACtB,OAAO,CAAC,IAAI,CACV,yJAAyJ,CAC1J,CACF,CAAA;QACH,CAAC;QAED,MAAM,UAAU,GAAG,MAAA,CAAC,MAAM,OAAO,CAAC,aAAa,EAAE,CAAC,mCAAI,SAAS,CAAA;QAE/D,IAAI,CAAC,OAAO,CAAC,oBAAoB,EAAE;YACjC,GAAG,UAAU;YACb,GAAG,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;SAC/B,CAAC,CAAA;QAEF,QAAQ,CAAC,gBAAgB,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;YAC5C,IAAI,KAAK,KAAK,QAAQ,EAAE,CAAC;gBACvB,IAAI,CAAC,OAAO,CAAC,2BAA2B,CAAC,CAAA;YAC3C,CAAC;iBAAM,IAAI,KAAK,KAAK,YAAY,EAAE,CAAC;gBAClC,IAAI,CAAC,OAAO,CAAC,0BAA0B,CAAC,CAAA;YAC1C,CAAC;QACH,CAAC,CAAC,CAAA;IACJ,CAAC;IAEO,KAAK,CAAC,iBAAiB;QAC7B,MAAM,QAAQ,GAAG,IAAI,CAAC,cAAc,CAAC,UAAU,CAAA;QAC/C,MAAM,UAAU,GAAG,IAAI,CAAC,cAAc,CAAC,YAAY,CAAA;QACnD,IAAI,CAAC,oBAAoB,CAAC,wBAAwB,CAAC,iBAAiB,EAAE,QAAQ,CAAC,CAAA;QAC/E,IAAI,CAAC,oBAAoB,CAAC,wBAAwB,CAAC,mBAAmB,EAAE,UAAU,CAAC,CAAA;IACrF,CAAC;CACF"}
@@ -0,0 +1 @@
1
+ "use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.PostHogRNSyncMemoryStorage=exports.PostHogRNStorage=void 0;var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _core=require("@posthog/core");function _callSuper(t,o,e){return o=(0,_getPrototypeOf2["default"])(o),(0,_possibleConstructorReturn2["default"])(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],(0,_getPrototypeOf2["default"])(t).constructor):o.apply(t,e));}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}var POSTHOG_STORAGE_KEY='.posthog-rn.json';var POSTHOG_STORAGE_VERSION='v1';var PostHogRNStorage=exports.PostHogRNStorage=function(){function PostHogRNStorage(storage){var _this=this;(0,_classCallCheck2["default"])(this,PostHogRNStorage);var _a;this.memoryCache={};this.storage=storage;var preloadResult=this.storage.getItem(POSTHOG_STORAGE_KEY);if(_core.utils.isPromise(preloadResult)){this.preloadPromise=preloadResult.then(function(res){_this.populateMemoryCache(res);});(_a=this.preloadPromise)===null||_a===void 0?void 0:_a["finally"](function(){_this.preloadPromise=undefined;});}else{this.populateMemoryCache(preloadResult);}}return(0,_createClass2["default"])(PostHogRNStorage,[{key:"persist",value:function persist(){var payload={version:POSTHOG_STORAGE_VERSION,content:this.memoryCache};void this.storage.setItem(POSTHOG_STORAGE_KEY,JSON.stringify(payload));}},{key:"getItem",value:function getItem(key){return this.memoryCache[key];}},{key:"setItem",value:function setItem(key,value){this.memoryCache[key]=value;this.persist();}},{key:"removeItem",value:function removeItem(key){delete this.memoryCache[key];this.persist();}},{key:"clear",value:function clear(){for(var key in this.memoryCache){delete this.memoryCache[key];}this.persist();}},{key:"getAllKeys",value:function getAllKeys(){return Object.keys(this.memoryCache);}},{key:"populateMemoryCache",value:function populateMemoryCache(res){try{var data=res?JSON.parse(res).content:{};for(var key in data){this.memoryCache[key]=data[key];}}catch(e){console.warn("PostHog failed to load persisted data from storage. This is likely because the storage format is. We'll reset the storage.",e);}}}]);}();var PostHogRNSyncMemoryStorage=exports.PostHogRNSyncMemoryStorage=function(_PostHogRNStorage){function PostHogRNSyncMemoryStorage(){(0,_classCallCheck2["default"])(this,PostHogRNSyncMemoryStorage);var cache={};var storage={getItem:function getItem(key){return cache[key];},setItem:function setItem(key,value){cache[key]=value;}};return _callSuper(this,PostHogRNSyncMemoryStorage,[storage]);}(0,_inherits2["default"])(PostHogRNSyncMemoryStorage,_PostHogRNStorage);return(0,_createClass2["default"])(PostHogRNSyncMemoryStorage);}(PostHogRNStorage);
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storage.js","sourceRoot":"","sources":["../src/storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAGrC,MAAM,mBAAmB,GAAG,kBAAkB,CAAA;AAC9C,MAAM,uBAAuB,GAAG,IAAI,CAAA;AAIpC,MAAM,OAAO,gBAAgB;IAK3B,YAAY,OAA6B;;QAJzC,gBAAW,GAA2B,EAAE,CAAA;QAKtC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QAEtB,MAAM,aAAa,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAA;QAE/D,IAAI,KAAK,CAAC,SAAS,CAAC,aAAa,CAAC,EAAE,CAAC;YACnC,IAAI,CAAC,cAAc,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE;gBAC/C,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAA;YAC/B,CAAC,CAAC,CAAA;YAEF,MAAA,IAAI,CAAC,cAAc,0CAAE,OAAO,CAAC,GAAG,EAAE;gBAChC,IAAI,CA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BACvB,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAA;YACnC,CAAC;QACH,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,OAAO,CAAC,IAAI,CACV,4HAA4H,EAC5H,CAAC,CACF,CAAA;QACH,CAAC;IACH,CAAC;CACF;AAED,MAAM,OAAO,0BAA2B,SAAQ,gBAAgB;IAC9D;QACE,MAAM,KAAK,GAAuC,EAAE,CAAA;QACpD,MAAM,OAAO,GAAG;YACd,OAAO,EAAE,CAAC,GAAW,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC;YACpC,OAAO,EAAE,CAAC,GAAW,EAAE,KAAa,EAAE,EAAE;gBACtC,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;YACpB,CAAC;SACF,CAAA;QAED,KAAK,CAAC,OAAO,CAAC,CAAA;IAChB,CAAC;CACF"}
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { SurveyAppearance } from '../../../posthog-core/src';
2
+ import { SurveyAppearance } from '@posthog/core';
3
3
  import { PostHog } from '../posthog-rn';
4
4
  export type PostHogSurveyProviderProps = {
5
5
  /**