@ndustrial/contxt-sdk 5.5.7 → 5.6.1

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 (230) hide show
  1. package/.nvmrc +1 -1
  2. package/eslint.config.mjs +44 -0
  3. package/esm/bus/channels.js +1883 -216
  4. package/esm/bus/channels.js.map +1 -1
  5. package/esm/bus/index.browser.js +218 -37
  6. package/esm/bus/index.browser.js.map +1 -1
  7. package/esm/bus/index.js +906 -94
  8. package/esm/bus/index.js.map +1 -1
  9. package/esm/bus/webSocketConnection.browser.js +86 -12
  10. package/esm/bus/webSocketConnection.browser.js.map +1 -1
  11. package/esm/bus/webSocketConnection.js +2464 -332
  12. package/esm/bus/webSocketConnection.js.map +1 -1
  13. package/esm/config/audiences.js +37 -1
  14. package/esm/config/audiences.js.map +1 -1
  15. package/esm/config/defaults.js +37 -1
  16. package/esm/config/defaults.js.map +1 -1
  17. package/esm/config/index.js +1622 -203
  18. package/esm/config/index.js.map +1 -1
  19. package/esm/coordinator/applications.js +1019 -172
  20. package/esm/coordinator/applications.js.map +1 -1
  21. package/esm/coordinator/consent.js +603 -76
  22. package/esm/coordinator/consent.js.map +1 -1
  23. package/esm/coordinator/edgeNodes.js +520 -40
  24. package/esm/coordinator/edgeNodes.js.map +1 -1
  25. package/esm/coordinator/index.js +811 -54
  26. package/esm/coordinator/index.js.map +1 -1
  27. package/esm/coordinator/organizations.js +533 -60
  28. package/esm/coordinator/organizations.js.map +1 -1
  29. package/esm/coordinator/permissions.js +914 -107
  30. package/esm/coordinator/permissions.js.map +1 -1
  31. package/esm/coordinator/roles.js +2146 -258
  32. package/esm/coordinator/roles.js.map +1 -1
  33. package/esm/coordinator/users.js +3427 -484
  34. package/esm/coordinator/users.js.map +1 -1
  35. package/esm/events/index.js +2301 -393
  36. package/esm/events/index.js.map +1 -1
  37. package/esm/files/index.js +2053 -410
  38. package/esm/files/index.js.map +1 -1
  39. package/esm/index.js +1002 -148
  40. package/esm/index.js.map +1 -1
  41. package/esm/iot/feedTypes.js +188 -25
  42. package/esm/iot/feedTypes.js.map +1 -1
  43. package/esm/iot/feeds.js +420 -59
  44. package/esm/iot/feeds.js.map +1 -1
  45. package/esm/iot/fieldCategories.js +1172 -195
  46. package/esm/iot/fieldCategories.js.map +1 -1
  47. package/esm/iot/fieldGroupings.js +1689 -255
  48. package/esm/iot/fieldGroupings.js.map +1 -1
  49. package/esm/iot/fields.js +254 -28
  50. package/esm/iot/fields.js.map +1 -1
  51. package/esm/iot/index.js +212 -34
  52. package/esm/iot/index.js.map +1 -1
  53. package/esm/iot/outputs.js +320 -31
  54. package/esm/iot/outputs.js.map +1 -1
  55. package/esm/nionic/index.js +1097 -97
  56. package/esm/nionic/index.js.map +1 -1
  57. package/esm/request.js +1313 -219
  58. package/esm/request.js.map +1 -1
  59. package/esm/sessionTypes/auth0WebAuth.js +3395 -409
  60. package/esm/sessionTypes/auth0WebAuth.js.map +1 -1
  61. package/esm/sessionTypes/index.js +213 -22
  62. package/esm/sessionTypes/index.js.map +1 -1
  63. package/esm/sessionTypes/machineAuth.js +1314 -144
  64. package/esm/sessionTypes/machineAuth.js.map +1 -1
  65. package/esm/sessionTypes/passwordGrantAuth.js +1060 -145
  66. package/esm/sessionTypes/passwordGrantAuth.js.map +1 -1
  67. package/esm/utils/events/formatEventUpdateToServer.js +107 -4
  68. package/esm/utils/events/formatEventUpdateToServer.js.map +1 -1
  69. package/esm/utils/events/index.js +54 -2
  70. package/esm/utils/events/index.js.map +1 -1
  71. package/esm/utils/iot/formatOutputFieldDataFromServer.js +227 -14
  72. package/esm/utils/iot/formatOutputFieldDataFromServer.js.map +1 -1
  73. package/esm/utils/iot/index.js +56 -3
  74. package/esm/utils/iot/index.js.map +1 -1
  75. package/esm/utils/iot/parseOutputFieldNextPageUrlMetadata.js +207 -7
  76. package/esm/utils/iot/parseOutputFieldNextPageUrlMetadata.js.map +1 -1
  77. package/esm/utils/objects/createCaseChangeFn.js +449 -18
  78. package/esm/utils/objects/createCaseChangeFn.js.map +1 -1
  79. package/esm/utils/objects/index.js +56 -3
  80. package/esm/utils/objects/index.js.map +1 -1
  81. package/esm/utils/objects/map.js +520 -26
  82. package/esm/utils/objects/map.js.map +1 -1
  83. package/esm/utils/objects/toCamelCase.js +39 -3
  84. package/esm/utils/objects/toCamelCase.js.map +1 -1
  85. package/esm/utils/objects/toSnakeCase.js +39 -3
  86. package/esm/utils/objects/toSnakeCase.js.map +1 -1
  87. package/esm/utils/pagination/formatPaginatedDataFromServer.js +268 -11
  88. package/esm/utils/pagination/formatPaginatedDataFromServer.js.map +1 -1
  89. package/esm/utils/pagination/index.js +54 -2
  90. package/esm/utils/pagination/index.js.map +1 -1
  91. package/esm/utils/url/index.js +47 -2
  92. package/esm/utils/url/index.js.map +1 -1
  93. package/esm/utils/url/stringifyParams.js +176 -10
  94. package/esm/utils/url/stringifyParams.js.map +1 -1
  95. package/lib/bus/channels.js +1880 -223
  96. package/lib/bus/channels.js.map +1 -1
  97. package/lib/bus/index.browser.js +215 -43
  98. package/lib/bus/index.browser.js.map +1 -1
  99. package/lib/bus/index.js +903 -106
  100. package/lib/bus/index.js.map +1 -1
  101. package/lib/bus/webSocketConnection.browser.js +83 -15
  102. package/lib/bus/webSocketConnection.browser.js.map +1 -1
  103. package/lib/bus/webSocketConnection.js +2461 -339
  104. package/lib/bus/webSocketConnection.js.map +1 -1
  105. package/lib/config/audiences.js +33 -2
  106. package/lib/config/audiences.js.map +1 -1
  107. package/lib/config/defaults.js +33 -2
  108. package/lib/config/defaults.js.map +1 -1
  109. package/lib/config/index.js +1619 -212
  110. package/lib/config/index.js.map +1 -1
  111. package/lib/coordinator/applications.js +1016 -174
  112. package/lib/coordinator/applications.js.map +1 -1
  113. package/lib/coordinator/consent.js +600 -78
  114. package/lib/coordinator/consent.js.map +1 -1
  115. package/lib/coordinator/edgeNodes.js +517 -42
  116. package/lib/coordinator/edgeNodes.js.map +1 -1
  117. package/lib/coordinator/index.js +808 -78
  118. package/lib/coordinator/index.js.map +1 -1
  119. package/lib/coordinator/organizations.js +530 -62
  120. package/lib/coordinator/organizations.js.map +1 -1
  121. package/lib/coordinator/permissions.js +911 -109
  122. package/lib/coordinator/permissions.js.map +1 -1
  123. package/lib/coordinator/roles.js +2143 -260
  124. package/lib/coordinator/roles.js.map +1 -1
  125. package/lib/coordinator/users.js +3423 -489
  126. package/lib/coordinator/users.js.map +1 -1
  127. package/lib/events/index.js +2297 -404
  128. package/lib/events/index.js.map +1 -1
  129. package/lib/files/index.js +2050 -418
  130. package/lib/files/index.js.map +1 -1
  131. package/lib/index.js +999 -183
  132. package/lib/index.js.map +1 -1
  133. package/lib/iot/feedTypes.js +185 -27
  134. package/lib/iot/feedTypes.js.map +1 -1
  135. package/lib/iot/feeds.js +417 -61
  136. package/lib/iot/feeds.js.map +1 -1
  137. package/lib/iot/fieldCategories.js +1169 -203
  138. package/lib/iot/fieldCategories.js.map +1 -1
  139. package/lib/iot/fieldGroupings.js +1686 -263
  140. package/lib/iot/fieldGroupings.js.map +1 -1
  141. package/lib/iot/fields.js +251 -30
  142. package/lib/iot/fields.js.map +1 -1
  143. package/lib/iot/index.js +209 -55
  144. package/lib/iot/index.js.map +1 -1
  145. package/lib/iot/outputs.js +317 -34
  146. package/lib/iot/outputs.js.map +1 -1
  147. package/lib/nionic/index.js +1094 -98
  148. package/lib/nionic/index.js.map +1 -1
  149. package/lib/request.js +1310 -226
  150. package/lib/request.js.map +1 -1
  151. package/lib/sessionTypes/auth0WebAuth.js +3391 -421
  152. package/lib/sessionTypes/auth0WebAuth.js.map +1 -1
  153. package/lib/sessionTypes/index.js +209 -26
  154. package/lib/sessionTypes/index.js.map +1 -1
  155. package/lib/sessionTypes/machineAuth.js +1311 -151
  156. package/lib/sessionTypes/machineAuth.js.map +1 -1
  157. package/lib/sessionTypes/passwordGrantAuth.js +1057 -156
  158. package/lib/sessionTypes/passwordGrantAuth.js.map +1 -1
  159. package/lib/utils/events/formatEventUpdateToServer.js +102 -4
  160. package/lib/utils/events/formatEventUpdateToServer.js.map +1 -1
  161. package/lib/utils/events/index.js +51 -10
  162. package/lib/utils/events/index.js.map +1 -1
  163. package/lib/utils/iot/formatOutputFieldDataFromServer.js +224 -18
  164. package/lib/utils/iot/formatOutputFieldDataFromServer.js.map +1 -1
  165. package/lib/utils/iot/index.js +53 -15
  166. package/lib/utils/iot/index.js.map +1 -1
  167. package/lib/utils/iot/parseOutputFieldNextPageUrlMetadata.js +203 -13
  168. package/lib/utils/iot/parseOutputFieldNextPageUrlMetadata.js.map +1 -1
  169. package/lib/utils/objects/createCaseChangeFn.js +446 -25
  170. package/lib/utils/objects/createCaseChangeFn.js.map +1 -1
  171. package/lib/utils/objects/index.js +53 -15
  172. package/lib/utils/objects/index.js.map +1 -1
  173. package/lib/utils/objects/map.js +517 -33
  174. package/lib/utils/objects/map.js.map +1 -1
  175. package/lib/utils/objects/toCamelCase.js +36 -11
  176. package/lib/utils/objects/toCamelCase.js.map +1 -1
  177. package/lib/utils/objects/toSnakeCase.js +36 -11
  178. package/lib/utils/objects/toSnakeCase.js.map +1 -1
  179. package/lib/utils/pagination/formatPaginatedDataFromServer.js +265 -14
  180. package/lib/utils/pagination/formatPaginatedDataFromServer.js.map +1 -1
  181. package/lib/utils/pagination/index.js +51 -10
  182. package/lib/utils/pagination/index.js.map +1 -1
  183. package/lib/utils/url/index.js +44 -7
  184. package/lib/utils/url/index.js.map +1 -1
  185. package/lib/utils/url/stringifyParams.js +172 -18
  186. package/lib/utils/url/stringifyParams.js.map +1 -1
  187. package/package.json +32 -36
  188. package/src/bus/channels.js +6 -6
  189. package/src/bus/channels.spec.js +1 -1
  190. package/src/coordinator/applications.js +7 -7
  191. package/src/coordinator/applications.spec.js +1 -1
  192. package/src/coordinator/consent.js +3 -3
  193. package/src/coordinator/edgeNodes.js +3 -3
  194. package/src/coordinator/edgeNodes.spec.js +1 -1
  195. package/src/coordinator/organizations.js +4 -4
  196. package/src/coordinator/organizations.spec.js +1 -1
  197. package/src/coordinator/permissions.js +6 -6
  198. package/src/coordinator/permissions.spec.js +1 -1
  199. package/src/coordinator/roles.js +9 -9
  200. package/src/coordinator/roles.spec.js +1 -1
  201. package/src/coordinator/users.js +13 -13
  202. package/src/coordinator/users.spec.js +294 -294
  203. package/src/events/index.js +18 -18
  204. package/src/events/index.spec.js +3 -3
  205. package/src/files/index.js +9 -9
  206. package/src/files/index.spec.js +2 -2
  207. package/src/index.js +3 -1
  208. package/src/iot/feedTypes.js +2 -2
  209. package/src/iot/feeds.js +4 -4
  210. package/src/iot/feeds.spec.js +1 -1
  211. package/src/iot/fieldCategories.js +10 -10
  212. package/src/iot/fieldCategories.spec.js +2 -2
  213. package/src/iot/fieldGroupings.js +10 -10
  214. package/src/iot/fieldGroupings.spec.js +2 -2
  215. package/src/iot/fields.js +2 -2
  216. package/src/iot/fields.spec.js +1 -1
  217. package/src/iot/outputs.js +2 -2
  218. package/src/iot/outputs.spec.js +1 -1
  219. package/src/sessionTypes/auth0WebAuth.spec.js +1 -1
  220. package/src/utils/events/index.js +2 -1
  221. package/src/utils/iot/formatOutputFieldDataFromServer.js +5 -5
  222. package/src/utils/iot/formatOutputFieldDataFromServer.spec.js +2 -2
  223. package/src/utils/iot/index.js +2 -1
  224. package/src/utils/iot/parseOutputFieldNextPageUrlMetadata.js +3 -1
  225. package/src/utils/objects/index.js +2 -1
  226. package/src/utils/pagination/formatPaginatedDataFromServer.js +3 -3
  227. package/src/utils/pagination/formatPaginatedDataFromServer.spec.js +1 -1
  228. package/src/utils/pagination/index.js +2 -1
  229. package/support/mocharc.yml +1 -1
  230. package/.eslintrc +0 -24
@@ -1,27 +1,1404 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
+ require("core-js/modules/es.object.get-own-property-descriptors.js");
4
+ require("core-js/modules/esnext.iterator.for-each.js");
3
5
  Object.defineProperty(exports, "__esModule", {
4
6
  value: true
5
7
  });
6
-
7
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
8
-
9
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
10
-
11
- var _audiences = require('./audiences');
12
-
13
- var _audiences2 = _interopRequireDefault(_audiences);
14
-
15
- var _defaults = require('./defaults');
16
-
17
- var _defaults2 = _interopRequireDefault(_defaults);
18
-
19
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
20
-
21
- function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
22
-
23
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
24
-
8
+ exports.default = void 0;
9
+ require("core-js/modules/es.array.filter.js");
10
+ require("core-js/modules/es.array.index-of.js");
11
+ require("core-js/modules/es.array.iterator.js");
12
+ require("core-js/modules/esnext.iterator.constructor.js");
13
+ require("core-js/modules/esnext.iterator.filter.js");
14
+ require("core-js/modules/esnext.iterator.reduce.js");
15
+ var _audiences = _interopRequireDefault(require("./audiences"));
16
+ var _defaults = _interopRequireDefault(require("./defaults"));
17
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
18
+ function cov_1n1bb4mnsz() {
19
+ var path = "/home/runner/work/contxt-sdk-js/contxt-sdk-js/src/config/index.js";
20
+ var hash = "e2e1bec209d833852fd33c484710a2590a9a6d81";
21
+ var global = new Function("return this")();
22
+ var gcv = "__coverage__";
23
+ var coverageData = {
24
+ path: "/home/runner/work/contxt-sdk-js/contxt-sdk-js/src/config/index.js",
25
+ statementMap: {
26
+ "0": {
27
+ start: {
28
+ line: 99,
29
+ column: 4
30
+ },
31
+ end: {
32
+ line: 99,
33
+ column: 36
34
+ }
35
+ },
36
+ "1": {
37
+ start: {
38
+ line: 101,
39
+ column: 4
40
+ },
41
+ end: {
42
+ line: 101,
43
+ column: 36
44
+ }
45
+ },
46
+ "2": {
47
+ start: {
48
+ line: 102,
49
+ column: 4
50
+ },
51
+ end: {
52
+ line: 102,
53
+ column: 33
54
+ }
55
+ },
56
+ "3": {
57
+ start: {
58
+ line: 104,
59
+ column: 4
60
+ },
61
+ end: {
62
+ line: 108,
63
+ column: 7
64
+ }
65
+ },
66
+ "4": {
67
+ start: {
68
+ line: 110,
69
+ column: 4
70
+ },
71
+ end: {
72
+ line: 113,
73
+ column: 6
74
+ }
75
+ },
76
+ "5": {
77
+ start: {
78
+ line: 115,
79
+ column: 4
80
+ },
81
+ end: {
82
+ line: 118,
83
+ column: 6
84
+ }
85
+ },
86
+ "6": {
87
+ start: {
88
+ line: 120,
89
+ column: 4
90
+ },
91
+ end: {
92
+ line: 123,
93
+ column: 6
94
+ }
95
+ },
96
+ "7": {
97
+ start: {
98
+ line: 127,
99
+ column: 4
100
+ },
101
+ end: {
102
+ line: 131,
103
+ column: 5
104
+ }
105
+ },
106
+ "8": {
107
+ start: {
108
+ line: 128,
109
+ column: 6
110
+ },
111
+ end: {
112
+ line: 130,
113
+ column: 8
114
+ }
115
+ },
116
+ "9": {
117
+ start: {
118
+ line: 133,
119
+ column: 4
120
+ },
121
+ end: {
122
+ line: 137,
123
+ column: 5
124
+ }
125
+ },
126
+ "10": {
127
+ start: {
128
+ line: 134,
129
+ column: 6
130
+ },
131
+ end: {
132
+ line: 136,
133
+ column: 8
134
+ }
135
+ },
136
+ "11": {
137
+ start: {
138
+ line: 139,
139
+ column: 4
140
+ },
141
+ end: {
142
+ line: 139,
143
+ column: 79
144
+ }
145
+ },
146
+ "12": {
147
+ start: {
148
+ line: 141,
149
+ column: 4
150
+ },
151
+ end: {
152
+ line: 143,
153
+ column: 5
154
+ }
155
+ },
156
+ "13": {
157
+ start: {
158
+ line: 142,
159
+ column: 6
160
+ },
161
+ end: {
162
+ line: 142,
163
+ column: 75
164
+ }
165
+ },
166
+ "14": {
167
+ start: {
168
+ line: 145,
169
+ column: 4
170
+ },
171
+ end: {
172
+ line: 148,
173
+ column: 6
174
+ }
175
+ },
176
+ "15": {
177
+ start: {
178
+ line: 152,
179
+ column: 4
180
+ },
181
+ end: {
182
+ line: 154,
183
+ column: 5
184
+ }
185
+ },
186
+ "16": {
187
+ start: {
188
+ line: 153,
189
+ column: 6
190
+ },
191
+ end: {
192
+ line: 153,
193
+ column: 65
194
+ }
195
+ },
196
+ "17": {
197
+ start: {
198
+ line: 156,
199
+ column: 4
200
+ },
201
+ end: {
202
+ line: 156,
203
+ column: 73
204
+ }
205
+ },
206
+ "18": {
207
+ start: {
208
+ line: 158,
209
+ column: 4
210
+ },
211
+ end: {
212
+ line: 158,
213
+ column: 49
214
+ }
215
+ },
216
+ "19": {
217
+ start: {
218
+ line: 159,
219
+ column: 4
220
+ },
221
+ end: {
222
+ line: 161,
223
+ column: 6
224
+ }
225
+ },
226
+ "20": {
227
+ start: {
228
+ line: 160,
229
+ column: 16
230
+ },
231
+ end: {
232
+ line: 160,
233
+ column: 37
234
+ }
235
+ },
236
+ "21": {
237
+ start: {
238
+ line: 177,
239
+ column: 4
240
+ },
241
+ end: {
242
+ line: 194,
243
+ column: 5
244
+ }
245
+ },
246
+ "22": {
247
+ start: {
248
+ line: 178,
249
+ column: 23
250
+ },
251
+ end: {
252
+ line: 181,
253
+ column: 7
254
+ }
255
+ },
256
+ "23": {
257
+ start: {
258
+ line: 183,
259
+ column: 6
260
+ },
261
+ end: {
262
+ line: 185,
263
+ column: 7
264
+ }
265
+ },
266
+ "24": {
267
+ start: {
268
+ line: 184,
269
+ column: 8
270
+ },
271
+ end: {
272
+ line: 184,
273
+ column: 46
274
+ }
275
+ },
276
+ "25": {
277
+ start: {
278
+ line: 187,
279
+ column: 6
280
+ },
281
+ end: {
282
+ line: 187,
283
+ column: 22
284
+ }
285
+ },
286
+ "26": {
287
+ start: {
288
+ line: 188,
289
+ column: 11
290
+ },
291
+ end: {
292
+ line: 194,
293
+ column: 5
294
+ }
295
+ },
296
+ "27": {
297
+ start: {
298
+ line: 189,
299
+ column: 6
300
+ },
301
+ end: {
302
+ line: 189,
303
+ column: 35
304
+ }
305
+ },
306
+ "28": {
307
+ start: {
308
+ line: 191,
309
+ column: 6
310
+ },
311
+ end: {
312
+ line: 193,
313
+ column: 8
314
+ }
315
+ },
316
+ "29": {
317
+ start: {
318
+ line: 217,
319
+ column: 8
320
+ },
321
+ end: {
322
+ line: 217,
323
+ column: 15
324
+ }
325
+ },
326
+ "30": {
327
+ start: {
328
+ line: 219,
329
+ column: 4
330
+ },
331
+ end: {
332
+ line: 226,
333
+ column: 6
334
+ }
335
+ },
336
+ "31": {
337
+ start: {
338
+ line: 242,
339
+ column: 4
340
+ },
341
+ end: {
342
+ line: 260,
343
+ column: 11
344
+ }
345
+ },
346
+ "32": {
347
+ start: {
348
+ line: 243,
349
+ column: 23
350
+ },
351
+ end: {
352
+ line: 243,
353
+ column: 52
354
+ }
355
+ },
356
+ "33": {
357
+ start: {
358
+ line: 244,
359
+ column: 19
360
+ },
361
+ end: {
362
+ line: 244,
363
+ column: 44
364
+ }
365
+ },
366
+ "34": {
367
+ start: {
368
+ line: 245,
369
+ column: 26
370
+ },
371
+ end: {
372
+ line: 245,
373
+ column: 57
374
+ }
375
+ },
376
+ "35": {
377
+ start: {
378
+ line: 246,
379
+ column: 22
380
+ },
381
+ end: {
382
+ line: 246,
383
+ column: 45
384
+ }
385
+ },
386
+ "36": {
387
+ start: {
388
+ line: 248,
389
+ column: 6
390
+ },
391
+ end: {
392
+ line: 252,
393
+ column: 7
394
+ }
395
+ },
396
+ "37": {
397
+ start: {
398
+ line: 249,
399
+ column: 8
400
+ },
401
+ end: {
402
+ line: 251,
403
+ column: 10
404
+ }
405
+ },
406
+ "38": {
407
+ start: {
408
+ line: 254,
409
+ column: 6
410
+ },
411
+ end: {
412
+ line: 257,
413
+ column: 8
414
+ }
415
+ },
416
+ "39": {
417
+ start: {
418
+ line: 259,
419
+ column: 6
420
+ },
421
+ end: {
422
+ line: 259,
423
+ column: 18
424
+ }
425
+ },
426
+ "40": {
427
+ start: {
428
+ line: 278,
429
+ column: 4
430
+ },
431
+ end: {
432
+ line: 292,
433
+ column: 11
434
+ }
435
+ },
436
+ "41": {
437
+ start: {
438
+ line: 279,
439
+ column: 33
440
+ },
441
+ end: {
442
+ line: 279,
443
+ column: 57
444
+ }
445
+ },
446
+ "42": {
447
+ start: {
448
+ line: 280,
449
+ column: 30
450
+ },
451
+ end: {
452
+ line: 280,
453
+ column: 44
454
+ }
455
+ },
456
+ "43": {
457
+ start: {
458
+ line: 282,
459
+ column: 6
460
+ },
461
+ end: {
462
+ line: 289,
463
+ column: 7
464
+ }
465
+ },
466
+ "44": {
467
+ start: {
468
+ line: 283,
469
+ column: 8
470
+ },
471
+ end: {
472
+ line: 286,
473
+ column: 10
474
+ }
475
+ },
476
+ "45": {
477
+ start: {
478
+ line: 288,
479
+ column: 8
480
+ },
481
+ end: {
482
+ line: 288,
483
+ column: 41
484
+ }
485
+ },
486
+ "46": {
487
+ start: {
488
+ line: 291,
489
+ column: 6
490
+ },
491
+ end: {
492
+ line: 291,
493
+ column: 18
494
+ }
495
+ }
496
+ },
497
+ fnMap: {
498
+ "0": {
499
+ name: "(anonymous_0)",
500
+ decl: {
501
+ start: {
502
+ line: 98,
503
+ column: 2
504
+ },
505
+ end: {
506
+ line: 98,
507
+ column: 3
508
+ }
509
+ },
510
+ loc: {
511
+ start: {
512
+ line: 98,
513
+ column: 43
514
+ },
515
+ end: {
516
+ line: 124,
517
+ column: 3
518
+ }
519
+ },
520
+ line: 98
521
+ },
522
+ "1": {
523
+ name: "(anonymous_1)",
524
+ decl: {
525
+ start: {
526
+ line: 126,
527
+ column: 2
528
+ },
529
+ end: {
530
+ line: 126,
531
+ column: 3
532
+ }
533
+ },
534
+ loc: {
535
+ start: {
536
+ line: 126,
537
+ column: 55
538
+ },
539
+ end: {
540
+ line: 149,
541
+ column: 3
542
+ }
543
+ },
544
+ line: 126
545
+ },
546
+ "2": {
547
+ name: "(anonymous_2)",
548
+ decl: {
549
+ start: {
550
+ line: 151,
551
+ column: 2
552
+ },
553
+ end: {
554
+ line: 151,
555
+ column: 3
556
+ }
557
+ },
558
+ loc: {
559
+ start: {
560
+ line: 151,
561
+ column: 38
562
+ },
563
+ end: {
564
+ line: 162,
565
+ column: 3
566
+ }
567
+ },
568
+ line: 151
569
+ },
570
+ "3": {
571
+ name: "(anonymous_3)",
572
+ decl: {
573
+ start: {
574
+ line: 160,
575
+ column: 6
576
+ },
577
+ end: {
578
+ line: 160,
579
+ column: 7
580
+ }
581
+ },
582
+ loc: {
583
+ start: {
584
+ line: 160,
585
+ column: 16
586
+ },
587
+ end: {
588
+ line: 160,
589
+ column: 37
590
+ }
591
+ },
592
+ line: 160
593
+ },
594
+ "4": {
595
+ name: "(anonymous_4)",
596
+ decl: {
597
+ start: {
598
+ line: 176,
599
+ column: 2
600
+ },
601
+ end: {
602
+ line: 176,
603
+ column: 3
604
+ }
605
+ },
606
+ loc: {
607
+ start: {
608
+ line: 176,
609
+ column: 50
610
+ },
611
+ end: {
612
+ line: 195,
613
+ column: 3
614
+ }
615
+ },
616
+ line: 176
617
+ },
618
+ "5": {
619
+ name: "(anonymous_5)",
620
+ decl: {
621
+ start: {
622
+ line: 212,
623
+ column: 2
624
+ },
625
+ end: {
626
+ line: 212,
627
+ column: 3
628
+ }
629
+ },
630
+ loc: {
631
+ start: {
632
+ line: 212,
633
+ column: 30
634
+ },
635
+ end: {
636
+ line: 227,
637
+ column: 3
638
+ }
639
+ },
640
+ line: 212
641
+ },
642
+ "6": {
643
+ name: "(anonymous_6)",
644
+ decl: {
645
+ start: {
646
+ line: 241,
647
+ column: 2
648
+ },
649
+ end: {
650
+ line: 241,
651
+ column: 3
652
+ }
653
+ },
654
+ loc: {
655
+ start: {
656
+ line: 241,
657
+ column: 45
658
+ },
659
+ end: {
660
+ line: 261,
661
+ column: 3
662
+ }
663
+ },
664
+ line: 241
665
+ },
666
+ "7": {
667
+ name: "(anonymous_7)",
668
+ decl: {
669
+ start: {
670
+ line: 242,
671
+ column: 47
672
+ },
673
+ end: {
674
+ line: 242,
675
+ column: 48
676
+ }
677
+ },
678
+ loc: {
679
+ start: {
680
+ line: 242,
681
+ column: 62
682
+ },
683
+ end: {
684
+ line: 260,
685
+ column: 5
686
+ }
687
+ },
688
+ line: 242
689
+ },
690
+ "8": {
691
+ name: "(anonymous_8)",
692
+ decl: {
693
+ start: {
694
+ line: 277,
695
+ column: 2
696
+ },
697
+ end: {
698
+ line: 277,
699
+ column: 3
700
+ }
701
+ },
702
+ loc: {
703
+ start: {
704
+ line: 277,
705
+ column: 65
706
+ },
707
+ end: {
708
+ line: 293,
709
+ column: 3
710
+ }
711
+ },
712
+ line: 277
713
+ },
714
+ "9": {
715
+ name: "(anonymous_9)",
716
+ decl: {
717
+ start: {
718
+ line: 278,
719
+ column: 41
720
+ },
721
+ end: {
722
+ line: 278,
723
+ column: 42
724
+ }
725
+ },
726
+ loc: {
727
+ start: {
728
+ line: 278,
729
+ column: 56
730
+ },
731
+ end: {
732
+ line: 292,
733
+ column: 5
734
+ }
735
+ },
736
+ line: 278
737
+ }
738
+ },
739
+ branchMap: {
740
+ "0": {
741
+ loc: {
742
+ start: {
743
+ line: 127,
744
+ column: 4
745
+ },
746
+ end: {
747
+ line: 131,
748
+ column: 5
749
+ }
750
+ },
751
+ type: "if",
752
+ locations: [{
753
+ start: {
754
+ line: 127,
755
+ column: 4
756
+ },
757
+ end: {
758
+ line: 131,
759
+ column: 5
760
+ }
761
+ }, {
762
+ start: {
763
+ line: undefined,
764
+ column: undefined
765
+ },
766
+ end: {
767
+ line: undefined,
768
+ column: undefined
769
+ }
770
+ }],
771
+ line: 127
772
+ },
773
+ "1": {
774
+ loc: {
775
+ start: {
776
+ line: 127,
777
+ column: 8
778
+ },
779
+ end: {
780
+ line: 127,
781
+ column: 26
782
+ }
783
+ },
784
+ type: "binary-expr",
785
+ locations: [{
786
+ start: {
787
+ line: 127,
788
+ column: 8
789
+ },
790
+ end: {
791
+ line: 127,
792
+ column: 17
793
+ }
794
+ }, {
795
+ start: {
796
+ line: 127,
797
+ column: 21
798
+ },
799
+ end: {
800
+ line: 127,
801
+ column: 26
802
+ }
803
+ }],
804
+ line: 127
805
+ },
806
+ "2": {
807
+ loc: {
808
+ start: {
809
+ line: 133,
810
+ column: 4
811
+ },
812
+ end: {
813
+ line: 137,
814
+ column: 5
815
+ }
816
+ },
817
+ type: "if",
818
+ locations: [{
819
+ start: {
820
+ line: 133,
821
+ column: 4
822
+ },
823
+ end: {
824
+ line: 137,
825
+ column: 5
826
+ }
827
+ }, {
828
+ start: {
829
+ line: undefined,
830
+ column: undefined
831
+ },
832
+ end: {
833
+ line: undefined,
834
+ column: undefined
835
+ }
836
+ }],
837
+ line: 133
838
+ },
839
+ "3": {
840
+ loc: {
841
+ start: {
842
+ line: 141,
843
+ column: 4
844
+ },
845
+ end: {
846
+ line: 143,
847
+ column: 5
848
+ }
849
+ },
850
+ type: "if",
851
+ locations: [{
852
+ start: {
853
+ line: 141,
854
+ column: 4
855
+ },
856
+ end: {
857
+ line: 143,
858
+ column: 5
859
+ }
860
+ }, {
861
+ start: {
862
+ line: undefined,
863
+ column: undefined
864
+ },
865
+ end: {
866
+ line: undefined,
867
+ column: undefined
868
+ }
869
+ }],
870
+ line: 141
871
+ },
872
+ "4": {
873
+ loc: {
874
+ start: {
875
+ line: 152,
876
+ column: 4
877
+ },
878
+ end: {
879
+ line: 154,
880
+ column: 5
881
+ }
882
+ },
883
+ type: "if",
884
+ locations: [{
885
+ start: {
886
+ line: 152,
887
+ column: 4
888
+ },
889
+ end: {
890
+ line: 154,
891
+ column: 5
892
+ }
893
+ }, {
894
+ start: {
895
+ line: undefined,
896
+ column: undefined
897
+ },
898
+ end: {
899
+ line: undefined,
900
+ column: undefined
901
+ }
902
+ }],
903
+ line: 152
904
+ },
905
+ "5": {
906
+ loc: {
907
+ start: {
908
+ line: 177,
909
+ column: 4
910
+ },
911
+ end: {
912
+ line: 194,
913
+ column: 5
914
+ }
915
+ },
916
+ type: "if",
917
+ locations: [{
918
+ start: {
919
+ line: 177,
920
+ column: 4
921
+ },
922
+ end: {
923
+ line: 194,
924
+ column: 5
925
+ }
926
+ }, {
927
+ start: {
928
+ line: 188,
929
+ column: 11
930
+ },
931
+ end: {
932
+ line: 194,
933
+ column: 5
934
+ }
935
+ }],
936
+ line: 177
937
+ },
938
+ "6": {
939
+ loc: {
940
+ start: {
941
+ line: 177,
942
+ column: 8
943
+ },
944
+ end: {
945
+ line: 177,
946
+ column: 38
947
+ }
948
+ },
949
+ type: "binary-expr",
950
+ locations: [{
951
+ start: {
952
+ line: 177,
953
+ column: 8
954
+ },
955
+ end: {
956
+ line: 177,
957
+ column: 23
958
+ }
959
+ }, {
960
+ start: {
961
+ line: 177,
962
+ column: 27
963
+ },
964
+ end: {
965
+ line: 177,
966
+ column: 38
967
+ }
968
+ }],
969
+ line: 177
970
+ },
971
+ "7": {
972
+ loc: {
973
+ start: {
974
+ line: 183,
975
+ column: 6
976
+ },
977
+ end: {
978
+ line: 185,
979
+ column: 7
980
+ }
981
+ },
982
+ type: "if",
983
+ locations: [{
984
+ start: {
985
+ line: 183,
986
+ column: 6
987
+ },
988
+ end: {
989
+ line: 185,
990
+ column: 7
991
+ }
992
+ }, {
993
+ start: {
994
+ line: undefined,
995
+ column: undefined
996
+ },
997
+ end: {
998
+ line: undefined,
999
+ column: undefined
1000
+ }
1001
+ }],
1002
+ line: 183
1003
+ },
1004
+ "8": {
1005
+ loc: {
1006
+ start: {
1007
+ line: 188,
1008
+ column: 11
1009
+ },
1010
+ end: {
1011
+ line: 194,
1012
+ column: 5
1013
+ }
1014
+ },
1015
+ type: "if",
1016
+ locations: [{
1017
+ start: {
1018
+ line: 188,
1019
+ column: 11
1020
+ },
1021
+ end: {
1022
+ line: 194,
1023
+ column: 5
1024
+ }
1025
+ }, {
1026
+ start: {
1027
+ line: 190,
1028
+ column: 11
1029
+ },
1030
+ end: {
1031
+ line: 194,
1032
+ column: 5
1033
+ }
1034
+ }],
1035
+ line: 188
1036
+ },
1037
+ "9": {
1038
+ loc: {
1039
+ start: {
1040
+ line: 212,
1041
+ column: 16
1042
+ },
1043
+ end: {
1044
+ line: 212,
1045
+ column: 28
1046
+ }
1047
+ },
1048
+ type: "default-arg",
1049
+ locations: [{
1050
+ start: {
1051
+ line: 212,
1052
+ column: 26
1053
+ },
1054
+ end: {
1055
+ line: 212,
1056
+ column: 28
1057
+ }
1058
+ }],
1059
+ line: 212
1060
+ },
1061
+ "10": {
1062
+ loc: {
1063
+ start: {
1064
+ line: 214,
1065
+ column: 6
1066
+ },
1067
+ end: {
1068
+ line: 214,
1069
+ column: 30
1070
+ }
1071
+ },
1072
+ type: "default-arg",
1073
+ locations: [{
1074
+ start: {
1075
+ line: 214,
1076
+ column: 28
1077
+ },
1078
+ end: {
1079
+ line: 214,
1080
+ column: 30
1081
+ }
1082
+ }],
1083
+ line: 214
1084
+ },
1085
+ "11": {
1086
+ loc: {
1087
+ start: {
1088
+ line: 215,
1089
+ column: 6
1090
+ },
1091
+ end: {
1092
+ line: 215,
1093
+ column: 24
1094
+ }
1095
+ },
1096
+ type: "default-arg",
1097
+ locations: [{
1098
+ start: {
1099
+ line: 215,
1100
+ column: 12
1101
+ },
1102
+ end: {
1103
+ line: 215,
1104
+ column: 24
1105
+ }
1106
+ }],
1107
+ line: 215
1108
+ },
1109
+ "12": {
1110
+ loc: {
1111
+ start: {
1112
+ line: 216,
1113
+ column: 6
1114
+ },
1115
+ end: {
1116
+ line: 216,
1117
+ column: 26
1118
+ }
1119
+ },
1120
+ type: "default-arg",
1121
+ locations: [{
1122
+ start: {
1123
+ line: 216,
1124
+ column: 24
1125
+ },
1126
+ end: {
1127
+ line: 216,
1128
+ column: 26
1129
+ }
1130
+ }],
1131
+ line: 216
1132
+ },
1133
+ "13": {
1134
+ loc: {
1135
+ start: {
1136
+ line: 245,
1137
+ column: 26
1138
+ },
1139
+ end: {
1140
+ line: 245,
1141
+ column: 57
1142
+ }
1143
+ },
1144
+ type: "binary-expr",
1145
+ locations: [{
1146
+ start: {
1147
+ line: 245,
1148
+ column: 26
1149
+ },
1150
+ end: {
1151
+ line: 245,
1152
+ column: 36
1153
+ }
1154
+ }, {
1155
+ start: {
1156
+ line: 245,
1157
+ column: 40
1158
+ },
1159
+ end: {
1160
+ line: 245,
1161
+ column: 57
1162
+ }
1163
+ }],
1164
+ line: 245
1165
+ },
1166
+ "14": {
1167
+ loc: {
1168
+ start: {
1169
+ line: 246,
1170
+ column: 22
1171
+ },
1172
+ end: {
1173
+ line: 246,
1174
+ column: 45
1175
+ }
1176
+ },
1177
+ type: "binary-expr",
1178
+ locations: [{
1179
+ start: {
1180
+ line: 246,
1181
+ column: 22
1182
+ },
1183
+ end: {
1184
+ line: 246,
1185
+ column: 28
1186
+ }
1187
+ }, {
1188
+ start: {
1189
+ line: 246,
1190
+ column: 32
1191
+ },
1192
+ end: {
1193
+ line: 246,
1194
+ column: 45
1195
+ }
1196
+ }],
1197
+ line: 246
1198
+ },
1199
+ "15": {
1200
+ loc: {
1201
+ start: {
1202
+ line: 248,
1203
+ column: 6
1204
+ },
1205
+ end: {
1206
+ line: 252,
1207
+ column: 7
1208
+ }
1209
+ },
1210
+ type: "if",
1211
+ locations: [{
1212
+ start: {
1213
+ line: 248,
1214
+ column: 6
1215
+ },
1216
+ end: {
1217
+ line: 252,
1218
+ column: 7
1219
+ }
1220
+ }, {
1221
+ start: {
1222
+ line: undefined,
1223
+ column: undefined
1224
+ },
1225
+ end: {
1226
+ line: undefined,
1227
+ column: undefined
1228
+ }
1229
+ }],
1230
+ line: 248
1231
+ },
1232
+ "16": {
1233
+ loc: {
1234
+ start: {
1235
+ line: 248,
1236
+ column: 12
1237
+ },
1238
+ end: {
1239
+ line: 248,
1240
+ column: 34
1241
+ }
1242
+ },
1243
+ type: "binary-expr",
1244
+ locations: [{
1245
+ start: {
1246
+ line: 248,
1247
+ column: 12
1248
+ },
1249
+ end: {
1250
+ line: 248,
1251
+ column: 23
1252
+ }
1253
+ }, {
1254
+ start: {
1255
+ line: 248,
1256
+ column: 27
1257
+ },
1258
+ end: {
1259
+ line: 248,
1260
+ column: 34
1261
+ }
1262
+ }],
1263
+ line: 248
1264
+ },
1265
+ "17": {
1266
+ loc: {
1267
+ start: {
1268
+ line: 282,
1269
+ column: 6
1270
+ },
1271
+ end: {
1272
+ line: 289,
1273
+ column: 7
1274
+ }
1275
+ },
1276
+ type: "if",
1277
+ locations: [{
1278
+ start: {
1279
+ line: 282,
1280
+ column: 6
1281
+ },
1282
+ end: {
1283
+ line: 289,
1284
+ column: 7
1285
+ }
1286
+ }, {
1287
+ start: {
1288
+ line: 287,
1289
+ column: 13
1290
+ },
1291
+ end: {
1292
+ line: 289,
1293
+ column: 7
1294
+ }
1295
+ }],
1296
+ line: 282
1297
+ }
1298
+ },
1299
+ s: {
1300
+ "0": 0,
1301
+ "1": 0,
1302
+ "2": 0,
1303
+ "3": 0,
1304
+ "4": 0,
1305
+ "5": 0,
1306
+ "6": 0,
1307
+ "7": 0,
1308
+ "8": 0,
1309
+ "9": 0,
1310
+ "10": 0,
1311
+ "11": 0,
1312
+ "12": 0,
1313
+ "13": 0,
1314
+ "14": 0,
1315
+ "15": 0,
1316
+ "16": 0,
1317
+ "17": 0,
1318
+ "18": 0,
1319
+ "19": 0,
1320
+ "20": 0,
1321
+ "21": 0,
1322
+ "22": 0,
1323
+ "23": 0,
1324
+ "24": 0,
1325
+ "25": 0,
1326
+ "26": 0,
1327
+ "27": 0,
1328
+ "28": 0,
1329
+ "29": 0,
1330
+ "30": 0,
1331
+ "31": 0,
1332
+ "32": 0,
1333
+ "33": 0,
1334
+ "34": 0,
1335
+ "35": 0,
1336
+ "36": 0,
1337
+ "37": 0,
1338
+ "38": 0,
1339
+ "39": 0,
1340
+ "40": 0,
1341
+ "41": 0,
1342
+ "42": 0,
1343
+ "43": 0,
1344
+ "44": 0,
1345
+ "45": 0,
1346
+ "46": 0
1347
+ },
1348
+ f: {
1349
+ "0": 0,
1350
+ "1": 0,
1351
+ "2": 0,
1352
+ "3": 0,
1353
+ "4": 0,
1354
+ "5": 0,
1355
+ "6": 0,
1356
+ "7": 0,
1357
+ "8": 0,
1358
+ "9": 0
1359
+ },
1360
+ b: {
1361
+ "0": [0, 0],
1362
+ "1": [0, 0],
1363
+ "2": [0, 0],
1364
+ "3": [0, 0],
1365
+ "4": [0, 0],
1366
+ "5": [0, 0],
1367
+ "6": [0, 0],
1368
+ "7": [0, 0],
1369
+ "8": [0, 0],
1370
+ "9": [0],
1371
+ "10": [0],
1372
+ "11": [0],
1373
+ "12": [0],
1374
+ "13": [0, 0],
1375
+ "14": [0, 0],
1376
+ "15": [0, 0],
1377
+ "16": [0, 0],
1378
+ "17": [0, 0]
1379
+ },
1380
+ _coverageSchema: "1a1c01bbd47fc00a2c39e90264f33305004495a9",
1381
+ hash: "e2e1bec209d833852fd33c484710a2590a9a6d81"
1382
+ };
1383
+ var coverage = global[gcv] || (global[gcv] = {});
1384
+ if (!coverage[path] || coverage[path].hash !== hash) {
1385
+ coverage[path] = coverageData;
1386
+ }
1387
+ var actualCoverage = coverage[path];
1388
+ {
1389
+ // @ts-ignore
1390
+ cov_1n1bb4mnsz = function () {
1391
+ return actualCoverage;
1392
+ };
1393
+ }
1394
+ return actualCoverage;
1395
+ }
1396
+ cov_1n1bb4mnsz();
1397
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
1398
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
1399
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
1400
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
1401
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
25
1402
  /**
26
1403
  * A single audience used for authenticating and communicating with an individual API.
27
1404
  *
@@ -110,220 +1487,250 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
110
1487
  *
111
1488
  * @typicalname contxtSdk.config
112
1489
  */
113
- var Config = function () {
1490
+ class Config {
114
1491
  /**
115
1492
  * @param {UserConfig} userConfig The user provided configuration options
116
1493
  * @param {Object.<string, ExternalModule>} [externalModules] User provided external modules that should be treated as
117
1494
  * first class citizens
118
1495
  */
119
- function Config(userConfig, externalModules) {
120
- _classCallCheck(this, Config);
121
-
1496
+ constructor(userConfig, externalModules) {
1497
+ cov_1n1bb4mnsz().f[0]++;
1498
+ cov_1n1bb4mnsz().s[0]++;
122
1499
  Object.assign(this, userConfig);
123
-
1500
+ cov_1n1bb4mnsz().s[1]++;
124
1501
  this._dynamicAudienceNames = [];
1502
+ cov_1n1bb4mnsz().s[2]++;
125
1503
  this._replacedAudiences = {};
126
-
1504
+ cov_1n1bb4mnsz().s[3]++;
127
1505
  this.audiences = this._getAudiences({
128
- externalModules: externalModules,
1506
+ externalModules,
129
1507
  customModuleConfigs: userConfig.auth.customModuleConfigs,
130
1508
  env: userConfig.auth.env
131
1509
  });
132
-
133
- this.auth = _extends({}, _defaults2.default.auth, userConfig.auth);
134
-
135
- this.interceptors = _extends({}, _defaults2.default.interceptors, userConfig.interceptors);
136
-
137
- this.bus = _extends({}, _defaults2.default.bus, userConfig.bus);
1510
+ cov_1n1bb4mnsz().s[4]++;
1511
+ this.auth = _objectSpread(_objectSpread({}, _defaults.default.auth), userConfig.auth);
1512
+ cov_1n1bb4mnsz().s[5]++;
1513
+ this.interceptors = _objectSpread(_objectSpread({}, _defaults.default.interceptors), userConfig.interceptors);
1514
+ cov_1n1bb4mnsz().s[6]++;
1515
+ this.bus = _objectSpread(_objectSpread({}, _defaults.default.bus), userConfig.bus);
138
1516
  }
139
-
140
- _createClass(Config, [{
141
- key: 'addDynamicAudience',
142
- value: function addDynamicAudience(audienceName, _ref) {
143
- var clientId = _ref.clientId,
144
- host = _ref.host;
145
-
146
- if (!clientId || !host) {
147
- throw new Error('A dynamic audience must contain `clientId` and `host` properties');
148
- }
149
-
150
- if (this._dynamicAudienceNames.indexOf(audienceName) > -1) {
151
- throw new Error('A dynamic audience of the name `' + audienceName + '` already exists. This problem can be rectified by using a different name for the audience.');
152
- }
153
-
154
- this._dynamicAudienceNames = [].concat(_toConsumableArray(this._dynamicAudienceNames), [audienceName]);
155
-
156
- if (this.audiences[audienceName]) {
157
- this._replacedAudiences[audienceName] = this.audiences[audienceName];
158
- }
159
-
160
- this.audiences[audienceName] = {
161
- clientId: clientId,
162
- host: host
163
- };
1517
+ addDynamicAudience(audienceName, _ref) {
1518
+ let clientId = _ref.clientId,
1519
+ host = _ref.host;
1520
+ cov_1n1bb4mnsz().f[1]++;
1521
+ cov_1n1bb4mnsz().s[7]++;
1522
+ if ((cov_1n1bb4mnsz().b[1][0]++, !clientId) || (cov_1n1bb4mnsz().b[1][1]++, !host)) {
1523
+ cov_1n1bb4mnsz().b[0][0]++;
1524
+ cov_1n1bb4mnsz().s[8]++;
1525
+ throw new Error('A dynamic audience must contain `clientId` and `host` properties');
1526
+ } else {
1527
+ cov_1n1bb4mnsz().b[0][1]++;
164
1528
  }
165
- }, {
166
- key: 'removeDynamicAudience',
167
- value: function removeDynamicAudience(audienceName) {
168
- if (this._dynamicAudienceNames.indexOf(audienceName) === -1) {
169
- throw new Error('There is no dynamic audience to remove.');
170
- }
171
-
172
- this.audiences[audienceName] = this._replacedAudiences[audienceName];
173
-
174
- delete this._replacedAudiences[audienceName];
175
- this._dynamicAudienceNames = this._dynamicAudienceNames.filter(function (name) {
176
- return name !== audienceName;
177
- });
1529
+ cov_1n1bb4mnsz().s[9]++;
1530
+ if (this._dynamicAudienceNames.indexOf(audienceName) > -1) {
1531
+ cov_1n1bb4mnsz().b[2][0]++;
1532
+ cov_1n1bb4mnsz().s[10]++;
1533
+ throw new Error(`A dynamic audience of the name \`${audienceName}\` already exists. This problem can be rectified by using a different name for the audience.`);
1534
+ } else {
1535
+ cov_1n1bb4mnsz().b[2][1]++;
178
1536
  }
1537
+ cov_1n1bb4mnsz().s[11]++;
1538
+ this._dynamicAudienceNames = [...this._dynamicAudienceNames, audienceName];
1539
+ cov_1n1bb4mnsz().s[12]++;
1540
+ if (this.audiences[audienceName]) {
1541
+ cov_1n1bb4mnsz().b[3][0]++;
1542
+ cov_1n1bb4mnsz().s[13]++;
1543
+ this._replacedAudiences[audienceName] = this.audiences[audienceName];
1544
+ } else {
1545
+ cov_1n1bb4mnsz().b[3][1]++;
1546
+ }
1547
+ cov_1n1bb4mnsz().s[14]++;
1548
+ this.audiences[audienceName] = {
1549
+ clientId,
1550
+ host
1551
+ };
1552
+ }
1553
+ removeDynamicAudience(audienceName) {
1554
+ cov_1n1bb4mnsz().f[2]++;
1555
+ cov_1n1bb4mnsz().s[15]++;
1556
+ if (this._dynamicAudienceNames.indexOf(audienceName) === -1) {
1557
+ cov_1n1bb4mnsz().b[4][0]++;
1558
+ cov_1n1bb4mnsz().s[16]++;
1559
+ throw new Error('There is no dynamic audience to remove.');
1560
+ } else {
1561
+ cov_1n1bb4mnsz().b[4][1]++;
1562
+ }
1563
+ cov_1n1bb4mnsz().s[17]++;
1564
+ this.audiences[audienceName] = this._replacedAudiences[audienceName];
1565
+ cov_1n1bb4mnsz().s[18]++;
1566
+ delete this._replacedAudiences[audienceName];
1567
+ cov_1n1bb4mnsz().s[19]++;
1568
+ this._dynamicAudienceNames = this._dynamicAudienceNames.filter(name => {
1569
+ cov_1n1bb4mnsz().f[3]++;
1570
+ cov_1n1bb4mnsz().s[20]++;
1571
+ return name !== audienceName;
1572
+ });
1573
+ }
179
1574
 
180
- /**
181
- * Parses a custom module configuration for a valid environment/audience. Requires either a
182
- * clientId and host, or an environment that matches a default audience/environment.
183
- *
184
- * @param {CustomAudience} config A custom audience configuration to parse
185
- * @param {Object.<string, Audience>} audiences An object with keys for environment names and values of Audience information
186
- *
187
- * @returns {Audience}
188
- * @throws {Error}
189
- *
190
- * @private
191
- */
192
-
193
- }, {
194
- key: '_getAudienceFromCustomConfig',
195
- value: function _getAudienceFromCustomConfig(config, audiences) {
196
- if (config.clientId && config.host) {
197
- var audience = {
198
- clientId: config.clientId,
199
- host: config.host
200
- };
201
-
202
- if (config.webSocket) {
203
- audience.webSocket = config.webSocket;
204
- }
205
-
206
- return audience;
207
- } else if (config.env) {
1575
+ /**
1576
+ * Parses a custom module configuration for a valid environment/audience. Requires either a
1577
+ * clientId and host, or an environment that matches a default audience/environment.
1578
+ *
1579
+ * @param {CustomAudience} config A custom audience configuration to parse
1580
+ * @param {Object.<string, Audience>} audiences An object with keys for environment names and values of Audience information
1581
+ *
1582
+ * @returns {Audience}
1583
+ * @throws {Error}
1584
+ *
1585
+ * @private
1586
+ */
1587
+ _getAudienceFromCustomConfig(config, audiences) {
1588
+ cov_1n1bb4mnsz().f[4]++;
1589
+ cov_1n1bb4mnsz().s[21]++;
1590
+ if ((cov_1n1bb4mnsz().b[6][0]++, config.clientId) && (cov_1n1bb4mnsz().b[6][1]++, config.host)) {
1591
+ cov_1n1bb4mnsz().b[5][0]++;
1592
+ const audience = (cov_1n1bb4mnsz().s[22]++, {
1593
+ clientId: config.clientId,
1594
+ host: config.host
1595
+ });
1596
+ cov_1n1bb4mnsz().s[23]++;
1597
+ if (config.webSocket) {
1598
+ cov_1n1bb4mnsz().b[7][0]++;
1599
+ cov_1n1bb4mnsz().s[24]++;
1600
+ audience.webSocket = config.webSocket;
1601
+ } else {
1602
+ cov_1n1bb4mnsz().b[7][1]++;
1603
+ }
1604
+ cov_1n1bb4mnsz().s[25]++;
1605
+ return audience;
1606
+ } else {
1607
+ cov_1n1bb4mnsz().b[5][1]++;
1608
+ cov_1n1bb4mnsz().s[26]++;
1609
+ if (config.env) {
1610
+ cov_1n1bb4mnsz().b[8][0]++;
1611
+ cov_1n1bb4mnsz().s[27]++;
208
1612
  return audiences[config.env];
209
1613
  } else {
1614
+ cov_1n1bb4mnsz().b[8][1]++;
1615
+ cov_1n1bb4mnsz().s[28]++;
210
1616
  throw new Error('Custom module configurations must either contain a `host` and `clientId` or specify a specific target environment via the `env` property');
211
1617
  }
212
1618
  }
1619
+ }
213
1620
 
214
- /**
215
- * Reconciles the main environment with custom environments and external modules.
216
- *
217
- * @param {Object} options
218
- * @param {Object.<string, CustomAudience>} [options.customModuleConfigs = {}] Any custom
219
- * configurations for internal modules
220
- * @param {string} [options.env = 'production'] The base environment for any
221
- * non-overridden modules
222
- * @param {Object.<string, ExternalModule>} [options.externalModules = {}] An object of external
223
- * modules from which to build a set of audiences
224
- *
225
- * @returns {Object.<string, Audience>}
226
- *
227
- * @private
228
- */
229
-
230
- }, {
231
- key: '_getAudiences',
232
- value: function _getAudiences() {
233
- var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
234
- var _options$customModule = options.customModuleConfigs,
235
- customModuleConfigs = _options$customModule === undefined ? {} : _options$customModule,
236
- _options$env = options.env,
237
- env = _options$env === undefined ? 'production' : _options$env,
238
- _options$externalModu = options.externalModules,
239
- externalModules = _options$externalModu === undefined ? {} : _options$externalModu;
240
-
241
-
242
- return _extends({}, this._getInternalAudiences({
243
- customModuleConfigs: customModuleConfigs,
244
- env: env,
245
- audiences: _audiences2.default
246
- }), this._getExternalAudiences({ externalModules: externalModules }));
247
- }
248
-
249
- /**
250
- * Builds up the audiences for external modules.
251
- *
252
- * @param {Object}
253
- * @param {Object.<string, ExternalModule>} externalModules An object of external modules from
254
- * which to build a set of audiences
255
- *
256
- * @returns {Object.<string, Audience>}
257
- * @throws {Error}
258
- *
259
- * @private
260
- */
261
-
262
- }, {
263
- key: '_getExternalAudiences',
264
- value: function _getExternalAudiences(_ref2) {
265
- var externalModules = _ref2.externalModules;
266
-
267
- return Object.keys(externalModules).reduce(function (memo, key) {
268
- var clientId = externalModules[key].clientId;
269
- var host = externalModules[key].host;
270
- var hasClientId = !!clientId || clientId === null;
271
- var hasHost = !!host || host === null;
272
-
273
- if (!(hasClientId && hasHost)) {
274
- throw new Error('External modules must contain `clientId` and `host` properties');
275
- }
276
-
277
- memo[key] = {
278
- clientId: clientId,
279
- host: host
280
- };
281
-
282
- return memo;
283
- }, {});
284
- }
285
-
286
- /**
287
- * Reconciles the main environment with custom environments to build up audiences for
288
- * internal modules.
289
- *
290
- * @param {Object.<string, Environments>} audiences All possible audiences/environments for
291
- * internal modules
292
- * @param {Object.<string, CustomAudience>} customModuleConfigs Any custom configurations for
293
- * internal modules
294
- * @param {string} env The base environment for any non-overridden modules
295
- *
296
- * @returns {Object.<string, Audience>}
297
- *
298
- * @private
299
- */
300
-
301
- }, {
302
- key: '_getInternalAudiences',
303
- value: function _getInternalAudiences(_ref3) {
304
- var _this = this;
305
-
306
- var audiences = _ref3.audiences,
307
- customModuleConfigs = _ref3.customModuleConfigs,
308
- env = _ref3.env;
309
-
310
- return Object.keys(audiences).reduce(function (memo, key) {
311
- var customModuleConfig = customModuleConfigs[key];
312
- var moduleAudiences = audiences[key];
313
-
314
- if (customModuleConfig) {
315
- memo[key] = _this._getAudienceFromCustomConfig(customModuleConfig, moduleAudiences);
316
- } else {
317
- memo[key] = moduleAudiences[env];
318
- }
319
-
320
- return memo;
321
- }, {});
322
- }
323
- }]);
1621
+ /**
1622
+ * Reconciles the main environment with custom environments and external modules.
1623
+ *
1624
+ * @param {Object} options
1625
+ * @param {Object.<string, CustomAudience>} [options.customModuleConfigs = {}] Any custom
1626
+ * configurations for internal modules
1627
+ * @param {string} [options.env = 'production'] The base environment for any
1628
+ * non-overridden modules
1629
+ * @param {Object.<string, ExternalModule>} [options.externalModules = {}] An object of external
1630
+ * modules from which to build a set of audiences
1631
+ *
1632
+ * @returns {Object.<string, Audience>}
1633
+ *
1634
+ * @private
1635
+ */
1636
+ _getAudiences() {
1637
+ let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : (cov_1n1bb4mnsz().b[9][0]++, {});
1638
+ cov_1n1bb4mnsz().f[5]++;
1639
+ const _ref2 = (cov_1n1bb4mnsz().s[29]++, options),
1640
+ _ref2$customModuleCon = _ref2.customModuleConfigs,
1641
+ customModuleConfigs = _ref2$customModuleCon === void 0 ? (cov_1n1bb4mnsz().b[10][0]++, {}) : _ref2$customModuleCon,
1642
+ _ref2$env = _ref2.env,
1643
+ env = _ref2$env === void 0 ? (cov_1n1bb4mnsz().b[11][0]++, 'production') : _ref2$env,
1644
+ _ref2$externalModules = _ref2.externalModules,
1645
+ externalModules = _ref2$externalModules === void 0 ? (cov_1n1bb4mnsz().b[12][0]++, {}) : _ref2$externalModules;
1646
+ cov_1n1bb4mnsz().s[30]++;
1647
+ return _objectSpread(_objectSpread({}, this._getInternalAudiences({
1648
+ customModuleConfigs,
1649
+ env,
1650
+ audiences: _audiences.default
1651
+ })), this._getExternalAudiences({
1652
+ externalModules
1653
+ }));
1654
+ }
324
1655
 
325
- return Config;
326
- }();
1656
+ /**
1657
+ * Builds up the audiences for external modules.
1658
+ *
1659
+ * @param {Object}
1660
+ * @param {Object.<string, ExternalModule>} externalModules An object of external modules from
1661
+ * which to build a set of audiences
1662
+ *
1663
+ * @returns {Object.<string, Audience>}
1664
+ * @throws {Error}
1665
+ *
1666
+ * @private
1667
+ */
1668
+ _getExternalAudiences(_ref3) {
1669
+ let externalModules = _ref3.externalModules;
1670
+ cov_1n1bb4mnsz().f[6]++;
1671
+ cov_1n1bb4mnsz().s[31]++;
1672
+ return Object.keys(externalModules).reduce((memo, key) => {
1673
+ cov_1n1bb4mnsz().f[7]++;
1674
+ const clientId = (cov_1n1bb4mnsz().s[32]++, externalModules[key].clientId);
1675
+ const host = (cov_1n1bb4mnsz().s[33]++, externalModules[key].host);
1676
+ const hasClientId = (cov_1n1bb4mnsz().s[34]++, (cov_1n1bb4mnsz().b[13][0]++, !!clientId) || (cov_1n1bb4mnsz().b[13][1]++, clientId === null));
1677
+ const hasHost = (cov_1n1bb4mnsz().s[35]++, (cov_1n1bb4mnsz().b[14][0]++, !!host) || (cov_1n1bb4mnsz().b[14][1]++, host === null));
1678
+ cov_1n1bb4mnsz().s[36]++;
1679
+ if (!((cov_1n1bb4mnsz().b[16][0]++, hasClientId) && (cov_1n1bb4mnsz().b[16][1]++, hasHost))) {
1680
+ cov_1n1bb4mnsz().b[15][0]++;
1681
+ cov_1n1bb4mnsz().s[37]++;
1682
+ throw new Error('External modules must contain `clientId` and `host` properties');
1683
+ } else {
1684
+ cov_1n1bb4mnsz().b[15][1]++;
1685
+ }
1686
+ cov_1n1bb4mnsz().s[38]++;
1687
+ memo[key] = {
1688
+ clientId,
1689
+ host
1690
+ };
1691
+ cov_1n1bb4mnsz().s[39]++;
1692
+ return memo;
1693
+ }, {});
1694
+ }
327
1695
 
328
- exports.default = Config;
1696
+ /**
1697
+ * Reconciles the main environment with custom environments to build up audiences for
1698
+ * internal modules.
1699
+ *
1700
+ * @param {Object.<string, Environments>} audiences All possible audiences/environments for
1701
+ * internal modules
1702
+ * @param {Object.<string, CustomAudience>} customModuleConfigs Any custom configurations for
1703
+ * internal modules
1704
+ * @param {string} env The base environment for any non-overridden modules
1705
+ *
1706
+ * @returns {Object.<string, Audience>}
1707
+ *
1708
+ * @private
1709
+ */
1710
+ _getInternalAudiences(_ref4) {
1711
+ let audiences = _ref4.audiences,
1712
+ customModuleConfigs = _ref4.customModuleConfigs,
1713
+ env = _ref4.env;
1714
+ cov_1n1bb4mnsz().f[8]++;
1715
+ cov_1n1bb4mnsz().s[40]++;
1716
+ return Object.keys(audiences).reduce((memo, key) => {
1717
+ cov_1n1bb4mnsz().f[9]++;
1718
+ const customModuleConfig = (cov_1n1bb4mnsz().s[41]++, customModuleConfigs[key]);
1719
+ const moduleAudiences = (cov_1n1bb4mnsz().s[42]++, audiences[key]);
1720
+ cov_1n1bb4mnsz().s[43]++;
1721
+ if (customModuleConfig) {
1722
+ cov_1n1bb4mnsz().b[17][0]++;
1723
+ cov_1n1bb4mnsz().s[44]++;
1724
+ memo[key] = this._getAudienceFromCustomConfig(customModuleConfig, moduleAudiences);
1725
+ } else {
1726
+ cov_1n1bb4mnsz().b[17][1]++;
1727
+ cov_1n1bb4mnsz().s[45]++;
1728
+ memo[key] = moduleAudiences[env];
1729
+ }
1730
+ cov_1n1bb4mnsz().s[46]++;
1731
+ return memo;
1732
+ }, {});
1733
+ }
1734
+ }
1735
+ var _default = exports.default = Config;
329
1736
  //# sourceMappingURL=index.js.map