react-native-google-mobile-ads 8.2.0 → 8.2.2

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 (268) hide show
  1. package/docs/european-user-consent.mdx +19 -0
  2. package/ios_config.sh +2 -2
  3. package/lib/commonjs/AdEventType.js +2 -1
  4. package/lib/commonjs/AdEventType.js.map +1 -1
  5. package/lib/commonjs/AdsConsent.js.map +1 -1
  6. package/lib/commonjs/AdsConsentDebugGeography.js.map +1 -1
  7. package/lib/commonjs/AdsConsentPurposes.js +2 -1
  8. package/lib/commonjs/AdsConsentPurposes.js.map +1 -1
  9. package/lib/commonjs/AdsConsentSpecialFeatures.js +2 -1
  10. package/lib/commonjs/AdsConsentSpecialFeatures.js.map +1 -1
  11. package/lib/commonjs/AdsConsentStatus.js.map +1 -1
  12. package/lib/commonjs/BannerAdSize.js +2 -1
  13. package/lib/commonjs/BannerAdSize.js.map +1 -1
  14. package/lib/commonjs/GAMAdEventType.js +2 -1
  15. package/lib/commonjs/GAMAdEventType.js.map +1 -1
  16. package/lib/commonjs/MaxAdContentRating.js +2 -1
  17. package/lib/commonjs/MaxAdContentRating.js.map +1 -1
  18. package/lib/commonjs/MobileAds.js.map +1 -1
  19. package/lib/commonjs/RewardedAdEventType.js +2 -1
  20. package/lib/commonjs/RewardedAdEventType.js.map +1 -1
  21. package/lib/commonjs/TestIds.js.map +1 -1
  22. package/lib/commonjs/ads/AppOpenAd.js.map +1 -1
  23. package/lib/commonjs/ads/BannerAd.js.map +1 -1
  24. package/lib/commonjs/ads/BaseAd.js.map +1 -1
  25. package/lib/commonjs/ads/GAMBannerAd.js.map +1 -1
  26. package/lib/commonjs/ads/GAMInterstitialAd.js.map +1 -1
  27. package/lib/commonjs/ads/InterstitialAd.js.map +1 -1
  28. package/lib/commonjs/ads/MobileAd.js.map +1 -1
  29. package/lib/commonjs/ads/RewardedAd.js.map +1 -1
  30. package/lib/commonjs/ads/RewardedInterstitialAd.js.map +1 -1
  31. package/lib/commonjs/common/Base64.js.map +1 -1
  32. package/lib/commonjs/common/MutatableParams.js.map +1 -1
  33. package/lib/commonjs/common/ReferenceBase.js.map +1 -1
  34. package/lib/commonjs/common/deeps.js.map +1 -1
  35. package/lib/commonjs/common/id.js.map +1 -1
  36. package/lib/commonjs/common/index.js.map +1 -1
  37. package/lib/commonjs/common/path.js.map +1 -1
  38. package/lib/commonjs/common/promise.js.map +1 -1
  39. package/lib/commonjs/common/serialize.js.map +1 -1
  40. package/lib/commonjs/common/validate.js.map +1 -1
  41. package/lib/commonjs/declarations.d.js.map +1 -1
  42. package/lib/commonjs/hooks/useAppOpenAd.js.map +1 -1
  43. package/lib/commonjs/hooks/useFullScreenAd.js.map +1 -1
  44. package/lib/commonjs/hooks/useInterstitialAd.js.map +1 -1
  45. package/lib/commonjs/hooks/useRewardedAd.js.map +1 -1
  46. package/lib/commonjs/hooks/useRewardedInterstitialAd.js.map +1 -1
  47. package/lib/commonjs/index.js.map +1 -1
  48. package/lib/commonjs/internal/GoogleMobileAdsNativeEventEmitter.js.map +1 -1
  49. package/lib/commonjs/internal/Module.js.map +1 -1
  50. package/lib/commonjs/internal/NativeError.js.map +1 -1
  51. package/lib/commonjs/internal/SharedEventEmitter.js.map +1 -1
  52. package/lib/commonjs/internal/index.js.map +1 -1
  53. package/lib/commonjs/internal/registry/nativeModule.js.map +1 -1
  54. package/lib/commonjs/types/AdEventListener.js.map +1 -1
  55. package/lib/commonjs/types/AdEventsListener.js.map +1 -1
  56. package/lib/commonjs/types/AdShowOptions.js.map +1 -1
  57. package/lib/commonjs/types/AdStates.js.map +1 -1
  58. package/lib/commonjs/types/AdapterStatus.js +4 -3
  59. package/lib/commonjs/types/AdapterStatus.js.map +1 -1
  60. package/lib/commonjs/types/AdsConsent.interface.js.map +1 -1
  61. package/lib/commonjs/types/AppEvent.js.map +1 -1
  62. package/lib/commonjs/types/BannerAdProps.js.map +1 -1
  63. package/lib/commonjs/types/GoogleMobileAdsNativeModule.js.map +1 -1
  64. package/lib/commonjs/types/MobileAd.interface.js.map +1 -1
  65. package/lib/commonjs/types/MobileAdsModule.interface.js.map +1 -1
  66. package/lib/commonjs/types/Module.interface.js.map +1 -1
  67. package/lib/commonjs/types/RequestConfiguration.js.map +1 -1
  68. package/lib/commonjs/types/RequestOptions.js.map +1 -1
  69. package/lib/commonjs/types/RewardedAdReward.js.map +1 -1
  70. package/lib/commonjs/types/index.js.map +1 -1
  71. package/lib/commonjs/validateAdRequestConfiguration.js.map +1 -1
  72. package/lib/commonjs/validateAdRequestOptions.js.map +1 -1
  73. package/lib/commonjs/validateAdShowOptions.js.map +1 -1
  74. package/lib/commonjs/version.js +1 -1
  75. package/lib/commonjs/version.js.map +1 -1
  76. package/lib/module/AdEventType.js.map +1 -1
  77. package/lib/module/AdsConsent.js.map +1 -1
  78. package/lib/module/AdsConsentDebugGeography.js.map +1 -1
  79. package/lib/module/AdsConsentPurposes.js.map +1 -1
  80. package/lib/module/AdsConsentSpecialFeatures.js.map +1 -1
  81. package/lib/module/AdsConsentStatus.js.map +1 -1
  82. package/lib/module/BannerAdSize.js.map +1 -1
  83. package/lib/module/GAMAdEventType.js.map +1 -1
  84. package/lib/module/MaxAdContentRating.js.map +1 -1
  85. package/lib/module/MobileAds.js.map +1 -1
  86. package/lib/module/RewardedAdEventType.js.map +1 -1
  87. package/lib/module/TestIds.js.map +1 -1
  88. package/lib/module/ads/AppOpenAd.js.map +1 -1
  89. package/lib/module/ads/BannerAd.js.map +1 -1
  90. package/lib/module/ads/BaseAd.js.map +1 -1
  91. package/lib/module/ads/GAMBannerAd.js.map +1 -1
  92. package/lib/module/ads/GAMInterstitialAd.js.map +1 -1
  93. package/lib/module/ads/InterstitialAd.js.map +1 -1
  94. package/lib/module/ads/MobileAd.js.map +1 -1
  95. package/lib/module/ads/RewardedAd.js.map +1 -1
  96. package/lib/module/ads/RewardedInterstitialAd.js.map +1 -1
  97. package/lib/module/common/Base64.js.map +1 -1
  98. package/lib/module/common/MutatableParams.js.map +1 -1
  99. package/lib/module/common/ReferenceBase.js.map +1 -1
  100. package/lib/module/common/deeps.js.map +1 -1
  101. package/lib/module/common/id.js.map +1 -1
  102. package/lib/module/common/index.js.map +1 -1
  103. package/lib/module/common/path.js.map +1 -1
  104. package/lib/module/common/promise.js.map +1 -1
  105. package/lib/module/common/serialize.js.map +1 -1
  106. package/lib/module/common/validate.js.map +1 -1
  107. package/lib/module/declarations.d.js.map +1 -1
  108. package/lib/module/hooks/useAppOpenAd.js.map +1 -1
  109. package/lib/module/hooks/useFullScreenAd.js.map +1 -1
  110. package/lib/module/hooks/useInterstitialAd.js.map +1 -1
  111. package/lib/module/hooks/useRewardedAd.js.map +1 -1
  112. package/lib/module/hooks/useRewardedInterstitialAd.js.map +1 -1
  113. package/lib/module/index.js.map +1 -1
  114. package/lib/module/internal/GoogleMobileAdsNativeEventEmitter.js.map +1 -1
  115. package/lib/module/internal/Module.js.map +1 -1
  116. package/lib/module/internal/NativeError.js.map +1 -1
  117. package/lib/module/internal/SharedEventEmitter.js.map +1 -1
  118. package/lib/module/internal/index.js.map +1 -1
  119. package/lib/module/internal/registry/nativeModule.js.map +1 -1
  120. package/lib/module/types/AdEventListener.js.map +1 -1
  121. package/lib/module/types/AdEventsListener.js.map +1 -1
  122. package/lib/module/types/AdShowOptions.js.map +1 -1
  123. package/lib/module/types/AdStates.js.map +1 -1
  124. package/lib/module/types/AdapterStatus.js.map +1 -1
  125. package/lib/module/types/AdsConsent.interface.js.map +1 -1
  126. package/lib/module/types/AppEvent.js.map +1 -1
  127. package/lib/module/types/BannerAdProps.js.map +1 -1
  128. package/lib/module/types/GoogleMobileAdsNativeModule.js.map +1 -1
  129. package/lib/module/types/MobileAd.interface.js.map +1 -1
  130. package/lib/module/types/MobileAdsModule.interface.js.map +1 -1
  131. package/lib/module/types/Module.interface.js.map +1 -1
  132. package/lib/module/types/RequestConfiguration.js.map +1 -1
  133. package/lib/module/types/RequestOptions.js.map +1 -1
  134. package/lib/module/types/RewardedAdReward.js.map +1 -1
  135. package/lib/module/types/index.js.map +1 -1
  136. package/lib/module/validateAdRequestConfiguration.js.map +1 -1
  137. package/lib/module/validateAdRequestOptions.js.map +1 -1
  138. package/lib/module/validateAdShowOptions.js.map +1 -1
  139. package/lib/module/version.js +1 -1
  140. package/lib/module/version.js.map +1 -1
  141. package/lib/typescript/AdEventType.d.ts +1 -0
  142. package/lib/typescript/AdEventType.d.ts.map +1 -0
  143. package/lib/typescript/AdsConsent.d.ts +1 -0
  144. package/lib/typescript/AdsConsent.d.ts.map +1 -0
  145. package/lib/typescript/AdsConsentDebugGeography.d.ts +1 -0
  146. package/lib/typescript/AdsConsentDebugGeography.d.ts.map +1 -0
  147. package/lib/typescript/AdsConsentPurposes.d.ts +1 -0
  148. package/lib/typescript/AdsConsentPurposes.d.ts.map +1 -0
  149. package/lib/typescript/AdsConsentSpecialFeatures.d.ts +1 -0
  150. package/lib/typescript/AdsConsentSpecialFeatures.d.ts.map +1 -0
  151. package/lib/typescript/AdsConsentStatus.d.ts +1 -0
  152. package/lib/typescript/AdsConsentStatus.d.ts.map +1 -0
  153. package/lib/typescript/BannerAdSize.d.ts +1 -0
  154. package/lib/typescript/BannerAdSize.d.ts.map +1 -0
  155. package/lib/typescript/GAMAdEventType.d.ts +1 -0
  156. package/lib/typescript/GAMAdEventType.d.ts.map +1 -0
  157. package/lib/typescript/MaxAdContentRating.d.ts +1 -0
  158. package/lib/typescript/MaxAdContentRating.d.ts.map +1 -0
  159. package/lib/typescript/MobileAds.d.ts +1 -0
  160. package/lib/typescript/MobileAds.d.ts.map +1 -0
  161. package/lib/typescript/RewardedAdEventType.d.ts +1 -0
  162. package/lib/typescript/RewardedAdEventType.d.ts.map +1 -0
  163. package/lib/typescript/TestIds.d.ts +1 -0
  164. package/lib/typescript/TestIds.d.ts.map +1 -0
  165. package/lib/typescript/ads/AppOpenAd.d.ts +1 -0
  166. package/lib/typescript/ads/AppOpenAd.d.ts.map +1 -0
  167. package/lib/typescript/ads/BannerAd.d.ts +1 -0
  168. package/lib/typescript/ads/BannerAd.d.ts.map +1 -0
  169. package/lib/typescript/ads/BaseAd.d.ts +1 -0
  170. package/lib/typescript/ads/BaseAd.d.ts.map +1 -0
  171. package/lib/typescript/ads/GAMBannerAd.d.ts +1 -0
  172. package/lib/typescript/ads/GAMBannerAd.d.ts.map +1 -0
  173. package/lib/typescript/ads/GAMInterstitialAd.d.ts +1 -0
  174. package/lib/typescript/ads/GAMInterstitialAd.d.ts.map +1 -0
  175. package/lib/typescript/ads/InterstitialAd.d.ts +1 -0
  176. package/lib/typescript/ads/InterstitialAd.d.ts.map +1 -0
  177. package/lib/typescript/ads/MobileAd.d.ts +1 -0
  178. package/lib/typescript/ads/MobileAd.d.ts.map +1 -0
  179. package/lib/typescript/ads/RewardedAd.d.ts +1 -0
  180. package/lib/typescript/ads/RewardedAd.d.ts.map +1 -0
  181. package/lib/typescript/ads/RewardedInterstitialAd.d.ts +1 -0
  182. package/lib/typescript/ads/RewardedInterstitialAd.d.ts.map +1 -0
  183. package/lib/typescript/common/Base64.d.ts +2 -0
  184. package/lib/typescript/common/Base64.d.ts.map +1 -0
  185. package/lib/typescript/common/MutatableParams.d.ts +1 -0
  186. package/lib/typescript/common/MutatableParams.d.ts.map +1 -0
  187. package/lib/typescript/common/ReferenceBase.d.ts +1 -0
  188. package/lib/typescript/common/ReferenceBase.d.ts.map +1 -0
  189. package/lib/typescript/common/deeps.d.ts +1 -0
  190. package/lib/typescript/common/deeps.d.ts.map +1 -0
  191. package/lib/typescript/common/id.d.ts +1 -0
  192. package/lib/typescript/common/id.d.ts.map +1 -0
  193. package/lib/typescript/common/index.d.ts +1 -0
  194. package/lib/typescript/common/index.d.ts.map +1 -0
  195. package/lib/typescript/common/path.d.ts +1 -0
  196. package/lib/typescript/common/path.d.ts.map +1 -0
  197. package/lib/typescript/common/promise.d.ts +1 -0
  198. package/lib/typescript/common/promise.d.ts.map +1 -0
  199. package/lib/typescript/common/serialize.d.ts +1 -0
  200. package/lib/typescript/common/serialize.d.ts.map +1 -0
  201. package/lib/typescript/common/validate.d.ts +1 -0
  202. package/lib/typescript/common/validate.d.ts.map +1 -0
  203. package/lib/typescript/hooks/useAppOpenAd.d.ts +1 -0
  204. package/lib/typescript/hooks/useAppOpenAd.d.ts.map +1 -0
  205. package/lib/typescript/hooks/useFullScreenAd.d.ts +1 -0
  206. package/lib/typescript/hooks/useFullScreenAd.d.ts.map +1 -0
  207. package/lib/typescript/hooks/useInterstitialAd.d.ts +1 -0
  208. package/lib/typescript/hooks/useInterstitialAd.d.ts.map +1 -0
  209. package/lib/typescript/hooks/useRewardedAd.d.ts +1 -0
  210. package/lib/typescript/hooks/useRewardedAd.d.ts.map +1 -0
  211. package/lib/typescript/hooks/useRewardedInterstitialAd.d.ts +1 -0
  212. package/lib/typescript/hooks/useRewardedInterstitialAd.d.ts.map +1 -0
  213. package/lib/typescript/index.d.ts +2 -1
  214. package/lib/typescript/index.d.ts.map +1 -0
  215. package/lib/typescript/internal/GoogleMobileAdsNativeEventEmitter.d.ts +1 -0
  216. package/lib/typescript/internal/GoogleMobileAdsNativeEventEmitter.d.ts.map +1 -0
  217. package/lib/typescript/internal/Module.d.ts +1 -0
  218. package/lib/typescript/internal/Module.d.ts.map +1 -0
  219. package/lib/typescript/internal/NativeError.d.ts +1 -0
  220. package/lib/typescript/internal/NativeError.d.ts.map +1 -0
  221. package/lib/typescript/internal/SharedEventEmitter.d.ts +1 -0
  222. package/lib/typescript/internal/SharedEventEmitter.d.ts.map +1 -0
  223. package/lib/typescript/internal/index.d.ts +1 -0
  224. package/lib/typescript/internal/index.d.ts.map +1 -0
  225. package/lib/typescript/internal/registry/nativeModule.d.ts +1 -0
  226. package/lib/typescript/internal/registry/nativeModule.d.ts.map +1 -0
  227. package/lib/typescript/types/AdEventListener.d.ts +1 -0
  228. package/lib/typescript/types/AdEventListener.d.ts.map +1 -0
  229. package/lib/typescript/types/AdEventsListener.d.ts +1 -0
  230. package/lib/typescript/types/AdEventsListener.d.ts.map +1 -0
  231. package/lib/typescript/types/AdShowOptions.d.ts +1 -0
  232. package/lib/typescript/types/AdShowOptions.d.ts.map +1 -0
  233. package/lib/typescript/types/AdStates.d.ts +1 -0
  234. package/lib/typescript/types/AdStates.d.ts.map +1 -0
  235. package/lib/typescript/types/AdapterStatus.d.ts +1 -0
  236. package/lib/typescript/types/AdapterStatus.d.ts.map +1 -0
  237. package/lib/typescript/types/AdsConsent.interface.d.ts +1 -0
  238. package/lib/typescript/types/AdsConsent.interface.d.ts.map +1 -0
  239. package/lib/typescript/types/AppEvent.d.ts +1 -0
  240. package/lib/typescript/types/AppEvent.d.ts.map +1 -0
  241. package/lib/typescript/types/BannerAdProps.d.ts +1 -0
  242. package/lib/typescript/types/BannerAdProps.d.ts.map +1 -0
  243. package/lib/typescript/types/GoogleMobileAdsNativeModule.d.ts +1 -0
  244. package/lib/typescript/types/GoogleMobileAdsNativeModule.d.ts.map +1 -0
  245. package/lib/typescript/types/MobileAd.interface.d.ts +1 -0
  246. package/lib/typescript/types/MobileAd.interface.d.ts.map +1 -0
  247. package/lib/typescript/types/MobileAdsModule.interface.d.ts +1 -0
  248. package/lib/typescript/types/MobileAdsModule.interface.d.ts.map +1 -0
  249. package/lib/typescript/types/Module.interface.d.ts +1 -0
  250. package/lib/typescript/types/Module.interface.d.ts.map +1 -0
  251. package/lib/typescript/types/RequestConfiguration.d.ts +1 -0
  252. package/lib/typescript/types/RequestConfiguration.d.ts.map +1 -0
  253. package/lib/typescript/types/RequestOptions.d.ts +1 -0
  254. package/lib/typescript/types/RequestOptions.d.ts.map +1 -0
  255. package/lib/typescript/types/RewardedAdReward.d.ts +1 -0
  256. package/lib/typescript/types/RewardedAdReward.d.ts.map +1 -0
  257. package/lib/typescript/types/index.d.ts +1 -0
  258. package/lib/typescript/types/index.d.ts.map +1 -0
  259. package/lib/typescript/validateAdRequestConfiguration.d.ts +1 -0
  260. package/lib/typescript/validateAdRequestConfiguration.d.ts.map +1 -0
  261. package/lib/typescript/validateAdRequestOptions.d.ts +1 -0
  262. package/lib/typescript/validateAdRequestOptions.d.ts.map +1 -0
  263. package/lib/typescript/validateAdShowOptions.d.ts +1 -0
  264. package/lib/typescript/validateAdShowOptions.d.ts.map +1 -0
  265. package/lib/typescript/version.d.ts +2 -1
  266. package/lib/typescript/version.d.ts.map +1 -0
  267. package/package.json +18 -19
  268. package/src/version.ts +1 -1
@@ -1 +1 @@
1
- {"version":3,"names":["validateAdShowOptions","options","out","isUndefined","isObject","Error","isPropertySet","isBoolean","immersiveModeEnabled"],"sources":["validateAdShowOptions.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nimport { isPropertySet, isBoolean, isObject, isUndefined } from './common';\nimport { AdShowOptions } from './types/AdShowOptions';\n\nexport function validateAdShowOptions(options?: AdShowOptions) {\n const out: AdShowOptions = {};\n\n if (isUndefined(options)) {\n return out;\n }\n\n if (!isObject(options)) {\n throw new Error(\"'options' expected an object value\");\n }\n\n if (isPropertySet(options, 'immersiveModeEnabled')) {\n if (!isBoolean(options.immersiveModeEnabled)) {\n throw new Error(\"'options.immersiveModeEnabled' expected a boolean value\");\n }\n\n out.immersiveModeEnabled = options.immersiveModeEnabled;\n }\n\n return out;\n}\n"],"mappings":";;;;;;AAiBA;AAjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKO,SAASA,qBAAqB,CAACC,OAAuB,EAAE;EAC7D,MAAMC,GAAkB,GAAG,CAAC,CAAC;EAE7B,IAAI,IAAAC,mBAAW,EAACF,OAAO,CAAC,EAAE;IACxB,OAAOC,GAAG;EACZ;EAEA,IAAI,CAAC,IAAAE,gBAAQ,EAACH,OAAO,CAAC,EAAE;IACtB,MAAM,IAAII,KAAK,CAAC,oCAAoC,CAAC;EACvD;EAEA,IAAI,IAAAC,qBAAa,EAACL,OAAO,EAAE,sBAAsB,CAAC,EAAE;IAClD,IAAI,CAAC,IAAAM,iBAAS,EAACN,OAAO,CAACO,oBAAoB,CAAC,EAAE;MAC5C,MAAM,IAAIH,KAAK,CAAC,yDAAyD,CAAC;IAC5E;IAEAH,GAAG,CAACM,oBAAoB,GAAGP,OAAO,CAACO,oBAAoB;EACzD;EAEA,OAAON,GAAG;AACZ"}
1
+ {"version":3,"names":["validateAdShowOptions","options","out","isUndefined","isObject","Error","isPropertySet","isBoolean","immersiveModeEnabled"],"sourceRoot":"../../src","sources":["validateAdShowOptions.ts"],"mappings":";;;;;;AAiBA;AAjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKO,SAASA,qBAAqB,CAACC,OAAuB,EAAE;EAC7D,MAAMC,GAAkB,GAAG,CAAC,CAAC;EAE7B,IAAI,IAAAC,mBAAW,EAACF,OAAO,CAAC,EAAE;IACxB,OAAOC,GAAG;EACZ;EAEA,IAAI,CAAC,IAAAE,gBAAQ,EAACH,OAAO,CAAC,EAAE;IACtB,MAAM,IAAII,KAAK,CAAC,oCAAoC,CAAC;EACvD;EAEA,IAAI,IAAAC,qBAAa,EAACL,OAAO,EAAE,sBAAsB,CAAC,EAAE;IAClD,IAAI,CAAC,IAAAM,iBAAS,EAACN,OAAO,CAACO,oBAAoB,CAAC,EAAE;MAC5C,MAAM,IAAIH,KAAK,CAAC,yDAAyD,CAAC;IAC5E;IAEAH,GAAG,CAACM,oBAAoB,GAAGP,OAAO,CAACO,oBAAoB;EACzD;EAEA,OAAON,GAAG;AACZ"}
@@ -5,6 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = void 0;
7
7
  // Generated by genversion.
8
- const version = '8.2.0';
8
+ const version = '8.2.2';
9
9
  exports.version = version;
10
10
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["version"],"sources":["version.ts"],"sourcesContent":["// Generated by genversion.\nexport const version = '8.2.0';\n"],"mappings":";;;;;;AAAA;AACO,MAAMA,OAAO,GAAG,OAAO;AAAC"}
1
+ {"version":3,"names":["version"],"sourceRoot":"../../src","sources":["version.ts"],"mappings":";;;;;;AAAA;AACO,MAAMA,OAAO,GAAG,OAAO;AAAC"}
@@ -1 +1 @@
1
- {"version":3,"names":["AdEventType"],"sources":["AdEventType.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nexport enum AdEventType {\n /**\n * When an ad has loaded. At this point, the ad is ready to be shown to the user.\n *\n * #### Example\n *\n * ```js\n * import { AdEventType } from 'react-native-google-mobile-ads';\n *\n * advert.addEventListener(AdEventType.LOADED, () => {\n * advert.show();\n * });\n * ```\n */\n LOADED = 'loaded',\n\n /**\n * The ad has thrown an error. See the error parameter the listener callback for more information.\n *\n * #### Example\n *\n * ```js\n * import { AdEventType } from 'react-native-google-mobile-ads';\n *\n * advert.addEventListener(AdEventType.ERROR, (error) => {\n * console.log('Ad error:', error);\n * });\n * ```\n */\n ERROR = 'error',\n\n /**\n * The ad opened and is currently visible to the user. This event is fired after the `show()`\n * method has been called.\n */\n OPENED = 'opened',\n\n /**\n * The user clicked the advert.\n */\n CLICKED = 'clicked',\n\n /**\n * The user closed the ad and has returned back to your application.\n */\n CLOSED = 'closed',\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,WAAYA,WAAW;AA8CtB,WA9CWA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;AAAA,GAAXA,WAAW,KAAXA,WAAW"}
1
+ {"version":3,"names":["AdEventType"],"sourceRoot":"../../src","sources":["AdEventType.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,WAAYA,WAAW;AA8CtB,WA9CWA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;AAAA,GAAXA,WAAW,KAAXA,WAAW"}
@@ -1 +1 @@
1
- {"version":3,"names":["TCModel","TCString","NativeModules","AdsConsentDebugGeography","AdsConsentPurposes","AdsConsentSpecialFeatures","isPropertySet","isArray","isBoolean","isObject","isString","native","RNGoogleMobileAdsConsentModule","AdsConsent","requestInfoUpdate","options","Error","debugGeography","DISABLED","EEA","NOT_EEA","tagForUnderAgeOfConsent","testDeviceIdentifiers","deviceId","showForm","reset","getTCString","getTCModel","tcString","decode","getUserChoices","tcModel","e","__DEV__","console","warn","activelyScanDeviceCharacteristicsForIdentification","specialFeatureOptins","has","ACTIVELY_SCAN_DEVICE_CHARACTERISTICS_FOR_IDENTIFICATION","applyMarketResearchToGenerateAudienceInsights","purposeConsents","APPLY_MARKET_RESEARCH_TO_GENERATE_AUDIENCE_INSIGHTS","createAPersonalisedAdsProfile","CREATE_A_PERSONALISED_ADS_PROFILE","createAPersonalisedContentProfile","developAndImproveProducts","DEVELOP_AND_IMPROVE_PRODUCTS","measureAdPerformance","MEASURE_AD_PERFORMANCE","measureContentPerformance","MEASURE_CONTENT_PERFORMANCE","selectBasicAds","SELECT_BASIC_ADS","selectPersonalisedAds","SELECT_PERSONALISED_ADS","selectPersonalisedContent","SELECT_PERSONALISED_CONTENT","storeAndAccessInformationOnDevice","STORE_AND_ACCESS_INFORMATION_ON_DEVICE","usePreciseGeolocationData","USE_PRECISE_GEOLOCATION_DATA"],"sources":["AdsConsent.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nimport { TCModel, TCString } from '@iabtcf/core';\nimport { NativeModules } from 'react-native';\nimport { AdsConsentDebugGeography } from './AdsConsentDebugGeography';\nimport { AdsConsentPurposes } from './AdsConsentPurposes';\nimport { AdsConsentSpecialFeatures } from './AdsConsentSpecialFeatures';\nimport { isPropertySet, isArray, isBoolean, isObject, isString } from './common';\nimport {\n AdsConsentFormResult,\n AdsConsentInfo,\n AdsConsentInfoOptions,\n AdsConsentInterface,\n AdsConsentUserChoices,\n} from './types/AdsConsent.interface';\n\nconst native = NativeModules.RNGoogleMobileAdsConsentModule;\n\nexport const AdsConsent: AdsConsentInterface = {\n requestInfoUpdate(options: AdsConsentInfoOptions = {}): Promise<AdsConsentInfo> {\n if (!isObject(options)) {\n throw new Error(\"AdsConsent.requestInfoUpdate(*) 'options' expected an object value.\");\n }\n\n if (\n isPropertySet(options, 'debugGeography') &&\n options.debugGeography !== AdsConsentDebugGeography.DISABLED &&\n options.debugGeography !== AdsConsentDebugGeography.EEA &&\n options.debugGeography !== AdsConsentDebugGeography.NOT_EEA\n ) {\n throw new Error(\n \"AdsConsent.requestInfoUpdate(*) 'options.debugGeography' expected one of AdsConsentDebugGeography.DISABLED, AdsConsentDebugGeography.EEA or AdsConsentDebugGeography.NOT_EEA.\",\n );\n }\n\n if (\n isPropertySet(options, 'tagForUnderAgeOfConsent') &&\n !isBoolean(options.tagForUnderAgeOfConsent)\n ) {\n throw new Error(\n \"AdsConsent.requestInfoUpdate(*) 'options.tagForUnderAgeOfConsent' expected a boolean value.\",\n );\n }\n\n if (isPropertySet(options, 'testDeviceIdentifiers')) {\n if (!isArray(options.testDeviceIdentifiers)) {\n throw new Error(\n \"AdsConsent.requestInfoUpdate(*) 'options.testDeviceIdentifiers' expected an array of string values.\",\n );\n }\n\n for (const deviceId of options.testDeviceIdentifiers ?? []) {\n if (!isString(deviceId)) {\n throw new Error(\n \"AdsConsent.requestInfoUpdate(*) 'options.testDeviceIdentifiers' expected an array of string values.\",\n );\n }\n }\n }\n\n return native.requestInfoUpdate(options);\n },\n\n showForm(): Promise<AdsConsentFormResult> {\n return native.showForm();\n },\n\n reset(): void {\n return native.reset();\n },\n\n getTCString(): Promise<string> {\n return native.getTCString();\n },\n\n async getTCModel(): Promise<TCModel> {\n const tcString = await native.getTCString();\n return TCString.decode(tcString);\n },\n\n async getUserChoices(): Promise<AdsConsentUserChoices> {\n const tcString = await native.getTCString();\n\n let tcModel: TCModel;\n\n try {\n tcModel = TCString.decode(tcString);\n } catch (e) {\n tcModel = new TCModel();\n\n if (__DEV__) {\n // eslint-disable-next-line no-console\n console.warn(`Failed to decode tcString ${tcString}:`, e);\n }\n }\n\n return {\n activelyScanDeviceCharacteristicsForIdentification: tcModel.specialFeatureOptins.has(\n AdsConsentSpecialFeatures.ACTIVELY_SCAN_DEVICE_CHARACTERISTICS_FOR_IDENTIFICATION,\n ),\n applyMarketResearchToGenerateAudienceInsights: tcModel.purposeConsents.has(\n AdsConsentPurposes.APPLY_MARKET_RESEARCH_TO_GENERATE_AUDIENCE_INSIGHTS,\n ),\n createAPersonalisedAdsProfile: tcModel.purposeConsents.has(\n AdsConsentPurposes.CREATE_A_PERSONALISED_ADS_PROFILE,\n ),\n createAPersonalisedContentProfile: tcModel.purposeConsents.has(\n AdsConsentPurposes.CREATE_A_PERSONALISED_ADS_PROFILE,\n ),\n developAndImproveProducts: tcModel.purposeConsents.has(\n AdsConsentPurposes.DEVELOP_AND_IMPROVE_PRODUCTS,\n ),\n measureAdPerformance: tcModel.purposeConsents.has(AdsConsentPurposes.MEASURE_AD_PERFORMANCE),\n measureContentPerformance: tcModel.purposeConsents.has(\n AdsConsentPurposes.MEASURE_CONTENT_PERFORMANCE,\n ),\n selectBasicAds: tcModel.purposeConsents.has(AdsConsentPurposes.SELECT_BASIC_ADS),\n selectPersonalisedAds: tcModel.purposeConsents.has(\n AdsConsentPurposes.SELECT_PERSONALISED_ADS,\n ),\n selectPersonalisedContent: tcModel.purposeConsents.has(\n AdsConsentPurposes.SELECT_PERSONALISED_CONTENT,\n ),\n storeAndAccessInformationOnDevice: tcModel.purposeConsents.has(\n AdsConsentPurposes.STORE_AND_ACCESS_INFORMATION_ON_DEVICE,\n ),\n usePreciseGeolocationData: tcModel.specialFeatureOptins.has(\n AdsConsentSpecialFeatures.USE_PRECISE_GEOLOCATION_DATA,\n ),\n };\n },\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,OAAO,EAAEC,QAAQ,QAAQ,cAAc;AAChD,SAASC,aAAa,QAAQ,cAAc;AAC5C,SAASC,wBAAwB,QAAQ,4BAA4B;AACrE,SAASC,kBAAkB,QAAQ,sBAAsB;AACzD,SAASC,yBAAyB,QAAQ,6BAA6B;AACvE,SAASC,aAAa,EAAEC,OAAO,EAAEC,SAAS,EAAEC,QAAQ,EAAEC,QAAQ,QAAQ,UAAU;AAShF,MAAMC,MAAM,GAAGT,aAAa,CAACU,8BAA8B;AAE3D,OAAO,MAAMC,UAA+B,GAAG;EAC7CC,iBAAiB,GAA+D;IAAA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C;MAChFC,qBAAqB,EAAEvB,OAAO,CAACU,eAAe,CAACH,GAAG,CAChDlC,kBAAkB,CAACmD,uBAAuB,CAC3C;MACDC,yBAAyB,EAAEzB,OAAO,CAACU,eAAe,CAACH,GAAG,CACpDlC,kBAAkB,CAACqD,2BAA2B,CAC/C;MACDC,iCAAiC,EAAE3B,OAAO,CAACU,eAAe,CAACH,GAAG,CAC5DlC,kBAAkB,CAACuD,sCAAsC,CAC1D;MACDC,yBAAyB,EAAE7B,OAAO,CAACM,oBAAoB,CAACC,GAAG,CACzDjC,yBAAyB,CAACwD,4BAA4B;IAE1D,CAAC;EACH;AACF,CAAC"}
1
+ {"version":3,"names":["TCModel","TCString","NativeModules","AdsConsentDebugGeography","AdsConsentPurposes","AdsConsentSpecialFeatures","isPropertySet","isArray","isBoolean","isObject","isString","native","RNGoogleMobileAdsConsentModule","AdsConsent","requestInfoUpdate","options","Error","debugGeography","DISABLED","EEA","NOT_EEA","tagForUnderAgeOfConsent","testDeviceIdentifiers","deviceId","showForm","reset","getTCString","getTCModel","tcString","decode","getUserChoices","tcModel","e","__DEV__","console","warn","activelyScanDeviceCharacteristicsForIdentification","specialFeatureOptins","has","ACTIVELY_SCAN_DEVICE_CHARACTERISTICS_FOR_IDENTIFICATION","applyMarketResearchToGenerateAudienceInsights","purposeConsents","APPLY_MARKET_RESEARCH_TO_GENERATE_AUDIENCE_INSIGHTS","createAPersonalisedAdsProfile","CREATE_A_PERSONALISED_ADS_PROFILE","createAPersonalisedContentProfile","developAndImproveProducts","DEVELOP_AND_IMPROVE_PRODUCTS","measureAdPerformance","MEASURE_AD_PERFORMANCE","measureContentPerformance","MEASURE_CONTENT_PERFORMANCE","selectBasicAds","SELECT_BASIC_ADS","selectPersonalisedAds","SELECT_PERSONALISED_ADS","selectPersonalisedContent","SELECT_PERSONALISED_CONTENT","storeAndAccessInformationOnDevice","STORE_AND_ACCESS_INFORMATION_ON_DEVICE","usePreciseGeolocationData","USE_PRECISE_GEOLOCATION_D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e,CAACH,GAAG,CACxDlC,kBAAkB,CAACwC,iCAAiC,CACrD;MACDC,iCAAiC,EAAEd,OAAO,CAACU,eAAe,CAACH,GAAG,CAC5DlC,kBAAkB,CAACwC,iCAAiC,CACrD;MACDE,yBAAyB,EAAEf,OAAO,CAACU,eAAe,CAACH,GAAG,CACpDlC,kBAAkB,CAAC2C,4BAA4B,CAChD;MACDC,oBAAoB,EAAEjB,OAAO,CAACU,eAAe,CAACH,GAAG,CAAClC,kBAAkB,CAAC6C,sBAAsB,CAAC;MAC5FC,yBAAyB,EAAEnB,OAAO,CAACU,eAAe,CAACH,GAAG,CACpDlC,kBAAkB,CAAC+C,2BAA2B,CAC/C;MACDC,cAAc,EAAErB,OAAO,CAACU,eAAe,CAACH,GAAG,CAAClC,kBAAkB,CAACiD,gBAAgB,CAAC;MAChFC,qBAAqB,EAAEvB,OAAO,CAACU,eAAe,CAACH,GAAG,CAChDlC,kBAAkB,CAACmD,uBAAuB,CAC3C;MACDC,yBAAyB,EAAEzB,OAAO,CAACU,eAAe,CAACH,GAAG,CACpDlC,kBAAkB,CAACqD,2BAA2B,CAC/C;MACDC,iCAAiC,EAAE3B,OAAO,CAACU,eAAe,CAACH,GAAG,CAC5DlC,kBAAkB,CAACuD,sCAAsC,CAC1D;MACDC,yBAAyB,EAAE7B,OAAO,CAACM,oBAAoB,CAACC,GAAG,CACzDjC,yBAAyB,CAACwD,4BAA4B;IAE1D,CAAC;EACH;AACF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"names":["AdsConsentDebugGeography"],"sources":["AdsConsentDebugGeography.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\n/**\n * AdsConsentDebugGeography enum.\n *\n * Used to set a mock location when testing the `AdsConsent` helper.\n */\nexport enum AdsConsentDebugGeography {\n /**\n * Disable any debug geography.\n */\n DISABLED = 0,\n\n /**\n * Sets the location to within the EEA.\n */\n EEA = 1,\n\n /**\n * Sets the location to outside of the EEA.\n */\n NOT_EEA = 2,\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAYA,wBAAwB;AAenC,WAfWA,wBAAwB;EAAxBA,wBAAwB,CAAxBA,wBAAwB;EAAxBA,wBAAwB,CAAxBA,wBAAwB;EAAxBA,wBAAwB,CAAxBA,wBAAwB;AAAA,GAAxBA,wBAAwB,KAAxBA,wBAAwB"}
1
+ {"version":3,"names":["AdsConsentDebugGeography"],"sourceRoot":"../../src","sources":["AdsConsentDebugGeography.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAYA,wBAAwB;AAenC,WAfWA,wBAAwB;EAAxBA,wBAAwB,CAAxBA,wBAAwB;EAAxBA,wBAAwB,CAAxBA,wBAAwB;EAAxBA,wBAAwB,CAAxBA,wBAAwB;AAAA,GAAxBA,wBAAwB,KAAxBA,wBAAwB"}
@@ -1 +1 @@
1
- {"version":3,"names":["AdsConsentPurposes"],"sources":["AdsConsentPurposes.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n *\n *\n *\n * The definitions in this document are copied from IAB's global vendor list.\n *\n * https://vendor-list.consensu.org/v2/vendor-list.json\n * https://github.com/InteractiveAdvertisingBureau/GDPR-Transparency-and-Consent-Framework\n *\n */\n\nexport enum AdsConsentPurposes {\n /**\n * Cookies, device identifiers, or other information can be stored or\n * accessed on your device for the purposes presented to you.\n *\n * Vendors can:\n * - Store and access information on the device such as cookies\n * and device identifiers presented to a user.\n */\n STORE_AND_ACCESS_INFORMATION_ON_DEVICE = 1,\n\n /**\n * Ads can be shown to you based on the content you’re viewing,\n * the app you’re using, your approximate location, or your device type.\n *\n * To do basic ad selection vendors can:\n * - Use real-time information about the context in which the ad will be shown,\n * to show the ad, including information about the content and the device, such as:\n * device type and capabilities, user agent, URL, IP address\n * - Use a user’s non-precise geolocation data\n * - Control the frequency of ads shown to a user.\n * - Sequence the order in which ads are shown to a user.\n * - Prevent an ad from serving in an unsuitable editorial (brand-unsafe) context\n *\n * Vendors cannot:\n * - Create a personalised ads profile using this information for the selection of\n * future ads without a separate legal basis to create a personalised ads profile.\n * - N.B. Non-precise means only an approximate location involving at least a radius\n * of 500 meters is permitted.\n */\n SELECT_BASIC_ADS = 2,\n\n /**\n * A profile can be built about you and your interests to show you personalised ads\n * that are relevant to you.\n *\n * To create a personalised ads profile vendors can:\n * - Collect information about a user, including a user's activity, interests,\n * demographic information, or location, to create or edit a user profile for use\n * in personalised advertising.\n * - Combine this information with other information previously collected,\n * including from across websites and apps, to create or edit a user profile\n * for use in personalised advertising.\n */\n CREATE_A_PERSONALISED_ADS_PROFILE = 3,\n\n /**\n * Personalised ads can be shown to you based on a profile about you.\n *\n * To select personalised ads vendors can:\n * - Select personalised ads based on a user profile or other historical user data,\n * including a user’s prior activity, interests, visits to sites or apps, location,\n * or demographic information.\n */\n SELECT_PERSONALISED_ADS = 4,\n\n /**\n * A profile can be built about you and your interests to show you personalised content\n * that is relevant to you.\n *\n * To create a personalised content profile vendors can:\n * - Collect information about a user, including a user's activity, interests, visits to\n * sites or apps, demographic information, or location, to create or edit a user profile\n * for personalising content.\n * - Combine this information with other information previously collected,\n * including from across websites and apps, to create or edit a user profile for use\n * in personalising content.\n */\n CREATE_A_PERSONALISED_CONTENT_PROFILE = 5,\n\n /**\n * Personalised content can be shown to you based on a profile about you.\n *\n * To select personalised content vendors can:\n * - Select personalised content based on a user profile or other historical user data,\n * including a user’s prior activity, interests, visits to sites or apps, location,\n * or demographic information.\n */\n SELECT_PERSONALISED_CONTENT = 6,\n\n /**\n * The performance and effectiveness of ads that you see or interact with can be measured.\n *\n * To measure ad performance vendors can:\n * - Measure whether and how ads were delivered to and interacted with by a user\n * - Provide reporting about ads including their effectiveness and performance\n * - Provide reporting about users who interacted with ads using data observed during\n * the course of the user's interaction with that ad\n * - Provide reporting to publishers about the ads displayed on their property\n * - Measure whether an ad is serving in a suitable editorial environment (brand-safe) context\n * - Determine the percentage of the ad that had the opportunity to be seen and\n * the duration of that opportunity\n * - Combine this information with other information previously collected,\n * including from across websites and apps\n *\n * Vendors cannot:\n * - Apply panel- or similarly-derived audience insights data to ad measurement data\n * without a Legal Basis to apply market research to generate audience insights (Purpose 9)\n */\n MEASURE_AD_PERFORMANCE = 7,\n\n /**\n * The performance and effectiveness of content that you see or interact with can be measured.\n *\n * To measure content performance vendors can:\n * - Measure and report on how content was delivered to and interacted with by users.\n * - Provide reporting, using directly measurable or known information, about users who\n * interacted with the content\n * - Combine this information with other information previously collected,\n * including from across websites and apps.\n *\n * Vendors cannot:\n * - Measure whether and how ads (including native ads) were delivered to and\n * interacted with by a user.\n * - Apply panel- or similarly derived audience insights data to ad measurement\n * data without a Legal Basis to apply market research to generate audience insights (Purpose 9)\n */\n MEASURE_CONTENT_PERFORMANCE = 8,\n\n /**\n * Market research can be used to learn more about the audiences who visit sites/apps and view ads.\n *\n * To apply market research to generate audience insights vendors can:\n * - Provide aggregate reporting to advertisers or their representatives about\n * the audiences reached by their ads, through panel-based and similarly derived insights.\n * - Provide aggregate reporting to publishers about the audiences that were served or\n * interacted with content and/or ads on their property by applying\n * panel-based and similarly derived insights.\n * - Associate offline data with an online user for the purposes of\n * market research to generate audience insights if vendors have declared to match and\n * combine offline data sources (Feature 1)\n * - Combine this information with other information previously collected including from\n * across websites and apps.\n *\n * Vendors cannot:\n * - Measure the performance and effectiveness of ads that a specific user was served or\n * interacted with, without a Legal Basis to measure ad performance.\n * - Measure which content a specific user was served and how they interacted with it,\n * without a Legal Basis to measure content performance.\n */\n APPLY_MARKET_RESEARCH_TO_GENERATE_AUDIENCE_INSIGHTS = 9,\n\n /**\n * Your data can be used to improve existing systems and software,\n * and to develop new products\n *\n * To develop new products and improve products vendors can:\n * - Use information to improve their existing products with new features and\n * to develop new products\n * - Create new models and algorithms through machine learning\n *\n * Vendors cannot:\n * - Conduct any other data processing operation allowed under\n * a different purpose under this purpose\n */\n DEVELOP_AND_IMPROVE_PRODUCTS = 10,\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,WAAYA,kBAAkB;AA4J7B,WA5JWA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;AAAA,GAAlBA,kBAAkB,KAAlBA,kBAAkB"}
1
+ {"version":3,"names":["AdsConsentPurposes"],"sourceRoot":"../../src","sources":["AdsConsentPurposes.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,WAAYA,kBAAkB;AA4J7B,WA5JWA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;AAAA,GAAlBA,kBAAkB,KAAlBA,kBAAkB"}
@@ -1 +1 @@
1
- {"version":3,"names":["AdsConsentSpecialFeatures"],"sources":["AdsConsentSpecialFeatures.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n *\n *\n *\n * The definitions in this document are copied from IAB's global vendor list.\n *\n * https://vendor-list.consensu.org/v2/vendor-list.json\n * https://github.com/InteractiveAdvertisingBureau/GDPR-Transparency-and-Consent-Framework\n *\n */\n\nexport enum AdsConsentSpecialFeatures {\n /**\n * Your precise geolocation data can be used in support of one or more purposes.\n * This means your location can be accurate to within several meters.\n *\n * Vendors can:\n * - Collect and process precise geolocation data in support of one or more purposes.\n * - Precise geolocation means that there are no restrictions on the precision of\n * a user's location; this can be accurate to within several meters.\n */\n USE_PRECISE_GEOLOCATION_DATA = 1,\n\n /**\n * Your device can be identified based on a scan of your device's\n * unique combination of characteristics.\n *\n * Vendors can:\n * - Create an identifier using data collected via actively scanning a device for\n * specific characteristics, e.g. installed fonts or screen resolution.\n * - Use such an identifier to re-identify a device.\n */\n ACTIVELY_SCAN_DEVICE_CHARACTERISTICS_FOR_IDENTIFICATION = 2,\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,WAAYA,yBAAyB;AAsBpC,WAtBWA,yBAAyB;EAAzBA,yBAAyB,CAAzBA,yBAAyB;EAAzBA,yBAAyB,CAAzBA,yBAAyB;AAAA,GAAzBA,yBAAyB,KAAzBA,yBAAyB"}
1
+ {"version":3,"names":["AdsConsentSpecialFeatures"],"sourceRoot":"../../src","sources":["AdsConsentSpecialFeatures.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,WAAYA,yBAAyB;AAsBpC,WAtBWA,yBAAyB;EAAzBA,yBAAyB,CAAzBA,yBAAyB;EAAzBA,yBAAyB,CAAzBA,yBAAyB;AAAA,GAAzBA,yBAAyB,KAAzBA,yBAAyB"}
@@ -1 +1 @@
1
- {"version":3,"names":["AdsConsentStatus"],"sources":["AdsConsentStatus.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\n/**\n * AdsConsentStatus enum.\n */\nexport enum AdsConsentStatus {\n /**\n * Unknown consent status, AdsConsent.requestInfoUpdate needs to be called to update it.\n */\n UNKNOWN = 'UNKNOWN',\n\n /**\n * User consent required but not yet obtained.\n */\n REQUIRED = 'REQUIRED',\n\n /**\n * User consent not required.\n */\n NOT_REQUIRED = 'NOT_REQUIRED',\n\n /**\n * User consent already obtained.\n */\n OBTAINED = 'OBTAINED',\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAYA,gBAAgB;AAoB3B,WApBWA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;AAAA,GAAhBA,gBAAgB,KAAhBA,gBAAgB"}
1
+ {"version":3,"names":["AdsConsentStatus"],"sourceRoot":"../../src","sources":["AdsConsentStatus.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAYA,gBAAgB;AAoB3B,WApBWA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;AAAA,GAAhBA,gBAAgB,KAAhBA,gBAAgB"}
@@ -1 +1 @@
1
- {"version":3,"names":["BannerAdSize"],"sources":["BannerAdSize.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n *\n */\n\nexport enum BannerAdSize {\n /**\n * Mobile Marketing Association (MMA) banner ad size (320x50 density-independent pixels).\n */\n BANNER = 'BANNER',\n\n /**\n * Interactive Advertising Bureau (IAB) full banner ad size (468x60 density-independent pixels).\n */\n FULL_BANNER = 'FULL_BANNER',\n\n /**\n * Large banner ad size (320x100 density-independent pixels).\n */\n LARGE_BANNER = 'LARGE_BANNER',\n\n /**\n * Interactive Advertising Bureau (IAB) leaderboard ad size (728x90 density-independent pixels).\n */\n LEADERBOARD = 'LEADERBOARD',\n\n /**\n * Interactive Advertising Bureau (IAB) medium rectangle ad size (300x250 density-independent pixels).\n */\n MEDIUM_RECTANGLE = 'MEDIUM_RECTANGLE',\n\n /**\n * @deprecated Use `ANCHORED_ADAPTIVE_BANNER` instead.\n */\n ADAPTIVE_BANNER = 'ADAPTIVE_BANNER',\n\n /**\n * A (next generation) dynamically sized banner that is full-width and auto-height.\n */\n ANCHORED_ADAPTIVE_BANNER = 'ANCHORED_ADAPTIVE_BANNER',\n\n /**\n * Inline adaptive banners are larger, taller banners compared to anchored adaptive banners. They are of variable height, and can be as tall as the device screen.\n * They are intended to be placed in scrolling content.\n */\n INLINE_ADAPTIVE_BANNER = 'INLINE_ADAPTIVE_BANNER',\n\n /**\n * A dynamically sized banner that matches its parent's width and expands/contracts its height to match the ad's content after loading completes.\n */\n FLUID = 'FLUID',\n\n /**\n * IAB wide skyscraper ad size (160x600 density-independent pixels). This size is currently not supported by the Google Mobile Ads network; this is intended for mediation ad networks only.\n */\n WIDE_SKYSCRAPER = 'WIDE_SKYSCRAPER',\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,WAAYA,YAAY;AAmDvB,WAnDWA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;AAAA,GAAZA,YAAY,KAAZA,YAAY"}
1
+ {"version":3,"names":["BannerAdSize"],"sourceRoot":"../../src","sources":["BannerAdSize.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,WAAYA,YAAY;AAmDvB,WAnDWA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;AAAA,GAAZA,YAAY,KAAZA,YAAY"}
@@ -1 +1 @@
1
- {"version":3,"names":["GAMAdEventType"],"sources":["GAMAdEventType.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nexport enum GAMAdEventType {\n /**\n * An event fired when the ad received Ad Manager specific app event.\n *\n * The app event contains a `name` and `data`. `data` could be undefeined.\n *\n * #### Example\n *\n * ```js\n * import { GAMAdEventType } from 'react-native-google-mobile-ads';\n *\n * interstitialAd.onAdEvent((type, error, data) => {\n * if (type === GAMAdEventType.APP_EVENT) {\n * console.log(`Received app event: ${data.name} with data: ${data.data}`);\n * }\n * });\n * ```\n */\n APP_EVENT = 'app_event',\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,WAAYA,cAAc;AAmBzB,WAnBWA,cAAc;EAAdA,cAAc;AAAA,GAAdA,cAAc,KAAdA,cAAc"}
1
+ {"version":3,"names":["GAMAdEventType"],"sourceRoot":"../../src","sources":["GAMAdEventType.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,WAAYA,cAAc;AAmBzB,WAnBWA,cAAc;EAAdA,cAAc;AAAA,GAAdA,cAAc,KAAdA,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"names":["MaxAdContentRating"],"sources":["MaxAdContentRating.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nexport enum MaxAdContentRating {\n /**\n * \"General audiences.\" Content suitable for all audiences, including families and children.\n */\n G = 'G',\n\n /**\n * \"Parental guidance.\" Content suitable for most audiences with parental guidance, including topics like non-realistic, cartoonish violence.\n */\n PG = 'PG',\n\n /**\n * T: \"Teen.\" Content suitable for teen and older audiences, including topics such as general health, social networks, scary imagery, and fight sports.\n */\n T = 'T',\n\n /**\n * \"Mature audiences.\" Content suitable only for mature audiences; includes topics such as alcohol, gambling, sexual content, and weapons.\n */\n MA = 'MA',\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,WAAYA,kBAAkB;AAoB7B,WApBWA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;AAAA,GAAlBA,kBAAkB,KAAlBA,kBAAkB"}
1
+ {"version":3,"names":["MaxAdContentRating"],"sourceRoot":"../../src","sources":["MaxAdContentRating.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,WAAYA,kBAAkB;AAoB7B,WApBWA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;AAAA,GAAlBA,kBAAkB,KAAlBA,kBAAkB"}
@@ -1 +1 @@
1
- {"version":3,"names":["Module","validateAdRequestConfiguration","version","namespace","nativeModuleName","MobileAdsModule","constructor","app","config","emitter","addListener","event","emit","adUnitId","requestId","initialize","native","setRequestConfiguration","requestConfiguration","e","Error","message","openAdInspector","MobileAdsInstance","name","nativeEvents","MobileAds"],"sources":["MobileAds.ts"],"sourcesContent":["import { Module } from './internal';\nimport { validateAdRequestConfiguration } from './validateAdRequestConfiguration';\nimport { version } from './version';\nimport { MobileAdsModuleInterface } from './types/MobileAdsModule.interface';\nimport { RequestConfiguration } from './types/RequestConfiguration';\nimport { App, Config } from './types/Module.interface';\n\nconst namespace = 'google_mobile_ads';\n\nconst nativeModuleName = [\n 'RNGoogleMobileAdsModule',\n 'RNGoogleMobileAdsAppOpenModule',\n 'RNGoogleMobileAdsInterstitialModule',\n 'RNGoogleMobileAdsRewardedModule',\n 'RNGoogleMobileAdsRewardedInterstitialModule',\n];\n\ntype Event = {\n adUnitId: string;\n requestId: number;\n};\n\nclass MobileAdsModule extends Module implements MobileAdsModuleInterface {\n constructor(app: App, config: Config) {\n super(app, config);\n\n this.emitter.addListener('google_mobile_ads_app_open_event', (event: Event) => {\n this.emitter.emit(\n `google_mobile_ads_app_open_event:${event.adUnitId}:${event.requestId}`,\n event,\n );\n });\n\n this.emitter.addListener('google_mobile_ads_interstitial_event', (event: Event) => {\n this.emitter.emit(\n `google_mobile_ads_interstitial_event:${event.adUnitId}:${event.requestId}`,\n event,\n );\n });\n\n this.emitter.addListener('google_mobile_ads_rewarded_event', (event: Event) => {\n this.emitter.emit(\n `google_mobile_ads_rewarded_event:${event.adUnitId}:${event.requestId}`,\n event,\n );\n });\n\n this.emitter.addListener('google_mobile_ads_rewarded_interstitial_event', (event: Event) => {\n this.emitter.emit(\n `google_mobile_ads_rewarded_interstitial_event:${event.adUnitId}:${event.requestId}`,\n event,\n );\n });\n }\n\n initialize() {\n return this.native.initialize();\n }\n\n setRequestConfiguration(requestConfiguration: RequestConfiguration) {\n let config;\n try {\n config = validateAdRequestConfiguration(requestConfiguration);\n } catch (e) {\n if (e instanceof Error) {\n throw new Error(`googleMobileAds.setRequestConfiguration(*) ${e.message}`);\n }\n }\n\n return this.native.setRequestConfiguration(config);\n }\n\n openAdInspector() {\n return this.native.openAdInspector();\n }\n}\n\nconst MobileAdsInstance = new MobileAdsModule(\n { name: 'AppName' },\n {\n version,\n namespace,\n nativeModuleName,\n nativeEvents: [\n 'google_mobile_ads_app_open_event',\n 'google_mobile_ads_interstitial_event',\n 'google_mobile_ads_rewarded_event',\n 'google_mobile_ads_rewarded_interstitial_event',\n ],\n },\n);\n\nexport const MobileAds = () => {\n return MobileAdsInstance;\n};\n\nexport default MobileAds;\n"],"mappings":"AAAA,SAASA,MAAM,QAAQ,YAAY;AACnC,SAASC,8BAA8B,QAAQ,kCAAkC;AACjF,SAASC,OAAO,QAAQ,WAAW;AAKnC,MAAMC,SAAS,GAAG,mBAAmB;AAErC,MAAMC,gBAAgB,GAAG,CACvB,yBAAyB,EACzB,gCAAgC,EAChC,qCAAqC,EACrC,iCAAiC,EACjC,6CAA6C,CAC9C;AAOD,MAAMC,eAAe,SAASL,MAAM,CAAqC;EACvEM,WAAW,CAACC,GAAQ,EAAEC,MAAc,EAAE;IACpC,KAAK,CAACD,GAAG,EAAEC,MAAM,CAAC;IAElB,IAAI,CAACC,OAAO,CAACC,WAA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AChB,OAAO,IAAI,CAACN,MAAM,CAACM,eAAe,EAAE;EACtC;AACF;AAEA,MAAMC,iBAAiB,GAAG,IAAIlB,eAAe,CAC3C;EAAEmB,IAAI,EAAE;AAAU,CAAC,EACnB;EACEtB,OAAO;EACPC,SAAS;EACTC,gBAAgB;EAChBqB,YAAY,EAAE,CACZ,kCAAkC,EAClC,sCAAsC,EACtC,kCAAkC,EAClC,+CAA+C;AAEnD,CAAC,CACF;AAED,OAAO,MAAMC,SAAS,GAAG,MAAM;EAC7B,OAAOH,iBAAiB;AAC1B,CAAC;AAED,eAAeG,SAAS"}
1
+ {"version":3,"names":["Module","validateAdRequestConfiguration","version","namespace","nativeModuleName","MobileAdsModule","constructor","app","config","emitter","addListener","event","emit","adUnitId","requestId","initialize","native","setRequestConfiguration","requestConfiguration","e","Error","message","openAdInspector","MobileAdsInstance","name","nativeEvents","MobileAds"],"sourceRoot":"../../src","sources":["MobileAds.ts"],"mappings":"AAAA,SAASA,MAAM,QAAQ,YAAY;AACnC,SAASC,8BAA8B,QAAQ,kCAAkC;AACjF,SAASC,OAAO,QAAQ,WAAW;AAKnC,MAAMC,SAAS,GAAG,mBAAmB;AAErC,MAAMC,gBAAgB,GAAG,CACvB,yBAAyB,EACzB,gCAAgC,EAChC,qCAAqC,EACrC,iCAAiC,EACjC,6CAA6C,CAC9C;AAOD,MAAMC,eAAe,SAASL,MAAM,CAAqC;EACvEM,WAAW,CAACC,GAAQ,EAAEC,MAAc,EAAE;IACpC,KAAK,CAACD,GAAG,EAAEC,MAAM,CAAC;IAElB,IAAI,CAACC,OAAO,CAACC,WAAW,CAAC,kCAAkC,EAAGC,KAAY,IAAK;MAC7E,IAAI,CAACF,OAAO,CAACG,IAAI,CACd,oCAAmCD,KAAK,CAACE,QAAS,IAAGF,KAAK,CAACG,SAAU,EAAC,EACvEH,KAAK,CACN;IACH,CAAC,CAAC;IAEF,IAAI,CAACF,OAAO,CAACC,WAAW,CAAC,sCAAsC,EAAGC,KAAY,IA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C,kCAAkC,EAClC,+CAA+C;AAEnD,CAAC,CACF;AAED,OAAO,MAAMC,SAAS,GAAG,MAAM;EAC7B,OAAOH,iBAAiB;AAC1B,CAAC;AAED,eAAeG,SAAS"}
@@ -1 +1 @@
1
- {"version":3,"names":["RewardedAdEventType"],"sources":["RewardedAdEventType.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nexport enum RewardedAdEventType {\n /**\n * An event fired when a rewarded ad has loaded.\n *\n * This type differs from `AdEventType.LOADED` as when a rewarded ad is loaded,\n * an additional data payload is provided to the event handler containing the ad reward\n * (assuming the user earns the reward).\n *\n * The reward contains a `type` and `amount`.\n *\n * #### Example\n *\n * ```js\n * import { RewardedAdEventType } from 'react-native-google-mobile-ads';\n *\n * rewardedAd.addEventListener(RewardedAdEventType.LOADED, (reward) => {\n * console.log(`Rewarded Ad loaded with ${data.amount} ${data.type} as reward`);\n * // E.g. \"Rewarded Ad loaded with 50 coins as reward\"\n * rewardedAd.show();\n * });\n * ```\n */\n LOADED = 'rewarded_loaded',\n\n /**\n * An event fired when the user earned the reward for the video. If the user does not earn a reward,\n * the `AdEventType.CLOSED` event will be fired with no rewarded event.\n *\n * The reward contains a `type` and `amount`.\n *\n * #### Example\n *\n * ```js\n * import { RewardedAdEventType } from 'react-native-google-mobile-ads';\n *\n * rewardedAd.addEventListener(RewardedAdEventType.EARNED_REWARD, (reward) => {\n * console.log(`User earned ${data.amount} ${data.type}`);\n * // E.g. \"User earned 50 coins\"\n * });\n * ```\n */\n EARNED_REWARD = 'rewarded_earned_reward',\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,WAAYA,mBAAmB;AA0C9B,WA1CWA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;AAAA,GAAnBA,mBAAmB,KAAnBA,mBAAmB"}
1
+ {"version":3,"names":["RewardedAdEventType"],"sourceRoot":"../../src","sources":["RewardedAdEventType.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,WAAYA,mBAAmB;AA0C9B,WA1CWA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;AAAA,GAAnBA,mBAAmB,KAAnBA,mBAAmB"}
@@ -1 +1 @@
1
- {"version":3,"names":["Platform","TestIds","APP_OPEN","BANNER","INTERSTITIAL","REWARDED","REWARDED_INTERSTITIAL","GAM_APP_OPEN","GAM_BANNER","GAM_INTERSTITIAL","GAM_REWARDED","GAM_REWARDED_INTERSTITIAL","GAM_NATIVE","select","android","ios"],"sources":["TestIds.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nimport { Platform } from 'react-native';\n\nexport const TestIds = {\n APP_OPEN: '',\n BANNER: '',\n INTERSTITIAL: '',\n REWARDED: '',\n REWARDED_INTERSTITIAL: '',\n GAM_APP_OPEN: '/6499/example/app-open',\n GAM_BANNER: '/6499/example/banner',\n GAM_INTERSTITIAL: '/6499/example/interstitial',\n GAM_REWARDED: '/6499/example/rewarded',\n GAM_REWARDED_INTERSTITIAL: '/21775744923/example/rewarded_interstitial',\n GAM_NATIVE: '/6499/example/native',\n ...Platform.select({\n android: {\n APP_OPEN: 'ca-app-pub-3940256099942544/3419835294',\n BANNER: 'ca-app-pub-3940256099942544/6300978111',\n INTERSTITIAL: 'ca-app-pub-3940256099942544/1033173712',\n REWARDED: 'ca-app-pub-3940256099942544/5224354917',\n REWARDED_INTERSTITIAL: 'ca-app-pub-3940256099942544/5354046379',\n },\n ios: {\n APP_OPEN: 'ca-app-pub-3940256099942544/5662855259',\n BANNER: 'ca-app-pub-3940256099942544/2934735716',\n INTERSTITIAL: 'ca-app-pub-3940256099942544/4411468910',\n REWARDED: 'ca-app-pub-3940256099942544/1712485313',\n REWARDED_INTERSTITIAL: 'ca-app-pub-3940256099942544/6978759866',\n },\n }),\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,QAAQ,QAAQ,cAAc;AAEvC,OAAO,MAAMC,OAAO,GAAG;EACrBC,QAAQ,EAAE,EAAE;EACZC,MAAM,EAAE,EAAE;EACVC,YAAY,EAAE,EAAE;EAChBC,QAAQ,EAAE,EAAE;EACZC,qBAAqB,EAAE,EAAE;EACzBC,YAAY,EAAE,wBAAwB;EACtCC,UAAU,EAAE,sBAAsB;EAClCC,gBAAgB,EAAE,4BAA4B;EAC9CC,YAAY,EAAE,wBAAwB;EACtCC,yBAAyB,EAAE,4CAA4C;EACvEC,UAAU,EAAE,sBAAsB;EAClC,GAAGZ,QAAQ,CAACa,MAAM,CAAC;IACjBC,OAAO,EAAE;MACPZ,QAAQ,EAAE,wCAAwC;MAClDC,MAAM,EAAE,wCAAwC;MAChDC,YAAY,EAAE,wCAAwC;MACtDC,QAAQ,EAAE,wCAAwC;MAClDC,qBAAqB,EAAE;IACzB,CAAC;IACDS,GAAG,EAAE;MACHb,QAAQ,EAAE,wCAAwC;MAClDC,MAAM,EAAE,wCAAwC;MAChDC,YAAY,EAAE,wCAAwC;MACtDC,QAAQ,EAAE,wCAAwC;MAClDC,qBAAqB,EAAE;IACzB;EACF,CAAC;AACH,CAAC"}
1
+ {"version":3,"names":["Platform","TestIds","APP_OPEN","BANNER","INTERSTITIAL","REWARDED","REWARDED_INTERSTITIAL","GAM_APP_OPEN","GAM_BANNER","GAM_INTERSTITIAL","GAM_REWARDED","GAM_REWARDED_INTERSTITIAL","GAM_NATIVE","select","android","ios"],"sourceRoot":"../../src","sources":["TestIds.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,QAAQ,QAAQ,cAAc;AAEvC,OAAO,MAAMC,OAAO,GAAG;EACrBC,QAAQ,EAAE,EAAE;EACZC,MAAM,EAAE,EAAE;EACVC,YAAY,EAAE,EAAE;EAChBC,QAAQ,EAAE,EAAE;EACZC,qBAAqB,EAAE,EAAE;EACzBC,YAAY,EAAE,wBAAwB;EACtCC,UAAU,EAAE,sBAAsB;EAClCC,gBAAgB,EAAE,4BAA4B;EAC9CC,YAAY,EAAE,wBAAwB;EACtCC,yBAAyB,EAAE,4CAA4C;EACvEC,UAAU,EAAE,sBAAsB;EAClC,GAAGZ,QAAQ,CAACa,MAAM,CAAC;IACjBC,OAAO,EAAE;MACPZ,QAAQ,EAAE,wCAAwC;MAClDC,MAAM,EAAE,wCAAwC;MAChDC,YAAY,EAAE,wCAAwC;MACtDC,QAAQ,EAAE,wCAAwC;MAClDC,qBAAqB,EAAE;IACzB,CAAC;IACDS,GAAG,EAAE;MACHb,QAAQ,EAAE,wCAAwC;MAClDC,MAAM,EAAE,wCAAwC;MAChDC,YAAY,EAAE,wCAAwC;MACtDC,QAAQ,EAAE,wCAAwC;MAClDC,qBAAqB,EAAE;IACzB;EACF,CAAC;AACH,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"names":["isString","MobileAds","validateAdRequestOptions","MobileAd","AppOpenAd","createForAdRequest","adUnitId","requestOptions","Error","options","e","message","requestId","_appOpenRequest","addAdEventsListener","listener","_addAdEventsListener","addAdEventListener","type","_addAdEventListener"],"sources":["AppOpenAd.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nimport { isString } from '../common';\nimport { MobileAds } from '../MobileAds';\nimport { validateAdRequestOptions } from '../validateAdRequestOptions';\nimport { MobileAd } from './MobileAd';\nimport { AdEventType } from '../AdEventType';\nimport { AdEventListener } from '../types/AdEventListener';\nimport { AdEventsListener } from '../types/AdEventsListener';\nimport { RequestOptions } from '../types/RequestOptions';\n\nexport class AppOpenAd extends MobileAd {\n protected static _appOpenRequest = 0;\n\n static createForAdRequest(adUnitId: string, requestOptions?: RequestOptions) {\n if (!isString(adUnitId)) {\n throw new Error(\"AppOpenAd.createForAdRequest(*) 'adUnitId' expected an string value.\");\n }\n\n let options = {};\n try {\n options = validateAdRequestOptions(requestOptions);\n } catch (e) {\n if (e instanceof Error) {\n throw new Error(`AppOpenAd.createForAdRequest(_, *) ${e.message}.`);\n }\n }\n\n const requestId = AppOpenAd._appOpenRequest++;\n return new AppOpenAd('app_open', MobileAds(), requestId, adUnitId, options);\n }\n\n addAdEventsListener<T extends AdEventType>(listener: AdEventsListener<T>): () => void {\n return this._addAdEventsListener(listener);\n }\n\n addAdEventListener<T extends AdEventType>(type: T, listener: AdEventListener<T>) {\n return this._addAdEventListener(type, listener);\n }\n}\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,QAAQ,QAAQ,WAAW;AACpC,SAASC,SAAS,QAAQ,cAAc;AACxC,SAASC,wBAAwB,QAAQ,6BAA6B;AACtE,SAASC,QAAQ,QAAQ,YAAY;AAMrC,OAAO,MAAMC,SAAS,SAASD,QAAQ,CAAC;EAGtC,OAAOE,kBAAkB,CAACC,QAAgB,EAAEC,cAA+B,EAAE;IAC3E,IAAI,CAACP,QAAQ,CAACM,QAAQ,CAAC,EAAE;MACvB,MAAM,IAAIE,KAAK,CAAC,sEAAsE,CAAC;IACzF;IAEA,IAAIC,OAAO,GAAG,CAAC,CAAC;IAChB,IAAI;MACFA,OAAO,GAAGP,wBAAwB,CAACK,cAAc,CAAC;IACpD,CAAC,CAAC,OAAOG,CAAC,EAAE;MACV,IAAIA,CAAC,YAAYF,KAAK,EAAE;QACtB,MAAM,IAAIA,KAAK,CAAE,sCAAqCE,CAAC,CAACC,OAAQ,GAAE,CAAC;MACrE;IACF;IAEA,MAAMC,SAAS,GAAGR,SAAS,CAACS,eAAe,EAAE;IAC7C,OAAO,IAAIT,SAAS,CAAC,UAAU,EAAEH,SAAS,EAAE,EAAEW,SAAS,EAAEN,QAAQ,EAAEG,OAAO,CAAC;EAC7E;EAEAK,mBAAmB,CAAwBC,QAA6B,EAAc;IACpF,OAAO,IAAI,CAACC,oBAAoB,CAACD,QAAQ,CAAC;EAC5C;EAEAE,kBAAkB,CAAwBC,IAAO,EAAEH,QAA4B,EAAE;IAC/E,OAAO,IAAI,CAACI,mBAAmB,CAACD,IAAI,EAAEH,QAAQ,CAAC;EACjD;AACF;AAAC,gBA5BYX,SAAS,qBACe,CAAC"}
1
+ {"version":3,"names":["isString","MobileAds","validateAdRequestOptions","MobileAd","AppOpenAd","createForAdRequest","adUnitId","requestOptions","Error","options","e","message","requestId","_appOpenRequest","addAdEventsListener","listener","_addAdEventsListener","addAdEventListener","type","_addAdEventListener"],"sourceRoot":"../../src","sources":["AppOpenAd.ts"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,QAAQ,QAAQ,WAAW;AACpC,SAASC,SAAS,QAAQ,cAAc;AACxC,SAASC,wBAAwB,QAAQ,6BAA6B;AACtE,SAASC,QAAQ,QAAQ,YAAY;AAMrC,OAAO,MAAMC,SAAS,SAASD,QAAQ,CAAC;EAGtC,OAAOE,kBAAkB,CAACC,QAAgB,EAAEC,cAA+B,EAAE;IAC3E,IAAI,CAACP,QAAQ,CAACM,QAAQ,CAAC,EAAE;MACvB,MAAM,IAAIE,KAAK,CAAC,sEAAsE,CAAC;IACzF;IAEA,IAAIC,OAAO,GAAG,CAAC,CAAC;IAChB,IAAI;MACFA,OAAO,GAAGP,wBAAwB,CAACK,cAAc,CAAC;IACpD,CAAC,CAAC,OAAOG,CAAC,EAAE;MACV,IAAIA,CAAC,YAAYF,KAAK,EAAE;QACtB,MAAM,IAAIA,KAAK,CAAE,sCAAqCE,CAAC,CAACC,OAAQ,GAAE,CAAC;MACrE;IACF;IAEA,MAAMC,SAAS,GAAGR,SAAS,CAACS,eAAe,EAAE;IAC7C,OAAO,IAAIT,SAAS,CAAC,UAAU,EAAEH,SAAS,EAAE,EAAEW,SAAS,EAAEN,QAAQ,EAAEG,OAAO,CAAC;EAC7E;EAEAK,mBAAmB,CAAwBC,QAA6B,EAAc;IACpF,OAAO,IAAI,CAACC,oBAAoB,CAACD,QAAQ,CAAC;EAC5C;EAEAE,kBAAkB,CAAwBC,IAAO,EAAEH,QAA4B,EAAE;IAC/E,OAAO,IAAI,CAACI,mBAAmB,CAACD,IAAI,EAAEH,QAAQ,CAAC;EACjD;AACF;AAAC,gBA5BYX,SAAS,qBACe,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"names":["React","BaseAd","BannerAd","size","props"],"sources":["BannerAd.tsx"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nimport React from 'react';\nimport { BannerAdProps } from '../types/BannerAdProps';\nimport { BaseAd } from './BaseAd';\n\nexport function BannerAd({ size, ...props }: BannerAdProps) {\n return <BaseAd sizes={[size]} {...props} />;\n}\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,MAAM,QAAQ,UAAU;AAEjC,OAAO,SAASC,QAAQ,OAAoC;EAAA,IAAnC;IAAEC,IAAI;IAAE,GAAGC;EAAqB,CAAC;EACxD,oBAAO,oBAAC,MAAM;IAAC,KAAK,EAAE,CAACD,IAAI;EAAE,GAAKC,KAAK,EAAI;AAC7C"}
1
+ {"version":3,"names":["React","BaseAd","BannerAd","size","props"],"sourceRoot":"../../src","sources":["BannerAd.tsx"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,MAAM,QAAQ,UAAU;AAEjC,OAAO,SAASC,QAAQ,OAAoC;EAAA,IAAnC;IAAEC,IAAI;IAAE,GAAGC;EAAqB,CAAC;EACxD,oBAAO,oBAAC,MAAM;IAAC,KAAK,EAAE,CAACD,IAAI;EAAE,GAAKC,KAAK,EAAI;AAC7C"}
@@ -1 +1 @@
1
- {"version":3,"names":["React","useState","useEffect","requireNativeComponent","isFunction","NativeError","BannerAdSize","validateAdRequestOptions","sizeRegex","BaseAd","forwardRef","ref","unitId","sizes","requestOptions","manualImpressionsEnabled","props","dimensions","setDimensions","Error","length","every","size","test","parsedRequestOptions","JSON","stringify","e","message","onNativeEvent","nativeEvent","type","eventHandler","eventPayload","width","height","fromEvent","name","data","style","includes","FLUID","displayName","GoogleMobileAdsBannerView"],"sources":["BaseAd.tsx"],"sourcesContent":["/* eslint-disable react/prop-types */\n/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nimport React, { useState, useEffect } from 'react';\nimport { NativeMethods, requireNativeComponent } from 'react-native';\nimport { isFunction } from '../common';\nimport { NativeError } from '../internal/NativeError';\nimport { BannerAdSize } from '../BannerAdSize';\nimport { validateAdRequestOptions } from '../validateAdRequestOptions';\nimport { GAMBannerAdProps } from '../types/BannerAdProps';\nimport { RequestOptions } from '../types/RequestOptions';\n\ntype NativeEvent =\n | {\n type: 'onAdLoaded' | 'onSizeChange';\n width: number;\n height: number;\n }\n | { type: 'onAdOpened' | 'onAdClosed' }\n | {\n type: 'onAdFailedToLoad';\n code: string;\n message: string;\n }\n | {\n type: 'onAppEvent';\n name: string;\n data?: string;\n };\n\nconst sizeRegex = /([0-9]+)x([0-9]+)/;\n\nexport const BaseAd = React.forwardRef<GoogleMobileAdsBannerView, GAMBannerAdProps>(\n ({ unitId, sizes, requestOptions, manualImpressionsEnabled, ...props }, ref) => {\n const [dimensions, setDimensions] = useState<(number | string)[]>([0, 0]);\n\n useEffect(() => {\n if (!unitId) {\n throw new Error(\"BannerAd: 'unitId' expected a valid string unit ID.\");\n }\n }, [unitId]);\n\n useEffect(() => {\n if (\n sizes.length === 0 ||\n !sizes.every(size => size in BannerAdSize || sizeRegex.test(size))\n ) {\n throw new Error(\"BannerAd: 'size(s)' expected a valid BannerAdSize or custom size string.\");\n }\n }, [sizes]);\n\n const parsedRequestOptions = JSON.stringify(requestOptions);\n\n useEffect(() => {\n if (requestOptions) {\n try {\n validateAdRequestOptions(requestOptions);\n } catch (e) {\n if (e instanceof Error) {\n throw new Error(`BannerAd: ${e.message}`);\n }\n }\n }\n }, [parsedRequestOptions]);\n\n function onNativeEvent({ nativeEvent }: { nativeEvent: NativeEvent }) {\n const { type } = nativeEvent;\n\n if (type !== 'onSizeChange' && isFunction(props[type])) {\n let eventHandler, eventPayload;\n switch (type) {\n case 'onAdLoaded':\n eventPayload = {\n width: nativeEvent.width,\n height: nativeEvent.height,\n };\n if ((eventHandler = props[type])) eventHandler(eventPayload);\n break;\n case 'onAdFailedToLoad':\n eventPayload = NativeError.fromEvent(nativeEvent, 'googleMobileAds');\n if ((eventHandler = props[type])) eventHandler(eventPayload);\n break;\n case 'onAppEvent':\n eventPayload = {\n name: nativeEvent.name,\n data: nativeEvent.data,\n };\n if ((eventHandler = props[type])) eventHandler(eventPayload);\n break;\n default:\n if ((eventHandler = props[type])) eventHandler();\n }\n }\n\n if (type === 'onAdLoaded' || type === 'onSizeChange') {\n const { width, height } = nativeEvent;\n if (width && height) setDimensions([width, height]);\n }\n }\n\n const style = sizes.includes(BannerAdSize.FLUID)\n ? {\n width: '100%',\n height: dimensions[1],\n }\n : {\n width: dimensions[0],\n height: dimensions[1],\n };\n\n return (\n <GoogleMobileAdsBannerView\n ref={ref}\n sizes={sizes}\n style={style}\n unitId={unitId}\n request={validateAdRequestOptions(requestOptions)}\n manualImpressionsEnabled={!!manualImpressionsEnabled}\n onNativeEvent={onNativeEvent}\n />\n );\n },\n);\nBaseAd.displayName = 'BaseAd';\n\ninterface NativeBannerProps {\n sizes: GAMBannerAdProps['sizes'];\n style: {\n width?: number | string;\n height?: number | string;\n };\n unitId: string;\n request: RequestOptions;\n manualImpressionsEnabled: boolean;\n onNativeEvent: (event: { nativeEvent: NativeEvent }) => void;\n}\n\nconst GoogleMobileAdsBannerView = requireNativeComponent<NativeBannerProps>(\n 'RNGoogleMobileAdsBannerView',\n);\nexport type GoogleMobileAdsBannerView = React.Component<NativeBannerProps> & NativeMethods;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,KAAK,IAAIC,QAAQ,EAAEC,SAAS,QAAQ,OAAO;AAClD,SAAwBC,sBAAsB,QAAQ,cAAc;AACpE,SAASC,UAAU,QAAQ,WAAW;AACtC,SAASC,WAAW,QAAQ,yBAAyB;AACrD,SAASC,YAAY,QAAQ,iBAAiB;AAC9C,SAASC,wBAAwB,QAAQ,6BAA6B;AAsBtE,MAAMC,SAAS,GAAG,mBAAmB;AAErC,OAAO,MAAMC,MAAM,gBAAGT,KAAK,CAACU,UAAU,CACpC,OAAwEC,GAAG,KAAK;EAAA,IAA/E;IAAEC,MAAM;IAAEC,KAAK;IAAEC,cAAc;IAAEC,wBAAwB;IAAE,GAAGC;EAAM,CAAC;EACpE,MAAM,CAACC,UAAU,EAAEC,aAAa,CAAC,GAAGjB,QAAQ,CAAsB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;EAEzEC,SAAS,CAAC,MAAM;IACd,IAAI,CAACU,MAAM,EAAE;MACX,MAAM,IAAIO,KAAK,CAAC,qDAAqD,CAAC;IACxE;EACF,CAAC,EAAE,CAACP,MAAM,CAAC,CAAC;EAEZV,SAAS,CAAC,MAAM;IACd,IACEW,KAAK,CAACO,MAAM,KAAK,CAAC,IAClB,CAACP,KAAK,CAACQ,KAAK,CAACC,IAAI,IAAIA,IAAI,IAAIhB,YAAY,IAAIE,SAAS,CAACe,IAAI,CAACD,IAAI,CAAC,CAAC,EAClE;MACA,MAAM,IAAIH,KAAK,CAAC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,CAAC,EAAGC,YAAY,CAACC,YAAY,CAAC;UAC5D;QACF;UACE,IAAKD,YAAY,GAAGhB,KAAK,CAACe,IAAI,CAAC,EAAGC,YAAY,EAAE;MAAC;IAEvD;IAEA,IAAID,IAAI,KAAK,YAAY,IAAIA,IAAI,KAAK,cAAc,EAAE;MACpD,MAAM;QAAEG,KAAK;QAAEC;MAAO,CAAC,GAAGL,WAAW;MACrC,IAAII,KAAK,IAAIC,MAAM,EAAEjB,aAAa,CAAC,CAACgB,KAAK,EAAEC,MAAM,CAAC,CAAC;IACrD;EACF;EAEA,MAAMI,KAAK,GAAG1B,KAAK,CAAC2B,QAAQ,CAAClC,YAAY,CAACmC,KAAK,CAAC,GAC5C;IACEP,KAAK,EAAE,MAAM;IACbC,MAAM,EAAElB,UAAU,CAAC,CAAC;EACtB,CAAC,GACD;IACEiB,KAAK,EAAEjB,UAAU,CAAC,CAAC,CAAC;IACpBkB,MAAM,EAAElB,UAAU,CAAC,CAAC;EACtB,CAAC;EAEL,oBACE,oBAAC,yBAAyB;IACxB,GAAG,EAAEN,GAAI;IACT,KAAK,EAAEE,KAAM;IACb,KAAK,EAAE0B,KAAM;IACb,MAAM,EAAE3B,MAAO;IACf,OAAO,EAAEL,wBAAwB,CAACO,cAAc,CAAE;IAClD,wBAAwB,EAAE,CAAC,CAACC,wBAAyB;IACrD,aAAa,EAAEc;EAAc,EAC7B;AAEN,CAAC,CACF;AACDpB,MAAM,CAACiC,WAAW,GAAG,QAAQ;AAc7B,MAAMC,yBAAyB,GAAGxC,sBAAsB,CACtD,6BAA6B,CAC9B"}
1
+ {"version":3,"names":["React","useState","useEffect","requireNativeComponent","isFunction","NativeError","BannerAdSize","validateAdRequestOptions","sizeRegex","BaseAd","forwardRef","ref","unitId","sizes","requestOptions","manualImpressionsEnabled","props","dimensions","setDimensions","Error","length","every","size","test","parsedRequestOptions","JSON","stringify","e","message","onNativeEvent","nativeEvent","type","eventHandler","eventPayload","width","height","fromEvent","name","data","style","includes","FL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A,IAAI,KAAK,cAAc,EAAE;MACpD,MAAM;QAAEG,KAAK;QAAEC;MAAO,CAAC,GAAGL,WAAW;MACrC,IAAII,KAAK,IAAIC,MAAM,EAAEjB,aAAa,CAAC,CAACgB,KAAK,EAAEC,MAAM,CAAC,CAAC;IACrD;EACF;EAEA,MAAMI,KAAK,GAAG1B,KAAK,CAAC2B,QAAQ,CAAClC,YAAY,CAACmC,KAAK,CAAC,GAC5C;IACEP,KAAK,EAAE,MAAM;IACbC,MAAM,EAAElB,UAAU,CAAC,CAAC;EACtB,CAAC,GACD;IACEiB,KAAK,EAAEjB,UAAU,CAAC,CAAC,CAAC;IACpBkB,MAAM,EAAElB,UAAU,CAAC,CAAC;EACtB,CAAC;EAEL,oBACE,oBAAC,yBAAyB;IACxB,GAAG,EAAEN,GAAI;IACT,KAAK,EAAEE,KAAM;IACb,KAAK,EAAE0B,KAAM;IACb,MAAM,EAAE3B,MAAO;IACf,OAAO,EAAEL,wBAAwB,CAACO,cAAc,CAAE;IAClD,wBAAwB,EAAE,CAAC,CAACC,wBAAyB;IACrD,aAAa,EAAEc;EAAc,EAC7B;AAEN,CAAC,CACF;AACDpB,MAAM,CAACiC,WAAW,GAAG,QAAQ;AAc7B,MAAMC,yBAAyB,GAAGxC,sBAAsB,CACtD,6BAA6B,CAC9B"}
@@ -1 +1 @@
1
- {"version":3,"names":["React","createRef","findNodeHandle","UIManager","BaseAd","GAMBannerAd","Component","recordManualImpression","dispatchViewManagerCommand","ref","current","undefined","render","props"],"sources":["GAMBannerAd.tsx"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nimport React, { createRef } from 'react';\nimport { findNodeHandle, UIManager } from 'react-native';\nimport { GAMBannerAdProps } from '../types/BannerAdProps';\nimport { BaseAd, GoogleMobileAdsBannerView } from './BaseAd';\n\nexport class GAMBannerAd extends React.Component<GAMBannerAdProps> {\n private ref = createRef<GoogleMobileAdsBannerView>();\n\n recordManualImpression() {\n UIManager.dispatchViewManagerCommand(\n findNodeHandle(this.ref.current),\n 'recordManualImpression',\n undefined,\n );\n }\n\n render() {\n return <BaseAd ref={this.ref} {...this.props} />;\n }\n}\n"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SAASC,cAAc,EAAEC,SAAS,QAAQ,cAAc;AAExD,SAASC,MAAM,QAAmC,UAAU;AAE5D,OAAO,MAAMC,WAAW,SAASL,KAAK,CAACM,SAAS,CAAmB;EAAA;IAAA;IAAA,0CACnDL,SAAS,EAA6B;EAAA;EAEpDM,sBAAsB,GAAG;IACvBJ,SAAS,CAACK,0BAA0B,CAClCN,cAAc,CAAC,IAAI,CAACO,GAAG,CAACC,OAAO,CAAC,EAChC,wBAAwB,EACxBC,SAAS,CACV;EACH;EAEAC,MAAM,GAAG;IACP,oBAAO,oBAAC,MAAM;MAAC,GAAG,EAAE,IAAI,CAACH;IAAI,GAAK,IAAI,CAACI,KAAK,EAAI;EAClD;AACF"}
1
+ {"version":3,"names":["React","createRef","findNodeHandle","UIManager","BaseAd","GAMBannerAd","Component","recordManualImpression","dispatchViewManagerCommand","ref","current","undefined","render","props"],"sourceRoot":"../../src","sources":["GAMBannerAd.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SAASC,cAAc,EAAEC,SAAS,QAAQ,cAAc;AAExD,SAASC,MAAM,QAAmC,UAAU;AAE5D,OAAO,MAAMC,WAAW,SAASL,KAAK,CAACM,SAAS,CAAmB;EAAA;IAAA;IAAA,0CACnDL,SAAS,EAA6B;EAAA;EAEpDM,sBAAsB,GAAG;IACvBJ,SAAS,CAACK,0BAA0B,CAClCN,cAAc,CAAC,IAAI,CAACO,GAAG,CAACC,OAAO,CAAC,EAChC,wBAAwB,EACxBC,SAAS,CACV;EACH;EAEAC,MAAM,GAAG;IACP,oBAAO,oBAAC,MAAM;MAAC,GAAG,EAAE,IAAI,CAACH;IAAI,GAAK,IAAI,CAACI,KAAK,EAAI;EAClD;AACF"}
@@ -1 +1 @@
1
- {"version":3,"names":["InterstitialAd","GAMInterstitialAd","createForAdRequest","adUnitId","requestOptions","addAdEventsListener","listener","_addAdEventsListener","addAdEventListener","type","_addAdEventListener"],"sources":["GAMInterstitialAd.ts"],"sourcesContent":["import { AdEventType } from '../AdEventType';\nimport { GAMAdEventType } from '../GAMAdEventType';\nimport { AdEventListener } from '../types/AdEventListener';\nimport { AdEventsListener } from '../types/AdEventsListener';\nimport { RequestOptions } from '../types/RequestOptions';\nimport { InterstitialAd } from './InterstitialAd';\n\nexport class GAMInterstitialAd extends InterstitialAd {\n /**\n * Creates a new GAMInterstitialAd instance.\n *\n * #### Example\n *\n * ```js\n * import { GAMInterstitialAd, AdEventType, TestIds } from 'react-native-google-mobile-ads';\n *\n * const interstitialAd = await GAMInterstitialAd.createForAdRequest(TestIds.GAM_INTERSTITIAL, {\n * requestAgent: 'CoolAds',\n * });\n *\n * interstitialAd.addAdEventListener(AdEventType.Loaded, () => {\n * interstitialAd.show();\n * });\n *\n * interstitialAd.load();\n * ```\n *\n * @param adUnitId The Ad Unit ID for the Interstitial. You can find this on your Google Mobile Ads dashboard.\n * @param requestOptions Optional RequestOptions used to load the ad.\n */\n static createForAdRequest(adUnitId: string, requestOptions?: RequestOptions) {\n return super.createForAdRequest(adUnitId, requestOptions) as GAMInterstitialAd;\n }\n\n addAdEventsListener<T extends AdEventType | GAMAdEventType>(listener: AdEventsListener<T>) {\n return this._addAdEventsListener(listener);\n }\n\n addAdEventListener<T extends AdEventType | GAMAdEventType>(\n type: T,\n listener: AdEventListener<T>,\n ) {\n return this._addAdEventListener(type, listener);\n }\n}\n"],"mappings":"AAKA,SAASA,cAAc,QAAQ,kBAAkB;AAEjD,OAAO,MAAMC,iBAAiB,SAASD,cAAc,CAAC;EACpD;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACE,OAAOE,kBAAkB,CAACC,QAAgB,EAAEC,cAA+B,EAAE;IAC3E,OAAO,KAAK,CAACF,kBAAkB,CAACC,QAAQ,EAAEC,cAAc,CAAC;EAC3D;EAEAC,mBAAmB,CAAyCC,QAA6B,EAAE;IACzF,OAAO,IAAI,CAACC,oBAAoB,CAACD,QAAQ,CAAC;EAC5C;EAEAE,kBAAkB,CAChBC,IAAO,EACPH,QAA4B,EAC5B;IACA,OAAO,IAAI,CAACI,mBAAmB,CAACD,IAAI,EAAEH,QAAQ,CAAC;EACjD;AACF"}
1
+ {"version":3,"names":["InterstitialAd","GAMInterstitialAd","createForAdRequest","adUnitId","requestOptions","addAdEventsListener","listener","_addAdEventsListener","addAdEventListener","type","_addAdEventListener"],"sourceRoot":"../../src","sources":["GAMInterstitialAd.ts"],"mappings":"AAKA,SAASA,cAAc,QAAQ,kBAAkB;AAEjD,OAAO,MAAMC,iBAAiB,SAASD,cAAc,CAAC;EACpD;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACE,OAAOE,kBAAkB,CAACC,QAAgB,EAAEC,cAA+B,EAAE;IAC3E,OAAO,KAAK,CAACF,kBAAkB,CAACC,QAAQ,EAAEC,cAAc,CAAC;EAC3D;EAEAC,mBAAmB,CAAyCC,QAA6B,EAAE;IACzF,OAAO,IAAI,CAACC,oBAAoB,CAACD,QAAQ,CAAC;EAC5C;EAEAE,kBAAkB,CAChBC,IAAO,EACPH,QAA4B,EAC5B;IACA,OAAO,IAAI,CAACI,mBAAmB,CAACD,IAAI,EAAEH,QAAQ,CAAC;EACjD;AACF"}
@@ -1 +1 @@
1
- {"version":3,"names":["isString","MobileAds","validateAdRequestOptions","MobileAd","InterstitialAd","createForAdRequest","adUnitId","requestOptions","Error","options","e","message","requestId","_interstitialRequest","addAdEventsListener","listener","_addAdEventsListener","addAdEventListener","type","_addAdEventListener"],"sources":["InterstitialAd.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nimport { isString } from '../common';\nimport { MobileAds } from '../MobileAds';\nimport { validateAdRequestOptions } from '../validateAdRequestOptions';\nimport { MobileAd } from './MobileAd';\nimport { AdEventType } from '../AdEventType';\nimport { AdEventListener } from '../types/AdEventListener';\nimport { AdEventsListener } from '../types/AdEventsListener';\nimport { RequestOptions } from '../types/RequestOptions';\n\n/**\n * A class for interacting and showing Interstitial Ads.\n *\n * An Interstitial advert can be pre-loaded and shown at a suitable point in your apps flow, such as at the end of a level\n * in a game. An Interstitial is a full screen advert, laid on-top of your entire application which the user can interact with.\n * Interactions are passed back via events which should be handled accordingly inside of your app.\n *\n * #### Example\n *\n * First create a new Interstitial instance, passing in your Ad Unit ID from the Google Mobile Ads configuration console, and any additional\n * request options. The example below will present a test advert, and only request a non-personalized ad.\n *\n * ```js\n * import { InterstitialAd, TestIds } from 'react-native-google-mobile-ads';\n *\n * const interstitial = InterstitialAd.createForAdRequest(TestIds.INTERSTITIAL, {\n * requestNonPersonalizedAdsOnly: true,\n * });\n * ```\n *\n * Each advert needs to be loaded from Google Mobile Ads before being shown. It is recommended this is performed before the user\n * reaches the checkpoint to show the advert, so it's ready to go. Before loading the advert, we need to setup\n * event listeners to listen for updates from Google Mobile Ads, such as advert loaded or failed to load.\n *\n * Event types match the `AdEventType` interface. Once the advert has loaded, we can trigger it to show:\n *\n * ```js\n * import { AdEventType } from 'react-native-google-mobile-ads';\n *\n * interstitialAd.addAdEventListener(AdEventType.Loaded, () => {\n * interstitialAd.show();\n * });\n *\n * interstitial.load();\n * ```\n *\n * The advert will be presented to the user, and several more events can be triggered such as the user clicking the\n * advert or closing it.\n */\nexport class InterstitialAd extends MobileAd {\n protected static _interstitialRequest = 0;\n /**\n * Creates a new InterstitialAd instance.\n *\n * #### Example\n *\n * ```js\n * import { InterstitialAd, AdEventType, TestIds } from 'react-native-google-mobile-ads';\n *\n * const interstitialAd = await InterstitialAd.createForAdRequest(TestIds.INTERSTITIAL, {\n * requestAgent: 'CoolAds',\n * });\n *\n * interstitialAd.addAdEventListener(AdEventType.Loaded, () => {\n * interstitialAd.show();\n * });\n *\n * interstitialAd.load();\n * ```\n *\n * @param adUnitId The Ad Unit ID for the Interstitial. You can find this on your Google Mobile Ads dashboard.\n * @param requestOptions Optional RequestOptions used to load the ad.\n */\n static createForAdRequest(adUnitId: string, requestOptions?: RequestOptions) {\n if (!isString(adUnitId)) {\n throw new Error(\"InterstitialAd.createForAdRequest(*) 'adUnitId' expected an string value.\");\n }\n\n let options = {};\n try {\n options = validateAdRequestOptions(requestOptions);\n } catch (e) {\n if (e instanceof Error) {\n throw new Error(`InterstitialAd.createForAdRequest(_, *) ${e.message}.`);\n }\n }\n\n const requestId = InterstitialAd._interstitialRequest++;\n return new InterstitialAd('interstitial', MobileAds(), requestId, adUnitId, options);\n }\n\n addAdEventsListener<T extends AdEventType>(listener: AdEventsListener<T>) {\n return this._addAdEventsListener(listener);\n }\n\n addAdEventListener<T extends AdEventType>(type: T, listener: AdEventListener<T>) {\n return this._addAdEventListener(type, listener);\n }\n}\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,QAAQ,QAAQ,WAAW;AACpC,SAASC,SAAS,QAAQ,cAAc;AACxC,SAASC,wBAAwB,QAAQ,6BAA6B;AACtE,SAASC,QAAQ,QAAQ,YAAY;AAMrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,cAAc,SAASD,QAAQ,CAAC;EAE3C;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACE,OAAOE,kBAAkB,CAACC,QAAgB,EAAEC,cAA+B,EAAE;IAC3E,IAAI,CAACP,QAAQ,CAACM,QAAQ,CAAC,EAAE;MACvB,MAAM,IAAIE,KAAK,CAAC,2EAA2E,CAAC;IAC9F;IAEA,IAAIC,OAAO,GAAG,CAAC,CAAC;IAChB,IAAI;MACFA,OAAO,GAAGP,wBAAwB,CAACK,cAAc,CAAC;IACpD,CAAC,CAAC,OAAOG,CAAC,EAAE;MACV,IAAIA,CAAC,YAAYF,KAAK,EAAE;QACtB,MAAM,IAAIA,KAAK,CAAE,2CAA0CE,CAAC,CAACC,OAAQ,GAAE,CAAC;MAC1E;IACF;IAEA,MAAMC,SAAS,GAAGR,cAAc,CAACS,oBAAoB,EAAE;IACvD,OAAO,IAAIT,cAAc,CAAC,cAAc,EAAEH,SAAS,EAAE,EAAEW,SAAS,EAAEN,QAAQ,EAAEG,OAAO,CAAC;EACtF;EAEAK,mBAAmB,CAAwBC,QAA6B,EAAE;IACxE,OAAO,IAAI,CAACC,oBAAoB,CAACD,QAAQ,CAAC;EAC5C;EAEAE,kBAAkB,CAAwBC,IAAO,EAAEH,QAA4B,EAAE;IAC/E,OAAO,IAAI,CAACI,mBAAmB,CAACD,IAAI,EAAEH,QAAQ,CAAC;EACjD;AACF;AAAC,gBAjDYX,cAAc,0BACe,CAAC"}
1
+ {"version":3,"names":["isString","MobileAds","validateAdRequestOptions","MobileAd","InterstitialAd","createForAdRequest","adUnitId","requestOptions","Error","options","e","message","requestId","_interstitialRequest","addAdEventsListener","listener","_addAdEventsListener","addAdEventListener","type","_addAdEventListener"],"sourceRoot":"../../src","sources":["InterstitialAd.ts"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,QAAQ,QAAQ,WAAW;AACpC,SAASC,SAAS,QAAQ,cAAc;AACxC,SAASC,wBAAwB,QAAQ,6BAA6B;AACtE,SAASC,QAAQ,QAAQ,YAAY;AAMrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,cAAc,SAASD,QAAQ,CAAC;EAE3C;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACE,OAAOE,kBAAkB,CAACC,QAAgB,EAAEC,cAA+B,EAAE;IAC3E,IAAI,CAACP,QAAQ,CAACM,QAAQ,CAAC,EAAE;MACvB,MAAM,IAAIE,KAAK,CAAC,2EAA2E,CAAC;IAC9F;IAEA,IAAIC,OAAO,GAAG,CAAC,CAAC;IAChB,IAAI;MACFA,OAAO,GAAGP,wBAAwB,CAACK,cAAc,CAAC;IACpD,CAAC,CAAC,OAAOG,CAAC,EAAE;MACV,IAAIA,CAAC,YAAYF,KAAK,EAAE;QACtB,MAAM,IAAIA,KAAK,CAAE,2CAA0CE,CAAC,CAACC,OAAQ,GAAE,CAAC;MAC1E;IACF;IAEA,MAAMC,SAAS,GAAGR,cAAc,CAACS,oBAAoB,EAAE;IACvD,OAAO,IAAIT,cAAc,CAAC,cAAc,EAAEH,SAAS,EAAE,EAAEW,SAAS,EAAEN,QAAQ,EAAEG,OAAO,CAAC;EACtF;EAEAK,mBAAmB,CAAwBC,QAA6B,EAAE;IACxE,OAAO,IAAI,CAACC,oBAAoB,CAACD,QAAQ,CAAC;EAC5C;EAEAE,kBAAkB,CAAwBC,IAAO,EAAEH,QAA4B,EAAE;IAC/E,OAAO,IAAI,CAACI,mBAAmB,CAACD,IAAI,EAAEH,QAAQ,CAAC;EACjD;AACF;AAAC,gBAjDYX,cAAc,0BACe,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"names":["isFunction","isOneOf","NativeError","AdEventType","RewardedAdEventType","GAMAdEventType","validateAdShowOptions","MobileAd","constructor","type","googleMobileAds","requestId","adUnitId","requestOptions","_type","_googleMobileAds","_requestId","_adUnitId","_requestOptions","_loaded","_isLoadCalled","_adEventsListeners","Map","_adEventListenersMap","Object","values","_","LOADED","forEach","set","_adEventListenerId","_adEventsListenerId","_nativeListener","emitter","addListener","_handleAdEvent","bind","event","error","data","body","CLOSED","ERROR","payload","fromEvent","listener","_getAdEventListeners","_addAdEventsListener","Error","_className","id","delete","_addAdEventListener","get","name","_camelCaseType","load","native","show","showOptions","options","e","message","removeAllListeners","clear","map","loaded"],"sources":["MobileAd.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nimport { EmitterSubscription } from 'react-native';\nimport { isFunction, isOneOf } from '../common';\nimport { NativeError } from '../internal/NativeError';\nimport { AdEventType } from '../AdEventType';\nimport { RewardedAdEventType } from '../RewardedAdEventType';\nimport { AdEventListener, AdEventPayload } from '../types/AdEventListener';\nimport { AdEventsListener } from '../types/AdEventsListener';\nimport { AdShowOptions } from '../types/AdShowOptions';\nimport { RequestOptions } from '../types/RequestOptions';\nimport { MobileAdInterface } from '../types/MobileAd.interface';\nimport { MobileAdsModuleInterface } from '../types/MobileAdsModule.interface';\nimport { RewardedAdReward } from '../types/RewardedAdReward';\nimport { GAMAdEventType } from '../GAMAdEventType';\nimport { AppEvent } from '../types/AppEvent';\nimport { validateAdShowOptions } from '../validateAdShowOptions';\n\ntype EventType = AdEventType | RewardedAdEventType | GAMAdEventType;\n\nexport abstract class MobileAd implements MobileAdInterface {\n protected _type: 'app_open' | 'interstitial' | 'rewarded' | 'rewarded_interstitial';\n protected _googleMobileAds: MobileAdsModuleInterface;\n protected _requestId: number;\n protected _adUnitId: string;\n protected _requestOptions: RequestOptions;\n protected _loaded: boolean;\n protected _isLoadCalled: boolean;\n protected _adEventsListeners: Map<number, AdEventsListener<EventType>>;\n protected _adEventListenersMap: Map<EventType, Map<number, AdEventListener<EventType>>>;\n protected _adEventsListenerId: number;\n protected _adEventListenerId: number;\n protected _nativeListener: EmitterSubscription;\n\n protected constructor(\n type: 'app_open' | 'interstitial' | 'rewarded' | 'rewarded_interstitial',\n googleMobileAds: MobileAdsModuleInterface,\n requestId: number,\n adUnitId: string,\n requestOptions: RequestOptions,\n ) {\n this._type = type;\n this._googleMobileAds = googleMobileAds;\n this._requestId = requestId;\n this._adUnitId = adUnitId;\n this._requestOptions = requestOptions;\n\n this._loaded = false;\n this._isLoadCalled = false;\n this._adEventsListeners = new Map();\n this._adEventListenersMap = new Map();\n Object.values({\n ...AdEventType,\n ...RewardedAdEventType,\n ...GAMAdEventType,\n _: AdEventType.LOADED, // since AdEventType.LOADED is overwritten by RewardedAdEventType.LOADED\n }).forEach(type => {\n this._adEventListenersMap.set(type as EventType, new Map());\n });\n this._adEventListenerId = 0;\n this._adEventsListenerId = 0;\n\n this._nativeListener = googleMobileAds.emitter.addListener(\n `google_mobile_ads_${type}_event:${adUnitId}:${requestId}`,\n this._handleAdEvent.bind(this),\n );\n }\n\n protected _handleAdEvent(event: {\n body: {\n type: EventType;\n error?: { code: string; message: string };\n data?: RewardedAdReward | AppEvent;\n };\n }) {\n const { type, error, data } = event.body;\n\n if (type === AdEventType.LOADED || type === RewardedAdEventType.LOADED) {\n this._loaded = true;\n }\n\n if (type === AdEventType.CLOSED) {\n this._loaded = false;\n this._isLoadCalled = false;\n }\n\n if (type === AdEventType.ERROR) {\n this._loaded = false;\n this._isLoadCalled = false;\n }\n\n let payload: AdEventPayload<EventType> = data;\n if (error) {\n payload = NativeError.fromEvent(error, 'googleMobileAds');\n }\n this._adEventsListeners.forEach(listener => {\n listener({\n type,\n payload,\n });\n });\n this._getAdEventListeners(type).forEach(listener => {\n listener(payload);\n });\n }\n\n protected _addAdEventsListener<T extends EventType>(listener: AdEventsListener<T>) {\n if (!isFunction(listener)) {\n throw new Error(`${this._className}.addAdEventsListener(*) 'listener' expected a function.`);\n }\n\n const id = this._adEventsListenerId++;\n this._adEventsListeners.set(id, listener as AdEventsListener<EventType>);\n return () => {\n this._adEventsListeners.delete(id);\n };\n }\n\n protected _addAdEventListener<T extends EventType>(type: T, listener: AdEventListener<T>) {\n if (\n !(\n isOneOf(type, Object.values(AdEventType)) ||\n (isOneOf(type, Object.values(RewardedAdEventType)) &&\n (this._type === 'rewarded' || this._type === 'rewarded_interstitial'))\n )\n ) {\n throw new Error(\n `${this._className}.addAdEventListener(*) 'type' expected a valid event type value.`,\n );\n }\n if (!isFunction(listener)) {\n throw new Error(\n `${this._className}.addAdEventListener(_, *) 'listener' expected a function.`,\n );\n }\n\n const id = this._adEventListenerId++;\n this._getAdEventListeners(type).set(id, listener);\n return () => {\n this._getAdEventListeners(type).delete(id);\n };\n }\n\n protected _getAdEventListeners<T extends EventType>(type: T) {\n return this._adEventListenersMap.get(type) as Map<number, AdEventListener<T>>;\n }\n\n protected get _className() {\n return this.constructor.name;\n }\n\n protected get _camelCaseType() {\n let type: 'appOpen' | 'interstitial' | 'rewarded' | 'rewardedInterstitial';\n if (this._type === 'app_open') {\n type = 'appOpen';\n } else if (this._type === 'rewarded_interstitial') {\n type = 'rewardedInterstitial';\n } else {\n type = this._type;\n }\n return type;\n }\n\n public load() {\n // Prevent multiple load calls\n if (this._loaded || this._isLoadCalled) {\n return;\n }\n\n this._isLoadCalled = true;\n const load = this._googleMobileAds.native[`${this._camelCaseType}Load`];\n load(this._requestId, this._adUnitId, this._requestOptions);\n }\n\n public show(showOptions?: AdShowOptions) {\n if (!this._loaded) {\n throw new Error(\n `${this._className}.show() The requested ${this._className} has not loaded and could not be shown.`,\n );\n }\n\n let options;\n try {\n options = validateAdShowOptions(showOptions);\n } catch (e) {\n if (e instanceof Error) {\n throw new Error(`${this._className}.show(*) ${e.message}.`);\n } else {\n throw e;\n }\n }\n\n const show = this._googleMobileAds.native[`${this._camelCaseType}Show`];\n return show(this._requestId, this._adUnitId, options);\n }\n\n public abstract addAdEventsListener<T extends never>(listener: AdEventsListener<T>): () => void;\n\n public abstract addAdEventListener<T extends never>(type: T, listener: AdEventListener<T>): void;\n\n public removeAllListeners() {\n this._adEventsListeners.clear();\n this._adEventListenersMap.forEach((_, type, map) => {\n map.set(type, new Map());\n });\n }\n\n public get adUnitId() {\n return this._adUnitId;\n }\n\n public get loaded() {\n return this._loaded;\n }\n}\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;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IAAI,CAAC1C,UAAU,EAAE,IAAI,CAACC,SAAS,EAAE2C,OAAO,CAAC;EACvD;EAMOG,kBAAkB,GAAG;IAC1B,IAAI,CAAC1C,kBAAkB,CAAC2C,KAAK,EAAE;IAC/B,IAAI,CAACzC,oBAAoB,CAACK,OAAO,CAAC,CAACF,CAAC,EAAEjB,IAAI,EAAEwD,GAAG,KAAK;MAClDA,GAAG,CAACpC,GAAG,CAACpB,IAAI,EAAE,IAAIa,GAAG,EAAE,CAAC;IAC1B,CAAC,CAAC;EACJ;EAEA,IAAWV,QAAQ,GAAG;IACpB,OAAO,IAAI,CAACK,SAAS;EACvB;EAEA,IAAWiD,MAAM,GAAG;IAClB,OAAO,IAAI,CAAC/C,OAAO;EACrB;AACF"}
1
+ {"version":3,"names":["isFunction","isOneOf","NativeError","AdEventType","RewardedAdEventType","GAMAdEventType","validateAdShowOptions","MobileAd","constructor","type","googleMobileAds","requestId","adUnitId","requestOptions","_type","_googleMobileAds","_requestId","_adUnitId","_requestOptions","_loaded","_isLoadCalled","_adEventsListeners","Map","_adEventListenersMap","Object","values","_","LOADED","forEach","set","_adEventListenerId","_adEventsListenerId","_nativeListener","emitter","addListener","_handleAdEvent","bind","event","error","data","body","CLOSED","ERROR","payload","fromEvent","listener","_getAdEventListeners","_addAdEventsListener","Error","_className","id","delete","_addAdEventListener","get","name","_camelCaseType","load","native","show","showOptions","options","e","message","removeAllListeners","clear","map","loaded"],"sourceRoot":"../../src","sources":["MobileAd.ts"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,UAAU,EAAEC,OAAO,QAAQ,WAAW;AAC/C,SAASC,WAAW,QAAQ,yBAAyB;AACrD,SAASC,WAAW,QAAQ,gBAAgB;AAC5C,SAASC,mBAAmB,QAAQ,wBAAwB;AAQ5D,SAASC,cAAc,QAAQ,mBAAmB;AAElD,SAASC,qBAAqB,QAAQ,0BAA0B;A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AI,EAAE,IAAIa,GAAG,EAAE,CAAC;IAC1B,CAAC,CAAC;EACJ;EAEA,IAAWV,QAAQ,GAAG;IACpB,OAAO,IAAI,CAACK,SAAS;EACvB;EAEA,IAAWiD,MAAM,GAAG;IAClB,OAAO,IAAI,CAAC/C,OAAO;EACrB;AACF"}
@@ -1 +1 @@
1
- {"version":3,"names":["isString","MobileAds","validateAdRequestOptions","MobileAd","AdEventType","RewardedAd","createForAdRequest","adUnitId","requestOptions","Error","options","e","message","requestId","_rewardedRequest","addAdEventsListener","listener","_addAdEventsListener","addAdEventListener","type","LOADED","_addAdEventListener"],"sources":["RewardedAd.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nimport { isString } from '../common';\nimport { MobileAds } from '../MobileAds';\nimport { validateAdRequestOptions } from '../validateAdRequestOptions';\nimport { MobileAd } from './MobileAd';\nimport { AdEventType } from '../AdEventType';\nimport { RewardedAdEventType } from '../RewardedAdEventType';\nimport { AdEventListener } from '../types/AdEventListener';\nimport { AdEventsListener } from '../types/AdEventsListener';\nimport { RequestOptions } from '../types/RequestOptions';\n\n/**\n * A class for interacting and showing Rewarded Ads.\n *\n * An Rewarded advert can be pre-loaded and shown at a suitable point in your apps flow, such as at the end of a level\n * in a game. The content of a rewarded advert can be controlled via your Google Mobile Ads dashboard. Typically users are rewarded\n * after completing a specific advert action (e.g. watching a video or submitting an option via an interactive form).\n * Events (such as the user earning a reward or closing a rewarded advert early) are sent back for you to handle accordingly\n * within your application.\n *\n * #### Example\n *\n * First create a new Rewarded instance, passing in your Ad Unit ID from the Google Mobile Ads configuration console, and any additional\n * request options. The example below will present a test advert, and only request a non-personalized ad.\n *\n * ```js\n * import { RewardedAd, TestIds } from 'react-native-google-mobile-ads';\n *\n * const rewarded = RewardedAd.createForAdRequest(TestIds.REWARDED, {\n * requestNonPersonalizedAdsOnly: true,\n * });\n * ```\n *\n * Each advert needs to be loaded from Google Mobile Ads before being shown. It is recommended this is performed before the user\n * reaches the checkpoint to show the advert, so it's ready to go. Before loading the advert, we need to setup\n * event listeners to listen for updates from Google Mobile Ads, such as advert loaded or failed to load.\n *\n * Event types match the `AdEventType` or `RewardedAdEventType` interface. The potential user reward for rewarded\n * adverts are passed back to the event handler on advert load and when the user earns the reward.\n *\n * ```js\n * import { RewardedAdEventType } from 'react-native-google-mobile-ads';\n *\n * rewarded.addAdEventListener(RewardedAdEventType.LOADED. () => {\n * rewarded.show();\n * });\n * rewarded.addAdEventListener(RewardedAdEventType.EARNED_REWARD. (reward) => {\n * console.log('User earned reward of ', reward);\n * });\n *\n * rewarded.load();\n * ```\n *\n * The rewarded advert will be presented to the user, and several more events can be triggered such as the user clicking the\n * advert, closing it or completing the action.\n */\nexport class RewardedAd extends MobileAd {\n protected static _rewardedRequest = 0;\n /**\n * Creates a new RewardedAd instance.\n *\n * #### Example\n *\n * ```js\n * import { RewardedAd, RewardedAdEventType, TestIds } from 'react-native-google-mobile-ads';\n *\n * const rewardedAd = await RewardedAd.createForAdRequest(TestIds.REWARDED, {\n * requestAgent: 'CoolAds',\n * });\n *\n * rewarded.addAdEventListener(RewardedAdEventType.LOADED. () => {\n * rewarded.show();\n * });\n * rewarded.addAdEventListener(RewardedAdEventType.EARNED_REWARD. (reward) => {\n * console.log('User earned reward of ', reward);\n * });\n *\n * rewardedAd.load();\n * ```\n *\n * @param adUnitId The Ad Unit ID for the Rewarded Ad. You can find this on your Google Mobile Ads dashboard.\n * @param requestOptions Optional RequestOptions used to load the ad.\n */\n static createForAdRequest(adUnitId: string, requestOptions?: RequestOptions) {\n if (!isString(adUnitId)) {\n throw new Error(\"RewardedAd.createForAdRequest(*) 'adUnitId' expected an string value.\");\n }\n\n let options = {};\n try {\n options = validateAdRequestOptions(requestOptions);\n } catch (e) {\n if (e instanceof Error) {\n throw new Error(`RewardedAd.createForAdRequest(_, *) ${e.message}.`);\n }\n }\n\n const requestId = RewardedAd._rewardedRequest++;\n return new RewardedAd('rewarded', MobileAds(), requestId, adUnitId, options);\n }\n\n addAdEventsListener<T extends AdEventType | RewardedAdEventType>(\n listener: AdEventsListener<T>,\n ): () => void {\n return this._addAdEventsListener(listener);\n }\n\n addAdEventListener<T extends AdEventType | RewardedAdEventType>(\n type: T,\n listener: AdEventListener<T>,\n ) {\n if (type === AdEventType.LOADED) {\n throw new Error(\n 'RewardedAd.addAdEventListener(*) use RewardedAdEventType.LOADED instead of AdEventType.LOADED.',\n );\n }\n return this._addAdEventListener(type, listener);\n }\n}\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,QAAQ,QAAQ,WAAW;AACpC,SAASC,SAAS,QAAQ,cAAc;AACxC,SAASC,wBAAwB,QAAQ,6BAA6B;AACtE,SAASC,QAAQ,QAAQ,YAAY;AACrC,SAASC,WAAW,QAAQ,gBAAgB;AAM5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,UAAU,SAASF,QAAQ,CAAC;EAEvC;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACE,OAAOG,kBAAkB,CAACC,QAAgB,EAAEC,cAA+B,EAAE;IAC3E,IAAI,CAACR,QAAQ,CAACO,QAAQ,CAAC,EAAE;MACvB,MAAM,IAAIE,KAAK,CAAC,uEAAuE,CAAC;IAC1F;IAEA,IAAIC,OAAO,GAAG,CAAC,CAAC;IAChB,IAAI;MACFA,OAAO,GAAGR,wBAAwB,CAACM,cAAc,CAAC;IACpD,CAAC,CAAC,OAAOG,CAAC,EAAE;MACV,IAAIA,CAAC,YAAYF,KAAK,EAAE;QACtB,MAAM,IAAIA,KAAK,CAAE,uCAAsCE,CAAC,CAACC,OAAQ,GAAE,CAAC;MACtE;IACF;IAEA,MAAMC,SAAS,GAAGR,UAAU,CAACS,gBAAgB,EAAE;IAC/C,OAAO,IAAIT,UAAU,CAAC,UAAU,EAAEJ,SAAS,EAAE,EAAEY,SAAS,EAAEN,QAAQ,EAAEG,OAAO,CAAC;EAC9E;EAEAK,mBAAmB,CACjBC,QAA6B,EACjB;IACZ,OAAO,IAAI,CAACC,oBAAoB,CAACD,QAAQ,CAAC;EAC5C;EAEAE,kBAAkB,CAChBC,IAAO,EACPH,QAA4B,EAC5B;IACA,IAAIG,IAAI,KAAKf,WAAW,CAACgB,MAAM,EAAE;MAC/B,MAAM,IAAIX,KAAK,CACb,gGAAgG,CACjG;IACH;IACA,OAAO,IAAI,CAACY,mBAAmB,CAACF,IAAI,EAAEH,QAAQ,CAAC;EACjD;AACF;AAAC,gBA9DYX,UAAU,sBACe,CAAC"}
1
+ {"version":3,"names":["isString","MobileAds","validateAdRequestOptions","MobileAd","AdEventType","RewardedAd","createForAdRequest","adUnitId","requestOptions","Error","options","e","message","requestId","_rewardedRequest","addAdEventsListener","listener","_addAdEventsListener","addAdEventListener","type","LOADED","_addAdEventListener"],"sourceRoot":"../../src","sources":["RewardedAd.ts"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,QAAQ,QAAQ,WAAW;AAC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AC5B;IACA,IAAIG,IAAI,KAAKf,WAAW,CAACgB,MAAM,EAAE;MAC/B,MAAM,IAAIX,KAAK,CACb,gGAAgG,CACjG;IACH;IACA,OAAO,IAAI,CAACY,mBAAmB,CAACF,IAAI,EAAEH,QAAQ,CAAC;EACjD;AACF;AAAC,gBA9DYX,UAAU,sBACe,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"names":["isString","MobileAds","validateAdRequestOptions","MobileAd","AdEventType","RewardedInterstitialAd","createForAdRequest","adUnitId","requestOptions","Error","options","e","message","requestId","_rewardedInterstitialRequest","addAdEventsListener","listener","_addAdEventsListener","addAdEventListener","type","LOADED","_addAdEventListener"],"sources":["RewardedInterstitialAd.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nimport { isString } from '../common';\nimport { MobileAds } from '../MobileAds';\nimport { validateAdRequestOptions } from '../validateAdRequestOptions';\nimport { MobileAd } from './MobileAd';\nimport { AdEventType } from '../AdEventType';\nimport { RewardedAdEventType } from '../RewardedAdEventType';\nimport { AdEventListener } from '../types/AdEventListener';\nimport { AdEventsListener } from '../types/AdEventsListener';\nimport { RequestOptions } from '../types/RequestOptions';\n\n/**\n * A class for interacting and showing Rewarded Interstitial Ads.\n *\n * An Rewarded Interstitial advert can be pre-loaded and shown at a suitable point in your apps flow, such as at the end of a level\n * in a game. The content of a rewarded interstital advert can be controlled via your Google Mobile Ads dashboard. Typically users are rewarded\n * after completing a specific advert action (e.g. watching a video or submitting an option via an interactive form).\n * Events (such as the user earning a reward or closing a rewarded interstital advert early) are sent back for you to handle accordingly\n * within your application.\n *\n * #### Example\n *\n * First create a new Rewarded Interstitial instance, passing in your Ad Unit ID from the Google Mobile Ads configuration console, and any additional\n * request options. The example below will present a test advert, and only request a non-personalized ad.\n *\n * ```js\n * import { RewardedInterstitialAd, TestIds } from 'react-native-google-mobile-ads';\n *\n * const rewardedInterstitial = RewardedInterstitialAd.createForAdRequest(TestIds.REWARDED_INTERSTITIAL, {\n * requestNonPersonalizedAdsOnly: true,\n * });\n * ```\n *\n * Each advert needs to be loaded from Google Mobile Ads before being shown. It is recommended this is performed before the user\n * reaches the checkpoint to show the advert, so it's ready to go. Before loading the advert, we need to setup\n * event listeners to listen for updates from Google Mobile Ads, such as advert loaded or failed to load.\n *\n * Event types match the `AdEventType` or `RewardedAdEventType` interface. The potential user reward for rewarded interstitial\n * adverts are passed back to the event handler on advert load and when the user earns the reward.\n *\n * ```js\n * import { RewardedAdEventType } from 'react-native-google-mobile-ads';\n *\n * rewardedInterstitial.addAdEventListener(RewardedAdEventType.LOADED. () => {\n * rewarded.show();\n * });\n * rewardedInterstitial.addAdEventListener(RewardedAdEventType.EARNED_REWARD. (reward) => {\n * console.log('User earned reward of ', reward);\n * });\n *\n * rewardedInterstitial.load();\n * ```\n *\n * The rewarded interstitial advert will be presented to the user, and several more events can be triggered such as the user clicking the\n * advert, closing it or completing the action.\n */\nexport class RewardedInterstitialAd extends MobileAd {\n protected static _rewardedInterstitialRequest = 0;\n /**\n * Creates a new RewardedInterstitialAd instance.\n *\n * #### Example\n *\n * ```js\n * import { RewardedInterstitialAd, RewardedAdEventType, TestIds } from 'react-native-google-mobile-ads';\n *\n * const rewardedInterstitialAd = await RewardedInterstitialAd.createForAdRequest(TestIds.REWARDED_INTERSTITIAL, {\n * requestAgent: 'CoolAds',\n * });\n *\n * rewardedInterstitialAd.addAdEventListener(RewardedAdEventType.LOADED. () => {\n * rewardedInterstitialAd.show();\n * });\n * rewardedInterstitialAd.addAdEventListener(RewardedAdEventType.EARNED_REWARD. (reward) => {\n * console.log('User earned reward of ', reward);\n * });\n *\n * rewardedInterstitialAd.load();\n * ```\n *\n * @param adUnitId The Ad Unit ID for the Rewarded Interstitial Ad. You can find this on your Google Mobile Ads dashboard.\n * @param requestOptions Optional RequestOptions used to load the ad.\n */\n static createForAdRequest(adUnitId: string, requestOptions?: RequestOptions) {\n if (!isString(adUnitId)) {\n throw new Error(\n \"RewardedInterstitialAd.createForAdRequest(*) 'adUnitId' expected an string value.\",\n );\n }\n\n let options = {};\n try {\n options = validateAdRequestOptions(requestOptions);\n } catch (e) {\n if (e instanceof Error) {\n throw new Error(`RewardedInterstitialAd.createForAdRequest(_, *) ${e.message}.`);\n }\n }\n\n const requestId = RewardedInterstitialAd._rewardedInterstitialRequest++;\n return new RewardedInterstitialAd(\n 'rewarded_interstitial',\n MobileAds(),\n requestId,\n adUnitId,\n options,\n );\n }\n\n addAdEventsListener<T extends AdEventType | RewardedAdEventType>(\n listener: AdEventsListener<T>,\n ): () => void {\n return this._addAdEventsListener(listener);\n }\n\n addAdEventListener<T extends AdEventType | RewardedAdEventType>(\n type: T,\n listener: AdEventListener<T>,\n ) {\n if (type === AdEventType.LOADED) {\n throw new Error(\n 'RewardedInterstitialAd.addAdEventListener(*) use RewardedAdEventType.LOADED instead of AdEventType.LOADED.',\n );\n }\n return this._addAdEventListener(type, listener);\n }\n}\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,QAAQ,QAAQ,WAAW;AACpC,SAASC,SAAS,QAAQ,cAAc;AACxC,SAASC,wBAAwB,QAAQ,6BAA6B;AACtE,SAASC,QAAQ,QAAQ,YAAY;AACrC,SAASC,WAAW,QAAQ,gBAAgB;AAM5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,sBAAsB,SAASF,QAAQ,CAAC;EAEnD;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACE,OAAOG,kBAAkB,CAACC,QAAgB,EAAEC,cAA+B,EAAE;IAC3E,IAAI,CAACR,QAAQ,CAACO,QAAQ,CAAC,EAAE;MACvB,MAAM,IAAIE,KAAK,CACb,mFAAmF,CACpF;IACH;IAEA,IAAIC,OAAO,GAAG,CAAC,CAAC;IAChB,IAAI;MACFA,OAAO,GAAGR,wBAAwB,CAACM,cAAc,CAAC;IACpD,CAAC,CAAC,OAAOG,CAAC,EAAE;MACV,IAAIA,CAAC,YAAYF,KAAK,EAAE;QACtB,MAAM,IAAIA,KAAK,CAAE,mDAAkDE,CAAC,CAACC,OAAQ,GAAE,CAAC;MAClF;IACF;IAEA,MAAMC,SAAS,GAAGR,sBAAsB,CAACS,4BAA4B,EAAE;IACvE,OAAO,IAAIT,sBAAsB,CAC/B,uBAAuB,EACvBJ,SAAS,EAAE,EACXY,SAAS,EACTN,QAAQ,EACRG,OAAO,CACR;EACH;EAEAK,mBAAmB,CACjBC,QAA6B,EACjB;IACZ,OAAO,IAAI,CAACC,oBAAoB,CAACD,QAAQ,CAAC;EAC5C;EAEAE,kBAAkB,CAChBC,IAAO,EACPH,QAA4B,EAC5B;IACA,IAAIG,IAAI,KAAKf,WAAW,CAACgB,MAAM,EAAE;MAC/B,MAAM,IAAIX,KAAK,CACb,4GAA4G,CAC7G;IACH;IACA,OAAO,IAAI,CAACY,mBAAmB,CAACF,IAAI,EAAEH,QAAQ,CAAC;EACjD;AACF;AAAC,gBAtEYX,sBAAsB,kCACe,CAAC"}
1
+ {"version":3,"names":["isString","MobileAds","validateAdRequestOptions","MobileAd","AdEventType","RewardedInterstitialAd","createForAdRequest","adUnitId","requestOptions","Error","options","e","message","requestId","_rewardedInterstitialRequest","addAdEventsListener","listener","_addAdEventsListener","addAdEventListener","type","LOADED","_addAdEventListener"],"sourceRoot":"../../src","sources":["RewardedInterstitialAd.ts"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,QAAQ,QAAQ,WAAW;AACpC,SAASC,SAAS,QAAQ,cAAc;AACxC,SAASC,wBAAwB,QAAQ,6BAA6B;AACtE,SAASC,QAAQ,QAAQ,YAAY;AACrC,SAASC,WAAW,QAAQ,gBAAgB;AAM5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,sBAAsB,SAASF,QAAQ,CAAC;EAEnD;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACE,OAAOG,kBAAkB,CAACC,QAAgB,EAAEC,cAA+B,EAAE;IAC3E,IAAI,CAACR,QAAQ,CAACO,QAAQ,CAAC,EAAE;MACvB,MAAM,IAAIE,KAAK,CACb,mFAAmF,CACpF;IACH;IAEA,IAAIC,OAAO,GAAG,CAAC,CAAC;IAChB,IAAI;MACFA,OAAO,GAAGR,wBAAwB,CAACM,cAAc,CAAC;IACpD,CAAC,CAAC,OAAOG,CAAC,EAAE;MACV,IAAIA,CAAC,YAAYF,KAAK,EAAE;QACtB,MAAM,IAAIA,KAAK,CAAE,mDAAkDE,CAAC,CAACC,OAAQ,GAAE,CAAC;MAClF;IACF;IAEA,MAAMC,SAAS,GAAGR,sBAAsB,CAACS,4BAA4B,EAAE;IACvE,OAAO,IAAIT,sBAAsB,CAC/B,uBAAuB,EACvBJ,SAAS,EAAE,EACXY,SAAS,EACTN,QAAQ,EACRG,OAAO,CACR;EACH;EAEAK,mBAAmB,CACjBC,QAA6B,EACjB;IACZ,OAAO,IAAI,CAACC,oBAAoB,CAACD,QAAQ,CAAC;EAC5C;EAEAE,kBAAkB,CAChBC,IAAO,EACPH,QAA4B,EAC5B;IACA,IAAIG,IAAI,KAAKf,WAAW,CAACgB,MAAM,EAAE;MAC/B,MAAM,IAAIX,KAAK,CACb,4GAA4G,CAC7G;IACH;IACA,OAAO,IAAI,CAACY,mBAAmB,CAACF,IAAI,EAAEH,QAAQ,CAAC;EACjD;AACF;AAAC,gBAtEYX,sBAAsB,kCACe,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"names":["binaryToBase64","promiseDefer","CHARS","btoa","input","map","i","block","output","charAt","charCode","charCodeAt","Error","atob","bc","bs","buffer","str","replace","length","String","fromCharCode","indexOf","fromData","data","Blob","fileReader","FileReader","resolve","reject","promise","readAsDataURL","onloadend","string","result","format","onerror","event","abort","ArrayBuffer","Uint8Array","Promise"],"sources":["Base64.ts"],"sourcesContent":["/* eslint-disable no-bitwise */\n/* global Blob, FileReader */\n/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nimport binaryToBase64 from 'react-native/Libraries/Utilities/binaryToBase64';\nimport { promiseDefer } from './promise';\n\nconst CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n\n/**\n * window.btoa\n */\nexport function btoa(input: string) {\n let map;\n let i = 0;\n let block = 0;\n let output = '';\n\n for (\n block = 0, i = 0, map = CHARS;\n input.charAt(i | 0) || ((map = '='), i % 1);\n output += map.charAt(63 & (block >> (8 - (i % 1) * 8)))\n ) {\n const charCode = input.charCodeAt((i += 3 / 4));\n\n if (charCode > 0xff) {\n throw new Error(\n \"'RNFirebase.Base64.btoa' failed: The string to be encoded contains characters outside of the Latin1 range.\",\n );\n }\n\n block = (block << 8) | charCode;\n }\n\n return output;\n}\n\n/**\n * window.atob\n */\nexport function atob(input: string) {\n let i = 0;\n let bc = 0;\n let bs = 0;\n let buffer;\n let output = '';\n\n const str = input.replace(/[=]+$/, '');\n\n if (str.length % 4 === 1) {\n throw new Error(\n \"'RNFirebase.Base64.atob' failed: The string to be decoded is not correctly encoded.\",\n );\n }\n\n for (\n bc = 0, bs = 0, i = 0;\n (buffer = str.charAt(i++));\n ~buffer && ((bs = bc % 4 ? bs * 64 + buffer : buffer), bc++ % 4)\n ? (output += String.fromCharCode(255 & (bs >> ((-2 * bc) & 6))))\n : 0\n ) {\n buffer = CHARS.indexOf(buffer);\n }\n\n return output;\n}\n\n/**\n * Converts a Blob, ArrayBuffer or Uint8Array to a base64 string.\n */\nexport function fromData(data: Blob | ArrayBuffer | Uint8Array) {\n if (data instanceof Blob) {\n const fileReader = new FileReader();\n const { resolve, reject, promise } = promiseDefer();\n\n fileReader.readAsDataURL(data);\n\n fileReader.onloadend = function onloadend() {\n resolve({ string: fileReader.result, format: 'data_url' });\n };\n\n fileReader.onerror = function onerror(event) {\n fileReader.abort();\n reject(event);\n };\n\n return promise;\n }\n\n if (data instanceof ArrayBuffer || data instanceof Uint8Array) {\n return Promise.resolve({\n string: binaryToBase64(data),\n format: 'base64',\n });\n }\n\n throw new Error(\"'RNFirebase.Base64.fromData' failed: Unknown data type.\");\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;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AOC,OAAO,CAACb,OAAO,CAAC;MACrBK,MAAM,EAAEjC,cAAc,CAACwB,IAAI,CAAC;MAC5BW,MAAM,EAAE;IACV,CAAC,CAAC;EACJ;EAEA,MAAM,IAAIvB,KAAK,CAAC,yDAAyD,CAAC;AAC5E"}
1
+ {"version":3,"names":["binaryToBase64","promiseDefer","CHARS","btoa","input","map","i","block","output","charAt","charCode","charCodeAt","Error","atob","bc","bs","buffer","str","replace","length","String","fromCharCode","indexOf","fromData","data","Blob","fileReader","FileReader","resolve","reject","promise","readAsDataURL","onloadend","string","result","format","onerror","event","abort","ArrayBuffer","Uint8Array","Promise"],"sourceRoot":"../../src","sources":["Base64.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,cAAc,MAAM,iDAAiD;AAC5E,SAASC,YAAY,QAAQ,WAAW;AAExC,MAAMC,KAAK,GAAG,mEAAmE;;AAEjF;AACA;AACA;AACA,OAAO,SAASC,IAAI,CAACC,KAAa,EAAE;EAClC,IAAIC,GAAG;EACP,IAAIC,CAAC,GAAG,CAAC;EACT,IAAIC,KAAK,GAAG,CAAC;EACb,IAAIC,MAAM,GAAG,EAAE;EAEf,KACED,KAAK,GAAG,CAAC,EAAED,CAAC,GAAG,CAAC,EAAED,GAAG,GAAGH,KAAK,EAC7BE,KAAK,CAACK,MAAM,CAACH,CAAC,GAAG,CAAC,CAAC,KAAMD,GAAG,GAAG,GAAG,EAAGC,CAAC,GAAG,CAAC,CAAC,EAC3CE,MAAM,IAAIH,GAAG,CAACI,MAAM,CAAC,EAAE,GAAIF,KAAK,IAAK,CAAC,GAAID,CAAC,GAAG,CAAC,GAAI,CAAG,CAAC,EACvD;IACA,MAAMI,QAAQ,GAAGN,KAAK,CAACO,UAAU,CAAEL,CAAC,IAAI,CAAC,GAAG,CAAC,CAAE;IAE/C,IAAII,QAAQ,GAAG,IAAI,EAAE;MACn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AG7B,YAAY,EAAE;IAEnDyB,UAAU,CAACK,aAAa,CAACP,IAAI,CAAC;IAE9BE,UAAU,CAACM,SAAS,GAAG,SAASA,SAAS,GAAG;MAC1CJ,OAAO,CAAC;QAAEK,MAAM,EAAEP,UAAU,CAACQ,MAAM;QAAEC,MAAM,EAAE;MAAW,CAAC,CAAC;IAC5D,CAAC;IAEDT,UAAU,CAACU,OAAO,GAAG,SAASA,OAAO,CAACC,KAAK,EAAE;MAC3CX,UAAU,CAACY,KAAK,EAAE;MAClBT,MAAM,CAACQ,KAAK,CAAC;IACf,CAAC;IAED,OAAOP,OAAO;EAChB;EAEA,IAAIN,IAAI,YAAYe,WAAW,IAAIf,IAAI,YAAYgB,UAAU,EAAE;IAC7D,OAAOC,OAAO,CAACb,OAAO,CAAC;MACrBK,MAAM,EAAEjC,cAAc,CAACwB,IAAI,CAAC;MAC5BW,MAAM,EAAE;IACV,CAAC,CAAC;EACJ;EAEA,MAAM,IAAIvB,KAAK,CAAC,yDAAyD,CAAC;AAC5E"}
@@ -1 +1 @@
1
- {"version":3,"names":["deepGet","deepSet","MutatableParams","constructor","parentInstance","_mutatableParams","_parentInstance","set","param","value","get","toJSON","Object","assign","validate"],"sources":["MutatableParams.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nimport { deepGet, deepSet } from './deeps';\n\nexport class MutatableParams {\n _mutatableParams: Record<string, unknown>;\n _parentInstance: MutatableParams;\n\n constructor(parentInstance: MutatableParams) {\n if (parentInstance) {\n this._mutatableParams = parentInstance._mutatableParams;\n this._parentInstance = parentInstance;\n } else {\n this._mutatableParams = {};\n this._parentInstance = this;\n }\n }\n\n set(param: string, value: unknown) {\n deepSet(this._mutatableParams, param, value);\n return this._parentInstance;\n }\n\n get(param: string) {\n return deepGet(this._mutatableParams, param, '.');\n }\n\n toJSON() {\n return Object.assign({}, this._mutatableParams);\n }\n\n validate() {\n // do nothing\n }\n}\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,OAAO,EAAEC,OAAO,QAAQ,SAAS;AAE1C,OAAO,MAAMC,eAAe,CAAC;EAI3BC,WAAW,CAACC,cAA+B,EAAE;IAAA;IAAA;IAC3C,IAAIA,cAAc,EAAE;MAClB,IAAI,CAACC,gBAAgB,GAAGD,cAAc,CAACC,gBAAgB;MACvD,IAAI,CAACC,eAAe,GAAGF,cAAc;IACvC,CAAC,MAAM;MACL,IAAI,CAACC,gBAAgB,GAAG,CAAC,CAAC;MAC1B,IAAI,CAACC,eAAe,GAAG,IAAI;IAC7B;EACF;EAEAC,GAAG,CAACC,KAAa,EAAEC,KAAc,EAAE;IACjCR,OAAO,CAAC,IAAI,CAACI,gBAAgB,EAAEG,KAAK,EAAEC,KAAK,CAAC;IAC5C,OAAO,IAAI,CAACH,eAAe;EAC7B;EAEAI,GAAG,CAACF,KAAa,EAAE;IACjB,OAAOR,OAAO,CAAC,IAAI,CAACK,gBAAgB,EAAEG,KAAK,EAAE,GAAG,CAAC;EACnD;EAEAG,MAAM,GAAG;IACP,OAAOC,MAAM,CAACC,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,CAACR,gBAAgB,CAAC;EACjD;EAEAS,QAAQ,GAAG;IACT;EACF;AACF"}
1
+ {"version":3,"names":["deepGet","deepSet","MutatableParams","constructor","parentInstance","_mutatableParams","_parentInstance","set","param","value","get","toJSON","Object","assign","validate"],"sourceRoot":"../../src","sources":["MutatableParams.ts"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,OAAO,EAAEC,OAAO,QAAQ,SAAS;AAE1C,OAAO,MAAMC,eAAe,CAAC;EAI3BC,WAAW,CAACC,cAA+B,EAAE;IAAA;IAAA;IAC3C,IAAIA,cAAc,EAAE;MAClB,IAAI,CAACC,gBAAgB,GAAGD,cAAc,CAACC,gBAAgB;MACvD,IAAI,CAACC,eAAe,GAAGF,cAAc;IACvC,CAAC,MAAM;MACL,IAAI,CAACC,gBAAgB,GAAG,CAAC,CAAC;MAC1B,IAAI,CAACC,eAAe,GAAG,IAAI;IAC7B;EACF;EAEAC,GAAG,CAACC,KAAa,EAAEC,KAAc,EAAE;IACjCR,OAAO,CAAC,IAAI,CAACI,gBAAgB,EAAEG,KAAK,EAAEC,KAAK,CAAC;IAC5C,OAAO,IAAI,CAACH,eAAe;EAC7B;EAEAI,GAAG,CAACF,KAAa,EAAE;IACjB,OAAOR,OAAO,CAAC,IAAI,CAACK,gBAAgB,EAAEG,KAAK,EAAE,GAAG,CAAC;EACnD;EAEAG,MAAM,GAAG;IACP,OAAOC,MAAM,CAACC,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,CAACR,gBAAgB,CAAC;EACjD;EAEAS,QAAQ,GAAG;IACT;EACF;AACF"}
@@ -1 +1 @@
1
- {"version":3,"names":["ReferenceBase","constructor","_path","path","length","endsWith","substring","startsWith","key","lastIndexOf"],"sources":["ReferenceBase.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nexport class ReferenceBase {\n path: string;\n\n constructor(_path: string) {\n let path = _path;\n\n if (path) {\n path = path.length > 1 && path.endsWith('/') ? path.substring(0, path.length - 1) : path;\n if (path.startsWith('/') && path.length > 1) {\n path = path.substring(1, path.length);\n }\n } else {\n path = '/';\n }\n\n this.path = path;\n }\n\n /**\n * The last part of a Reference's path (after the last '/')\n * The key of a root Reference is null.\n * @type {String}\n * {@link https://firebase.google.com/docs/reference/js/firebase.database.Reference#key}\n */\n get key() {\n return this.path === '/' ? null : this.path.substring(this.path.lastIndexOf('/') + 1);\n }\n}\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,MAAMA,aAAa,CAAC;EAGzBC,WAAW,CAACC,KAAa,EAAE;IAAA;IACzB,IAAIC,IAAI,GAAGD,KAAK;IAEhB,IAAIC,IAAI,EAAE;MACRA,IAAI,GAAGA,IAAI,CAACC,MAAM,GAAG,CAAC,IAAID,IAAI,CAACE,QAAQ,CAAC,GAAG,CAAC,GAAGF,IAAI,CAACG,SAAS,CAAC,CAAC,EAAEH,IAAI,CAACC,MAAM,GAAG,CAAC,CAAC,GAAGD,IAAI;MACxF,IAAIA,IAAI,CAACI,UAAU,CAAC,GAAG,CAAC,IAAIJ,IAAI,CAACC,MAAM,GAAG,CAAC,EAAE;QAC3CD,IAAI,GAAGA,IAAI,CAACG,SAAS,CAAC,CAAC,EAAEH,IAAI,CAACC,MAAM,CAAC;MACvC;IACF,CAAC,MAAM;MACLD,IAAI,GAAG,GAAG;IACZ;IAEA,IAAI,CAACA,IAAI,GAAGA,IAAI;EAClB;;EAEA;AACF;AACA;AACA;AACA;AACA;EACE,IAAIK,GAAG,GAAG;IACR,OAAO,IAAI,CAACL,IAAI,KAAK,GAAG,GAAG,IAAI,GAAG,IAAI,CAACA,IAAI,CAACG,SAAS,CAAC,IAAI,CAACH,IAAI,CAACM,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;EACvF;AACF"}
1
+ {"version":3,"names":["ReferenceBase","constructor","_path","path","length","endsWith","substring","startsWith","key","lastIndexOf"],"sourceRoot":"../../src","sources":["ReferenceBase.ts"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,MAAMA,aAAa,CAAC;EAGzBC,WAAW,CAACC,KAAa,EAAE;IAAA;IACzB,IAAIC,IAAI,GAAGD,KAAK;IAEhB,IAAIC,IAAI,EAAE;MACRA,IAAI,GAAGA,IAAI,CAACC,MAAM,GAAG,CAAC,IAAID,IAAI,CAACE,QAAQ,CAAC,GAAG,CAAC,GAAGF,IAAI,CAACG,SAAS,CAAC,CAAC,EAAEH,IAAI,CAACC,MAAM,GAAG,CAAC,CAAC,GAAGD,IAAI;MACxF,IAAIA,IAAI,CAACI,UAAU,CAAC,GAAG,CAAC,IAAIJ,IAAI,CAACC,MAAM,GAAG,CAAC,EAAE;QAC3CD,IAAI,GAAGA,IAAI,CAACG,SAAS,CAAC,CAAC,EAAEH,IAAI,CAACC,MAAM,CAAC;MACvC;IACF,CAAC,MAAM;MACLD,IAAI,GAAG,GAAG;IACZ;IAEA,IAAI,CAACA,IAAI,GAAGA,IAAI;EAClB;;EAEA;AACF;AACA;AACA;AACA;AACA;EACE,IAAIK,GAAG,GAAG;IACR,OAAO,IAAI,CAACL,IAAI,KAAK,GAAG,GAAG,IAAI,GAAG,IAAI,CAACA,IAAI,CAACG,SAAS,CAAC,IAAI,CAACH,IAAI,CAACM,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;EACvF;AACF"}
@@ -1 +1 @@
1
- {"version":3,"names":["isArray","isObject","deepGet","object","path","joiner","Array","undefined","keys","split","i","value","len","length","key","Object","hasOwnProperty","call","deepSet","initPaths","_object","Number","isNaN"],"sources":["deeps.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nimport { isArray, isObject } from './validate';\n\n/**\n * Deep get a value from an object.\n * @website https://github.com/Salakar/deeps\n * @param object\n * @param path\n * @param joiner\n * @returns {*}\n */\nexport function deepGet(object: Record<string, unknown>, path: string, joiner = '/') {\n if (!isObject(object) && !Array.isArray(object)) {\n return undefined;\n }\n const keys = path.split(joiner);\n\n let i = 0;\n let value;\n const len = keys.length;\n\n while (i < len) {\n const key = keys[i++];\n if (!object || !Object.hasOwnProperty.call(object, key)) {\n return undefined;\n }\n value = object[key];\n }\n\n return value;\n}\n\n/**\n * Deep set a value\n * @param object\n * @param path\n * @param value\n * @param initPaths\n * @param joiner\n */\nexport function deepSet(\n object: Record<string, unknown>,\n path: string,\n value: unknown,\n initPaths = true,\n joiner = '.',\n) {\n if (!isObject(object)) {\n return false;\n }\n const keys = path.split(joiner);\n\n let i = 0;\n let _object = object;\n const len = keys.length - 1;\n\n while (i < len) {\n const key = keys[i++];\n if (initPaths && !Object.hasOwnProperty.call(object, key)) {\n _object[key] = {};\n }\n _object = _object[key] as Record<string, unknown>;\n }\n\n if (isObject(_object) || (isArray(_object) && !Number.isNaN(keys[i]))) {\n _object[keys[i]] = value;\n } else {\n return false;\n }\n\n return true;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,OAAO,EAAEC,QAAQ,QAAQ,YAAY;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,OAAO,CAACC,M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,CAACd,MAAM,EAAEW,GAAG,CAAC,EAAE;MACzDM,OAAO,CAACN,GAAG,CAAC,GAAG,CAAC,CAAC;IACnB;IACAM,OAAO,GAAGA,OAAO,CAACN,GAAG,CAA4B;EACnD;EAEA,IAAIb,QAAQ,CAACmB,OAAO,CAAC,IAAKpB,OAAO,CAACoB,OAAO,CAAC,IAAI,CAACC,MAAM,CAACC,KAAK,CAACd,IAAI,CAACE,CAAC,CAAC,CAAE,EAAE;IACrEU,OAAO,CAACZ,IAAI,CAACE,CAAC,CAAC,CAAC,GAAGC,KAAK;EAC1B,CAAC,MAAM;IACL,OAAO,KAAK;EACd;EAEA,OAAO,IAAI;AACb"}
1
+ {"version":3,"names":["isArray","isObject","deepGet","object","path","joiner","Array","undefined","keys","split","i","value","len","length","key","Object","hasOwnProperty","call","deepSet","initPaths","_object","Number","isNaN"],"sourceRoot":"../../src","sources":["deeps.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,OAAO,EAAEC,QAAQ,QAAQ,YAAY;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,OAAO,CAACC,MAA+B,EAAEC,IAAY,EAAgB;EAAA,IAAdC,MAAM,uEAAG,GAAG;EACjF,IAAI,CAACJ,QAAQ,CAACE,MAAM,CAAC,IAAI,CAACG,KAAK,CAACN,OAAO,CAACG,MAAM,CAAC,EAAE;IAC/C,OAAOI,SAAS;EAClB;EACA,MAAMC,IAAI,GAAGJ,IAAI,CAACK,KAAK,CAACJ,MAAM,CAAC;EAE/B,IAAIK,CAAC,GAAG,CAAC;EACT,IAAIC,KAAK;EACT,MAAMC,GAAG,GAAGJ,IAAI,CAACK,MAAM;EAEvB,OAAOH,CAAC,GAAGE,GAAG,EAAE;IACd,MAAME,GAAG,GAAGN,IAAI,CAACE,CAAC,EAAE,CAAC;IACrB,IAAI,CAACP,MAAM,IAAI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O_ID_CHARS","lastPushTime","lastRandChars","generateDatabaseId","serverTimeOffset","timeStampChars","Array","now","Date","getTime","duplicateTime","i","charAt","Math","floor","Error","id","join","random","length","generateFirestoreId","autoId"],"sources":["id.ts"],"sourcesContent":["const PUSH_CHARS = '-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz';\n\nconst AUTO_ID_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n\n// timestamp of last push, used to prevent local collisions if you push twice in one ms.\nlet lastPushTime = 0;\n\n// we generate 72-bits of randomness which get turned into 12 characters and appended to the\n// timestamp to prevent collisions with other clients. We store the last characters we\n// generated because in the event of a collision, we'll use those same characters except\n// \"incremented\" by one.\nconst lastRandChars: number[] = [];\n\n/**\n * Generate a firebase id - for use with ref().push(val, cb) - e.g. -KXMr7k2tXUFQqiaZRY4'\n * @param serverTimeOffset - pass in server time offset from native side\n * @returns {string}\n */\nexport function generateDatabaseId(serverTimeOffset = 0) {\n const timeStampChars = new Array(8);\n let now = new Date().getTime() + serverTimeOffset;\n const duplicateTime = now === lastPushTime;\n\n lastPushTime = now;\n\n for (let i = 7; i >= 0; i -= 1) {\n timeStampChars[i] = PUSH_CHARS.charAt(now % 64);\n now = Math.floor(now / 64);\n }\n\n if (now !== 0) {\n throw new Error('We should have converted the entire timestamp.');\n }\n\n let id = timeStampChars.join('');\n\n if (!duplicateTime) {\n for (let i = 0; i < 12; i += 1) {\n lastRandChars[i] = Math.floor(Math.random() * 64);\n }\n } else {\n // if the timestamp hasn't changed since last push,\n // use the same random number, but increment it by 1.\n let i;\n for (i = 11; i >= 0 && lastRandChars[i] === 63; i -= 1) {\n lastRandChars[i] = 0;\n }\n\n lastRandChars[i] += 1;\n }\n\n for (let i = 0; i < 12; i++) {\n id += PUSH_CHARS.charAt(lastRandChars[i]);\n }\n\n if (id.length !== 20) {\n throw new Error('Length should be 20.');\n }\n\n return id;\n}\n\n/**\n * Generate a firestore auto id for use with collection/document .add()\n * @return {string}\n */\nexport function generateFirestoreId() {\n let autoId = '';\n\n for (let i = 0; i < 20; i++) {\n autoId += AUTO_ID_CHARS.charAt(Math.floor(Math.random() * AUTO_ID_CHARS.length));\n }\n return autoId;\n}\n"],"mappings":"AAAA,MAAMA,UAAU,GAAG,kEAAkE;AAErF,MAAMC,aAAa,GAAG,gEAAgE;;AAEtF;AACA,IAAIC,YAAY,GAAG,CAAC;;AAEpB;AACA;AACA;AACA;AACA,MAAMC,aAAuB,GAAG,EAAE;;AAElC;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,kBAAkB,GAAuB;EAAA,IAAtBC,gBAAgB,uEAAG,CAAC;EACrD,MAAMC,cAAc,GAAG,IAAIC,KAAK,CAAC,CAAC,CAAC;EACnC,IAAIC,GAAG,GAAG,IAAIC,IAAI,EAAE,CAACC,OAAO,EAAE,GAAGL,gBAAgB;EACjD,MAAMM,aAAa,GAAGH,GAAG,KAAKN,YAAY;EAE1CA,YAAY,GAAGM,GAAG;EAElB,KAAK,IAAII,CAAC,GAAG,CAAC,EAAEA,CAAC,IAAI,CAAC,EAAEA,CAAC,IAAI,CAAC,EAAE;IAC9BN,cAAc,CAACM,CAAC,CAAC,GAAGZ,UAAU,CAACa,MAAM,CAACL,GAAG,GAAG,EAAE,CAAC;IAC/CA,GAAG,GAAGM,IAAI,CAACC,KAAK,CAACP,GAAG,GAAG,EAAE,CAAC;EAC5B;EAEA,IAAIA,GAAG,KAAK,CAAC,EAAE;IACb,MAAM,IAAIQ,KAAK,CAAC,gDAAgD,CAAC;EACnE;EAEA,IAAIC,EAAE,GAAGX,cAAc,CAACY,IAAI,CAAC,EAAE,CAAC;EAEhC,IAAI,CAACP,aAAa,EAAE;IAClB,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAG,EAAE,EAAEA,CAAC,IAAI,CAAC,EAAE;MAC9BT,aAAa,CAACS,CAAC,CAAC,GAAGE,IAAI,CAACC,KAAK,CAACD,IAAI,CAACK,MAAM,EAAE,GAAG,EAAE,CAAC;IACnD;EACF,CAAC,MAAM;IACL;IACA;IACA,IAAIP,CAAC;IACL,KAAKA,CAAC,GAAG,EAAE,EAAEA,CAAC,IAAI,CAAC,IAAIT,aAAa,CAACS,CAAC,CAAC,KAAK,EAAE,EAAEA,CAAC,IAAI,CAAC,EAAE;MACtDT,aAAa,CAACS,CAAC,CAAC,GAAG,CAAC;IACtB;IAEAT,aAAa,CAACS,CAAC,CAAC,IAAI,CAAC;EACvB;EAEA,KAAK,IAAIA,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAG,EAAE,EAAEA,CAAC,EAAE,EAAE;IAC3BK,EAAE,IAAIjB,UAAU,CAACa,MAAM,CAACV,aAAa,CAACS,CAAC,CAAC,CAAC;EAC3C;EAEA,IAAIK,EAAE,CAACG,MAAM,KAAK,EAAE,EAAE;IACpB,MAAM,IAAIJ,KAAK,CAAC,sBAAsB,CAAC;EACzC;EAEA,OAAOC,EAAE;AACX;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASI,mBAAmB,GAAG;EACpC,IAAIC,MAAM,GAAG,EAAE;EAEf,KAAK,IAAIV,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAG,EAAE,EAAEA,CAAC,EAAE,EAAE;IAC3BU,MAAM,IAAIrB,aAAa,CAACY,MAAM,CAACC,IAAI,CAACC,KAAK,CAACD,IAAI,CAACK,MAAM,EAAE,GAAGlB,aAAa,CAACmB,MAAM,CAAC,CAAC;EAClF;EACA,OAAOE,MAAM;AACf"}
1
+ {"version":3,"names":["PUSH_CHARS","AUTO_ID_CHARS","lastPushTime","lastRandChars","generateDatabaseId","serverTimeOffset","timeStampChars","Array","now","Date","getTime","duplicateTime","i","charAt","Math","floor","Error","id","join","random","length","generateFirestoreId","autoId"],"sourceRoot":"../../src","sources":["id.ts"],"mappings":"AAAA,MAAMA,UAAU,GAAG,kEAAkE;AAErF,MAAMC,aAAa,GAAG,gEAAg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,CAACS,CAAC,CAAC,GAAG,CAAC;IACtB;IAEAT,aAAa,CAACS,CAAC,CAAC,IAAI,CAAC;EACvB;EAEA,KAAK,IAAIA,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAG,EAAE,EAAEA,CAAC,EAAE,EAAE;IAC3BK,EAAE,IAAIjB,UAAU,CAACa,MAAM,CAACV,aAAa,CAACS,CAAC,CAAC,CAAC;EAC3C;EAEA,IAAIK,EAAE,CAACG,MAAM,KAAK,EAAE,EAAE;IACpB,MAAM,IAAIJ,KAAK,CAAC,sBAAsB,CAAC;EACzC;EAEA,OAAOC,EAAE;AACX;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASI,mBAAmB,GAAG;EACpC,IAAIC,MAAM,GAAG,EAAE;EAEf,KAAK,IAAIV,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAG,EAAE,EAAEA,CAAC,EAAE,EAAE;IAC3BU,MAAM,IAAIrB,aAAa,CAACY,MAAM,CAACC,IAAI,CAACC,KAAK,CAACD,IAAI,CAACK,MAAM,EAAE,GAAGlB,aAAa,CAACmB,MAAM,CAAC,CAAC;EAClF;EACA,OAAOE,MAAM;AACf"}
@@ -1 +1 @@
1
- {"version":3,"names":["Platform","Base64","isString","isUndefined","ReferenceBase","getDataUrlParts","dataUrlString","isBase64","includes","mediaType","base64String","split","undefined","replace","decodeURIComponent","btoa","once","fn","context","onceResult","ranOnce","onceInner","args","apply","isError","value","Object","prototype","toString","call","Error","hasOwnProperty","target","property","isPropertySet","stripTrailingSlash","string","endsWith","slice","isIOS","OS","isAndroid","tryJSONParse","JSON","parse","jsonError","tryJSONStringify","data","stringify"],"sources":["index.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nimport { Platform } from 'react-native';\nimport * as Base64 from './Base64';\nimport { isString, isUndefined } from './validate';\n\nexport * from './id';\nexport * from './path';\nexport * from './promise';\nexport * from './validate';\n\nexport { Base64 };\nexport { ReferenceBase } from './ReferenceBase';\n\nexport function getDataUrlParts(dataUrlString: string) {\n const isBase64 = dataUrlString.includes(';base64');\n let [mediaType, base64String] = dataUrlString.split(',');\n if (!mediaType || !base64String) {\n return { base64String: undefined, mediaType: undefined };\n }\n mediaType = mediaType.replace('data:', '').replace(';base64', '');\n if (base64String && base64String.includes('%')) {\n base64String = decodeURIComponent(base64String);\n }\n if (!isBase64) {\n base64String = Base64.btoa(base64String);\n }\n return { base64String, mediaType };\n}\n\nexport function once<T>(fn: () => void, context: unknown): (this: T, ...args: []) => void {\n let onceResult: unknown;\n let ranOnce = false;\n\n return function onceInner(...args: []) {\n if (!ranOnce) {\n ranOnce = true;\n onceResult = fn.apply(context || this, args);\n }\n\n return onceResult;\n };\n}\n\nexport function isError(value: unknown) {\n if (Object.prototype.toString.call(value) === '[object Error]') {\n return true;\n }\n\n return value instanceof Error;\n}\n\nexport function hasOwnProperty(target: unknown, property: PropertyKey) {\n return Object.hasOwnProperty.call(target, property);\n}\n\nexport function isPropertySet(target: unknown, property: PropertyKey) {\n return (\n hasOwnProperty(target, property) &&\n !isUndefined((target as Record<PropertyKey, unknown>)[property])\n );\n}\n\n/**\n * Remove a trailing forward slash from a string if it exists\n *\n * @param string\n * @returns {*}\n */\nexport function stripTrailingSlash(string: string) {\n if (!isString(string)) {\n return string;\n }\n return string.endsWith('/') ? string.slice(0, -1) : string;\n}\n\nexport const isIOS = Platform.OS === 'ios';\n\nexport const isAndroid = Platform.OS === 'android';\n\nexport function tryJSONParse(string: string) {\n try {\n return string && JSON.parse(string);\n } catch (jsonError) {\n return string;\n }\n}\n\nexport function tryJSONStringify(data: unknown) {\n try {\n return JSON.stringify(data);\n } catch (jsonError) {\n return null;\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,QAAQ,QAAQ,cAAc;AACvC,OAAO,KAAKC,MAAM,MAAM,UAAU;AAClC,SAASC,QAAQ,EAAEC,WAAW,QAAQ,YAAY;AAElD,cAAc,MAAM;AACpB,cAAc,QAAQ;AACtB,cAAc,WAAW;AACzB,cAAc,YAAY;AAE1B,SAASF,MAAM;AACf,SAASG,aAAa,QAAQ,iBAAiB;AAE/C,OAAO,SAASC,eAAe,CAACC,aAAqB,EAAE;EACrD,MAAMC,QAAQ,GAAGD,aAAa,CAACE,QAAQ,CAAC,SAAS,CAAC;EAClD,IAAI,CAACC,SAAS,EAAEC,YAAY,CAAC,GAAGJ,aAAa,CAACK,KAAK,CAAC,GAAG,CAAC;EACxD,IAAI,CAACF,SAAS,IAAI,CAACC,YAAY,EAAE;IAC/B,OAAO;MAAEA,YAAY,EAAEE,SAAS;MAAEH,SAAS,EAAEG;IAAU,CAAC;EAC1D;EACAH,SAAS,GAAGA,SAAS,CAACI,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAACA,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC;EACjE,IAAIH,YAAY,IAAIA,YAAY,CAACF,QAAQ,CAAC,GAAG,CAAC,EAAE;IAC9CE,YAAY,GAAGI,kBAAkB,CAACJ,YAAY,CAAC;EACjD;EACA,IAAI,CAACH,QAAQ,EAAE;IACbG,YAAY,GAAGT,MAAM,CAACc,IAAI,CAACL,YAAY,CAAC;EAC1C;EACA,OAAO;IAAEA,YAAY;IAAED;EAAU,CAAC;AACpC;AAEA,OAAO,SAASO,IAAI,CAAIC,EAAc,EAAEC,OAAgB,EAAkC;EACxF,IAAIC,UAAmB;EACvB,IAAIC,OAAO,GAAG,KAAK;EAEnB,OAAO,S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AOA,MAAM,IAAIO,IAAI,CAACC,KAAK,CAACR,MAAM,CAAC;EACrC,CAAC,CAAC,OAAOS,SAAS,EAAE;IAClB,OAAOT,MAAM;EACf;AACF;AAEA,OAAO,SAASU,gBAAgB,CAACC,IAAa,EAAE;EAC9C,IAAI;IACF,OAAOJ,IAAI,CAACK,SAAS,CAACD,IAAI,CAAC;EAC7B,CAAC,CAAC,OAAOF,SAAS,EAAE;IAClB,OAAO,IAAI;EACb;AACF"}
1
+ {"version":3,"names":["Platform","Base64","isString","isUndefined","ReferenceBase","getDataUrlParts","dataUrlString","isBase64","includes","mediaType","base64String","split","undefined","replace","decodeURIComponent","btoa","once","fn","context","onceResult","ranOnce","onceInner","args","apply","isError","value","Object","prototype","toString","call","Error","hasOwnProperty","target","property","isPropertySet","stripTrailingSlash","string","endsWith","slice","isIOS","OS","isAndroid","tryJSONParse","JSON","parse","jsonError","tryJSONStringify","data","stringify"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,QAAQ,QAAQ,cAAc;AACvC,OAAO,KAAKC,MAAM,MAAM,UAAU;AAClC,SAASC,QAAQ,EAAEC,WAAW,QAAQ,YAAY;AAElD,cAAc,MAAM;AACpB,cAAc,QAAQ;AACtB,cAAc,WAAW;AACzB,cAAc,YAAY;AAE1B,SAASF,MAAM;AACf,SAASG,aAAa,QAAQ,iBAAiB;AAE/C,OAAO,SAASC,eAAe,CAACC,aAAqB,EAAE;EACrD,MAAMC,QAAQ,GAAGD,aAAa,CAACE,QAAQ,CAAC,SAAS,CAAC;EAClD,IAAI,CAACC,SAAS,EAAEC,YAAY,CAAC,GAAGJ,aAAa,CAACK,KAAK,CAAC,GAAG,CAAC;EACxD,IAAI,CAACF,SAAS,IAAI,CAACC,YAAY,EAAE;IAC/B,OAAO;MAAEA,YAAY,EAAEE,SAAS;MAAEH,SAAS,EAA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E6B,MAAM,CAAkCC,QAAQ,CAAC,CAAC;AAEpE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASE,kBAAkB,CAACC,MAAc,EAAE;EACjD,IAAI,CAAClC,QAAQ,CAACkC,MAAM,CAAC,EAAE;IACrB,OAAOA,MAAM;EACf;EACA,OAAOA,MAAM,CAACC,QAAQ,CAAC,GAAG,CAAC,GAAGD,MAAM,CAACE,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAGF,MAAM;AAC5D;AAEA,OAAO,MAAMG,KAAK,GAAGvC,QAAQ,CAACwC,EAAE,KAAK,KAAK;AAE1C,OAAO,MAAMC,SAAS,GAAGzC,QAAQ,CAACwC,EAAE,KAAK,SAAS;AAElD,OAAO,SAASE,YAAY,CAACN,MAAc,EAAE;EAC3C,IAAI;IACF,OAAOA,MAAM,IAAIO,IAAI,CAACC,KAAK,CAACR,MAAM,CAAC;EACrC,CAAC,CAAC,OAAOS,SAAS,EAAE;IAClB,OAAOT,MAAM;EACf;AACF;AAEA,OAAO,SAASU,gBAAgB,CAACC,IAAa,EAAE;EAC9C,IAAI;IACF,OAAOJ,IAAI,CAACK,SAAS,CAACD,IAAI,CAAC;EAC7B,CAAC,CAAC,OAAOF,SAAS,EAAE;IAClB,OAAO,IAAI;EACb;AACF"}
@@ -1 +1 @@
1
- {"version":3,"names":["pathParent","path","length","index","lastIndexOf","slice","pathChild","childPath","canonicalChildPath","pathPieces","join","pathLastComponent","split","filter","$","pathIsEmpty","pathToUrlEncodedString","pieces","pathString","i","encodeURIComponent","String","INVALID_PATH_REGEX","isValidPath","test","toFilePath","_filePath","replace","includes","decodeURIComponent"],"sources":["path.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\n/**\n * Returns the next parent of the path e.g. /foo/bar/car -> /foo/bar\n */\nexport function pathParent(path: string) {\n if (path.length === 0) {\n return null;\n }\n\n const index = path.lastIndexOf('/');\n if (index <= 0) {\n return null;\n }\n\n return path.slice(0, index);\n}\n\n/**\n * Joins a parent and a child path\n */\nexport function pathChild(path: string, childPath: string) {\n const canonicalChildPath = pathPieces(childPath).join('/');\n\n if (path.length === 0) {\n return canonicalChildPath;\n }\n\n return `${path}/${canonicalChildPath}`;\n}\n\n/**\n * Returns the last component of a path, e.g /foo/bar.jpeg -> bar.jpeg\n */\nexport function pathLastComponent(path: string) {\n const index = path.lastIndexOf('/', path.length - 2);\n if (index === -1) {\n return path;\n }\n\n return path.slice(index + 1);\n}\n\n/**\n * Returns all none empty pieces of the path\n * @param path\n * @returns {*}\n */\nexport function pathPieces(path: string) {\n return path.split('/').filter($ => $.length > 0);\n}\n\n/**\n * Returns whether a given path is empty\n * @param path\n * @returns {boolean}\n */\nexport function pathIsEmpty(path: string) {\n return !pathPieces(path).length;\n}\n\n/**\n * Converts a given path to a URL encoded string\n * @param path\n * @returns {string|string}\n */\nexport function pathToUrlEncodedString(path: string) {\n const pieces = pathPieces(path);\n let pathString = '';\n for (let i = 0; i < pieces.length; i++) {\n pathString += `/${encodeURIComponent(String(pieces[i]))}`;\n }\n return pathString || '/';\n}\n\n// eslint-disable-next-line no-control-regex\nexport const INVALID_PATH_REGEX = /[[\\].#$\\u0000-\\u001F\\u007F]/;\n\n/**\n * Ensures a given path is a valid Firebase path\n * @param path\n * @returns {boolean}\n */\nexport function isValidPath(path: unknown) {\n return typeof path === 'string' && path.length !== 0 && !INVALID_PATH_REGEX.test(path);\n}\n\n/**\n * Converts a file path to a standardized string path\n * @param path\n * @returns {*}\n */\nexport function toFilePath(path: string) {\n let _filePath = path.replace('file://', '');\n if (_filePath.includes('%')) {\n _filePath = decodeURIComponent(_filePath);\n }\n return _filePath;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO,SAASA,UAAU,CAACC,IAAY,EAAE;EACvC,IAAIA,IAAI,CAACC,MAAM,KAAK,CAAC,EAAE;IACrB,OAAO,IAAI;EACb;EAEA,MAAMC,KAAK,GAAGF,IAAI,CAACG,WAAW,CAAC,GAAG,CAAC;EACnC,IAAID,KAAK,IAAI,CAAC,EAAE;IACd,OAAO,IAAI;EACb;EAEA,OAAOF,IAAI,CAACI,KAAK,CAAC,CAAC,EAAEF,KAAK,CAAC;AAC7B;;AAEA;AACA;AACA;AACA,OAAO,SAASG,SAAS,CAACL,IAAY,EAAEM,SAAiB,EAAE;EACzD,MAAMC,kBAAkB,GAAGC,UAAU,CAACF,SAAS,CAAC,CAACG,IAAI,CAAC,GAAG,CAAC;EAE1D,IAAIT,IAAI,CAACC,MAAM,KAAK,CAAC,EAAE;IACrB,OAAOM,kBAAkB;EAC3B;EAEA,OAAQ,GAAEP,IAAK,IAAGO,kBAAmB,EAAC;AACxC;;AAEA;AACA;AACA;AACA,OAAO,SAASG,iBAAiB,CAACV,IAAY,EAAE;EAC9C,MAAME,KAAK,GAAGF,IAAI,CAACG,WAAW,CAAC,GAAG,EAAEH,IAAI,CAACC,MAAM,GAAG,CAAC,CAAC;EACpD,IAAIC,KAAK,KAAK,CAAC,CAAC,EAAE;IAChB,OAAOF,IAAI;EACb;EAEA,OAAOA,IAAI,CAACI,KAAK,CAACF,KAAK,GAAG,CAAC,CAAC;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASM,UAAU,CAACR,IAAY,EAAE;EACvC,OAAOA,IAAI,CAACW,KAAK,CAAC,GAAG,CAAC,CAACC,MAAM,CAACC,CAAC,IAAIA,CAAC,CAACZ,MAAM,GAAG,CAAC,CAAC;AAClD;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASa,WAAW,CAACd,IAAY,EAAE;EACxC,OAAO,CAACQ,UAAU,CAACR,IAAI,CAAC,CAACC,MAAM;AACjC;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASc,sBAAsB,CAACf,IAAY,EAAE;EACnD,MAAMgB,MAAM,GAAGR,UAAU,CAACR,IAAI,CAAC;EAC/B,IAAIiB,UAAU,GAAG,EAAE;EACnB,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGF,MAAM,CAACf,MAAM,EAAEiB,CAAC,EAAE,EAAE;IACtCD,UAAU,IAAK,IAAGE,kBAAkB,CAACC,MAAM,CAACJ,MAAM,CAACE,CAAC,CAAC,CAAC,CAAE,EAAC;EAC3D;EACA,OAAOD,UAAU,IAAI,GAAG;AAC1B;;AAEA;AACA,OAAO,MAAMI,kBAAkB,GAAG,6BAA6B;;AAE/D;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,WAAW,CAACtB,IAAa,EAAE;EACzC,OAAO,OAAOA,IAAI,KAAK,QAAQ,IAAIA,IAAI,CAACC,MAAM,KAAK,CAAC,IAAI,CAACoB,kBAAkB,CAACE,IAAI,CAACvB,IAAI,CAAC;AACxF;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASwB,UAAU,CAACxB,IAAY,EAAE;EACvC,IAAIyB,SAAS,GAAGzB,IAAI,CAAC0B,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC;EAC3C,IAAID,SAAS,CAACE,QAAQ,CAAC,GAAG,CAAC,EAAE;IAC3BF,SAAS,GAAGG,kBAAkB,CAACH,SAAS,CAAC;EAC3C;EACA,OAAOA,SAAS;AAClB"}
1
+ {"version":3,"names":["pathParent","path","length","index","lastIndexOf","slice","pathChild","childPath","canonicalChildPath","pathPieces","join","pathLastComponent","split","filter","$","pathIsEmpty","pathToUrlEncodedString","pieces","pathString","i","encodeURIComponent","String","INVALID_PATH_REGEX","isValidPath","test","toFilePath","_filePath","replace","includes","decodeURIComponent"],"sourceRoot":"../../src","sources":["path.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO,SAASA,UAAU,CAACC,IAAY,EAAE;EACvC,IAAIA,IAAI,CAACC,MAAM,KAAK,CAAC,EAAE;IACrB,OAAO,IAAI;EACb;EAEA,MAAMC,KAAK,GAAGF,IAAI,CAACG,WAAW,CAAC,GAAG,CAAC;EACnC,IAAID,KAAK,IAAI,CAAC,EAAE;IACd,OAAO,IAAI;EACb;EAEA,OAAOF,IAAI,CAACI,KAAK,CAAC,CAAC,EAAEF,KAAK,CAAC;AAC7B;;AAEA;AACA;AACA;AACA,OAAO,SAASG,SAAS,CAACL,IAAY,EAAEM,SAAiB,EAAE;EACzD,MAAMC,kBAAkB,GAAGC,UAAU,CAACF,SAAS,CAAC,CAACG,IAAI,CAAC,GAAG,CAAC;EAE1D,IAAIT,IAAI,CAACC,MAAM,KAAK,CAAC,EAAE;IACrB,OAAOM,kBAAkB;EAC3B;EAEA,OAAQ,GAAEP,IAAK,IAAGO,kBAAmB,EAAC;AACxC;;AAEA;AACA;AACA;AACA,OAAO,SAASG,iBAAiB,CAACV,IAAY,EAAE;EAC9C,MAAME,KAAK,GAAGF,IAAI,CAACG,WAAW,CAAC,GAAG,EAAEH,IAAI,CAACC,MAAM,GAAG,CAAC,CAAC;EACpD,IAAIC,KAAK,KAAK,CAAC,CAAC,EAAE;IAChB,OAAOF,IAAI;EACb;EAEA,OAAOA,IAAI,CAACI,KAAK,CAACF,KAAK,GAAG,CAAC,CAAC;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASM,UAAU,CAACR,IAAY,EAAE;EACvC,OAAOA,IAAI,CAACW,KAAK,CAAC,GAAG,CAAC,CAACC,MAAM,CAACC,CAAC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