@osano/osano-cmp-react-native 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (851) hide show
  1. package/LICENSE +20 -0
  2. package/README.dev.md +58 -0
  3. package/README.md +1 -0
  4. package/android/build.gradle +94 -0
  5. package/android/gradle.properties +5 -0
  6. package/android/src/main/AndroidManifest.xml +3 -0
  7. package/android/src/main/AndroidManifestNew.xml +2 -0
  8. package/android/src/main/java/com/OsanoCMPSDK/OsanoCMPSDKModule.kt +72 -0
  9. package/android/src/main/java/com/OsanoCMPSDK/OsanoCMPSDKPackage.kt +17 -0
  10. package/ios/OsanoCmpSDK.mm +43 -0
  11. package/ios/OsanoCmpSdk.h +12 -0
  12. package/lib/commonjs/ConsentManager.js +529 -0
  13. package/lib/commonjs/ConsentManager.js.map +1 -0
  14. package/lib/commonjs/ConsentUiBuilder.js +75 -0
  15. package/lib/commonjs/ConsentUiBuilder.js.map +1 -0
  16. package/lib/commonjs/components/Button.js +222 -0
  17. package/lib/commonjs/components/Button.js.map +1 -0
  18. package/lib/commonjs/components/Checkbox.js +75 -0
  19. package/lib/commonjs/components/Checkbox.js.map +1 -0
  20. package/lib/commonjs/components/Divider.js +22 -0
  21. package/lib/commonjs/components/Divider.js.map +1 -0
  22. package/lib/commonjs/components/ExpansionPanel.js +70 -0
  23. package/lib/commonjs/components/ExpansionPanel.js.map +1 -0
  24. package/lib/commonjs/components/Link.js +51 -0
  25. package/lib/commonjs/components/Link.js.map +1 -0
  26. package/lib/commonjs/components/List.js +36 -0
  27. package/lib/commonjs/components/List.js.map +1 -0
  28. package/lib/commonjs/components/Locale.js +28 -0
  29. package/lib/commonjs/components/Locale.js.map +1 -0
  30. package/lib/commonjs/components/StoragePolicyLink.js +32 -0
  31. package/lib/commonjs/components/StoragePolicyLink.js.map +1 -0
  32. package/lib/commonjs/components/Toggle.js +113 -0
  33. package/lib/commonjs/components/Toggle.js.map +1 -0
  34. package/lib/commonjs/constants.js +37 -0
  35. package/lib/commonjs/constants.js.map +1 -0
  36. package/lib/commonjs/context.js +40 -0
  37. package/lib/commonjs/context.js.map +1 -0
  38. package/lib/commonjs/flavors/five.json +11 -0
  39. package/lib/commonjs/flavors/four.json +11 -0
  40. package/lib/commonjs/flavors/index.js +32 -0
  41. package/lib/commonjs/flavors/index.js.map +1 -0
  42. package/lib/commonjs/flavors/one.json +11 -0
  43. package/lib/commonjs/flavors/six.json +12 -0
  44. package/lib/commonjs/flavors/three.json +11 -0
  45. package/lib/commonjs/flavors/two.json +11 -0
  46. package/lib/commonjs/hooks/useBoundCallback.js +32 -0
  47. package/lib/commonjs/hooks/useBoundCallback.js.map +1 -0
  48. package/lib/commonjs/hooks/useDeviceOrientation.js +20 -0
  49. package/lib/commonjs/hooks/useDeviceOrientation.js.map +1 -0
  50. package/lib/commonjs/hooks/usePrevious.js +15 -0
  51. package/lib/commonjs/hooks/usePrevious.js.map +1 -0
  52. package/lib/commonjs/hooks/useThunkReducer.js +62 -0
  53. package/lib/commonjs/hooks/useThunkReducer.js.map +1 -0
  54. package/lib/commonjs/iab/constants.js +8 -0
  55. package/lib/commonjs/iab/constants.js.map +1 -0
  56. package/lib/commonjs/iab/gpp/api.js +226 -0
  57. package/lib/commonjs/iab/gpp/api.js.map +1 -0
  58. package/lib/commonjs/iab/gpp/consent.js +99 -0
  59. package/lib/commonjs/iab/gpp/consent.js.map +1 -0
  60. package/lib/commonjs/iab/gpp/constants.js +56 -0
  61. package/lib/commonjs/iab/gpp/constants.js.map +1 -0
  62. package/lib/commonjs/iab/gpp/encoders/AbstractBase64UrlEncoder.js +139 -0
  63. package/lib/commonjs/iab/gpp/encoders/AbstractBase64UrlEncoder.js.map +1 -0
  64. package/lib/commonjs/iab/gpp/encoders/BooleanEncoder.js +47 -0
  65. package/lib/commonjs/iab/gpp/encoders/BooleanEncoder.js.map +1 -0
  66. package/lib/commonjs/iab/gpp/encoders/CompressedBase64UrlEncoder.js +49 -0
  67. package/lib/commonjs/iab/gpp/encoders/CompressedBase64UrlEncoder.js.map +1 -0
  68. package/lib/commonjs/iab/gpp/encoders/DatetimeEncoder.js +48 -0
  69. package/lib/commonjs/iab/gpp/encoders/DatetimeEncoder.js.map +1 -0
  70. package/lib/commonjs/iab/gpp/encoders/EncodableOptimizedFixedRange.js +184 -0
  71. package/lib/commonjs/iab/gpp/encoders/EncodableOptimizedFixedRange.js.map +1 -0
  72. package/lib/commonjs/iab/gpp/encoders/FibonacciIntegerEncoder.js +81 -0
  73. package/lib/commonjs/iab/gpp/encoders/FibonacciIntegerEncoder.js.map +1 -0
  74. package/lib/commonjs/iab/gpp/encoders/FibonacciIntegerRangeEncoder.js +104 -0
  75. package/lib/commonjs/iab/gpp/encoders/FibonacciIntegerRangeEncoder.js.map +1 -0
  76. package/lib/commonjs/iab/gpp/encoders/FixedBitfieldEncoder.js +56 -0
  77. package/lib/commonjs/iab/gpp/encoders/FixedBitfieldEncoder.js.map +1 -0
  78. package/lib/commonjs/iab/gpp/encoders/FixedIdBitMapEncoder.js +27 -0
  79. package/lib/commonjs/iab/gpp/encoders/FixedIdBitMapEncoder.js.map +1 -0
  80. package/lib/commonjs/iab/gpp/encoders/FixedIntegerEncoder.js +62 -0
  81. package/lib/commonjs/iab/gpp/encoders/FixedIntegerEncoder.js.map +1 -0
  82. package/lib/commonjs/iab/gpp/encoders/FixedIntegerListEncoder.js +71 -0
  83. package/lib/commonjs/iab/gpp/encoders/FixedIntegerListEncoder.js.map +1 -0
  84. package/lib/commonjs/iab/gpp/encoders/FixedIntegerRangeEncoder.js +88 -0
  85. package/lib/commonjs/iab/gpp/encoders/FixedIntegerRangeEncoder.js.map +1 -0
  86. package/lib/commonjs/iab/gpp/encoders/FixedStringEncoder.js +68 -0
  87. package/lib/commonjs/iab/gpp/encoders/FixedStringEncoder.js.map +1 -0
  88. package/lib/commonjs/iab/gpp/encoders/LICENSE-IABTechLab +176 -0
  89. package/lib/commonjs/iab/gpp/encoders/TraditionalBase64UrlEncoder.js +46 -0
  90. package/lib/commonjs/iab/gpp/encoders/TraditionalBase64UrlEncoder.js.map +1 -0
  91. package/lib/commonjs/iab/gpp/encoders/errors.js +42 -0
  92. package/lib/commonjs/iab/gpp/encoders/errors.js.map +1 -0
  93. package/lib/commonjs/iab/gpp/encoders/index.js +105 -0
  94. package/lib/commonjs/iab/gpp/encoders/index.js.map +1 -0
  95. package/lib/commonjs/iab/gpp/encoders/types.js +2 -0
  96. package/lib/commonjs/iab/gpp/encoders/types.js.map +1 -0
  97. package/lib/commonjs/iab/gpp/index.js +16 -0
  98. package/lib/commonjs/iab/gpp/index.js.map +1 -0
  99. package/lib/commonjs/iab/gpp/reducer.js +12 -0
  100. package/lib/commonjs/iab/gpp/reducer.js.map +1 -0
  101. package/lib/commonjs/iab/gpp/selectors.js +25 -0
  102. package/lib/commonjs/iab/gpp/selectors.js.map +1 -0
  103. package/lib/commonjs/iab/gpp/types.js +2 -0
  104. package/lib/commonjs/iab/gpp/types.js.map +1 -0
  105. package/lib/commonjs/iab/gpp/v1/constants.js +16 -0
  106. package/lib/commonjs/iab/gpp/v1/constants.js.map +1 -0
  107. package/lib/commonjs/iab/gpp/v1/index.js +73 -0
  108. package/lib/commonjs/iab/gpp/v1/index.js.map +1 -0
  109. package/lib/commonjs/iab/tcf/actions.js +20 -0
  110. package/lib/commonjs/iab/tcf/actions.js.map +1 -0
  111. package/lib/commonjs/iab/tcf/consent.js +306 -0
  112. package/lib/commonjs/iab/tcf/consent.js.map +1 -0
  113. package/lib/commonjs/iab/tcf/constants.js +44 -0
  114. package/lib/commonjs/iab/tcf/constants.js.map +1 -0
  115. package/lib/commonjs/iab/tcf/index.js +14 -0
  116. package/lib/commonjs/iab/tcf/index.js.map +1 -0
  117. package/lib/commonjs/iab/tcf/reducer.js +57 -0
  118. package/lib/commonjs/iab/tcf/reducer.js.map +1 -0
  119. package/lib/commonjs/iab/tcf/selectors.js +158 -0
  120. package/lib/commonjs/iab/tcf/selectors.js.map +1 -0
  121. package/lib/commonjs/iab/tcf/tcfcav1-api.js +41 -0
  122. package/lib/commonjs/iab/tcf/tcfcav1-api.js.map +1 -0
  123. package/lib/commonjs/iab/tcf/tcfeuv2-api.js +256 -0
  124. package/lib/commonjs/iab/tcf/tcfeuv2-api.js.map +1 -0
  125. package/lib/commonjs/iab/tcf/types.js +6 -0
  126. package/lib/commonjs/iab/tcf/types.js.map +1 -0
  127. package/lib/commonjs/iab/tcf/v2.0/encoders.js +39 -0
  128. package/lib/commonjs/iab/tcf/v2.0/encoders.js.map +1 -0
  129. package/lib/commonjs/iab/tcf/v2.0/formatters.js +21 -0
  130. package/lib/commonjs/iab/tcf/v2.0/formatters.js.map +1 -0
  131. package/lib/commonjs/iab/tcf/v2.0/helpers.js +25 -0
  132. package/lib/commonjs/iab/tcf/v2.0/helpers.js.map +1 -0
  133. package/lib/commonjs/iab/tcf/v2.0/index.js +39 -0
  134. package/lib/commonjs/iab/tcf/v2.0/index.js.map +1 -0
  135. package/lib/commonjs/iab/tcf/v2.0/middleware.js +80 -0
  136. package/lib/commonjs/iab/tcf/v2.0/middleware.js.map +1 -0
  137. package/lib/commonjs/iab/tcf/v2.0/reducer.js +318 -0
  138. package/lib/commonjs/iab/tcf/v2.0/reducer.js.map +1 -0
  139. package/lib/commonjs/iab/tcf/v2.0/shared-constants.js +22 -0
  140. package/lib/commonjs/iab/tcf/v2.0/shared-constants.js.map +1 -0
  141. package/lib/commonjs/iab/tcf/v2.0/tcfcav1-constants.js +63 -0
  142. package/lib/commonjs/iab/tcf/v2.0/tcfcav1-constants.js.map +1 -0
  143. package/lib/commonjs/iab/tcf/v2.0/tcfeuv2-constants.js +92 -0
  144. package/lib/commonjs/iab/tcf/v2.0/tcfeuv2-constants.js.map +1 -0
  145. package/lib/commonjs/iab/types.js +6 -0
  146. package/lib/commonjs/iab/types.js.map +1 -0
  147. package/lib/commonjs/iab/usp/api.js +59 -0
  148. package/lib/commonjs/iab/usp/api.js.map +1 -0
  149. package/lib/commonjs/iab/usp/consent.js +140 -0
  150. package/lib/commonjs/iab/usp/consent.js.map +1 -0
  151. package/lib/commonjs/iab/usp/constants.js +46 -0
  152. package/lib/commonjs/iab/usp/constants.js.map +1 -0
  153. package/lib/commonjs/iab/usp/index.js +16 -0
  154. package/lib/commonjs/iab/usp/index.js.map +1 -0
  155. package/lib/commonjs/iab/usp/reducer.js +121 -0
  156. package/lib/commonjs/iab/usp/reducer.js.map +1 -0
  157. package/lib/commonjs/iab/usp/selectors.js +35 -0
  158. package/lib/commonjs/iab/usp/selectors.js.map +1 -0
  159. package/lib/commonjs/iab/usp/types.js +2 -0
  160. package/lib/commonjs/iab/usp/types.js.map +1 -0
  161. package/lib/commonjs/iab/usp/v1/constants.js +16 -0
  162. package/lib/commonjs/iab/usp/v1/constants.js.map +1 -0
  163. package/lib/commonjs/iab/usp/v1/index.js +58 -0
  164. package/lib/commonjs/iab/usp/v1/index.js.map +1 -0
  165. package/lib/commonjs/iab/utilities.js +16 -0
  166. package/lib/commonjs/iab/utilities.js.map +1 -0
  167. package/lib/commonjs/index.js +129 -0
  168. package/lib/commonjs/index.js.map +1 -0
  169. package/lib/commonjs/locale/af.json +306 -0
  170. package/lib/commonjs/locale/ar.json +306 -0
  171. package/lib/commonjs/locale/bg.json +306 -0
  172. package/lib/commonjs/locale/ca.json +306 -0
  173. package/lib/commonjs/locale/cs.json +306 -0
  174. package/lib/commonjs/locale/da.json +306 -0
  175. package/lib/commonjs/locale/de-at.json +306 -0
  176. package/lib/commonjs/locale/de.json +306 -0
  177. package/lib/commonjs/locale/el.json +306 -0
  178. package/lib/commonjs/locale/en-au.json +306 -0
  179. package/lib/commonjs/locale/en-ca.json +306 -0
  180. package/lib/commonjs/locale/en-gb.json +306 -0
  181. package/lib/commonjs/locale/en.json +306 -0
  182. package/lib/commonjs/locale/es-mx.json +306 -0
  183. package/lib/commonjs/locale/es.json +306 -0
  184. package/lib/commonjs/locale/et.json +306 -0
  185. package/lib/commonjs/locale/fa.json +306 -0
  186. package/lib/commonjs/locale/fi.json +306 -0
  187. package/lib/commonjs/locale/fr-ca.json +306 -0
  188. package/lib/commonjs/locale/fr.json +306 -0
  189. package/lib/commonjs/locale/gd.json +306 -0
  190. package/lib/commonjs/locale/he.json +306 -0
  191. package/lib/commonjs/locale/hi.json +306 -0
  192. package/lib/commonjs/locale/hr.json +306 -0
  193. package/lib/commonjs/locale/hu.json +306 -0
  194. package/lib/commonjs/locale/hy.json +306 -0
  195. package/lib/commonjs/locale/id.json +306 -0
  196. package/lib/commonjs/locale/index.js +427 -0
  197. package/lib/commonjs/locale/index.js.map +1 -0
  198. package/lib/commonjs/locale/is.json +306 -0
  199. package/lib/commonjs/locale/it.json +306 -0
  200. package/lib/commonjs/locale/ja.json +306 -0
  201. package/lib/commonjs/locale/kk.json +306 -0
  202. package/lib/commonjs/locale/ko.json +306 -0
  203. package/lib/commonjs/locale/lt.json +306 -0
  204. package/lib/commonjs/locale/lv.json +306 -0
  205. package/lib/commonjs/locale/mi.json +306 -0
  206. package/lib/commonjs/locale/ms.json +306 -0
  207. package/lib/commonjs/locale/nb.json +306 -0
  208. package/lib/commonjs/locale/nl-be.json +306 -0
  209. package/lib/commonjs/locale/nl.json +306 -0
  210. package/lib/commonjs/locale/nn.json +306 -0
  211. package/lib/commonjs/locale/no.json +306 -0
  212. package/lib/commonjs/locale/pl.json +306 -0
  213. package/lib/commonjs/locale/pt-br.json +306 -0
  214. package/lib/commonjs/locale/pt.json +306 -0
  215. package/lib/commonjs/locale/ro.json +306 -0
  216. package/lib/commonjs/locale/ru.json +306 -0
  217. package/lib/commonjs/locale/sk.json +306 -0
  218. package/lib/commonjs/locale/sl.json +306 -0
  219. package/lib/commonjs/locale/sq.json +306 -0
  220. package/lib/commonjs/locale/sr.json +306 -0
  221. package/lib/commonjs/locale/sv.json +306 -0
  222. package/lib/commonjs/locale/th.json +306 -0
  223. package/lib/commonjs/locale/tl.json +306 -0
  224. package/lib/commonjs/locale/tr.json +306 -0
  225. package/lib/commonjs/locale/uk.json +306 -0
  226. package/lib/commonjs/locale/vi.json +306 -0
  227. package/lib/commonjs/locale/zh-hk.json +306 -0
  228. package/lib/commonjs/locale/zh-tw.json +306 -0
  229. package/lib/commonjs/locale/zh.json +306 -0
  230. package/lib/commonjs/locale/zu.json +306 -0
  231. package/lib/commonjs/native/OsanoCmp.js +33 -0
  232. package/lib/commonjs/native/OsanoCmp.js.map +1 -0
  233. package/lib/commonjs/services/consent.js +134 -0
  234. package/lib/commonjs/services/consent.js.map +1 -0
  235. package/lib/commonjs/services/disclosures.js +25 -0
  236. package/lib/commonjs/services/disclosures.js.map +1 -0
  237. package/lib/commonjs/services/locale.js +40 -0
  238. package/lib/commonjs/services/locale.js.map +1 -0
  239. package/lib/commonjs/store.js +558 -0
  240. package/lib/commonjs/store.js.map +1 -0
  241. package/lib/commonjs/styles.js +186 -0
  242. package/lib/commonjs/styles.js.map +1 -0
  243. package/lib/commonjs/types/consent-config.d.js +6 -0
  244. package/lib/commonjs/types/consent-config.d.js.map +1 -0
  245. package/lib/commonjs/types/env.d.js +2 -0
  246. package/lib/commonjs/types/env.d.js.map +1 -0
  247. package/lib/commonjs/types/index.d.js +6 -0
  248. package/lib/commonjs/types/index.d.js.map +1 -0
  249. package/lib/commonjs/types/store.d.js +6 -0
  250. package/lib/commonjs/types/store.d.js.map +1 -0
  251. package/lib/commonjs/utils/API.js +43 -0
  252. package/lib/commonjs/utils/API.js.map +1 -0
  253. package/lib/commonjs/utils/Color.js +99 -0
  254. package/lib/commonjs/utils/Color.js.map +1 -0
  255. package/lib/commonjs/utils/EventEmitter.js +53 -0
  256. package/lib/commonjs/utils/EventEmitter.js.map +1 -0
  257. package/lib/commonjs/utils/Translator.js +222 -0
  258. package/lib/commonjs/utils/Translator.js.map +1 -0
  259. package/lib/commonjs/utils/index.js +116 -0
  260. package/lib/commonjs/utils/index.js.map +1 -0
  261. package/lib/commonjs/views/Dialog/Buttons.js +76 -0
  262. package/lib/commonjs/views/Dialog/Buttons.js.map +1 -0
  263. package/lib/commonjs/views/Dialog/FirstLayerUsage.js +44 -0
  264. package/lib/commonjs/views/Dialog/FirstLayerUsage.js.map +1 -0
  265. package/lib/commonjs/views/Dialog/Message.js +30 -0
  266. package/lib/commonjs/views/Dialog/Message.js.map +1 -0
  267. package/lib/commonjs/views/Dialog/PreferenceManagementDeepLinks.js +46 -0
  268. package/lib/commonjs/views/Dialog/PreferenceManagementDeepLinks.js.map +1 -0
  269. package/lib/commonjs/views/Dialog/index.js +314 -0
  270. package/lib/commonjs/views/Dialog/index.js.map +1 -0
  271. package/lib/commonjs/views/Drawer/Drawer.ConsentCategories.js +627 -0
  272. package/lib/commonjs/views/Drawer/Drawer.ConsentCategories.js.map +1 -0
  273. package/lib/commonjs/views/Drawer/Drawer.Header.js +120 -0
  274. package/lib/commonjs/views/Drawer/Drawer.Header.js.map +1 -0
  275. package/lib/commonjs/views/Drawer/Drawer.Iab.Disclosures.js +311 -0
  276. package/lib/commonjs/views/Drawer/Drawer.Iab.Disclosures.js.map +1 -0
  277. package/lib/commonjs/views/Drawer/Drawer.Iab.Vendors.js +458 -0
  278. package/lib/commonjs/views/Drawer/Drawer.Iab.Vendors.js.map +1 -0
  279. package/lib/commonjs/views/Drawer/index.js +208 -0
  280. package/lib/commonjs/views/Drawer/index.js.map +1 -0
  281. package/lib/module/ConsentManager.js +520 -0
  282. package/lib/module/ConsentManager.js.map +1 -0
  283. package/lib/module/ConsentUiBuilder.js +66 -0
  284. package/lib/module/ConsentUiBuilder.js.map +1 -0
  285. package/lib/module/components/Button.js +205 -0
  286. package/lib/module/components/Button.js.map +1 -0
  287. package/lib/module/components/Checkbox.js +65 -0
  288. package/lib/module/components/Checkbox.js.map +1 -0
  289. package/lib/module/components/Divider.js +14 -0
  290. package/lib/module/components/Divider.js.map +1 -0
  291. package/lib/module/components/ExpansionPanel.js +60 -0
  292. package/lib/module/components/ExpansionPanel.js.map +1 -0
  293. package/lib/module/components/Link.js +42 -0
  294. package/lib/module/components/Link.js.map +1 -0
  295. package/lib/module/components/List.js +28 -0
  296. package/lib/module/components/List.js.map +1 -0
  297. package/lib/module/components/Locale.js +21 -0
  298. package/lib/module/components/Locale.js.map +1 -0
  299. package/lib/module/components/StoragePolicyLink.js +24 -0
  300. package/lib/module/components/StoragePolicyLink.js.map +1 -0
  301. package/lib/module/components/Toggle.js +103 -0
  302. package/lib/module/components/Toggle.js.map +1 -0
  303. package/lib/module/constants.js +31 -0
  304. package/lib/module/constants.js.map +1 -0
  305. package/lib/module/context.js +33 -0
  306. package/lib/module/context.js.map +1 -0
  307. package/lib/module/flavors/five.json +11 -0
  308. package/lib/module/flavors/four.json +11 -0
  309. package/lib/module/flavors/index.js +26 -0
  310. package/lib/module/flavors/index.js.map +1 -0
  311. package/lib/module/flavors/one.json +11 -0
  312. package/lib/module/flavors/six.json +12 -0
  313. package/lib/module/flavors/three.json +11 -0
  314. package/lib/module/flavors/two.json +11 -0
  315. package/lib/module/hooks/useBoundCallback.js +25 -0
  316. package/lib/module/hooks/useBoundCallback.js.map +1 -0
  317. package/lib/module/hooks/useDeviceOrientation.js +13 -0
  318. package/lib/module/hooks/useDeviceOrientation.js.map +1 -0
  319. package/lib/module/hooks/usePrevious.js +9 -0
  320. package/lib/module/hooks/usePrevious.js.map +1 -0
  321. package/lib/module/hooks/useThunkReducer.js +54 -0
  322. package/lib/module/hooks/useThunkReducer.js.map +1 -0
  323. package/lib/module/iab/constants.js +2 -0
  324. package/lib/module/iab/constants.js.map +1 -0
  325. package/lib/module/iab/gpp/api.js +220 -0
  326. package/lib/module/iab/gpp/api.js.map +1 -0
  327. package/lib/module/iab/gpp/consent.js +89 -0
  328. package/lib/module/iab/gpp/consent.js.map +1 -0
  329. package/lib/module/iab/gpp/constants.js +50 -0
  330. package/lib/module/iab/gpp/constants.js.map +1 -0
  331. package/lib/module/iab/gpp/encoders/AbstractBase64UrlEncoder.js +132 -0
  332. package/lib/module/iab/gpp/encoders/AbstractBase64UrlEncoder.js.map +1 -0
  333. package/lib/module/iab/gpp/encoders/BooleanEncoder.js +39 -0
  334. package/lib/module/iab/gpp/encoders/BooleanEncoder.js.map +1 -0
  335. package/lib/module/iab/gpp/encoders/CompressedBase64UrlEncoder.js +38 -0
  336. package/lib/module/iab/gpp/encoders/CompressedBase64UrlEncoder.js.map +1 -0
  337. package/lib/module/iab/gpp/encoders/DatetimeEncoder.js +40 -0
  338. package/lib/module/iab/gpp/encoders/DatetimeEncoder.js.map +1 -0
  339. package/lib/module/iab/gpp/encoders/EncodableOptimizedFixedRange.js +177 -0
  340. package/lib/module/iab/gpp/encoders/EncodableOptimizedFixedRange.js.map +1 -0
  341. package/lib/module/iab/gpp/encoders/FibonacciIntegerEncoder.js +73 -0
  342. package/lib/module/iab/gpp/encoders/FibonacciIntegerEncoder.js.map +1 -0
  343. package/lib/module/iab/gpp/encoders/FibonacciIntegerRangeEncoder.js +96 -0
  344. package/lib/module/iab/gpp/encoders/FibonacciIntegerRangeEncoder.js.map +1 -0
  345. package/lib/module/iab/gpp/encoders/FixedBitfieldEncoder.js +48 -0
  346. package/lib/module/iab/gpp/encoders/FixedBitfieldEncoder.js.map +1 -0
  347. package/lib/module/iab/gpp/encoders/FixedIdBitMapEncoder.js +21 -0
  348. package/lib/module/iab/gpp/encoders/FixedIdBitMapEncoder.js.map +1 -0
  349. package/lib/module/iab/gpp/encoders/FixedIntegerEncoder.js +55 -0
  350. package/lib/module/iab/gpp/encoders/FixedIntegerEncoder.js.map +1 -0
  351. package/lib/module/iab/gpp/encoders/FixedIntegerListEncoder.js +63 -0
  352. package/lib/module/iab/gpp/encoders/FixedIntegerListEncoder.js.map +1 -0
  353. package/lib/module/iab/gpp/encoders/FixedIntegerRangeEncoder.js +80 -0
  354. package/lib/module/iab/gpp/encoders/FixedIntegerRangeEncoder.js.map +1 -0
  355. package/lib/module/iab/gpp/encoders/FixedStringEncoder.js +60 -0
  356. package/lib/module/iab/gpp/encoders/FixedStringEncoder.js.map +1 -0
  357. package/lib/module/iab/gpp/encoders/LICENSE-IABTechLab +176 -0
  358. package/lib/module/iab/gpp/encoders/TraditionalBase64UrlEncoder.js +35 -0
  359. package/lib/module/iab/gpp/encoders/TraditionalBase64UrlEncoder.js.map +1 -0
  360. package/lib/module/iab/gpp/encoders/errors.js +31 -0
  361. package/lib/module/iab/gpp/encoders/errors.js.map +1 -0
  362. package/lib/module/iab/gpp/encoders/index.js +15 -0
  363. package/lib/module/iab/gpp/encoders/index.js.map +1 -0
  364. package/lib/module/iab/gpp/encoders/types.js +2 -0
  365. package/lib/module/iab/gpp/encoders/types.js.map +1 -0
  366. package/lib/module/iab/gpp/index.js +9 -0
  367. package/lib/module/iab/gpp/index.js.map +1 -0
  368. package/lib/module/iab/gpp/reducer.js +6 -0
  369. package/lib/module/iab/gpp/reducer.js.map +1 -0
  370. package/lib/module/iab/gpp/selectors.js +14 -0
  371. package/lib/module/iab/gpp/selectors.js.map +1 -0
  372. package/lib/module/iab/gpp/types.js +2 -0
  373. package/lib/module/iab/gpp/types.js.map +1 -0
  374. package/lib/module/iab/gpp/v1/constants.js +10 -0
  375. package/lib/module/iab/gpp/v1/constants.js.map +1 -0
  376. package/lib/module/iab/gpp/v1/index.js +65 -0
  377. package/lib/module/iab/gpp/v1/index.js.map +1 -0
  378. package/lib/module/iab/tcf/actions.js +14 -0
  379. package/lib/module/iab/tcf/actions.js.map +1 -0
  380. package/lib/module/iab/tcf/consent.js +293 -0
  381. package/lib/module/iab/tcf/consent.js.map +1 -0
  382. package/lib/module/iab/tcf/constants.js +37 -0
  383. package/lib/module/iab/tcf/constants.js.map +1 -0
  384. package/lib/module/iab/tcf/index.js +7 -0
  385. package/lib/module/iab/tcf/index.js.map +1 -0
  386. package/lib/module/iab/tcf/reducer.js +51 -0
  387. package/lib/module/iab/tcf/reducer.js.map +1 -0
  388. package/lib/module/iab/tcf/selectors.js +124 -0
  389. package/lib/module/iab/tcf/selectors.js.map +1 -0
  390. package/lib/module/iab/tcf/tcfcav1-api.js +35 -0
  391. package/lib/module/iab/tcf/tcfcav1-api.js.map +1 -0
  392. package/lib/module/iab/tcf/tcfeuv2-api.js +251 -0
  393. package/lib/module/iab/tcf/tcfeuv2-api.js.map +1 -0
  394. package/lib/module/iab/tcf/types.js +2 -0
  395. package/lib/module/iab/tcf/types.js.map +1 -0
  396. package/lib/module/iab/tcf/v2.0/encoders.js +28 -0
  397. package/lib/module/iab/tcf/v2.0/encoders.js.map +1 -0
  398. package/lib/module/iab/tcf/v2.0/formatters.js +12 -0
  399. package/lib/module/iab/tcf/v2.0/formatters.js.map +1 -0
  400. package/lib/module/iab/tcf/v2.0/helpers.js +18 -0
  401. package/lib/module/iab/tcf/v2.0/helpers.js.map +1 -0
  402. package/lib/module/iab/tcf/v2.0/index.js +33 -0
  403. package/lib/module/iab/tcf/v2.0/index.js.map +1 -0
  404. package/lib/module/iab/tcf/v2.0/middleware.js +74 -0
  405. package/lib/module/iab/tcf/v2.0/middleware.js.map +1 -0
  406. package/lib/module/iab/tcf/v2.0/reducer.js +311 -0
  407. package/lib/module/iab/tcf/v2.0/reducer.js.map +1 -0
  408. package/lib/module/iab/tcf/v2.0/shared-constants.js +16 -0
  409. package/lib/module/iab/tcf/v2.0/shared-constants.js.map +1 -0
  410. package/lib/module/iab/tcf/v2.0/tcfcav1-constants.js +57 -0
  411. package/lib/module/iab/tcf/v2.0/tcfcav1-constants.js.map +1 -0
  412. package/lib/module/iab/tcf/v2.0/tcfeuv2-constants.js +85 -0
  413. package/lib/module/iab/tcf/v2.0/tcfeuv2-constants.js.map +1 -0
  414. package/lib/module/iab/types.js +2 -0
  415. package/lib/module/iab/types.js.map +1 -0
  416. package/lib/module/iab/usp/api.js +53 -0
  417. package/lib/module/iab/usp/api.js.map +1 -0
  418. package/lib/module/iab/usp/consent.js +129 -0
  419. package/lib/module/iab/usp/consent.js.map +1 -0
  420. package/lib/module/iab/usp/constants.js +38 -0
  421. package/lib/module/iab/usp/constants.js.map +1 -0
  422. package/lib/module/iab/usp/index.js +9 -0
  423. package/lib/module/iab/usp/index.js.map +1 -0
  424. package/lib/module/iab/usp/reducer.js +115 -0
  425. package/lib/module/iab/usp/reducer.js.map +1 -0
  426. package/lib/module/iab/usp/selectors.js +25 -0
  427. package/lib/module/iab/usp/selectors.js.map +1 -0
  428. package/lib/module/iab/usp/types.js +2 -0
  429. package/lib/module/iab/usp/types.js.map +1 -0
  430. package/lib/module/iab/usp/v1/constants.js +10 -0
  431. package/lib/module/iab/usp/v1/constants.js.map +1 -0
  432. package/lib/module/iab/usp/v1/index.js +51 -0
  433. package/lib/module/iab/usp/v1/index.js.map +1 -0
  434. package/lib/module/iab/utilities.js +9 -0
  435. package/lib/module/iab/utilities.js.map +1 -0
  436. package/lib/module/index.js +114 -0
  437. package/lib/module/index.js.map +1 -0
  438. package/lib/module/locale/af.json +306 -0
  439. package/lib/module/locale/ar.json +306 -0
  440. package/lib/module/locale/bg.json +306 -0
  441. package/lib/module/locale/ca.json +306 -0
  442. package/lib/module/locale/cs.json +306 -0
  443. package/lib/module/locale/da.json +306 -0
  444. package/lib/module/locale/de-at.json +306 -0
  445. package/lib/module/locale/de.json +306 -0
  446. package/lib/module/locale/el.json +306 -0
  447. package/lib/module/locale/en-au.json +306 -0
  448. package/lib/module/locale/en-ca.json +306 -0
  449. package/lib/module/locale/en-gb.json +306 -0
  450. package/lib/module/locale/en.json +306 -0
  451. package/lib/module/locale/es-mx.json +306 -0
  452. package/lib/module/locale/es.json +306 -0
  453. package/lib/module/locale/et.json +306 -0
  454. package/lib/module/locale/fa.json +306 -0
  455. package/lib/module/locale/fi.json +306 -0
  456. package/lib/module/locale/fr-ca.json +306 -0
  457. package/lib/module/locale/fr.json +306 -0
  458. package/lib/module/locale/gd.json +306 -0
  459. package/lib/module/locale/he.json +306 -0
  460. package/lib/module/locale/hi.json +306 -0
  461. package/lib/module/locale/hr.json +306 -0
  462. package/lib/module/locale/hu.json +306 -0
  463. package/lib/module/locale/hy.json +306 -0
  464. package/lib/module/locale/id.json +306 -0
  465. package/lib/module/locale/index.js +61 -0
  466. package/lib/module/locale/index.js.map +1 -0
  467. package/lib/module/locale/is.json +306 -0
  468. package/lib/module/locale/it.json +306 -0
  469. package/lib/module/locale/ja.json +306 -0
  470. package/lib/module/locale/kk.json +306 -0
  471. package/lib/module/locale/ko.json +306 -0
  472. package/lib/module/locale/lt.json +306 -0
  473. package/lib/module/locale/lv.json +306 -0
  474. package/lib/module/locale/mi.json +306 -0
  475. package/lib/module/locale/ms.json +306 -0
  476. package/lib/module/locale/nb.json +306 -0
  477. package/lib/module/locale/nl-be.json +306 -0
  478. package/lib/module/locale/nl.json +306 -0
  479. package/lib/module/locale/nn.json +306 -0
  480. package/lib/module/locale/no.json +306 -0
  481. package/lib/module/locale/pl.json +306 -0
  482. package/lib/module/locale/pt-br.json +306 -0
  483. package/lib/module/locale/pt.json +306 -0
  484. package/lib/module/locale/ro.json +306 -0
  485. package/lib/module/locale/ru.json +306 -0
  486. package/lib/module/locale/sk.json +306 -0
  487. package/lib/module/locale/sl.json +306 -0
  488. package/lib/module/locale/sq.json +306 -0
  489. package/lib/module/locale/sr.json +306 -0
  490. package/lib/module/locale/sv.json +306 -0
  491. package/lib/module/locale/th.json +306 -0
  492. package/lib/module/locale/tl.json +306 -0
  493. package/lib/module/locale/tr.json +306 -0
  494. package/lib/module/locale/uk.json +306 -0
  495. package/lib/module/locale/vi.json +306 -0
  496. package/lib/module/locale/zh-hk.json +306 -0
  497. package/lib/module/locale/zh-tw.json +306 -0
  498. package/lib/module/locale/zh.json +306 -0
  499. package/lib/module/locale/zu.json +306 -0
  500. package/lib/module/native/OsanoCmp.js +24 -0
  501. package/lib/module/native/OsanoCmp.js.map +1 -0
  502. package/lib/module/services/consent.js +123 -0
  503. package/lib/module/services/consent.js.map +1 -0
  504. package/lib/module/services/disclosures.js +18 -0
  505. package/lib/module/services/disclosures.js.map +1 -0
  506. package/lib/module/services/locale.js +32 -0
  507. package/lib/module/services/locale.js.map +1 -0
  508. package/lib/module/store.js +520 -0
  509. package/lib/module/store.js.map +1 -0
  510. package/lib/module/styles.js +178 -0
  511. package/lib/module/styles.js.map +1 -0
  512. package/lib/module/types/consent-config.d.js +2 -0
  513. package/lib/module/types/consent-config.d.js.map +1 -0
  514. package/lib/module/types/env.d.js +2 -0
  515. package/lib/module/types/env.d.js.map +1 -0
  516. package/lib/module/types/index.d.js +2 -0
  517. package/lib/module/types/index.d.js.map +1 -0
  518. package/lib/module/types/store.d.js +2 -0
  519. package/lib/module/types/store.d.js.map +1 -0
  520. package/lib/module/utils/API.js +37 -0
  521. package/lib/module/utils/API.js.map +1 -0
  522. package/lib/module/utils/Color.js +82 -0
  523. package/lib/module/utils/Color.js.map +1 -0
  524. package/lib/module/utils/EventEmitter.js +45 -0
  525. package/lib/module/utils/EventEmitter.js.map +1 -0
  526. package/lib/module/utils/Translator.js +215 -0
  527. package/lib/module/utils/Translator.js.map +1 -0
  528. package/lib/module/utils/index.js +107 -0
  529. package/lib/module/utils/index.js.map +1 -0
  530. package/lib/module/views/Dialog/Buttons.js +67 -0
  531. package/lib/module/views/Dialog/Buttons.js.map +1 -0
  532. package/lib/module/views/Dialog/FirstLayerUsage.js +34 -0
  533. package/lib/module/views/Dialog/FirstLayerUsage.js.map +1 -0
  534. package/lib/module/views/Dialog/Message.js +20 -0
  535. package/lib/module/views/Dialog/Message.js.map +1 -0
  536. package/lib/module/views/Dialog/PreferenceManagementDeepLinks.js +36 -0
  537. package/lib/module/views/Dialog/PreferenceManagementDeepLinks.js.map +1 -0
  538. package/lib/module/views/Dialog/index.js +304 -0
  539. package/lib/module/views/Dialog/index.js.map +1 -0
  540. package/lib/module/views/Drawer/Drawer.ConsentCategories.js +617 -0
  541. package/lib/module/views/Drawer/Drawer.ConsentCategories.js.map +1 -0
  542. package/lib/module/views/Drawer/Drawer.Header.js +110 -0
  543. package/lib/module/views/Drawer/Drawer.Header.js.map +1 -0
  544. package/lib/module/views/Drawer/Drawer.Iab.Disclosures.js +301 -0
  545. package/lib/module/views/Drawer/Drawer.Iab.Disclosures.js.map +1 -0
  546. package/lib/module/views/Drawer/Drawer.Iab.Vendors.js +448 -0
  547. package/lib/module/views/Drawer/Drawer.Iab.Vendors.js.map +1 -0
  548. package/lib/module/views/Drawer/index.js +198 -0
  549. package/lib/module/views/Drawer/index.js.map +1 -0
  550. package/lib/typescript/src/ConsentManager.d.ts +123 -0
  551. package/lib/typescript/src/ConsentManager.d.ts.map +1 -0
  552. package/lib/typescript/src/ConsentUiBuilder.d.ts +13 -0
  553. package/lib/typescript/src/ConsentUiBuilder.d.ts.map +1 -0
  554. package/lib/typescript/src/components/Button.d.ts +22 -0
  555. package/lib/typescript/src/components/Button.d.ts.map +1 -0
  556. package/lib/typescript/src/components/Checkbox.d.ts +12 -0
  557. package/lib/typescript/src/components/Checkbox.d.ts.map +1 -0
  558. package/lib/typescript/src/components/Divider.d.ts +9 -0
  559. package/lib/typescript/src/components/Divider.d.ts.map +1 -0
  560. package/lib/typescript/src/components/ExpansionPanel.d.ts +10 -0
  561. package/lib/typescript/src/components/ExpansionPanel.d.ts.map +1 -0
  562. package/lib/typescript/src/components/Link.d.ts +9 -0
  563. package/lib/typescript/src/components/Link.d.ts.map +1 -0
  564. package/lib/typescript/src/components/List.d.ts +10 -0
  565. package/lib/typescript/src/components/List.d.ts.map +1 -0
  566. package/lib/typescript/src/components/Locale.d.ts +10 -0
  567. package/lib/typescript/src/components/Locale.d.ts.map +1 -0
  568. package/lib/typescript/src/components/StoragePolicyLink.d.ts +4 -0
  569. package/lib/typescript/src/components/StoragePolicyLink.d.ts.map +1 -0
  570. package/lib/typescript/src/components/Toggle.d.ts +12 -0
  571. package/lib/typescript/src/components/Toggle.d.ts.map +1 -0
  572. package/lib/typescript/src/constants.d.ts +17 -0
  573. package/lib/typescript/src/constants.d.ts.map +1 -0
  574. package/lib/typescript/src/context.d.ts +34 -0
  575. package/lib/typescript/src/context.d.ts.map +1 -0
  576. package/lib/typescript/src/flavors/index.d.ts +21 -0
  577. package/lib/typescript/src/flavors/index.d.ts.map +1 -0
  578. package/lib/typescript/src/hooks/useBoundCallback.d.ts +17 -0
  579. package/lib/typescript/src/hooks/useBoundCallback.d.ts.map +1 -0
  580. package/lib/typescript/src/hooks/useDeviceOrientation.d.ts +4 -0
  581. package/lib/typescript/src/hooks/useDeviceOrientation.d.ts.map +1 -0
  582. package/lib/typescript/src/hooks/usePrevious.d.ts +2 -0
  583. package/lib/typescript/src/hooks/usePrevious.d.ts.map +1 -0
  584. package/lib/typescript/src/hooks/useThunkReducer.d.ts +23 -0
  585. package/lib/typescript/src/hooks/useThunkReducer.d.ts.map +1 -0
  586. package/lib/typescript/src/iab/constants.d.ts +2 -0
  587. package/lib/typescript/src/iab/constants.d.ts.map +1 -0
  588. package/lib/typescript/src/iab/gpp/encoders/AbstractBase64UrlEncoder.d.ts +28 -0
  589. package/lib/typescript/src/iab/gpp/encoders/AbstractBase64UrlEncoder.d.ts.map +1 -0
  590. package/lib/typescript/src/iab/gpp/encoders/BooleanEncoder.d.ts +34 -0
  591. package/lib/typescript/src/iab/gpp/encoders/BooleanEncoder.d.ts.map +1 -0
  592. package/lib/typescript/src/iab/gpp/encoders/CompressedBase64UrlEncoder.d.ts +28 -0
  593. package/lib/typescript/src/iab/gpp/encoders/CompressedBase64UrlEncoder.d.ts.map +1 -0
  594. package/lib/typescript/src/iab/gpp/encoders/DatetimeEncoder.d.ts +28 -0
  595. package/lib/typescript/src/iab/gpp/encoders/DatetimeEncoder.d.ts.map +1 -0
  596. package/lib/typescript/src/iab/gpp/encoders/EncodableOptimizedFixedRange.d.ts +16 -0
  597. package/lib/typescript/src/iab/gpp/encoders/EncodableOptimizedFixedRange.d.ts.map +1 -0
  598. package/lib/typescript/src/iab/gpp/encoders/FibonacciIntegerEncoder.d.ts +28 -0
  599. package/lib/typescript/src/iab/gpp/encoders/FibonacciIntegerEncoder.d.ts.map +1 -0
  600. package/lib/typescript/src/iab/gpp/encoders/FibonacciIntegerRangeEncoder.d.ts +28 -0
  601. package/lib/typescript/src/iab/gpp/encoders/FibonacciIntegerRangeEncoder.d.ts.map +1 -0
  602. package/lib/typescript/src/iab/gpp/encoders/FixedBitfieldEncoder.d.ts +28 -0
  603. package/lib/typescript/src/iab/gpp/encoders/FixedBitfieldEncoder.d.ts.map +1 -0
  604. package/lib/typescript/src/iab/gpp/encoders/FixedIdBitMapEncoder.d.ts +6 -0
  605. package/lib/typescript/src/iab/gpp/encoders/FixedIdBitMapEncoder.d.ts.map +1 -0
  606. package/lib/typescript/src/iab/gpp/encoders/FixedIntegerEncoder.d.ts +28 -0
  607. package/lib/typescript/src/iab/gpp/encoders/FixedIntegerEncoder.d.ts.map +1 -0
  608. package/lib/typescript/src/iab/gpp/encoders/FixedIntegerListEncoder.d.ts +28 -0
  609. package/lib/typescript/src/iab/gpp/encoders/FixedIntegerListEncoder.d.ts.map +1 -0
  610. package/lib/typescript/src/iab/gpp/encoders/FixedIntegerRangeEncoder.d.ts +28 -0
  611. package/lib/typescript/src/iab/gpp/encoders/FixedIntegerRangeEncoder.d.ts.map +1 -0
  612. package/lib/typescript/src/iab/gpp/encoders/FixedStringEncoder.d.ts +26 -0
  613. package/lib/typescript/src/iab/gpp/encoders/FixedStringEncoder.d.ts.map +1 -0
  614. package/lib/typescript/src/iab/gpp/encoders/TraditionalBase64UrlEncoder.d.ts +26 -0
  615. package/lib/typescript/src/iab/gpp/encoders/TraditionalBase64UrlEncoder.d.ts.map +1 -0
  616. package/lib/typescript/src/iab/gpp/encoders/errors.d.ts +19 -0
  617. package/lib/typescript/src/iab/gpp/encoders/errors.d.ts.map +1 -0
  618. package/lib/typescript/src/iab/gpp/encoders/index.d.ts +16 -0
  619. package/lib/typescript/src/iab/gpp/encoders/index.d.ts.map +1 -0
  620. package/lib/typescript/src/iab/gpp/encoders/types.d.ts +5 -0
  621. package/lib/typescript/src/iab/gpp/encoders/types.d.ts.map +1 -0
  622. package/lib/typescript/src/iab/gpp/types.d.ts +3 -0
  623. package/lib/typescript/src/iab/gpp/types.d.ts.map +1 -0
  624. package/lib/typescript/src/iab/tcf/constants.d.ts +20 -0
  625. package/lib/typescript/src/iab/tcf/constants.d.ts.map +1 -0
  626. package/lib/typescript/src/iab/tcf/types.d.ts +12 -0
  627. package/lib/typescript/src/iab/tcf/types.d.ts.map +1 -0
  628. package/lib/typescript/src/iab/tcf/v2.0/encoders.d.ts +8 -0
  629. package/lib/typescript/src/iab/tcf/v2.0/encoders.d.ts.map +1 -0
  630. package/lib/typescript/src/iab/tcf/v2.0/helpers.d.ts +5 -0
  631. package/lib/typescript/src/iab/tcf/v2.0/helpers.d.ts.map +1 -0
  632. package/lib/typescript/src/iab/types.d.ts +63 -0
  633. package/lib/typescript/src/iab/types.d.ts.map +1 -0
  634. package/lib/typescript/src/iab/usp/types.d.ts +5 -0
  635. package/lib/typescript/src/iab/usp/types.d.ts.map +1 -0
  636. package/lib/typescript/src/iab/utilities.d.ts +3 -0
  637. package/lib/typescript/src/iab/utilities.d.ts.map +1 -0
  638. package/lib/typescript/src/index.d.ts +5 -0
  639. package/lib/typescript/src/index.d.ts.map +1 -0
  640. package/lib/typescript/src/native/OsanoCmp.d.ts +5 -0
  641. package/lib/typescript/src/native/OsanoCmp.d.ts.map +1 -0
  642. package/lib/typescript/src/services/consent.d.ts +17 -0
  643. package/lib/typescript/src/services/consent.d.ts.map +1 -0
  644. package/lib/typescript/src/services/disclosures.d.ts +2 -0
  645. package/lib/typescript/src/services/disclosures.d.ts.map +1 -0
  646. package/lib/typescript/src/services/locale.d.ts +4 -0
  647. package/lib/typescript/src/services/locale.d.ts.map +1 -0
  648. package/lib/typescript/src/store.d.ts +55 -0
  649. package/lib/typescript/src/store.d.ts.map +1 -0
  650. package/lib/typescript/src/styles.d.ts +141 -0
  651. package/lib/typescript/src/styles.d.ts.map +1 -0
  652. package/lib/typescript/src/utils/API.d.ts +6 -0
  653. package/lib/typescript/src/utils/API.d.ts.map +1 -0
  654. package/lib/typescript/src/utils/Color.d.ts +12 -0
  655. package/lib/typescript/src/utils/Color.d.ts.map +1 -0
  656. package/lib/typescript/src/utils/EventEmitter.d.ts +15 -0
  657. package/lib/typescript/src/utils/EventEmitter.d.ts.map +1 -0
  658. package/lib/typescript/src/utils/Translator.d.ts +61 -0
  659. package/lib/typescript/src/utils/Translator.d.ts.map +1 -0
  660. package/lib/typescript/src/utils/index.d.ts +5 -0
  661. package/lib/typescript/src/utils/index.d.ts.map +1 -0
  662. package/lib/typescript/src/views/Dialog/Buttons.d.ts +5 -0
  663. package/lib/typescript/src/views/Dialog/Buttons.d.ts.map +1 -0
  664. package/lib/typescript/src/views/Dialog/FirstLayerUsage.d.ts +4 -0
  665. package/lib/typescript/src/views/Dialog/FirstLayerUsage.d.ts.map +1 -0
  666. package/lib/typescript/src/views/Dialog/Message.d.ts +4 -0
  667. package/lib/typescript/src/views/Dialog/Message.d.ts.map +1 -0
  668. package/lib/typescript/src/views/Dialog/PreferenceManagementDeepLinks.d.ts +4 -0
  669. package/lib/typescript/src/views/Dialog/PreferenceManagementDeepLinks.d.ts.map +1 -0
  670. package/lib/typescript/src/views/Dialog/index.d.ts +5 -0
  671. package/lib/typescript/src/views/Dialog/index.d.ts.map +1 -0
  672. package/lib/typescript/src/views/Drawer/Drawer.ConsentCategories.d.ts +4 -0
  673. package/lib/typescript/src/views/Drawer/Drawer.ConsentCategories.d.ts.map +1 -0
  674. package/lib/typescript/src/views/Drawer/Drawer.Header.d.ts +10 -0
  675. package/lib/typescript/src/views/Drawer/Drawer.Header.d.ts.map +1 -0
  676. package/lib/typescript/src/views/Drawer/Drawer.Iab.Disclosures.d.ts +4 -0
  677. package/lib/typescript/src/views/Drawer/Drawer.Iab.Disclosures.d.ts.map +1 -0
  678. package/lib/typescript/src/views/Drawer/Drawer.Iab.Vendors.d.ts +4 -0
  679. package/lib/typescript/src/views/Drawer/Drawer.Iab.Vendors.d.ts.map +1 -0
  680. package/lib/typescript/src/views/Drawer/index.d.ts +5 -0
  681. package/lib/typescript/src/views/Drawer/index.d.ts.map +1 -0
  682. package/osano-cmp-sdk.podspec +41 -0
  683. package/package.json +158 -0
  684. package/src/ConsentManager.ts +622 -0
  685. package/src/ConsentUiBuilder.tsx +117 -0
  686. package/src/components/Button.tsx +204 -0
  687. package/src/components/Checkbox.tsx +86 -0
  688. package/src/components/Divider.tsx +20 -0
  689. package/src/components/ExpansionPanel.tsx +72 -0
  690. package/src/components/Link.tsx +49 -0
  691. package/src/components/List.tsx +39 -0
  692. package/src/components/Locale.tsx +38 -0
  693. package/src/components/StoragePolicyLink.tsx +24 -0
  694. package/src/components/Toggle.tsx +165 -0
  695. package/src/constants.ts +34 -0
  696. package/src/context.ts +79 -0
  697. package/src/flavors/five.json +11 -0
  698. package/src/flavors/four.json +11 -0
  699. package/src/flavors/index.ts +38 -0
  700. package/src/flavors/one.json +11 -0
  701. package/src/flavors/six.json +12 -0
  702. package/src/flavors/three.json +11 -0
  703. package/src/flavors/two.json +11 -0
  704. package/src/hooks/useBoundCallback.ts +32 -0
  705. package/src/hooks/useDeviceOrientation.ts +14 -0
  706. package/src/hooks/usePrevious.ts +9 -0
  707. package/src/hooks/useThunkReducer.ts +124 -0
  708. package/src/iab/constants.ts +1 -0
  709. package/src/iab/gpp/api.js +253 -0
  710. package/src/iab/gpp/consent.js +114 -0
  711. package/src/iab/gpp/constants.js +49 -0
  712. package/src/iab/gpp/encoders/AbstractBase64UrlEncoder.ts +89 -0
  713. package/src/iab/gpp/encoders/BooleanEncoder.ts +39 -0
  714. package/src/iab/gpp/encoders/CompressedBase64UrlEncoder.ts +41 -0
  715. package/src/iab/gpp/encoders/DatetimeEncoder.ts +46 -0
  716. package/src/iab/gpp/encoders/EncodableOptimizedFixedRange.ts +213 -0
  717. package/src/iab/gpp/encoders/FibonacciIntegerEncoder.ts +81 -0
  718. package/src/iab/gpp/encoders/FibonacciIntegerRangeEncoder.ts +122 -0
  719. package/src/iab/gpp/encoders/FixedBitfieldEncoder.ts +59 -0
  720. package/src/iab/gpp/encoders/FixedIdBitMapEncoder.ts +30 -0
  721. package/src/iab/gpp/encoders/FixedIntegerEncoder.ts +61 -0
  722. package/src/iab/gpp/encoders/FixedIntegerListEncoder.ts +87 -0
  723. package/src/iab/gpp/encoders/FixedIntegerRangeEncoder.ts +102 -0
  724. package/src/iab/gpp/encoders/FixedStringEncoder.ts +74 -0
  725. package/src/iab/gpp/encoders/LICENSE-IABTechLab +176 -0
  726. package/src/iab/gpp/encoders/TraditionalBase64UrlEncoder.ts +39 -0
  727. package/src/iab/gpp/encoders/errors.ts +41 -0
  728. package/src/iab/gpp/encoders/index.ts +15 -0
  729. package/src/iab/gpp/encoders/types.ts +5 -0
  730. package/src/iab/gpp/index.js +9 -0
  731. package/src/iab/gpp/reducer.js +7 -0
  732. package/src/iab/gpp/selectors.js +21 -0
  733. package/src/iab/gpp/types.ts +3 -0
  734. package/src/iab/gpp/v1/constants.js +7 -0
  735. package/src/iab/gpp/v1/index.js +73 -0
  736. package/src/iab/tcf/actions.js +52 -0
  737. package/src/iab/tcf/consent.js +345 -0
  738. package/src/iab/tcf/constants.ts +51 -0
  739. package/src/iab/tcf/index.js +7 -0
  740. package/src/iab/tcf/reducer.js +59 -0
  741. package/src/iab/tcf/selectors.js +151 -0
  742. package/src/iab/tcf/tcfcav1-api.js +39 -0
  743. package/src/iab/tcf/tcfeuv2-api.js +264 -0
  744. package/src/iab/tcf/types.ts +13 -0
  745. package/src/iab/tcf/v2.0/encoders.ts +37 -0
  746. package/src/iab/tcf/v2.0/formatters.js +14 -0
  747. package/src/iab/tcf/v2.0/helpers.ts +23 -0
  748. package/src/iab/tcf/v2.0/index.js +36 -0
  749. package/src/iab/tcf/v2.0/middleware.js +72 -0
  750. package/src/iab/tcf/v2.0/reducer.js +327 -0
  751. package/src/iab/tcf/v2.0/shared-constants.js +17 -0
  752. package/src/iab/tcf/v2.0/tcfcav1-constants.js +115 -0
  753. package/src/iab/tcf/v2.0/tcfeuv2-constants.js +117 -0
  754. package/src/iab/types.ts +67 -0
  755. package/src/iab/usp/api.js +56 -0
  756. package/src/iab/usp/consent.js +150 -0
  757. package/src/iab/usp/constants.js +40 -0
  758. package/src/iab/usp/index.js +9 -0
  759. package/src/iab/usp/reducer.js +107 -0
  760. package/src/iab/usp/selectors.js +31 -0
  761. package/src/iab/usp/types.ts +4 -0
  762. package/src/iab/usp/v1/constants.js +10 -0
  763. package/src/iab/usp/v1/index.js +54 -0
  764. package/src/iab/utilities.ts +17 -0
  765. package/src/index.tsx +128 -0
  766. package/src/locale/af.json +306 -0
  767. package/src/locale/ar.json +306 -0
  768. package/src/locale/bg.json +306 -0
  769. package/src/locale/ca.json +306 -0
  770. package/src/locale/cs.json +306 -0
  771. package/src/locale/da.json +306 -0
  772. package/src/locale/de-at.json +306 -0
  773. package/src/locale/de.json +306 -0
  774. package/src/locale/el.json +306 -0
  775. package/src/locale/en-au.json +306 -0
  776. package/src/locale/en-ca.json +306 -0
  777. package/src/locale/en-gb.json +306 -0
  778. package/src/locale/en.json +306 -0
  779. package/src/locale/es-mx.json +306 -0
  780. package/src/locale/es.json +306 -0
  781. package/src/locale/et.json +306 -0
  782. package/src/locale/fa.json +306 -0
  783. package/src/locale/fi.json +306 -0
  784. package/src/locale/fr-ca.json +306 -0
  785. package/src/locale/fr.json +306 -0
  786. package/src/locale/gd.json +306 -0
  787. package/src/locale/he.json +306 -0
  788. package/src/locale/hi.json +306 -0
  789. package/src/locale/hr.json +306 -0
  790. package/src/locale/hu.json +306 -0
  791. package/src/locale/hy.json +306 -0
  792. package/src/locale/id.json +306 -0
  793. package/src/locale/index.js +60 -0
  794. package/src/locale/is.json +306 -0
  795. package/src/locale/it.json +306 -0
  796. package/src/locale/ja.json +306 -0
  797. package/src/locale/kk.json +306 -0
  798. package/src/locale/ko.json +306 -0
  799. package/src/locale/lt.json +306 -0
  800. package/src/locale/lv.json +306 -0
  801. package/src/locale/mi.json +306 -0
  802. package/src/locale/ms.json +306 -0
  803. package/src/locale/nb.json +306 -0
  804. package/src/locale/nl-be.json +306 -0
  805. package/src/locale/nl.json +306 -0
  806. package/src/locale/nn.json +306 -0
  807. package/src/locale/no.json +306 -0
  808. package/src/locale/pl.json +306 -0
  809. package/src/locale/pt-br.json +306 -0
  810. package/src/locale/pt.json +306 -0
  811. package/src/locale/ro.json +306 -0
  812. package/src/locale/ru.json +306 -0
  813. package/src/locale/sk.json +306 -0
  814. package/src/locale/sl.json +306 -0
  815. package/src/locale/sq.json +306 -0
  816. package/src/locale/sr.json +306 -0
  817. package/src/locale/sv.json +306 -0
  818. package/src/locale/th.json +306 -0
  819. package/src/locale/tl.json +306 -0
  820. package/src/locale/tr.json +306 -0
  821. package/src/locale/uk.json +306 -0
  822. package/src/locale/vi.json +306 -0
  823. package/src/locale/zh-hk.json +306 -0
  824. package/src/locale/zh-tw.json +306 -0
  825. package/src/locale/zh.json +306 -0
  826. package/src/locale/zu.json +306 -0
  827. package/src/native/OsanoCmp.ts +32 -0
  828. package/src/services/consent.ts +164 -0
  829. package/src/services/disclosures.ts +25 -0
  830. package/src/services/locale.ts +43 -0
  831. package/src/store.ts +602 -0
  832. package/src/styles.ts +203 -0
  833. package/src/types/consent-config.d.ts +72 -0
  834. package/src/types/env.d.ts +2 -0
  835. package/src/types/index.d.ts +18 -0
  836. package/src/types/store.d.ts +43 -0
  837. package/src/utils/API.ts +47 -0
  838. package/src/utils/Color.ts +127 -0
  839. package/src/utils/EventEmitter.ts +54 -0
  840. package/src/utils/Translator.ts +326 -0
  841. package/src/utils/index.ts +133 -0
  842. package/src/views/Dialog/Buttons.tsx +71 -0
  843. package/src/views/Dialog/FirstLayerUsage.tsx +33 -0
  844. package/src/views/Dialog/Message.tsx +37 -0
  845. package/src/views/Dialog/PreferenceManagementDeepLinks.tsx +33 -0
  846. package/src/views/Dialog/index.tsx +442 -0
  847. package/src/views/Drawer/Drawer.ConsentCategories.tsx +689 -0
  848. package/src/views/Drawer/Drawer.Header.tsx +138 -0
  849. package/src/views/Drawer/Drawer.Iab.Disclosures.tsx +386 -0
  850. package/src/views/Drawer/Drawer.Iab.Vendors.tsx +552 -0
  851. package/src/views/Drawer/index.tsx +294 -0
@@ -0,0 +1,226 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports._clearEventSubscribers = exports._clearAdaptedApis = void 0;
7
+ exports.default = makeApi;
8
+ var _consent = require("./consent");
9
+ var _constants = require("./constants");
10
+ var _constants2 = require("../../constants");
11
+ var _selectors = require("./selectors");
12
+ /**
13
+ * An object that contains the client callback and metadata.
14
+ * @typedef {Object} EventSubscriber
15
+ * @property {number} version - The version of the API that the subscriber is
16
+ * listening to.
17
+ * @property {function} callback - The callback function that the subscriber
18
+ * provided. The signature should match the API version.
19
+ */
20
+
21
+ /**
22
+ * The listener ID is a number that is used to identify a subscriber. It is both
23
+ * a key in the eventSubscribers map and a property that is given back to the
24
+ * subscriber. It must not change for the lifetime of the subscriber.
25
+ * @typedef {number} ListenerId
26
+ */
27
+
28
+ /**
29
+ * A map of listener IDs to event subscribers.
30
+ * @type {Map<ListenerId, EventSubscriber>}
31
+ */
32
+ const eventSubscribers = new Map();
33
+
34
+ // Allows us to clear the event subscribers in tests
35
+ const _clearEventSubscribers = exports._clearEventSubscribers = process.env.NODE_ENV === 'jest' ? () => eventSubscribers.clear() : undefined;
36
+ const createListenerId = () => {
37
+ let inc = 0;
38
+ let listenerId = _constants2.MAX_DATE - Date.now();
39
+ do {
40
+ listenerId -= inc++;
41
+ } while (eventSubscribers.has(listenerId));
42
+ return listenerId;
43
+ };
44
+
45
+ /**
46
+ * Responsible for dispatching events to the subscribers.
47
+ * @param {number} apiVersion - The version of the API as defined by the IAB.
48
+ * @param {object} data - The data to dispatch to the subscribers.
49
+ */
50
+ const makeDispatch = apiVersion => function dispatch(data) {
51
+ eventSubscribers.forEach(({
52
+ version,
53
+ callback
54
+ }, listenerId) => {
55
+ apiVersion === version && callback({
56
+ ...data,
57
+ listenerId
58
+ });
59
+ });
60
+ };
61
+
62
+ /**
63
+ * The GPP has its own API but it can also call the older APIs. This function
64
+ * adapts the newer GPP call signature to the older APIs.
65
+ */
66
+ const adaptedApis = new Map();
67
+
68
+ // Allows us to clear the event subscribers in tests
69
+ const _clearAdaptedApis = exports._clearAdaptedApis = process.env.NODE_ENV === 'jest' ? () => adaptedApis.clear() : undefined;
70
+ const getAdaptedApi = (clientApi, api) => {
71
+ // cache the adapted API so that we aren't creating a new function on every call
72
+ const adaptedApi = adaptedApis.get(clientApi);
73
+ if (adaptedApi) {
74
+ return adaptedApi;
75
+ }
76
+
77
+ // If the API is not available, throw an error. If the requested API is the
78
+ // GPP, throw an error (the GPP should never call itself as a sub-API).
79
+ if (!api || clientApi === 'gpp') {
80
+ throw new Error(`API ${clientApi} is not available`);
81
+ }
82
+ switch (clientApi) {
83
+ // pre-GPP APIs use the signature (command, version, callback, parameter)
84
+ case 'tcfeuv2':
85
+ adaptedApis.set(clientApi, (command, callback, parameter) => api(command, 2, callback, parameter));
86
+ break;
87
+ case 'uspv1':
88
+ adaptedApis.set(clientApi, (command, callback, parameter) => api(command, 1, callback, parameter));
89
+ break;
90
+ default:
91
+ adaptedApis.set(clientApi, api);
92
+ }
93
+ return adaptedApis.get(clientApi);
94
+ };
95
+ function makeApi(initOptions) {
96
+ const formatPingData = (0, _consent.makeFormatPingData)(initOptions);
97
+ const parseConsentString = (0, _consent.makeParseConsentString)(initOptions);
98
+ const makeEventSubscriber = callback => ({
99
+ version: initOptions.version,
100
+ callback
101
+ });
102
+ const eventListenerReturn = (state, eventName, listenerId, data) => ({
103
+ eventName,
104
+ listenerId,
105
+ data,
106
+ pingData: formatPingData(state)
107
+ });
108
+ const dispatch = makeDispatch(initOptions.version);
109
+ function bind(store, allApis) {
110
+ const subApiSubscribers = new Map();
111
+ // The GPP spec says that events dispatched from section APIs should be
112
+ // dispatched from the GPP API. To do that, we'll subscribe to the
113
+ // events from the other APIs and re-dispatch them from here.
114
+ const initDispatchAggregator = () => {
115
+ if (subApiSubscribers.size > 0) {
116
+ // We have already initialized the dispatch aggregator
117
+ return;
118
+ }
119
+ const supportedApis = (0, _selectors.getSupportedApis)(store.getState());
120
+ allApis.forEach((api, section) => {
121
+ if (!supportedApis.includes(section)) {
122
+ return;
123
+ }
124
+ const subscriber = data => {
125
+ // remove our own listener ID from the data object
126
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
127
+ const {
128
+ listenerId,
129
+ ...rest
130
+ } = data;
131
+ dispatch({
132
+ // Other APIs don't currently have event names but if
133
+ // they are added this field should be dot-separated,
134
+ // e.g. `${section}.${data.eventName}`
135
+ eventName: section,
136
+ data: rest,
137
+ pingData: formatPingData(store.getState())
138
+ });
139
+ };
140
+ subApiSubscribers.set(section, subscriber);
141
+ getAdaptedApi(section, api)('addEventListener', subscriber);
142
+ });
143
+ };
144
+ return function gppApi(command, callback, parameter) {
145
+ const state = store.getState();
146
+ switch (command) {
147
+ case 'ping':
148
+ {
149
+ return formatPingData(state);
150
+ }
151
+ case 'addEventListener':
152
+ {
153
+ // We wait to initialize the dispatch aggregator until there
154
+ // is at least one client event listener. Saves a little
155
+ // performance and ensures that all APIs are available.
156
+ initDispatchAggregator();
157
+ const listenerId = createListenerId();
158
+ try {
159
+ if (typeof callback !== 'function') {
160
+ throw new Error('Callback must be a function');
161
+ }
162
+ eventSubscribers.set(listenerId, makeEventSubscriber(callback));
163
+ const returnObject = eventListenerReturn(state, _constants.EventNames.LISTENER_REGISTERED, listenerId, true);
164
+ return returnObject;
165
+ } catch {
166
+ eventSubscribers.delete(listenerId);
167
+ return eventListenerReturn(state, _constants.EventNames.LISTENER_REGISTERED, 0, false);
168
+ }
169
+ }
170
+ case 'removeEventListener':
171
+ {
172
+ const listenerId = parseInt(parameter, 10);
173
+ const removed = eventSubscribers.delete(listenerId);
174
+ return eventListenerReturn(state, _constants.EventNames.LISTENER_REMOVED, listenerId, removed);
175
+ }
176
+ case 'hasSection':
177
+ {
178
+ const section = parameter;
179
+ return (0, _selectors.getSupportedApis)(state).includes(`${section}`);
180
+ }
181
+
182
+ /** Note that this command throws if the requested section
183
+ * doesn't exist. The spec does not define what should happen in
184
+ * this case. Returning nothing could be misleading so an error
185
+ * is clearer. */
186
+ case 'getSection':
187
+ {
188
+ const clientApi = parameter;
189
+ const sectionApi = getAdaptedApi(clientApi, allApis.get(clientApi));
190
+ return sectionApi('getSection');
191
+ }
192
+
193
+ /** Note that as above, this command throws if the requested
194
+ * section does not exist and returns undefined if the field
195
+ * doesn't exist. The spec is again silent on this case. */
196
+ case 'getField':
197
+ {
198
+ const [clientApi, ...fieldPath] = parameter.split('.');
199
+ const sectionApi = getAdaptedApi(clientApi, allApis.get(clientApi));
200
+ return sectionApi('getField', undefined, fieldPath.join('.'));
201
+ }
202
+ case 'getGPPData':
203
+ {
204
+ const gppString = (0, _consent.formatConsentString)(state);
205
+ return gppString ? parseConsentString(gppString, state) : undefined;
206
+ }
207
+ default:
208
+ {
209
+ const mark = command.indexOf('.');
210
+ if (mark < 0) {
211
+ throw new Error(`Invalid command: ${command}`);
212
+ }
213
+ const clientApi = command.substring(0, mark);
214
+ const apiCommand = command.substring(mark + 1);
215
+ const sectionApi = getAdaptedApi(clientApi, allApis.get(clientApi));
216
+ return sectionApi(apiCommand, callback, parameter);
217
+ }
218
+ }
219
+ };
220
+ }
221
+ return {
222
+ bind,
223
+ dispatch
224
+ };
225
+ }
226
+ //# sourceMappingURL=api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_consent","require","_constants","_constants2","_selectors","eventSubscribers","Map","_clearEventSubscribers","exports","process","env","NODE_ENV","clear","undefined","createListenerId","inc","listenerId","MAX_DATE","Date","now","has","makeDispatch","apiVersion","dispatch","data","forEach","version","callback","adaptedApis","_clearAdaptedApis","getAdaptedApi","clientApi","api","adaptedApi","get","Error","set","command","parameter","makeApi","initOptions","formatPingData","makeFormatPingData","parseConsentString","makeParseConsentString","makeEventSubscriber","eventListenerReturn","state","eventName","pingData","bind","store","allApis","subApiSubscribers","initDispatchAggregator","size","supportedApis","getSupportedApis","getState","section","includes","subscriber","rest","gppApi","returnObject","EventNames","LISTENER_REGISTERED","delete","parseInt","removed","LISTENER_REMOVED","sectionApi","fieldPath","split","join","gppString","formatConsentString","mark","indexOf","substring","apiCommand"],"sourceRoot":"../../../../src","sources":["iab/gpp/api.js"],"mappings":";;;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAMA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAMI,gBAAgB,GAAG,IAAIC,GAAG,CAAC,CAAC;;AAElC;AACO,MAAMC,sBAAsB,GAAAC,OAAA,CAAAD,sBAAA,GAClCE,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,MAAM,GAAG,MAAMN,gBAAgB,CAACO,KAAK,CAAC,CAAC,GAAGC,SAAS;AAE7E,MAAMC,gBAAgB,GAAGA,CAAA,KAAM;EAC9B,IAAIC,GAAG,GAAG,CAAC;EACX,IAAIC,UAAU,GAAGC,oBAAQ,GAAGC,IAAI,CAACC,GAAG,CAAC,CAAC;EACtC,GAAG;IACFH,UAAU,IAAID,GAAG,EAAE;EACpB,CAAC,QAAQV,gBAAgB,CAACe,GAAG,CAACJ,UAAU,CAAC;EAEzC,OAAOA,UAAU;AAClB,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,MAAMK,YAAY,GAAGC,UAAU,IAC9B,SAASC,QAAQA,CAACC,IAAI,EAAE;EACvBnB,gBAAgB,CAACoB,OAAO,CAAC,CAAC;IAAEC,OAAO;IAAEC;EAAS,CAAC,EAAEX,UAAU,KAAK;IAC/DM,UAAU,KAAKI,OAAO,IACrBC,QAAQ,CAAC;MACR,GAAGH,IAAI;MACPR;IACD,CAAC,CAAC;EACJ,CAAC,CAAC;AACH,CAAC;;AAEF;AACA;AACA;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AAS,CAAC,CAAC;YACnE,OAAOwC,UAAU,CAACS,UAAU,EAAErD,QAAQ,EAAEW,SAAS,CAAC;UACnD;MACD;IACD,CAAC;EACF;EAEA,OAAO;IACNY,IAAI;IACJ3B;EACD,CAAC;AACF","ignoreList":[]}
@@ -0,0 +1,99 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.makeParseConsentString = exports.makeFormatPingData = exports.isSectionApplicable = exports.formatConsentString = void 0;
7
+ var _constants = require("./constants");
8
+ var _CompressedBase64UrlEncoder = require("./encoders/CompressedBase64UrlEncoder");
9
+ var _selectors = require("./selectors");
10
+ var _FibonacciIntegerRangeEncoder = require("./encoders/FibonacciIntegerRangeEncoder");
11
+ var _constants2 = require("../constants");
12
+ const ERROR_MESSAGE = 'Invalid GPP string';
13
+
14
+ /* A note on the GPP version number: According to the GPP spec, the GPP string's
15
+ * header can only contain an integer version number. However, the API spec for
16
+ * the PingReturn object requires that the GPP version number is in the format
17
+ * Major.Minor (e.g. 1.0). It's not a problem for now but will be interesting if
18
+ * and when they introduce a version 1.1.
19
+ */
20
+ const HEADER_PREFIX = 'DB'; // Section 3 ('D'), GPP v1 ('B')
21
+
22
+ const isSectionApplicable = (sectionId, state) => {
23
+ switch (sectionId) {
24
+ // case 1 is TCF v1 and is unsupported
25
+ case 2:
26
+ // TCF EU v2
27
+ return (0, _selectors.doesGDPRApply)(state);
28
+ // cases 3 and 4 are GPP header and integrity sections and are not applicable
29
+ case 5:
30
+ // TCF CA
31
+ return (0, _selectors.isBrowsingFrom)(state, 'ca');
32
+ case 6:
33
+ // USPrivacy v1
34
+ // case 7: // US National
35
+ return (0, _selectors.isBrowsingFrom)(state, 'us');
36
+ // We do not implement the GPP US-state spec
37
+ // case 8: // US California
38
+ // return isBrowsingFrom(state, 'us-ca');
39
+ // case 9: // US Virginia
40
+ // return isBrowsingFrom(state, 'us-va');
41
+ // case 10: // US Colorado
42
+ // return isBrowsingFrom(state, 'us-co');
43
+ // case 11: // US Utah
44
+ // return isBrowsingFrom(state, 'us-ut');
45
+ // case 12: // US Connecticut
46
+ // return isBrowsingFrom(state, 'us-ct');
47
+ default:
48
+ return false;
49
+ }
50
+ };
51
+ exports.isSectionApplicable = isSectionApplicable;
52
+ const makeFormatPingData = initOptions => state => ({
53
+ gppVersion: initOptions.version,
54
+ // '1.0', see note above
55
+ cmpStatus: _constants.CmpStatusCodes.LOADED,
56
+ cmpDisplayStatus: (0, _selectors.isUiVisible)(state) ? _constants.CmpDisplayStatusCodes.VISIBLE : _constants.CmpDisplayStatusCodes.HIDDEN,
57
+ supportedAPIs: (0, _selectors.getSupportedApis)(state),
58
+ cmpId: _constants2.CMP_ID
59
+ });
60
+ exports.makeFormatPingData = makeFormatPingData;
61
+ const makeParseConsentString = initOptions => (gppString, state) => {
62
+ const [header, ...sections] = gppString.split('~');
63
+
64
+ // All GPPv1 strings must start with 'DB'
65
+ if (header.substring(0, 2) !== HEADER_PREFIX) {
66
+ throw new Error(`${ERROR_MESSAGE}: Invalid header`);
67
+ }
68
+ const expectedSections = (0, _FibonacciIntegerRangeEncoder.decode)((0, _CompressedBase64UrlEncoder.decode)(header.substring(2)));
69
+ if (sections.length !== expectedSections.length) {
70
+ throw new Error(`${ERROR_MESSAGE}: Number of sections does not match header`);
71
+ }
72
+ return {
73
+ sectionId: 3,
74
+ gppVersion: 1,
75
+ // see note above
76
+ sectionList: expectedSections,
77
+ applicableSections: expectedSections.filter(sectionId => isSectionApplicable(sectionId, state)),
78
+ gppString,
79
+ pingData: makeFormatPingData(initOptions)(state)
80
+ };
81
+ };
82
+ exports.makeParseConsentString = makeParseConsentString;
83
+ const formatConsentString = state => {
84
+ const consentStrings = (0, _selectors.getSupportedApis)(state).map(section => ({
85
+ sectionId: _constants.SECTIONS[`${section}`],
86
+ consentString: (0, _selectors.getConsentString)(state, section)
87
+ })).filter(({
88
+ consentString
89
+ }) => consentString !== undefined).sort((a, b) => a.sectionId - b.sectionId);
90
+ const header = `${HEADER_PREFIX}${(0, _CompressedBase64UrlEncoder.encode)((0, _FibonacciIntegerRangeEncoder.encode)(consentStrings.map(({
91
+ sectionId
92
+ }) => sectionId)))}`;
93
+ const sections = [header, ...consentStrings.map(({
94
+ consentString
95
+ }) => consentString)];
96
+ return sections.join('~');
97
+ };
98
+ exports.formatConsentString = formatConsentString;
99
+ //# sourceMappingURL=consent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_constants","require","_CompressedBase64UrlEncoder","_selectors","_FibonacciIntegerRangeEncoder","_constants2","ERROR_MESSAGE","HEADER_PREFIX","isSectionApplicable","sectionId","state","doesGDPRApply","isBrowsingFrom","exports","makeFormatPingData","initOptions","gppVersion","version","cmpStatus","CmpStatusCodes","LOADED","cmpDisplayStatus","isUiVisible","CmpDisplayStatusCodes","VISIBLE","HIDDEN","supportedAPIs","getSupportedApis","cmpId","CMP_ID","makeParseConsentString","gppString","header","sections","split","substring","Error","expectedSections","fibRangeDecode","base64Decode","length","sectionList","applicableSections","filter","pingData","formatConsentString","consentStrings","map","section","SECTIONS","consentString","getConsentString","undefined","sort","a","b","base64Encode","fibRangeEncode","join"],"sourceRoot":"../../../../src","sources":["iab/gpp/consent.js"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,2BAAA,GAAAD,OAAA;AAIA,IAAAE,UAAA,GAAAF,OAAA;AAOA,IAAAG,6BAAA,GAAAH,OAAA;AAKA,IAAAI,WAAA,GAAAJ,OAAA;AAEA,MAAMK,aAAa,GAAG,oBAAoB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,aAAa,GAAG,IAAI,CAAC,CAAC;;AAErB,MAAMC,mBAAmB,GAAGA,CAACC,SAAS,EAAEC,KAAK,KAAK;EACxD,QAAQD,SAAS;IAChB;IACA,KAAK,CAAC;MAAE;MACP,OAAO,IAAAE,wBAAa,EAACD,KAAK,CAAC;IAC5B;IACA,KAAK,CAAC;MAAE;M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BAAA","ignoreList":[]}
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.SECTIONS = exports.EventNames = exports.CmpStatusCodes = exports.CmpDisplayStatusCodes = void 0;
7
+ // Comment-out the sections that we do not implement as they aren't necessary
8
+ // for functionality.
9
+ const SECTIONS = exports.SECTIONS = {
10
+ // tcfeuv1: 1,
11
+ tcfeuv2: 2,
12
+ // GPP header section is ID 3
13
+ // GPP signal integrity section is ID 4
14
+ tcfcav1: 5,
15
+ uspv1: 6
16
+ // usnatv1: 7,
17
+ // uscav1: 8,
18
+ // usvav1: 9,
19
+ // uscov1: 10,
20
+ // usutv1: 11,
21
+ // usctv1: 12,
22
+ };
23
+
24
+ /**
25
+ * GPP's defined CMP status codes
26
+ * @enum {string}
27
+ */
28
+ const CmpStatusCodes = exports.CmpStatusCodes = {
29
+ STUB: 'stub',
30
+ LOADED: 'loaded',
31
+ ERROR: 'error'
32
+ };
33
+
34
+ /**
35
+ * GPP's defined CMP display status codes
36
+ * @enum {string}
37
+ */
38
+ const CmpDisplayStatusCodes = exports.CmpDisplayStatusCodes = {
39
+ VISIBLE: 'visible',
40
+ HIDDEN: 'hidden',
41
+ DISABLED: 'disabled'
42
+ };
43
+
44
+ /**
45
+ * The GPP API's events
46
+ * @enum {string}
47
+ */
48
+ const EventNames = exports.EventNames = {
49
+ LISTENER_REGISTERED: 'listenerRegistered',
50
+ LISTENER_REMOVED: 'listenerRemoved',
51
+ CMP_STATUS_CHANGED: 'cmpStatus',
52
+ CMP_DISPLAY_STATUS_CHANGED: 'cmpDisplayStatus',
53
+ ERROR: 'error',
54
+ SECTION_CHANGED: 'sectionChange'
55
+ };
56
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["SECTIONS","exports","tcfeuv2","tcfcav1","uspv1","CmpStatusCodes","STUB","LOADED","ERROR","CmpDisplayStatusCodes","VISIBLE","HIDDEN","DISABLED","EventNames","LISTENER_REGISTERED","LISTENER_REMOVED","CMP_STATUS_CHANGED","CMP_DISPLAY_STATUS_CHANGED","SECTION_CHANGED"],"sourceRoot":"../../../../src","sources":["iab/gpp/constants.js"],"mappings":";;;;;;AAAA;AACA;AACO,MAAMA,QAAQ,GAAAC,OAAA,CAAAD,QAAA,GAAG;EACvB;EACAE,OAAO,EAAE,CAAC;EACV;EACA;EACAC,OAAO,EAAE,CAAC;EACVC,KAAK,EAAE;EACP;EACA;EACA;EACA;EACA;EACA;AACD,CAAC;;AAED;AACA;AACA;AACA;AACO,MAAMC,cAAc,GAAAJ,OAAA,CAAAI,cAAA,GAAG;EAC7BC,IAAI,EAAE,MAAM;EACZC,MAAM,EAAE,QAAQ;EAChBC,KAAK,EAAE;AACR,CAAC;;AAED;AACA;AACA;AACA;AACO,MAAMC,qBAAqB,GAAAR,OAAA,CAAAQ,qBAAA,GAAG;EACpCC,OAAO,EAAE,SAAS;EAClBC,MAAM,EAAE,QAAQ;EAChBC,QAAQ,EAAE;AACX,CAAC;;AAED;AACA;AACA;AACA;AACO,MAAMC,UAAU,GAAAZ,OAAA,CAAAY,UAAA,GAAG;EACzBC,mBAAmB,EAAE,oBAAoB;EACzCC,gBAAgB,EAAE,iBAAiB;EACnCC,kBAAkB,EAAE,WAAW;EAC/BC,0BAA0B,EAAE,kBAAkB;EAC9CT,KAAK,EAAE,OAAO;EACdU,eAAe,EAAE;AAClB,CAAC","ignoreList":[]}
@@ -0,0 +1,139 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.makeEncode = exports.default = exports.decode = void 0;
7
+ var _errors = require("./errors");
8
+ var _FixedIntegerEncoder = require("./FixedIntegerEncoder");
9
+ /**
10
+ * Adapted from IABTechLab's GPP JavaScript Reference Implementation
11
+ *
12
+ * https://github.com/IABTechLab/iabgpp-es/blob/42060d7ac2b6d0ee70fc1b5bcd33fc447bf5123c/modules/cmpapi/src/encoder/datatype/encoder/AbstractBase64UrlEncoder.ts
13
+ *
14
+ * @license
15
+ * Copyright 2023 IABTechLab
16
+ *
17
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
18
+ * use this file except in compliance with the License. You may obtain a copy of
19
+ * the License at
20
+ *
21
+ * http://www.apache.org/licenses/LICENSE-2.0
22
+ *
23
+ * Unless required by applicable law or agreed to in writing, software
24
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
25
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
26
+ * License for the specific language governing permissions and limitations under
27
+ * the License.
28
+ */
29
+
30
+ /**
31
+ * Base 64 URL character set. Different from standard Base64 char set in that
32
+ * '+' and '/' are replaced with '-' and '_'.
33
+ */
34
+ const DICT = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_';
35
+ // prettier-ignore
36
+ const REVERSE_DICT = Object.freeze({
37
+ 0: 52,
38
+ 1: 53,
39
+ 2: 54,
40
+ 3: 55,
41
+ 4: 56,
42
+ 5: 57,
43
+ 6: 58,
44
+ 7: 59,
45
+ 8: 60,
46
+ 9: 61,
47
+ A: 0,
48
+ B: 1,
49
+ C: 2,
50
+ D: 3,
51
+ E: 4,
52
+ F: 5,
53
+ G: 6,
54
+ H: 7,
55
+ I: 8,
56
+ J: 9,
57
+ K: 10,
58
+ L: 11,
59
+ M: 12,
60
+ N: 13,
61
+ O: 14,
62
+ P: 15,
63
+ Q: 16,
64
+ R: 17,
65
+ S: 18,
66
+ T: 19,
67
+ U: 20,
68
+ V: 21,
69
+ W: 22,
70
+ X: 23,
71
+ Y: 24,
72
+ Z: 25,
73
+ a: 26,
74
+ b: 27,
75
+ c: 28,
76
+ d: 29,
77
+ e: 30,
78
+ f: 31,
79
+ g: 32,
80
+ h: 33,
81
+ i: 34,
82
+ j: 35,
83
+ k: 36,
84
+ l: 37,
85
+ m: 38,
86
+ n: 39,
87
+ o: 40,
88
+ p: 41,
89
+ q: 42,
90
+ r: 43,
91
+ s: 44,
92
+ t: 45,
93
+ u: 46,
94
+ v: 47,
95
+ w: 48,
96
+ x: 49,
97
+ y: 50,
98
+ z: 51,
99
+ '-': 62,
100
+ _: 63
101
+ });
102
+ const makeEncode = pad => bitString => {
103
+ // should only be 0 or 1
104
+ if (!/^[01]*$/.test(bitString)) {
105
+ throw new _errors.InvalidBitStringError(bitString);
106
+ }
107
+ bitString = pad(bitString);
108
+ let str = '';
109
+ let index = 0;
110
+ while (index <= bitString.length - 6) {
111
+ const s = bitString.substring(index, index + 6);
112
+ const n = (0, _FixedIntegerEncoder.decode)(s);
113
+ const c = DICT.charAt(n);
114
+ str += c;
115
+ index += 6;
116
+ }
117
+ return str;
118
+ };
119
+ exports.makeEncode = makeEncode;
120
+ const decode = str => {
121
+ // should contain only characters from the base64url set
122
+ if (!/^[A-Za-z0-9\-_]*$/.test(str)) {
123
+ throw new _errors.InvalidBase64UrlError(str);
124
+ }
125
+ let bitString = '';
126
+ for (let i = 0; i < str.length; i++) {
127
+ const c = str.charAt(i);
128
+ const n = REVERSE_DICT[`${c}`];
129
+ const s = (0, _FixedIntegerEncoder.encode)(n, 6);
130
+ bitString += s;
131
+ }
132
+ return bitString;
133
+ };
134
+ exports.decode = decode;
135
+ var _default = exports.default = {
136
+ decode,
137
+ makeEncode
138
+ };
139
+ //# sourceMappingURL=AbstractBase64UrlEncoder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_errors","require","_FixedIntegerEncoder","DICT","REVERSE_DICT","Object","freeze","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","_","makeEncode","pad","bitString","test","InvalidBitStringError","str","index","length","substring","intDecode","charAt","exports","decode","InvalidBase64UrlError","intEncode","_default","default"],"sourceRoot":"../../../../../src","sources":["iab/gpp/encoders/AbstractBase64UrlEncoder.ts"],"mappings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CAAC;IACxBmB,GAAG,IAAI9B,CAAC;IAER+B,KAAK,IAAI,CAAC;EACX;EAEA,OAAOD,GAAG;AACX,CAAC;AAACM,OAAA,CAAAX,UAAA,GAAAA,UAAA;AAEI,MAAMY,MAAM,GAAIP,GAAW,IAAK;EACtC;EACA,IAAI,CAAC,mBAAmB,CAACF,IAAI,CAACE,GAAG,CAAC,EAAE;IACnC,MAAM,IAAIQ,6BAAqB,CAACR,GAAG,CAAC;EACrC;EAEA,IAAIH,SAAS,GAAG,EAAE;EAElB,KAAK,IAAIrB,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGwB,GAAG,CAACE,MAAM,EAAE1B,CAAC,EAAE,EAAE;IACpC,MAAMN,CAAC,GAAG8B,GAAG,CAACK,MAAM,CAAC7B,CAAC,CAAC;IAEvB,MAAMK,CAAC,GAAG1C,YAAY,CAAE,GAAE+B,CAAE,EAAC,CAAE;IAC/B,MAAMgB,CAAC,GAAG,IAAAuB,2BAAS,EAAC5B,CAAC,EAAE,CAAC,CAAC;IACzBgB,SAAS,IAAIX,CAAC;EACf;EAEA,OAAOW,SAAS;AACjB,CAAC;AAACS,OAAA,CAAAC,MAAA,GAAAA,MAAA;AAAA,IAAAG,QAAA,GAAAJ,OAAA,CAAAK,OAAA,GAEa;EACdJ,MAAM;EACNZ;AACD,CAAC","ignoreList":[]}
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.encode = exports.default = exports.decode = void 0;
7
+ /**
8
+ * Adapted from IABTechLab's GPP JavaScript Reference Implementation
9
+ *
10
+ * https://github.com/IABTechLab/iabgpp-es/blob/42060d7ac2b6d0ee70fc1b5bcd33fc447bf5123c/modules/cmpapi/src/encoder/datatype/encoder/BooleanEncoder.ts
11
+ *
12
+ * @license
13
+ * Copyright 2023 IABTechLab
14
+ *
15
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
16
+ * use this file except in compliance with the License. You may obtain a copy of
17
+ * the License at
18
+ *
19
+ * http://www.apache.org/licenses/LICENSE-2.0
20
+ *
21
+ * Unless required by applicable law or agreed to in writing, software
22
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
23
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
24
+ * License for the specific language governing permissions and limitations under
25
+ * the License.
26
+ */
27
+
28
+ /**
29
+ * encode a TCString boolean
30
+ */
31
+ const encode = bool => {
32
+ return bool ? '1' : '0';
33
+ };
34
+ /**
35
+ * decode a TCString boolean
36
+ */
37
+ exports.encode = encode;
38
+ const decode = bitString => {
39
+ // fewer operations than !!parseInt(value, 2)
40
+ return bitString === '1';
41
+ };
42
+ exports.decode = decode;
43
+ var _default = exports.default = {
44
+ decode,
45
+ encode
46
+ };
47
+ //# sourceMappingURL=BooleanEncoder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["encode","bool","exports","decode","bitString","_default","default"],"sourceRoot":"../../../../../src","sources":["iab/gpp/encoders/BooleanEncoder.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACO,MAAMA,MAAM,GAAIC,IAAa,IAAK;EACxC,OAAOA,IAAI,GAAG,GAAG,GAAG,GAAG;AACxB,CAAC;AACD;AACA;AACA;AAFAC,OAAA,CAAAF,MAAA,GAAAA,MAAA;AAGO,MAAMG,MAAM,GAAIC,SAAiB,IAAK;EAC5C;EACA,OAAOA,SAAS,KAAK,GAAG;AACzB,CAAC;AAACF,OAAA,CAAAC,MAAA,GAAAA,MAAA;AAAA,IAAAE,QAAA,GAAAH,OAAA,CAAAI,OAAA,GAEa;EACdH,MAAM;EACNH;AACD,CAAC","ignoreList":[]}
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "decode", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _AbstractBase64UrlEncoder.decode;
10
+ }
11
+ });
12
+ exports.encode = exports.default = void 0;
13
+ var _AbstractBase64UrlEncoder = require("./AbstractBase64UrlEncoder");
14
+ /**
15
+ * Adapted from IABTechLab's GPP JavaScript Reference Implementation
16
+ *
17
+ * https://github.com/IABTechLab/iabgpp-es/blob/42060d7ac2b6d0ee70fc1b5bcd33fc447bf5123c/modules/cmpapi/src/encoder/datatype/encoder/CompressedBase64UrlEncoder.ts
18
+ *
19
+ * @license
20
+ * Copyright 2023 IABTechLab
21
+ *
22
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
23
+ * use this file except in compliance with the License. You may obtain a copy of
24
+ * the License at
25
+ *
26
+ * http://www.apache.org/licenses/LICENSE-2.0
27
+ *
28
+ * Unless required by applicable law or agreed to in writing, software
29
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
30
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
31
+ * License for the specific language governing permissions and limitations under
32
+ * the License.
33
+ */
34
+
35
+ const pad = bitString => {
36
+ while (bitString.length % 8 > 0) {
37
+ bitString += '0';
38
+ }
39
+ while (bitString.length % 6 > 0) {
40
+ bitString += '0';
41
+ }
42
+ return bitString;
43
+ };
44
+ const encode = exports.encode = (0, _AbstractBase64UrlEncoder.makeEncode)(pad);
45
+ var _default = exports.default = {
46
+ decode: _AbstractBase64UrlEncoder.decode,
47
+ encode
48
+ };
49
+ //# sourceMappingURL=CompressedBase64UrlEncoder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_AbstractBase64UrlEncoder","require","pad","bitString","length","encode","exports","makeEncode","_default","default","decode"],"sourceRoot":"../../../../../src","sources":["iab/gpp/encoders/CompressedBase64UrlEncoder.ts"],"mappings":";;;;;;;;;;;;AAqBA,IAAAA,yBAAA,GAAAC,OAAA;AArBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,MAAMC,GAAG,GAAIC,SAAiB,IAAK;EAClC,OAAOA,SAAS,CAACC,MAAM,GAAG,CAAC,GAAG,CAAC,EAAE;IAChCD,SAAS,IAAI,GAAG;EACjB;EACA,OAAOA,SAAS,CAACC,MAAM,GAAG,CAAC,GAAG,CAAC,EAAE;IAChCD,SAAS,IAAI,GAAG;EACjB;EACA,OAAOA,SAAS;AACjB,CAAC;AAEM,MAAME,MAAM,GAAAC,OAAA,CAAAD,MAAA,GAAG,IAAAE,oCAAU,EAACL,GAAG,CAAC;AAAC,IAAAM,QAAA,GAAAF,OAAA,CAAAG,OAAA,GAIvB;EACdC,MAAM,EAANA,gCAAM;EACNL;AACD,CAAC","ignoreList":[]}