@temperlang/std 0.5.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,46 +1,46 @@
1
1
  const {
2
- trunc: trunc__727
2
+ imul: imul__498
3
3
  } = globalThis.Math;
4
4
  import {
5
- type as type__392, requireInstanceOf as requireInstanceOf__585, requireStringIndex as requireStringIndex__852, cmpFloat as cmpFloat__966, mappedGetOr as mappedGetOr_422, listedGet as listedGet_424, mappedForEach as mappedForEach_436, float64ToString as float64ToString_473, float64ToInt as float64ToInt_475, stringToInt as stringToInt_487, stringToFloat64 as stringToFloat64_488, listBuilderAdd as listBuilderAdd_500, listedGetOr as listedGetOr_504, listBuilderSet as listBuilderSet_512, listBuilderRemoveLast as listBuilderRemoveLast_517, mapBuilderConstructor as mapBuilderConstructor_579, panic as panic_586, mappedGet as mappedGet_591, mapBuilderSet as mapBuilderSet_592, listBuilderToList as listBuilderToList_598, mappedToMap as mappedToMap_599, stringGet as stringGet_645, stringNext as stringNext_746, stringHasAtLeast as stringHasAtLeast_817, stringBuilderAppendCodePoint as stringBuilderAppendCodePoint_822
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__392() {
7
+ export class InterchangeContext extends type__79() {
8
8
  /**
9
- * @param {string} headerName_391
9
+ * @param {string} headerName_78
10
10
  * @returns {string | null}
11
11
  */
12
- getHeader(headerName_391) {
12
+ getHeader(headerName_78) {
13
13
  null;
14
14
  }
15
15
  };
16
- export class NullInterchangeContext extends type__392(InterchangeContext) {
16
+ export class NullInterchangeContext extends type__79(InterchangeContext) {
17
17
  /**
18
- * @param {string} headerName_394
18
+ * @param {string} headerName_81
19
19
  * @returns {string | null}
20
20
  */
21
- getHeader(headerName_394) {
21
+ getHeader(headerName_81) {
22
22
  return null;
23
23
  }
24
24
  /** @type {NullInterchangeContext} */
25
- static #instance_395 = new NullInterchangeContext();
25
+ static #instance_82 = new NullInterchangeContext();
26
26
  /** @returns {NullInterchangeContext} */
27
27
  static get instance() {
28
- return this.#instance_395;
28
+ return this.#instance_82;
29
29
  }
30
30
  constructor() {
31
31
  super ();
32
32
  return;
33
33
  }
34
34
  };
35
- export class JsonProducer extends type__392() {
35
+ export class JsonProducer extends type__79() {
36
36
  startObject() {
37
37
  null;
38
38
  }
39
39
  endObject() {
40
40
  null;
41
41
  }
42
- /** @param {string} key_400 */
43
- objectKey(key_400) {
42
+ /** @param {string} key_87 */
43
+ objectKey(key_87) {
44
44
  null;
45
45
  }
46
46
  startArray() {
@@ -52,24 +52,28 @@ export class JsonProducer extends type__392() {
52
52
  nullValue() {
53
53
  null;
54
54
  }
55
- /** @param {boolean} x_405 */
56
- booleanValue(x_405) {
55
+ /** @param {boolean} x_92 */
56
+ booleanValue(x_92) {
57
57
  null;
58
58
  }
59
- /** @param {number} x_407 */
60
- intValue(x_407) {
59
+ /** @param {number} x_94 */
60
+ int32Value(x_94) {
61
61
  null;
62
62
  }
63
- /** @param {number} x_409 */
64
- float64Value(x_409) {
63
+ /** @param {bigint} x_96 */
64
+ int64Value(x_96) {
65
65
  null;
66
66
  }
67
- /** @param {string} x_411 */
68
- numericTokenValue(x_411) {
67
+ /** @param {number} x_98 */
68
+ float64Value(x_98) {
69
69
  null;
70
70
  }
71
- /** @param {string} x_413 */
72
- stringValue(x_413) {
71
+ /** @param {string} x_100 */
72
+ numericTokenValue(x_100) {
73
+ null;
74
+ }
75
+ /** @param {string} x_102 */
76
+ stringValue(x_102) {
73
77
  null;
74
78
  }
75
79
  /** @returns {JsonParseErrorReceiver | null} */
@@ -77,119 +81,119 @@ export class JsonProducer extends type__392() {
77
81
  return null;
78
82
  }
79
83
  };
80
- export class JsonSyntaxTree extends type__392() {
81
- /** @param {JsonProducer} p_416 */
82
- produce(p_416) {
84
+ export class JsonSyntaxTree extends type__79() {
85
+ /** @param {JsonProducer} p_105 */
86
+ produce(p_105) {
83
87
  null;
84
88
  }
85
89
  };
86
- export class JsonObject extends type__392(JsonSyntaxTree) {
90
+ export class JsonObject extends type__79(JsonSyntaxTree) {
87
91
  /** @type {Map<string, Array<JsonSyntaxTree>>} */
88
- #properties_417;
92
+ #properties_106;
89
93
  /**
90
- * @param {string} propertyKey_419
94
+ * @param {string} propertyKey_108
91
95
  * @returns {JsonSyntaxTree | null}
92
96
  */
93
- propertyValueOrNull(propertyKey_419) {
94
- let return_420;
95
- const treeList_421 = mappedGetOr_422(this.#properties_417, propertyKey_419, Object.freeze([]));
96
- const lastIndex_423 = treeList_421.length - 1;
97
- if (lastIndex_423 >= 0) {
98
- return_420 = listedGet_424(treeList_421, lastIndex_423);
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);
99
103
  } else {
100
- return_420 = null;
104
+ return_109 = null;
101
105
  }
102
- return return_420;
106
+ return return_109;
103
107
  }
104
108
  /**
105
- * @param {string} propertyKey_426
109
+ * @param {string} propertyKey_115
106
110
  * @returns {JsonSyntaxTree}
107
111
  */
108
- propertyValueOrBubble(propertyKey_426) {
109
- let return_427;
110
- let t_428 = this.propertyValueOrNull(propertyKey_426);
111
- if (t_428 == null) {
112
+ propertyValueOrBubble(propertyKey_115) {
113
+ let return_116;
114
+ let t_117 = this.propertyValueOrNull(propertyKey_115);
115
+ if (t_117 == null) {
112
116
  throw Error();
113
117
  } else {
114
- return_427 = t_428;
118
+ return_116 = t_117;
115
119
  }
116
- return return_427;
117
- }
118
- /** @param {JsonProducer} p_430 */
119
- produce(p_430) {
120
- p_430.startObject();
121
- function fn_431(k_432, vs_433) {
122
- function fn_434(v_435) {
123
- p_430.objectKey(k_432);
124
- v_435.produce(p_430);
120
+ return return_116;
121
+ }
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);
125
129
  return;
126
130
  }
127
- vs_433.forEach(fn_434);
131
+ vs_122.forEach(fn_123);
128
132
  return;
129
133
  }
130
- mappedForEach_436(this.#properties_417, fn_431);
131
- p_430.endObject();
134
+ mappedForEach_125(this.#properties_106, fn_120);
135
+ p_119.endObject();
132
136
  return;
133
137
  }
134
- /** @param {Map<string, Array<JsonSyntaxTree>>} properties_437 */
135
- constructor(properties_437) {
138
+ /** @param {Map<string, Array<JsonSyntaxTree>>} properties_126 */
139
+ constructor(properties_126) {
136
140
  super ();
137
- this.#properties_417 = properties_437;
141
+ this.#properties_106 = properties_126;
138
142
  return;
139
143
  }
140
144
  /** @returns {Map<string, Array<JsonSyntaxTree>>} */
141
145
  get properties() {
142
- return this.#properties_417;
146
+ return this.#properties_106;
143
147
  }
144
148
  };
145
- export class JsonArray extends type__392(JsonSyntaxTree) {
149
+ export class JsonArray extends type__79(JsonSyntaxTree) {
146
150
  /** @type {Array<JsonSyntaxTree>} */
147
- #elements_439;
148
- /** @param {JsonProducer} p_441 */
149
- produce(p_441) {
150
- p_441.startArray();
151
- function fn_442(v_443) {
152
- v_443.produce(p_441);
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);
153
157
  return;
154
158
  }
155
- this.#elements_439.forEach(fn_442);
156
- p_441.endArray();
159
+ this.#elements_128.forEach(fn_131);
160
+ p_130.endArray();
157
161
  return;
158
162
  }
159
- /** @param {Array<JsonSyntaxTree>} elements_444 */
160
- constructor(elements_444) {
163
+ /** @param {Array<JsonSyntaxTree>} elements_133 */
164
+ constructor(elements_133) {
161
165
  super ();
162
- this.#elements_439 = elements_444;
166
+ this.#elements_128 = elements_133;
163
167
  return;
164
168
  }
165
169
  /** @returns {Array<JsonSyntaxTree>} */
166
170
  get elements() {
167
- return this.#elements_439;
171
+ return this.#elements_128;
168
172
  }
169
173
  };
170
- export class JsonBoolean extends type__392(JsonSyntaxTree) {
174
+ export class JsonBoolean extends type__79(JsonSyntaxTree) {
171
175
  /** @type {boolean} */
172
- #content_446;
173
- /** @param {JsonProducer} p_448 */
174
- produce(p_448) {
175
- p_448.booleanValue(this.#content_446);
176
+ #content_135;
177
+ /** @param {JsonProducer} p_137 */
178
+ produce(p_137) {
179
+ p_137.booleanValue(this.#content_135);
176
180
  return;
177
181
  }
178
- /** @param {boolean} content_449 */
179
- constructor(content_449) {
182
+ /** @param {boolean} content_138 */
183
+ constructor(content_138) {
180
184
  super ();
181
- this.#content_446 = content_449;
185
+ this.#content_135 = content_138;
182
186
  return;
183
187
  }
184
188
  /** @returns {boolean} */
185
189
  get content() {
186
- return this.#content_446;
190
+ return this.#content_135;
187
191
  }
188
192
  };
189
- export class JsonNull extends type__392(JsonSyntaxTree) {
190
- /** @param {JsonProducer} p_452 */
191
- produce(p_452) {
192
- p_452.nullValue();
193
+ export class JsonNull extends type__79(JsonSyntaxTree) {
194
+ /** @param {JsonProducer} p_141 */
195
+ produce(p_141) {
196
+ p_141.nullValue();
193
197
  return;
194
198
  }
195
199
  constructor() {
@@ -197,32 +201,36 @@ export class JsonNull extends type__392(JsonSyntaxTree) {
197
201
  return;
198
202
  }
199
203
  };
200
- export class JsonString extends type__392(JsonSyntaxTree) {
204
+ export class JsonString extends type__79(JsonSyntaxTree) {
201
205
  /** @type {string} */
202
- #content_453;
203
- /** @param {JsonProducer} p_455 */
204
- produce(p_455) {
205
- p_455.stringValue(this.#content_453);
206
+ #content_142;
207
+ /** @param {JsonProducer} p_144 */
208
+ produce(p_144) {
209
+ p_144.stringValue(this.#content_142);
206
210
  return;
207
211
  }
208
- /** @param {string} content_456 */
209
- constructor(content_456) {
212
+ /** @param {string} content_145 */
213
+ constructor(content_145) {
210
214
  super ();
211
- this.#content_453 = content_456;
215
+ this.#content_142 = content_145;
212
216
  return;
213
217
  }
214
218
  /** @returns {string} */
215
219
  get content() {
216
- return this.#content_453;
220
+ return this.#content_142;
217
221
  }
218
222
  };
219
- export class JsonNumeric extends type__392(JsonSyntaxTree) {
223
+ export class JsonNumeric extends type__79(JsonSyntaxTree) {
220
224
  /** @returns {string} */
221
225
  asJsonNumericToken() {
222
226
  null;
223
227
  }
224
228
  /** @returns {number} */
225
- asInt() {
229
+ asInt32() {
230
+ null;
231
+ }
232
+ /** @returns {bigint} */
233
+ asInt64() {
226
234
  null;
227
235
  }
228
236
  /** @returns {number} */
@@ -230,1872 +238,1968 @@ export class JsonNumeric extends type__392(JsonSyntaxTree) {
230
238
  null;
231
239
  }
232
240
  };
233
- export class JsonInt extends type__392(JsonNumeric) {
241
+ export class JsonInt32 extends type__79(JsonNumeric) {
234
242
  /** @type {number} */
235
- #content_461;
236
- /** @param {JsonProducer} p_463 */
237
- produce(p_463) {
238
- p_463.intValue(this.#content_461);
243
+ #content_151;
244
+ /** @param {JsonProducer} p_153 */
245
+ produce(p_153) {
246
+ p_153.int32Value(this.#content_151);
239
247
  return;
240
248
  }
241
249
  /** @returns {string} */
242
250
  asJsonNumericToken() {
243
- return this.#content_461.toString();
251
+ return this.#content_151.toString();
244
252
  }
245
253
  /** @returns {number} */
246
- asInt() {
247
- return this.#content_461;
254
+ asInt32() {
255
+ return this.#content_151;
256
+ }
257
+ /** @returns {bigint} */
258
+ asInt64() {
259
+ return BigInt(this.#content_151);
248
260
  }
249
261
  /** @returns {number} */
250
262
  asFloat64() {
251
- return this.#content_461;
263
+ return this.#content_151;
252
264
  }
253
- /** @param {number} content_467 */
254
- constructor(content_467) {
265
+ /** @param {number} content_158 */
266
+ constructor(content_158) {
255
267
  super ();
256
- this.#content_461 = content_467;
268
+ this.#content_151 = content_158;
257
269
  return;
258
270
  }
259
271
  /** @returns {number} */
260
272
  get content() {
261
- return this.#content_461;
273
+ return this.#content_151;
262
274
  }
263
275
  };
264
- export class JsonFloat64 extends type__392(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) {
265
312
  /** @type {number} */
266
- #content_469;
267
- /** @param {JsonProducer} p_471 */
268
- produce(p_471) {
269
- p_471.float64Value(this.#content_469);
313
+ #content_171;
314
+ /** @param {JsonProducer} p_173 */
315
+ produce(p_173) {
316
+ p_173.float64Value(this.#content_171);
270
317
  return;
271
318
  }
272
319
  /** @returns {string} */
273
320
  asJsonNumericToken() {
274
- return float64ToString_473(this.#content_469);
321
+ return float64ToString_175(this.#content_171);
275
322
  }
276
323
  /** @returns {number} */
277
- asInt() {
278
- return float64ToInt_475(this.#content_469);
324
+ asInt32() {
325
+ return float64ToInt32_177(this.#content_171);
326
+ }
327
+ /** @returns {bigint} */
328
+ asInt64() {
329
+ return float64ToInt64_179(this.#content_171);
279
330
  }
280
331
  /** @returns {number} */
281
332
  asFloat64() {
282
- return this.#content_469;
333
+ return this.#content_171;
283
334
  }
284
- /** @param {number} content_477 */
285
- constructor(content_477) {
335
+ /** @param {number} content_181 */
336
+ constructor(content_181) {
286
337
  super ();
287
- this.#content_469 = content_477;
338
+ this.#content_171 = content_181;
288
339
  return;
289
340
  }
290
341
  /** @returns {number} */
291
342
  get content() {
292
- return this.#content_469;
343
+ return this.#content_171;
293
344
  }
294
345
  };
295
- export class JsonNumericToken extends type__392(JsonNumeric) {
346
+ export class JsonNumericToken extends type__79(JsonNumeric) {
296
347
  /** @type {string} */
297
- #content_479;
298
- /** @param {JsonProducer} p_481 */
299
- produce(p_481) {
300
- p_481.numericTokenValue(this.#content_479);
348
+ #content_183;
349
+ /** @param {JsonProducer} p_185 */
350
+ produce(p_185) {
351
+ p_185.numericTokenValue(this.#content_183);
301
352
  return;
302
353
  }
303
354
  /** @returns {string} */
304
355
  asJsonNumericToken() {
305
- return this.#content_479;
356
+ return this.#content_183;
306
357
  }
307
358
  /** @returns {number} */
308
- asInt() {
309
- let return_484;
310
- let t_485;
311
- let t_486;
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;
312
377
  try {
313
- t_485 = stringToInt_487(this.#content_479);
314
- return_484 = t_485;
378
+ t_195 = stringToInt64_197(this.#content_183);
379
+ return_194 = t_195;
315
380
  } catch {
316
- t_486 = stringToFloat64_488(this.#content_479);
317
- return_484 = float64ToInt_475(t_486);
381
+ t_196 = stringToFloat64_192(this.#content_183);
382
+ return_194 = float64ToInt64_179(t_196);
318
383
  }
319
- return return_484;
384
+ return return_194;
320
385
  }
321
386
  /** @returns {number} */
322
387
  asFloat64() {
323
- return stringToFloat64_488(this.#content_479);
388
+ return stringToFloat64_192(this.#content_183);
324
389
  }
325
- /** @param {string} content_490 */
326
- constructor(content_490) {
390
+ /** @param {string} content_199 */
391
+ constructor(content_199) {
327
392
  super ();
328
- this.#content_479 = content_490;
393
+ this.#content_183 = content_199;
329
394
  return;
330
395
  }
331
396
  /** @returns {string} */
332
397
  get content() {
333
- return this.#content_479;
398
+ return this.#content_183;
334
399
  }
335
400
  };
336
- export class JsonTextProducer extends type__392(JsonProducer) {
401
+ export class JsonTextProducer extends type__79(JsonProducer) {
337
402
  /** @type {InterchangeContext} */
338
- #interchangeContext_492;
403
+ #interchangeContext_201;
339
404
  /** @type {globalThis.Array<string>} */
340
- #buffer_493;
405
+ #buffer_202;
341
406
  /** @type {Array<number>} */
342
- #stack_494;
407
+ #stack_203;
343
408
  /** @type {boolean} */
344
- #wellFormed_495;
345
- /** @param {InterchangeContext | null} [interchangeContext_496] */
346
- constructor(interchangeContext_496) {
409
+ #wellFormed_204;
410
+ /** @param {InterchangeContext | null} [interchangeContext_205] */
411
+ constructor(interchangeContext_205) {
347
412
  super ();
348
- let interchangeContext_497;
349
- if (interchangeContext_496 == null) {
350
- interchangeContext_497 = NullInterchangeContext.instance;
413
+ let interchangeContext_206;
414
+ if (interchangeContext_205 == null) {
415
+ interchangeContext_206 = NullInterchangeContext.instance;
351
416
  } else {
352
- interchangeContext_497 = interchangeContext_496;
353
- }
354
- this.#interchangeContext_492 = interchangeContext_497;
355
- let t_498 = [""];
356
- this.#buffer_493 = t_498;
357
- let t_499 = [];
358
- this.#stack_494 = t_499;
359
- listBuilderAdd_500(this.#stack_494, 5);
360
- this.#wellFormed_495 = 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;
361
426
  return;
362
427
  }
363
428
  /** @returns {number} */
364
- #state_502() {
365
- let t_503 = this.#stack_494.length;
366
- return listedGetOr_504(this.#stack_494, t_503 - 1, -1);
367
- }
368
- #beforeValue_506() {
369
- let t_507;
370
- let t_508;
371
- let t_509;
372
- let t_510;
373
- const currentState_511 = this.#state_502();
374
- if (currentState_511 === 3) {
375
- t_507 = this.#stack_494.length;
376
- listBuilderSet_512(this.#stack_494, t_507 - 1, 4);
377
- } else if (currentState_511 === 4) {
378
- this.#buffer_493[0] += ",";
379
- } else if (currentState_511 === 1) {
380
- t_508 = this.#stack_494.length;
381
- listBuilderSet_512(this.#stack_494, t_508 - 1, 2);
382
- } else if (currentState_511 === 5) {
383
- t_509 = this.#stack_494.length;
384
- listBuilderSet_512(this.#stack_494, t_509 - 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);
385
450
  } else {
386
- if (currentState_511 === 6) {
387
- t_510 = true;
451
+ if (currentState_220 === 6) {
452
+ t_219 = true;
388
453
  } else {
389
- t_510 = currentState_511 === 2;
454
+ t_219 = currentState_220 === 2;
390
455
  }
391
- if (t_510) {
392
- this.#wellFormed_495 = false;
456
+ if (t_219) {
457
+ this.#wellFormed_204 = false;
393
458
  }
394
459
  }
395
460
  return;
396
461
  }
397
462
  startObject() {
398
- this.#beforeValue_506();
399
- this.#buffer_493[0] += "{";
400
- listBuilderAdd_500(this.#stack_494, 0);
463
+ this.#beforeValue_215();
464
+ this.#buffer_202[0] += "{";
465
+ listBuilderAdd_209(this.#stack_203, 0);
401
466
  return;
402
467
  }
403
468
  endObject() {
404
- let t_515;
405
- this.#buffer_493[0] += "}";
406
- const currentState_516 = this.#state_502();
407
- if (0 === currentState_516) {
408
- t_515 = 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;
409
474
  } else {
410
- t_515 = 2 === currentState_516;
475
+ t_224 = 2 === currentState_225;
411
476
  }
412
- if (t_515) {
413
- listBuilderRemoveLast_517(this.#stack_494);
477
+ if (t_224) {
478
+ listBuilderRemoveLast_226(this.#stack_203);
414
479
  } else {
415
- this.#wellFormed_495 = false;
480
+ this.#wellFormed_204 = false;
416
481
  }
417
482
  return;
418
483
  }
419
- /** @param {string} key_519 */
420
- objectKey(key_519) {
421
- let t_520;
422
- const currentState_521 = this.#state_502();
423
- if (!(currentState_521 === 0)) {
424
- if (currentState_521 === 2) {
425
- this.#buffer_493[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] += ",";
426
491
  } else {
427
- this.#wellFormed_495 = false;
492
+ this.#wellFormed_204 = false;
428
493
  }
429
494
  }
430
- encodeJsonString_522(key_519, this.#buffer_493);
431
- this.#buffer_493[0] += ":";
432
- if (currentState_521 >= 0) {
433
- t_520 = this.#stack_494.length;
434
- listBuilderSet_512(this.#stack_494, t_520 - 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);
435
500
  }
436
501
  return;
437
502
  }
438
503
  startArray() {
439
- this.#beforeValue_506();
440
- this.#buffer_493[0] += "[";
441
- listBuilderAdd_500(this.#stack_494, 3);
504
+ this.#beforeValue_215();
505
+ this.#buffer_202[0] += "[";
506
+ listBuilderAdd_209(this.#stack_203, 3);
442
507
  return;
443
508
  }
444
509
  endArray() {
445
- let t_525;
446
- this.#buffer_493[0] += "]";
447
- const currentState_526 = this.#state_502();
448
- if (3 === currentState_526) {
449
- t_525 = 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;
450
515
  } else {
451
- t_525 = 4 === currentState_526;
516
+ t_234 = 4 === currentState_235;
452
517
  }
453
- if (t_525) {
454
- listBuilderRemoveLast_517(this.#stack_494);
518
+ if (t_234) {
519
+ listBuilderRemoveLast_226(this.#stack_203);
455
520
  } else {
456
- this.#wellFormed_495 = false;
521
+ this.#wellFormed_204 = false;
457
522
  }
458
523
  return;
459
524
  }
460
525
  nullValue() {
461
- this.#beforeValue_506();
462
- this.#buffer_493[0] += "null";
526
+ this.#beforeValue_215();
527
+ this.#buffer_202[0] += "null";
463
528
  return;
464
529
  }
465
- /** @param {boolean} x_529 */
466
- booleanValue(x_529) {
467
- let t_530;
468
- this.#beforeValue_506();
469
- if (x_529) {
470
- t_530 = "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";
471
536
  } else {
472
- t_530 = "false";
537
+ t_239 = "false";
473
538
  }
474
- this.#buffer_493[0] += t_530;
539
+ this.#buffer_202[0] += t_239;
540
+ return;
541
+ }
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;
475
547
  return;
476
548
  }
477
- /** @param {number} x_532 */
478
- intValue(x_532) {
479
- this.#beforeValue_506();
480
- let t_533 = x_532.toString();
481
- this.#buffer_493[0] += t_533;
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;
482
554
  return;
483
555
  }
484
- /** @param {number} x_535 */
485
- float64Value(x_535) {
486
- this.#beforeValue_506();
487
- let t_536 = float64ToString_473(x_535);
488
- this.#buffer_493[0] += t_536;
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;
489
561
  return;
490
562
  }
491
- /** @param {string} x_538 */
492
- numericTokenValue(x_538) {
493
- this.#beforeValue_506();
494
- this.#buffer_493[0] += x_538;
563
+ /** @param {string} x_250 */
564
+ numericTokenValue(x_250) {
565
+ this.#beforeValue_215();
566
+ this.#buffer_202[0] += x_250;
495
567
  return;
496
568
  }
497
- /** @param {string} x_540 */
498
- stringValue(x_540) {
499
- this.#beforeValue_506();
500
- encodeJsonString_522(x_540, this.#buffer_493);
569
+ /** @param {string} x_252 */
570
+ stringValue(x_252) {
571
+ this.#beforeValue_215();
572
+ encodeJsonString_231(x_252, this.#buffer_202);
501
573
  return;
502
574
  }
503
575
  /** @returns {string} */
504
576
  toJsonString() {
505
- let return_542;
506
- let t_543;
507
- let t_544;
508
- let t_545;
509
- if (this.#wellFormed_495) {
510
- if (this.#stack_494.length === 1) {
511
- t_543 = this.#state_502();
512
- t_544 = t_543 === 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;
513
585
  } else {
514
- t_544 = false;
586
+ t_256 = false;
515
587
  }
516
- t_545 = t_544;
588
+ t_257 = t_256;
517
589
  } else {
518
- t_545 = false;
590
+ t_257 = false;
519
591
  }
520
- if (t_545) {
521
- return_542 = this.#buffer_493[0];
592
+ if (t_257) {
593
+ return_254 = this.#buffer_202[0];
522
594
  } else {
523
595
  throw Error();
524
596
  }
525
- return return_542;
597
+ return return_254;
526
598
  }
527
599
  /** @returns {InterchangeContext} */
528
600
  get interchangeContext() {
529
- return this.#interchangeContext_492;
601
+ return this.#interchangeContext_201;
530
602
  }
531
603
  };
532
- export class JsonParseErrorReceiver extends type__392() {
533
- /** @param {string} explanation_548 */
534
- explainJsonError(explanation_548) {
604
+ export class JsonParseErrorReceiver extends type__79() {
605
+ /** @param {string} explanation_260 */
606
+ explainJsonError(explanation_260) {
535
607
  null;
536
608
  }
537
609
  };
538
- export class JsonSyntaxTreeProducer extends type__392(JsonProducer, JsonParseErrorReceiver) {
610
+ export class JsonSyntaxTreeProducer extends type__79(JsonProducer, JsonParseErrorReceiver) {
539
611
  /** @type {Array<Array<JsonSyntaxTree>>} */
540
- #stack_549;
612
+ #stack_261;
541
613
  /** @type {string | null} */
542
- #error_550;
614
+ #error_262;
543
615
  /** @returns {InterchangeContext} */
544
616
  get interchangeContext() {
545
617
  return NullInterchangeContext.instance;
546
618
  }
547
619
  constructor() {
548
620
  super ();
549
- let t_552 = [];
550
- this.#stack_549 = t_552;
551
- let t_553 = [];
552
- listBuilderAdd_500(this.#stack_549, t_553);
553
- this.#error_550 = 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;
554
626
  return;
555
627
  }
556
- /** @param {JsonSyntaxTree} v_556 */
557
- #storeValue_555(v_556) {
558
- let t_557;
559
- if (! ! this.#stack_549.length) {
560
- t_557 = this.#stack_549.length;
561
- listBuilderAdd_500(listedGet_424(this.#stack_549, t_557 - 1), v_556);
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);
562
634
  }
563
635
  return;
564
636
  }
565
637
  startObject() {
566
- let t_559 = [];
567
- listBuilderAdd_500(this.#stack_549, t_559);
638
+ let t_271 = [];
639
+ listBuilderAdd_209(this.#stack_261, t_271);
568
640
  return;
569
641
  }
570
642
  endObject() {
571
- let return_561;
572
- let t_562;
573
- let t_563;
574
- let t_564;
575
- let t_565;
576
- let t_566;
577
- let t_567;
578
- let t_568;
579
- let t_569;
580
- let t_570;
581
- let t_571;
582
- let t_572;
583
- let t_573;
584
- let t_574;
585
- let t_575;
586
- fn_576: {
587
- if (! this.#stack_549.length) {
588
- return_561 = void 0;
589
- break fn_576;
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;
590
658
  }
591
- const ls_577 = listBuilderRemoveLast_517(this.#stack_549);
592
- const m_578 = mapBuilderConstructor_579();
593
- let multis_580 = null;
594
- let i_581 = 0;
595
- let n_582 = ls_577.length & -2;
596
- while (i_581 < n_582) {
597
- const postfixReturn_583 = i_581;
598
- i_581 = i_581 + 1;
599
- const keyTree_584 = listedGet_424(ls_577, postfixReturn_583);
600
- if (!(keyTree_584 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)) {
601
669
  break;
602
670
  }
603
671
  try {
604
- t_568 = requireInstanceOf__585(keyTree_584, JsonString);
605
- t_569 = t_568;
672
+ t_276 = requireInstanceOf__293(keyTree_292, JsonString);
673
+ t_277 = t_276;
606
674
  } catch {
607
- t_562 = panic_586();
608
- t_569 = t_562;
675
+ t_277 = panic_294();
609
676
  }
610
- const key_587 = t_569.content;
611
- const postfixReturn_588 = i_581;
612
- i_581 = i_581 + 1;
613
- const value_589 = listedGet_424(ls_577, postfixReturn_588);
614
- if (m_578.has(key_587)) {
615
- if (multis_580 == null) {
616
- t_563 = mapBuilderConstructor_579();
617
- multis_580 = t_563;
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;
618
685
  }
619
686
  try {
620
- if (multis_580 == null) {
687
+ if (multis_288 == null) {
621
688
  throw Error();
622
689
  } else {
623
- t_570 = multis_580;
690
+ t_278 = multis_288;
624
691
  }
625
- t_571 = t_570;
692
+ t_279 = t_278;
626
693
  } catch {
627
- t_564 = panic_586();
628
- t_571 = t_564;
694
+ t_279 = panic_294();
629
695
  }
630
- const mb_590 = t_571;
631
- if (! mb_590.has(key_587)) {
696
+ const mb_298 = t_279;
697
+ if (! mb_298.has(key_295)) {
632
698
  try {
633
- t_572 = mappedGet_591(m_578, key_587);
634
- t_573 = t_572;
699
+ t_280 = mappedGet_299(m_286, key_295);
700
+ t_281 = t_280;
635
701
  } catch {
636
- t_565 = panic_586();
637
- t_573 = t_565;
702
+ t_281 = panic_294();
638
703
  }
639
- mapBuilderSet_592(mb_590, key_587, t_573.slice());
704
+ mapBuilderSet_300(mb_298, key_295, t_281.slice());
640
705
  }
641
706
  try {
642
- t_574 = mappedGet_591(mb_590, key_587);
643
- t_575 = t_574;
707
+ t_282 = mappedGet_299(mb_298, key_295);
708
+ t_283 = t_282;
644
709
  } catch {
645
- t_566 = panic_586();
646
- t_575 = t_566;
710
+ t_283 = panic_294();
647
711
  }
648
- listBuilderAdd_500(t_575, value_589);
712
+ listBuilderAdd_209(t_283, value_297);
649
713
  } else {
650
- mapBuilderSet_592(m_578, key_587, Object.freeze([value_589]));
714
+ mapBuilderSet_300(m_286, key_295, Object.freeze([value_297]));
651
715
  }
652
716
  }
653
- const multis_593 = multis_580;
654
- if (!(multis_593 == null)) {
655
- function fn_594(k_595, vs_596) {
656
- let t_597 = listBuilderToList_598(vs_596);
657
- mapBuilderSet_592(m_578, k_595, t_597);
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);
658
722
  return;
659
723
  }
660
- mappedForEach_436(multis_593, fn_594);
724
+ mappedForEach_125(multis_301, fn_302);
661
725
  }
662
- t_567 = new JsonObject(mappedToMap_599(m_578));
663
- this.#storeValue_555(t_567);
664
- return_561 = void 0;
726
+ t_275 = new JsonObject(mappedToMap_307(m_286));
727
+ this.#storeValue_267(t_275);
728
+ return_273 = void 0;
665
729
  }
666
- return return_561;
730
+ return return_273;
667
731
  }
668
- /** @param {string} key_601 */
669
- objectKey(key_601) {
670
- let t_602 = new JsonString(key_601);
671
- this.#storeValue_555(t_602);
732
+ /** @param {string} key_309 */
733
+ objectKey(key_309) {
734
+ let t_310 = new JsonString(key_309);
735
+ this.#storeValue_267(t_310);
672
736
  return;
673
737
  }
674
738
  startArray() {
675
- let t_604 = [];
676
- listBuilderAdd_500(this.#stack_549, t_604);
739
+ let t_312 = [];
740
+ listBuilderAdd_209(this.#stack_261, t_312);
677
741
  return;
678
742
  }
679
743
  endArray() {
680
- let return_606;
681
- let t_607;
682
- fn_608: {
683
- if (! this.#stack_549.length) {
684
- return_606 = void 0;
685
- break fn_608;
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;
686
750
  }
687
- const ls_609 = listBuilderRemoveLast_517(this.#stack_549);
688
- t_607 = new JsonArray(listBuilderToList_598(ls_609));
689
- this.#storeValue_555(t_607);
690
- return_606 = 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;
691
755
  }
692
- return return_606;
756
+ return return_314;
693
757
  }
694
758
  nullValue() {
695
- let t_611 = new JsonNull();
696
- this.#storeValue_555(t_611);
759
+ let t_319 = new JsonNull();
760
+ this.#storeValue_267(t_319);
697
761
  return;
698
762
  }
699
- /** @param {boolean} x_613 */
700
- booleanValue(x_613) {
701
- let t_614 = new JsonBoolean(x_613);
702
- this.#storeValue_555(t_614);
763
+ /** @param {boolean} x_321 */
764
+ booleanValue(x_321) {
765
+ let t_322 = new JsonBoolean(x_321);
766
+ this.#storeValue_267(t_322);
703
767
  return;
704
768
  }
705
- /** @param {number} x_616 */
706
- intValue(x_616) {
707
- let t_617 = new JsonInt(x_616);
708
- this.#storeValue_555(t_617);
769
+ /** @param {number} x_324 */
770
+ int32Value(x_324) {
771
+ let t_325 = new JsonInt32(x_324);
772
+ this.#storeValue_267(t_325);
709
773
  return;
710
774
  }
711
- /** @param {number} x_619 */
712
- float64Value(x_619) {
713
- let t_620 = new JsonFloat64(x_619);
714
- this.#storeValue_555(t_620);
775
+ /** @param {bigint} x_327 */
776
+ int64Value(x_327) {
777
+ let t_328 = new JsonInt64(x_327);
778
+ this.#storeValue_267(t_328);
715
779
  return;
716
780
  }
717
- /** @param {string} x_622 */
718
- numericTokenValue(x_622) {
719
- let t_623 = new JsonNumericToken(x_622);
720
- this.#storeValue_555(t_623);
781
+ /** @param {number} x_330 */
782
+ float64Value(x_330) {
783
+ let t_331 = new JsonFloat64(x_330);
784
+ this.#storeValue_267(t_331);
721
785
  return;
722
786
  }
723
- /** @param {string} x_625 */
724
- stringValue(x_625) {
725
- let t_626 = new JsonString(x_625);
726
- this.#storeValue_555(t_626);
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);
727
797
  return;
728
798
  }
729
799
  /** @returns {JsonSyntaxTree} */
730
800
  toJsonSyntaxTree() {
731
- let t_628;
732
- if (this.#stack_549.length !== 1) {
733
- t_628 = true;
801
+ let t_339;
802
+ if (this.#stack_261.length !== 1) {
803
+ t_339 = true;
734
804
  } else {
735
- t_628 = !(this.#error_550 == null);
805
+ t_339 = !(this.#error_262 == null);
736
806
  }
737
- if (t_628) {
807
+ if (t_339) {
738
808
  throw Error();
739
809
  }
740
- const ls_629 = listedGet_424(this.#stack_549, 0);
741
- if (ls_629.length !== 1) {
810
+ const ls_340 = listedGet_113(this.#stack_261, 0);
811
+ if (ls_340.length !== 1) {
742
812
  throw Error();
743
813
  }
744
- return listedGet_424(ls_629, 0);
814
+ return listedGet_113(ls_340, 0);
745
815
  }
746
816
  /** @returns {string | null} */
747
817
  get jsonError() {
748
- return this.#error_550;
818
+ return this.#error_262;
749
819
  }
750
820
  /** @returns {JsonParseErrorReceiver} */
751
821
  get parseErrorReceiver() {
752
822
  return this;
753
823
  }
754
- /** @param {string} error_633 */
755
- explainJsonError(error_633) {
756
- this.#error_550 = error_633;
824
+ /** @param {string} error_344 */
825
+ explainJsonError(error_344) {
826
+ this.#error_262 = error_344;
757
827
  return;
758
828
  }
759
829
  };
760
830
  /**
761
- * @param {string} sourceText_635
762
- * @param {globalThis.number} i_636
763
- * @param {JsonProducer} out_637
831
+ * @param {string} sourceText_346
832
+ * @param {globalThis.number} i_347
833
+ * @param {JsonProducer} out_348
764
834
  * @returns {globalThis.number}
765
835
  */
766
- function parseJsonValue_634(sourceText_635, i_636, out_637) {
767
- let return_638;
768
- let t_639;
769
- let t_640;
770
- let t_641;
771
- fn_642: {
772
- t_639 = skipJsonSpaces_643(sourceText_635, i_636);
773
- i_636 = t_639;
774
- if (!(sourceText_635.length > i_636)) {
775
- expectedTokenError_644(sourceText_635, i_636, out_637, "JSON value");
776
- return_638 = -1;
777
- break fn_642;
778
- }
779
- t_640 = stringGet_645(sourceText_635, i_636);
780
- if (t_640 === 123) {
781
- return_638 = parseJsonObject_646(sourceText_635, i_636, out_637);
782
- } else if (t_640 === 91) {
783
- return_638 = parseJsonArray_647(sourceText_635, i_636, out_637);
784
- } else if (t_640 === 34) {
785
- return_638 = parseJsonString_648(sourceText_635, i_636, out_637);
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);
786
856
  } else {
787
- if (t_640 === 116) {
788
- t_641 = true;
857
+ if (t_351 === 116) {
858
+ t_352 = true;
789
859
  } else {
790
- t_641 = t_640 === 102;
860
+ t_352 = t_351 === 102;
791
861
  }
792
- if (t_641) {
793
- return_638 = parseJsonBoolean_649(sourceText_635, i_636, out_637);
794
- } else if (t_640 === 110) {
795
- return_638 = parseJsonNull_650(sourceText_635, i_636, out_637);
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);
796
866
  } else {
797
- return_638 = parseJsonNumber_651(sourceText_635, i_636, out_637);
867
+ return_349 = parseJsonNumber_362(sourceText_346, i_347, out_348);
798
868
  }
799
869
  }
800
870
  }
801
- return return_638;
871
+ return return_349;
802
872
  }
803
- /** @template T_652 */
804
- export class JsonAdapter extends type__392() {
873
+ /** @template T_363 */
874
+ export class JsonAdapter extends type__79() {
805
875
  /**
806
- * @param {T_652} x_654
807
- * @param {JsonProducer} p_655
876
+ * @param {T_363} x_365
877
+ * @param {JsonProducer} p_366
808
878
  */
809
- encodeToJson(x_654, p_655) {
879
+ encodeToJson(x_365, p_366) {
810
880
  null;
811
881
  }
812
882
  /**
813
- * @param {JsonSyntaxTree} t_657
814
- * @param {InterchangeContext} ic_658
815
- * @returns {T_652}
883
+ * @param {JsonSyntaxTree} t_368
884
+ * @param {InterchangeContext} ic_369
885
+ * @returns {T_363}
816
886
  */
817
- decodeFromJson(t_657, ic_658) {
887
+ decodeFromJson(t_368, ic_369) {
818
888
  null;
819
889
  }
820
890
  };
821
- class BooleanJsonAdapter_659 extends type__392(JsonAdapter) {
891
+ class BooleanJsonAdapter_370 extends type__79(JsonAdapter) {
822
892
  /**
823
- * @param {boolean} x_661
824
- * @param {JsonProducer} p_662
893
+ * @param {boolean} x_372
894
+ * @param {JsonProducer} p_373
825
895
  */
826
- encodeToJson(x_661, p_662) {
827
- p_662.booleanValue(x_661);
896
+ encodeToJson(x_372, p_373) {
897
+ p_373.booleanValue(x_372);
828
898
  return;
829
899
  }
830
900
  /**
831
- * @param {JsonSyntaxTree} t_664
832
- * @param {InterchangeContext} ic_665
901
+ * @param {JsonSyntaxTree} t_375
902
+ * @param {InterchangeContext} ic_376
833
903
  * @returns {boolean}
834
904
  */
835
- decodeFromJson(t_664, ic_665) {
836
- let t_666;
837
- t_666 = requireInstanceOf__585(t_664, JsonBoolean);
838
- return t_666.content;
905
+ decodeFromJson(t_375, ic_376) {
906
+ let t_377;
907
+ t_377 = requireInstanceOf__293(t_375, JsonBoolean);
908
+ return t_377.content;
839
909
  }
840
910
  constructor() {
841
911
  super ();
842
912
  return;
843
913
  }
844
914
  }
845
- class Float64JsonAdapter_667 extends type__392(JsonAdapter) {
915
+ class Float64JsonAdapter_378 extends type__79(JsonAdapter) {
846
916
  /**
847
- * @param {number} x_669
848
- * @param {JsonProducer} p_670
917
+ * @param {number} x_380
918
+ * @param {JsonProducer} p_381
849
919
  */
850
- encodeToJson(x_669, p_670) {
851
- p_670.float64Value(x_669);
920
+ encodeToJson(x_380, p_381) {
921
+ p_381.float64Value(x_380);
852
922
  return;
853
923
  }
854
924
  /**
855
- * @param {JsonSyntaxTree} t_672
856
- * @param {InterchangeContext} ic_673
925
+ * @param {JsonSyntaxTree} t_383
926
+ * @param {InterchangeContext} ic_384
857
927
  * @returns {number}
858
928
  */
859
- decodeFromJson(t_672, ic_673) {
860
- let t_674;
861
- t_674 = requireInstanceOf__585(t_672, JsonNumeric);
862
- return t_674.asFloat64();
929
+ decodeFromJson(t_383, ic_384) {
930
+ let t_385;
931
+ t_385 = requireInstanceOf__293(t_383, JsonNumeric);
932
+ return t_385.asFloat64();
863
933
  }
864
934
  constructor() {
865
935
  super ();
866
936
  return;
867
937
  }
868
938
  }
869
- class IntJsonAdapter_675 extends type__392(JsonAdapter) {
939
+ class Int32JsonAdapter_386 extends type__79(JsonAdapter) {
870
940
  /**
871
- * @param {number} x_677
872
- * @param {JsonProducer} p_678
941
+ * @param {number} x_388
942
+ * @param {JsonProducer} p_389
873
943
  */
874
- encodeToJson(x_677, p_678) {
875
- p_678.intValue(x_677);
944
+ encodeToJson(x_388, p_389) {
945
+ p_389.int32Value(x_388);
876
946
  return;
877
947
  }
878
948
  /**
879
- * @param {JsonSyntaxTree} t_680
880
- * @param {InterchangeContext} ic_681
949
+ * @param {JsonSyntaxTree} t_391
950
+ * @param {InterchangeContext} ic_392
881
951
  * @returns {number}
882
952
  */
883
- decodeFromJson(t_680, ic_681) {
884
- let t_682;
885
- t_682 = requireInstanceOf__585(t_680, JsonNumeric);
886
- return t_682.asInt();
953
+ decodeFromJson(t_391, ic_392) {
954
+ let t_393;
955
+ t_393 = requireInstanceOf__293(t_391, JsonNumeric);
956
+ return t_393.asInt32();
887
957
  }
888
958
  constructor() {
889
959
  super ();
890
960
  return;
891
961
  }
892
962
  }
893
- class StringJsonAdapter_683 extends type__392(JsonAdapter) {
963
+ class Int64JsonAdapter_394 extends type__79(JsonAdapter) {
894
964
  /**
895
- * @param {string} x_685
896
- * @param {JsonProducer} p_686
965
+ * @param {bigint} x_396
966
+ * @param {JsonProducer} p_397
897
967
  */
898
- encodeToJson(x_685, p_686) {
899
- p_686.stringValue(x_685);
968
+ encodeToJson(x_396, p_397) {
969
+ p_397.int64Value(x_396);
900
970
  return;
901
971
  }
902
972
  /**
903
- * @param {JsonSyntaxTree} t_688
904
- * @param {InterchangeContext} ic_689
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
905
999
  * @returns {string}
906
1000
  */
907
- decodeFromJson(t_688, ic_689) {
908
- let t_690;
909
- t_690 = requireInstanceOf__585(t_688, JsonString);
910
- return t_690.content;
1001
+ decodeFromJson(t_407, ic_408) {
1002
+ let t_409;
1003
+ t_409 = requireInstanceOf__293(t_407, JsonString);
1004
+ return t_409.content;
911
1005
  }
912
1006
  constructor() {
913
1007
  super ();
914
1008
  return;
915
1009
  }
916
1010
  }
917
- /** @template T_692 */
918
- class ListJsonAdapter_691 extends type__392(JsonAdapter) {
919
- /** @type {JsonAdapter<T_692>} */
920
- #adapterForT_693;
1011
+ /** @template T_411 */
1012
+ class ListJsonAdapter_410 extends type__79(JsonAdapter) {
1013
+ /** @type {JsonAdapter<T_411>} */
1014
+ #adapterForT_412;
921
1015
  /**
922
- * @param {Array<T_692>} x_695
923
- * @param {JsonProducer} p_696
1016
+ * @param {Array<T_411>} x_414
1017
+ * @param {JsonProducer} p_415
924
1018
  */
925
- encodeToJson(x_695, p_696) {
926
- const this699 = this;
927
- p_696.startArray();
928
- function fn_697(el_698) {
929
- this699.#adapterForT_693.encodeToJson(el_698, p_696);
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);
930
1024
  return;
931
1025
  }
932
- x_695.forEach(fn_697);
933
- p_696.endArray();
1026
+ x_414.forEach(fn_416);
1027
+ p_415.endArray();
934
1028
  return;
935
1029
  }
936
1030
  /**
937
- * @param {JsonSyntaxTree} t_701
938
- * @param {InterchangeContext} ic_702
939
- * @returns {Array<T_692>}
1031
+ * @param {JsonSyntaxTree} t_420
1032
+ * @param {InterchangeContext} ic_421
1033
+ * @returns {Array<T_411>}
940
1034
  */
941
- decodeFromJson(t_701, ic_702) {
942
- let t_703;
943
- const b_704 = [];
944
- let t_705;
945
- t_705 = requireInstanceOf__585(t_701, JsonArray);
946
- const elements_706 = t_705.elements;
947
- const n_707 = elements_706.length;
948
- let i_708 = 0;
949
- while (i_708 < n_707) {
950
- const el_709 = listedGet_424(elements_706, i_708);
951
- i_708 = i_708 + 1;
952
- t_703 = this.#adapterForT_693.decodeFromJson(el_709, ic_702);
953
- listBuilderAdd_500(b_704, t_703);
954
- }
955
- return listBuilderToList_598(b_704);
956
- }
957
- /** @param {JsonAdapter<T_692>} adapterForT_710 */
958
- constructor(adapterForT_710) {
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) {
959
1053
  super ();
960
- this.#adapterForT_693 = adapterForT_710;
1054
+ this.#adapterForT_412 = adapterForT_429;
961
1055
  return;
962
1056
  }
963
1057
  }
964
- /** @template T_711 */
965
- export class OrNullJsonAdapter extends type__392(JsonAdapter) {
966
- /** @type {JsonAdapter<T_711>} */
967
- #adapterForT_712;
1058
+ /** @template T_430 */
1059
+ export class OrNullJsonAdapter extends type__79(JsonAdapter) {
1060
+ /** @type {JsonAdapter<T_430>} */
1061
+ #adapterForT_431;
968
1062
  /**
969
- * @param {T_711 | null} x_714
970
- * @param {JsonProducer} p_715
1063
+ * @param {T_430 | null} x_433
1064
+ * @param {JsonProducer} p_434
971
1065
  */
972
- encodeToJson(x_714, p_715) {
973
- if (x_714 == null) {
974
- p_715.nullValue();
1066
+ encodeToJson(x_433, p_434) {
1067
+ if (x_433 == null) {
1068
+ p_434.nullValue();
975
1069
  } else {
976
- const x_716 = x_714;
977
- this.#adapterForT_712.encodeToJson(x_716, p_715);
1070
+ const x_435 = x_433;
1071
+ this.#adapterForT_431.encodeToJson(x_435, p_434);
978
1072
  }
979
1073
  return;
980
1074
  }
981
1075
  /**
982
- * @param {JsonSyntaxTree} t_718
983
- * @param {InterchangeContext} ic_719
984
- * @returns {T_711 | null}
1076
+ * @param {JsonSyntaxTree} t_437
1077
+ * @param {InterchangeContext} ic_438
1078
+ * @returns {T_430 | null}
985
1079
  */
986
- decodeFromJson(t_718, ic_719) {
987
- let return_720;
988
- if (t_718 instanceof JsonNull) {
989
- return_720 = null;
1080
+ decodeFromJson(t_437, ic_438) {
1081
+ let return_439;
1082
+ if (t_437 instanceof JsonNull) {
1083
+ return_439 = null;
990
1084
  } else {
991
- return_720 = this.#adapterForT_712.decodeFromJson(t_718, ic_719);
1085
+ return_439 = this.#adapterForT_431.decodeFromJson(t_437, ic_438);
992
1086
  }
993
- return return_720;
1087
+ return return_439;
994
1088
  }
995
- /** @param {JsonAdapter<T_711>} adapterForT_721 */
996
- constructor(adapterForT_721) {
1089
+ /** @param {JsonAdapter<T_430>} adapterForT_440 */
1090
+ constructor(adapterForT_440) {
997
1091
  super ();
998
- this.#adapterForT_712 = adapterForT_721;
1092
+ this.#adapterForT_431 = adapterForT_440;
999
1093
  return;
1000
1094
  }
1001
1095
  };
1002
1096
  /** @type {Array<string>} */
1003
- const hexDigits_722 = 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"]);
1004
1098
  /**
1005
- * @param {number} cp_724
1006
- * @param {globalThis.Array<string>} buffer_725
1099
+ * @param {number} cp_443
1100
+ * @param {globalThis.Array<string>} buffer_444
1007
1101
  */
1008
- function encodeHex4_723(cp_724, buffer_725) {
1009
- const b0_726 = trunc__727(cp_724 / 4096) & 15;
1010
- const b1_728 = trunc__727(cp_724 / 256) & 15;
1011
- const b2_729 = trunc__727(cp_724 / 16) & 15;
1012
- const b3_730 = cp_724 & 15;
1013
- let t_731 = listedGet_424(hexDigits_722, b0_726);
1014
- buffer_725[0] += t_731;
1015
- let t_732 = listedGet_424(hexDigits_722, b1_728);
1016
- buffer_725[0] += t_732;
1017
- let t_733 = listedGet_424(hexDigits_722, b2_729);
1018
- buffer_725[0] += t_733;
1019
- let t_734 = listedGet_424(hexDigits_722, b3_730);
1020
- buffer_725[0] += t_734;
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;
1021
1115
  return;
1022
1116
  }
1023
1117
  /**
1024
- * @param {string} x_735
1025
- * @param {globalThis.Array<string>} buffer_736
1118
+ * @param {string} x_453
1119
+ * @param {globalThis.Array<string>} buffer_454
1026
1120
  */
1027
- function encodeJsonString_522(x_735, buffer_736) {
1028
- let t_737;
1029
- let t_738;
1030
- let t_739;
1031
- let t_740;
1032
- buffer_736[0] += "\u0022";
1033
- let i_741 = 0;
1034
- let emitted_742 = i_741;
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;
1035
1129
  while (true) {
1036
- if (!(x_735.length > i_741)) {
1130
+ if (!(x_453.length > i_459)) {
1037
1131
  break;
1038
1132
  }
1039
- const cp_743 = stringGet_645(x_735, i_741);
1040
- if (cp_743 === 8) {
1041
- t_740 = "\\b";
1042
- } else if (cp_743 === 9) {
1043
- t_740 = "\\t";
1044
- } else if (cp_743 === 10) {
1045
- t_740 = "\\n";
1046
- } else if (cp_743 === 12) {
1047
- t_740 = "\\f";
1048
- } else if (cp_743 === 13) {
1049
- t_740 = "\\r";
1050
- } else if (cp_743 === 34) {
1051
- t_740 = "\\\u0022";
1052
- } else if (cp_743 === 92) {
1053
- t_740 = "\\\\";
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 = "\\\\";
1054
1148
  } else {
1055
- if (cp_743 < 32) {
1056
- t_738 = true;
1149
+ if (cp_461 < 32) {
1150
+ t_456 = true;
1057
1151
  } else {
1058
- if (55296 <= cp_743) {
1059
- t_737 = cp_743 <= 57343;
1152
+ if (55296 <= cp_461) {
1153
+ t_455 = cp_461 <= 57343;
1060
1154
  } else {
1061
- t_737 = false;
1155
+ t_455 = false;
1062
1156
  }
1063
- t_738 = t_737;
1157
+ t_456 = t_455;
1064
1158
  }
1065
- if (t_738) {
1066
- t_739 = "\\u";
1159
+ if (t_456) {
1160
+ t_457 = "\\u";
1067
1161
  } else {
1068
- t_739 = "";
1162
+ t_457 = "";
1069
1163
  }
1070
- t_740 = t_739;
1071
- }
1072
- const replacement_744 = t_740;
1073
- const nextI_745 = stringNext_746(x_735, i_741);
1074
- if (replacement_744 !== "") {
1075
- buffer_736[0] += x_735.substring(emitted_742, i_741);
1076
- buffer_736[0] += replacement_744;
1077
- if (replacement_744 === "\\u") {
1078
- encodeHex4_723(cp_743, buffer_736);
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);
1079
1173
  }
1080
- emitted_742 = nextI_745;
1174
+ emitted_460 = nextI_463;
1081
1175
  }
1082
- i_741 = nextI_745;
1176
+ i_459 = nextI_463;
1083
1177
  }
1084
- buffer_736[0] += x_735.substring(emitted_742, i_741);
1085
- buffer_736[0] += "\u0022";
1178
+ buffer_454[0] += x_453.substring(emitted_460, i_459);
1179
+ buffer_454[0] += "\u0022";
1086
1180
  return;
1087
1181
  }
1088
1182
  /**
1089
- * @param {JsonProducer} out_748
1090
- * @param {string} explanation_749
1183
+ * @param {JsonProducer} out_466
1184
+ * @param {string} explanation_467
1091
1185
  */
1092
- function storeJsonError_747(out_748, explanation_749) {
1093
- let t_750 = out_748.parseErrorReceiver;
1094
- if (!(t_750 == null)) {
1095
- t_750.explainJsonError(explanation_749);
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);
1096
1190
  }
1097
1191
  return;
1098
1192
  }
1099
1193
  /**
1100
- * @param {string} sourceText_751
1101
- * @param {globalThis.number} i_752
1102
- * @param {JsonProducer} out_753
1103
- * @param {string} shortExplanation_754
1194
+ * @param {string} sourceText_469
1195
+ * @param {globalThis.number} i_470
1196
+ * @param {JsonProducer} out_471
1197
+ * @param {string} shortExplanation_472
1104
1198
  */
1105
- function expectedTokenError_644(sourceText_751, i_752, out_753, shortExplanation_754) {
1106
- let t_755;
1107
- let t_756;
1108
- let gotten_757;
1109
- if (sourceText_751.length > i_752) {
1110
- t_755 = sourceText_751.length;
1111
- t_756 = sourceText_751.substring(i_752, t_755);
1112
- gotten_757 = "`" + t_756 + "`";
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 + "`";
1113
1207
  } else {
1114
- gotten_757 = "end-of-file";
1208
+ gotten_475 = "end-of-file";
1115
1209
  }
1116
- storeJsonError_747(out_753, "Expected " + shortExplanation_754 + ", but got " + gotten_757);
1210
+ storeJsonError_465(out_471, "Expected " + shortExplanation_472 + ", but got " + gotten_475);
1117
1211
  return;
1118
1212
  }
1119
1213
  /**
1120
- * @param {string} sourceText_758
1121
- * @param {globalThis.number} i_759
1214
+ * @param {string} sourceText_476
1215
+ * @param {globalThis.number} i_477
1122
1216
  * @returns {globalThis.number}
1123
1217
  */
1124
- function skipJsonSpaces_643(sourceText_758, i_759) {
1125
- let t_760;
1126
- let t_761;
1127
- let t_762;
1128
- let t_763;
1129
- let t_764;
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;
1130
1224
  while (true) {
1131
- if (!(sourceText_758.length > i_759)) {
1225
+ if (!(sourceText_476.length > i_477)) {
1132
1226
  break;
1133
1227
  }
1134
- t_760 = stringGet_645(sourceText_758, i_759);
1135
- if (t_760 === 9) {
1136
- t_764 = true;
1228
+ t_478 = stringGet_356(sourceText_476, i_477);
1229
+ if (t_478 === 9) {
1230
+ t_482 = true;
1137
1231
  } else {
1138
- if (t_760 === 10) {
1139
- t_763 = true;
1232
+ if (t_478 === 10) {
1233
+ t_481 = true;
1140
1234
  } else {
1141
- if (t_760 === 13) {
1142
- t_762 = true;
1235
+ if (t_478 === 13) {
1236
+ t_480 = true;
1143
1237
  } else {
1144
- t_762 = t_760 === 32;
1238
+ t_480 = t_478 === 32;
1145
1239
  }
1146
- t_763 = t_762;
1240
+ t_481 = t_480;
1147
1241
  }
1148
- t_764 = t_763;
1242
+ t_482 = t_481;
1149
1243
  }
1150
- if (! t_764) {
1244
+ if (! t_482) {
1151
1245
  break;
1152
1246
  }
1153
- t_761 = stringNext_746(sourceText_758, i_759);
1154
- i_759 = t_761;
1247
+ t_479 = stringNext_464(sourceText_476, i_477);
1248
+ i_477 = t_479;
1155
1249
  }
1156
- return i_759;
1250
+ return i_477;
1157
1251
  }
1158
1252
  /**
1159
- * @param {string} sourceText_766
1160
- * @param {globalThis.number} start_767
1161
- * @param {globalThis.number} limit_768
1253
+ * @param {string} sourceText_484
1254
+ * @param {globalThis.number} start_485
1255
+ * @param {globalThis.number} limit_486
1162
1256
  * @returns {number}
1163
1257
  */
1164
- function decodeHexUnsigned_765(sourceText_766, start_767, limit_768) {
1165
- let return_769;
1166
- let t_770;
1167
- let t_771;
1168
- let t_772;
1169
- let t_773;
1170
- let t_774;
1171
- fn_775: {
1172
- let n_776 = 0;
1173
- let i_777 = start_767;
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;
1174
1268
  while (true) {
1175
- if (!(i_777 - limit_768 < 0)) {
1269
+ if (!(i_495 - limit_486 < 0)) {
1176
1270
  break;
1177
1271
  }
1178
- const cp_778 = stringGet_645(sourceText_766, i_777);
1179
- if (48 <= cp_778) {
1180
- t_771 = cp_778 <= 48;
1272
+ const cp_496 = stringGet_356(sourceText_484, i_495);
1273
+ if (48 <= cp_496) {
1274
+ t_489 = cp_496 <= 48;
1181
1275
  } else {
1182
- t_771 = false;
1276
+ t_489 = false;
1183
1277
  }
1184
- if (t_771) {
1185
- t_774 = cp_778 - 48;
1278
+ if (t_489) {
1279
+ t_492 = cp_496 - 48 | 0;
1186
1280
  } else {
1187
- if (65 <= cp_778) {
1188
- t_772 = cp_778 <= 70;
1281
+ if (65 <= cp_496) {
1282
+ t_490 = cp_496 <= 70;
1189
1283
  } else {
1190
- t_772 = false;
1284
+ t_490 = false;
1191
1285
  }
1192
- if (t_772) {
1193
- t_774 = cp_778 - 65 + 10;
1286
+ if (t_490) {
1287
+ t_492 = (cp_496 - 65 | 0) + 10 | 0;
1194
1288
  } else {
1195
- if (97 <= cp_778) {
1196
- t_773 = cp_778 <= 102;
1289
+ if (97 <= cp_496) {
1290
+ t_491 = cp_496 <= 102;
1197
1291
  } else {
1198
- t_773 = false;
1292
+ t_491 = false;
1199
1293
  }
1200
- if (t_773) {
1201
- t_774 = cp_778 - 97 + 10;
1294
+ if (t_491) {
1295
+ t_492 = (cp_496 - 97 | 0) + 10 | 0;
1202
1296
  } else {
1203
- return_769 = -1;
1204
- break fn_775;
1297
+ return_487 = -1;
1298
+ break fn_493;
1205
1299
  }
1206
1300
  }
1207
1301
  }
1208
- const digit_779 = t_774;
1209
- n_776 = n_776 * 16 + digit_779;
1210
- t_770 = stringNext_746(sourceText_766, i_777);
1211
- i_777 = t_770;
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;
1212
1306
  }
1213
- return_769 = n_776;
1307
+ return_487 = n_494;
1214
1308
  }
1215
- return return_769;
1309
+ return return_487;
1216
1310
  }
1217
1311
  /**
1218
- * @param {string} sourceText_781
1219
- * @param {globalThis.number} i_782
1220
- * @param {globalThis.Array<string>} sb_783
1221
- * @param {JsonProducer} errOut_784
1312
+ * @param {string} sourceText_500
1313
+ * @param {globalThis.number} i_501
1314
+ * @param {globalThis.Array<string>} sb_502
1315
+ * @param {JsonProducer} errOut_503
1222
1316
  * @returns {globalThis.number}
1223
1317
  */
1224
- function parseJsonStringTo_780(sourceText_781, i_782, sb_783, errOut_784) {
1225
- let return_785;
1226
- let t_786;
1227
- let t_787;
1228
- let t_788;
1229
- let t_789;
1230
- let t_790;
1231
- let t_791;
1232
- let t_792;
1233
- let t_793;
1234
- let t_794;
1235
- let t_795;
1236
- let t_796;
1237
- let t_797;
1238
- let t_798;
1239
- let t_799;
1240
- let t_800;
1241
- let t_801;
1242
- let t_802;
1243
- let t_803;
1244
- let t_804;
1245
- let t_805;
1246
- let t_806;
1247
- let t_807;
1248
- let t_808;
1249
- fn_809: {
1250
- if (!(sourceText_781.length > i_782)) {
1251
- t_797 = 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;
1252
1345
  } else {
1253
- t_786 = stringGet_645(sourceText_781, i_782);
1254
- t_797 = t_786 !== 34;
1255
- }
1256
- if (t_797) {
1257
- expectedTokenError_644(sourceText_781, i_782, errOut_784, "\u0022");
1258
- return_785 = -1;
1259
- break fn_809;
1260
- }
1261
- t_787 = stringNext_746(sourceText_781, i_782);
1262
- i_782 = t_787;
1263
- let leadSurrogate_810 = -1;
1264
- let consumed_811 = i_782;
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;
1265
1358
  while (true) {
1266
- if (!(sourceText_781.length > i_782)) {
1359
+ if (!(sourceText_500.length > i_501)) {
1267
1360
  break;
1268
1361
  }
1269
- const cp_812 = stringGet_645(sourceText_781, i_782);
1270
- if (cp_812 === 34) {
1362
+ const cp_530 = stringGet_356(sourceText_500, i_501);
1363
+ if (cp_530 === 34) {
1271
1364
  break;
1272
1365
  }
1273
- t_788 = stringNext_746(sourceText_781, i_782);
1274
- let iNext_813 = t_788;
1275
- const end_814 = sourceText_781.length;
1276
- let needToFlush_815 = false;
1277
- if (cp_812 !== 92) {
1278
- t_803 = cp_812;
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;
1279
1372
  } else {
1280
- needToFlush_815 = true;
1281
- if (!(sourceText_781.length > iNext_813)) {
1282
- expectedTokenError_644(sourceText_781, iNext_813, errOut_784, "escape sequence");
1283
- return_785 = -1;
1284
- break fn_809;
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;
1285
1378
  }
1286
- const esc0_816 = stringGet_645(sourceText_781, iNext_813);
1287
- t_789 = stringNext_746(sourceText_781, iNext_813);
1288
- iNext_813 = t_789;
1289
- if (esc0_816 === 34) {
1290
- t_799 = 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;
1291
1384
  } else {
1292
- if (esc0_816 === 92) {
1293
- t_798 = true;
1385
+ if (esc0_534 === 92) {
1386
+ t_517 = true;
1294
1387
  } else {
1295
- t_798 = esc0_816 === 47;
1388
+ t_517 = esc0_534 === 47;
1296
1389
  }
1297
- t_799 = t_798;
1390
+ t_518 = t_517;
1298
1391
  }
1299
- if (t_799) {
1300
- t_802 = esc0_816;
1301
- } else if (esc0_816 === 98) {
1302
- t_802 = 8;
1303
- } else if (esc0_816 === 102) {
1304
- t_802 = 12;
1305
- } else if (esc0_816 === 110) {
1306
- t_802 = 10;
1307
- } else if (esc0_816 === 114) {
1308
- t_802 = 13;
1309
- } else if (esc0_816 === 116) {
1310
- t_802 = 9;
1311
- } else if (esc0_816 === 117) {
1312
- if (stringHasAtLeast_817(sourceText_781, iNext_813, end_814, 4)) {
1313
- const startHex_818 = iNext_813;
1314
- t_790 = stringNext_746(sourceText_781, iNext_813);
1315
- iNext_813 = t_790;
1316
- t_791 = stringNext_746(sourceText_781, iNext_813);
1317
- iNext_813 = t_791;
1318
- t_792 = stringNext_746(sourceText_781, iNext_813);
1319
- iNext_813 = t_792;
1320
- t_793 = stringNext_746(sourceText_781, iNext_813);
1321
- iNext_813 = t_793;
1322
- t_794 = decodeHexUnsigned_765(sourceText_781, startHex_818, iNext_813);
1323
- t_800 = t_794;
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;
1324
1417
  } else {
1325
- t_800 = -1;
1418
+ t_519 = -1;
1326
1419
  }
1327
- const hex_819 = t_800;
1328
- if (hex_819 < 0) {
1329
- expectedTokenError_644(sourceText_781, iNext_813, errOut_784, "four hex digits");
1330
- return_785 = -1;
1331
- break fn_809;
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;
1332
1425
  }
1333
- t_801 = hex_819;
1334
- t_802 = t_801;
1426
+ t_520 = hex_537;
1427
+ t_521 = t_520;
1335
1428
  } else {
1336
- expectedTokenError_644(sourceText_781, iNext_813, errOut_784, "escape sequence");
1337
- return_785 = -1;
1338
- break fn_809;
1429
+ expectedTokenError_355(sourceText_500, iNext_531, errOut_503, "escape sequence");
1430
+ return_504 = -1;
1431
+ break fn_527;
1339
1432
  }
1340
- t_803 = t_802;
1433
+ t_522 = t_521;
1341
1434
  }
1342
- let decodedCp_820 = t_803;
1343
- if (leadSurrogate_810 >= 0) {
1344
- needToFlush_815 = true;
1345
- const lead_821 = leadSurrogate_810;
1346
- if (56320 <= decodedCp_820) {
1347
- t_804 = decodedCp_820 <= 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;
1348
1441
  } else {
1349
- t_804 = false;
1442
+ t_523 = false;
1350
1443
  }
1351
- if (t_804) {
1352
- leadSurrogate_810 = -1;
1353
- t_805 = (lead_821 - 55296) * 1024 | decodedCp_820 - 56320;
1354
- decodedCp_820 = 65536 + t_805;
1444
+ if (t_523) {
1445
+ leadSurrogate_528 = -1;
1446
+ decodedCp_538 = 65536 +(imul__498(lead_539 - 55296 | 0, 1024) |(decodedCp_538 - 56320 | 0)) | 0;
1355
1447
  }
1356
1448
  } else {
1357
- if (55296 <= decodedCp_820) {
1358
- t_806 = decodedCp_820 <= 56319;
1449
+ if (55296 <= decodedCp_538) {
1450
+ t_524 = decodedCp_538 <= 56319;
1359
1451
  } else {
1360
- t_806 = false;
1452
+ t_524 = false;
1361
1453
  }
1362
- if (t_806) {
1363
- needToFlush_815 = true;
1454
+ if (t_524) {
1455
+ needToFlush_533 = true;
1364
1456
  }
1365
1457
  }
1366
- if (needToFlush_815) {
1367
- sb_783[0] += sourceText_781.substring(consumed_811, i_782);
1368
- if (leadSurrogate_810 >= 0) {
1458
+ if (needToFlush_533) {
1459
+ sb_502[0] += sourceText_500.substring(consumed_529, i_501);
1460
+ if (leadSurrogate_528 >= 0) {
1369
1461
  try {
1370
- stringBuilderAppendCodePoint_822(sb_783, leadSurrogate_810);
1462
+ stringBuilderAppendCodePoint_540(sb_502, leadSurrogate_528);
1371
1463
  } catch {
1372
1464
  throw Error();
1373
1465
  }
1374
1466
  }
1375
- if (55296 <= decodedCp_820) {
1376
- t_807 = decodedCp_820 <= 56319;
1467
+ if (55296 <= decodedCp_538) {
1468
+ t_525 = decodedCp_538 <= 56319;
1377
1469
  } else {
1378
- t_807 = false;
1470
+ t_525 = false;
1379
1471
  }
1380
- if (t_807) {
1381
- leadSurrogate_810 = decodedCp_820;
1472
+ if (t_525) {
1473
+ leadSurrogate_528 = decodedCp_538;
1382
1474
  } else {
1383
- leadSurrogate_810 = -1;
1475
+ leadSurrogate_528 = -1;
1384
1476
  try {
1385
- stringBuilderAppendCodePoint_822(sb_783, decodedCp_820);
1477
+ stringBuilderAppendCodePoint_540(sb_502, decodedCp_538);
1386
1478
  } catch {
1387
1479
  throw Error();
1388
1480
  }
1389
1481
  }
1390
- consumed_811 = iNext_813;
1482
+ consumed_529 = iNext_531;
1391
1483
  }
1392
- i_782 = iNext_813;
1484
+ i_501 = iNext_531;
1393
1485
  }
1394
- if (!(sourceText_781.length > i_782)) {
1395
- t_808 = true;
1486
+ if (!(sourceText_500.length > i_501)) {
1487
+ t_526 = true;
1396
1488
  } else {
1397
- t_795 = stringGet_645(sourceText_781, i_782);
1398
- t_808 = t_795 !== 34;
1489
+ t_514 = stringGet_356(sourceText_500, i_501);
1490
+ t_526 = t_514 !== 34;
1399
1491
  }
1400
- if (t_808) {
1401
- expectedTokenError_644(sourceText_781, i_782, errOut_784, "\u0022");
1402
- return_785 = -1;
1492
+ if (t_526) {
1493
+ expectedTokenError_355(sourceText_500, i_501, errOut_503, "\u0022");
1494
+ return_504 = -1;
1403
1495
  } else {
1404
- if (leadSurrogate_810 >= 0) {
1496
+ if (leadSurrogate_528 >= 0) {
1405
1497
  try {
1406
- stringBuilderAppendCodePoint_822(sb_783, leadSurrogate_810);
1498
+ stringBuilderAppendCodePoint_540(sb_502, leadSurrogate_528);
1407
1499
  } catch {
1408
1500
  throw Error();
1409
1501
  }
1410
1502
  } else {
1411
- sb_783[0] += sourceText_781.substring(consumed_811, i_782);
1503
+ sb_502[0] += sourceText_500.substring(consumed_529, i_501);
1412
1504
  }
1413
- t_796 = stringNext_746(sourceText_781, i_782);
1414
- i_782 = t_796;
1415
- return_785 = i_782;
1505
+ t_515 = stringNext_464(sourceText_500, i_501);
1506
+ i_501 = t_515;
1507
+ return_504 = i_501;
1416
1508
  }
1417
1509
  }
1418
- return return_785;
1510
+ return return_504;
1419
1511
  }
1420
1512
  /**
1421
- * @param {string} sourceText_823
1422
- * @param {globalThis.number} i_824
1423
- * @param {JsonProducer} out_825
1513
+ * @param {string} sourceText_541
1514
+ * @param {globalThis.number} i_542
1515
+ * @param {JsonProducer} out_543
1424
1516
  * @returns {globalThis.number}
1425
1517
  */
1426
- function parseJsonObject_646(sourceText_823, i_824, out_825) {
1427
- let return_826;
1428
- let t_827;
1429
- let t_828;
1430
- let t_829;
1431
- let t_830;
1432
- let t_831;
1433
- let t_832;
1434
- let t_833;
1435
- let t_834;
1436
- let t_835;
1437
- let t_836;
1438
- let t_837;
1439
- let t_838;
1440
- let t_839;
1441
- let t_840;
1442
- let t_841;
1443
- let t_842;
1444
- let t_843;
1445
- let t_844;
1446
- let t_845;
1447
- let t_846;
1448
- let t_847;
1449
- let t_848;
1450
- fn_849: {
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: {
1451
1542
  try {
1452
- if (!(sourceText_823.length > i_824)) {
1453
- t_841 = true;
1543
+ if (!(sourceText_541.length > i_542)) {
1544
+ t_558 = true;
1454
1545
  } else {
1455
- t_827 = stringGet_645(sourceText_823, i_824);
1456
- t_841 = t_827 !== 123;
1546
+ t_545 = stringGet_356(sourceText_541, i_542);
1547
+ t_558 = t_545 !== 123;
1457
1548
  }
1458
- if (t_841) {
1459
- expectedTokenError_644(sourceText_823, i_824, out_825, "'{'");
1460
- return_826 = -1;
1461
- break fn_849;
1549
+ if (t_558) {
1550
+ expectedTokenError_355(sourceText_541, i_542, out_543, "'{'");
1551
+ return_544 = -1;
1552
+ break fn_566;
1462
1553
  }
1463
- out_825.startObject();
1464
- t_828 = stringNext_746(sourceText_823, i_824);
1465
- t_829 = skipJsonSpaces_643(sourceText_823, t_828);
1466
- i_824 = t_829;
1467
- if (sourceText_823.length > i_824) {
1468
- t_830 = stringGet_645(sourceText_823, i_824);
1469
- t_842 = t_830 !== 125;
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;
1470
1561
  } else {
1471
- t_842 = false;
1562
+ t_559 = false;
1472
1563
  }
1473
- if (t_842) {
1564
+ if (t_559) {
1474
1565
  while (true) {
1475
- const keyBuffer_850 = [""];
1476
- const afterKey_851 = parseJsonStringTo_780(sourceText_823, i_824, keyBuffer_850, out_825);
1477
- if (!(afterKey_851 >= 0)) {
1478
- return_826 = -1;
1479
- break fn_849;
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;
1480
1571
  }
1481
- t_831 = keyBuffer_850[0];
1482
- out_825.objectKey(t_831);
1572
+ t_549 = keyBuffer_567[0];
1573
+ out_543.objectKey(t_549);
1483
1574
  try {
1484
- t_843 = requireStringIndex__852(afterKey_851);
1485
- t_844 = t_843;
1575
+ t_560 = requireStringIndex_569(afterKey_568);
1576
+ t_561 = t_560;
1486
1577
  } catch {
1487
- t_832 = panic_586();
1488
- t_844 = t_832;
1578
+ t_561 = panic_294();
1489
1579
  }
1490
- t_833 = skipJsonSpaces_643(sourceText_823, t_844);
1491
- i_824 = t_833;
1492
- if (sourceText_823.length > i_824) {
1493
- t_834 = stringGet_645(sourceText_823, i_824);
1494
- t_845 = t_834 === 58;
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;
1495
1585
  } else {
1496
- t_845 = false;
1586
+ t_562 = false;
1497
1587
  }
1498
- if (t_845) {
1499
- t_835 = stringNext_746(sourceText_823, i_824);
1500
- i_824 = t_835;
1501
- const afterPropertyValue_853 = parseJsonValue_634(sourceText_823, i_824, out_825);
1502
- if (!(afterPropertyValue_853 >= 0)) {
1503
- return_826 = -1;
1504
- break fn_849;
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;
1505
1595
  }
1506
- t_846 = requireStringIndex__852(afterPropertyValue_853);
1507
- i_824 = t_846;
1596
+ t_563 = requireStringIndex_569(afterPropertyValue_570);
1597
+ i_542 = t_563;
1508
1598
  } else {
1509
- expectedTokenError_644(sourceText_823, i_824, out_825, "':'");
1510
- return_826 = -1;
1511
- break fn_849;
1599
+ expectedTokenError_355(sourceText_541, i_542, out_543, "':'");
1600
+ return_544 = -1;
1601
+ break fn_566;
1512
1602
  }
1513
- t_836 = skipJsonSpaces_643(sourceText_823, i_824);
1514
- i_824 = t_836;
1515
- if (sourceText_823.length > i_824) {
1516
- t_837 = stringGet_645(sourceText_823, i_824);
1517
- t_847 = t_837 === 44;
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;
1518
1608
  } else {
1519
- t_847 = false;
1609
+ t_564 = false;
1520
1610
  }
1521
- if (t_847) {
1522
- t_838 = stringNext_746(sourceText_823, i_824);
1523
- t_839 = skipJsonSpaces_643(sourceText_823, t_838);
1524
- i_824 = t_839;
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;
1525
1615
  } else {
1526
1616
  break;
1527
1617
  }
1528
1618
  }
1529
1619
  }
1530
- if (sourceText_823.length > i_824) {
1531
- t_840 = stringGet_645(sourceText_823, i_824);
1532
- t_848 = t_840 === 125;
1620
+ if (sourceText_541.length > i_542) {
1621
+ t_557 = stringGet_356(sourceText_541, i_542);
1622
+ t_565 = t_557 === 125;
1533
1623
  } else {
1534
- t_848 = false;
1624
+ t_565 = false;
1535
1625
  }
1536
- if (t_848) {
1537
- out_825.endObject();
1538
- return_826 = stringNext_746(sourceText_823, i_824);
1626
+ if (t_565) {
1627
+ out_543.endObject();
1628
+ return_544 = stringNext_464(sourceText_541, i_542);
1539
1629
  } else {
1540
- expectedTokenError_644(sourceText_823, i_824, out_825, "'}'");
1541
- return_826 = -1;
1630
+ expectedTokenError_355(sourceText_541, i_542, out_543, "'}'");
1631
+ return_544 = -1;
1542
1632
  }
1543
1633
  } catch {
1544
- return_826 = panic_586();
1634
+ return_544 = panic_294();
1545
1635
  }
1546
1636
  }
1547
- return return_826;
1637
+ return return_544;
1548
1638
  }
1549
1639
  /**
1550
- * @param {string} sourceText_854
1551
- * @param {globalThis.number} i_855
1552
- * @param {JsonProducer} out_856
1640
+ * @param {string} sourceText_571
1641
+ * @param {globalThis.number} i_572
1642
+ * @param {JsonProducer} out_573
1553
1643
  * @returns {globalThis.number}
1554
1644
  */
1555
- function parseJsonArray_647(sourceText_854, i_855, out_856) {
1556
- let return_857;
1557
- let t_858;
1558
- let t_859;
1559
- let t_860;
1560
- let t_861;
1561
- let t_862;
1562
- let t_863;
1563
- let t_864;
1564
- let t_865;
1565
- let t_866;
1566
- let t_867;
1567
- let t_868;
1568
- let t_869;
1569
- let t_870;
1570
- let t_871;
1571
- fn_872: {
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: {
1572
1662
  try {
1573
- if (!(sourceText_854.length > i_855)) {
1574
- t_867 = true;
1663
+ if (!(sourceText_571.length > i_572)) {
1664
+ t_584 = true;
1575
1665
  } else {
1576
- t_858 = stringGet_645(sourceText_854, i_855);
1577
- t_867 = t_858 !== 91;
1666
+ t_575 = stringGet_356(sourceText_571, i_572);
1667
+ t_584 = t_575 !== 91;
1578
1668
  }
1579
- if (t_867) {
1580
- expectedTokenError_644(sourceText_854, i_855, out_856, "'['");
1581
- return_857 = -1;
1582
- break fn_872;
1669
+ if (t_584) {
1670
+ expectedTokenError_355(sourceText_571, i_572, out_573, "'['");
1671
+ return_574 = -1;
1672
+ break fn_589;
1583
1673
  }
1584
- out_856.startArray();
1585
- t_859 = stringNext_746(sourceText_854, i_855);
1586
- t_860 = skipJsonSpaces_643(sourceText_854, t_859);
1587
- i_855 = t_860;
1588
- if (sourceText_854.length > i_855) {
1589
- t_861 = stringGet_645(sourceText_854, i_855);
1590
- t_868 = t_861 !== 93;
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;
1591
1681
  } else {
1592
- t_868 = false;
1682
+ t_585 = false;
1593
1683
  }
1594
- if (t_868) {
1684
+ if (t_585) {
1595
1685
  while (true) {
1596
- const afterElementValue_873 = parseJsonValue_634(sourceText_854, i_855, out_856);
1597
- if (!(afterElementValue_873 >= 0)) {
1598
- return_857 = -1;
1599
- break fn_872;
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;
1600
1690
  }
1601
- t_869 = requireStringIndex__852(afterElementValue_873);
1602
- i_855 = t_869;
1603
- t_862 = skipJsonSpaces_643(sourceText_854, i_855);
1604
- i_855 = t_862;
1605
- if (sourceText_854.length > i_855) {
1606
- t_863 = stringGet_645(sourceText_854, i_855);
1607
- t_870 = t_863 === 44;
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;
1608
1698
  } else {
1609
- t_870 = false;
1699
+ t_587 = false;
1610
1700
  }
1611
- if (t_870) {
1612
- t_864 = stringNext_746(sourceText_854, i_855);
1613
- t_865 = skipJsonSpaces_643(sourceText_854, t_864);
1614
- i_855 = t_865;
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;
1615
1705
  } else {
1616
1706
  break;
1617
1707
  }
1618
1708
  }
1619
1709
  }
1620
- if (sourceText_854.length > i_855) {
1621
- t_866 = stringGet_645(sourceText_854, i_855);
1622
- t_871 = t_866 === 93;
1710
+ if (sourceText_571.length > i_572) {
1711
+ t_583 = stringGet_356(sourceText_571, i_572);
1712
+ t_588 = t_583 === 93;
1623
1713
  } else {
1624
- t_871 = false;
1714
+ t_588 = false;
1625
1715
  }
1626
- if (t_871) {
1627
- out_856.endArray();
1628
- return_857 = stringNext_746(sourceText_854, i_855);
1716
+ if (t_588) {
1717
+ out_573.endArray();
1718
+ return_574 = stringNext_464(sourceText_571, i_572);
1629
1719
  } else {
1630
- expectedTokenError_644(sourceText_854, i_855, out_856, "']'");
1631
- return_857 = -1;
1720
+ expectedTokenError_355(sourceText_571, i_572, out_573, "']'");
1721
+ return_574 = -1;
1632
1722
  }
1633
1723
  } catch {
1634
- return_857 = panic_586();
1724
+ return_574 = panic_294();
1635
1725
  }
1636
1726
  }
1637
- return return_857;
1727
+ return return_574;
1638
1728
  }
1639
1729
  /**
1640
- * @param {string} sourceText_874
1641
- * @param {globalThis.number} i_875
1642
- * @param {JsonProducer} out_876
1730
+ * @param {string} sourceText_591
1731
+ * @param {globalThis.number} i_592
1732
+ * @param {JsonProducer} out_593
1643
1733
  * @returns {globalThis.number}
1644
1734
  */
1645
- function parseJsonString_648(sourceText_874, i_875, out_876) {
1646
- let t_877;
1647
- const sb_878 = [""];
1648
- const after_879 = parseJsonStringTo_780(sourceText_874, i_875, sb_878, out_876);
1649
- if (after_879 >= 0) {
1650
- t_877 = sb_878[0];
1651
- out_876.stringValue(t_877);
1652
- }
1653
- return after_879;
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;
1654
1744
  }
1655
1745
  /**
1656
- * @param {string} string_881
1657
- * @param {globalThis.number} inString_882
1658
- * @param {string} substring_883
1746
+ * @param {string} string_598
1747
+ * @param {globalThis.number} inString_599
1748
+ * @param {string} substring_600
1659
1749
  * @returns {globalThis.number}
1660
1750
  */
1661
- function afterSubstring_880(string_881, inString_882, substring_883) {
1662
- let return_884;
1663
- let t_885;
1664
- let t_886;
1665
- fn_887: {
1666
- let i_888 = inString_882;
1667
- let j_889 = 0;
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;
1668
1758
  while (true) {
1669
- if (!(substring_883.length > j_889)) {
1759
+ if (!(substring_600.length > j_606)) {
1670
1760
  break;
1671
1761
  }
1672
- if (!(string_881.length > i_888)) {
1673
- return_884 = -1;
1674
- break fn_887;
1762
+ if (!(string_598.length > i_605)) {
1763
+ return_601 = -1;
1764
+ break fn_604;
1675
1765
  }
1676
- if (stringGet_645(string_881, i_888) !== stringGet_645(substring_883, j_889)) {
1677
- return_884 = -1;
1678
- break fn_887;
1766
+ if (stringGet_356(string_598, i_605) !== stringGet_356(substring_600, j_606)) {
1767
+ return_601 = -1;
1768
+ break fn_604;
1679
1769
  }
1680
- t_885 = stringNext_746(string_881, i_888);
1681
- i_888 = t_885;
1682
- t_886 = stringNext_746(substring_883, j_889);
1683
- j_889 = t_886;
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;
1684
1774
  }
1685
- return_884 = i_888;
1775
+ return_601 = i_605;
1686
1776
  }
1687
- return return_884;
1777
+ return return_601;
1688
1778
  }
1689
1779
  /**
1690
- * @param {string} sourceText_890
1691
- * @param {globalThis.number} i_891
1692
- * @param {JsonProducer} out_892
1780
+ * @param {string} sourceText_607
1781
+ * @param {globalThis.number} i_608
1782
+ * @param {JsonProducer} out_609
1693
1783
  * @returns {globalThis.number}
1694
1784
  */
1695
- function parseJsonBoolean_649(sourceText_890, i_891, out_892) {
1696
- let return_893;
1697
- let t_894;
1698
- fn_895: {
1699
- let ch0_896;
1700
- if (sourceText_890.length > i_891) {
1701
- t_894 = stringGet_645(sourceText_890, i_891);
1702
- ch0_896 = t_894;
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;
1703
1793
  } else {
1704
- ch0_896 = 0;
1705
- }
1706
- const end_897 = sourceText_890.length;
1707
- let keyword_898;
1708
- let n_899;
1709
- if (ch0_896 === 102) {
1710
- keyword_898 = "false";
1711
- n_899 = 5;
1712
- } else if (ch0_896 === 116) {
1713
- keyword_898 = "true";
1714
- n_899 = 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;
1715
1805
  } else {
1716
- keyword_898 = null;
1717
- n_899 = 0;
1718
- }
1719
- if (!(keyword_898 == null)) {
1720
- const keyword_900 = keyword_898;
1721
- if (stringHasAtLeast_817(sourceText_890, i_891, end_897, n_899)) {
1722
- const after_901 = afterSubstring_880(sourceText_890, i_891, keyword_900);
1723
- if (after_901 >= 0) {
1724
- return_893 = requireStringIndex__852(after_901);
1725
- out_892.booleanValue(n_899 === 4);
1726
- break fn_895;
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;
1727
1817
  }
1728
1818
  }
1729
1819
  }
1730
- expectedTokenError_644(sourceText_890, i_891, out_892, "`false` or `true`");
1731
- return_893 = -1;
1820
+ expectedTokenError_355(sourceText_607, i_608, out_609, "`false` or `true`");
1821
+ return_610 = -1;
1732
1822
  }
1733
- return return_893;
1823
+ return return_610;
1734
1824
  }
1735
1825
  /**
1736
- * @param {string} sourceText_902
1737
- * @param {globalThis.number} i_903
1738
- * @param {JsonProducer} out_904
1826
+ * @param {string} sourceText_619
1827
+ * @param {globalThis.number} i_620
1828
+ * @param {JsonProducer} out_621
1739
1829
  * @returns {globalThis.number}
1740
1830
  */
1741
- function parseJsonNull_650(sourceText_902, i_903, out_904) {
1742
- let return_905;
1743
- fn_906: {
1744
- const after_907 = afterSubstring_880(sourceText_902, i_903, "null");
1745
- if (after_907 >= 0) {
1746
- return_905 = requireStringIndex__852(after_907);
1747
- out_904.nullValue();
1748
- break fn_906;
1749
- }
1750
- expectedTokenError_644(sourceText_902, i_903, out_904, "`null`");
1751
- return_905 = -1;
1752
- }
1753
- return return_905;
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;
1754
1844
  }
1755
1845
  /**
1756
- * @param {string} sourceText_908
1757
- * @param {globalThis.number} i_909
1758
- * @param {JsonProducer} out_910
1846
+ * @param {string} sourceText_625
1847
+ * @param {globalThis.number} i_626
1848
+ * @param {JsonProducer} out_627
1759
1849
  * @returns {globalThis.number}
1760
1850
  */
1761
- function parseJsonNumber_651(sourceText_908, i_909, out_910) {
1762
- let return_911;
1763
- let t_912;
1764
- let t_913;
1765
- let t_914;
1766
- let t_915;
1767
- let t_916;
1768
- let t_917;
1769
- let t_918;
1770
- let t_919;
1771
- let t_920;
1772
- let t_921;
1773
- let t_922;
1774
- let t_923;
1775
- let t_924;
1776
- let t_925;
1777
- let t_926;
1778
- let t_927;
1779
- let t_928;
1780
- let t_929;
1781
- let t_930;
1782
- let t_931;
1783
- let t_932;
1784
- let t_933;
1785
- let t_934;
1786
- let t_935;
1787
- let t_936;
1788
- let t_937;
1789
- let t_938;
1790
- let t_939;
1791
- let t_940;
1792
- let t_941;
1793
- let t_942;
1794
- let t_943;
1795
- let t_944;
1796
- let t_945;
1797
- let t_946;
1798
- let t_947;
1799
- let t_948;
1800
- let t_949;
1801
- fn_950: {
1802
- try {
1803
- let isNegative_951 = false;
1804
- const startOfNumber_952 = i_909;
1805
- if (sourceText_908.length > i_909) {
1806
- t_912 = stringGet_645(sourceText_908, i_909);
1807
- t_925 = t_912 === 45;
1808
- } else {
1809
- t_925 = false;
1810
- }
1811
- if (t_925) {
1812
- isNegative_951 = true;
1813
- t_913 = stringNext_746(sourceText_908, i_909);
1814
- i_909 = t_913;
1815
- }
1816
- let digit0_953;
1817
- if (sourceText_908.length > i_909) {
1818
- t_914 = stringGet_645(sourceText_908, i_909);
1819
- digit0_953 = t_914;
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;
1898
+ } else {
1899
+ t_647 = false;
1900
+ }
1901
+ if (t_647) {
1902
+ isNegative_669 = true;
1903
+ t_630 = stringNext_464(sourceText_625, i_626);
1904
+ i_626 = t_630;
1905
+ }
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;
1910
+ } else {
1911
+ digit0_671 = -1;
1912
+ }
1913
+ if (digit0_671 < 48) {
1914
+ t_648 = true;
1915
+ } else {
1916
+ t_648 = 57 < digit0_671;
1917
+ }
1918
+ if (t_648) {
1919
+ let error_672;
1920
+ if (! isNegative_669) {
1921
+ t_649 = digit0_671 !== 46;
1820
1922
  } else {
1821
- digit0_953 = -1;
1923
+ t_649 = false;
1822
1924
  }
1823
- if (digit0_953 < 48) {
1824
- t_926 = true;
1925
+ if (t_649) {
1926
+ error_672 = "JSON value";
1825
1927
  } else {
1826
- t_926 = 57 < digit0_953;
1928
+ error_672 = "digit";
1827
1929
  }
1828
- if (t_926) {
1829
- let error_954;
1830
- if (! isNegative_951) {
1831
- t_927 = digit0_953 !== 46;
1832
- } else {
1833
- t_927 = false;
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) {
1943
+ while (true) {
1944
+ if (!(sourceText_625.length > i_626)) {
1945
+ break;
1834
1946
  }
1835
- if (t_927) {
1836
- error_954 = "JSON value";
1947
+ const possibleDigit_677 = stringGet_356(sourceText_625, i_626);
1948
+ if (48 <= possibleDigit_677) {
1949
+ t_650 = possibleDigit_677 <= 57;
1837
1950
  } else {
1838
- error_954 = "digit";
1951
+ t_650 = false;
1839
1952
  }
1840
- expectedTokenError_644(sourceText_908, i_909, out_910, error_954);
1841
- return_911 = -1;
1842
- break fn_950;
1843
- }
1844
- t_915 = stringNext_746(sourceText_908, i_909);
1845
- i_909 = t_915;
1846
- let nDigits_955 = 1;
1847
- try {
1848
- t_928 = digit0_953 - 48;
1849
- t_929 = t_928;
1850
- } catch {
1851
- t_916 = panic_586();
1852
- t_929 = t_916;
1853
- }
1854
- let tentativeValue_956 = t_929;
1855
- if (48 !== digit0_953) {
1856
- while (true) {
1857
- if (!(sourceText_908.length > i_909)) {
1858
- break;
1859
- }
1860
- const possibleDigit_957 = stringGet_645(sourceText_908, i_909);
1861
- if (48 <= possibleDigit_957) {
1862
- t_930 = possibleDigit_957 <= 57;
1863
- } else {
1864
- t_930 = false;
1865
- }
1866
- if (t_930) {
1867
- t_917 = stringNext_746(sourceText_908, i_909);
1868
- i_909 = t_917;
1869
- nDigits_955 = nDigits_955 + 1;
1870
- t_932 = tentativeValue_956 * 10.0;
1871
- t_931 = possibleDigit_957 - 48;
1872
- tentativeValue_956 = t_932 + t_931;
1873
- } else {
1874
- break;
1875
- }
1876
- }
1877
- }
1878
- let nDigitsAfterPoint_958 = 0;
1879
- if (sourceText_908.length > i_909) {
1880
- t_918 = stringGet_645(sourceText_908, i_909);
1881
- t_933 = 46 === t_918;
1882
- } else {
1883
- t_933 = false;
1884
- }
1885
- if (t_933) {
1886
- t_919 = stringNext_746(sourceText_908, i_909);
1887
- i_909 = t_919;
1888
- const afterPoint_959 = i_909;
1889
- while (true) {
1890
- if (!(sourceText_908.length > i_909)) {
1891
- break;
1892
- }
1893
- const possibleDigit_960 = stringGet_645(sourceText_908, i_909);
1894
- if (48 <= possibleDigit_960) {
1895
- t_934 = possibleDigit_960 <= 57;
1896
- } else {
1897
- t_934 = false;
1898
- }
1899
- if (t_934) {
1900
- t_920 = stringNext_746(sourceText_908, i_909);
1901
- i_909 = t_920;
1902
- nDigits_955 = nDigits_955 + 1;
1903
- nDigitsAfterPoint_958 = nDigitsAfterPoint_958 + 1;
1904
- t_936 = tentativeValue_956 * 10.0;
1905
- t_935 = possibleDigit_960 - 48;
1906
- tentativeValue_956 = t_936 + t_935;
1907
- } else {
1908
- break;
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
+ }
1909
1979
  }
1980
+ } else {
1981
+ break;
1910
1982
  }
1911
- if (i_909 === afterPoint_959) {
1912
- expectedTokenError_644(sourceText_908, i_909, out_910, "digit");
1913
- return_911 = -1;
1914
- break fn_950;
1915
- }
1916
- }
1917
- let nExponentDigits_961 = 0;
1918
- if (sourceText_908.length > i_909) {
1919
- t_937 = stringGet_645(sourceText_908, i_909) | 32;
1920
- t_938 = 101 === t_937;
1921
- } else {
1922
- t_938 = false;
1923
1983
  }
1924
- if (t_938) {
1925
- t_921 = stringNext_746(sourceText_908, i_909);
1926
- i_909 = t_921;
1927
- if (!(sourceText_908.length > i_909)) {
1928
- expectedTokenError_644(sourceText_908, i_909, out_910, "sign or digit");
1929
- return_911 = -1;
1930
- break fn_950;
1984
+ }
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;
1989
+ } else {
1990
+ t_655 = false;
1991
+ }
1992
+ if (t_655) {
1993
+ t_639 = stringNext_464(sourceText_625, i_626);
1994
+ i_626 = t_639;
1995
+ const afterPoint_682 = i_626;
1996
+ while (true) {
1997
+ if (!(sourceText_625.length > i_626)) {
1998
+ break;
1931
1999
  }
1932
- const afterE_962 = stringGet_645(sourceText_908, i_909);
1933
- if (afterE_962 === 43) {
1934
- t_939 = true;
2000
+ const possibleDigit_683 = stringGet_356(sourceText_625, i_626);
2001
+ if (48 <= possibleDigit_683) {
2002
+ t_656 = possibleDigit_683 <= 57;
1935
2003
  } else {
1936
- t_939 = afterE_962 === 45;
1937
- }
1938
- if (t_939) {
1939
- t_922 = stringNext_746(sourceText_908, i_909);
1940
- i_909 = t_922;
2004
+ t_656 = false;
1941
2005
  }
1942
- while (true) {
1943
- if (!(sourceText_908.length > i_909)) {
1944
- break;
1945
- }
1946
- const possibleDigit_963 = stringGet_645(sourceText_908, i_909);
1947
- if (48 <= possibleDigit_963) {
1948
- t_940 = possibleDigit_963 <= 57;
1949
- } else {
1950
- t_940 = false;
1951
- }
1952
- if (t_940) {
1953
- t_923 = stringNext_746(sourceText_908, i_909);
1954
- i_909 = t_923;
1955
- nExponentDigits_961 = nExponentDigits_961 + 1;
1956
- } else {
1957
- break;
1958
- }
1959
- }
1960
- if (nExponentDigits_961 === 0) {
1961
- expectedTokenError_644(sourceText_908, i_909, out_910, "exponent digit");
1962
- return_911 = -1;
1963
- break fn_950;
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;
2014
+ } else {
2015
+ break;
1964
2016
  }
1965
2017
  }
1966
- const afterExponent_964 = i_909;
1967
- if (nExponentDigits_961 === 0) {
1968
- t_941 = nDigitsAfterPoint_958 === 0;
2018
+ if (i_626 === afterPoint_682) {
2019
+ expectedTokenError_355(sourceText_625, i_626, out_627, "digit");
2020
+ return_628 = -1;
2021
+ break fn_668;
2022
+ }
2023
+ }
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);
2028
+ } else {
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;
2038
+ }
2039
+ const afterE_685 = stringGet_356(sourceText_625, i_626);
2040
+ if (afterE_685 === 43) {
2041
+ t_659 = true;
1969
2042
  } else {
1970
- t_941 = false;
2043
+ t_659 = afterE_685 === 45;
1971
2044
  }
1972
- if (t_941) {
1973
- let value_965;
1974
- if (isNegative_951) {
1975
- value_965 = - tentativeValue_956;
1976
- } else {
1977
- value_965 = tentativeValue_956;
2045
+ if (t_659) {
2046
+ t_644 = stringNext_464(sourceText_625, i_626);
2047
+ i_626 = t_644;
2048
+ }
2049
+ while (true) {
2050
+ if (!(sourceText_625.length > i_626)) {
2051
+ break;
1978
2052
  }
1979
- if (nDigits_955 <= 10) {
1980
- if (cmpFloat__966(-2.147483648E9, value_965) <= 0) {
1981
- t_942 = cmpFloat__966(value_965, 2.147483647E9) <= 0;
1982
- } else {
1983
- t_942 = false;
1984
- }
1985
- t_943 = t_942;
2053
+ const possibleDigit_686 = stringGet_356(sourceText_625, i_626);
2054
+ if (48 <= possibleDigit_686) {
2055
+ t_660 = possibleDigit_686 <= 57;
1986
2056
  } else {
1987
- t_943 = false;
2057
+ t_660 = false;
1988
2058
  }
1989
- if (t_943) {
1990
- try {
1991
- t_944 = float64ToInt_475(value_965);
1992
- t_945 = t_944;
1993
- } catch {
1994
- t_924 = panic_586();
1995
- t_945 = t_924;
1996
- }
1997
- out_910.intValue(t_945);
1998
- return_911 = i_909;
1999
- break fn_950;
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;
2063
+ } else {
2064
+ break;
2000
2065
  }
2001
2066
  }
2002
- const numericTokenString_967 = sourceText_908.substring(startOfNumber_952, i_909);
2003
- let doubleValue_968 = NaN;
2004
- if (nExponentDigits_961 !== 0) {
2005
- t_946 = true;
2067
+ if (nExponentDigits_684 === 0) {
2068
+ expectedTokenError_355(sourceText_625, i_626, out_627, "exponent digit");
2069
+ return_628 = -1;
2070
+ break fn_668;
2071
+ }
2072
+ }
2073
+ const afterExponent_687 = i_626;
2074
+ if (nExponentDigits_684 === 0) {
2075
+ if (nDigitsAfterPoint_681 === 0) {
2076
+ t_661 = ! overflowInt64_676;
2006
2077
  } else {
2007
- t_946 = nDigitsAfterPoint_958 !== 0;
2078
+ t_661 = false;
2008
2079
  }
2009
- if (t_946) {
2010
- try {
2011
- t_947 = stringToFloat64_488(numericTokenString_967);
2012
- doubleValue_968 = t_947;
2013
- } catch {
2014
- }
2080
+ t_662 = t_661;
2081
+ } else {
2082
+ t_662 = false;
2083
+ }
2084
+ if (t_662) {
2085
+ let value_688;
2086
+ if (isNegative_669) {
2087
+ value_688 = clampInt64__680(- tentativeInt64_675);
2088
+ } else {
2089
+ value_688 = tentativeInt64_675;
2015
2090
  }
2016
- if (cmpFloat__966(doubleValue_968, -Infinity) !== 0) {
2017
- if (cmpFloat__966(doubleValue_968, Infinity) !== 0) {
2018
- t_948 = cmpFloat__966(doubleValue_968, NaN) !== 0;
2019
- } else {
2020
- t_948 = false;
2021
- }
2022
- t_949 = t_948;
2091
+ if (BigInt("-2147483648") <= value_688) {
2092
+ t_663 = value_688 <= BigInt("2147483647");
2023
2093
  } else {
2024
- t_949 = false;
2094
+ t_663 = false;
2025
2095
  }
2026
- if (t_949) {
2027
- out_910.float64Value(doubleValue_968);
2096
+ if (t_663) {
2097
+ t_646 = int64ToInt32Unsafe_689(value_688);
2098
+ out_627.int32Value(t_646);
2028
2099
  } else {
2029
- out_910.numericTokenValue(numericTokenString_967);
2100
+ out_627.int64Value(value_688);
2030
2101
  }
2031
- return_911 = i_909;
2032
- } catch {
2033
- return_911 = panic_586();
2102
+ return_628 = i_626;
2103
+ break fn_668;
2104
+ }
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;
2109
+ } else {
2110
+ t_664 = nDigitsAfterPoint_681 !== 0;
2111
+ }
2112
+ if (t_664) {
2113
+ try {
2114
+ t_665 = stringToFloat64_192(numericTokenString_690);
2115
+ doubleValue_691 = t_665;
2116
+ } catch {
2117
+ }
2118
+ }
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;
2122
+ } else {
2123
+ t_666 = false;
2124
+ }
2125
+ t_667 = t_666;
2126
+ } else {
2127
+ t_667 = false;
2034
2128
  }
2129
+ if (t_667) {
2130
+ out_627.float64Value(doubleValue_691);
2131
+ } else {
2132
+ out_627.numericTokenValue(numericTokenString_690);
2133
+ }
2134
+ return_628 = i_626;
2035
2135
  }
2036
- return return_911;
2136
+ return return_628;
2037
2137
  }
2038
2138
  /**
2039
- * @param {string} sourceText_969
2040
- * @param {JsonProducer} out_970
2139
+ * @param {string} sourceText_693
2140
+ * @param {JsonProducer} out_694
2041
2141
  */
2042
- export function parseJsonToProducer(sourceText_969, out_970) {
2043
- let t_971;
2044
- let t_972;
2045
- let t_973;
2046
- let t_974;
2047
- let t_975;
2048
- let t_976;
2049
- let i_977 = 0;
2050
- const afterValue_978 = parseJsonValue_634(sourceText_969, i_977, out_970);
2051
- if (afterValue_978 >= 0) {
2052
- t_976 = requireStringIndex__852(afterValue_978);
2053
- t_971 = skipJsonSpaces_643(sourceText_969, t_976);
2054
- i_977 = t_971;
2055
- if (sourceText_969.length > i_977) {
2056
- t_972 = out_970.parseErrorReceiver;
2057
- t_975 = !(t_972 == null);
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);
2058
2158
  } else {
2059
- t_975 = false;
2159
+ t_699 = false;
2060
2160
  }
2061
- if (t_975) {
2062
- t_973 = sourceText_969.length;
2063
- t_974 = sourceText_969.substring(i_977, t_973);
2064
- storeJsonError_747(out_970, "Extraneous JSON `" + t_974 + "`");
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 + "`");
2065
2165
  }
2066
2166
  }
2067
2167
  return;
2068
2168
  };
2069
2169
  /**
2070
- * @param {string} sourceText_979
2170
+ * @param {string} sourceText_703
2071
2171
  * @returns {JsonSyntaxTree}
2072
2172
  */
2073
- export function parseJson(sourceText_979) {
2074
- const p_980 = new JsonSyntaxTreeProducer();
2075
- parseJsonToProducer(sourceText_979, p_980);
2076
- return p_980.toJsonSyntaxTree();
2173
+ export function parseJson(sourceText_703) {
2174
+ const p_704 = new JsonSyntaxTreeProducer();
2175
+ parseJsonToProducer(sourceText_703, p_704);
2176
+ return p_704.toJsonSyntaxTree();
2077
2177
  };
2078
2178
  /** @returns {JsonAdapter<boolean>} */
2079
2179
  export function booleanJsonAdapter() {
2080
- return new BooleanJsonAdapter_659();
2180
+ return new BooleanJsonAdapter_370();
2081
2181
  };
2082
2182
  /** @returns {JsonAdapter<number>} */
2083
2183
  export function float64JsonAdapter() {
2084
- return new Float64JsonAdapter_667();
2184
+ return new Float64JsonAdapter_378();
2085
2185
  };
2086
2186
  /** @returns {JsonAdapter<number>} */
2087
- export function intJsonAdapter() {
2088
- return new IntJsonAdapter_675();
2187
+ export function int32JsonAdapter() {
2188
+ return new Int32JsonAdapter_386();
2189
+ };
2190
+ /** @returns {JsonAdapter<bigint>} */
2191
+ export function int64JsonAdapter() {
2192
+ return new Int64JsonAdapter_394();
2089
2193
  };
2090
2194
  /** @returns {JsonAdapter<string>} */
2091
2195
  export function stringJsonAdapter() {
2092
- return new StringJsonAdapter_683();
2196
+ return new StringJsonAdapter_402();
2093
2197
  };
2094
2198
  /**
2095
- * @template {unknown} T_982
2096
- * @param {JsonAdapter<T_982>} adapterForT_981
2097
- * @returns {JsonAdapter<Array<T_982>>}
2199
+ * @template {unknown} T_706
2200
+ * @param {JsonAdapter<T_706>} adapterForT_705
2201
+ * @returns {JsonAdapter<Array<T_706>>}
2098
2202
  */
2099
- export function listJsonAdapter(adapterForT_981) {
2100
- return new ListJsonAdapter_691(adapterForT_981);
2203
+ export function listJsonAdapter(adapterForT_705) {
2204
+ return new ListJsonAdapter_410(adapterForT_705);
2101
2205
  };