@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,30 +1,2950 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
+ require("core-js/modules/es.array.filter.js");
4
+ require("core-js/modules/es.object.get-own-property-descriptors.js");
5
+ require("core-js/modules/esnext.iterator.constructor.js");
6
+ require("core-js/modules/esnext.iterator.filter.js");
7
+ require("core-js/modules/esnext.iterator.for-each.js");
3
8
  Object.defineProperty(exports, "__esModule", {
4
9
  value: true
5
10
  });
6
- exports.TYPE = undefined;
7
-
8
- 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; };
9
-
10
- 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; }; }();
11
-
12
- var _auth0Js = require('auth0-js');
13
-
14
- var _auth0Js2 = _interopRequireDefault(_auth0Js);
15
-
16
- var _axios = require('axios');
17
-
18
- var _axios2 = _interopRequireDefault(_axios);
19
-
20
- var _urlParse = require('url-parse');
21
-
22
- var _urlParse2 = _interopRequireDefault(_urlParse);
23
-
24
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25
-
26
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
27
-
11
+ exports.default = exports.TYPE = void 0;
12
+ require("core-js/modules/es.array.index-of.js");
13
+ require("core-js/modules/es.json.stringify.js");
14
+ require("core-js/modules/es.promise.js");
15
+ var _auth0Js = _interopRequireDefault(require("auth0-js"));
16
+ var _axios = _interopRequireDefault(require("axios"));
17
+ var _urlParse = _interopRequireDefault(require("url-parse"));
18
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
19
+ function cov_12li4x65wn() {
20
+ var path = "/home/runner/work/contxt-sdk-js/contxt-sdk-js/src/sessionTypes/auth0WebAuth.js";
21
+ var hash = "bfc380f7966db186ea7d081f2f7f7bfdc8d7703f";
22
+ var global = new Function("return this")();
23
+ var gcv = "__coverage__";
24
+ var coverageData = {
25
+ path: "/home/runner/work/contxt-sdk-js/contxt-sdk-js/src/sessionTypes/auth0WebAuth.js",
26
+ statementMap: {
27
+ "0": {
28
+ start: {
29
+ line: 73,
30
+ column: 4
31
+ },
32
+ end: {
33
+ line: 73,
34
+ column: 20
35
+ }
36
+ },
37
+ "1": {
38
+ start: {
39
+ line: 75,
40
+ column: 4
41
+ },
42
+ end: {
43
+ line: 77,
44
+ column: 5
45
+ }
46
+ },
47
+ "2": {
48
+ start: {
49
+ line: 76,
50
+ column: 6
51
+ },
52
+ end: {
53
+ line: 76,
54
+ column: 69
55
+ }
56
+ },
57
+ "3": {
58
+ start: {
59
+ line: 79,
60
+ column: 4
61
+ },
62
+ end: {
63
+ line: 80,
64
+ column: 74
65
+ }
66
+ },
67
+ "4": {
68
+ start: {
69
+ line: 81,
70
+ column: 4
71
+ },
72
+ end: {
73
+ line: 82,
74
+ column: 66
75
+ }
76
+ },
77
+ "5": {
78
+ start: {
79
+ line: 83,
80
+ column: 4
81
+ },
82
+ end: {
83
+ line: 83,
84
+ column: 49
85
+ }
86
+ },
87
+ "6": {
88
+ start: {
89
+ line: 84,
90
+ column: 4
91
+ },
92
+ end: {
93
+ line: 84,
94
+ column: 39
95
+ }
96
+ },
97
+ "7": {
98
+ start: {
99
+ line: 85,
100
+ column: 4
101
+ },
102
+ end: {
103
+ line: 85,
104
+ column: 29
105
+ }
106
+ },
107
+ "8": {
108
+ start: {
109
+ line: 87,
110
+ column: 23
111
+ },
112
+ end: {
113
+ line: 87,
114
+ column: 47
115
+ }
116
+ },
117
+ "9": {
118
+ start: {
119
+ line: 88,
120
+ column: 4
121
+ },
122
+ end: {
123
+ line: 88,
124
+ column: 72
125
+ }
126
+ },
127
+ "10": {
128
+ start: {
129
+ line: 90,
130
+ column: 4
131
+ },
132
+ end: {
133
+ line: 97,
134
+ column: 7
135
+ }
136
+ },
137
+ "11": {
138
+ start: {
139
+ line: 99,
140
+ column: 4
141
+ },
142
+ end: {
143
+ line: 101,
144
+ column: 5
145
+ }
146
+ },
147
+ "12": {
148
+ start: {
149
+ line: 100,
150
+ column: 6
151
+ },
152
+ end: {
153
+ line: 100,
154
+ column: 37
155
+ }
156
+ },
157
+ "13": {
158
+ start: {
159
+ line: 112,
160
+ column: 20
161
+ },
162
+ end: {
163
+ line: 112,
164
+ column: 74
165
+ }
166
+ },
167
+ "14": {
168
+ start: {
169
+ line: 114,
170
+ column: 4
171
+ },
172
+ end: {
173
+ line: 116,
174
+ column: 7
175
+ }
176
+ },
177
+ "15": {
178
+ start: {
179
+ line: 115,
180
+ column: 6
181
+ },
182
+ end: {
183
+ line: 115,
184
+ column: 47
185
+ }
186
+ },
187
+ "16": {
188
+ start: {
189
+ line: 126,
190
+ column: 4
191
+ },
192
+ end: {
193
+ line: 128,
194
+ column: 5
195
+ }
196
+ },
197
+ "17": {
198
+ start: {
199
+ line: 127,
200
+ column: 6
201
+ },
202
+ end: {
203
+ line: 127,
204
+ column: 63
205
+ }
206
+ },
207
+ "18": {
208
+ start: {
209
+ line: 130,
210
+ column: 4
211
+ },
212
+ end: {
213
+ line: 130,
214
+ column: 58
215
+ }
216
+ },
217
+ "19": {
218
+ start: {
219
+ line: 142,
220
+ column: 4
221
+ },
222
+ end: {
223
+ line: 144,
224
+ column: 5
225
+ }
226
+ },
227
+ "20": {
228
+ start: {
229
+ line: 143,
230
+ column: 6
231
+ },
232
+ end: {
233
+ line: 143,
234
+ column: 63
235
+ }
236
+ },
237
+ "21": {
238
+ start: {
239
+ line: 146,
240
+ column: 21
241
+ },
242
+ end: {
243
+ line: 146,
244
+ column: 61
245
+ }
246
+ },
247
+ "22": {
248
+ start: {
249
+ line: 148,
250
+ column: 4
251
+ },
252
+ end: {
253
+ line: 150,
254
+ column: 5
255
+ }
256
+ },
257
+ "23": {
258
+ start: {
259
+ line: 149,
260
+ column: 6
261
+ },
262
+ end: {
263
+ line: 149,
264
+ column: 66
265
+ }
266
+ },
267
+ "24": {
268
+ start: {
269
+ line: 152,
270
+ column: 4
271
+ },
272
+ end: {
273
+ line: 167,
274
+ column: 5
275
+ }
276
+ },
277
+ "25": {
278
+ start: {
279
+ line: 153,
280
+ column: 6
281
+ },
282
+ end: {
283
+ line: 166,
284
+ column: 47
285
+ }
286
+ },
287
+ "26": {
288
+ start: {
289
+ line: 166,
290
+ column: 28
291
+ },
292
+ end: {
293
+ line: 166,
294
+ column: 45
295
+ }
296
+ },
297
+ "27": {
298
+ start: {
299
+ line: 169,
300
+ column: 4
301
+ },
302
+ end: {
303
+ line: 169,
304
+ column: 45
305
+ }
306
+ },
307
+ "28": {
308
+ start: {
309
+ line: 180,
310
+ column: 4
311
+ },
312
+ end: {
313
+ line: 197,
314
+ column: 7
315
+ }
316
+ },
317
+ "29": {
318
+ start: {
319
+ line: 181,
320
+ column: 6
321
+ },
322
+ end: {
323
+ line: 196,
324
+ column: 8
325
+ }
326
+ },
327
+ "30": {
328
+ start: {
329
+ line: 184,
330
+ column: 10
331
+ },
332
+ end: {
333
+ line: 186,
334
+ column: 11
335
+ }
336
+ },
337
+ "31": {
338
+ start: {
339
+ line: 185,
340
+ column: 12
341
+ },
342
+ end: {
343
+ line: 185,
344
+ column: 31
345
+ }
346
+ },
347
+ "32": {
348
+ start: {
349
+ line: 188,
350
+ column: 35
351
+ },
352
+ end: {
353
+ line: 191,
354
+ column: 11
355
+ }
356
+ },
357
+ "33": {
358
+ start: {
359
+ line: 192,
360
+ column: 10
361
+ },
362
+ end: {
363
+ line: 192,
364
+ column: 45
365
+ }
366
+ },
367
+ "34": {
368
+ start: {
369
+ line: 194,
370
+ column: 10
371
+ },
372
+ end: {
373
+ line: 194,
374
+ column: 36
375
+ }
376
+ },
377
+ "35": {
378
+ start: {
379
+ line: 210,
380
+ column: 4
381
+ },
382
+ end: {
383
+ line: 225,
384
+ column: 9
385
+ }
386
+ },
387
+ "36": {
388
+ start: {
389
+ line: 213,
390
+ column: 8
391
+ },
392
+ end: {
393
+ line: 213,
394
+ column: 39
395
+ }
396
+ },
397
+ "37": {
398
+ start: {
399
+ line: 214,
400
+ column: 8
401
+ },
402
+ end: {
403
+ line: 214,
404
+ column: 39
405
+ }
406
+ },
407
+ "38": {
408
+ start: {
409
+ line: 216,
410
+ column: 33
411
+ },
412
+ end: {
413
+ line: 216,
414
+ column: 60
415
+ }
416
+ },
417
+ "39": {
418
+ start: {
419
+ line: 217,
420
+ column: 8
421
+ },
422
+ end: {
423
+ line: 217,
424
+ column: 43
425
+ }
426
+ },
427
+ "40": {
428
+ start: {
429
+ line: 220,
430
+ column: 8
431
+ },
432
+ end: {
433
+ line: 220,
434
+ column: 67
435
+ }
436
+ },
437
+ "41": {
438
+ start: {
439
+ line: 222,
440
+ column: 8
441
+ },
442
+ end: {
443
+ line: 222,
444
+ column: 30
445
+ }
446
+ },
447
+ "42": {
448
+ start: {
449
+ line: 224,
450
+ column: 8
451
+ },
452
+ end: {
453
+ line: 224,
454
+ column: 18
455
+ }
456
+ },
457
+ "43": {
458
+ start: {
459
+ line: 234,
460
+ column: 4
461
+ },
462
+ end: {
463
+ line: 238,
464
+ column: 6
465
+ }
466
+ },
467
+ "44": {
468
+ start: {
469
+ line: 248,
470
+ column: 22
471
+ },
472
+ end: {
473
+ line: 248,
474
+ column: 24
475
+ }
476
+ },
477
+ "45": {
478
+ start: {
479
+ line: 250,
480
+ column: 4
481
+ },
482
+ end: {
483
+ line: 252,
484
+ column: 5
485
+ }
486
+ },
487
+ "46": {
488
+ start: {
489
+ line: 251,
490
+ column: 6
491
+ },
492
+ end: {
493
+ line: 251,
494
+ column: 35
495
+ }
496
+ },
497
+ "47": {
498
+ start: {
499
+ line: 253,
500
+ column: 4
501
+ },
502
+ end: {
503
+ line: 253,
504
+ column: 39
505
+ }
506
+ },
507
+ "48": {
508
+ start: {
509
+ line: 267,
510
+ column: 4
511
+ },
512
+ end: {
513
+ line: 267,
514
+ column: 27
515
+ }
516
+ },
517
+ "49": {
518
+ start: {
519
+ line: 268,
520
+ column: 4
521
+ },
522
+ end: {
523
+ line: 268,
524
+ column: 29
525
+ }
526
+ },
527
+ "50": {
528
+ start: {
529
+ line: 270,
530
+ column: 4
531
+ },
532
+ end: {
533
+ line: 270,
534
+ column: 44
535
+ }
536
+ },
537
+ "51": {
538
+ start: {
539
+ line: 271,
540
+ column: 4
541
+ },
542
+ end: {
543
+ line: 271,
544
+ column: 42
545
+ }
546
+ },
547
+ "52": {
548
+ start: {
549
+ line: 273,
550
+ column: 4
551
+ },
552
+ end: {
553
+ line: 273,
554
+ column: 46
555
+ }
556
+ },
557
+ "53": {
558
+ start: {
559
+ line: 275,
560
+ column: 4
561
+ },
562
+ end: {
563
+ line: 278,
564
+ column: 7
565
+ }
566
+ },
567
+ "54": {
568
+ start: {
569
+ line: 291,
570
+ column: 4
571
+ },
572
+ end: {
573
+ line: 301,
574
+ column: 7
575
+ }
576
+ },
577
+ "55": {
578
+ start: {
579
+ line: 292,
580
+ column: 6
581
+ },
582
+ end: {
583
+ line: 300,
584
+ column: 9
585
+ }
586
+ },
587
+ "56": {
588
+ start: {
589
+ line: 293,
590
+ column: 8
591
+ },
592
+ end: {
593
+ line: 297,
594
+ column: 9
595
+ }
596
+ },
597
+ "57": {
598
+ start: {
599
+ line: 294,
600
+ column: 10
601
+ },
602
+ end: {
603
+ line: 296,
604
+ column: 12
605
+ }
606
+ },
607
+ "58": {
608
+ start: {
609
+ line: 299,
610
+ column: 8
611
+ },
612
+ end: {
613
+ line: 299,
614
+ column: 33
615
+ }
616
+ },
617
+ "59": {
618
+ start: {
619
+ line: 311,
620
+ column: 4
621
+ },
622
+ end: {
623
+ line: 311,
624
+ column: 31
625
+ }
626
+ },
627
+ "60": {
628
+ start: {
629
+ line: 321,
630
+ column: 4
631
+ },
632
+ end: {
633
+ line: 321,
634
+ column: 22
635
+ }
636
+ },
637
+ "61": {
638
+ start: {
639
+ line: 331,
640
+ column: 29
641
+ },
642
+ end: {
643
+ line: 331,
644
+ column: 70
645
+ }
646
+ },
647
+ "62": {
648
+ start: {
649
+ line: 332,
650
+ column: 4
651
+ },
652
+ end: {
653
+ line: 332,
654
+ column: 49
655
+ }
656
+ },
657
+ "63": {
658
+ start: {
659
+ line: 334,
660
+ column: 4
661
+ },
662
+ end: {
663
+ line: 334,
664
+ column: 35
665
+ }
666
+ },
667
+ "64": {
668
+ start: {
669
+ line: 347,
670
+ column: 4
671
+ },
672
+ end: {
673
+ line: 350,
674
+ column: 6
675
+ }
676
+ },
677
+ "65": {
678
+ start: {
679
+ line: 364,
680
+ column: 4
681
+ },
682
+ end: {
683
+ line: 395,
684
+ column: 9
685
+ }
686
+ },
687
+ "66": {
688
+ start: {
689
+ line: 366,
690
+ column: 8
691
+ },
692
+ end: {
693
+ line: 366,
694
+ column: 40
695
+ }
696
+ },
697
+ "67": {
698
+ start: {
699
+ line: 368,
700
+ column: 8
701
+ },
702
+ end: {
703
+ line: 368,
704
+ column: 33
705
+ }
706
+ },
707
+ "68": {
708
+ start: {
709
+ line: 370,
710
+ column: 8
711
+ },
712
+ end: {
713
+ line: 370,
714
+ column: 39
715
+ }
716
+ },
717
+ "69": {
718
+ start: {
719
+ line: 373,
720
+ column: 27
721
+ },
722
+ end: {
723
+ line: 373,
724
+ column: 30
725
+ }
726
+ },
727
+ "70": {
728
+ start: {
729
+ line: 375,
730
+ column: 8
731
+ },
732
+ end: {
733
+ line: 392,
734
+ column: 9
735
+ }
736
+ },
737
+ "71": {
738
+ start: {
739
+ line: 383,
740
+ column: 10
741
+ },
742
+ end: {
743
+ line: 383,
744
+ column: 62
745
+ }
746
+ },
747
+ "72": {
748
+ start: {
749
+ line: 385,
750
+ column: 10
751
+ },
752
+ end: {
753
+ line: 385,
754
+ column: 24
755
+ }
756
+ },
757
+ "73": {
758
+ start: {
759
+ line: 386,
760
+ column: 15
761
+ },
762
+ end: {
763
+ line: 392,
764
+ column: 9
765
+ }
766
+ },
767
+ "74": {
768
+ start: {
769
+ line: 387,
770
+ column: 10
771
+ },
772
+ end: {
773
+ line: 389,
774
+ column: 12
775
+ }
776
+ },
777
+ "75": {
778
+ start: {
779
+ line: 390,
780
+ column: 10
781
+ },
782
+ end: {
783
+ line: 390,
784
+ column: 38
785
+ }
786
+ },
787
+ "76": {
788
+ start: {
789
+ line: 391,
790
+ column: 10
791
+ },
792
+ end: {
793
+ line: 391,
794
+ column: 43
795
+ }
796
+ },
797
+ "77": {
798
+ start: {
799
+ line: 394,
800
+ column: 8
801
+ },
802
+ end: {
803
+ line: 394,
804
+ column: 27
805
+ }
806
+ },
807
+ "78": {
808
+ start: {
809
+ line: 399,
810
+ column: 18
811
+ },
812
+ end: {
813
+ line: 399,
814
+ column: 43
815
+ }
816
+ },
817
+ "79": {
818
+ start: {
819
+ line: 401,
820
+ column: 4
821
+ },
822
+ end: {
823
+ line: 403,
824
+ column: 5
825
+ }
826
+ },
827
+ "80": {
828
+ start: {
829
+ line: 402,
830
+ column: 6
831
+ },
832
+ end: {
833
+ line: 402,
834
+ column: 27
835
+ }
836
+ },
837
+ "81": {
838
+ start: {
839
+ line: 405,
840
+ column: 4
841
+ },
842
+ end: {
843
+ line: 411,
844
+ column: 6
845
+ }
846
+ },
847
+ "82": {
848
+ start: {
849
+ line: 413,
850
+ column: 4
851
+ },
852
+ end: {
853
+ line: 413,
854
+ column: 17
855
+ }
856
+ },
857
+ "83": {
858
+ start: {
859
+ line: 427,
860
+ column: 4
861
+ },
862
+ end: {
863
+ line: 437,
864
+ column: 7
865
+ }
866
+ },
867
+ "84": {
868
+ start: {
869
+ line: 428,
870
+ column: 6
871
+ },
872
+ end: {
873
+ line: 436,
874
+ column: 9
875
+ }
876
+ },
877
+ "85": {
878
+ start: {
879
+ line: 429,
880
+ column: 8
881
+ },
882
+ end: {
883
+ line: 433,
884
+ column: 9
885
+ }
886
+ },
887
+ "86": {
888
+ start: {
889
+ line: 430,
890
+ column: 10
891
+ },
892
+ end: {
893
+ line: 432,
894
+ column: 12
895
+ }
896
+ },
897
+ "87": {
898
+ start: {
899
+ line: 435,
900
+ column: 8
901
+ },
902
+ end: {
903
+ line: 435,
904
+ column: 35
905
+ }
906
+ },
907
+ "88": {
908
+ start: {
909
+ line: 447,
910
+ column: 6
911
+ },
912
+ end: {
913
+ line: 447,
914
+ column: 55
915
+ }
916
+ },
917
+ "89": {
918
+ start: {
919
+ line: 449,
920
+ column: 6
921
+ },
922
+ end: {
923
+ line: 449,
924
+ column: 58
925
+ }
926
+ },
927
+ "90": {
928
+ start: {
929
+ line: 450,
930
+ column: 18
931
+ },
932
+ end: {
933
+ line: 450,
934
+ column: 48
935
+ }
936
+ },
937
+ "91": {
938
+ start: {
939
+ line: 452,
940
+ column: 4
941
+ },
942
+ end: {
943
+ line: 454,
944
+ column: 5
945
+ }
946
+ },
947
+ "92": {
948
+ start: {
949
+ line: 453,
950
+ column: 6
951
+ },
952
+ end: {
953
+ line: 453,
954
+ column: 48
955
+ }
956
+ },
957
+ "93": {
958
+ start: {
959
+ line: 456,
960
+ column: 4
961
+ },
962
+ end: {
963
+ line: 458,
964
+ column: 14
965
+ }
966
+ },
967
+ "94": {
968
+ start: {
969
+ line: 457,
970
+ column: 6
971
+ },
972
+ end: {
973
+ line: 457,
974
+ column: 32
975
+ }
976
+ },
977
+ "95": {
978
+ start: {
979
+ line: 471,
980
+ column: 22
981
+ },
982
+ end: {
983
+ line: 471,
984
+ column: 51
985
+ }
986
+ },
987
+ "96": {
988
+ start: {
989
+ line: 473,
990
+ column: 4
991
+ },
992
+ end: {
993
+ line: 473,
994
+ column: 54
995
+ }
996
+ },
997
+ "97": {
998
+ start: {
999
+ line: 474,
1000
+ column: 4
1001
+ },
1002
+ end: {
1003
+ line: 474,
1004
+ column: 66
1005
+ }
1006
+ },
1007
+ "98": {
1008
+ start: {
1009
+ line: 476,
1010
+ column: 4
1011
+ },
1012
+ end: {
1013
+ line: 476,
1014
+ column: 48
1015
+ }
1016
+ },
1017
+ "99": {
1018
+ start: {
1019
+ line: 477,
1020
+ column: 4
1021
+ },
1022
+ end: {
1023
+ line: 477,
1024
+ column: 44
1025
+ }
1026
+ },
1027
+ "100": {
1028
+ start: {
1029
+ line: 481,
1030
+ column: 20
1031
+ },
1032
+ end: {
1033
+ line: 481,
1034
+ column: 34
1035
+ }
1036
+ }
1037
+ },
1038
+ fnMap: {
1039
+ "0": {
1040
+ name: "(anonymous_0)",
1041
+ decl: {
1042
+ start: {
1043
+ line: 72,
1044
+ column: 2
1045
+ },
1046
+ end: {
1047
+ line: 72,
1048
+ column: 3
1049
+ }
1050
+ },
1051
+ loc: {
1052
+ start: {
1053
+ line: 72,
1054
+ column: 19
1055
+ },
1056
+ end: {
1057
+ line: 102,
1058
+ column: 3
1059
+ }
1060
+ },
1061
+ line: 72
1062
+ },
1063
+ "1": {
1064
+ name: "(anonymous_1)",
1065
+ decl: {
1066
+ start: {
1067
+ line: 111,
1068
+ column: 2
1069
+ },
1070
+ end: {
1071
+ line: 111,
1072
+ column: 3
1073
+ }
1074
+ },
1075
+ loc: {
1076
+ start: {
1077
+ line: 111,
1078
+ column: 37
1079
+ },
1080
+ end: {
1081
+ line: 117,
1082
+ column: 3
1083
+ }
1084
+ },
1085
+ line: 111
1086
+ },
1087
+ "2": {
1088
+ name: "(anonymous_2)",
1089
+ decl: {
1090
+ start: {
1091
+ line: 114,
1092
+ column: 24
1093
+ },
1094
+ end: {
1095
+ line: 114,
1096
+ column: 25
1097
+ }
1098
+ },
1099
+ loc: {
1100
+ start: {
1101
+ line: 114,
1102
+ column: 30
1103
+ },
1104
+ end: {
1105
+ line: 116,
1106
+ column: 5
1107
+ }
1108
+ },
1109
+ line: 114
1110
+ },
1111
+ "3": {
1112
+ name: "(anonymous_3)",
1113
+ decl: {
1114
+ start: {
1115
+ line: 125,
1116
+ column: 2
1117
+ },
1118
+ end: {
1119
+ line: 125,
1120
+ column: 3
1121
+ }
1122
+ },
1123
+ loc: {
1124
+ start: {
1125
+ line: 125,
1126
+ column: 26
1127
+ },
1128
+ end: {
1129
+ line: 131,
1130
+ column: 3
1131
+ }
1132
+ },
1133
+ line: 125
1134
+ },
1135
+ "4": {
1136
+ name: "(anonymous_4)",
1137
+ decl: {
1138
+ start: {
1139
+ line: 141,
1140
+ column: 2
1141
+ },
1142
+ end: {
1143
+ line: 141,
1144
+ column: 3
1145
+ }
1146
+ },
1147
+ loc: {
1148
+ start: {
1149
+ line: 141,
1150
+ column: 35
1151
+ },
1152
+ end: {
1153
+ line: 170,
1154
+ column: 3
1155
+ }
1156
+ },
1157
+ line: 141
1158
+ },
1159
+ "5": {
1160
+ name: "(anonymous_5)",
1161
+ decl: {
1162
+ start: {
1163
+ line: 166,
1164
+ column: 14
1165
+ },
1166
+ end: {
1167
+ line: 166,
1168
+ column: 15
1169
+ }
1170
+ },
1171
+ loc: {
1172
+ start: {
1173
+ line: 166,
1174
+ column: 28
1175
+ },
1176
+ end: {
1177
+ line: 166,
1178
+ column: 45
1179
+ }
1180
+ },
1181
+ line: 166
1182
+ },
1183
+ "6": {
1184
+ name: "(anonymous_6)",
1185
+ decl: {
1186
+ start: {
1187
+ line: 179,
1188
+ column: 2
1189
+ },
1190
+ end: {
1191
+ line: 179,
1192
+ column: 3
1193
+ }
1194
+ },
1195
+ loc: {
1196
+ start: {
1197
+ line: 179,
1198
+ column: 15
1199
+ },
1200
+ end: {
1201
+ line: 198,
1202
+ column: 3
1203
+ }
1204
+ },
1205
+ line: 179
1206
+ },
1207
+ "7": {
1208
+ name: "(anonymous_7)",
1209
+ decl: {
1210
+ start: {
1211
+ line: 180,
1212
+ column: 23
1213
+ },
1214
+ end: {
1215
+ line: 180,
1216
+ column: 24
1217
+ }
1218
+ },
1219
+ loc: {
1220
+ start: {
1221
+ line: 180,
1222
+ column: 44
1223
+ },
1224
+ end: {
1225
+ line: 197,
1226
+ column: 5
1227
+ }
1228
+ },
1229
+ line: 180
1230
+ },
1231
+ "8": {
1232
+ name: "(anonymous_8)",
1233
+ decl: {
1234
+ start: {
1235
+ line: 183,
1236
+ column: 8
1237
+ },
1238
+ end: {
1239
+ line: 183,
1240
+ column: 9
1241
+ }
1242
+ },
1243
+ loc: {
1244
+ start: {
1245
+ line: 183,
1246
+ column: 26
1247
+ },
1248
+ end: {
1249
+ line: 195,
1250
+ column: 9
1251
+ }
1252
+ },
1253
+ line: 183
1254
+ },
1255
+ "9": {
1256
+ name: "(anonymous_9)",
1257
+ decl: {
1258
+ start: {
1259
+ line: 209,
1260
+ column: 2
1261
+ },
1262
+ end: {
1263
+ line: 209,
1264
+ column: 3
1265
+ }
1266
+ },
1267
+ loc: {
1268
+ start: {
1269
+ line: 209,
1270
+ column: 25
1271
+ },
1272
+ end: {
1273
+ line: 226,
1274
+ column: 3
1275
+ }
1276
+ },
1277
+ line: 209
1278
+ },
1279
+ "10": {
1280
+ name: "(anonymous_10)",
1281
+ decl: {
1282
+ start: {
1283
+ line: 212,
1284
+ column: 12
1285
+ },
1286
+ end: {
1287
+ line: 212,
1288
+ column: 13
1289
+ }
1290
+ },
1291
+ loc: {
1292
+ start: {
1293
+ line: 212,
1294
+ column: 28
1295
+ },
1296
+ end: {
1297
+ line: 218,
1298
+ column: 7
1299
+ }
1300
+ },
1301
+ line: 212
1302
+ },
1303
+ "11": {
1304
+ name: "(anonymous_11)",
1305
+ decl: {
1306
+ start: {
1307
+ line: 219,
1308
+ column: 13
1309
+ },
1310
+ end: {
1311
+ line: 219,
1312
+ column: 14
1313
+ }
1314
+ },
1315
+ loc: {
1316
+ start: {
1317
+ line: 219,
1318
+ column: 22
1319
+ },
1320
+ end: {
1321
+ line: 225,
1322
+ column: 7
1323
+ }
1324
+ },
1325
+ line: 219
1326
+ },
1327
+ "12": {
1328
+ name: "(anonymous_12)",
1329
+ decl: {
1330
+ start: {
1331
+ line: 233,
1332
+ column: 2
1333
+ },
1334
+ end: {
1335
+ line: 233,
1336
+ column: 3
1337
+ }
1338
+ },
1339
+ loc: {
1340
+ start: {
1341
+ line: 233,
1342
+ column: 20
1343
+ },
1344
+ end: {
1345
+ line: 239,
1346
+ column: 3
1347
+ }
1348
+ },
1349
+ line: 233
1350
+ },
1351
+ "13": {
1352
+ name: "(anonymous_13)",
1353
+ decl: {
1354
+ start: {
1355
+ line: 247,
1356
+ column: 2
1357
+ },
1358
+ end: {
1359
+ line: 247,
1360
+ column: 3
1361
+ }
1362
+ },
1363
+ loc: {
1364
+ start: {
1365
+ line: 247,
1366
+ column: 22
1367
+ },
1368
+ end: {
1369
+ line: 254,
1370
+ column: 3
1371
+ }
1372
+ },
1373
+ line: 247
1374
+ },
1375
+ "14": {
1376
+ name: "(anonymous_14)",
1377
+ decl: {
1378
+ start: {
1379
+ line: 266,
1380
+ column: 2
1381
+ },
1382
+ end: {
1383
+ line: 266,
1384
+ column: 3
1385
+ }
1386
+ },
1387
+ loc: {
1388
+ start: {
1389
+ line: 266,
1390
+ column: 18
1391
+ },
1392
+ end: {
1393
+ line: 279,
1394
+ column: 3
1395
+ }
1396
+ },
1397
+ line: 266
1398
+ },
1399
+ "15": {
1400
+ name: "(anonymous_15)",
1401
+ decl: {
1402
+ start: {
1403
+ line: 290,
1404
+ column: 2
1405
+ },
1406
+ end: {
1407
+ line: 290,
1408
+ column: 3
1409
+ }
1410
+ },
1411
+ loc: {
1412
+ start: {
1413
+ line: 290,
1414
+ column: 30
1415
+ },
1416
+ end: {
1417
+ line: 302,
1418
+ column: 3
1419
+ }
1420
+ },
1421
+ line: 290
1422
+ },
1423
+ "16": {
1424
+ name: "(anonymous_16)",
1425
+ decl: {
1426
+ start: {
1427
+ line: 291,
1428
+ column: 23
1429
+ },
1430
+ end: {
1431
+ line: 291,
1432
+ column: 24
1433
+ }
1434
+ },
1435
+ loc: {
1436
+ start: {
1437
+ line: 291,
1438
+ column: 44
1439
+ },
1440
+ end: {
1441
+ line: 301,
1442
+ column: 5
1443
+ }
1444
+ },
1445
+ line: 291
1446
+ },
1447
+ "17": {
1448
+ name: "(anonymous_17)",
1449
+ decl: {
1450
+ start: {
1451
+ line: 292,
1452
+ column: 40
1453
+ },
1454
+ end: {
1455
+ line: 292,
1456
+ column: 41
1457
+ }
1458
+ },
1459
+ loc: {
1460
+ start: {
1461
+ line: 292,
1462
+ column: 59
1463
+ },
1464
+ end: {
1465
+ line: 300,
1466
+ column: 7
1467
+ }
1468
+ },
1469
+ line: 292
1470
+ },
1471
+ "18": {
1472
+ name: "(anonymous_18)",
1473
+ decl: {
1474
+ start: {
1475
+ line: 310,
1476
+ column: 2
1477
+ },
1478
+ end: {
1479
+ line: 310,
1480
+ column: 3
1481
+ }
1482
+ },
1483
+ loc: {
1484
+ start: {
1485
+ line: 310,
1486
+ column: 31
1487
+ },
1488
+ end: {
1489
+ line: 312,
1490
+ column: 3
1491
+ }
1492
+ },
1493
+ line: 310
1494
+ },
1495
+ "19": {
1496
+ name: "(anonymous_19)",
1497
+ decl: {
1498
+ start: {
1499
+ line: 320,
1500
+ column: 2
1501
+ },
1502
+ end: {
1503
+ line: 320,
1504
+ column: 3
1505
+ }
1506
+ },
1507
+ loc: {
1508
+ start: {
1509
+ line: 320,
1510
+ column: 37
1511
+ },
1512
+ end: {
1513
+ line: 322,
1514
+ column: 3
1515
+ }
1516
+ },
1517
+ line: 320
1518
+ },
1519
+ "20": {
1520
+ name: "(anonymous_20)",
1521
+ decl: {
1522
+ start: {
1523
+ line: 330,
1524
+ column: 2
1525
+ },
1526
+ end: {
1527
+ line: 330,
1528
+ column: 3
1529
+ }
1530
+ },
1531
+ loc: {
1532
+ start: {
1533
+ line: 330,
1534
+ column: 25
1535
+ },
1536
+ end: {
1537
+ line: 335,
1538
+ column: 3
1539
+ }
1540
+ },
1541
+ line: 330
1542
+ },
1543
+ "21": {
1544
+ name: "(anonymous_21)",
1545
+ decl: {
1546
+ start: {
1547
+ line: 346,
1548
+ column: 2
1549
+ },
1550
+ end: {
1551
+ line: 346,
1552
+ column: 3
1553
+ }
1554
+ },
1555
+ loc: {
1556
+ start: {
1557
+ line: 346,
1558
+ column: 22
1559
+ },
1560
+ end: {
1561
+ line: 351,
1562
+ column: 3
1563
+ }
1564
+ },
1565
+ line: 346
1566
+ },
1567
+ "22": {
1568
+ name: "(anonymous_22)",
1569
+ decl: {
1570
+ start: {
1571
+ line: 363,
1572
+ column: 2
1573
+ },
1574
+ end: {
1575
+ line: 363,
1576
+ column: 3
1577
+ }
1578
+ },
1579
+ loc: {
1580
+ start: {
1581
+ line: 363,
1582
+ column: 23
1583
+ },
1584
+ end: {
1585
+ line: 396,
1586
+ column: 3
1587
+ }
1588
+ },
1589
+ line: 363
1590
+ },
1591
+ "23": {
1592
+ name: "(anonymous_23)",
1593
+ decl: {
1594
+ start: {
1595
+ line: 365,
1596
+ column: 12
1597
+ },
1598
+ end: {
1599
+ line: 365,
1600
+ column: 13
1601
+ }
1602
+ },
1603
+ loc: {
1604
+ start: {
1605
+ line: 365,
1606
+ column: 29
1607
+ },
1608
+ end: {
1609
+ line: 371,
1610
+ column: 7
1611
+ }
1612
+ },
1613
+ line: 365
1614
+ },
1615
+ "24": {
1616
+ name: "(anonymous_24)",
1617
+ decl: {
1618
+ start: {
1619
+ line: 372,
1620
+ column: 13
1621
+ },
1622
+ end: {
1623
+ line: 372,
1624
+ column: 14
1625
+ }
1626
+ },
1627
+ loc: {
1628
+ start: {
1629
+ line: 372,
1630
+ column: 22
1631
+ },
1632
+ end: {
1633
+ line: 395,
1634
+ column: 7
1635
+ }
1636
+ },
1637
+ line: 372
1638
+ },
1639
+ "25": {
1640
+ name: "(anonymous_25)",
1641
+ decl: {
1642
+ start: {
1643
+ line: 398,
1644
+ column: 2
1645
+ },
1646
+ end: {
1647
+ line: 398,
1648
+ column: 3
1649
+ }
1650
+ },
1651
+ loc: {
1652
+ start: {
1653
+ line: 398,
1654
+ column: 34
1655
+ },
1656
+ end: {
1657
+ line: 414,
1658
+ column: 3
1659
+ }
1660
+ },
1661
+ line: 398
1662
+ },
1663
+ "26": {
1664
+ name: "(anonymous_26)",
1665
+ decl: {
1666
+ start: {
1667
+ line: 426,
1668
+ column: 2
1669
+ },
1670
+ end: {
1671
+ line: 426,
1672
+ column: 3
1673
+ }
1674
+ },
1675
+ loc: {
1676
+ start: {
1677
+ line: 426,
1678
+ column: 15
1679
+ },
1680
+ end: {
1681
+ line: 438,
1682
+ column: 3
1683
+ }
1684
+ },
1685
+ line: 426
1686
+ },
1687
+ "27": {
1688
+ name: "(anonymous_27)",
1689
+ decl: {
1690
+ start: {
1691
+ line: 427,
1692
+ column: 23
1693
+ },
1694
+ end: {
1695
+ line: 427,
1696
+ column: 24
1697
+ }
1698
+ },
1699
+ loc: {
1700
+ start: {
1701
+ line: 427,
1702
+ column: 44
1703
+ },
1704
+ end: {
1705
+ line: 437,
1706
+ column: 5
1707
+ }
1708
+ },
1709
+ line: 427
1710
+ },
1711
+ "28": {
1712
+ name: "(anonymous_28)",
1713
+ decl: {
1714
+ start: {
1715
+ line: 428,
1716
+ column: 28
1717
+ },
1718
+ end: {
1719
+ line: 428,
1720
+ column: 29
1721
+ }
1722
+ },
1723
+ loc: {
1724
+ start: {
1725
+ line: 428,
1726
+ column: 49
1727
+ },
1728
+ end: {
1729
+ line: 436,
1730
+ column: 7
1731
+ }
1732
+ },
1733
+ line: 428
1734
+ },
1735
+ "29": {
1736
+ name: "(anonymous_29)",
1737
+ decl: {
1738
+ start: {
1739
+ line: 445,
1740
+ column: 2
1741
+ },
1742
+ end: {
1743
+ line: 445,
1744
+ column: 3
1745
+ }
1746
+ },
1747
+ loc: {
1748
+ start: {
1749
+ line: 445,
1750
+ column: 28
1751
+ },
1752
+ end: {
1753
+ line: 459,
1754
+ column: 3
1755
+ }
1756
+ },
1757
+ line: 445
1758
+ },
1759
+ "30": {
1760
+ name: "(anonymous_30)",
1761
+ decl: {
1762
+ start: {
1763
+ line: 456,
1764
+ column: 45
1765
+ },
1766
+ end: {
1767
+ line: 456,
1768
+ column: 46
1769
+ }
1770
+ },
1771
+ loc: {
1772
+ start: {
1773
+ line: 456,
1774
+ column: 51
1775
+ },
1776
+ end: {
1777
+ line: 458,
1778
+ column: 5
1779
+ }
1780
+ },
1781
+ line: 456
1782
+ },
1783
+ "31": {
1784
+ name: "(anonymous_31)",
1785
+ decl: {
1786
+ start: {
1787
+ line: 470,
1788
+ column: 2
1789
+ },
1790
+ end: {
1791
+ line: 470,
1792
+ column: 3
1793
+ }
1794
+ },
1795
+ loc: {
1796
+ start: {
1797
+ line: 470,
1798
+ column: 44
1799
+ },
1800
+ end: {
1801
+ line: 478,
1802
+ column: 3
1803
+ }
1804
+ },
1805
+ line: 470
1806
+ }
1807
+ },
1808
+ branchMap: {
1809
+ "0": {
1810
+ loc: {
1811
+ start: {
1812
+ line: 75,
1813
+ column: 4
1814
+ },
1815
+ end: {
1816
+ line: 77,
1817
+ column: 5
1818
+ }
1819
+ },
1820
+ type: "if",
1821
+ locations: [{
1822
+ start: {
1823
+ line: 75,
1824
+ column: 4
1825
+ },
1826
+ end: {
1827
+ line: 77,
1828
+ column: 5
1829
+ }
1830
+ }, {
1831
+ start: {
1832
+ line: undefined,
1833
+ column: undefined
1834
+ },
1835
+ end: {
1836
+ line: undefined,
1837
+ column: undefined
1838
+ }
1839
+ }],
1840
+ line: 75
1841
+ },
1842
+ "1": {
1843
+ loc: {
1844
+ start: {
1845
+ line: 80,
1846
+ column: 6
1847
+ },
1848
+ end: {
1849
+ line: 80,
1850
+ column: 73
1851
+ }
1852
+ },
1853
+ type: "binary-expr",
1854
+ locations: [{
1855
+ start: {
1856
+ line: 80,
1857
+ column: 6
1858
+ },
1859
+ end: {
1860
+ line: 80,
1861
+ column: 42
1862
+ }
1863
+ }, {
1864
+ start: {
1865
+ line: 80,
1866
+ column: 46
1867
+ },
1868
+ end: {
1869
+ line: 80,
1870
+ column: 73
1871
+ }
1872
+ }],
1873
+ line: 80
1874
+ },
1875
+ "2": {
1876
+ loc: {
1877
+ start: {
1878
+ line: 82,
1879
+ column: 6
1880
+ },
1881
+ end: {
1882
+ line: 82,
1883
+ column: 65
1884
+ }
1885
+ },
1886
+ type: "binary-expr",
1887
+ locations: [{
1888
+ start: {
1889
+ line: 82,
1890
+ column: 6
1891
+ },
1892
+ end: {
1893
+ line: 82,
1894
+ column: 38
1895
+ }
1896
+ }, {
1897
+ start: {
1898
+ line: 82,
1899
+ column: 42
1900
+ },
1901
+ end: {
1902
+ line: 82,
1903
+ column: 65
1904
+ }
1905
+ }],
1906
+ line: 82
1907
+ },
1908
+ "3": {
1909
+ loc: {
1910
+ start: {
1911
+ line: 99,
1912
+ column: 4
1913
+ },
1914
+ end: {
1915
+ line: 101,
1916
+ column: 5
1917
+ }
1918
+ },
1919
+ type: "if",
1920
+ locations: [{
1921
+ start: {
1922
+ line: 99,
1923
+ column: 4
1924
+ },
1925
+ end: {
1926
+ line: 101,
1927
+ column: 5
1928
+ }
1929
+ }, {
1930
+ start: {
1931
+ line: undefined,
1932
+ column: undefined
1933
+ },
1934
+ end: {
1935
+ line: undefined,
1936
+ column: undefined
1937
+ }
1938
+ }],
1939
+ line: 99
1940
+ },
1941
+ "4": {
1942
+ loc: {
1943
+ start: {
1944
+ line: 112,
1945
+ column: 20
1946
+ },
1947
+ end: {
1948
+ line: 112,
1949
+ column: 74
1950
+ }
1951
+ },
1952
+ type: "binary-expr",
1953
+ locations: [{
1954
+ start: {
1955
+ line: 112,
1956
+ column: 20
1957
+ },
1958
+ end: {
1959
+ line: 112,
1960
+ column: 53
1961
+ }
1962
+ }, {
1963
+ start: {
1964
+ line: 112,
1965
+ column: 57
1966
+ },
1967
+ end: {
1968
+ line: 112,
1969
+ column: 74
1970
+ }
1971
+ }],
1972
+ line: 112
1973
+ },
1974
+ "5": {
1975
+ loc: {
1976
+ start: {
1977
+ line: 126,
1978
+ column: 4
1979
+ },
1980
+ end: {
1981
+ line: 128,
1982
+ column: 5
1983
+ }
1984
+ },
1985
+ type: "if",
1986
+ locations: [{
1987
+ start: {
1988
+ line: 126,
1989
+ column: 4
1990
+ },
1991
+ end: {
1992
+ line: 128,
1993
+ column: 5
1994
+ }
1995
+ }, {
1996
+ start: {
1997
+ line: undefined,
1998
+ column: undefined
1999
+ },
2000
+ end: {
2001
+ line: undefined,
2002
+ column: undefined
2003
+ }
2004
+ }],
2005
+ line: 126
2006
+ },
2007
+ "6": {
2008
+ loc: {
2009
+ start: {
2010
+ line: 142,
2011
+ column: 4
2012
+ },
2013
+ end: {
2014
+ line: 144,
2015
+ column: 5
2016
+ }
2017
+ },
2018
+ type: "if",
2019
+ locations: [{
2020
+ start: {
2021
+ line: 142,
2022
+ column: 4
2023
+ },
2024
+ end: {
2025
+ line: 144,
2026
+ column: 5
2027
+ }
2028
+ }, {
2029
+ start: {
2030
+ line: undefined,
2031
+ column: undefined
2032
+ },
2033
+ end: {
2034
+ line: undefined,
2035
+ column: undefined
2036
+ }
2037
+ }],
2038
+ line: 142
2039
+ },
2040
+ "7": {
2041
+ loc: {
2042
+ start: {
2043
+ line: 148,
2044
+ column: 4
2045
+ },
2046
+ end: {
2047
+ line: 150,
2048
+ column: 5
2049
+ }
2050
+ },
2051
+ type: "if",
2052
+ locations: [{
2053
+ start: {
2054
+ line: 148,
2055
+ column: 4
2056
+ },
2057
+ end: {
2058
+ line: 150,
2059
+ column: 5
2060
+ }
2061
+ }, {
2062
+ start: {
2063
+ line: undefined,
2064
+ column: undefined
2065
+ },
2066
+ end: {
2067
+ line: undefined,
2068
+ column: undefined
2069
+ }
2070
+ }],
2071
+ line: 148
2072
+ },
2073
+ "8": {
2074
+ loc: {
2075
+ start: {
2076
+ line: 148,
2077
+ column: 10
2078
+ },
2079
+ end: {
2080
+ line: 148,
2081
+ column: 39
2082
+ }
2083
+ },
2084
+ type: "binary-expr",
2085
+ locations: [{
2086
+ start: {
2087
+ line: 148,
2088
+ column: 10
2089
+ },
2090
+ end: {
2091
+ line: 148,
2092
+ column: 18
2093
+ }
2094
+ }, {
2095
+ start: {
2096
+ line: 148,
2097
+ column: 22
2098
+ },
2099
+ end: {
2100
+ line: 148,
2101
+ column: 39
2102
+ }
2103
+ }],
2104
+ line: 148
2105
+ },
2106
+ "9": {
2107
+ loc: {
2108
+ start: {
2109
+ line: 152,
2110
+ column: 4
2111
+ },
2112
+ end: {
2113
+ line: 167,
2114
+ column: 5
2115
+ }
2116
+ },
2117
+ type: "if",
2118
+ locations: [{
2119
+ start: {
2120
+ line: 152,
2121
+ column: 4
2122
+ },
2123
+ end: {
2124
+ line: 167,
2125
+ column: 5
2126
+ }
2127
+ }, {
2128
+ start: {
2129
+ line: undefined,
2130
+ column: undefined
2131
+ },
2132
+ end: {
2133
+ line: undefined,
2134
+ column: undefined
2135
+ }
2136
+ }],
2137
+ line: 152
2138
+ },
2139
+ "10": {
2140
+ loc: {
2141
+ start: {
2142
+ line: 184,
2143
+ column: 10
2144
+ },
2145
+ end: {
2146
+ line: 186,
2147
+ column: 11
2148
+ }
2149
+ },
2150
+ type: "if",
2151
+ locations: [{
2152
+ start: {
2153
+ line: 184,
2154
+ column: 10
2155
+ },
2156
+ end: {
2157
+ line: 186,
2158
+ column: 11
2159
+ }
2160
+ }, {
2161
+ start: {
2162
+ line: undefined,
2163
+ column: undefined
2164
+ },
2165
+ end: {
2166
+ line: undefined,
2167
+ column: undefined
2168
+ }
2169
+ }],
2170
+ line: 184
2171
+ },
2172
+ "11": {
2173
+ loc: {
2174
+ start: {
2175
+ line: 235,
2176
+ column: 6
2177
+ },
2178
+ end: {
2179
+ line: 237,
2180
+ column: 46
2181
+ }
2182
+ },
2183
+ type: "binary-expr",
2184
+ locations: [{
2185
+ start: {
2186
+ line: 235,
2187
+ column: 6
2188
+ },
2189
+ end: {
2190
+ line: 235,
2191
+ column: 23
2192
+ }
2193
+ }, {
2194
+ start: {
2195
+ line: 236,
2196
+ column: 6
2197
+ },
2198
+ end: {
2199
+ line: 236,
2200
+ column: 35
2201
+ }
2202
+ }, {
2203
+ start: {
2204
+ line: 237,
2205
+ column: 6
2206
+ },
2207
+ end: {
2208
+ line: 237,
2209
+ column: 46
2210
+ }
2211
+ }],
2212
+ line: 235
2213
+ },
2214
+ "12": {
2215
+ loc: {
2216
+ start: {
2217
+ line: 247,
2218
+ column: 8
2219
+ },
2220
+ end: {
2221
+ line: 247,
2222
+ column: 20
2223
+ }
2224
+ },
2225
+ type: "default-arg",
2226
+ locations: [{
2227
+ start: {
2228
+ line: 247,
2229
+ column: 18
2230
+ },
2231
+ end: {
2232
+ line: 247,
2233
+ column: 20
2234
+ }
2235
+ }],
2236
+ line: 247
2237
+ },
2238
+ "13": {
2239
+ loc: {
2240
+ start: {
2241
+ line: 250,
2242
+ column: 4
2243
+ },
2244
+ end: {
2245
+ line: 252,
2246
+ column: 5
2247
+ }
2248
+ },
2249
+ type: "if",
2250
+ locations: [{
2251
+ start: {
2252
+ line: 250,
2253
+ column: 4
2254
+ },
2255
+ end: {
2256
+ line: 252,
2257
+ column: 5
2258
+ }
2259
+ }, {
2260
+ start: {
2261
+ line: undefined,
2262
+ column: undefined
2263
+ },
2264
+ end: {
2265
+ line: undefined,
2266
+ column: undefined
2267
+ }
2268
+ }],
2269
+ line: 250
2270
+ },
2271
+ "14": {
2272
+ loc: {
2273
+ start: {
2274
+ line: 290,
2275
+ column: 16
2276
+ },
2277
+ end: {
2278
+ line: 290,
2279
+ column: 28
2280
+ }
2281
+ },
2282
+ type: "default-arg",
2283
+ locations: [{
2284
+ start: {
2285
+ line: 290,
2286
+ column: 26
2287
+ },
2288
+ end: {
2289
+ line: 290,
2290
+ column: 28
2291
+ }
2292
+ }],
2293
+ line: 290
2294
+ },
2295
+ "15": {
2296
+ loc: {
2297
+ start: {
2298
+ line: 293,
2299
+ column: 8
2300
+ },
2301
+ end: {
2302
+ line: 297,
2303
+ column: 9
2304
+ }
2305
+ },
2306
+ type: "if",
2307
+ locations: [{
2308
+ start: {
2309
+ line: 293,
2310
+ column: 8
2311
+ },
2312
+ end: {
2313
+ line: 297,
2314
+ column: 9
2315
+ }
2316
+ }, {
2317
+ start: {
2318
+ line: undefined,
2319
+ column: undefined
2320
+ },
2321
+ end: {
2322
+ line: undefined,
2323
+ column: undefined
2324
+ }
2325
+ }],
2326
+ line: 293
2327
+ },
2328
+ "16": {
2329
+ loc: {
2330
+ start: {
2331
+ line: 293,
2332
+ column: 12
2333
+ },
2334
+ end: {
2335
+ line: 293,
2336
+ column: 28
2337
+ }
2338
+ },
2339
+ type: "binary-expr",
2340
+ locations: [{
2341
+ start: {
2342
+ line: 293,
2343
+ column: 12
2344
+ },
2345
+ end: {
2346
+ line: 293,
2347
+ column: 15
2348
+ }
2349
+ }, {
2350
+ start: {
2351
+ line: 293,
2352
+ column: 19
2353
+ },
2354
+ end: {
2355
+ line: 293,
2356
+ column: 28
2357
+ }
2358
+ }],
2359
+ line: 293
2360
+ },
2361
+ "17": {
2362
+ loc: {
2363
+ start: {
2364
+ line: 295,
2365
+ column: 12
2366
+ },
2367
+ end: {
2368
+ line: 295,
2369
+ column: 67
2370
+ }
2371
+ },
2372
+ type: "binary-expr",
2373
+ locations: [{
2374
+ start: {
2375
+ line: 295,
2376
+ column: 12
2377
+ },
2378
+ end: {
2379
+ line: 295,
2380
+ column: 15
2381
+ }
2382
+ }, {
2383
+ start: {
2384
+ line: 295,
2385
+ column: 19
2386
+ },
2387
+ end: {
2388
+ line: 295,
2389
+ column: 67
2390
+ }
2391
+ }],
2392
+ line: 295
2393
+ },
2394
+ "18": {
2395
+ loc: {
2396
+ start: {
2397
+ line: 334,
2398
+ column: 11
2399
+ },
2400
+ end: {
2401
+ line: 334,
2402
+ column: 34
2403
+ }
2404
+ },
2405
+ type: "binary-expr",
2406
+ locations: [{
2407
+ start: {
2408
+ line: 334,
2409
+ column: 11
2410
+ },
2411
+ end: {
2412
+ line: 334,
2413
+ column: 27
2414
+ }
2415
+ }, {
2416
+ start: {
2417
+ line: 334,
2418
+ column: 31
2419
+ },
2420
+ end: {
2421
+ line: 334,
2422
+ column: 34
2423
+ }
2424
+ }],
2425
+ line: 334
2426
+ },
2427
+ "19": {
2428
+ loc: {
2429
+ start: {
2430
+ line: 375,
2431
+ column: 8
2432
+ },
2433
+ end: {
2434
+ line: 392,
2435
+ column: 9
2436
+ }
2437
+ },
2438
+ type: "if",
2439
+ locations: [{
2440
+ start: {
2441
+ line: 375,
2442
+ column: 8
2443
+ },
2444
+ end: {
2445
+ line: 392,
2446
+ column: 9
2447
+ }
2448
+ }, {
2449
+ start: {
2450
+ line: 386,
2451
+ column: 15
2452
+ },
2453
+ end: {
2454
+ line: 392,
2455
+ column: 9
2456
+ }
2457
+ }],
2458
+ line: 375
2459
+ },
2460
+ "20": {
2461
+ loc: {
2462
+ start: {
2463
+ line: 376,
2464
+ column: 10
2465
+ },
2466
+ end: {
2467
+ line: 381,
2468
+ column: 35
2469
+ }
2470
+ },
2471
+ type: "binary-expr",
2472
+ locations: [{
2473
+ start: {
2474
+ line: 376,
2475
+ column: 10
2476
+ },
2477
+ end: {
2478
+ line: 376,
2479
+ column: 19
2480
+ }
2481
+ }, {
2482
+ start: {
2483
+ line: 377,
2484
+ column: 10
2485
+ },
2486
+ end: {
2487
+ line: 381,
2488
+ column: 35
2489
+ }
2490
+ }],
2491
+ line: 376
2492
+ },
2493
+ "21": {
2494
+ loc: {
2495
+ start: {
2496
+ line: 386,
2497
+ column: 15
2498
+ },
2499
+ end: {
2500
+ line: 392,
2501
+ column: 9
2502
+ }
2503
+ },
2504
+ type: "if",
2505
+ locations: [{
2506
+ start: {
2507
+ line: 386,
2508
+ column: 15
2509
+ },
2510
+ end: {
2511
+ line: 392,
2512
+ column: 9
2513
+ }
2514
+ }, {
2515
+ start: {
2516
+ line: undefined,
2517
+ column: undefined
2518
+ },
2519
+ end: {
2520
+ line: undefined,
2521
+ column: undefined
2522
+ }
2523
+ }],
2524
+ line: 386
2525
+ },
2526
+ "22": {
2527
+ loc: {
2528
+ start: {
2529
+ line: 386,
2530
+ column: 21
2531
+ },
2532
+ end: {
2533
+ line: 386,
2534
+ column: 56
2535
+ }
2536
+ },
2537
+ type: "binary-expr",
2538
+ locations: [{
2539
+ start: {
2540
+ line: 386,
2541
+ column: 21
2542
+ },
2543
+ end: {
2544
+ line: 386,
2545
+ column: 33
2546
+ }
2547
+ }, {
2548
+ start: {
2549
+ line: 386,
2550
+ column: 37
2551
+ },
2552
+ end: {
2553
+ line: 386,
2554
+ column: 56
2555
+ }
2556
+ }],
2557
+ line: 386
2558
+ },
2559
+ "23": {
2560
+ loc: {
2561
+ start: {
2562
+ line: 401,
2563
+ column: 4
2564
+ },
2565
+ end: {
2566
+ line: 403,
2567
+ column: 5
2568
+ }
2569
+ },
2570
+ type: "if",
2571
+ locations: [{
2572
+ start: {
2573
+ line: 401,
2574
+ column: 4
2575
+ },
2576
+ end: {
2577
+ line: 403,
2578
+ column: 5
2579
+ }
2580
+ }, {
2581
+ start: {
2582
+ line: undefined,
2583
+ column: undefined
2584
+ },
2585
+ end: {
2586
+ line: undefined,
2587
+ column: undefined
2588
+ }
2589
+ }],
2590
+ line: 401
2591
+ },
2592
+ "24": {
2593
+ loc: {
2594
+ start: {
2595
+ line: 429,
2596
+ column: 8
2597
+ },
2598
+ end: {
2599
+ line: 433,
2600
+ column: 9
2601
+ }
2602
+ },
2603
+ type: "if",
2604
+ locations: [{
2605
+ start: {
2606
+ line: 429,
2607
+ column: 8
2608
+ },
2609
+ end: {
2610
+ line: 433,
2611
+ column: 9
2612
+ }
2613
+ }, {
2614
+ start: {
2615
+ line: undefined,
2616
+ column: undefined
2617
+ },
2618
+ end: {
2619
+ line: undefined,
2620
+ column: undefined
2621
+ }
2622
+ }],
2623
+ line: 429
2624
+ },
2625
+ "25": {
2626
+ loc: {
2627
+ start: {
2628
+ line: 429,
2629
+ column: 12
2630
+ },
2631
+ end: {
2632
+ line: 429,
2633
+ column: 30
2634
+ }
2635
+ },
2636
+ type: "binary-expr",
2637
+ locations: [{
2638
+ start: {
2639
+ line: 429,
2640
+ column: 12
2641
+ },
2642
+ end: {
2643
+ line: 429,
2644
+ column: 15
2645
+ }
2646
+ }, {
2647
+ start: {
2648
+ line: 429,
2649
+ column: 19
2650
+ },
2651
+ end: {
2652
+ line: 429,
2653
+ column: 30
2654
+ }
2655
+ }],
2656
+ line: 429
2657
+ },
2658
+ "26": {
2659
+ loc: {
2660
+ start: {
2661
+ line: 431,
2662
+ column: 12
2663
+ },
2664
+ end: {
2665
+ line: 431,
2666
+ column: 67
2667
+ }
2668
+ },
2669
+ type: "binary-expr",
2670
+ locations: [{
2671
+ start: {
2672
+ line: 431,
2673
+ column: 12
2674
+ },
2675
+ end: {
2676
+ line: 431,
2677
+ column: 15
2678
+ }
2679
+ }, {
2680
+ start: {
2681
+ line: 431,
2682
+ column: 19
2683
+ },
2684
+ end: {
2685
+ line: 431,
2686
+ column: 67
2687
+ }
2688
+ }],
2689
+ line: 431
2690
+ },
2691
+ "27": {
2692
+ loc: {
2693
+ start: {
2694
+ line: 447,
2695
+ column: 6
2696
+ },
2697
+ end: {
2698
+ line: 447,
2699
+ column: 55
2700
+ }
2701
+ },
2702
+ type: "binary-expr",
2703
+ locations: [{
2704
+ start: {
2705
+ line: 447,
2706
+ column: 6
2707
+ },
2708
+ end: {
2709
+ line: 447,
2710
+ column: 50
2711
+ }
2712
+ }, {
2713
+ start: {
2714
+ line: 447,
2715
+ column: 54
2716
+ },
2717
+ end: {
2718
+ line: 447,
2719
+ column: 55
2720
+ }
2721
+ }],
2722
+ line: 447
2723
+ },
2724
+ "28": {
2725
+ loc: {
2726
+ start: {
2727
+ line: 452,
2728
+ column: 4
2729
+ },
2730
+ end: {
2731
+ line: 454,
2732
+ column: 5
2733
+ }
2734
+ },
2735
+ type: "if",
2736
+ locations: [{
2737
+ start: {
2738
+ line: 452,
2739
+ column: 4
2740
+ },
2741
+ end: {
2742
+ line: 454,
2743
+ column: 5
2744
+ }
2745
+ }, {
2746
+ start: {
2747
+ line: undefined,
2748
+ column: undefined
2749
+ },
2750
+ end: {
2751
+ line: undefined,
2752
+ column: undefined
2753
+ }
2754
+ }],
2755
+ line: 452
2756
+ }
2757
+ },
2758
+ s: {
2759
+ "0": 0,
2760
+ "1": 0,
2761
+ "2": 0,
2762
+ "3": 0,
2763
+ "4": 0,
2764
+ "5": 0,
2765
+ "6": 0,
2766
+ "7": 0,
2767
+ "8": 0,
2768
+ "9": 0,
2769
+ "10": 0,
2770
+ "11": 0,
2771
+ "12": 0,
2772
+ "13": 0,
2773
+ "14": 0,
2774
+ "15": 0,
2775
+ "16": 0,
2776
+ "17": 0,
2777
+ "18": 0,
2778
+ "19": 0,
2779
+ "20": 0,
2780
+ "21": 0,
2781
+ "22": 0,
2782
+ "23": 0,
2783
+ "24": 0,
2784
+ "25": 0,
2785
+ "26": 0,
2786
+ "27": 0,
2787
+ "28": 0,
2788
+ "29": 0,
2789
+ "30": 0,
2790
+ "31": 0,
2791
+ "32": 0,
2792
+ "33": 0,
2793
+ "34": 0,
2794
+ "35": 0,
2795
+ "36": 0,
2796
+ "37": 0,
2797
+ "38": 0,
2798
+ "39": 0,
2799
+ "40": 0,
2800
+ "41": 0,
2801
+ "42": 0,
2802
+ "43": 0,
2803
+ "44": 0,
2804
+ "45": 0,
2805
+ "46": 0,
2806
+ "47": 0,
2807
+ "48": 0,
2808
+ "49": 0,
2809
+ "50": 0,
2810
+ "51": 0,
2811
+ "52": 0,
2812
+ "53": 0,
2813
+ "54": 0,
2814
+ "55": 0,
2815
+ "56": 0,
2816
+ "57": 0,
2817
+ "58": 0,
2818
+ "59": 0,
2819
+ "60": 0,
2820
+ "61": 0,
2821
+ "62": 0,
2822
+ "63": 0,
2823
+ "64": 0,
2824
+ "65": 0,
2825
+ "66": 0,
2826
+ "67": 0,
2827
+ "68": 0,
2828
+ "69": 0,
2829
+ "70": 0,
2830
+ "71": 0,
2831
+ "72": 0,
2832
+ "73": 0,
2833
+ "74": 0,
2834
+ "75": 0,
2835
+ "76": 0,
2836
+ "77": 0,
2837
+ "78": 0,
2838
+ "79": 0,
2839
+ "80": 0,
2840
+ "81": 0,
2841
+ "82": 0,
2842
+ "83": 0,
2843
+ "84": 0,
2844
+ "85": 0,
2845
+ "86": 0,
2846
+ "87": 0,
2847
+ "88": 0,
2848
+ "89": 0,
2849
+ "90": 0,
2850
+ "91": 0,
2851
+ "92": 0,
2852
+ "93": 0,
2853
+ "94": 0,
2854
+ "95": 0,
2855
+ "96": 0,
2856
+ "97": 0,
2857
+ "98": 0,
2858
+ "99": 0,
2859
+ "100": 0
2860
+ },
2861
+ f: {
2862
+ "0": 0,
2863
+ "1": 0,
2864
+ "2": 0,
2865
+ "3": 0,
2866
+ "4": 0,
2867
+ "5": 0,
2868
+ "6": 0,
2869
+ "7": 0,
2870
+ "8": 0,
2871
+ "9": 0,
2872
+ "10": 0,
2873
+ "11": 0,
2874
+ "12": 0,
2875
+ "13": 0,
2876
+ "14": 0,
2877
+ "15": 0,
2878
+ "16": 0,
2879
+ "17": 0,
2880
+ "18": 0,
2881
+ "19": 0,
2882
+ "20": 0,
2883
+ "21": 0,
2884
+ "22": 0,
2885
+ "23": 0,
2886
+ "24": 0,
2887
+ "25": 0,
2888
+ "26": 0,
2889
+ "27": 0,
2890
+ "28": 0,
2891
+ "29": 0,
2892
+ "30": 0,
2893
+ "31": 0
2894
+ },
2895
+ b: {
2896
+ "0": [0, 0],
2897
+ "1": [0, 0],
2898
+ "2": [0, 0],
2899
+ "3": [0, 0],
2900
+ "4": [0, 0],
2901
+ "5": [0, 0],
2902
+ "6": [0, 0],
2903
+ "7": [0, 0],
2904
+ "8": [0, 0],
2905
+ "9": [0, 0],
2906
+ "10": [0, 0],
2907
+ "11": [0, 0, 0],
2908
+ "12": [0],
2909
+ "13": [0, 0],
2910
+ "14": [0],
2911
+ "15": [0, 0],
2912
+ "16": [0, 0],
2913
+ "17": [0, 0],
2914
+ "18": [0, 0],
2915
+ "19": [0, 0],
2916
+ "20": [0, 0],
2917
+ "21": [0, 0],
2918
+ "22": [0, 0],
2919
+ "23": [0, 0],
2920
+ "24": [0, 0],
2921
+ "25": [0, 0],
2922
+ "26": [0, 0],
2923
+ "27": [0, 0],
2924
+ "28": [0, 0]
2925
+ },
2926
+ _coverageSchema: "1a1c01bbd47fc00a2c39e90264f33305004495a9",
2927
+ hash: "bfc380f7966db186ea7d081f2f7f7bfdc8d7703f"
2928
+ };
2929
+ var coverage = global[gcv] || (global[gcv] = {});
2930
+ if (!coverage[path] || coverage[path].hash !== hash) {
2931
+ coverage[path] = coverageData;
2932
+ }
2933
+ var actualCoverage = coverage[path];
2934
+ {
2935
+ // @ts-ignore
2936
+ cov_12li4x65wn = function () {
2937
+ return actualCoverage;
2938
+ };
2939
+ }
2940
+ return actualCoverage;
2941
+ }
2942
+ cov_12li4x65wn();
2943
+ 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; }
2944
+ 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; }
2945
+ 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; }
2946
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
2947
+ 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); }
28
2948
  /**
29
2949
  * @typedef {Object} UserProfile
30
2950
  * @property {string} email
@@ -77,7 +2997,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
77
2997
  * sessionType: 'auth0WebAuth'
78
2998
  * });
79
2999
  */
80
- var Auth0WebAuth = function () {
3000
+ class Auth0WebAuth {
81
3001
  /**
82
3002
  * @param {Object} sdk An instance of the SDK so the module can communicate with other modules
83
3003
  * @param {Object} sdk.audiences
@@ -92,35 +3012,47 @@ var Auth0WebAuth = function () {
92
3012
  * @param {function} [sdk.config.auth.onRedirect] Redirect method used when navigating between
93
3013
  * Auth0 callbacks
94
3014
  */
95
- function Auth0WebAuth(sdk) {
96
- _classCallCheck(this, Auth0WebAuth);
97
-
3015
+ constructor(sdk) {
3016
+ cov_12li4x65wn().f[0]++;
3017
+ cov_12li4x65wn().s[0]++;
98
3018
  this._sdk = sdk;
99
-
3019
+ cov_12li4x65wn().s[1]++;
100
3020
  if (!this._sdk.config.auth.clientId) {
3021
+ cov_12li4x65wn().b[0][0]++;
3022
+ cov_12li4x65wn().s[2]++;
101
3023
  throw new Error('clientId is required for the WebAuth config');
3024
+ } else {
3025
+ cov_12li4x65wn().b[0][1]++;
102
3026
  }
103
-
104
- this._onAuthenticate = this._sdk.config.auth.onAuthenticate || this._defaultOnAuthenticate;
105
- this._onRedirect = this._sdk.config.auth.onRedirect || this._defaultOnRedirect;
3027
+ cov_12li4x65wn().s[3]++;
3028
+ this._onAuthenticate = (cov_12li4x65wn().b[1][0]++, this._sdk.config.auth.onAuthenticate) || (cov_12li4x65wn().b[1][1]++, this._defaultOnAuthenticate);
3029
+ cov_12li4x65wn().s[4]++;
3030
+ this._onRedirect = (cov_12li4x65wn().b[2][0]++, this._sdk.config.auth.onRedirect) || (cov_12li4x65wn().b[2][1]++, this._defaultOnRedirect);
3031
+ cov_12li4x65wn().s[5]++;
106
3032
  this._sessionInfo = this._getStoredSession();
3033
+ cov_12li4x65wn().s[6]++;
107
3034
  this._sessionRenewalTimeout = null;
3035
+ cov_12li4x65wn().s[7]++;
108
3036
  this._tokenPromises = {};
109
-
110
- var currentUrl = new _urlParse2.default(window.location);
3037
+ const currentUrl = (cov_12li4x65wn().s[8]++, new _urlParse.default(window.location));
3038
+ cov_12li4x65wn().s[9]++;
111
3039
  currentUrl.set('pathname', this._sdk.config.auth.authorizationPath);
112
-
113
- this._auth0 = new _auth0Js2.default.WebAuth({
3040
+ cov_12li4x65wn().s[10]++;
3041
+ this._auth0 = new _auth0Js.default.WebAuth({
114
3042
  audience: this._sdk.config.audiences.contxtAuth.clientId,
115
3043
  clientID: this._sdk.config.auth.clientId,
116
3044
  domain: this._sdk.config.auth.domain,
117
- redirectUri: '' + currentUrl.origin + currentUrl.pathname,
3045
+ redirectUri: `${currentUrl.origin}${currentUrl.pathname}`,
118
3046
  responseType: 'token',
119
3047
  scope: 'email profile openid'
120
3048
  });
121
-
3049
+ cov_12li4x65wn().s[11]++;
122
3050
  if (this.isAuthenticated()) {
3051
+ cov_12li4x65wn().b[3][0]++;
3052
+ cov_12li4x65wn().s[12]++;
123
3053
  this._scheduleSessionRefresh();
3054
+ } else {
3055
+ cov_12li4x65wn().b[3][1]++;
124
3056
  }
125
3057
  }
126
3058
 
@@ -131,420 +3063,458 @@ var Auth0WebAuth = function () {
131
3063
  *
132
3064
  * @returns {Promise}
133
3065
  */
3066
+ clearCurrentApiToken(audienceName) {
3067
+ cov_12li4x65wn().f[1]++;
3068
+ const promise = (cov_12li4x65wn().s[13]++, (cov_12li4x65wn().b[4][0]++, this._tokenPromises[audienceName]) || (cov_12li4x65wn().b[4][1]++, Promise.resolve()));
3069
+ cov_12li4x65wn().s[14]++;
3070
+ return promise.then(() => {
3071
+ cov_12li4x65wn().f[2]++;
3072
+ cov_12li4x65wn().s[15]++;
3073
+ delete this._tokenPromises[audienceName];
3074
+ });
3075
+ }
134
3076
 
135
-
136
- _createClass(Auth0WebAuth, [{
137
- key: 'clearCurrentApiToken',
138
- value: function clearCurrentApiToken(audienceName) {
139
- var _this = this;
140
-
141
- var promise = this._tokenPromises[audienceName] || Promise.resolve();
142
-
143
- return promise.then(function () {
144
- delete _this._tokenPromises[audienceName];
145
- });
3077
+ /**
3078
+ * Gets the current auth0 access token
3079
+ *
3080
+ * @returns {Promise}
3081
+ * @fulfills {string} accessToken
3082
+ */
3083
+ getCurrentAccessToken() {
3084
+ cov_12li4x65wn().f[3]++;
3085
+ cov_12li4x65wn().s[16]++;
3086
+ if (!this.isAuthenticated()) {
3087
+ cov_12li4x65wn().b[5][0]++;
3088
+ cov_12li4x65wn().s[17]++;
3089
+ return Promise.reject(this._generateUnauthorizedError());
3090
+ } else {
3091
+ cov_12li4x65wn().b[5][1]++;
146
3092
  }
3093
+ cov_12li4x65wn().s[18]++;
3094
+ return Promise.resolve(this._sessionInfo.accessToken);
3095
+ }
147
3096
 
148
- /**
149
- * Gets the current auth0 access token
150
- *
151
- * @returns {Promise}
152
- * @fulfills {string} accessToken
153
- */
154
-
155
- }, {
156
- key: 'getCurrentAccessToken',
157
- value: function getCurrentAccessToken() {
158
- if (!this.isAuthenticated()) {
159
- return Promise.reject(this._generateUnauthorizedError());
160
- }
161
-
162
- return Promise.resolve(this._sessionInfo.accessToken);
3097
+ /**
3098
+ * Requests an api token from Contxt Auth for the correct audience
3099
+ *
3100
+ * @param audienceName
3101
+ *
3102
+ * @returns {Promise}
3103
+ * @fulfills {string} apiToken
3104
+ */
3105
+ getCurrentApiToken(audienceName) {
3106
+ cov_12li4x65wn().f[4]++;
3107
+ cov_12li4x65wn().s[19]++;
3108
+ if (!this.isAuthenticated()) {
3109
+ cov_12li4x65wn().b[6][0]++;
3110
+ cov_12li4x65wn().s[20]++;
3111
+ return Promise.reject(this._generateUnauthorizedError());
3112
+ } else {
3113
+ cov_12li4x65wn().b[6][1]++;
163
3114
  }
164
-
165
- /**
166
- * Requests an api token from Contxt Auth for the correct audience
167
- *
168
- * @param audienceName
169
- *
170
- * @returns {Promise}
171
- * @fulfills {string} apiToken
172
- */
173
-
174
- }, {
175
- key: 'getCurrentApiToken',
176
- value: function getCurrentApiToken(audienceName) {
177
- if (!this.isAuthenticated()) {
178
- return Promise.reject(this._generateUnauthorizedError());
179
- }
180
-
181
- var audience = this._sdk.config.audiences[audienceName];
182
-
183
- if (!(audience && audience.clientId)) {
184
- return Promise.reject(new Error('No valid audience found'));
185
- }
186
-
187
- if (!this._tokenPromises[audienceName]) {
188
- this._tokenPromises[audienceName] = _axios2.default.post(this._sdk.config.audiences.contxtAuth.host + '/v1/token', {
189
- audiences: [audience.clientId],
190
- nonce: 'nonce'
191
- }, {
192
- headers: {
193
- Authorization: 'Bearer ' + this._sessionInfo.accessToken
194
- }
195
- }).then(function (_ref) {
196
- var data = _ref.data;
197
- return data.access_token;
198
- });
199
- }
200
-
201
- return this._tokenPromises[audienceName];
3115
+ const audience = (cov_12li4x65wn().s[21]++, this._sdk.config.audiences[audienceName]);
3116
+ cov_12li4x65wn().s[22]++;
3117
+ if (!((cov_12li4x65wn().b[8][0]++, audience) && (cov_12li4x65wn().b[8][1]++, audience.clientId))) {
3118
+ cov_12li4x65wn().b[7][0]++;
3119
+ cov_12li4x65wn().s[23]++;
3120
+ return Promise.reject(new Error('No valid audience found'));
3121
+ } else {
3122
+ cov_12li4x65wn().b[7][1]++;
202
3123
  }
203
-
204
- /**
205
- * Gets the current user's profile from Auth0
206
- *
207
- * @returns {Promise}
208
- * @fulfill {UserProfile}
209
- * @rejects {Error}
210
- */
211
-
212
- }, {
213
- key: 'getProfile',
214
- value: function getProfile() {
215
- var _this2 = this;
216
-
217
- return new Promise(function (resolve, reject) {
218
- _this2._auth0.client.userInfo(_this2._sessionInfo.accessToken, function (err, profile) {
219
- if (err) {
220
- return reject(err);
221
- }
222
-
223
- var formattedProfile = _extends({}, profile, {
224
- updatedAt: profile.updated_at
225
- });
226
- delete formattedProfile.updated_at;
227
-
228
- resolve(formattedProfile);
229
- });
3124
+ cov_12li4x65wn().s[24]++;
3125
+ if (!this._tokenPromises[audienceName]) {
3126
+ cov_12li4x65wn().b[9][0]++;
3127
+ cov_12li4x65wn().s[25]++;
3128
+ this._tokenPromises[audienceName] = _axios.default.post(`${this._sdk.config.audiences.contxtAuth.host}/v1/token`, {
3129
+ audiences: [audience.clientId],
3130
+ nonce: 'nonce'
3131
+ }, {
3132
+ headers: {
3133
+ Authorization: `Bearer ${this._sessionInfo.accessToken}`
3134
+ }
3135
+ }).then(_ref => {
3136
+ let data = _ref.data;
3137
+ cov_12li4x65wn().f[5]++;
3138
+ cov_12li4x65wn().s[26]++;
3139
+ return data.access_token;
230
3140
  });
3141
+ } else {
3142
+ cov_12li4x65wn().b[9][1]++;
231
3143
  }
3144
+ cov_12li4x65wn().s[27]++;
3145
+ return this._tokenPromises[audienceName];
3146
+ }
232
3147
 
233
- /**
234
- * Routine that takes unparsed information from Auth0, stores it in a way that
235
- * can be used for getting access tokens, schedules its future renewal, and
236
- * redirects to the correct page in the application.
237
- *
238
- * @returns {Promise}
239
- * @fulfill {Auth0WebAuthSessionInfo}
240
- * @rejects {Error}
241
- */
242
-
243
- }, {
244
- key: 'handleAuthentication',
245
- value: function handleAuthentication() {
246
- var _this3 = this;
247
-
248
- return this._parseHash().then(this._onAuthenticate).then(function (authResult) {
249
- _this3._storeSession(authResult);
250
- _this3._scheduleSessionRefresh();
251
-
252
- var redirectPathname = _this3._getRedirectPathname();
253
- _this3._onRedirect(redirectPathname);
254
- }).catch(function (err) {
255
- console.log('Error while handling authentication: ' + err);
256
-
257
- _this3._onRedirect('/');
258
-
259
- throw err;
3148
+ /**
3149
+ * Gets the current user's profile from Auth0
3150
+ *
3151
+ * @returns {Promise}
3152
+ * @fulfill {UserProfile}
3153
+ * @rejects {Error}
3154
+ */
3155
+ getProfile() {
3156
+ cov_12li4x65wn().f[6]++;
3157
+ cov_12li4x65wn().s[28]++;
3158
+ return new Promise((resolve, reject) => {
3159
+ cov_12li4x65wn().f[7]++;
3160
+ cov_12li4x65wn().s[29]++;
3161
+ this._auth0.client.userInfo(this._sessionInfo.accessToken, (err, profile) => {
3162
+ cov_12li4x65wn().f[8]++;
3163
+ cov_12li4x65wn().s[30]++;
3164
+ if (err) {
3165
+ cov_12li4x65wn().b[10][0]++;
3166
+ cov_12li4x65wn().s[31]++;
3167
+ return reject(err);
3168
+ } else {
3169
+ cov_12li4x65wn().b[10][1]++;
3170
+ }
3171
+ const formattedProfile = (cov_12li4x65wn().s[32]++, _objectSpread(_objectSpread({}, profile), {}, {
3172
+ updatedAt: profile.updated_at
3173
+ }));
3174
+ cov_12li4x65wn().s[33]++;
3175
+ delete formattedProfile.updated_at;
3176
+ cov_12li4x65wn().s[34]++;
3177
+ resolve(formattedProfile);
260
3178
  });
261
- }
262
-
263
- /**
264
- * Tells caller if the current user is authenticated.
265
- *
266
- * @returns {boolean}
267
- */
268
-
269
- }, {
270
- key: 'isAuthenticated',
271
- value: function isAuthenticated() {
272
- return !!(this._sessionInfo && this._sessionInfo.accessToken && this._sessionInfo.expiresAt > Date.now());
273
- }
274
-
275
- /**
276
- * Starts the Auth0 log in process
277
- *
278
- * @param {Object} options
279
- * @param {Boolean} [options.forceLogin = false] When true will bypass any sso settings in the authorization provider
280
- */
281
-
282
- }, {
283
- key: 'logIn',
284
- value: function logIn() {
285
- var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
286
-
287
- var authOptions = {};
288
-
289
- if (options.forceLogin) {
290
- authOptions.prompt = 'login';
291
- }
292
- this._auth0.authorize(authOptions);
293
- }
294
-
295
- /**
296
- * Logs the user out by removing any stored session info, clearing any token
297
- * renewal, and redirecting to the root
298
- *
299
- * @param {Object} options
300
- * @param {Boolean} [options.federated = false] Indicator for if Auth0 should
301
- * attempt to log out the user from an external IdP
302
- * @param {String} [options.returnTo = window.location.origin] URL that the
303
- * user will be redirected to after a successful log out
304
- */
305
-
306
- }, {
307
- key: 'logOut',
308
- value: function logOut(options) {
309
- this._sessionInfo = {};
310
- this._tokenPromises = {};
3179
+ });
3180
+ }
311
3181
 
312
- localStorage.removeItem('access_token');
313
- localStorage.removeItem('expires_at');
3182
+ /**
3183
+ * Routine that takes unparsed information from Auth0, stores it in a way that
3184
+ * can be used for getting access tokens, schedules its future renewal, and
3185
+ * redirects to the correct page in the application.
3186
+ *
3187
+ * @returns {Promise}
3188
+ * @fulfill {Auth0WebAuthSessionInfo}
3189
+ * @rejects {Error}
3190
+ */
3191
+ handleAuthentication() {
3192
+ cov_12li4x65wn().f[9]++;
3193
+ cov_12li4x65wn().s[35]++;
3194
+ return this._parseHash().then(this._onAuthenticate).then(authResult => {
3195
+ cov_12li4x65wn().f[10]++;
3196
+ cov_12li4x65wn().s[36]++;
3197
+ this._storeSession(authResult);
3198
+ cov_12li4x65wn().s[37]++;
3199
+ this._scheduleSessionRefresh();
3200
+ const redirectPathname = (cov_12li4x65wn().s[38]++, this._getRedirectPathname());
3201
+ cov_12li4x65wn().s[39]++;
3202
+ this._onRedirect(redirectPathname);
3203
+ }).catch(err => {
3204
+ cov_12li4x65wn().f[11]++;
3205
+ cov_12li4x65wn().s[40]++;
3206
+ console.log(`Error while handling authentication: ${err}`);
3207
+ cov_12li4x65wn().s[41]++;
3208
+ this._onRedirect('/');
3209
+ cov_12li4x65wn().s[42]++;
3210
+ throw err;
3211
+ });
3212
+ }
314
3213
 
315
- clearTimeout(this._sessionRenewalTimeout);
3214
+ /**
3215
+ * Tells caller if the current user is authenticated.
3216
+ *
3217
+ * @returns {boolean}
3218
+ */
3219
+ isAuthenticated() {
3220
+ cov_12li4x65wn().f[12]++;
3221
+ cov_12li4x65wn().s[43]++;
3222
+ return !!((cov_12li4x65wn().b[11][0]++, this._sessionInfo) && (cov_12li4x65wn().b[11][1]++, this._sessionInfo.accessToken) && (cov_12li4x65wn().b[11][2]++, this._sessionInfo.expiresAt > Date.now()));
3223
+ }
316
3224
 
317
- this._auth0.logout(_extends({
318
- returnTo: new _urlParse2.default(window.location).origin
319
- }, options));
3225
+ /**
3226
+ * Starts the Auth0 log in process
3227
+ *
3228
+ * @param {Object} options
3229
+ * @param {Boolean} [options.forceLogin = false] When true will bypass any sso settings in the authorization provider
3230
+ */
3231
+ logIn() {
3232
+ let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : (cov_12li4x65wn().b[12][0]++, {});
3233
+ cov_12li4x65wn().f[13]++;
3234
+ let authOptions = (cov_12li4x65wn().s[44]++, {});
3235
+ cov_12li4x65wn().s[45]++;
3236
+ if (options.forceLogin) {
3237
+ cov_12li4x65wn().b[13][0]++;
3238
+ cov_12li4x65wn().s[46]++;
3239
+ authOptions.prompt = 'login';
3240
+ } else {
3241
+ cov_12li4x65wn().b[13][1]++;
320
3242
  }
3243
+ cov_12li4x65wn().s[47]++;
3244
+ this._auth0.authorize(authOptions);
3245
+ }
321
3246
 
322
- /**
323
- * Wraps Auth0's `checkSession` method. Will check if the current Auth0
324
- * session is valid and get updated information if needed
325
- *
326
- * @fulfill {Object} sessionResponse Information returned from Auth0
327
- * @rejects {Error}
328
- *
329
- * @private
330
- */
331
-
332
- }, {
333
- key: '_checkSession',
334
- value: function _checkSession() {
335
- var _this4 = this;
336
-
337
- var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
338
-
339
- return new Promise(function (resolve, reject) {
340
- _this4._auth0.checkSession(options, function (err, response) {
341
- if (err || !response) {
342
- return reject(err || new Error('No valid tokens returned from auth0'));
343
- }
3247
+ /**
3248
+ * Logs the user out by removing any stored session info, clearing any token
3249
+ * renewal, and redirecting to the root
3250
+ *
3251
+ * @param {Object} options
3252
+ * @param {Boolean} [options.federated = false] Indicator for if Auth0 should
3253
+ * attempt to log out the user from an external IdP
3254
+ * @param {String} [options.returnTo = window.location.origin] URL that the
3255
+ * user will be redirected to after a successful log out
3256
+ */
3257
+ logOut(options) {
3258
+ cov_12li4x65wn().f[14]++;
3259
+ cov_12li4x65wn().s[48]++;
3260
+ this._sessionInfo = {};
3261
+ cov_12li4x65wn().s[49]++;
3262
+ this._tokenPromises = {};
3263
+ cov_12li4x65wn().s[50]++;
3264
+ localStorage.removeItem('access_token');
3265
+ cov_12li4x65wn().s[51]++;
3266
+ localStorage.removeItem('expires_at');
3267
+ cov_12li4x65wn().s[52]++;
3268
+ clearTimeout(this._sessionRenewalTimeout);
3269
+ cov_12li4x65wn().s[53]++;
3270
+ this._auth0.logout(_objectSpread({
3271
+ returnTo: new _urlParse.default(window.location).origin
3272
+ }, options));
3273
+ }
344
3274
 
345
- return resolve(response);
346
- });
3275
+ /**
3276
+ * Wraps Auth0's `checkSession` method. Will check if the current Auth0
3277
+ * session is valid and get updated information if needed
3278
+ *
3279
+ * @fulfill {Object} sessionResponse Information returned from Auth0
3280
+ * @rejects {Error}
3281
+ *
3282
+ * @private
3283
+ */
3284
+ _checkSession() {
3285
+ let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : (cov_12li4x65wn().b[14][0]++, {});
3286
+ cov_12li4x65wn().f[15]++;
3287
+ cov_12li4x65wn().s[54]++;
3288
+ return new Promise((resolve, reject) => {
3289
+ cov_12li4x65wn().f[16]++;
3290
+ cov_12li4x65wn().s[55]++;
3291
+ this._auth0.checkSession(options, (err, response) => {
3292
+ cov_12li4x65wn().f[17]++;
3293
+ cov_12li4x65wn().s[56]++;
3294
+ if ((cov_12li4x65wn().b[16][0]++, err) || (cov_12li4x65wn().b[16][1]++, !response)) {
3295
+ cov_12li4x65wn().b[15][0]++;
3296
+ cov_12li4x65wn().s[57]++;
3297
+ return reject((cov_12li4x65wn().b[17][0]++, err) || (cov_12li4x65wn().b[17][1]++, new Error('No valid tokens returned from auth0')));
3298
+ } else {
3299
+ cov_12li4x65wn().b[15][1]++;
3300
+ }
3301
+ cov_12li4x65wn().s[58]++;
3302
+ return resolve(response);
347
3303
  });
348
- }
349
-
350
- /**
351
- * Default method used for redirecting around the web application. Overridden
352
- * by `onRedirect` in the auth config
353
- *
354
- * @private
355
- */
356
-
357
- }, {
358
- key: '_defaultOnRedirect',
359
- value: function _defaultOnRedirect(pathname) {
360
- window.location = pathname;
361
- }
362
-
363
- /**
364
- * Default method used for intercepting a successful authentication result. Overridden
365
- * by `onAuthenticate` in the auth config
366
- *
367
- * @private
368
- */
369
-
370
- }, {
371
- key: '_defaultOnAuthenticate',
372
- value: function _defaultOnAuthenticate(authResult) {
373
- return authResult;
374
- }
375
-
376
- /**
377
- * Grabs a stored redirect pathname that may have been stored in another part
378
- * of the web application
379
- *
380
- * @private
381
- */
382
-
383
- }, {
384
- key: '_getRedirectPathname',
385
- value: function _getRedirectPathname() {
386
- var redirectPathname = localStorage.getItem('redirect_pathname');
387
- localStorage.removeItem('redirect_pathname');
388
-
389
- return redirectPathname || '/';
390
- }
391
-
392
- /**
393
- * Loads a saved session from local storage
394
- *
395
- * @returns {Object} session
396
- * @returns {string} session.accessToken
397
- * @returns {number} session.expiresAt
398
- *
399
- * @private
400
- */
401
-
402
- }, {
403
- key: '_getStoredSession',
404
- value: function _getStoredSession() {
405
- return {
406
- accessToken: localStorage.getItem('access_token'),
407
- expiresAt: JSON.parse(localStorage.getItem('expires_at'))
408
- };
409
- }
410
-
411
- /**
412
- * Gets up to date session info. Will get an updated session/tokens if the
413
- * previous session has already expired. Will log the user out if an error
414
- * from Auth0 indicates the session cannot continue without re-authentication.
415
- *
416
- * @returns {Promise}
417
- * @rejects {Error}
418
- *
419
- * @private
420
- */
421
-
422
- }, {
423
- key: '_getUpdatedSession',
424
- value: function _getUpdatedSession() {
425
- var _this5 = this;
3304
+ });
3305
+ }
426
3306
 
427
- return this._checkSession().then(function (sessionInfo) {
428
- _this5._storeSession(sessionInfo);
3307
+ /**
3308
+ * Default method used for redirecting around the web application. Overridden
3309
+ * by `onRedirect` in the auth config
3310
+ *
3311
+ * @private
3312
+ */
3313
+ _defaultOnRedirect(pathname) {
3314
+ cov_12li4x65wn().f[18]++;
3315
+ cov_12li4x65wn().s[59]++;
3316
+ window.location = pathname;
3317
+ }
429
3318
 
430
- _this5._tokenPromises = {};
3319
+ /**
3320
+ * Default method used for intercepting a successful authentication result. Overridden
3321
+ * by `onAuthenticate` in the auth config
3322
+ *
3323
+ * @private
3324
+ */
3325
+ _defaultOnAuthenticate(authResult) {
3326
+ cov_12li4x65wn().f[19]++;
3327
+ cov_12li4x65wn().s[60]++;
3328
+ return authResult;
3329
+ }
431
3330
 
432
- _this5._scheduleSessionRefresh();
433
- }).catch(function (err) {
434
- var errorToThrow = err;
3331
+ /**
3332
+ * Grabs a stored redirect pathname that may have been stored in another part
3333
+ * of the web application
3334
+ *
3335
+ * @private
3336
+ */
3337
+ _getRedirectPathname() {
3338
+ cov_12li4x65wn().f[20]++;
3339
+ const redirectPathname = (cov_12li4x65wn().s[61]++, localStorage.getItem('redirect_pathname'));
3340
+ cov_12li4x65wn().s[62]++;
3341
+ localStorage.removeItem('redirect_pathname');
3342
+ cov_12li4x65wn().s[63]++;
3343
+ return (cov_12li4x65wn().b[18][0]++, redirectPathname) || (cov_12li4x65wn().b[18][1]++, '/');
3344
+ }
435
3345
 
436
- if (err.error && ['consent_required', 'interaction_required', 'login_required'].indexOf(err.error) > -1) {
437
- errorToThrow = _this5._generateUnauthorizedError(err);
3346
+ /**
3347
+ * Loads a saved session from local storage
3348
+ *
3349
+ * @returns {Object} session
3350
+ * @returns {string} session.accessToken
3351
+ * @returns {number} session.expiresAt
3352
+ *
3353
+ * @private
3354
+ */
3355
+ _getStoredSession() {
3356
+ cov_12li4x65wn().f[21]++;
3357
+ cov_12li4x65wn().s[64]++;
3358
+ return {
3359
+ accessToken: localStorage.getItem('access_token'),
3360
+ expiresAt: JSON.parse(localStorage.getItem('expires_at'))
3361
+ };
3362
+ }
438
3363
 
439
- _this5.logOut();
440
- } else if (!(err.response && err.response.status)) {
3364
+ /**
3365
+ * Gets up to date session info. Will get an updated session/tokens if the
3366
+ * previous session has already expired. Will log the user out if an error
3367
+ * from Auth0 indicates the session cannot continue without re-authentication.
3368
+ *
3369
+ * @returns {Promise}
3370
+ * @rejects {Error}
3371
+ *
3372
+ * @private
3373
+ */
3374
+ _getUpdatedSession() {
3375
+ cov_12li4x65wn().f[22]++;
3376
+ cov_12li4x65wn().s[65]++;
3377
+ return this._checkSession().then(sessionInfo => {
3378
+ cov_12li4x65wn().f[23]++;
3379
+ cov_12li4x65wn().s[66]++;
3380
+ this._storeSession(sessionInfo);
3381
+ cov_12li4x65wn().s[67]++;
3382
+ this._tokenPromises = {};
3383
+ cov_12li4x65wn().s[68]++;
3384
+ this._scheduleSessionRefresh();
3385
+ }).catch(err => {
3386
+ cov_12li4x65wn().f[24]++;
3387
+ let errorToThrow = (cov_12li4x65wn().s[69]++, err);
3388
+ cov_12li4x65wn().s[70]++;
3389
+ if ((cov_12li4x65wn().b[20][0]++, err.error) && (cov_12li4x65wn().b[20][1]++, ['consent_required', 'interaction_required', 'login_required'].indexOf(err.error) > -1)) {
3390
+ cov_12li4x65wn().b[19][0]++;
3391
+ cov_12li4x65wn().s[71]++;
3392
+ errorToThrow = this._generateUnauthorizedError(err);
3393
+ cov_12li4x65wn().s[72]++;
3394
+ this.logOut();
3395
+ } else {
3396
+ cov_12li4x65wn().b[19][1]++;
3397
+ cov_12li4x65wn().s[73]++;
3398
+ if (!((cov_12li4x65wn().b[22][0]++, err.response) && (cov_12li4x65wn().b[22][1]++, err.response.status))) {
3399
+ cov_12li4x65wn().b[21][0]++;
3400
+ cov_12li4x65wn().s[74]++;
441
3401
  errorToThrow = new Error('There was a problem getting new session info. Please check your configuration settings.');
3402
+ cov_12li4x65wn().s[75]++;
442
3403
  errorToThrow.fromSdk = true;
3404
+ cov_12li4x65wn().s[76]++;
443
3405
  errorToThrow.originalError = err;
3406
+ } else {
3407
+ cov_12li4x65wn().b[21][1]++;
444
3408
  }
445
-
446
- throw errorToThrow;
447
- });
448
- }
449
- }, {
450
- key: '_generateUnauthorizedError',
451
- value: function _generateUnauthorizedError(err) {
452
- var error = new Error('Unauthorized');
453
-
454
- if (!err) {
455
- error.fromSdk = true;
456
3409
  }
457
-
458
- error.response = {
459
- data: _extends({}, err, {
460
- code: 401
461
- }),
462
- status: 401
463
- };
464
-
465
- return error;
3410
+ cov_12li4x65wn().s[77]++;
3411
+ throw errorToThrow;
3412
+ });
3413
+ }
3414
+ _generateUnauthorizedError(err) {
3415
+ cov_12li4x65wn().f[25]++;
3416
+ const error = (cov_12li4x65wn().s[78]++, new Error('Unauthorized'));
3417
+ cov_12li4x65wn().s[79]++;
3418
+ if (!err) {
3419
+ cov_12li4x65wn().b[23][0]++;
3420
+ cov_12li4x65wn().s[80]++;
3421
+ error.fromSdk = true;
3422
+ } else {
3423
+ cov_12li4x65wn().b[23][1]++;
466
3424
  }
3425
+ cov_12li4x65wn().s[81]++;
3426
+ error.response = {
3427
+ data: _objectSpread(_objectSpread({}, err), {}, {
3428
+ code: 401
3429
+ }),
3430
+ status: 401
3431
+ };
3432
+ cov_12li4x65wn().s[82]++;
3433
+ return error;
3434
+ }
467
3435
 
468
- /**
469
- * Wraps Auth0's method for parsing hash information after a successful
470
- * authentication.
471
- *
472
- * @returns {Promise}
473
- * @fulfill {Object} hashResponse Information returned from Auth0
474
- * @rejects {Error}
475
- *
476
- * @private
477
- */
478
-
479
- }, {
480
- key: '_parseHash',
481
- value: function _parseHash() {
482
- var _this6 = this;
483
-
484
- return new Promise(function (resolve, reject) {
485
- _this6._auth0.parseHash(function (err, authResult) {
486
- if (err || !authResult) {
487
- return reject(err || new Error('No valid tokens returned from auth0'));
488
- }
489
-
490
- return resolve(authResult);
491
- });
3436
+ /**
3437
+ * Wraps Auth0's method for parsing hash information after a successful
3438
+ * authentication.
3439
+ *
3440
+ * @returns {Promise}
3441
+ * @fulfill {Object} hashResponse Information returned from Auth0
3442
+ * @rejects {Error}
3443
+ *
3444
+ * @private
3445
+ */
3446
+ _parseHash() {
3447
+ cov_12li4x65wn().f[26]++;
3448
+ cov_12li4x65wn().s[83]++;
3449
+ return new Promise((resolve, reject) => {
3450
+ cov_12li4x65wn().f[27]++;
3451
+ cov_12li4x65wn().s[84]++;
3452
+ this._auth0.parseHash((err, authResult) => {
3453
+ cov_12li4x65wn().f[28]++;
3454
+ cov_12li4x65wn().s[85]++;
3455
+ if ((cov_12li4x65wn().b[25][0]++, err) || (cov_12li4x65wn().b[25][1]++, !authResult)) {
3456
+ cov_12li4x65wn().b[24][0]++;
3457
+ cov_12li4x65wn().s[86]++;
3458
+ return reject((cov_12li4x65wn().b[26][0]++, err) || (cov_12li4x65wn().b[26][1]++, new Error('No valid tokens returned from auth0')));
3459
+ } else {
3460
+ cov_12li4x65wn().b[24][1]++;
3461
+ }
3462
+ cov_12li4x65wn().s[87]++;
3463
+ return resolve(authResult);
492
3464
  });
493
- }
494
-
495
- /**
496
- * Schedules the Access token to renew before they expire
497
- *
498
- * @private
499
- */
500
-
501
- }, {
502
- key: '_scheduleSessionRefresh',
503
- value: function _scheduleSessionRefresh() {
504
- var _this7 = this;
505
-
506
- var tokenExpiresAtBufferMs = this._sdk.config.auth.tokenExpiresAtBufferMs || 0;
507
- var bufferedExpiresAt = this._sessionInfo.expiresAt - tokenExpiresAtBufferMs;
508
- var delay = bufferedExpiresAt - Date.now();
509
-
510
- if (this._sessionRenewalTimeout) {
511
- clearTimeout(this._sessionRenewalTimeout);
512
- }
513
-
514
- this._sessionRenewalTimeout = setTimeout(function () {
515
- _this7._getUpdatedSession();
516
- }, delay);
517
- }
518
-
519
- /**
520
- * Saves a session in local storage for future use
521
- *
522
- * @param {Object} sessionInfo
523
- * @param {string} sessionInfo.accessToken
524
- * @param {number} sessionInfo.expiresAt
525
- *
526
- * @private
527
- */
528
-
529
- }, {
530
- key: '_storeSession',
531
- value: function _storeSession(_ref2) {
532
- var accessToken = _ref2.accessToken,
533
- expiresIn = _ref2.expiresIn;
534
-
535
- var expiresAt = expiresIn * 1000 + Date.now();
536
-
537
- localStorage.setItem('access_token', accessToken);
538
- localStorage.setItem('expires_at', JSON.stringify(expiresAt));
3465
+ });
3466
+ }
539
3467
 
540
- this._sessionInfo.accessToken = accessToken;
541
- this._sessionInfo.expiresAt = expiresAt;
3468
+ /**
3469
+ * Schedules the Access token to renew before they expire
3470
+ *
3471
+ * @private
3472
+ */
3473
+ _scheduleSessionRefresh() {
3474
+ cov_12li4x65wn().f[29]++;
3475
+ const tokenExpiresAtBufferMs = (cov_12li4x65wn().s[88]++, (cov_12li4x65wn().b[27][0]++, this._sdk.config.auth.tokenExpiresAtBufferMs) || (cov_12li4x65wn().b[27][1]++, 0));
3476
+ const bufferedExpiresAt = (cov_12li4x65wn().s[89]++, this._sessionInfo.expiresAt - tokenExpiresAtBufferMs);
3477
+ const delay = (cov_12li4x65wn().s[90]++, bufferedExpiresAt - Date.now());
3478
+ cov_12li4x65wn().s[91]++;
3479
+ if (this._sessionRenewalTimeout) {
3480
+ cov_12li4x65wn().b[28][0]++;
3481
+ cov_12li4x65wn().s[92]++;
3482
+ clearTimeout(this._sessionRenewalTimeout);
3483
+ } else {
3484
+ cov_12li4x65wn().b[28][1]++;
542
3485
  }
543
- }]);
544
-
545
- return Auth0WebAuth;
546
- }();
3486
+ cov_12li4x65wn().s[93]++;
3487
+ this._sessionRenewalTimeout = setTimeout(() => {
3488
+ cov_12li4x65wn().f[30]++;
3489
+ cov_12li4x65wn().s[94]++;
3490
+ this._getUpdatedSession();
3491
+ }, delay);
3492
+ }
547
3493
 
548
- var TYPE = exports.TYPE = 'auth0WebAuth';
549
- exports.default = Auth0WebAuth;
3494
+ /**
3495
+ * Saves a session in local storage for future use
3496
+ *
3497
+ * @param {Object} sessionInfo
3498
+ * @param {string} sessionInfo.accessToken
3499
+ * @param {number} sessionInfo.expiresAt
3500
+ *
3501
+ * @private
3502
+ */
3503
+ _storeSession(_ref2) {
3504
+ let accessToken = _ref2.accessToken,
3505
+ expiresIn = _ref2.expiresIn;
3506
+ cov_12li4x65wn().f[31]++;
3507
+ const expiresAt = (cov_12li4x65wn().s[95]++, expiresIn * 1000 + Date.now());
3508
+ cov_12li4x65wn().s[96]++;
3509
+ localStorage.setItem('access_token', accessToken);
3510
+ cov_12li4x65wn().s[97]++;
3511
+ localStorage.setItem('expires_at', JSON.stringify(expiresAt));
3512
+ cov_12li4x65wn().s[98]++;
3513
+ this._sessionInfo.accessToken = accessToken;
3514
+ cov_12li4x65wn().s[99]++;
3515
+ this._sessionInfo.expiresAt = expiresAt;
3516
+ }
3517
+ }
3518
+ const TYPE = exports.TYPE = (cov_12li4x65wn().s[100]++, 'auth0WebAuth');
3519
+ var _default = exports.default = Auth0WebAuth;
550
3520
  //# sourceMappingURL=auth0WebAuth.js.map