@temperlang/std 0.4.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/json.js CHANGED
@@ -1,198 +1,199 @@
1
1
  const {
2
- trunc: trunc__711
2
+ imul: imul__498
3
3
  } = globalThis.Math;
4
4
  import {
5
- type as type__383, requireInstanceOf as requireInstanceOf__570, requireStringIndex as requireStringIndex__836, cmpFloat as cmpFloat__948, mappedGetOr as mappedGetOr_411, listedGet as listedGet_413, mappedForEach as mappedForEach_426, float64ToString as float64ToString_463, float64ToInt as float64ToInt_465, stringToInt as stringToInt_477, stringToFloat64 as stringToFloat64_478, listBuilderAdd as listBuilderAdd_490, listedGetOr as listedGetOr_494, listBuilderSet as listBuilderSet_502, listBuilderRemoveLast as listBuilderRemoveLast_507, mapBuilderConstructor as mapBuilderConstructor_564, mappedGet as mappedGet_575, mapBuilderSet as mapBuilderSet_576, listBuilderToList as listBuilderToList_582, mappedToMap as mappedToMap_583, stringGet as stringGet_628, stringNext as stringNext_731, stringHasAtLeast as stringHasAtLeast_805, stringBuilderAppendCodePoint as stringBuilderAppendCodePoint_810
5
+ type as type__79, requireInstanceOf as requireInstanceOf__293, clampInt64 as clampInt64__680, cmpFloat as cmpFloat__692, mappedGetOr as mappedGetOr_111, listedGet as listedGet_113, mappedForEach as mappedForEach_125, int64ToInt32 as int64ToInt32_165, int64ToFloat64 as int64ToFloat64_168, float64ToString as float64ToString_175, float64ToInt32 as float64ToInt32_177, float64ToInt64 as float64ToInt64_179, stringToInt32 as stringToInt32_191, stringToFloat64 as stringToFloat64_192, stringToInt64 as stringToInt64_197, listBuilderAdd as listBuilderAdd_209, listedGetOr as listedGetOr_213, listBuilderSet as listBuilderSet_221, listBuilderRemoveLast as listBuilderRemoveLast_226, mapBuilderConstructor as mapBuilderConstructor_287, panic as panic_294, mappedGet as mappedGet_299, mapBuilderSet as mapBuilderSet_300, listBuilderToList as listBuilderToList_306, mappedToMap as mappedToMap_307, stringGet as stringGet_356, stringNext as stringNext_464, stringHasAtLeast as stringHasAtLeast_535, stringBuilderAppendCodePoint as stringBuilderAppendCodePoint_540, requireStringIndex as requireStringIndex_569, int64ToInt32Unsafe as int64ToInt32Unsafe_689
6
6
  } from "@temperlang/core";
7
- export class InterchangeContext extends type__383() {
7
+ export class InterchangeContext extends type__79() {
8
+ /**
9
+ * @param {string} headerName_78
10
+ * @returns {string | null}
11
+ */
12
+ getHeader(headerName_78) {
13
+ null;
14
+ }
8
15
  };
9
- export class NullInterchangeContext extends type__383(InterchangeContext) {
16
+ export class NullInterchangeContext extends type__79(InterchangeContext) {
10
17
  /**
11
- * @param {string} headerName_385
18
+ * @param {string} headerName_81
12
19
  * @returns {string | null}
13
20
  */
14
- getHeader(headerName_385) {
21
+ getHeader(headerName_81) {
15
22
  return null;
16
23
  }
17
24
  /** @type {NullInterchangeContext} */
18
- static #instance_386 = new NullInterchangeContext();
25
+ static #instance_82 = new NullInterchangeContext();
19
26
  /** @returns {NullInterchangeContext} */
20
27
  static get instance() {
21
- return this.#instance_386;
28
+ return this.#instance_82;
22
29
  }
23
30
  constructor() {
24
31
  super ();
25
32
  return;
26
33
  }
27
34
  };
28
- export class JsonProducer extends type__383() {
35
+ export class JsonProducer extends type__79() {
29
36
  startObject() {
30
37
  null;
31
- return;
32
38
  }
33
39
  endObject() {
34
40
  null;
35
- return;
36
41
  }
37
- /** @param {string} key_390 */
38
- objectKey(key_390) {
42
+ /** @param {string} key_87 */
43
+ objectKey(key_87) {
39
44
  null;
40
- return;
41
45
  }
42
46
  startArray() {
43
47
  null;
44
- return;
45
48
  }
46
49
  endArray() {
47
50
  null;
48
- return;
49
51
  }
50
52
  nullValue() {
51
53
  null;
52
- return;
53
54
  }
54
- /** @param {boolean} x_395 */
55
- booleanValue(x_395) {
55
+ /** @param {boolean} x_92 */
56
+ booleanValue(x_92) {
56
57
  null;
57
- return;
58
58
  }
59
- /** @param {number} x_397 */
60
- intValue(x_397) {
59
+ /** @param {number} x_94 */
60
+ int32Value(x_94) {
61
61
  null;
62
- return;
63
62
  }
64
- /** @param {number} x_399 */
65
- float64Value(x_399) {
63
+ /** @param {bigint} x_96 */
64
+ int64Value(x_96) {
66
65
  null;
67
- return;
68
66
  }
69
- /** @param {string} x_401 */
70
- numericTokenValue(x_401) {
67
+ /** @param {number} x_98 */
68
+ float64Value(x_98) {
71
69
  null;
72
- return;
73
70
  }
74
- /** @param {string} x_403 */
75
- stringValue(x_403) {
71
+ /** @param {string} x_100 */
72
+ numericTokenValue(x_100) {
76
73
  null;
77
- return;
74
+ }
75
+ /** @param {string} x_102 */
76
+ stringValue(x_102) {
77
+ null;
78
+ }
79
+ /** @returns {JsonParseErrorReceiver | null} */
80
+ get parseErrorReceiver() {
81
+ return null;
78
82
  }
79
83
  };
80
- export class JsonSyntaxTree extends type__383() {
81
- /** @param {JsonProducer} p_405 */
82
- produce(p_405) {
84
+ export class JsonSyntaxTree extends type__79() {
85
+ /** @param {JsonProducer} p_105 */
86
+ produce(p_105) {
83
87
  null;
84
- return;
85
88
  }
86
89
  };
87
- export class JsonObject extends type__383(JsonSyntaxTree) {
90
+ export class JsonObject extends type__79(JsonSyntaxTree) {
88
91
  /** @type {Map<string, Array<JsonSyntaxTree>>} */
89
- #properties_406;
92
+ #properties_106;
90
93
  /**
91
- * @param {string} propertyKey_408
94
+ * @param {string} propertyKey_108
92
95
  * @returns {JsonSyntaxTree | null}
93
96
  */
94
- propertyValueOrNull(propertyKey_408) {
95
- let return_409;
96
- const treeList_410 = mappedGetOr_411(this.#properties_406, propertyKey_408, Object.freeze([]));
97
- const lastIndex_412 = treeList_410.length - 1;
98
- if (lastIndex_412 >= 0) {
99
- return_409 = listedGet_413(treeList_410, lastIndex_412);
97
+ propertyValueOrNull(propertyKey_108) {
98
+ let return_109;
99
+ const treeList_110 = mappedGetOr_111(this.#properties_106, propertyKey_108, Object.freeze([]));
100
+ const lastIndex_112 = treeList_110.length - 1 | 0;
101
+ if (lastIndex_112 >= 0) {
102
+ return_109 = listedGet_113(treeList_110, lastIndex_112);
100
103
  } else {
101
- return_409 = null;
104
+ return_109 = null;
102
105
  }
103
- return return_409;
106
+ return return_109;
104
107
  }
105
108
  /**
106
- * @param {string} propertyKey_415
109
+ * @param {string} propertyKey_115
107
110
  * @returns {JsonSyntaxTree}
108
111
  */
109
- propertyValueOrBubble(propertyKey_415) {
110
- let return_416;
111
- let t_417;
112
- t_417 = this.propertyValueOrNull(propertyKey_415);
113
- const t_418 = t_417;
114
- if (t_418 == null) {
112
+ propertyValueOrBubble(propertyKey_115) {
113
+ let return_116;
114
+ let t_117 = this.propertyValueOrNull(propertyKey_115);
115
+ if (t_117 == null) {
115
116
  throw Error();
116
117
  } else {
117
- return_416 = t_418;
118
+ return_116 = t_117;
118
119
  }
119
- return return_416;
120
+ return return_116;
120
121
  }
121
- /** @param {JsonProducer} p_420 */
122
- produce(p_420) {
123
- p_420.startObject();
124
- function fn_421(k_422, vs_423) {
125
- function fn_424(v_425) {
126
- p_420.objectKey(k_422);
127
- v_425.produce(p_420);
122
+ /** @param {JsonProducer} p_119 */
123
+ produce(p_119) {
124
+ p_119.startObject();
125
+ function fn_120(k_121, vs_122) {
126
+ function fn_123(v_124) {
127
+ p_119.objectKey(k_121);
128
+ v_124.produce(p_119);
128
129
  return;
129
130
  }
130
- vs_423.forEach(fn_424);
131
+ vs_122.forEach(fn_123);
131
132
  return;
132
133
  }
133
- mappedForEach_426(this.#properties_406, fn_421);
134
- p_420.endObject();
134
+ mappedForEach_125(this.#properties_106, fn_120);
135
+ p_119.endObject();
135
136
  return;
136
137
  }
137
- /** @param {Map<string, Array<JsonSyntaxTree>>} properties_427 */
138
- constructor(properties_427) {
138
+ /** @param {Map<string, Array<JsonSyntaxTree>>} properties_126 */
139
+ constructor(properties_126) {
139
140
  super ();
140
- this.#properties_406 = properties_427;
141
+ this.#properties_106 = properties_126;
141
142
  return;
142
143
  }
143
144
  /** @returns {Map<string, Array<JsonSyntaxTree>>} */
144
145
  get properties() {
145
- return this.#properties_406;
146
+ return this.#properties_106;
146
147
  }
147
148
  };
148
- export class JsonArray extends type__383(JsonSyntaxTree) {
149
+ export class JsonArray extends type__79(JsonSyntaxTree) {
149
150
  /** @type {Array<JsonSyntaxTree>} */
150
- #elements_429;
151
- /** @param {JsonProducer} p_431 */
152
- produce(p_431) {
153
- p_431.startArray();
154
- function fn_432(v_433) {
155
- v_433.produce(p_431);
151
+ #elements_128;
152
+ /** @param {JsonProducer} p_130 */
153
+ produce(p_130) {
154
+ p_130.startArray();
155
+ function fn_131(v_132) {
156
+ v_132.produce(p_130);
156
157
  return;
157
158
  }
158
- this.#elements_429.forEach(fn_432);
159
- p_431.endArray();
159
+ this.#elements_128.forEach(fn_131);
160
+ p_130.endArray();
160
161
  return;
161
162
  }
162
- /** @param {Array<JsonSyntaxTree>} elements_434 */
163
- constructor(elements_434) {
163
+ /** @param {Array<JsonSyntaxTree>} elements_133 */
164
+ constructor(elements_133) {
164
165
  super ();
165
- this.#elements_429 = elements_434;
166
+ this.#elements_128 = elements_133;
166
167
  return;
167
168
  }
168
169
  /** @returns {Array<JsonSyntaxTree>} */
169
170
  get elements() {
170
- return this.#elements_429;
171
+ return this.#elements_128;
171
172
  }
172
173
  };
173
- export class JsonBoolean extends type__383(JsonSyntaxTree) {
174
+ export class JsonBoolean extends type__79(JsonSyntaxTree) {
174
175
  /** @type {boolean} */
175
- #content_436;
176
- /** @param {JsonProducer} p_438 */
177
- produce(p_438) {
178
- p_438.booleanValue(this.#content_436);
176
+ #content_135;
177
+ /** @param {JsonProducer} p_137 */
178
+ produce(p_137) {
179
+ p_137.booleanValue(this.#content_135);
179
180
  return;
180
181
  }
181
- /** @param {boolean} content_439 */
182
- constructor(content_439) {
182
+ /** @param {boolean} content_138 */
183
+ constructor(content_138) {
183
184
  super ();
184
- this.#content_436 = content_439;
185
+ this.#content_135 = content_138;
185
186
  return;
186
187
  }
187
188
  /** @returns {boolean} */
188
189
  get content() {
189
- return this.#content_436;
190
+ return this.#content_135;
190
191
  }
191
192
  };
192
- export class JsonNull extends type__383(JsonSyntaxTree) {
193
- /** @param {JsonProducer} p_442 */
194
- produce(p_442) {
195
- p_442.nullValue();
193
+ export class JsonNull extends type__79(JsonSyntaxTree) {
194
+ /** @param {JsonProducer} p_141 */
195
+ produce(p_141) {
196
+ p_141.nullValue();
196
197
  return;
197
198
  }
198
199
  constructor() {
@@ -200,1834 +201,2005 @@ export class JsonNull extends type__383(JsonSyntaxTree) {
200
201
  return;
201
202
  }
202
203
  };
203
- export class JsonString extends type__383(JsonSyntaxTree) {
204
+ export class JsonString extends type__79(JsonSyntaxTree) {
204
205
  /** @type {string} */
205
- #content_443;
206
- /** @param {JsonProducer} p_445 */
207
- produce(p_445) {
208
- p_445.stringValue(this.#content_443);
206
+ #content_142;
207
+ /** @param {JsonProducer} p_144 */
208
+ produce(p_144) {
209
+ p_144.stringValue(this.#content_142);
209
210
  return;
210
211
  }
211
- /** @param {string} content_446 */
212
- constructor(content_446) {
212
+ /** @param {string} content_145 */
213
+ constructor(content_145) {
213
214
  super ();
214
- this.#content_443 = content_446;
215
+ this.#content_142 = content_145;
215
216
  return;
216
217
  }
217
218
  /** @returns {string} */
218
219
  get content() {
219
- return this.#content_443;
220
+ return this.#content_142;
220
221
  }
221
222
  };
222
- export class JsonNumeric extends type__383(JsonSyntaxTree) {
223
+ export class JsonNumeric extends type__79(JsonSyntaxTree) {
224
+ /** @returns {string} */
225
+ asJsonNumericToken() {
226
+ null;
227
+ }
228
+ /** @returns {number} */
229
+ asInt32() {
230
+ null;
231
+ }
232
+ /** @returns {bigint} */
233
+ asInt64() {
234
+ null;
235
+ }
236
+ /** @returns {number} */
237
+ asFloat64() {
238
+ null;
239
+ }
223
240
  };
224
- export class JsonInt extends type__383(JsonNumeric) {
241
+ export class JsonInt32 extends type__79(JsonNumeric) {
225
242
  /** @type {number} */
226
- #content_451;
227
- /** @param {JsonProducer} p_453 */
228
- produce(p_453) {
229
- p_453.intValue(this.#content_451);
243
+ #content_151;
244
+ /** @param {JsonProducer} p_153 */
245
+ produce(p_153) {
246
+ p_153.int32Value(this.#content_151);
230
247
  return;
231
248
  }
232
249
  /** @returns {string} */
233
250
  asJsonNumericToken() {
234
- return this.#content_451.toString();
251
+ return this.#content_151.toString();
235
252
  }
236
253
  /** @returns {number} */
237
- asInt() {
238
- return this.#content_451;
254
+ asInt32() {
255
+ return this.#content_151;
256
+ }
257
+ /** @returns {bigint} */
258
+ asInt64() {
259
+ return BigInt(this.#content_151);
239
260
  }
240
261
  /** @returns {number} */
241
262
  asFloat64() {
242
- return this.#content_451;
263
+ return this.#content_151;
243
264
  }
244
- /** @param {number} content_457 */
245
- constructor(content_457) {
265
+ /** @param {number} content_158 */
266
+ constructor(content_158) {
246
267
  super ();
247
- this.#content_451 = content_457;
268
+ this.#content_151 = content_158;
248
269
  return;
249
270
  }
250
271
  /** @returns {number} */
251
272
  get content() {
252
- return this.#content_451;
273
+ return this.#content_151;
253
274
  }
254
275
  };
255
- export class JsonFloat64 extends type__383(JsonNumeric) {
276
+ export class JsonInt64 extends type__79(JsonNumeric) {
277
+ /** @type {bigint} */
278
+ #content_160;
279
+ /** @param {JsonProducer} p_162 */
280
+ produce(p_162) {
281
+ p_162.int64Value(this.#content_160);
282
+ return;
283
+ }
284
+ /** @returns {string} */
285
+ asJsonNumericToken() {
286
+ return this.#content_160.toString();
287
+ }
288
+ /** @returns {number} */
289
+ asInt32() {
290
+ return int64ToInt32_165(this.#content_160);
291
+ }
292
+ /** @returns {bigint} */
293
+ asInt64() {
294
+ return this.#content_160;
295
+ }
296
+ /** @returns {number} */
297
+ asFloat64() {
298
+ return int64ToFloat64_168(this.#content_160);
299
+ }
300
+ /** @param {bigint} content_169 */
301
+ constructor(content_169) {
302
+ super ();
303
+ this.#content_160 = content_169;
304
+ return;
305
+ }
306
+ /** @returns {bigint} */
307
+ get content() {
308
+ return this.#content_160;
309
+ }
310
+ };
311
+ export class JsonFloat64 extends type__79(JsonNumeric) {
256
312
  /** @type {number} */
257
- #content_459;
258
- /** @param {JsonProducer} p_461 */
259
- produce(p_461) {
260
- p_461.float64Value(this.#content_459);
313
+ #content_171;
314
+ /** @param {JsonProducer} p_173 */
315
+ produce(p_173) {
316
+ p_173.float64Value(this.#content_171);
261
317
  return;
262
318
  }
263
319
  /** @returns {string} */
264
320
  asJsonNumericToken() {
265
- return float64ToString_463(this.#content_459);
321
+ return float64ToString_175(this.#content_171);
266
322
  }
267
323
  /** @returns {number} */
268
- asInt() {
269
- return float64ToInt_465(this.#content_459);
324
+ asInt32() {
325
+ return float64ToInt32_177(this.#content_171);
326
+ }
327
+ /** @returns {bigint} */
328
+ asInt64() {
329
+ return float64ToInt64_179(this.#content_171);
270
330
  }
271
331
  /** @returns {number} */
272
332
  asFloat64() {
273
- return this.#content_459;
333
+ return this.#content_171;
274
334
  }
275
- /** @param {number} content_467 */
276
- constructor(content_467) {
335
+ /** @param {number} content_181 */
336
+ constructor(content_181) {
277
337
  super ();
278
- this.#content_459 = content_467;
338
+ this.#content_171 = content_181;
279
339
  return;
280
340
  }
281
341
  /** @returns {number} */
282
342
  get content() {
283
- return this.#content_459;
343
+ return this.#content_171;
284
344
  }
285
345
  };
286
- export class JsonNumericToken extends type__383(JsonNumeric) {
346
+ export class JsonNumericToken extends type__79(JsonNumeric) {
287
347
  /** @type {string} */
288
- #content_469;
289
- /** @param {JsonProducer} p_471 */
290
- produce(p_471) {
291
- p_471.numericTokenValue(this.#content_469);
348
+ #content_183;
349
+ /** @param {JsonProducer} p_185 */
350
+ produce(p_185) {
351
+ p_185.numericTokenValue(this.#content_183);
292
352
  return;
293
353
  }
294
354
  /** @returns {string} */
295
355
  asJsonNumericToken() {
296
- return this.#content_469;
356
+ return this.#content_183;
297
357
  }
298
358
  /** @returns {number} */
299
- asInt() {
300
- let return_474;
301
- let t_475;
302
- let t_476;
359
+ asInt32() {
360
+ let return_188;
361
+ let t_189;
362
+ let t_190;
363
+ try {
364
+ t_189 = stringToInt32_191(this.#content_183);
365
+ return_188 = t_189;
366
+ } catch {
367
+ t_190 = stringToFloat64_192(this.#content_183);
368
+ return_188 = float64ToInt32_177(t_190);
369
+ }
370
+ return return_188;
371
+ }
372
+ /** @returns {bigint} */
373
+ asInt64() {
374
+ let return_194;
375
+ let t_195;
376
+ let t_196;
303
377
  try {
304
- t_475 = stringToInt_477(this.#content_469);
305
- return_474 = t_475;
378
+ t_195 = stringToInt64_197(this.#content_183);
379
+ return_194 = t_195;
306
380
  } catch {
307
- t_476 = stringToFloat64_478(this.#content_469);
308
- return_474 = float64ToInt_465(t_476);
381
+ t_196 = stringToFloat64_192(this.#content_183);
382
+ return_194 = float64ToInt64_179(t_196);
309
383
  }
310
- return return_474;
384
+ return return_194;
311
385
  }
312
386
  /** @returns {number} */
313
387
  asFloat64() {
314
- return stringToFloat64_478(this.#content_469);
388
+ return stringToFloat64_192(this.#content_183);
315
389
  }
316
- /** @param {string} content_480 */
317
- constructor(content_480) {
390
+ /** @param {string} content_199 */
391
+ constructor(content_199) {
318
392
  super ();
319
- this.#content_469 = content_480;
393
+ this.#content_183 = content_199;
320
394
  return;
321
395
  }
322
396
  /** @returns {string} */
323
397
  get content() {
324
- return this.#content_469;
398
+ return this.#content_183;
325
399
  }
326
400
  };
327
- export class JsonTextProducer extends type__383(JsonProducer) {
401
+ export class JsonTextProducer extends type__79(JsonProducer) {
328
402
  /** @type {InterchangeContext} */
329
- #interchangeContext_482;
403
+ #interchangeContext_201;
330
404
  /** @type {globalThis.Array<string>} */
331
- #buffer_483;
405
+ #buffer_202;
332
406
  /** @type {Array<number>} */
333
- #stack_484;
407
+ #stack_203;
334
408
  /** @type {boolean} */
335
- #wellFormed_485;
336
- /** @param {InterchangeContext | null} [interchangeContext_486] */
337
- constructor(interchangeContext_486) {
409
+ #wellFormed_204;
410
+ /** @param {InterchangeContext | null} [interchangeContext_205] */
411
+ constructor(interchangeContext_205) {
338
412
  super ();
339
- let interchangeContext_487;
340
- if (interchangeContext_486 == null) {
341
- interchangeContext_487 = NullInterchangeContext.instance;
413
+ let interchangeContext_206;
414
+ if (interchangeContext_205 == null) {
415
+ interchangeContext_206 = NullInterchangeContext.instance;
342
416
  } else {
343
- interchangeContext_487 = interchangeContext_486;
344
- }
345
- this.#interchangeContext_482 = interchangeContext_487;
346
- let t_488 = [""];
347
- this.#buffer_483 = t_488;
348
- let t_489 = [];
349
- this.#stack_484 = t_489;
350
- listBuilderAdd_490(this.#stack_484, 5);
351
- this.#wellFormed_485 = true;
417
+ interchangeContext_206 = interchangeContext_205;
418
+ }
419
+ this.#interchangeContext_201 = interchangeContext_206;
420
+ let t_207 = [""];
421
+ this.#buffer_202 = t_207;
422
+ let t_208 = [];
423
+ this.#stack_203 = t_208;
424
+ listBuilderAdd_209(this.#stack_203, 5);
425
+ this.#wellFormed_204 = true;
352
426
  return;
353
427
  }
354
428
  /** @returns {number} */
355
- #state_492() {
356
- let t_493 = this.#stack_484.length;
357
- return listedGetOr_494(this.#stack_484, t_493 - 1, -1);
358
- }
359
- #beforeValue_496() {
360
- let t_497;
361
- let t_498;
362
- let t_499;
363
- let t_500;
364
- const currentState_501 = this.#state_492();
365
- if (currentState_501 === 3) {
366
- t_497 = this.#stack_484.length;
367
- listBuilderSet_502(this.#stack_484, t_497 - 1, 4);
368
- } else if (currentState_501 === 4) {
369
- this.#buffer_483[0] += ",";
370
- } else if (currentState_501 === 1) {
371
- t_498 = this.#stack_484.length;
372
- listBuilderSet_502(this.#stack_484, t_498 - 1, 2);
373
- } else if (currentState_501 === 5) {
374
- t_499 = this.#stack_484.length;
375
- listBuilderSet_502(this.#stack_484, t_499 - 1, 6);
429
+ #state_211() {
430
+ let t_212 = this.#stack_203.length;
431
+ return listedGetOr_213(this.#stack_203, t_212 - 1 | 0, -1);
432
+ }
433
+ #beforeValue_215() {
434
+ let t_216;
435
+ let t_217;
436
+ let t_218;
437
+ let t_219;
438
+ const currentState_220 = this.#state_211();
439
+ if (currentState_220 === 3) {
440
+ t_216 = this.#stack_203.length;
441
+ listBuilderSet_221(this.#stack_203, t_216 - 1 | 0, 4);
442
+ } else if (currentState_220 === 4) {
443
+ this.#buffer_202[0] += ",";
444
+ } else if (currentState_220 === 1) {
445
+ t_217 = this.#stack_203.length;
446
+ listBuilderSet_221(this.#stack_203, t_217 - 1 | 0, 2);
447
+ } else if (currentState_220 === 5) {
448
+ t_218 = this.#stack_203.length;
449
+ listBuilderSet_221(this.#stack_203, t_218 - 1 | 0, 6);
376
450
  } else {
377
- if (currentState_501 === 6) {
378
- t_500 = true;
451
+ if (currentState_220 === 6) {
452
+ t_219 = true;
379
453
  } else {
380
- t_500 = currentState_501 === 2;
454
+ t_219 = currentState_220 === 2;
381
455
  }
382
- if (t_500) {
383
- this.#wellFormed_485 = false;
456
+ if (t_219) {
457
+ this.#wellFormed_204 = false;
384
458
  }
385
459
  }
386
460
  return;
387
461
  }
388
462
  startObject() {
389
- this.#beforeValue_496();
390
- this.#buffer_483[0] += "{";
391
- listBuilderAdd_490(this.#stack_484, 0);
463
+ this.#beforeValue_215();
464
+ this.#buffer_202[0] += "{";
465
+ listBuilderAdd_209(this.#stack_203, 0);
392
466
  return;
393
467
  }
394
468
  endObject() {
395
- let t_505;
396
- this.#buffer_483[0] += "}";
397
- const currentState_506 = this.#state_492();
398
- if (0 === currentState_506) {
399
- t_505 = true;
469
+ let t_224;
470
+ this.#buffer_202[0] += "}";
471
+ const currentState_225 = this.#state_211();
472
+ if (0 === currentState_225) {
473
+ t_224 = true;
400
474
  } else {
401
- t_505 = 2 === currentState_506;
475
+ t_224 = 2 === currentState_225;
402
476
  }
403
- if (t_505) {
404
- listBuilderRemoveLast_507(this.#stack_484);
477
+ if (t_224) {
478
+ listBuilderRemoveLast_226(this.#stack_203);
405
479
  } else {
406
- this.#wellFormed_485 = false;
480
+ this.#wellFormed_204 = false;
407
481
  }
408
482
  return;
409
483
  }
410
- /** @param {string} key_509 */
411
- objectKey(key_509) {
412
- let t_510;
413
- const currentState_511 = this.#state_492();
414
- if (!(currentState_511 === 0)) {
415
- if (currentState_511 === 2) {
416
- this.#buffer_483[0] += ",";
484
+ /** @param {string} key_228 */
485
+ objectKey(key_228) {
486
+ let t_229;
487
+ const currentState_230 = this.#state_211();
488
+ if (!(currentState_230 === 0)) {
489
+ if (currentState_230 === 2) {
490
+ this.#buffer_202[0] += ",";
417
491
  } else {
418
- this.#wellFormed_485 = false;
492
+ this.#wellFormed_204 = false;
419
493
  }
420
494
  }
421
- encodeJsonString_512(key_509, this.#buffer_483);
422
- this.#buffer_483[0] += ":";
423
- if (currentState_511 >= 0) {
424
- t_510 = this.#stack_484.length;
425
- listBuilderSet_502(this.#stack_484, t_510 - 1, 1);
495
+ encodeJsonString_231(key_228, this.#buffer_202);
496
+ this.#buffer_202[0] += ":";
497
+ if (currentState_230 >= 0) {
498
+ t_229 = this.#stack_203.length;
499
+ listBuilderSet_221(this.#stack_203, t_229 - 1 | 0, 1);
426
500
  }
427
501
  return;
428
502
  }
429
503
  startArray() {
430
- this.#beforeValue_496();
431
- this.#buffer_483[0] += "[";
432
- listBuilderAdd_490(this.#stack_484, 3);
504
+ this.#beforeValue_215();
505
+ this.#buffer_202[0] += "[";
506
+ listBuilderAdd_209(this.#stack_203, 3);
433
507
  return;
434
508
  }
435
509
  endArray() {
436
- let t_515;
437
- this.#buffer_483[0] += "]";
438
- const currentState_516 = this.#state_492();
439
- if (3 === currentState_516) {
440
- t_515 = true;
510
+ let t_234;
511
+ this.#buffer_202[0] += "]";
512
+ const currentState_235 = this.#state_211();
513
+ if (3 === currentState_235) {
514
+ t_234 = true;
441
515
  } else {
442
- t_515 = 4 === currentState_516;
516
+ t_234 = 4 === currentState_235;
443
517
  }
444
- if (t_515) {
445
- listBuilderRemoveLast_507(this.#stack_484);
518
+ if (t_234) {
519
+ listBuilderRemoveLast_226(this.#stack_203);
446
520
  } else {
447
- this.#wellFormed_485 = false;
521
+ this.#wellFormed_204 = false;
448
522
  }
449
523
  return;
450
524
  }
451
525
  nullValue() {
452
- this.#beforeValue_496();
453
- this.#buffer_483[0] += "null";
526
+ this.#beforeValue_215();
527
+ this.#buffer_202[0] += "null";
454
528
  return;
455
529
  }
456
- /** @param {boolean} x_519 */
457
- booleanValue(x_519) {
458
- let t_520;
459
- this.#beforeValue_496();
460
- if (x_519) {
461
- t_520 = "true";
530
+ /** @param {boolean} x_238 */
531
+ booleanValue(x_238) {
532
+ let t_239;
533
+ this.#beforeValue_215();
534
+ if (x_238) {
535
+ t_239 = "true";
462
536
  } else {
463
- t_520 = "false";
537
+ t_239 = "false";
464
538
  }
465
- this.#buffer_483[0] += t_520;
539
+ this.#buffer_202[0] += t_239;
466
540
  return;
467
541
  }
468
- /** @param {number} x_522 */
469
- intValue(x_522) {
470
- this.#beforeValue_496();
471
- let t_523 = x_522.toString();
472
- this.#buffer_483[0] += t_523;
542
+ /** @param {number} x_241 */
543
+ int32Value(x_241) {
544
+ this.#beforeValue_215();
545
+ let t_242 = x_241.toString();
546
+ this.#buffer_202[0] += t_242;
473
547
  return;
474
548
  }
475
- /** @param {number} x_525 */
476
- float64Value(x_525) {
477
- this.#beforeValue_496();
478
- let t_526 = float64ToString_463(x_525);
479
- this.#buffer_483[0] += t_526;
549
+ /** @param {bigint} x_244 */
550
+ int64Value(x_244) {
551
+ this.#beforeValue_215();
552
+ let t_245 = x_244.toString();
553
+ this.#buffer_202[0] += t_245;
480
554
  return;
481
555
  }
482
- /** @param {string} x_528 */
483
- numericTokenValue(x_528) {
484
- this.#beforeValue_496();
485
- this.#buffer_483[0] += x_528;
556
+ /** @param {number} x_247 */
557
+ float64Value(x_247) {
558
+ this.#beforeValue_215();
559
+ let t_248 = float64ToString_175(x_247);
560
+ this.#buffer_202[0] += t_248;
486
561
  return;
487
562
  }
488
- /** @param {string} x_530 */
489
- stringValue(x_530) {
490
- this.#beforeValue_496();
491
- encodeJsonString_512(x_530, this.#buffer_483);
563
+ /** @param {string} x_250 */
564
+ numericTokenValue(x_250) {
565
+ this.#beforeValue_215();
566
+ this.#buffer_202[0] += x_250;
567
+ return;
568
+ }
569
+ /** @param {string} x_252 */
570
+ stringValue(x_252) {
571
+ this.#beforeValue_215();
572
+ encodeJsonString_231(x_252, this.#buffer_202);
492
573
  return;
493
574
  }
494
575
  /** @returns {string} */
495
576
  toJsonString() {
496
- let return_532;
497
- let t_533;
498
- let t_534;
499
- let t_535;
500
- if (this.#wellFormed_485) {
501
- if (this.#stack_484.length === 1) {
502
- t_533 = this.#state_492();
503
- t_534 = t_533 === 6;
577
+ let return_254;
578
+ let t_255;
579
+ let t_256;
580
+ let t_257;
581
+ if (this.#wellFormed_204) {
582
+ if (this.#stack_203.length === 1) {
583
+ t_255 = this.#state_211();
584
+ t_256 = t_255 === 6;
504
585
  } else {
505
- t_534 = false;
586
+ t_256 = false;
506
587
  }
507
- t_535 = t_534;
588
+ t_257 = t_256;
508
589
  } else {
509
- t_535 = false;
590
+ t_257 = false;
510
591
  }
511
- if (t_535) {
512
- return_532 = this.#buffer_483[0];
592
+ if (t_257) {
593
+ return_254 = this.#buffer_202[0];
513
594
  } else {
514
595
  throw Error();
515
596
  }
516
- return return_532;
597
+ return return_254;
517
598
  }
518
599
  /** @returns {InterchangeContext} */
519
600
  get interchangeContext() {
520
- return this.#interchangeContext_482;
601
+ return this.#interchangeContext_201;
521
602
  }
522
603
  };
523
- export class JsonParseErrorReceiver extends type__383() {
524
- /** @param {string} explanation_538 */
525
- explainJsonError(explanation_538) {
604
+ export class JsonParseErrorReceiver extends type__79() {
605
+ /** @param {string} explanation_260 */
606
+ explainJsonError(explanation_260) {
526
607
  null;
527
- return;
528
608
  }
529
609
  };
530
- export class JsonSyntaxTreeProducer extends type__383(JsonProducer, JsonParseErrorReceiver) {
610
+ export class JsonSyntaxTreeProducer extends type__79(JsonProducer, JsonParseErrorReceiver) {
531
611
  /** @type {Array<Array<JsonSyntaxTree>>} */
532
- #stack_539;
612
+ #stack_261;
533
613
  /** @type {string | null} */
534
- #error_540;
614
+ #error_262;
535
615
  /** @returns {InterchangeContext} */
536
616
  get interchangeContext() {
537
617
  return NullInterchangeContext.instance;
538
618
  }
539
619
  constructor() {
540
620
  super ();
541
- let t_542 = [];
542
- this.#stack_539 = t_542;
543
- let t_543 = [];
544
- listBuilderAdd_490(this.#stack_539, t_543);
545
- this.#error_540 = null;
621
+ let t_264 = [];
622
+ this.#stack_261 = t_264;
623
+ let t_265 = [];
624
+ listBuilderAdd_209(this.#stack_261, t_265);
625
+ this.#error_262 = null;
546
626
  return;
547
627
  }
548
- /** @param {JsonSyntaxTree} v_546 */
549
- #storeValue_545(v_546) {
550
- let t_547;
551
- let t_548;
552
- if (! ! this.#stack_539.length) {
553
- t_547 = this.#stack_539.length;
554
- t_548 = listedGet_413(this.#stack_539, t_547 - 1);
555
- listBuilderAdd_490(t_548, v_546);
628
+ /** @param {JsonSyntaxTree} v_268 */
629
+ #storeValue_267(v_268) {
630
+ let t_269;
631
+ if (! ! this.#stack_261.length) {
632
+ t_269 = this.#stack_261.length;
633
+ listBuilderAdd_209(listedGet_113(this.#stack_261, t_269 - 1 | 0), v_268);
556
634
  }
557
635
  return;
558
636
  }
559
637
  startObject() {
560
- let t_550 = [];
561
- listBuilderAdd_490(this.#stack_539, t_550);
638
+ let t_271 = [];
639
+ listBuilderAdd_209(this.#stack_261, t_271);
562
640
  return;
563
641
  }
564
642
  endObject() {
565
- let return_552;
566
- let t_553;
567
- let t_554;
568
- let t_555;
569
- let t_556;
570
- let t_557;
571
- let t_558;
572
- let t_559;
573
- let t_560;
574
- fn_561: {
575
- if (! this.#stack_539.length) {
576
- return_552 = void 0;
577
- break fn_561;
643
+ let return_273;
644
+ let t_274;
645
+ let t_275;
646
+ let t_276;
647
+ let t_277;
648
+ let t_278;
649
+ let t_279;
650
+ let t_280;
651
+ let t_281;
652
+ let t_282;
653
+ let t_283;
654
+ fn_284: {
655
+ if (! this.#stack_261.length) {
656
+ return_273 = void 0;
657
+ break fn_284;
578
658
  }
579
- let ls_562;
580
- ls_562 = listBuilderRemoveLast_507(this.#stack_539);
581
- const m_563 = mapBuilderConstructor_564();
582
- let multis_565 = null;
583
- let i_566 = 0;
584
- let n_567 = ls_562.length & -2;
585
- while (i_566 < n_567) {
586
- const postfixReturn_568 = i_566;
587
- i_566 = i_566 + 1;
588
- t_555 = listedGet_413(ls_562, postfixReturn_568);
589
- const keyTree_569 = t_555;
590
- if (!(keyTree_569 instanceof JsonString)) {
659
+ const ls_285 = listBuilderRemoveLast_226(this.#stack_261);
660
+ const m_286 = mapBuilderConstructor_287();
661
+ let multis_288 = null;
662
+ let i_289 = 0;
663
+ let n_290 = ls_285.length & -2;
664
+ while (i_289 < n_290) {
665
+ const postfixReturn_291 = i_289;
666
+ i_289 = i_289 + 1 | 0;
667
+ const keyTree_292 = listedGet_113(ls_285, postfixReturn_291);
668
+ if (!(keyTree_292 instanceof JsonString)) {
591
669
  break;
592
670
  }
593
- t_556 = requireInstanceOf__570(keyTree_569, JsonString);
594
- const key_571 = t_556.content;
595
- const postfixReturn_572 = i_566;
596
- i_566 = i_566 + 1;
597
- t_557 = listedGet_413(ls_562, postfixReturn_572);
598
- const value_573 = t_557;
599
- if (m_563.has(key_571)) {
600
- if (multis_565 == null) {
601
- t_553 = mapBuilderConstructor_564();
602
- multis_565 = t_553;
671
+ try {
672
+ t_276 = requireInstanceOf__293(keyTree_292, JsonString);
673
+ t_277 = t_276;
674
+ } catch {
675
+ t_277 = panic_294();
676
+ }
677
+ const key_295 = t_277.content;
678
+ const postfixReturn_296 = i_289;
679
+ i_289 = i_289 + 1 | 0;
680
+ const value_297 = listedGet_113(ls_285, postfixReturn_296);
681
+ if (m_286.has(key_295)) {
682
+ if (multis_288 == null) {
683
+ t_274 = mapBuilderConstructor_287();
684
+ multis_288 = t_274;
603
685
  }
604
- if (multis_565 == null) {
605
- throw Error();
606
- } else {
607
- t_558 = multis_565;
686
+ try {
687
+ if (multis_288 == null) {
688
+ throw Error();
689
+ } else {
690
+ t_278 = multis_288;
691
+ }
692
+ t_279 = t_278;
693
+ } catch {
694
+ t_279 = panic_294();
608
695
  }
609
- const mb_574 = t_558;
610
- if (! mb_574.has(key_571)) {
611
- t_559 = mappedGet_575(m_563, key_571);
612
- mapBuilderSet_576(mb_574, key_571, t_559.slice());
696
+ const mb_298 = t_279;
697
+ if (! mb_298.has(key_295)) {
698
+ try {
699
+ t_280 = mappedGet_299(m_286, key_295);
700
+ t_281 = t_280;
701
+ } catch {
702
+ t_281 = panic_294();
703
+ }
704
+ mapBuilderSet_300(mb_298, key_295, t_281.slice());
613
705
  }
614
- t_560 = mappedGet_575(mb_574, key_571);
615
- listBuilderAdd_490(t_560, value_573);
706
+ try {
707
+ t_282 = mappedGet_299(mb_298, key_295);
708
+ t_283 = t_282;
709
+ } catch {
710
+ t_283 = panic_294();
711
+ }
712
+ listBuilderAdd_209(t_283, value_297);
616
713
  } else {
617
- mapBuilderSet_576(m_563, key_571, Object.freeze([value_573]));
714
+ mapBuilderSet_300(m_286, key_295, Object.freeze([value_297]));
618
715
  }
619
716
  }
620
- const multis_577 = multis_565;
621
- if (!(multis_577 == null)) {
622
- function fn_578(k_579, vs_580) {
623
- let t_581 = listBuilderToList_582(vs_580);
624
- mapBuilderSet_576(m_563, k_579, t_581);
717
+ const multis_301 = multis_288;
718
+ if (!(multis_301 == null)) {
719
+ function fn_302(k_303, vs_304) {
720
+ let t_305 = listBuilderToList_306(vs_304);
721
+ mapBuilderSet_300(m_286, k_303, t_305);
625
722
  return;
626
723
  }
627
- mappedForEach_426(multis_577, fn_578);
724
+ mappedForEach_125(multis_301, fn_302);
628
725
  }
629
- t_554 = new JsonObject(mappedToMap_583(m_563));
630
- this.#storeValue_545(t_554);
631
- return_552 = void 0;
726
+ t_275 = new JsonObject(mappedToMap_307(m_286));
727
+ this.#storeValue_267(t_275);
728
+ return_273 = void 0;
632
729
  }
633
- return return_552;
730
+ return return_273;
634
731
  }
635
- /** @param {string} key_585 */
636
- objectKey(key_585) {
637
- let t_586 = new JsonString(key_585);
638
- this.#storeValue_545(t_586);
732
+ /** @param {string} key_309 */
733
+ objectKey(key_309) {
734
+ let t_310 = new JsonString(key_309);
735
+ this.#storeValue_267(t_310);
639
736
  return;
640
737
  }
641
738
  startArray() {
642
- let t_588 = [];
643
- listBuilderAdd_490(this.#stack_539, t_588);
739
+ let t_312 = [];
740
+ listBuilderAdd_209(this.#stack_261, t_312);
644
741
  return;
645
742
  }
646
743
  endArray() {
647
- let return_590;
648
- let t_591;
649
- fn_592: {
650
- if (! this.#stack_539.length) {
651
- return_590 = void 0;
652
- break fn_592;
744
+ let return_314;
745
+ let t_315;
746
+ fn_316: {
747
+ if (! this.#stack_261.length) {
748
+ return_314 = void 0;
749
+ break fn_316;
653
750
  }
654
- let ls_593;
655
- ls_593 = listBuilderRemoveLast_507(this.#stack_539);
656
- t_591 = new JsonArray(listBuilderToList_582(ls_593));
657
- this.#storeValue_545(t_591);
658
- return_590 = void 0;
751
+ const ls_317 = listBuilderRemoveLast_226(this.#stack_261);
752
+ t_315 = new JsonArray(listBuilderToList_306(ls_317));
753
+ this.#storeValue_267(t_315);
754
+ return_314 = void 0;
659
755
  }
660
- return return_590;
756
+ return return_314;
661
757
  }
662
758
  nullValue() {
663
- let t_595 = new JsonNull();
664
- this.#storeValue_545(t_595);
759
+ let t_319 = new JsonNull();
760
+ this.#storeValue_267(t_319);
665
761
  return;
666
762
  }
667
- /** @param {boolean} x_597 */
668
- booleanValue(x_597) {
669
- let t_598 = new JsonBoolean(x_597);
670
- this.#storeValue_545(t_598);
763
+ /** @param {boolean} x_321 */
764
+ booleanValue(x_321) {
765
+ let t_322 = new JsonBoolean(x_321);
766
+ this.#storeValue_267(t_322);
671
767
  return;
672
768
  }
673
- /** @param {number} x_600 */
674
- intValue(x_600) {
675
- let t_601 = new JsonInt(x_600);
676
- this.#storeValue_545(t_601);
769
+ /** @param {number} x_324 */
770
+ int32Value(x_324) {
771
+ let t_325 = new JsonInt32(x_324);
772
+ this.#storeValue_267(t_325);
677
773
  return;
678
774
  }
679
- /** @param {number} x_603 */
680
- float64Value(x_603) {
681
- let t_604 = new JsonFloat64(x_603);
682
- this.#storeValue_545(t_604);
775
+ /** @param {bigint} x_327 */
776
+ int64Value(x_327) {
777
+ let t_328 = new JsonInt64(x_327);
778
+ this.#storeValue_267(t_328);
683
779
  return;
684
780
  }
685
- /** @param {string} x_606 */
686
- numericTokenValue(x_606) {
687
- let t_607 = new JsonNumericToken(x_606);
688
- this.#storeValue_545(t_607);
781
+ /** @param {number} x_330 */
782
+ float64Value(x_330) {
783
+ let t_331 = new JsonFloat64(x_330);
784
+ this.#storeValue_267(t_331);
689
785
  return;
690
786
  }
691
- /** @param {string} x_609 */
692
- stringValue(x_609) {
693
- let t_610 = new JsonString(x_609);
694
- this.#storeValue_545(t_610);
787
+ /** @param {string} x_333 */
788
+ numericTokenValue(x_333) {
789
+ let t_334 = new JsonNumericToken(x_333);
790
+ this.#storeValue_267(t_334);
791
+ return;
792
+ }
793
+ /** @param {string} x_336 */
794
+ stringValue(x_336) {
795
+ let t_337 = new JsonString(x_336);
796
+ this.#storeValue_267(t_337);
695
797
  return;
696
798
  }
697
799
  /** @returns {JsonSyntaxTree} */
698
800
  toJsonSyntaxTree() {
699
- let t_612;
700
- if (this.#stack_539.length !== 1) {
701
- t_612 = true;
801
+ let t_339;
802
+ if (this.#stack_261.length !== 1) {
803
+ t_339 = true;
702
804
  } else {
703
- t_612 = !(this.#error_540 == null);
805
+ t_339 = !(this.#error_262 == null);
704
806
  }
705
- if (t_612) {
807
+ if (t_339) {
706
808
  throw Error();
707
809
  }
708
- let ls_613;
709
- ls_613 = listedGet_413(this.#stack_539, 0);
710
- if (ls_613.length !== 1) {
810
+ const ls_340 = listedGet_113(this.#stack_261, 0);
811
+ if (ls_340.length !== 1) {
711
812
  throw Error();
712
813
  }
713
- return listedGet_413(ls_613, 0);
814
+ return listedGet_113(ls_340, 0);
714
815
  }
715
816
  /** @returns {string | null} */
716
817
  get jsonError() {
717
- return this.#error_540;
818
+ return this.#error_262;
819
+ }
820
+ /** @returns {JsonParseErrorReceiver} */
821
+ get parseErrorReceiver() {
822
+ return this;
718
823
  }
719
- /** @param {string} error_616 */
720
- explainJsonError(error_616) {
721
- this.#error_540 = error_616;
824
+ /** @param {string} error_344 */
825
+ explainJsonError(error_344) {
826
+ this.#error_262 = error_344;
722
827
  return;
723
828
  }
724
829
  };
725
830
  /**
726
- * @param {string} sourceText_618
727
- * @param {globalThis.number} i_619
728
- * @param {JsonProducer} out_620
831
+ * @param {string} sourceText_346
832
+ * @param {globalThis.number} i_347
833
+ * @param {JsonProducer} out_348
729
834
  * @returns {globalThis.number}
730
835
  */
731
- function parseJsonValue_617(sourceText_618, i_619, out_620) {
732
- let return_621;
733
- let t_622;
734
- let t_623;
735
- let t_624;
736
- fn_625: {
737
- t_622 = skipJsonSpaces_626(sourceText_618, i_619);
738
- i_619 = t_622;
739
- if (!(sourceText_618.length > i_619)) {
740
- expectedTokenError_627(sourceText_618, i_619, out_620, "JSON value");
741
- return_621 = -1;
742
- break fn_625;
743
- }
744
- t_623 = stringGet_628(sourceText_618, i_619);
745
- if (t_623 === 123) {
746
- return_621 = parseJsonObject_629(sourceText_618, i_619, out_620);
747
- } else if (t_623 === 91) {
748
- return_621 = parseJsonArray_630(sourceText_618, i_619, out_620);
749
- } else if (t_623 === 34) {
750
- return_621 = parseJsonString_631(sourceText_618, i_619, out_620);
836
+ function parseJsonValue_345(sourceText_346, i_347, out_348) {
837
+ let return_349;
838
+ let t_350;
839
+ let t_351;
840
+ let t_352;
841
+ fn_353: {
842
+ t_350 = skipJsonSpaces_354(sourceText_346, i_347);
843
+ i_347 = t_350;
844
+ if (!(sourceText_346.length > i_347)) {
845
+ expectedTokenError_355(sourceText_346, i_347, out_348, "JSON value");
846
+ return_349 = -1;
847
+ break fn_353;
848
+ }
849
+ t_351 = stringGet_356(sourceText_346, i_347);
850
+ if (t_351 === 123) {
851
+ return_349 = parseJsonObject_357(sourceText_346, i_347, out_348);
852
+ } else if (t_351 === 91) {
853
+ return_349 = parseJsonArray_358(sourceText_346, i_347, out_348);
854
+ } else if (t_351 === 34) {
855
+ return_349 = parseJsonString_359(sourceText_346, i_347, out_348);
751
856
  } else {
752
- if (t_623 === 116) {
753
- t_624 = true;
857
+ if (t_351 === 116) {
858
+ t_352 = true;
754
859
  } else {
755
- t_624 = t_623 === 102;
860
+ t_352 = t_351 === 102;
756
861
  }
757
- if (t_624) {
758
- return_621 = parseJsonBoolean_632(sourceText_618, i_619, out_620);
759
- } else if (t_623 === 110) {
760
- return_621 = parseJsonNull_633(sourceText_618, i_619, out_620);
862
+ if (t_352) {
863
+ return_349 = parseJsonBoolean_360(sourceText_346, i_347, out_348);
864
+ } else if (t_351 === 110) {
865
+ return_349 = parseJsonNull_361(sourceText_346, i_347, out_348);
761
866
  } else {
762
- return_621 = parseJsonNumber_634(sourceText_618, i_619, out_620);
867
+ return_349 = parseJsonNumber_362(sourceText_346, i_347, out_348);
763
868
  }
764
869
  }
765
870
  }
766
- return return_621;
871
+ return return_349;
767
872
  }
768
- /** @template T_638 */
769
- export class JsonAdapter extends type__383() {
873
+ /** @template T_363 */
874
+ export class JsonAdapter extends type__79() {
770
875
  /**
771
- * @param {T_638} x_636
772
- * @param {JsonProducer} p_637
876
+ * @param {T_363} x_365
877
+ * @param {JsonProducer} p_366
773
878
  */
774
- encodeToJson(x_636, p_637) {
879
+ encodeToJson(x_365, p_366) {
880
+ null;
881
+ }
882
+ /**
883
+ * @param {JsonSyntaxTree} t_368
884
+ * @param {InterchangeContext} ic_369
885
+ * @returns {T_363}
886
+ */
887
+ decodeFromJson(t_368, ic_369) {
775
888
  null;
776
- return;
777
889
  }
778
890
  };
779
- class BooleanJsonAdapter_642 extends type__383(JsonAdapter) {
891
+ class BooleanJsonAdapter_370 extends type__79(JsonAdapter) {
780
892
  /**
781
- * @param {boolean} x_644
782
- * @param {JsonProducer} p_645
893
+ * @param {boolean} x_372
894
+ * @param {JsonProducer} p_373
783
895
  */
784
- encodeToJson(x_644, p_645) {
785
- p_645.booleanValue(x_644);
896
+ encodeToJson(x_372, p_373) {
897
+ p_373.booleanValue(x_372);
786
898
  return;
787
899
  }
788
900
  /**
789
- * @param {JsonSyntaxTree} t_647
790
- * @param {InterchangeContext} ic_648
901
+ * @param {JsonSyntaxTree} t_375
902
+ * @param {InterchangeContext} ic_376
791
903
  * @returns {boolean}
792
904
  */
793
- decodeFromJson(t_647, ic_648) {
794
- let t_649;
795
- t_649 = requireInstanceOf__570(t_647, JsonBoolean);
796
- return t_649.content;
905
+ decodeFromJson(t_375, ic_376) {
906
+ let t_377;
907
+ t_377 = requireInstanceOf__293(t_375, JsonBoolean);
908
+ return t_377.content;
797
909
  }
798
910
  constructor() {
799
911
  super ();
800
912
  return;
801
913
  }
802
914
  }
803
- class Float64JsonAdapter_650 extends type__383(JsonAdapter) {
915
+ class Float64JsonAdapter_378 extends type__79(JsonAdapter) {
804
916
  /**
805
- * @param {number} x_652
806
- * @param {JsonProducer} p_653
917
+ * @param {number} x_380
918
+ * @param {JsonProducer} p_381
807
919
  */
808
- encodeToJson(x_652, p_653) {
809
- p_653.float64Value(x_652);
920
+ encodeToJson(x_380, p_381) {
921
+ p_381.float64Value(x_380);
810
922
  return;
811
923
  }
812
924
  /**
813
- * @param {JsonSyntaxTree} t_655
814
- * @param {InterchangeContext} ic_656
925
+ * @param {JsonSyntaxTree} t_383
926
+ * @param {InterchangeContext} ic_384
815
927
  * @returns {number}
816
928
  */
817
- decodeFromJson(t_655, ic_656) {
818
- let t_657;
819
- t_657 = requireInstanceOf__570(t_655, JsonFloat64);
820
- return t_657.content;
929
+ decodeFromJson(t_383, ic_384) {
930
+ let t_385;
931
+ t_385 = requireInstanceOf__293(t_383, JsonNumeric);
932
+ return t_385.asFloat64();
821
933
  }
822
934
  constructor() {
823
935
  super ();
824
936
  return;
825
937
  }
826
938
  }
827
- class IntJsonAdapter_658 extends type__383(JsonAdapter) {
939
+ class Int32JsonAdapter_386 extends type__79(JsonAdapter) {
828
940
  /**
829
- * @param {number} x_660
830
- * @param {JsonProducer} p_661
941
+ * @param {number} x_388
942
+ * @param {JsonProducer} p_389
831
943
  */
832
- encodeToJson(x_660, p_661) {
833
- p_661.intValue(x_660);
944
+ encodeToJson(x_388, p_389) {
945
+ p_389.int32Value(x_388);
834
946
  return;
835
947
  }
836
948
  /**
837
- * @param {JsonSyntaxTree} t_663
838
- * @param {InterchangeContext} ic_664
949
+ * @param {JsonSyntaxTree} t_391
950
+ * @param {InterchangeContext} ic_392
839
951
  * @returns {number}
840
952
  */
841
- decodeFromJson(t_663, ic_664) {
842
- let t_665;
843
- t_665 = requireInstanceOf__570(t_663, JsonInt);
844
- return t_665.content;
953
+ decodeFromJson(t_391, ic_392) {
954
+ let t_393;
955
+ t_393 = requireInstanceOf__293(t_391, JsonNumeric);
956
+ return t_393.asInt32();
845
957
  }
846
958
  constructor() {
847
959
  super ();
848
960
  return;
849
961
  }
850
962
  }
851
- class StringJsonAdapter_666 extends type__383(JsonAdapter) {
963
+ class Int64JsonAdapter_394 extends type__79(JsonAdapter) {
852
964
  /**
853
- * @param {string} x_668
854
- * @param {JsonProducer} p_669
965
+ * @param {bigint} x_396
966
+ * @param {JsonProducer} p_397
855
967
  */
856
- encodeToJson(x_668, p_669) {
857
- p_669.stringValue(x_668);
968
+ encodeToJson(x_396, p_397) {
969
+ p_397.int64Value(x_396);
858
970
  return;
859
971
  }
860
972
  /**
861
- * @param {JsonSyntaxTree} t_671
862
- * @param {InterchangeContext} ic_672
973
+ * @param {JsonSyntaxTree} t_399
974
+ * @param {InterchangeContext} ic_400
975
+ * @returns {bigint}
976
+ */
977
+ decodeFromJson(t_399, ic_400) {
978
+ let t_401;
979
+ t_401 = requireInstanceOf__293(t_399, JsonNumeric);
980
+ return t_401.asInt64();
981
+ }
982
+ constructor() {
983
+ super ();
984
+ return;
985
+ }
986
+ }
987
+ class StringJsonAdapter_402 extends type__79(JsonAdapter) {
988
+ /**
989
+ * @param {string} x_404
990
+ * @param {JsonProducer} p_405
991
+ */
992
+ encodeToJson(x_404, p_405) {
993
+ p_405.stringValue(x_404);
994
+ return;
995
+ }
996
+ /**
997
+ * @param {JsonSyntaxTree} t_407
998
+ * @param {InterchangeContext} ic_408
863
999
  * @returns {string}
864
1000
  */
865
- decodeFromJson(t_671, ic_672) {
866
- let t_673;
867
- t_673 = requireInstanceOf__570(t_671, JsonString);
868
- return t_673.content;
1001
+ decodeFromJson(t_407, ic_408) {
1002
+ let t_409;
1003
+ t_409 = requireInstanceOf__293(t_407, JsonString);
1004
+ return t_409.content;
869
1005
  }
870
1006
  constructor() {
871
1007
  super ();
872
1008
  return;
873
1009
  }
874
1010
  }
875
- /** @template T_676 */
876
- class ListJsonAdapter_674 extends type__383(JsonAdapter) {
877
- /** @type {JsonAdapter<T_676>} */
878
- #adapterForT_675;
1011
+ /** @template T_411 */
1012
+ class ListJsonAdapter_410 extends type__79(JsonAdapter) {
1013
+ /** @type {JsonAdapter<T_411>} */
1014
+ #adapterForT_412;
879
1015
  /**
880
- * @param {Array<T_676>} x_678
881
- * @param {JsonProducer} p_679
1016
+ * @param {Array<T_411>} x_414
1017
+ * @param {JsonProducer} p_415
882
1018
  */
883
- encodeToJson(x_678, p_679) {
884
- const this682 = this;
885
- p_679.startArray();
886
- function fn_680(el_681) {
887
- this682.#adapterForT_675.encodeToJson(el_681, p_679);
1019
+ encodeToJson(x_414, p_415) {
1020
+ const this418 = this;
1021
+ p_415.startArray();
1022
+ function fn_416(el_417) {
1023
+ this418.#adapterForT_412.encodeToJson(el_417, p_415);
888
1024
  return;
889
1025
  }
890
- x_678.forEach(fn_680);
891
- p_679.endArray();
1026
+ x_414.forEach(fn_416);
1027
+ p_415.endArray();
892
1028
  return;
893
1029
  }
894
1030
  /**
895
- * @param {JsonSyntaxTree} t_684
896
- * @param {InterchangeContext} ic_685
897
- * @returns {Array<T_676>}
1031
+ * @param {JsonSyntaxTree} t_420
1032
+ * @param {InterchangeContext} ic_421
1033
+ * @returns {Array<T_411>}
898
1034
  */
899
- decodeFromJson(t_684, ic_685) {
900
- let t_686;
901
- let t_687;
902
- const b_688 = [];
903
- let t_689;
904
- t_689 = requireInstanceOf__570(t_684, JsonArray);
905
- const elements_690 = t_689.elements;
906
- const n_691 = elements_690.length;
907
- let i_692 = 0;
908
- while (i_692 < n_691) {
909
- t_686 = listedGet_413(elements_690, i_692);
910
- const el_693 = t_686;
911
- i_692 = i_692 + 1;
912
- t_687 = this.#adapterForT_675.decodeFromJson(el_693, ic_685);
913
- listBuilderAdd_490(b_688, t_687);
914
- }
915
- return listBuilderToList_582(b_688);
916
- }
917
- /** @param {JsonAdapter<T_676>} adapterForT_694 */
918
- constructor(adapterForT_694) {
1035
+ decodeFromJson(t_420, ic_421) {
1036
+ let t_422;
1037
+ const b_423 = [];
1038
+ let t_424;
1039
+ t_424 = requireInstanceOf__293(t_420, JsonArray);
1040
+ const elements_425 = t_424.elements;
1041
+ const n_426 = elements_425.length;
1042
+ let i_427 = 0;
1043
+ while (i_427 < n_426) {
1044
+ const el_428 = listedGet_113(elements_425, i_427);
1045
+ i_427 = i_427 + 1 | 0;
1046
+ t_422 = this.#adapterForT_412.decodeFromJson(el_428, ic_421);
1047
+ listBuilderAdd_209(b_423, t_422);
1048
+ }
1049
+ return listBuilderToList_306(b_423);
1050
+ }
1051
+ /** @param {JsonAdapter<T_411>} adapterForT_429 */
1052
+ constructor(adapterForT_429) {
919
1053
  super ();
920
- this.#adapterForT_675 = adapterForT_694;
1054
+ this.#adapterForT_412 = adapterForT_429;
921
1055
  return;
922
1056
  }
923
1057
  }
924
- /** @template T_696 */
925
- export class OrNullJsonAdapter extends type__383(JsonAdapter) {
926
- /** @type {JsonAdapter<T_696>} */
927
- #adapterForT_695;
1058
+ /** @template T_430 */
1059
+ export class OrNullJsonAdapter extends type__79(JsonAdapter) {
1060
+ /** @type {JsonAdapter<T_430>} */
1061
+ #adapterForT_431;
928
1062
  /**
929
- * @param {T_696 | null} x_698
930
- * @param {JsonProducer} p_699
1063
+ * @param {T_430 | null} x_433
1064
+ * @param {JsonProducer} p_434
931
1065
  */
932
- encodeToJson(x_698, p_699) {
933
- if (x_698 == null) {
934
- p_699.nullValue();
1066
+ encodeToJson(x_433, p_434) {
1067
+ if (x_433 == null) {
1068
+ p_434.nullValue();
935
1069
  } else {
936
- const x_700 = x_698;
937
- this.#adapterForT_695.encodeToJson(x_700, p_699);
1070
+ const x_435 = x_433;
1071
+ this.#adapterForT_431.encodeToJson(x_435, p_434);
938
1072
  }
939
1073
  return;
940
1074
  }
941
1075
  /**
942
- * @param {JsonSyntaxTree} t_702
943
- * @param {InterchangeContext} ic_703
944
- * @returns {T_696 | null}
1076
+ * @param {JsonSyntaxTree} t_437
1077
+ * @param {InterchangeContext} ic_438
1078
+ * @returns {T_430 | null}
945
1079
  */
946
- decodeFromJson(t_702, ic_703) {
947
- let return_704;
948
- if (t_702 instanceof JsonNull) {
949
- return_704 = null;
1080
+ decodeFromJson(t_437, ic_438) {
1081
+ let return_439;
1082
+ if (t_437 instanceof JsonNull) {
1083
+ return_439 = null;
950
1084
  } else {
951
- return_704 = this.#adapterForT_695.decodeFromJson(t_702, ic_703);
1085
+ return_439 = this.#adapterForT_431.decodeFromJson(t_437, ic_438);
952
1086
  }
953
- return return_704;
1087
+ return return_439;
954
1088
  }
955
- /** @param {JsonAdapter<T_696>} adapterForT_705 */
956
- constructor(adapterForT_705) {
1089
+ /** @param {JsonAdapter<T_430>} adapterForT_440 */
1090
+ constructor(adapterForT_440) {
957
1091
  super ();
958
- this.#adapterForT_695 = adapterForT_705;
1092
+ this.#adapterForT_431 = adapterForT_440;
959
1093
  return;
960
1094
  }
961
1095
  };
962
1096
  /** @type {Array<string>} */
963
- const hexDigits_706 = Object.freeze(["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"]);
1097
+ const hexDigits_441 = Object.freeze(["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"]);
964
1098
  /**
965
- * @param {number} cp_708
966
- * @param {globalThis.Array<string>} buffer_709
1099
+ * @param {number} cp_443
1100
+ * @param {globalThis.Array<string>} buffer_444
967
1101
  */
968
- function encodeHex4_707(cp_708, buffer_709) {
969
- const b0_710 = trunc__711(cp_708 / 4096) & 15;
970
- const b1_712 = trunc__711(cp_708 / 256) & 15;
971
- const b2_713 = trunc__711(cp_708 / 16) & 15;
972
- const b3_714 = cp_708 & 15;
973
- let t_715;
974
- t_715 = listedGet_413(hexDigits_706, b0_710);
975
- buffer_709[0] += t_715;
976
- let t_716;
977
- t_716 = listedGet_413(hexDigits_706, b1_712);
978
- buffer_709[0] += t_716;
979
- let t_717;
980
- t_717 = listedGet_413(hexDigits_706, b2_713);
981
- buffer_709[0] += t_717;
982
- let t_718;
983
- t_718 = listedGet_413(hexDigits_706, b3_714);
984
- buffer_709[0] += t_718;
1102
+ function encodeHex4_442(cp_443, buffer_444) {
1103
+ const b0_445 = (cp_443 / 4096 | 0) & 15;
1104
+ const b1_446 = (cp_443 / 256 | 0) & 15;
1105
+ const b2_447 = (cp_443 / 16 | 0) & 15;
1106
+ const b3_448 = cp_443 & 15;
1107
+ let t_449 = listedGet_113(hexDigits_441, b0_445);
1108
+ buffer_444[0] += t_449;
1109
+ let t_450 = listedGet_113(hexDigits_441, b1_446);
1110
+ buffer_444[0] += t_450;
1111
+ let t_451 = listedGet_113(hexDigits_441, b2_447);
1112
+ buffer_444[0] += t_451;
1113
+ let t_452 = listedGet_113(hexDigits_441, b3_448);
1114
+ buffer_444[0] += t_452;
985
1115
  return;
986
1116
  }
987
1117
  /**
988
- * @param {string} x_719
989
- * @param {globalThis.Array<string>} buffer_720
1118
+ * @param {string} x_453
1119
+ * @param {globalThis.Array<string>} buffer_454
990
1120
  */
991
- function encodeJsonString_512(x_719, buffer_720) {
992
- let t_721;
993
- let t_722;
994
- let t_723;
995
- let t_724;
996
- let t_725;
997
- buffer_720[0] += "\u0022";
998
- let i_726 = 0;
999
- let emitted_727 = i_726;
1121
+ function encodeJsonString_231(x_453, buffer_454) {
1122
+ let t_455;
1123
+ let t_456;
1124
+ let t_457;
1125
+ let t_458;
1126
+ buffer_454[0] += "\u0022";
1127
+ let i_459 = 0;
1128
+ let emitted_460 = i_459;
1000
1129
  while (true) {
1001
- if (!(x_719.length > i_726)) {
1130
+ if (!(x_453.length > i_459)) {
1002
1131
  break;
1003
1132
  }
1004
- t_721 = stringGet_628(x_719, i_726);
1005
- const cp_728 = t_721;
1006
- if (cp_728 === 8) {
1007
- t_725 = "\\b";
1008
- } else if (cp_728 === 9) {
1009
- t_725 = "\\t";
1010
- } else if (cp_728 === 10) {
1011
- t_725 = "\\n";
1012
- } else if (cp_728 === 12) {
1013
- t_725 = "\\f";
1014
- } else if (cp_728 === 13) {
1015
- t_725 = "\\r";
1016
- } else if (cp_728 === 34) {
1017
- t_725 = "\\\u0022";
1018
- } else if (cp_728 === 92) {
1019
- t_725 = "\\\\";
1133
+ const cp_461 = stringGet_356(x_453, i_459);
1134
+ if (cp_461 === 8) {
1135
+ t_458 = "\\b";
1136
+ } else if (cp_461 === 9) {
1137
+ t_458 = "\\t";
1138
+ } else if (cp_461 === 10) {
1139
+ t_458 = "\\n";
1140
+ } else if (cp_461 === 12) {
1141
+ t_458 = "\\f";
1142
+ } else if (cp_461 === 13) {
1143
+ t_458 = "\\r";
1144
+ } else if (cp_461 === 34) {
1145
+ t_458 = "\\\u0022";
1146
+ } else if (cp_461 === 92) {
1147
+ t_458 = "\\\\";
1020
1148
  } else {
1021
- if (cp_728 < 32) {
1022
- t_723 = true;
1149
+ if (cp_461 < 32) {
1150
+ t_456 = true;
1023
1151
  } else {
1024
- if (55296 <= cp_728) {
1025
- t_722 = cp_728 <= 57343;
1152
+ if (55296 <= cp_461) {
1153
+ t_455 = cp_461 <= 57343;
1026
1154
  } else {
1027
- t_722 = false;
1155
+ t_455 = false;
1028
1156
  }
1029
- t_723 = t_722;
1157
+ t_456 = t_455;
1030
1158
  }
1031
- if (t_723) {
1032
- t_724 = "\\u";
1159
+ if (t_456) {
1160
+ t_457 = "\\u";
1033
1161
  } else {
1034
- t_724 = "";
1162
+ t_457 = "";
1035
1163
  }
1036
- t_725 = t_724;
1037
- }
1038
- const replacement_729 = t_725;
1039
- const nextI_730 = stringNext_731(x_719, i_726);
1040
- if (replacement_729 !== "") {
1041
- buffer_720[0] += x_719.substring(emitted_727, i_726);
1042
- buffer_720[0] += replacement_729;
1043
- if (replacement_729 === "\\u") {
1044
- encodeHex4_707(cp_728, buffer_720);
1164
+ t_458 = t_457;
1165
+ }
1166
+ const replacement_462 = t_458;
1167
+ const nextI_463 = stringNext_464(x_453, i_459);
1168
+ if (replacement_462 !== "") {
1169
+ buffer_454[0] += x_453.substring(emitted_460, i_459);
1170
+ buffer_454[0] += replacement_462;
1171
+ if (replacement_462 === "\\u") {
1172
+ encodeHex4_442(cp_461, buffer_454);
1045
1173
  }
1046
- emitted_727 = nextI_730;
1174
+ emitted_460 = nextI_463;
1047
1175
  }
1048
- i_726 = nextI_730;
1176
+ i_459 = nextI_463;
1049
1177
  }
1050
- buffer_720[0] += x_719.substring(emitted_727, i_726);
1051
- buffer_720[0] += "\u0022";
1178
+ buffer_454[0] += x_453.substring(emitted_460, i_459);
1179
+ buffer_454[0] += "\u0022";
1052
1180
  return;
1053
1181
  }
1054
1182
  /**
1055
- * @param {JsonProducer} out_733
1056
- * @param {string} explanation_734
1183
+ * @param {JsonProducer} out_466
1184
+ * @param {string} explanation_467
1057
1185
  */
1058
- function storeJsonError_732(out_733, explanation_734) {
1059
- if (out_733 instanceof JsonParseErrorReceiver) {
1060
- let errorReceiver_735;
1061
- errorReceiver_735 = requireInstanceOf__570(out_733, JsonParseErrorReceiver);
1062
- errorReceiver_735.explainJsonError(explanation_734);
1186
+ function storeJsonError_465(out_466, explanation_467) {
1187
+ let t_468 = out_466.parseErrorReceiver;
1188
+ if (!(t_468 == null)) {
1189
+ t_468.explainJsonError(explanation_467);
1063
1190
  }
1064
1191
  return;
1065
1192
  }
1066
1193
  /**
1067
- * @param {string} sourceText_736
1068
- * @param {globalThis.number} i_737
1069
- * @param {JsonProducer} out_738
1070
- * @param {string} shortExplanation_739
1194
+ * @param {string} sourceText_469
1195
+ * @param {globalThis.number} i_470
1196
+ * @param {JsonProducer} out_471
1197
+ * @param {string} shortExplanation_472
1071
1198
  */
1072
- function expectedTokenError_627(sourceText_736, i_737, out_738, shortExplanation_739) {
1073
- let t_740;
1074
- let t_741;
1075
- let gotten_742;
1076
- if (sourceText_736.length > i_737) {
1077
- t_740 = sourceText_736.length;
1078
- t_741 = sourceText_736.substring(i_737, t_740);
1079
- gotten_742 = "`" + t_741 + "`";
1199
+ function expectedTokenError_355(sourceText_469, i_470, out_471, shortExplanation_472) {
1200
+ let t_473;
1201
+ let t_474;
1202
+ let gotten_475;
1203
+ if (sourceText_469.length > i_470) {
1204
+ t_473 = sourceText_469.length;
1205
+ t_474 = sourceText_469.substring(i_470, t_473);
1206
+ gotten_475 = "`" + t_474 + "`";
1080
1207
  } else {
1081
- gotten_742 = "end-of-file";
1208
+ gotten_475 = "end-of-file";
1082
1209
  }
1083
- storeJsonError_732(out_738, "Expected " + shortExplanation_739 + ", but got " + gotten_742);
1210
+ storeJsonError_465(out_471, "Expected " + shortExplanation_472 + ", but got " + gotten_475);
1084
1211
  return;
1085
1212
  }
1086
1213
  /**
1087
- * @param {string} sourceText_743
1088
- * @param {globalThis.number} i_744
1214
+ * @param {string} sourceText_476
1215
+ * @param {globalThis.number} i_477
1089
1216
  * @returns {globalThis.number}
1090
1217
  */
1091
- function skipJsonSpaces_626(sourceText_743, i_744) {
1092
- let t_745;
1093
- let t_746;
1094
- let t_747;
1095
- let t_748;
1096
- let t_749;
1218
+ function skipJsonSpaces_354(sourceText_476, i_477) {
1219
+ let t_478;
1220
+ let t_479;
1221
+ let t_480;
1222
+ let t_481;
1223
+ let t_482;
1097
1224
  while (true) {
1098
- if (!(sourceText_743.length > i_744)) {
1225
+ if (!(sourceText_476.length > i_477)) {
1099
1226
  break;
1100
1227
  }
1101
- t_746 = stringGet_628(sourceText_743, i_744);
1102
- if (t_746 === 9) {
1103
- t_749 = true;
1228
+ t_478 = stringGet_356(sourceText_476, i_477);
1229
+ if (t_478 === 9) {
1230
+ t_482 = true;
1104
1231
  } else {
1105
- if (t_746 === 10) {
1106
- t_748 = true;
1232
+ if (t_478 === 10) {
1233
+ t_481 = true;
1107
1234
  } else {
1108
- if (t_746 === 13) {
1109
- t_747 = true;
1235
+ if (t_478 === 13) {
1236
+ t_480 = true;
1110
1237
  } else {
1111
- t_747 = t_746 === 32;
1238
+ t_480 = t_478 === 32;
1112
1239
  }
1113
- t_748 = t_747;
1240
+ t_481 = t_480;
1114
1241
  }
1115
- t_749 = t_748;
1242
+ t_482 = t_481;
1116
1243
  }
1117
- if (! t_749) {
1244
+ if (! t_482) {
1118
1245
  break;
1119
1246
  }
1120
- t_745 = stringNext_731(sourceText_743, i_744);
1121
- i_744 = t_745;
1247
+ t_479 = stringNext_464(sourceText_476, i_477);
1248
+ i_477 = t_479;
1122
1249
  }
1123
- return i_744;
1250
+ return i_477;
1124
1251
  }
1125
1252
  /**
1126
- * @param {string} sourceText_751
1127
- * @param {globalThis.number} start_752
1128
- * @param {globalThis.number} limit_753
1253
+ * @param {string} sourceText_484
1254
+ * @param {globalThis.number} start_485
1255
+ * @param {globalThis.number} limit_486
1129
1256
  * @returns {number}
1130
1257
  */
1131
- function decodeHexUnsigned_750(sourceText_751, start_752, limit_753) {
1132
- let return_754;
1133
- let t_755;
1134
- let t_756;
1135
- let t_757;
1136
- let t_758;
1137
- let t_759;
1138
- let t_760;
1139
- fn_761: {
1140
- let n_762 = 0;
1141
- let i_763 = start_752;
1258
+ function decodeHexUnsigned_483(sourceText_484, start_485, limit_486) {
1259
+ let return_487;
1260
+ let t_488;
1261
+ let t_489;
1262
+ let t_490;
1263
+ let t_491;
1264
+ let t_492;
1265
+ fn_493: {
1266
+ let n_494 = 0;
1267
+ let i_495 = start_485;
1142
1268
  while (true) {
1143
- if (!(i_763 - limit_753 < 0)) {
1269
+ if (!(i_495 - limit_486 < 0)) {
1144
1270
  break;
1145
1271
  }
1146
- t_756 = stringGet_628(sourceText_751, i_763);
1147
- const cp_764 = t_756;
1148
- if (48 <= cp_764) {
1149
- t_757 = cp_764 <= 48;
1272
+ const cp_496 = stringGet_356(sourceText_484, i_495);
1273
+ if (48 <= cp_496) {
1274
+ t_489 = cp_496 <= 48;
1150
1275
  } else {
1151
- t_757 = false;
1276
+ t_489 = false;
1152
1277
  }
1153
- if (t_757) {
1154
- t_760 = cp_764 - 48;
1278
+ if (t_489) {
1279
+ t_492 = cp_496 - 48 | 0;
1155
1280
  } else {
1156
- if (65 <= cp_764) {
1157
- t_758 = cp_764 <= 70;
1281
+ if (65 <= cp_496) {
1282
+ t_490 = cp_496 <= 70;
1158
1283
  } else {
1159
- t_758 = false;
1284
+ t_490 = false;
1160
1285
  }
1161
- if (t_758) {
1162
- t_760 = cp_764 - 65 + 10;
1286
+ if (t_490) {
1287
+ t_492 = (cp_496 - 65 | 0) + 10 | 0;
1163
1288
  } else {
1164
- if (97 <= cp_764) {
1165
- t_759 = cp_764 <= 102;
1289
+ if (97 <= cp_496) {
1290
+ t_491 = cp_496 <= 102;
1166
1291
  } else {
1167
- t_759 = false;
1292
+ t_491 = false;
1168
1293
  }
1169
- if (t_759) {
1170
- t_760 = cp_764 - 97 + 10;
1294
+ if (t_491) {
1295
+ t_492 = (cp_496 - 97 | 0) + 10 | 0;
1171
1296
  } else {
1172
- return_754 = -1;
1173
- break fn_761;
1297
+ return_487 = -1;
1298
+ break fn_493;
1174
1299
  }
1175
1300
  }
1176
1301
  }
1177
- const digit_765 = t_760;
1178
- n_762 = n_762 * 16 + digit_765;
1179
- t_755 = stringNext_731(sourceText_751, i_763);
1180
- i_763 = t_755;
1302
+ const digit_497 = t_492;
1303
+ n_494 = imul__498(n_494, 16) + digit_497 | 0;
1304
+ t_488 = stringNext_464(sourceText_484, i_495);
1305
+ i_495 = t_488;
1181
1306
  }
1182
- return_754 = n_762;
1307
+ return_487 = n_494;
1183
1308
  }
1184
- return return_754;
1309
+ return return_487;
1185
1310
  }
1186
1311
  /**
1187
- * @param {string} sourceText_766
1188
- * @param {globalThis.number} i_767
1189
- * @param {JsonProducer} out_768
1312
+ * @param {string} sourceText_500
1313
+ * @param {globalThis.number} i_501
1314
+ * @param {globalThis.Array<string>} sb_502
1315
+ * @param {JsonProducer} errOut_503
1190
1316
  * @returns {globalThis.number}
1191
1317
  */
1192
- function parseJsonString_631(sourceText_766, i_767, out_768) {
1193
- let return_769;
1194
- let t_770;
1195
- let t_771;
1196
- let t_772;
1197
- let t_773;
1198
- let t_774;
1199
- let t_775;
1200
- let t_776;
1201
- let t_777;
1202
- let t_778;
1203
- let t_779;
1204
- let t_780;
1205
- let t_781;
1206
- let t_782;
1207
- let t_783;
1208
- let t_784;
1209
- let t_785;
1210
- let t_786;
1211
- let t_787;
1212
- let t_788;
1213
- let t_789;
1214
- let t_790;
1215
- let t_791;
1216
- let t_792;
1217
- let t_793;
1218
- let t_794;
1219
- let t_795;
1220
- fn_796: {
1221
- if (!(sourceText_766.length > i_767)) {
1222
- t_781 = true;
1318
+ function parseJsonStringTo_499(sourceText_500, i_501, sb_502, errOut_503) {
1319
+ let return_504;
1320
+ let t_505;
1321
+ let t_506;
1322
+ let t_507;
1323
+ let t_508;
1324
+ let t_509;
1325
+ let t_510;
1326
+ let t_511;
1327
+ let t_512;
1328
+ let t_513;
1329
+ let t_514;
1330
+ let t_515;
1331
+ let t_516;
1332
+ let t_517;
1333
+ let t_518;
1334
+ let t_519;
1335
+ let t_520;
1336
+ let t_521;
1337
+ let t_522;
1338
+ let t_523;
1339
+ let t_524;
1340
+ let t_525;
1341
+ let t_526;
1342
+ fn_527: {
1343
+ if (!(sourceText_500.length > i_501)) {
1344
+ t_516 = true;
1223
1345
  } else {
1224
- t_780 = stringGet_628(sourceText_766, i_767);
1225
- t_781 = t_780 !== 34;
1226
- }
1227
- if (t_781) {
1228
- expectedTokenError_627(sourceText_766, i_767, out_768, "\u0022");
1229
- return_769 = -1;
1230
- break fn_796;
1231
- }
1232
- t_770 = stringNext_731(sourceText_766, i_767);
1233
- i_767 = t_770;
1234
- const sb_797 = [""];
1235
- let leadSurrogate_798 = -1;
1236
- let consumed_799 = i_767;
1346
+ t_505 = stringGet_356(sourceText_500, i_501);
1347
+ t_516 = t_505 !== 34;
1348
+ }
1349
+ if (t_516) {
1350
+ expectedTokenError_355(sourceText_500, i_501, errOut_503, "\u0022");
1351
+ return_504 = -1;
1352
+ break fn_527;
1353
+ }
1354
+ t_506 = stringNext_464(sourceText_500, i_501);
1355
+ i_501 = t_506;
1356
+ let leadSurrogate_528 = -1;
1357
+ let consumed_529 = i_501;
1237
1358
  while (true) {
1238
- if (!(sourceText_766.length > i_767)) {
1359
+ if (!(sourceText_500.length > i_501)) {
1239
1360
  break;
1240
1361
  }
1241
- t_782 = stringGet_628(sourceText_766, i_767);
1242
- const cp_800 = t_782;
1243
- if (cp_800 === 34) {
1362
+ const cp_530 = stringGet_356(sourceText_500, i_501);
1363
+ if (cp_530 === 34) {
1244
1364
  break;
1245
1365
  }
1246
- t_771 = stringNext_731(sourceText_766, i_767);
1247
- let iNext_801 = t_771;
1248
- const end_802 = sourceText_766.length;
1249
- let needToFlush_803 = false;
1250
- if (cp_800 !== 92) {
1251
- t_789 = cp_800;
1366
+ t_507 = stringNext_464(sourceText_500, i_501);
1367
+ let iNext_531 = t_507;
1368
+ const end_532 = sourceText_500.length;
1369
+ let needToFlush_533 = false;
1370
+ if (cp_530 !== 92) {
1371
+ t_522 = cp_530;
1252
1372
  } else {
1253
- needToFlush_803 = true;
1254
- if (!(sourceText_766.length > iNext_801)) {
1255
- expectedTokenError_627(sourceText_766, iNext_801, out_768, "escape sequence");
1256
- return_769 = -1;
1257
- break fn_796;
1373
+ needToFlush_533 = true;
1374
+ if (!(sourceText_500.length > iNext_531)) {
1375
+ expectedTokenError_355(sourceText_500, iNext_531, errOut_503, "escape sequence");
1376
+ return_504 = -1;
1377
+ break fn_527;
1258
1378
  }
1259
- t_783 = stringGet_628(sourceText_766, iNext_801);
1260
- const esc0_804 = t_783;
1261
- t_772 = stringNext_731(sourceText_766, iNext_801);
1262
- iNext_801 = t_772;
1263
- if (esc0_804 === 34) {
1264
- t_785 = true;
1379
+ const esc0_534 = stringGet_356(sourceText_500, iNext_531);
1380
+ t_508 = stringNext_464(sourceText_500, iNext_531);
1381
+ iNext_531 = t_508;
1382
+ if (esc0_534 === 34) {
1383
+ t_518 = true;
1265
1384
  } else {
1266
- if (esc0_804 === 92) {
1267
- t_784 = true;
1385
+ if (esc0_534 === 92) {
1386
+ t_517 = true;
1268
1387
  } else {
1269
- t_784 = esc0_804 === 47;
1388
+ t_517 = esc0_534 === 47;
1270
1389
  }
1271
- t_785 = t_784;
1390
+ t_518 = t_517;
1272
1391
  }
1273
- if (t_785) {
1274
- t_788 = esc0_804;
1275
- } else if (esc0_804 === 98) {
1276
- t_788 = 8;
1277
- } else if (esc0_804 === 102) {
1278
- t_788 = 12;
1279
- } else if (esc0_804 === 110) {
1280
- t_788 = 10;
1281
- } else if (esc0_804 === 114) {
1282
- t_788 = 13;
1283
- } else if (esc0_804 === 116) {
1284
- t_788 = 9;
1285
- } else if (esc0_804 === 117) {
1286
- if (stringHasAtLeast_805(sourceText_766, iNext_801, end_802, 4)) {
1287
- const startHex_806 = iNext_801;
1288
- t_773 = stringNext_731(sourceText_766, iNext_801);
1289
- iNext_801 = t_773;
1290
- t_774 = stringNext_731(sourceText_766, iNext_801);
1291
- iNext_801 = t_774;
1292
- t_775 = stringNext_731(sourceText_766, iNext_801);
1293
- iNext_801 = t_775;
1294
- t_776 = stringNext_731(sourceText_766, iNext_801);
1295
- iNext_801 = t_776;
1296
- t_777 = decodeHexUnsigned_750(sourceText_766, startHex_806, iNext_801);
1297
- t_786 = t_777;
1392
+ if (t_518) {
1393
+ t_521 = esc0_534;
1394
+ } else if (esc0_534 === 98) {
1395
+ t_521 = 8;
1396
+ } else if (esc0_534 === 102) {
1397
+ t_521 = 12;
1398
+ } else if (esc0_534 === 110) {
1399
+ t_521 = 10;
1400
+ } else if (esc0_534 === 114) {
1401
+ t_521 = 13;
1402
+ } else if (esc0_534 === 116) {
1403
+ t_521 = 9;
1404
+ } else if (esc0_534 === 117) {
1405
+ if (stringHasAtLeast_535(sourceText_500, iNext_531, end_532, 4)) {
1406
+ const startHex_536 = iNext_531;
1407
+ t_509 = stringNext_464(sourceText_500, iNext_531);
1408
+ iNext_531 = t_509;
1409
+ t_510 = stringNext_464(sourceText_500, iNext_531);
1410
+ iNext_531 = t_510;
1411
+ t_511 = stringNext_464(sourceText_500, iNext_531);
1412
+ iNext_531 = t_511;
1413
+ t_512 = stringNext_464(sourceText_500, iNext_531);
1414
+ iNext_531 = t_512;
1415
+ t_513 = decodeHexUnsigned_483(sourceText_500, startHex_536, iNext_531);
1416
+ t_519 = t_513;
1298
1417
  } else {
1299
- t_786 = -1;
1418
+ t_519 = -1;
1300
1419
  }
1301
- const hex_807 = t_786;
1302
- if (hex_807 < 0) {
1303
- expectedTokenError_627(sourceText_766, iNext_801, out_768, "four hex digits");
1304
- return_769 = -1;
1305
- break fn_796;
1420
+ const hex_537 = t_519;
1421
+ if (hex_537 < 0) {
1422
+ expectedTokenError_355(sourceText_500, iNext_531, errOut_503, "four hex digits");
1423
+ return_504 = -1;
1424
+ break fn_527;
1306
1425
  }
1307
- t_787 = hex_807;
1308
- t_788 = t_787;
1426
+ t_520 = hex_537;
1427
+ t_521 = t_520;
1309
1428
  } else {
1310
- expectedTokenError_627(sourceText_766, iNext_801, out_768, "escape sequence");
1311
- return_769 = -1;
1312
- break fn_796;
1429
+ expectedTokenError_355(sourceText_500, iNext_531, errOut_503, "escape sequence");
1430
+ return_504 = -1;
1431
+ break fn_527;
1313
1432
  }
1314
- t_789 = t_788;
1433
+ t_522 = t_521;
1315
1434
  }
1316
- let decodedCp_808 = t_789;
1317
- if (leadSurrogate_798 >= 0) {
1318
- needToFlush_803 = true;
1319
- const lead_809 = leadSurrogate_798;
1320
- if (56320 <= decodedCp_808) {
1321
- t_790 = decodedCp_808 <= 57343;
1435
+ let decodedCp_538 = t_522;
1436
+ if (leadSurrogate_528 >= 0) {
1437
+ needToFlush_533 = true;
1438
+ const lead_539 = leadSurrogate_528;
1439
+ if (56320 <= decodedCp_538) {
1440
+ t_523 = decodedCp_538 <= 57343;
1322
1441
  } else {
1323
- t_790 = false;
1442
+ t_523 = false;
1324
1443
  }
1325
- if (t_790) {
1326
- leadSurrogate_798 = -1;
1327
- t_791 = (lead_809 - 55296) * 1024 | decodedCp_808 - 56320;
1328
- decodedCp_808 = 65536 + t_791;
1444
+ if (t_523) {
1445
+ leadSurrogate_528 = -1;
1446
+ decodedCp_538 = 65536 +(imul__498(lead_539 - 55296 | 0, 1024) |(decodedCp_538 - 56320 | 0)) | 0;
1329
1447
  }
1330
1448
  } else {
1331
- if (55296 <= decodedCp_808) {
1332
- t_792 = decodedCp_808 <= 56319;
1449
+ if (55296 <= decodedCp_538) {
1450
+ t_524 = decodedCp_538 <= 56319;
1333
1451
  } else {
1334
- t_792 = false;
1452
+ t_524 = false;
1335
1453
  }
1336
- if (t_792) {
1337
- needToFlush_803 = true;
1454
+ if (t_524) {
1455
+ needToFlush_533 = true;
1338
1456
  }
1339
1457
  }
1340
- if (needToFlush_803) {
1341
- sb_797[0] += sourceText_766.substring(consumed_799, i_767);
1342
- if (leadSurrogate_798 >= 0) {
1343
- stringBuilderAppendCodePoint_810(sb_797, leadSurrogate_798);
1458
+ if (needToFlush_533) {
1459
+ sb_502[0] += sourceText_500.substring(consumed_529, i_501);
1460
+ if (leadSurrogate_528 >= 0) {
1461
+ try {
1462
+ stringBuilderAppendCodePoint_540(sb_502, leadSurrogate_528);
1463
+ } catch {
1464
+ throw Error();
1465
+ }
1344
1466
  }
1345
- if (55296 <= decodedCp_808) {
1346
- t_793 = decodedCp_808 <= 56319;
1467
+ if (55296 <= decodedCp_538) {
1468
+ t_525 = decodedCp_538 <= 56319;
1347
1469
  } else {
1348
- t_793 = false;
1470
+ t_525 = false;
1349
1471
  }
1350
- if (t_793) {
1351
- leadSurrogate_798 = decodedCp_808;
1472
+ if (t_525) {
1473
+ leadSurrogate_528 = decodedCp_538;
1352
1474
  } else {
1353
- leadSurrogate_798 = -1;
1354
- stringBuilderAppendCodePoint_810(sb_797, decodedCp_808);
1475
+ leadSurrogate_528 = -1;
1476
+ try {
1477
+ stringBuilderAppendCodePoint_540(sb_502, decodedCp_538);
1478
+ } catch {
1479
+ throw Error();
1480
+ }
1355
1481
  }
1356
- consumed_799 = iNext_801;
1482
+ consumed_529 = iNext_531;
1357
1483
  }
1358
- i_767 = iNext_801;
1484
+ i_501 = iNext_531;
1359
1485
  }
1360
- if (!(sourceText_766.length > i_767)) {
1361
- t_795 = true;
1486
+ if (!(sourceText_500.length > i_501)) {
1487
+ t_526 = true;
1362
1488
  } else {
1363
- t_794 = stringGet_628(sourceText_766, i_767);
1364
- t_795 = t_794 !== 34;
1489
+ t_514 = stringGet_356(sourceText_500, i_501);
1490
+ t_526 = t_514 !== 34;
1365
1491
  }
1366
- if (t_795) {
1367
- expectedTokenError_627(sourceText_766, i_767, out_768, "\u0022");
1368
- return_769 = -1;
1492
+ if (t_526) {
1493
+ expectedTokenError_355(sourceText_500, i_501, errOut_503, "\u0022");
1494
+ return_504 = -1;
1369
1495
  } else {
1370
- if (leadSurrogate_798 >= 0) {
1371
- stringBuilderAppendCodePoint_810(sb_797, leadSurrogate_798);
1496
+ if (leadSurrogate_528 >= 0) {
1497
+ try {
1498
+ stringBuilderAppendCodePoint_540(sb_502, leadSurrogate_528);
1499
+ } catch {
1500
+ throw Error();
1501
+ }
1372
1502
  } else {
1373
- sb_797[0] += sourceText_766.substring(consumed_799, i_767);
1503
+ sb_502[0] += sourceText_500.substring(consumed_529, i_501);
1374
1504
  }
1375
- t_778 = stringNext_731(sourceText_766, i_767);
1376
- i_767 = t_778;
1377
- t_779 = sb_797[0];
1378
- out_768.stringValue(t_779);
1379
- return_769 = i_767;
1505
+ t_515 = stringNext_464(sourceText_500, i_501);
1506
+ i_501 = t_515;
1507
+ return_504 = i_501;
1380
1508
  }
1381
1509
  }
1382
- return return_769;
1510
+ return return_504;
1383
1511
  }
1384
1512
  /**
1385
- * @param {string} sourceText_811
1386
- * @param {globalThis.number} i_812
1387
- * @param {JsonProducer} out_813
1513
+ * @param {string} sourceText_541
1514
+ * @param {globalThis.number} i_542
1515
+ * @param {JsonProducer} out_543
1388
1516
  * @returns {globalThis.number}
1389
1517
  */
1390
- function parseJsonObject_629(sourceText_811, i_812, out_813) {
1391
- let return_814;
1392
- let t_815;
1393
- let t_816;
1394
- let t_817;
1395
- let t_818;
1396
- let t_819;
1397
- let t_820;
1398
- let t_821;
1399
- let t_822;
1400
- let t_823;
1401
- let t_824;
1402
- let t_825;
1403
- let t_826;
1404
- let t_827;
1405
- let t_828;
1406
- let t_829;
1407
- let t_830;
1408
- let t_831;
1409
- let t_832;
1410
- let t_833;
1411
- fn_834: {
1412
- if (!(sourceText_811.length > i_812)) {
1413
- t_823 = true;
1414
- } else {
1415
- t_822 = stringGet_628(sourceText_811, i_812);
1416
- t_823 = t_822 !== 123;
1417
- }
1418
- if (t_823) {
1419
- expectedTokenError_627(sourceText_811, i_812, out_813, "'{'");
1420
- return_814 = -1;
1421
- break fn_834;
1422
- }
1423
- out_813.startObject();
1424
- t_815 = stringNext_731(sourceText_811, i_812);
1425
- t_816 = skipJsonSpaces_626(sourceText_811, t_815);
1426
- i_812 = t_816;
1427
- if (sourceText_811.length > i_812) {
1428
- t_824 = stringGet_628(sourceText_811, i_812);
1429
- t_825 = t_824 !== 125;
1430
- } else {
1431
- t_825 = false;
1432
- }
1433
- if (t_825) {
1434
- while (true) {
1435
- const afterKey_835 = parseJsonString_631(sourceText_811, i_812, out_813);
1436
- if (!(afterKey_835 >= 0)) {
1437
- return_814 = -1;
1438
- break fn_834;
1439
- }
1440
- t_826 = requireStringIndex__836(afterKey_835);
1441
- t_817 = skipJsonSpaces_626(sourceText_811, t_826);
1442
- i_812 = t_817;
1443
- if (sourceText_811.length > i_812) {
1444
- t_827 = stringGet_628(sourceText_811, i_812);
1445
- t_828 = t_827 === 58;
1446
- } else {
1447
- t_828 = false;
1448
- }
1449
- if (t_828) {
1450
- t_818 = stringNext_731(sourceText_811, i_812);
1451
- i_812 = t_818;
1452
- const afterPropertyValue_837 = parseJsonValue_617(sourceText_811, i_812, out_813);
1453
- if (!(afterPropertyValue_837 >= 0)) {
1454
- return_814 = -1;
1455
- break fn_834;
1518
+ function parseJsonObject_357(sourceText_541, i_542, out_543) {
1519
+ let return_544;
1520
+ let t_545;
1521
+ let t_546;
1522
+ let t_547;
1523
+ let t_548;
1524
+ let t_549;
1525
+ let t_550;
1526
+ let t_551;
1527
+ let t_552;
1528
+ let t_553;
1529
+ let t_554;
1530
+ let t_555;
1531
+ let t_556;
1532
+ let t_557;
1533
+ let t_558;
1534
+ let t_559;
1535
+ let t_560;
1536
+ let t_561;
1537
+ let t_562;
1538
+ let t_563;
1539
+ let t_564;
1540
+ let t_565;
1541
+ fn_566: {
1542
+ try {
1543
+ if (!(sourceText_541.length > i_542)) {
1544
+ t_558 = true;
1545
+ } else {
1546
+ t_545 = stringGet_356(sourceText_541, i_542);
1547
+ t_558 = t_545 !== 123;
1548
+ }
1549
+ if (t_558) {
1550
+ expectedTokenError_355(sourceText_541, i_542, out_543, "'{'");
1551
+ return_544 = -1;
1552
+ break fn_566;
1553
+ }
1554
+ out_543.startObject();
1555
+ t_546 = stringNext_464(sourceText_541, i_542);
1556
+ t_547 = skipJsonSpaces_354(sourceText_541, t_546);
1557
+ i_542 = t_547;
1558
+ if (sourceText_541.length > i_542) {
1559
+ t_548 = stringGet_356(sourceText_541, i_542);
1560
+ t_559 = t_548 !== 125;
1561
+ } else {
1562
+ t_559 = false;
1563
+ }
1564
+ if (t_559) {
1565
+ while (true) {
1566
+ const keyBuffer_567 = [""];
1567
+ const afterKey_568 = parseJsonStringTo_499(sourceText_541, i_542, keyBuffer_567, out_543);
1568
+ if (!(afterKey_568 >= 0)) {
1569
+ return_544 = -1;
1570
+ break fn_566;
1571
+ }
1572
+ t_549 = keyBuffer_567[0];
1573
+ out_543.objectKey(t_549);
1574
+ try {
1575
+ t_560 = requireStringIndex_569(afterKey_568);
1576
+ t_561 = t_560;
1577
+ } catch {
1578
+ t_561 = panic_294();
1579
+ }
1580
+ t_550 = skipJsonSpaces_354(sourceText_541, t_561);
1581
+ i_542 = t_550;
1582
+ if (sourceText_541.length > i_542) {
1583
+ t_551 = stringGet_356(sourceText_541, i_542);
1584
+ t_562 = t_551 === 58;
1585
+ } else {
1586
+ t_562 = false;
1587
+ }
1588
+ if (t_562) {
1589
+ t_552 = stringNext_464(sourceText_541, i_542);
1590
+ i_542 = t_552;
1591
+ const afterPropertyValue_570 = parseJsonValue_345(sourceText_541, i_542, out_543);
1592
+ if (!(afterPropertyValue_570 >= 0)) {
1593
+ return_544 = -1;
1594
+ break fn_566;
1595
+ }
1596
+ t_563 = requireStringIndex_569(afterPropertyValue_570);
1597
+ i_542 = t_563;
1598
+ } else {
1599
+ expectedTokenError_355(sourceText_541, i_542, out_543, "':'");
1600
+ return_544 = -1;
1601
+ break fn_566;
1602
+ }
1603
+ t_553 = skipJsonSpaces_354(sourceText_541, i_542);
1604
+ i_542 = t_553;
1605
+ if (sourceText_541.length > i_542) {
1606
+ t_554 = stringGet_356(sourceText_541, i_542);
1607
+ t_564 = t_554 === 44;
1608
+ } else {
1609
+ t_564 = false;
1610
+ }
1611
+ if (t_564) {
1612
+ t_555 = stringNext_464(sourceText_541, i_542);
1613
+ t_556 = skipJsonSpaces_354(sourceText_541, t_555);
1614
+ i_542 = t_556;
1615
+ } else {
1616
+ break;
1456
1617
  }
1457
- t_829 = requireStringIndex__836(afterPropertyValue_837);
1458
- i_812 = t_829;
1459
- } else {
1460
- expectedTokenError_627(sourceText_811, i_812, out_813, "':'");
1461
- return_814 = -1;
1462
- break fn_834;
1463
- }
1464
- t_819 = skipJsonSpaces_626(sourceText_811, i_812);
1465
- i_812 = t_819;
1466
- if (sourceText_811.length > i_812) {
1467
- t_830 = stringGet_628(sourceText_811, i_812);
1468
- t_831 = t_830 === 44;
1469
- } else {
1470
- t_831 = false;
1471
- }
1472
- if (t_831) {
1473
- t_820 = stringNext_731(sourceText_811, i_812);
1474
- t_821 = skipJsonSpaces_626(sourceText_811, t_820);
1475
- i_812 = t_821;
1476
- } else {
1477
- break;
1478
1618
  }
1479
1619
  }
1480
- }
1481
- if (sourceText_811.length > i_812) {
1482
- t_832 = stringGet_628(sourceText_811, i_812);
1483
- t_833 = t_832 === 125;
1484
- } else {
1485
- t_833 = false;
1486
- }
1487
- if (t_833) {
1488
- out_813.endObject();
1489
- return_814 = stringNext_731(sourceText_811, i_812);
1490
- } else {
1491
- expectedTokenError_627(sourceText_811, i_812, out_813, "'}'");
1492
- return_814 = -1;
1620
+ if (sourceText_541.length > i_542) {
1621
+ t_557 = stringGet_356(sourceText_541, i_542);
1622
+ t_565 = t_557 === 125;
1623
+ } else {
1624
+ t_565 = false;
1625
+ }
1626
+ if (t_565) {
1627
+ out_543.endObject();
1628
+ return_544 = stringNext_464(sourceText_541, i_542);
1629
+ } else {
1630
+ expectedTokenError_355(sourceText_541, i_542, out_543, "'}'");
1631
+ return_544 = -1;
1632
+ }
1633
+ } catch {
1634
+ return_544 = panic_294();
1493
1635
  }
1494
1636
  }
1495
- return return_814;
1637
+ return return_544;
1496
1638
  }
1497
1639
  /**
1498
- * @param {string} sourceText_838
1499
- * @param {globalThis.number} i_839
1500
- * @param {JsonProducer} out_840
1640
+ * @param {string} sourceText_571
1641
+ * @param {globalThis.number} i_572
1642
+ * @param {JsonProducer} out_573
1501
1643
  * @returns {globalThis.number}
1502
1644
  */
1503
- function parseJsonArray_630(sourceText_838, i_839, out_840) {
1504
- let return_841;
1505
- let t_842;
1506
- let t_843;
1507
- let t_844;
1508
- let t_845;
1509
- let t_846;
1510
- let t_847;
1511
- let t_848;
1512
- let t_849;
1513
- let t_850;
1514
- let t_851;
1515
- let t_852;
1516
- let t_853;
1517
- let t_854;
1518
- let t_855;
1519
- fn_856: {
1520
- if (!(sourceText_838.length > i_839)) {
1521
- t_848 = true;
1522
- } else {
1523
- t_847 = stringGet_628(sourceText_838, i_839);
1524
- t_848 = t_847 !== 91;
1525
- }
1526
- if (t_848) {
1527
- expectedTokenError_627(sourceText_838, i_839, out_840, "'['");
1528
- return_841 = -1;
1529
- break fn_856;
1530
- }
1531
- out_840.startArray();
1532
- t_842 = stringNext_731(sourceText_838, i_839);
1533
- t_843 = skipJsonSpaces_626(sourceText_838, t_842);
1534
- i_839 = t_843;
1535
- if (sourceText_838.length > i_839) {
1536
- t_849 = stringGet_628(sourceText_838, i_839);
1537
- t_850 = t_849 !== 93;
1538
- } else {
1539
- t_850 = false;
1540
- }
1541
- if (t_850) {
1542
- while (true) {
1543
- const afterElementValue_857 = parseJsonValue_617(sourceText_838, i_839, out_840);
1544
- if (!(afterElementValue_857 >= 0)) {
1545
- return_841 = -1;
1546
- break fn_856;
1547
- }
1548
- t_851 = requireStringIndex__836(afterElementValue_857);
1549
- i_839 = t_851;
1550
- t_844 = skipJsonSpaces_626(sourceText_838, i_839);
1551
- i_839 = t_844;
1552
- if (sourceText_838.length > i_839) {
1553
- t_852 = stringGet_628(sourceText_838, i_839);
1554
- t_853 = t_852 === 44;
1555
- } else {
1556
- t_853 = false;
1557
- }
1558
- if (t_853) {
1559
- t_845 = stringNext_731(sourceText_838, i_839);
1560
- t_846 = skipJsonSpaces_626(sourceText_838, t_845);
1561
- i_839 = t_846;
1562
- } else {
1563
- break;
1645
+ function parseJsonArray_358(sourceText_571, i_572, out_573) {
1646
+ let return_574;
1647
+ let t_575;
1648
+ let t_576;
1649
+ let t_577;
1650
+ let t_578;
1651
+ let t_579;
1652
+ let t_580;
1653
+ let t_581;
1654
+ let t_582;
1655
+ let t_583;
1656
+ let t_584;
1657
+ let t_585;
1658
+ let t_586;
1659
+ let t_587;
1660
+ let t_588;
1661
+ fn_589: {
1662
+ try {
1663
+ if (!(sourceText_571.length > i_572)) {
1664
+ t_584 = true;
1665
+ } else {
1666
+ t_575 = stringGet_356(sourceText_571, i_572);
1667
+ t_584 = t_575 !== 91;
1668
+ }
1669
+ if (t_584) {
1670
+ expectedTokenError_355(sourceText_571, i_572, out_573, "'['");
1671
+ return_574 = -1;
1672
+ break fn_589;
1673
+ }
1674
+ out_573.startArray();
1675
+ t_576 = stringNext_464(sourceText_571, i_572);
1676
+ t_577 = skipJsonSpaces_354(sourceText_571, t_576);
1677
+ i_572 = t_577;
1678
+ if (sourceText_571.length > i_572) {
1679
+ t_578 = stringGet_356(sourceText_571, i_572);
1680
+ t_585 = t_578 !== 93;
1681
+ } else {
1682
+ t_585 = false;
1683
+ }
1684
+ if (t_585) {
1685
+ while (true) {
1686
+ const afterElementValue_590 = parseJsonValue_345(sourceText_571, i_572, out_573);
1687
+ if (!(afterElementValue_590 >= 0)) {
1688
+ return_574 = -1;
1689
+ break fn_589;
1690
+ }
1691
+ t_586 = requireStringIndex_569(afterElementValue_590);
1692
+ i_572 = t_586;
1693
+ t_579 = skipJsonSpaces_354(sourceText_571, i_572);
1694
+ i_572 = t_579;
1695
+ if (sourceText_571.length > i_572) {
1696
+ t_580 = stringGet_356(sourceText_571, i_572);
1697
+ t_587 = t_580 === 44;
1698
+ } else {
1699
+ t_587 = false;
1700
+ }
1701
+ if (t_587) {
1702
+ t_581 = stringNext_464(sourceText_571, i_572);
1703
+ t_582 = skipJsonSpaces_354(sourceText_571, t_581);
1704
+ i_572 = t_582;
1705
+ } else {
1706
+ break;
1707
+ }
1564
1708
  }
1565
1709
  }
1566
- }
1567
- if (sourceText_838.length > i_839) {
1568
- t_854 = stringGet_628(sourceText_838, i_839);
1569
- t_855 = t_854 === 93;
1570
- } else {
1571
- t_855 = false;
1572
- }
1573
- if (t_855) {
1574
- out_840.endArray();
1575
- return_841 = stringNext_731(sourceText_838, i_839);
1576
- } else {
1577
- expectedTokenError_627(sourceText_838, i_839, out_840, "']'");
1578
- return_841 = -1;
1710
+ if (sourceText_571.length > i_572) {
1711
+ t_583 = stringGet_356(sourceText_571, i_572);
1712
+ t_588 = t_583 === 93;
1713
+ } else {
1714
+ t_588 = false;
1715
+ }
1716
+ if (t_588) {
1717
+ out_573.endArray();
1718
+ return_574 = stringNext_464(sourceText_571, i_572);
1719
+ } else {
1720
+ expectedTokenError_355(sourceText_571, i_572, out_573, "']'");
1721
+ return_574 = -1;
1722
+ }
1723
+ } catch {
1724
+ return_574 = panic_294();
1579
1725
  }
1580
1726
  }
1581
- return return_841;
1727
+ return return_574;
1582
1728
  }
1583
1729
  /**
1584
- * @param {string} string_859
1585
- * @param {globalThis.number} inString_860
1586
- * @param {string} substring_861
1730
+ * @param {string} sourceText_591
1731
+ * @param {globalThis.number} i_592
1732
+ * @param {JsonProducer} out_593
1587
1733
  * @returns {globalThis.number}
1588
1734
  */
1589
- function afterSubstring_858(string_859, inString_860, substring_861) {
1590
- let return_862;
1591
- let t_863;
1592
- let t_864;
1593
- let t_865;
1594
- let t_866;
1595
- fn_867: {
1596
- let i_868 = inString_860;
1597
- let j_869 = 0;
1735
+ function parseJsonString_359(sourceText_591, i_592, out_593) {
1736
+ let t_594;
1737
+ const sb_595 = [""];
1738
+ const after_596 = parseJsonStringTo_499(sourceText_591, i_592, sb_595, out_593);
1739
+ if (after_596 >= 0) {
1740
+ t_594 = sb_595[0];
1741
+ out_593.stringValue(t_594);
1742
+ }
1743
+ return after_596;
1744
+ }
1745
+ /**
1746
+ * @param {string} string_598
1747
+ * @param {globalThis.number} inString_599
1748
+ * @param {string} substring_600
1749
+ * @returns {globalThis.number}
1750
+ */
1751
+ function afterSubstring_597(string_598, inString_599, substring_600) {
1752
+ let return_601;
1753
+ let t_602;
1754
+ let t_603;
1755
+ fn_604: {
1756
+ let i_605 = inString_599;
1757
+ let j_606 = 0;
1598
1758
  while (true) {
1599
- if (!(substring_861.length > j_869)) {
1759
+ if (!(substring_600.length > j_606)) {
1600
1760
  break;
1601
1761
  }
1602
- if (!(string_859.length > i_868)) {
1603
- return_862 = -1;
1604
- break fn_867;
1762
+ if (!(string_598.length > i_605)) {
1763
+ return_601 = -1;
1764
+ break fn_604;
1605
1765
  }
1606
- t_865 = stringGet_628(string_859, i_868);
1607
- t_866 = stringGet_628(substring_861, j_869);
1608
- if (t_865 !== t_866) {
1609
- return_862 = -1;
1610
- break fn_867;
1766
+ if (stringGet_356(string_598, i_605) !== stringGet_356(substring_600, j_606)) {
1767
+ return_601 = -1;
1768
+ break fn_604;
1611
1769
  }
1612
- t_863 = stringNext_731(string_859, i_868);
1613
- i_868 = t_863;
1614
- t_864 = stringNext_731(substring_861, j_869);
1615
- j_869 = t_864;
1770
+ t_602 = stringNext_464(string_598, i_605);
1771
+ i_605 = t_602;
1772
+ t_603 = stringNext_464(substring_600, j_606);
1773
+ j_606 = t_603;
1616
1774
  }
1617
- return_862 = i_868;
1775
+ return_601 = i_605;
1618
1776
  }
1619
- return return_862;
1777
+ return return_601;
1620
1778
  }
1621
1779
  /**
1622
- * @param {string} sourceText_870
1623
- * @param {globalThis.number} i_871
1624
- * @param {JsonProducer} out_872
1780
+ * @param {string} sourceText_607
1781
+ * @param {globalThis.number} i_608
1782
+ * @param {JsonProducer} out_609
1625
1783
  * @returns {globalThis.number}
1626
1784
  */
1627
- function parseJsonBoolean_632(sourceText_870, i_871, out_872) {
1628
- let return_873;
1629
- let t_874;
1630
- let t_875;
1631
- let t_876;
1632
- let t_877;
1633
- fn_878: {
1634
- let ch0_879;
1635
- if (sourceText_870.length > i_871) {
1636
- t_875 = stringGet_628(sourceText_870, i_871);
1637
- ch0_879 = t_875;
1785
+ function parseJsonBoolean_360(sourceText_607, i_608, out_609) {
1786
+ let return_610;
1787
+ let t_611;
1788
+ fn_612: {
1789
+ let ch0_613;
1790
+ if (sourceText_607.length > i_608) {
1791
+ t_611 = stringGet_356(sourceText_607, i_608);
1792
+ ch0_613 = t_611;
1638
1793
  } else {
1639
- ch0_879 = 0;
1640
- }
1641
- const end_880 = sourceText_870.length;
1642
- let keyword_881;
1643
- let n_882;
1644
- if (ch0_879 === 102) {
1645
- keyword_881 = "false";
1646
- n_882 = 5;
1647
- } else if (ch0_879 === 116) {
1648
- keyword_881 = "true";
1649
- n_882 = 4;
1794
+ ch0_613 = 0;
1795
+ }
1796
+ const end_614 = sourceText_607.length;
1797
+ let keyword_615;
1798
+ let n_616;
1799
+ if (ch0_613 === 102) {
1800
+ keyword_615 = "false";
1801
+ n_616 = 5;
1802
+ } else if (ch0_613 === 116) {
1803
+ keyword_615 = "true";
1804
+ n_616 = 4;
1650
1805
  } else {
1651
- keyword_881 = null;
1652
- n_882 = 0;
1653
- }
1654
- if (!(keyword_881 == null)) {
1655
- t_874 = stringHasAtLeast_805(sourceText_870, i_871, end_880, n_882);
1656
- t_876 = t_874;
1657
- } else {
1658
- t_876 = false;
1659
- }
1660
- if (t_876) {
1661
- if (keyword_881 == null) {
1662
- throw Error();
1663
- } else {
1664
- t_877 = keyword_881;
1665
- }
1666
- const after_883 = afterSubstring_858(sourceText_870, i_871, t_877);
1667
- if (after_883 >= 0) {
1668
- out_872.booleanValue(n_882 === 4);
1669
- return_873 = after_883;
1670
- break fn_878;
1806
+ keyword_615 = null;
1807
+ n_616 = 0;
1808
+ }
1809
+ if (!(keyword_615 == null)) {
1810
+ const keyword_617 = keyword_615;
1811
+ if (stringHasAtLeast_535(sourceText_607, i_608, end_614, n_616)) {
1812
+ const after_618 = afterSubstring_597(sourceText_607, i_608, keyword_617);
1813
+ if (after_618 >= 0) {
1814
+ return_610 = requireStringIndex_569(after_618);
1815
+ out_609.booleanValue(n_616 === 4);
1816
+ break fn_612;
1817
+ }
1671
1818
  }
1672
1819
  }
1673
- expectedTokenError_627(sourceText_870, i_871, out_872, "`false` or `true`");
1674
- return_873 = -1;
1820
+ expectedTokenError_355(sourceText_607, i_608, out_609, "`false` or `true`");
1821
+ return_610 = -1;
1675
1822
  }
1676
- return return_873;
1823
+ return return_610;
1677
1824
  }
1678
1825
  /**
1679
- * @param {string} sourceText_884
1680
- * @param {globalThis.number} i_885
1681
- * @param {JsonProducer} out_886
1826
+ * @param {string} sourceText_619
1827
+ * @param {globalThis.number} i_620
1828
+ * @param {JsonProducer} out_621
1682
1829
  * @returns {globalThis.number}
1683
1830
  */
1684
- function parseJsonNull_633(sourceText_884, i_885, out_886) {
1685
- let return_887;
1686
- fn_888: {
1687
- const after_889 = afterSubstring_858(sourceText_884, i_885, "null");
1688
- if (after_889 >= 0) {
1689
- out_886.nullValue();
1690
- return_887 = requireStringIndex__836(after_889);
1691
- break fn_888;
1692
- }
1693
- expectedTokenError_627(sourceText_884, i_885, out_886, "`null`");
1694
- return_887 = -1;
1695
- }
1696
- return return_887;
1831
+ function parseJsonNull_361(sourceText_619, i_620, out_621) {
1832
+ let return_622;
1833
+ fn_623: {
1834
+ const after_624 = afterSubstring_597(sourceText_619, i_620, "null");
1835
+ if (after_624 >= 0) {
1836
+ return_622 = requireStringIndex_569(after_624);
1837
+ out_621.nullValue();
1838
+ break fn_623;
1839
+ }
1840
+ expectedTokenError_355(sourceText_619, i_620, out_621, "`null`");
1841
+ return_622 = -1;
1842
+ }
1843
+ return return_622;
1697
1844
  }
1698
1845
  /**
1699
- * @param {string} sourceText_890
1700
- * @param {globalThis.number} i_891
1701
- * @param {JsonProducer} out_892
1846
+ * @param {string} sourceText_625
1847
+ * @param {globalThis.number} i_626
1848
+ * @param {JsonProducer} out_627
1702
1849
  * @returns {globalThis.number}
1703
1850
  */
1704
- function parseJsonNumber_634(sourceText_890, i_891, out_892) {
1705
- let return_893;
1706
- let t_894;
1707
- let t_895;
1708
- let t_896;
1709
- let t_897;
1710
- let t_898;
1711
- let t_899;
1712
- let t_900;
1713
- let t_901;
1714
- let t_902;
1715
- let t_903;
1716
- let t_904;
1717
- let t_905;
1718
- let t_906;
1719
- let t_907;
1720
- let t_908;
1721
- let t_909;
1722
- let t_910;
1723
- let t_911;
1724
- let t_912;
1725
- let t_913;
1726
- let t_914;
1727
- let t_915;
1728
- let t_916;
1729
- let t_917;
1730
- let t_918;
1731
- let t_919;
1732
- let t_920;
1733
- let t_921;
1734
- let t_922;
1735
- let t_923;
1736
- let t_924;
1737
- let t_925;
1738
- let t_926;
1739
- let t_927;
1740
- let t_928;
1741
- let t_929;
1742
- let t_930;
1743
- let t_931;
1744
- fn_932: {
1745
- let isNegative_933 = false;
1746
- const startOfNumber_934 = i_891;
1747
- if (sourceText_890.length > i_891) {
1748
- t_902 = stringGet_628(sourceText_890, i_891);
1749
- t_903 = t_902 === 45;
1851
+ function parseJsonNumber_362(sourceText_625, i_626, out_627) {
1852
+ let return_628;
1853
+ let t_629;
1854
+ let t_630;
1855
+ let t_631;
1856
+ let t_632;
1857
+ let t_633;
1858
+ let t_634;
1859
+ let t_635;
1860
+ let t_636;
1861
+ let t_637;
1862
+ let t_638;
1863
+ let t_639;
1864
+ let t_640;
1865
+ let t_641;
1866
+ let t_642;
1867
+ let t_643;
1868
+ let t_644;
1869
+ let t_645;
1870
+ let t_646;
1871
+ let t_647;
1872
+ let t_648;
1873
+ let t_649;
1874
+ let t_650;
1875
+ let t_651;
1876
+ let t_652;
1877
+ let t_653;
1878
+ let t_654;
1879
+ let t_655;
1880
+ let t_656;
1881
+ let t_657;
1882
+ let t_658;
1883
+ let t_659;
1884
+ let t_660;
1885
+ let t_661;
1886
+ let t_662;
1887
+ let t_663;
1888
+ let t_664;
1889
+ let t_665;
1890
+ let t_666;
1891
+ let t_667;
1892
+ fn_668: {
1893
+ let isNegative_669 = false;
1894
+ const startOfNumber_670 = i_626;
1895
+ if (sourceText_625.length > i_626) {
1896
+ t_629 = stringGet_356(sourceText_625, i_626);
1897
+ t_647 = t_629 === 45;
1750
1898
  } else {
1751
- t_903 = false;
1899
+ t_647 = false;
1752
1900
  }
1753
- if (t_903) {
1754
- isNegative_933 = true;
1755
- t_894 = stringNext_731(sourceText_890, i_891);
1756
- i_891 = t_894;
1901
+ if (t_647) {
1902
+ isNegative_669 = true;
1903
+ t_630 = stringNext_464(sourceText_625, i_626);
1904
+ i_626 = t_630;
1757
1905
  }
1758
- let digit0_935;
1759
- if (sourceText_890.length > i_891) {
1760
- t_904 = stringGet_628(sourceText_890, i_891);
1761
- digit0_935 = t_904;
1906
+ let digit0_671;
1907
+ if (sourceText_625.length > i_626) {
1908
+ t_631 = stringGet_356(sourceText_625, i_626);
1909
+ digit0_671 = t_631;
1762
1910
  } else {
1763
- digit0_935 = -1;
1911
+ digit0_671 = -1;
1764
1912
  }
1765
- if (digit0_935 < 48) {
1766
- t_905 = true;
1913
+ if (digit0_671 < 48) {
1914
+ t_648 = true;
1767
1915
  } else {
1768
- t_905 = 57 < digit0_935;
1916
+ t_648 = 57 < digit0_671;
1769
1917
  }
1770
- if (t_905) {
1771
- let error_936;
1772
- if (! isNegative_933) {
1773
- t_906 = digit0_935 !== 46;
1918
+ if (t_648) {
1919
+ let error_672;
1920
+ if (! isNegative_669) {
1921
+ t_649 = digit0_671 !== 46;
1774
1922
  } else {
1775
- t_906 = false;
1923
+ t_649 = false;
1776
1924
  }
1777
- if (t_906) {
1778
- error_936 = "JSON value";
1925
+ if (t_649) {
1926
+ error_672 = "JSON value";
1779
1927
  } else {
1780
- error_936 = "digit";
1928
+ error_672 = "digit";
1781
1929
  }
1782
- expectedTokenError_627(sourceText_890, i_891, out_892, error_936);
1783
- return_893 = -1;
1784
- break fn_932;
1785
- }
1786
- t_895 = stringNext_731(sourceText_890, i_891);
1787
- i_891 = t_895;
1788
- let nDigits_937 = 1;
1789
- t_907 = digit0_935 - 48;
1790
- let tentativeValue_938 = t_907;
1791
- if (48 !== digit0_935) {
1930
+ expectedTokenError_355(sourceText_625, i_626, out_627, error_672);
1931
+ return_628 = -1;
1932
+ break fn_668;
1933
+ }
1934
+ t_632 = stringNext_464(sourceText_625, i_626);
1935
+ i_626 = t_632;
1936
+ let nDigits_673 = 1;
1937
+ t_633 = digit0_671 - 48 | 0;
1938
+ let tentativeFloat64_674 = t_633;
1939
+ t_634 = BigInt(digit0_671 - 48 | 0);
1940
+ let tentativeInt64_675 = t_634;
1941
+ let overflowInt64_676 = false;
1942
+ if (48 !== digit0_671) {
1792
1943
  while (true) {
1793
- if (!(sourceText_890.length > i_891)) {
1944
+ if (!(sourceText_625.length > i_626)) {
1794
1945
  break;
1795
1946
  }
1796
- t_908 = stringGet_628(sourceText_890, i_891);
1797
- const possibleDigit_939 = t_908;
1798
- if (48 <= possibleDigit_939) {
1799
- t_909 = possibleDigit_939 <= 57;
1947
+ const possibleDigit_677 = stringGet_356(sourceText_625, i_626);
1948
+ if (48 <= possibleDigit_677) {
1949
+ t_650 = possibleDigit_677 <= 57;
1800
1950
  } else {
1801
- t_909 = false;
1951
+ t_650 = false;
1802
1952
  }
1803
- if (t_909) {
1804
- t_896 = stringNext_731(sourceText_890, i_891);
1805
- i_891 = t_896;
1806
- nDigits_937 = nDigits_937 + 1;
1807
- t_911 = tentativeValue_938 * 10.0;
1808
- t_910 = possibleDigit_939 - 48;
1809
- tentativeValue_938 = t_911 + t_910;
1953
+ if (t_650) {
1954
+ t_635 = stringNext_464(sourceText_625, i_626);
1955
+ i_626 = t_635;
1956
+ nDigits_673 = nDigits_673 + 1 | 0;
1957
+ const nextDigit_678 = possibleDigit_677 - 48 | 0;
1958
+ t_651 = tentativeFloat64_674 * 10.0;
1959
+ t_636 = nextDigit_678;
1960
+ tentativeFloat64_674 = t_651 + t_636;
1961
+ const oldInt64_679 = tentativeInt64_675;
1962
+ t_652 = clampInt64__680(tentativeInt64_675 * BigInt("10"));
1963
+ t_637 = BigInt(nextDigit_678);
1964
+ tentativeInt64_675 = clampInt64__680(t_652 + t_637);
1965
+ if (tentativeInt64_675 < oldInt64_679) {
1966
+ if (clampInt64__680(BigInt("-9223372036854775808") - oldInt64_679) === clampInt64__680(- BigInt(nextDigit_678))) {
1967
+ if (isNegative_669) {
1968
+ t_653 = oldInt64_679 > BigInt("0");
1969
+ } else {
1970
+ t_653 = false;
1971
+ }
1972
+ t_654 = t_653;
1973
+ } else {
1974
+ t_654 = false;
1975
+ }
1976
+ if (! t_654) {
1977
+ overflowInt64_676 = true;
1978
+ }
1979
+ }
1810
1980
  } else {
1811
1981
  break;
1812
1982
  }
1813
1983
  }
1814
1984
  }
1815
- let nDigitsAfterPoint_940 = 0;
1816
- if (sourceText_890.length > i_891) {
1817
- t_912 = stringGet_628(sourceText_890, i_891);
1818
- t_913 = 46 === t_912;
1985
+ let nDigitsAfterPoint_681 = 0;
1986
+ if (sourceText_625.length > i_626) {
1987
+ t_638 = stringGet_356(sourceText_625, i_626);
1988
+ t_655 = 46 === t_638;
1819
1989
  } else {
1820
- t_913 = false;
1990
+ t_655 = false;
1821
1991
  }
1822
- if (t_913) {
1823
- t_897 = stringNext_731(sourceText_890, i_891);
1824
- i_891 = t_897;
1825
- const afterPoint_941 = i_891;
1992
+ if (t_655) {
1993
+ t_639 = stringNext_464(sourceText_625, i_626);
1994
+ i_626 = t_639;
1995
+ const afterPoint_682 = i_626;
1826
1996
  while (true) {
1827
- if (!(sourceText_890.length > i_891)) {
1997
+ if (!(sourceText_625.length > i_626)) {
1828
1998
  break;
1829
1999
  }
1830
- t_914 = stringGet_628(sourceText_890, i_891);
1831
- const possibleDigit_942 = t_914;
1832
- if (48 <= possibleDigit_942) {
1833
- t_915 = possibleDigit_942 <= 57;
2000
+ const possibleDigit_683 = stringGet_356(sourceText_625, i_626);
2001
+ if (48 <= possibleDigit_683) {
2002
+ t_656 = possibleDigit_683 <= 57;
1834
2003
  } else {
1835
- t_915 = false;
2004
+ t_656 = false;
1836
2005
  }
1837
- if (t_915) {
1838
- t_898 = stringNext_731(sourceText_890, i_891);
1839
- i_891 = t_898;
1840
- nDigits_937 = nDigits_937 + 1;
1841
- nDigitsAfterPoint_940 = nDigitsAfterPoint_940 + 1;
1842
- t_917 = tentativeValue_938 * 10.0;
1843
- t_916 = possibleDigit_942 - 48;
1844
- tentativeValue_938 = t_917 + t_916;
2006
+ if (t_656) {
2007
+ t_640 = stringNext_464(sourceText_625, i_626);
2008
+ i_626 = t_640;
2009
+ nDigits_673 = nDigits_673 + 1 | 0;
2010
+ nDigitsAfterPoint_681 = nDigitsAfterPoint_681 + 1 | 0;
2011
+ t_657 = tentativeFloat64_674 * 10.0;
2012
+ t_641 = possibleDigit_683 - 48 | 0;
2013
+ tentativeFloat64_674 = t_657 + t_641;
1845
2014
  } else {
1846
2015
  break;
1847
2016
  }
1848
2017
  }
1849
- if (Object.is(i_891, afterPoint_941)) {
1850
- expectedTokenError_627(sourceText_890, i_891, out_892, "digit");
1851
- return_893 = -1;
1852
- break fn_932;
2018
+ if (i_626 === afterPoint_682) {
2019
+ expectedTokenError_355(sourceText_625, i_626, out_627, "digit");
2020
+ return_628 = -1;
2021
+ break fn_668;
1853
2022
  }
1854
2023
  }
1855
- let nExponentDigits_943 = 0;
1856
- if (sourceText_890.length > i_891) {
1857
- t_918 = stringGet_628(sourceText_890, i_891);
1858
- t_919 = t_918 | 32;
1859
- t_920 = 101 === t_919;
2024
+ let nExponentDigits_684 = 0;
2025
+ if (sourceText_625.length > i_626) {
2026
+ t_642 = stringGet_356(sourceText_625, i_626);
2027
+ t_658 = 101 ===(t_642 | 32);
1860
2028
  } else {
1861
- t_920 = false;
1862
- }
1863
- if (t_920) {
1864
- t_899 = stringNext_731(sourceText_890, i_891);
1865
- i_891 = t_899;
1866
- if (!(sourceText_890.length > i_891)) {
1867
- expectedTokenError_627(sourceText_890, i_891, out_892, "sign or digit");
1868
- return_893 = -1;
1869
- break fn_932;
2029
+ t_658 = false;
2030
+ }
2031
+ if (t_658) {
2032
+ t_643 = stringNext_464(sourceText_625, i_626);
2033
+ i_626 = t_643;
2034
+ if (!(sourceText_625.length > i_626)) {
2035
+ expectedTokenError_355(sourceText_625, i_626, out_627, "sign or digit");
2036
+ return_628 = -1;
2037
+ break fn_668;
1870
2038
  }
1871
- let afterE_944;
1872
- afterE_944 = stringGet_628(sourceText_890, i_891);
1873
- if (afterE_944 === 43) {
1874
- t_921 = true;
2039
+ const afterE_685 = stringGet_356(sourceText_625, i_626);
2040
+ if (afterE_685 === 43) {
2041
+ t_659 = true;
1875
2042
  } else {
1876
- t_921 = afterE_944 === 45;
2043
+ t_659 = afterE_685 === 45;
1877
2044
  }
1878
- if (t_921) {
1879
- t_900 = stringNext_731(sourceText_890, i_891);
1880
- i_891 = t_900;
2045
+ if (t_659) {
2046
+ t_644 = stringNext_464(sourceText_625, i_626);
2047
+ i_626 = t_644;
1881
2048
  }
1882
2049
  while (true) {
1883
- if (!(sourceText_890.length > i_891)) {
2050
+ if (!(sourceText_625.length > i_626)) {
1884
2051
  break;
1885
2052
  }
1886
- t_922 = stringGet_628(sourceText_890, i_891);
1887
- const possibleDigit_945 = t_922;
1888
- if (48 <= possibleDigit_945) {
1889
- t_923 = possibleDigit_945 <= 57;
2053
+ const possibleDigit_686 = stringGet_356(sourceText_625, i_626);
2054
+ if (48 <= possibleDigit_686) {
2055
+ t_660 = possibleDigit_686 <= 57;
1890
2056
  } else {
1891
- t_923 = false;
2057
+ t_660 = false;
1892
2058
  }
1893
- if (t_923) {
1894
- t_901 = stringNext_731(sourceText_890, i_891);
1895
- i_891 = t_901;
1896
- nExponentDigits_943 = nExponentDigits_943 + 1;
2059
+ if (t_660) {
2060
+ t_645 = stringNext_464(sourceText_625, i_626);
2061
+ i_626 = t_645;
2062
+ nExponentDigits_684 = nExponentDigits_684 + 1 | 0;
1897
2063
  } else {
1898
2064
  break;
1899
2065
  }
1900
2066
  }
1901
- if (nExponentDigits_943 === 0) {
1902
- expectedTokenError_627(sourceText_890, i_891, out_892, "exponent digit");
1903
- return_893 = -1;
1904
- break fn_932;
2067
+ if (nExponentDigits_684 === 0) {
2068
+ expectedTokenError_355(sourceText_625, i_626, out_627, "exponent digit");
2069
+ return_628 = -1;
2070
+ break fn_668;
1905
2071
  }
1906
2072
  }
1907
- const afterExponent_946 = i_891;
1908
- if (nExponentDigits_943 === 0) {
1909
- t_924 = nDigitsAfterPoint_940 === 0;
2073
+ const afterExponent_687 = i_626;
2074
+ if (nExponentDigits_684 === 0) {
2075
+ if (nDigitsAfterPoint_681 === 0) {
2076
+ t_661 = ! overflowInt64_676;
2077
+ } else {
2078
+ t_661 = false;
2079
+ }
2080
+ t_662 = t_661;
1910
2081
  } else {
1911
- t_924 = false;
2082
+ t_662 = false;
1912
2083
  }
1913
- if (t_924) {
1914
- let value_947;
1915
- if (isNegative_933) {
1916
- value_947 = - tentativeValue_938;
2084
+ if (t_662) {
2085
+ let value_688;
2086
+ if (isNegative_669) {
2087
+ value_688 = clampInt64__680(- tentativeInt64_675);
1917
2088
  } else {
1918
- value_947 = tentativeValue_938;
2089
+ value_688 = tentativeInt64_675;
1919
2090
  }
1920
- if (nDigits_937 <= 10) {
1921
- if (cmpFloat__948(-2.147483648E9, value_947) <= 0) {
1922
- t_925 = cmpFloat__948(value_947, 2.147483647E9) <= 0;
1923
- } else {
1924
- t_925 = false;
1925
- }
1926
- t_926 = t_925;
2091
+ if (BigInt("-2147483648") <= value_688) {
2092
+ t_663 = value_688 <= BigInt("2147483647");
1927
2093
  } else {
1928
- t_926 = false;
2094
+ t_663 = false;
1929
2095
  }
1930
- if (t_926) {
1931
- t_927 = float64ToInt_465(value_947);
1932
- out_892.intValue(t_927);
1933
- return_893 = i_891;
1934
- break fn_932;
2096
+ if (t_663) {
2097
+ t_646 = int64ToInt32Unsafe_689(value_688);
2098
+ out_627.int32Value(t_646);
2099
+ } else {
2100
+ out_627.int64Value(value_688);
1935
2101
  }
2102
+ return_628 = i_626;
2103
+ break fn_668;
1936
2104
  }
1937
- const numericTokenString_949 = sourceText_890.substring(startOfNumber_934, i_891);
1938
- let doubleValue_950 = NaN;
1939
- if (nExponentDigits_943 !== 0) {
1940
- t_928 = true;
2105
+ const numericTokenString_690 = sourceText_625.substring(startOfNumber_670, i_626);
2106
+ let doubleValue_691 = NaN;
2107
+ if (nExponentDigits_684 !== 0) {
2108
+ t_664 = true;
1941
2109
  } else {
1942
- t_928 = nDigitsAfterPoint_940 !== 0;
2110
+ t_664 = nDigitsAfterPoint_681 !== 0;
1943
2111
  }
1944
- if (t_928) {
2112
+ if (t_664) {
1945
2113
  try {
1946
- t_929 = stringToFloat64_478(numericTokenString_949);
1947
- doubleValue_950 = t_929;
2114
+ t_665 = stringToFloat64_192(numericTokenString_690);
2115
+ doubleValue_691 = t_665;
1948
2116
  } catch {
1949
2117
  }
1950
2118
  }
1951
- if (cmpFloat__948(doubleValue_950, -Infinity) !== 0) {
1952
- if (cmpFloat__948(doubleValue_950, Infinity) !== 0) {
1953
- t_930 = cmpFloat__948(doubleValue_950, NaN) !== 0;
2119
+ if (cmpFloat__692(doubleValue_691, -Infinity) !== 0) {
2120
+ if (cmpFloat__692(doubleValue_691, Infinity) !== 0) {
2121
+ t_666 = cmpFloat__692(doubleValue_691, NaN) !== 0;
1954
2122
  } else {
1955
- t_930 = false;
2123
+ t_666 = false;
1956
2124
  }
1957
- t_931 = t_930;
2125
+ t_667 = t_666;
1958
2126
  } else {
1959
- t_931 = false;
2127
+ t_667 = false;
1960
2128
  }
1961
- if (t_931) {
1962
- out_892.float64Value(doubleValue_950);
2129
+ if (t_667) {
2130
+ out_627.float64Value(doubleValue_691);
1963
2131
  } else {
1964
- out_892.numericTokenValue(numericTokenString_949);
2132
+ out_627.numericTokenValue(numericTokenString_690);
1965
2133
  }
1966
- return_893 = i_891;
2134
+ return_628 = i_626;
1967
2135
  }
1968
- return return_893;
2136
+ return return_628;
1969
2137
  }
1970
2138
  /**
1971
- * @param {string} sourceText_951
1972
- * @param {JsonProducer} out_952
2139
+ * @param {string} sourceText_693
2140
+ * @param {JsonProducer} out_694
1973
2141
  */
1974
- export function parseJsonToProducer(sourceText_951, out_952) {
1975
- let t_953;
1976
- let t_954;
1977
- let t_955;
1978
- let t_956;
1979
- let t_957;
1980
- let t_958;
1981
- let i_959 = 0;
1982
- const afterValue_960 = parseJsonValue_617(sourceText_951, i_959, out_952);
1983
- if (afterValue_960 >= 0) {
1984
- t_957 = requireStringIndex__836(afterValue_960);
1985
- t_953 = skipJsonSpaces_626(sourceText_951, t_957);
1986
- i_959 = t_953;
1987
- if (sourceText_951.length > i_959) {
1988
- t_954 = out_952 instanceof JsonParseErrorReceiver;
1989
- t_958 = t_954;
2142
+ export function parseJsonToProducer(sourceText_693, out_694) {
2143
+ let t_695;
2144
+ let t_696;
2145
+ let t_697;
2146
+ let t_698;
2147
+ let t_699;
2148
+ let t_700;
2149
+ let i_701 = 0;
2150
+ const afterValue_702 = parseJsonValue_345(sourceText_693, i_701, out_694);
2151
+ if (afterValue_702 >= 0) {
2152
+ t_700 = requireStringIndex_569(afterValue_702);
2153
+ t_695 = skipJsonSpaces_354(sourceText_693, t_700);
2154
+ i_701 = t_695;
2155
+ if (sourceText_693.length > i_701) {
2156
+ t_696 = out_694.parseErrorReceiver;
2157
+ t_699 = !(t_696 == null);
1990
2158
  } else {
1991
- t_958 = false;
2159
+ t_699 = false;
1992
2160
  }
1993
- if (t_958) {
1994
- t_955 = sourceText_951.length;
1995
- t_956 = sourceText_951.substring(i_959, t_955);
1996
- storeJsonError_732(out_952, "Extraneous JSON `" + t_956 + "`");
2161
+ if (t_699) {
2162
+ t_697 = sourceText_693.length;
2163
+ t_698 = sourceText_693.substring(i_701, t_697);
2164
+ storeJsonError_465(out_694, "Extraneous JSON `" + t_698 + "`");
1997
2165
  }
1998
2166
  }
1999
2167
  return;
2000
2168
  };
2001
2169
  /**
2002
- * @param {string} sourceText_961
2170
+ * @param {string} sourceText_703
2003
2171
  * @returns {JsonSyntaxTree}
2004
2172
  */
2005
- export function parseJson(sourceText_961) {
2006
- const p_962 = new JsonSyntaxTreeProducer();
2007
- parseJsonToProducer(sourceText_961, p_962);
2008
- return p_962.toJsonSyntaxTree();
2173
+ export function parseJson(sourceText_703) {
2174
+ const p_704 = new JsonSyntaxTreeProducer();
2175
+ parseJsonToProducer(sourceText_703, p_704);
2176
+ return p_704.toJsonSyntaxTree();
2009
2177
  };
2010
2178
  /** @returns {JsonAdapter<boolean>} */
2011
2179
  export function booleanJsonAdapter() {
2012
- return new BooleanJsonAdapter_642();
2180
+ return new BooleanJsonAdapter_370();
2013
2181
  };
2014
2182
  /** @returns {JsonAdapter<number>} */
2015
2183
  export function float64JsonAdapter() {
2016
- return new Float64JsonAdapter_650();
2184
+ return new Float64JsonAdapter_378();
2017
2185
  };
2018
2186
  /** @returns {JsonAdapter<number>} */
2019
- export function intJsonAdapter() {
2020
- return new IntJsonAdapter_658();
2187
+ export function int32JsonAdapter() {
2188
+ return new Int32JsonAdapter_386();
2189
+ };
2190
+ /** @returns {JsonAdapter<bigint>} */
2191
+ export function int64JsonAdapter() {
2192
+ return new Int64JsonAdapter_394();
2021
2193
  };
2022
2194
  /** @returns {JsonAdapter<string>} */
2023
2195
  export function stringJsonAdapter() {
2024
- return new StringJsonAdapter_666();
2196
+ return new StringJsonAdapter_402();
2025
2197
  };
2026
2198
  /**
2027
- * @template {unknown} T_964
2028
- * @param {JsonAdapter<T_964>} adapterForT_963
2029
- * @returns {JsonAdapter<Array<T_964>>}
2199
+ * @template {unknown} T_706
2200
+ * @param {JsonAdapter<T_706>} adapterForT_705
2201
+ * @returns {JsonAdapter<Array<T_706>>}
2030
2202
  */
2031
- export function listJsonAdapter(adapterForT_963) {
2032
- return new ListJsonAdapter_674(adapterForT_963);
2203
+ export function listJsonAdapter(adapterForT_705) {
2204
+ return new ListJsonAdapter_410(adapterForT_705);
2033
2205
  };