@dhis2/expression-parser 1.1.5 → 1.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/Kotlin-DateTime-library-kotlinx-datetime.js +2619 -0
  2. package/Kotlin-DateTime-library-kotlinx-datetime.js.map +1 -0
  3. package/Kotlin-DateTime-library-kotlinx-datetime.mjs +2620 -0
  4. package/Kotlin-DateTime-library-kotlinx-datetime.mjs.map +1 -0
  5. package/{KotlinBigInteger-bignum-js-ir.js → KotlinBigInteger-bignum.js} +2019 -1854
  6. package/KotlinBigInteger-bignum.js.map +1 -0
  7. package/{KotlinBigInteger-bignum-js-ir.mjs → KotlinBigInteger-bignum.mjs} +1969 -1804
  8. package/KotlinBigInteger-bignum.mjs.map +1 -0
  9. package/README.md +11 -0
  10. package/expression-parser.d.ts +13 -13
  11. package/expression-parser.js +5425 -3155
  12. package/expression-parser.js.map +1 -1
  13. package/expression-parser.mjs +5463 -3193
  14. package/expression-parser.mjs.map +1 -1
  15. package/kotlin-js.js +73 -49
  16. package/kotlin-js.js.map +1 -1
  17. package/kotlin-js.mjs +67 -43
  18. package/kotlin-js.mjs.map +1 -1
  19. package/kotlin-kotlin-stdlib.js +6144 -6147
  20. package/kotlin-kotlin-stdlib.js.map +1 -1
  21. package/kotlin-kotlin-stdlib.mjs +6022 -6025
  22. package/kotlin-kotlin-stdlib.mjs.map +1 -1
  23. package/kotlin-plugins-js-plain-objects-runtime.js +8 -0
  24. package/{kotlinx-serialization-kotlinx-serialization-core-js-ir.mjs.map → kotlin-plugins-js-plain-objects-runtime.js.map} +1 -1
  25. package/kotlin-plugins-js-plain-objects-runtime.mjs +4 -0
  26. package/{kotlinx-serialization-kotlinx-serialization-core-js-ir.js.map → kotlin-plugins-js-plain-objects-runtime.mjs.map} +1 -1
  27. package/{kotlinx-serialization-kotlinx-serialization-core-js-ir.js → kotlinx-serialization-kotlinx-serialization-core.js} +3 -4
  28. package/kotlinx-serialization-kotlinx-serialization-core.js.map +1 -0
  29. package/{kotlinx-serialization-kotlinx-serialization-core-js-ir.mjs → kotlinx-serialization-kotlinx-serialization-core.mjs} +3 -4
  30. package/kotlinx-serialization-kotlinx-serialization-core.mjs.map +1 -0
  31. package/package.json +2 -1
  32. package/seskar-core.js +3 -0
  33. package/seskar-core.js.map +1 -1
  34. package/seskar-core.mjs +3 -0
  35. package/seskar-core.mjs.map +1 -1
  36. package/Kotlin-DateTime-library-kotlinx-datetime-js-ir.js +0 -583
  37. package/Kotlin-DateTime-library-kotlinx-datetime-js-ir.js.map +0 -1
  38. package/Kotlin-DateTime-library-kotlinx-datetime-js-ir.mjs +0 -584
  39. package/Kotlin-DateTime-library-kotlinx-datetime-js-ir.mjs.map +0 -1
  40. package/KotlinBigInteger-bignum-js-ir.js.map +0 -1
  41. package/KotlinBigInteger-bignum-js-ir.mjs.map +0 -1
@@ -0,0 +1,2620 @@
1
+ import {
2
+ LocalDate as LocalDate,
3
+ ChronoUnit as ChronoUnit,
4
+ LocalDateTime as LocalDateTime,
5
+ ZoneOffset as ZoneOffset,
6
+ ZoneId as ZoneId,
7
+ } from '@js-joda/core';
8
+ import {
9
+ VOID7hggqo3abtya as VOID,
10
+ protoOf180f3jzyo7rfj as protoOf,
11
+ objectCreate1ve4bgxiu4x98 as objectCreate,
12
+ initMetadataForCompanion1wyw17z38v6ac as initMetadataForCompanion,
13
+ Long2qws0ah9gnpki as Long,
14
+ initMetadataForClassbxx6q50dy2s7 as initMetadataForClass,
15
+ toLongw1zpgk99d84b as toLong,
16
+ StringBuilder_init_$Create$zzhi687lupah as StringBuilder_init_$Create$,
17
+ _Char___init__impl__6a9atx367vrx0avsvbg as _Char___init__impl__6a9atx,
18
+ Unit_instanceat14thlj150z as Unit_instance,
19
+ abs1kdzbjes1idip as abs,
20
+ padStart36w1507hs626a as padStart,
21
+ numberRangeToNumber25vse2rgp6rs8 as numberRangeToNumber,
22
+ THROW_CCE2g6jy02ryeudk as THROW_CCE,
23
+ ClosedRangehokgr73im9z3 as ClosedRange,
24
+ isInterface3d6p8outrmvmk as isInterface,
25
+ contains2c50nlxg7en7o as contains,
26
+ IllegalArgumentException_init_$Create$sfel9vrfa7w2 as IllegalArgumentException_init_$Create$,
27
+ toString1pkumu07cwy4m as toString,
28
+ IllegalArgumentException_init_$Init$mo9ojkj6lifc as IllegalArgumentException_init_$Init$,
29
+ captureStack1fzi4aczwc4hg as captureStack,
30
+ IllegalArgumentException_init_$Init$3lxmt2zohthr0 as IllegalArgumentException_init_$Init$_0,
31
+ IllegalArgumentException_init_$Init$35y4bla3jh0vq as IllegalArgumentException_init_$Init$_1,
32
+ IllegalArgumentException_init_$Init$1b20duosck2sj as IllegalArgumentException_init_$Init$_2,
33
+ IllegalArgumentException2asla15b5jaob as IllegalArgumentException,
34
+ RuntimeException_init_$Init$1hjdw43v0c6o7 as RuntimeException_init_$Init$,
35
+ RuntimeException_init_$Init$1fn23imlcoxh8 as RuntimeException_init_$Init$_0,
36
+ RuntimeException1r3t0zl97011n as RuntimeException,
37
+ Enum3alwj03lh1n41 as Enum,
38
+ initMetadataForInterface1egvbzx539z91 as initMetadataForInterface,
39
+ toString14fd7g605f91p as toString_0,
40
+ hashCodeq5arwsb9dgti as hashCode,
41
+ getBooleanHashCode1bbj3u6b3v0a7 as getBooleanHashCode,
42
+ initMetadataForObject1cxne3s9w65el as initMetadataForObject,
43
+ KProperty02ce7r476m8633 as KProperty0,
44
+ getPropertyCallableRef1ajb9in178r5r as getPropertyCallableRef,
45
+ KMutableProperty11e8g1gb0ecb9j as KMutableProperty1,
46
+ lazy2hsh8ze7j6ikd as lazy,
47
+ ArrayList_init_$Create$2rimpp4x9tjd3 as ArrayList_init_$Create$,
48
+ equals2au1ep9vhcato as equals,
49
+ IllegalStateException_init_$Create$1nm9y6jd3c9iy as IllegalStateException_init_$Create$,
50
+ toString30pk9tzaqopn as toString_1,
51
+ getStringHashCode26igk1bx568vk as getStringHashCode,
52
+ charSequenceLength3278n89t01tmv as charSequenceLength,
53
+ charSequenceGet1vxk1y5n17t1z as charSequenceGet,
54
+ listOfvhqybd2zx248 as listOf,
55
+ get_lastIndexld83bqhfgcdd as get_lastIndex,
56
+ emptyList1g2z5xcrvp2zy as emptyList,
57
+ joinToString1cxrrlmo0chqs as joinToString,
58
+ collectionSizeOrDefault36dulx8yinfqm as collectionSizeOrDefault,
59
+ ArrayList_init_$Create$3m1kyiqequwm5 as ArrayList_init_$Create$_0,
60
+ singleo93pzdgfc557 as single,
61
+ charSequenceSubSequence1iwpdba8s3jc7 as charSequenceSubSequence,
62
+ mutableListOf6oorvk2mtdmp as mutableListOf,
63
+ removeLastOrNull3odnlbetbttd4 as removeLastOrNull,
64
+ sortWith4fnm6b3vw03s as sortWith,
65
+ FunctionAdapter3lcrrz3moet5b as FunctionAdapter,
66
+ Comparator2b3maoeh98xtg as Comparator,
67
+ compareValues1n2ayl87ihzfk as compareValues,
68
+ Exceptiondt2hlxn7j7vw as Exception,
69
+ Exception_init_$Init$3c1h61we8oiuv as Exception_init_$Init$,
70
+ StringBuilder_init_$Create$1ckbfpj83l95o as StringBuilder_init_$Create$_0,
71
+ joinTo3lkanfaxbzac2 as joinTo,
72
+ plus310ted5e4i90h as plus,
73
+ toMutableList20rdgwi7d3cwi as toMutableList,
74
+ addAll1k27qatfgp3k5 as addAll,
75
+ Collection1k04j3hzsbod0 as Collection,
76
+ firstOrNull1982767dljvdy as firstOrNull,
77
+ drop3na99dw9feawf as drop,
78
+ listOf1jh22dvmctj1r as listOf_0,
79
+ repeat2w4c6j8zoq09o as repeat,
80
+ checkCountOverflow1ro2fe1r4xvgf as checkCountOverflow,
81
+ Char__minus_impl_a2frrh15zl6plytfjgc as Char__minus_impl_a2frrh,
82
+ enumEntries20mr21zbe3az4 as enumEntries,
83
+ Comparable198qfk8pnblz0 as Comparable,
84
+ IllegalArgumentException_init_$Create$k1dedwd8uq8o as IllegalArgumentException_init_$Create$_0,
85
+ numberToInt1ygmcfwhs2fkq as numberToInt,
86
+ } from './kotlin-kotlin-stdlib.mjs';
87
+ //region block: imports
88
+ var imul = Math.imul;
89
+ //endregion
90
+ //region block: pre-declaration
91
+ initMetadataForCompanion(Companion);
92
+ initMetadataForClass(DateTimePeriod, 'DateTimePeriod');
93
+ initMetadataForClass(DatePeriod, 'DatePeriod', DatePeriod_init_$Create$, DateTimePeriod);
94
+ initMetadataForCompanion(Companion_0);
95
+ initMetadataForClass(DateTimeFormatException, 'DateTimeFormatException', DateTimeFormatException_init_$Create$, IllegalArgumentException);
96
+ initMetadataForClass(DateTimeArithmeticException, 'DateTimeArithmeticException', DateTimeArithmeticException_init_$Create$, RuntimeException);
97
+ initMetadataForClass(AbstractDateTimeFormat, 'AbstractDateTimeFormat');
98
+ initMetadataForClass(Padding, 'Padding', VOID, Enum);
99
+ function year$default(padding, $super) {
100
+ padding = padding === VOID ? Padding_ZERO_getInstance() : padding;
101
+ var tmp;
102
+ if ($super === VOID) {
103
+ this.ug(padding);
104
+ tmp = Unit_instance;
105
+ } else {
106
+ tmp = $super.ug.call(this, padding);
107
+ }
108
+ return tmp;
109
+ }
110
+ function monthNumber$default(padding, $super) {
111
+ padding = padding === VOID ? Padding_ZERO_getInstance() : padding;
112
+ var tmp;
113
+ if ($super === VOID) {
114
+ this.wg(padding);
115
+ tmp = Unit_instance;
116
+ } else {
117
+ tmp = $super.wg.call(this, padding);
118
+ }
119
+ return tmp;
120
+ }
121
+ function dayOfMonth$default(padding, $super) {
122
+ padding = padding === VOID ? Padding_ZERO_getInstance() : padding;
123
+ var tmp;
124
+ if ($super === VOID) {
125
+ this.yg(padding);
126
+ tmp = Unit_instance;
127
+ } else {
128
+ tmp = $super.yg.call(this, padding);
129
+ }
130
+ return tmp;
131
+ }
132
+ initMetadataForInterface(WithDate, 'WithDate');
133
+ function chars(value) {
134
+ return this.bh().dh(new ConstantFormatStructure(value));
135
+ }
136
+ function build() {
137
+ return new CachedFormatStructure(this.bh().eh().fh_1);
138
+ }
139
+ initMetadataForInterface(AbstractDateTimeFormatBuilder, 'AbstractDateTimeFormatBuilder');
140
+ initMetadataForClass(IncompleteLocalDate, 'IncompleteLocalDate', IncompleteLocalDate);
141
+ initMetadataForCompanion(Companion_1);
142
+ function year(padding) {
143
+ return this.yh(new BasicFormatStructure(new YearDirective(padding)));
144
+ }
145
+ function monthNumber(padding) {
146
+ return this.yh(new BasicFormatStructure(new MonthDirective(padding)));
147
+ }
148
+ function dayOfMonth(padding) {
149
+ return this.yh(new BasicFormatStructure(new DayDirective(padding)));
150
+ }
151
+ initMetadataForInterface(AbstractWithDateBuilder, 'AbstractWithDateBuilder', VOID, VOID, [WithDate]);
152
+ initMetadataForClass(Builder, 'Builder', VOID, VOID, [AbstractDateTimeFormatBuilder, AbstractWithDateBuilder]);
153
+ initMetadataForClass(LocalDateFormat, 'LocalDateFormat', VOID, AbstractDateTimeFormat);
154
+ initMetadataForClass(SignedIntFieldFormatDirective, 'SignedIntFieldFormatDirective');
155
+ initMetadataForClass(YearDirective, 'YearDirective', VOID, SignedIntFieldFormatDirective);
156
+ initMetadataForClass(UnsignedIntFieldFormatDirective, 'UnsignedIntFieldFormatDirective');
157
+ initMetadataForClass(MonthDirective, 'MonthDirective', VOID, UnsignedIntFieldFormatDirective);
158
+ initMetadataForClass(DayDirective, 'DayDirective', VOID, UnsignedIntFieldFormatDirective);
159
+ initMetadataForObject(DateFields, 'DateFields');
160
+ initMetadataForClass(AppendableFormatStructure, 'AppendableFormatStructure', AppendableFormatStructure);
161
+ initMetadataForClass(AbstractFieldSpec, 'AbstractFieldSpec');
162
+ initMetadataForClass(GenericFieldSpec, 'GenericFieldSpec', VOID, AbstractFieldSpec);
163
+ function getterNotNull(container) {
164
+ var tmp0_elvis_lhs = this.xj(container);
165
+ var tmp;
166
+ if (tmp0_elvis_lhs == null) {
167
+ throw IllegalStateException_init_$Create$('Field ' + this.i2() + ' is not set');
168
+ } else {
169
+ tmp = tmp0_elvis_lhs;
170
+ }
171
+ return tmp;
172
+ }
173
+ initMetadataForInterface(Accessor, 'Accessor');
174
+ initMetadataForClass(PropertyAccessor, 'PropertyAccessor', VOID, VOID, [Accessor]);
175
+ initMetadataForClass(UnsignedFieldSpec, 'UnsignedFieldSpec', VOID, AbstractFieldSpec);
176
+ initMetadataForClass(ConcatenatedFormatStructure, 'ConcatenatedFormatStructure');
177
+ initMetadataForClass(CachedFormatStructure, 'CachedFormatStructure', VOID, ConcatenatedFormatStructure);
178
+ initMetadataForInterface(NonConcatenatedFormatStructure, 'NonConcatenatedFormatStructure');
179
+ initMetadataForClass(BasicFormatStructure, 'BasicFormatStructure', VOID, VOID, [NonConcatenatedFormatStructure]);
180
+ initMetadataForClass(ConstantFormatStructure, 'ConstantFormatStructure', VOID, VOID, [NonConcatenatedFormatStructure]);
181
+ initMetadataForClass(SpacePaddedFormatter, 'SpacePaddedFormatter');
182
+ initMetadataForClass(ConcatenatedFormatter, 'ConcatenatedFormatter');
183
+ initMetadataForClass(SignedIntFormatterStructure, 'SignedIntFormatterStructure');
184
+ initMetadataForClass(UnsignedIntFormatterStructure, 'UnsignedIntFormatterStructure');
185
+ initMetadataForClass(ConstantStringFormatterStructure, 'ConstantStringFormatterStructure');
186
+ initMetadataForClass(NumberConsumer, 'NumberConsumer');
187
+ initMetadataForClass(ConstantNumberConsumer, 'ConstantNumberConsumer', VOID, NumberConsumer);
188
+ initMetadataForObject(ExpectedInt, 'ExpectedInt');
189
+ initMetadataForClass(TooManyDigits, 'TooManyDigits');
190
+ initMetadataForClass(TooFewDigits, 'TooFewDigits');
191
+ initMetadataForClass(WrongConstant, 'WrongConstant');
192
+ initMetadataForClass(Conflicting, 'Conflicting');
193
+ initMetadataForClass(UnsignedIntConsumer, 'UnsignedIntConsumer', VOID, NumberConsumer);
194
+ initMetadataForClass(ParseError, 'ParseError');
195
+ initMetadataForCompanion(Companion_2);
196
+ initMetadataForClass(ParserState, 'ParserState');
197
+ initMetadataForClass(sam$kotlin_Comparator$0, 'sam$kotlin_Comparator$0', VOID, VOID, [Comparator, FunctionAdapter]);
198
+ initMetadataForClass(Parser, 'Parser');
199
+ initMetadataForClass(ParserStructure, 'ParserStructure');
200
+ initMetadataForClass(ParseException, 'ParseException', VOID, Exception);
201
+ initMetadataForClass(NumberSpanParserOperation, 'NumberSpanParserOperation');
202
+ initMetadataForClass(PlainStringParserOperation, 'PlainStringParserOperation');
203
+ initMetadataForClass(UnconditionalModification, 'UnconditionalModification');
204
+ initMetadataForClass(DayOfWeek_0, 'DayOfWeek', VOID, Enum);
205
+ initMetadataForClass(Instant, 'Instant', VOID, VOID, [Comparable]);
206
+ initMetadataForCompanion(Companion_3);
207
+ initMetadataForObject(Formats, 'Formats');
208
+ initMetadataForClass(LocalDate_0, 'LocalDate', VOID, VOID, [Comparable]);
209
+ initMetadataForCompanion(Companion_4);
210
+ initMetadataForClass(LocalDateTime_0, 'LocalDateTime', VOID, VOID, [Comparable]);
211
+ initMetadataForCompanion(Companion_5);
212
+ initMetadataForClass(TimeZone, 'TimeZone');
213
+ initMetadataForCompanion(Companion_6);
214
+ initMetadataForClass(FixedOffsetTimeZone, 'FixedOffsetTimeZone', VOID, TimeZone);
215
+ initMetadataForCompanion(Companion_7);
216
+ initMetadataForClass(UtcOffset, 'UtcOffset');
217
+ //endregion
218
+ function DatePeriod_init_$Init$(years, months, days, $this) {
219
+ years = years === VOID ? 0 : years;
220
+ months = months === VOID ? 0 : months;
221
+ days = days === VOID ? 0 : days;
222
+ DatePeriod.call($this, totalMonths(years, months), days);
223
+ return $this;
224
+ }
225
+ function DatePeriod_init_$Create$(years, months, days) {
226
+ return DatePeriod_init_$Init$(years, months, days, objectCreate(protoOf(DatePeriod)));
227
+ }
228
+ function Companion() {
229
+ }
230
+ var Companion_instance;
231
+ function Companion_getInstance() {
232
+ return Companion_instance;
233
+ }
234
+ function DatePeriod(totalMonths, days) {
235
+ DateTimePeriod.call(this);
236
+ this.zf_1 = totalMonths;
237
+ this.ag_1 = days;
238
+ }
239
+ protoOf(DatePeriod).bg = function () {
240
+ return this.zf_1;
241
+ };
242
+ protoOf(DatePeriod).cg = function () {
243
+ return this.ag_1;
244
+ };
245
+ protoOf(DatePeriod).dg = function () {
246
+ return 0;
247
+ };
248
+ protoOf(DatePeriod).eg = function () {
249
+ return 0;
250
+ };
251
+ protoOf(DatePeriod).fg = function () {
252
+ return 0;
253
+ };
254
+ protoOf(DatePeriod).gg = function () {
255
+ return 0;
256
+ };
257
+ protoOf(DatePeriod).hg = function () {
258
+ return new Long(0, 0);
259
+ };
260
+ function allNonpositive($this) {
261
+ return $this.bg() <= 0 && $this.cg() <= 0 && $this.hg().a1(new Long(0, 0)) <= 0 && (!(($this.bg() | $this.cg()) === 0) || !$this.hg().equals(new Long(0, 0)));
262
+ }
263
+ function Companion_0() {
264
+ }
265
+ var Companion_instance_0;
266
+ function Companion_getInstance_0() {
267
+ return Companion_instance_0;
268
+ }
269
+ function DateTimePeriod() {
270
+ }
271
+ protoOf(DateTimePeriod).ig = function () {
272
+ return this.bg() / 12 | 0;
273
+ };
274
+ protoOf(DateTimePeriod).jg = function () {
275
+ return this.bg() % 12 | 0;
276
+ };
277
+ protoOf(DateTimePeriod).dg = function () {
278
+ return this.hg().s2(new Long(817405952, 838)).z();
279
+ };
280
+ protoOf(DateTimePeriod).eg = function () {
281
+ return this.hg().t2(new Long(817405952, 838)).s2(new Long(-129542144, 13)).z();
282
+ };
283
+ protoOf(DateTimePeriod).fg = function () {
284
+ // Inline function 'kotlin.Long.div' call
285
+ var this_0 = this.hg().t2(new Long(-129542144, 13));
286
+ var other = 1000000000;
287
+ return this_0.s2(toLong(other)).z();
288
+ };
289
+ protoOf(DateTimePeriod).gg = function () {
290
+ // Inline function 'kotlin.Long.rem' call
291
+ var this_0 = this.hg();
292
+ var other = 1000000000;
293
+ return this_0.t2(toLong(other)).z();
294
+ };
295
+ protoOf(DateTimePeriod).toString = function () {
296
+ // Inline function 'kotlin.text.buildString' call
297
+ // Inline function 'kotlin.contracts.contract' call
298
+ // Inline function 'kotlin.apply' call
299
+ var this_0 = StringBuilder_init_$Create$();
300
+ // Inline function 'kotlin.contracts.contract' call
301
+ // Inline function 'kotlinx.datetime.DateTimePeriod.toString.<anonymous>' call
302
+ var tmp;
303
+ if (allNonpositive(this)) {
304
+ this_0.i7(_Char___init__impl__6a9atx(45));
305
+ tmp = -1;
306
+ } else {
307
+ tmp = 1;
308
+ }
309
+ var sign = tmp;
310
+ this_0.i7(_Char___init__impl__6a9atx(80));
311
+ if (!(this.ig() === 0)) {
312
+ this_0.ga(imul(this.ig(), sign)).i7(_Char___init__impl__6a9atx(89));
313
+ }
314
+ if (!(this.jg() === 0)) {
315
+ this_0.ga(imul(this.jg(), sign)).i7(_Char___init__impl__6a9atx(77));
316
+ }
317
+ if (!(this.cg() === 0)) {
318
+ this_0.ga(imul(this.cg(), sign)).i7(_Char___init__impl__6a9atx(68));
319
+ }
320
+ var t = 'T';
321
+ if (!(this.dg() === 0)) {
322
+ // Inline function 'kotlin.also' call
323
+ this_0.h7(t).ga(imul(this.dg(), sign)).i7(_Char___init__impl__6a9atx(72));
324
+ // Inline function 'kotlin.contracts.contract' call
325
+ // Inline function 'kotlinx.datetime.DateTimePeriod.toString.<anonymous>.<anonymous>' call
326
+ t = '';
327
+ }
328
+ if (!(this.eg() === 0)) {
329
+ // Inline function 'kotlin.also' call
330
+ this_0.h7(t).ga(imul(this.eg(), sign)).i7(_Char___init__impl__6a9atx(77));
331
+ // Inline function 'kotlin.contracts.contract' call
332
+ // Inline function 'kotlinx.datetime.DateTimePeriod.toString.<anonymous>.<anonymous>' call
333
+ t = '';
334
+ }
335
+ if (!((this.fg() | this.gg()) === 0)) {
336
+ this_0.h7(t);
337
+ this_0.g7(!(this.fg() === 0) ? imul(this.fg(), sign) : imul(this.gg(), sign) < 0 ? '-0' : '0');
338
+ if (!(this.gg() === 0)) {
339
+ var tmp_0 = this_0.i7(_Char___init__impl__6a9atx(46));
340
+ // Inline function 'kotlin.math.absoluteValue' call
341
+ var this_1 = this.gg();
342
+ var tmp$ret$2 = abs(this_1);
343
+ tmp_0.h7(padStart(tmp$ret$2.toString(), 9, _Char___init__impl__6a9atx(48)));
344
+ }
345
+ this_0.i7(_Char___init__impl__6a9atx(83));
346
+ }
347
+ if (this_0.a() === 1) {
348
+ this_0.h7('0D');
349
+ }
350
+ return this_0.toString();
351
+ };
352
+ protoOf(DateTimePeriod).equals = function (other) {
353
+ if (this === other)
354
+ return true;
355
+ if (!(other instanceof DateTimePeriod))
356
+ return false;
357
+ if (!(this.bg() === other.bg()))
358
+ return false;
359
+ if (!(this.cg() === other.cg()))
360
+ return false;
361
+ if (!this.hg().equals(other.hg()))
362
+ return false;
363
+ return true;
364
+ };
365
+ protoOf(DateTimePeriod).hashCode = function () {
366
+ var result = this.bg();
367
+ result = imul(31, result) + this.cg() | 0;
368
+ result = imul(31, result) + this.hg().hashCode() | 0;
369
+ return result;
370
+ };
371
+ function totalMonths(years, months) {
372
+ // Inline function 'kotlin.Long.times' call
373
+ var totalMonths = toLong(years).r2(toLong(12)).p2(toLong(months));
374
+ var tmp;
375
+ // Inline function 'kotlin.ranges.contains' call
376
+ var this_0 = numberRangeToNumber(-2147483648, 2147483647);
377
+ if (contains(isInterface(this_0, ClosedRange) ? this_0 : THROW_CCE(), totalMonths)) {
378
+ tmp = totalMonths.z();
379
+ } else {
380
+ throw IllegalArgumentException_init_$Create$('The total number of months in ' + years + ' years and ' + months + ' months overflows an Int');
381
+ }
382
+ return tmp;
383
+ }
384
+ function get_isoDayNumber(_this__u8e3s4) {
385
+ return _this__u8e3s4.h2_1 + 1 | 0;
386
+ }
387
+ function DayOfWeek(isoDayNumber) {
388
+ // Inline function 'kotlin.require' call
389
+ // Inline function 'kotlin.contracts.contract' call
390
+ if (!(1 <= isoDayNumber ? isoDayNumber <= 7 : false)) {
391
+ // Inline function 'kotlinx.datetime.DayOfWeek.<anonymous>' call
392
+ var message = 'Expected ISO day-of-week number in 1..7, got ' + isoDayNumber;
393
+ throw IllegalArgumentException_init_$Create$(toString(message));
394
+ }
395
+ return get_entries().n(isoDayNumber - 1 | 0);
396
+ }
397
+ function DateTimeFormatException_init_$Init$($this) {
398
+ IllegalArgumentException_init_$Init$($this);
399
+ DateTimeFormatException.call($this);
400
+ return $this;
401
+ }
402
+ function DateTimeFormatException_init_$Create$() {
403
+ var tmp = DateTimeFormatException_init_$Init$(objectCreate(protoOf(DateTimeFormatException)));
404
+ captureStack(tmp, DateTimeFormatException_init_$Create$);
405
+ return tmp;
406
+ }
407
+ function DateTimeFormatException_init_$Init$_0(message, $this) {
408
+ IllegalArgumentException_init_$Init$_0(message, $this);
409
+ DateTimeFormatException.call($this);
410
+ return $this;
411
+ }
412
+ function DateTimeFormatException_init_$Create$_0(message) {
413
+ var tmp = DateTimeFormatException_init_$Init$_0(message, objectCreate(protoOf(DateTimeFormatException)));
414
+ captureStack(tmp, DateTimeFormatException_init_$Create$_0);
415
+ return tmp;
416
+ }
417
+ function DateTimeFormatException_init_$Init$_1(cause, $this) {
418
+ IllegalArgumentException_init_$Init$_1(cause, $this);
419
+ DateTimeFormatException.call($this);
420
+ return $this;
421
+ }
422
+ function DateTimeFormatException_init_$Create$_1(cause) {
423
+ var tmp = DateTimeFormatException_init_$Init$_1(cause, objectCreate(protoOf(DateTimeFormatException)));
424
+ captureStack(tmp, DateTimeFormatException_init_$Create$_1);
425
+ return tmp;
426
+ }
427
+ function DateTimeFormatException_init_$Init$_2(message, cause, $this) {
428
+ IllegalArgumentException_init_$Init$_2(message, cause, $this);
429
+ DateTimeFormatException.call($this);
430
+ return $this;
431
+ }
432
+ function DateTimeFormatException_init_$Create$_2(message, cause) {
433
+ var tmp = DateTimeFormatException_init_$Init$_2(message, cause, objectCreate(protoOf(DateTimeFormatException)));
434
+ captureStack(tmp, DateTimeFormatException_init_$Create$_2);
435
+ return tmp;
436
+ }
437
+ function DateTimeFormatException() {
438
+ captureStack(this, DateTimeFormatException);
439
+ }
440
+ function DateTimeArithmeticException_init_$Init$($this) {
441
+ RuntimeException_init_$Init$($this);
442
+ DateTimeArithmeticException.call($this);
443
+ return $this;
444
+ }
445
+ function DateTimeArithmeticException_init_$Create$() {
446
+ var tmp = DateTimeArithmeticException_init_$Init$(objectCreate(protoOf(DateTimeArithmeticException)));
447
+ captureStack(tmp, DateTimeArithmeticException_init_$Create$);
448
+ return tmp;
449
+ }
450
+ function DateTimeArithmeticException_init_$Init$_0(cause, $this) {
451
+ RuntimeException_init_$Init$_0(cause, $this);
452
+ DateTimeArithmeticException.call($this);
453
+ return $this;
454
+ }
455
+ function DateTimeArithmeticException_init_$Create$_0(cause) {
456
+ var tmp = DateTimeArithmeticException_init_$Init$_0(cause, objectCreate(protoOf(DateTimeArithmeticException)));
457
+ captureStack(tmp, DateTimeArithmeticException_init_$Create$_0);
458
+ return tmp;
459
+ }
460
+ function DateTimeArithmeticException() {
461
+ captureStack(this, DateTimeArithmeticException);
462
+ }
463
+ function getIsoDateFormat() {
464
+ return Formats_getInstance().lg();
465
+ }
466
+ function asTimeZone(_this__u8e3s4) {
467
+ return FixedOffsetTimeZone_init_$Create$(_this__u8e3s4);
468
+ }
469
+ function AbstractDateTimeFormat() {
470
+ }
471
+ protoOf(AbstractDateTimeFormat).pg = function (input) {
472
+ var tmp;
473
+ try {
474
+ tmp = Parser__match$default_impl_x2xlti(_Parser___init__impl__gdyfby(this.mg().tg()), input, this.og());
475
+ } catch ($p) {
476
+ var tmp_0;
477
+ if ($p instanceof ParseException) {
478
+ var e = $p;
479
+ throw DateTimeFormatException_init_$Create$_2("Failed to parse value from '" + toString(input) + "'", e);
480
+ } else {
481
+ throw $p;
482
+ }
483
+ }
484
+ var matched = tmp;
485
+ try {
486
+ return this.ng(matched);
487
+ } catch ($p) {
488
+ if ($p instanceof IllegalArgumentException) {
489
+ var e_0 = $p;
490
+ var message = e_0.message;
491
+ throw DateTimeFormatException_init_$Create$_2(message == null ? "The value parsed from '" + toString(input) + "' is invalid" : '' + message + " (when parsing '" + toString(input) + "')", e_0);
492
+ } else {
493
+ throw $p;
494
+ }
495
+ }
496
+ };
497
+ var Padding_NONE_instance;
498
+ var Padding_ZERO_instance;
499
+ var Padding_SPACE_instance;
500
+ var Padding_entriesInitialized;
501
+ function Padding_initEntries() {
502
+ if (Padding_entriesInitialized)
503
+ return Unit_instance;
504
+ Padding_entriesInitialized = true;
505
+ Padding_NONE_instance = new Padding('NONE', 0);
506
+ Padding_ZERO_instance = new Padding('ZERO', 1);
507
+ Padding_SPACE_instance = new Padding('SPACE', 2);
508
+ }
509
+ function Padding(name, ordinal) {
510
+ Enum.call(this, name, ordinal);
511
+ }
512
+ function Padding_ZERO_getInstance() {
513
+ Padding_initEntries();
514
+ return Padding_ZERO_instance;
515
+ }
516
+ function Padding_SPACE_getInstance() {
517
+ Padding_initEntries();
518
+ return Padding_SPACE_instance;
519
+ }
520
+ function WithDate() {
521
+ }
522
+ function char(_this__u8e3s4, value) {
523
+ return _this__u8e3s4.ah(toString_0(value));
524
+ }
525
+ function AbstractDateTimeFormatBuilder() {
526
+ }
527
+ function get_ISO_DATE() {
528
+ _init_properties_LocalDateFormat_kt__k1uk9u();
529
+ // Inline function 'kotlin.getValue' call
530
+ var this_0 = ISO_DATE$delegate;
531
+ ISO_DATE$factory();
532
+ return this_0.b2();
533
+ }
534
+ var ISO_DATE$delegate;
535
+ function get_ISO_DATE_BASIC() {
536
+ _init_properties_LocalDateFormat_kt__k1uk9u();
537
+ // Inline function 'kotlin.getValue' call
538
+ var this_0 = ISO_DATE_BASIC$delegate;
539
+ ISO_DATE_BASIC$factory();
540
+ return this_0.b2();
541
+ }
542
+ var ISO_DATE_BASIC$delegate;
543
+ function get_emptyIncompleteLocalDate() {
544
+ _init_properties_LocalDateFormat_kt__k1uk9u();
545
+ return emptyIncompleteLocalDate;
546
+ }
547
+ var emptyIncompleteLocalDate;
548
+ function IncompleteLocalDate(year, monthNumber, dayOfMonth, isoDayOfWeek) {
549
+ year = year === VOID ? null : year;
550
+ monthNumber = monthNumber === VOID ? null : monthNumber;
551
+ dayOfMonth = dayOfMonth === VOID ? null : dayOfMonth;
552
+ isoDayOfWeek = isoDayOfWeek === VOID ? null : isoDayOfWeek;
553
+ this.gh_1 = year;
554
+ this.hh_1 = monthNumber;
555
+ this.ih_1 = dayOfMonth;
556
+ this.jh_1 = isoDayOfWeek;
557
+ }
558
+ protoOf(IncompleteLocalDate).kh = function (_set____db54di) {
559
+ this.gh_1 = _set____db54di;
560
+ };
561
+ protoOf(IncompleteLocalDate).lh = function () {
562
+ return this.gh_1;
563
+ };
564
+ protoOf(IncompleteLocalDate).mh = function (_set____db54di) {
565
+ this.hh_1 = _set____db54di;
566
+ };
567
+ protoOf(IncompleteLocalDate).nh = function () {
568
+ return this.hh_1;
569
+ };
570
+ protoOf(IncompleteLocalDate).oh = function (_set____db54di) {
571
+ this.ih_1 = _set____db54di;
572
+ };
573
+ protoOf(IncompleteLocalDate).ph = function () {
574
+ return this.ih_1;
575
+ };
576
+ protoOf(IncompleteLocalDate).qh = function (_set____db54di) {
577
+ this.jh_1 = _set____db54di;
578
+ };
579
+ protoOf(IncompleteLocalDate).rh = function () {
580
+ return this.jh_1;
581
+ };
582
+ protoOf(IncompleteLocalDate).sh = function () {
583
+ var date = LocalDate_init_$Create$(requireParsedField(this.gh_1, 'year'), requireParsedField(this.hh_1, 'monthNumber'), requireParsedField(this.ih_1, 'dayOfMonth'));
584
+ var tmp0_safe_receiver = this.jh_1;
585
+ if (tmp0_safe_receiver == null)
586
+ null;
587
+ else {
588
+ // Inline function 'kotlin.let' call
589
+ // Inline function 'kotlin.contracts.contract' call
590
+ if (!(tmp0_safe_receiver === get_isoDayNumber(date.uh()))) {
591
+ throw DateTimeFormatException_init_$Create$_0('Can not create a LocalDate from the given input: ' + ('the day of week is ' + DayOfWeek(tmp0_safe_receiver).toString() + ' but the date is ' + date.toString() + ', which is a ' + date.uh().toString()));
592
+ }
593
+ }
594
+ return date;
595
+ };
596
+ protoOf(IncompleteLocalDate).vh = function () {
597
+ return new IncompleteLocalDate(this.gh_1, this.hh_1, this.ih_1, this.jh_1);
598
+ };
599
+ protoOf(IncompleteLocalDate).equals = function (other) {
600
+ var tmp;
601
+ var tmp_0;
602
+ var tmp_1;
603
+ var tmp_2;
604
+ if (other instanceof IncompleteLocalDate) {
605
+ tmp_2 = this.gh_1 == other.gh_1;
606
+ } else {
607
+ tmp_2 = false;
608
+ }
609
+ if (tmp_2) {
610
+ tmp_1 = this.hh_1 == other.hh_1;
611
+ } else {
612
+ tmp_1 = false;
613
+ }
614
+ if (tmp_1) {
615
+ tmp_0 = this.ih_1 == other.ih_1;
616
+ } else {
617
+ tmp_0 = false;
618
+ }
619
+ if (tmp_0) {
620
+ tmp = this.jh_1 == other.jh_1;
621
+ } else {
622
+ tmp = false;
623
+ }
624
+ return tmp;
625
+ };
626
+ protoOf(IncompleteLocalDate).hashCode = function () {
627
+ // Inline function 'kotlin.hashCode' call
628
+ var tmp0_safe_receiver = this.gh_1;
629
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : hashCode(tmp0_safe_receiver);
630
+ var tmp$ret$0 = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
631
+ var tmp = imul(tmp$ret$0, 31);
632
+ // Inline function 'kotlin.hashCode' call
633
+ var tmp0_safe_receiver_0 = this.hh_1;
634
+ var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : hashCode(tmp0_safe_receiver_0);
635
+ var tmp$ret$1 = tmp1_elvis_lhs_0 == null ? 0 : tmp1_elvis_lhs_0;
636
+ var tmp_0 = tmp + imul(tmp$ret$1, 31) | 0;
637
+ // Inline function 'kotlin.hashCode' call
638
+ var tmp0_safe_receiver_1 = this.ih_1;
639
+ var tmp1_elvis_lhs_1 = tmp0_safe_receiver_1 == null ? null : hashCode(tmp0_safe_receiver_1);
640
+ var tmp$ret$2 = tmp1_elvis_lhs_1 == null ? 0 : tmp1_elvis_lhs_1;
641
+ var tmp_1 = tmp_0 + imul(tmp$ret$2, 31) | 0;
642
+ // Inline function 'kotlin.hashCode' call
643
+ var tmp0_safe_receiver_2 = this.jh_1;
644
+ var tmp1_elvis_lhs_2 = tmp0_safe_receiver_2 == null ? null : hashCode(tmp0_safe_receiver_2);
645
+ var tmp$ret$3 = tmp1_elvis_lhs_2 == null ? 0 : tmp1_elvis_lhs_2;
646
+ return tmp_1 + imul(tmp$ret$3, 31) | 0;
647
+ };
648
+ protoOf(IncompleteLocalDate).toString = function () {
649
+ var tmp0_elvis_lhs = this.gh_1;
650
+ var tmp = toString(tmp0_elvis_lhs == null ? '??' : tmp0_elvis_lhs);
651
+ var tmp1_elvis_lhs = this.hh_1;
652
+ var tmp_0 = toString(tmp1_elvis_lhs == null ? '??' : tmp1_elvis_lhs);
653
+ var tmp2_elvis_lhs = this.ih_1;
654
+ var tmp_1 = toString(tmp2_elvis_lhs == null ? '??' : tmp2_elvis_lhs);
655
+ var tmp3_elvis_lhs = this.jh_1;
656
+ return tmp + '-' + tmp_0 + '-' + tmp_1 + ' (day of week is ' + toString(tmp3_elvis_lhs == null ? '??' : tmp3_elvis_lhs) + ')';
657
+ };
658
+ function Companion_1() {
659
+ }
660
+ protoOf(Companion_1).wh = function (block) {
661
+ var builder = new Builder(new AppendableFormatStructure());
662
+ block(builder);
663
+ return new LocalDateFormat(builder.eh());
664
+ };
665
+ var Companion_instance_1;
666
+ function Companion_getInstance_1() {
667
+ return Companion_instance_1;
668
+ }
669
+ function Builder(actualBuilder) {
670
+ this.xh_1 = actualBuilder;
671
+ }
672
+ protoOf(Builder).bh = function () {
673
+ return this.xh_1;
674
+ };
675
+ protoOf(Builder).yh = function (structure) {
676
+ return this.xh_1.dh(structure);
677
+ };
678
+ function LocalDateFormat(actualFormat) {
679
+ AbstractDateTimeFormat.call(this);
680
+ this.zh_1 = actualFormat;
681
+ }
682
+ protoOf(LocalDateFormat).mg = function () {
683
+ return this.zh_1;
684
+ };
685
+ protoOf(LocalDateFormat).ai = function (intermediate) {
686
+ return intermediate.sh();
687
+ };
688
+ protoOf(LocalDateFormat).ng = function (intermediate) {
689
+ return this.ai(intermediate instanceof IncompleteLocalDate ? intermediate : THROW_CCE());
690
+ };
691
+ protoOf(LocalDateFormat).og = function () {
692
+ return get_emptyIncompleteLocalDate();
693
+ };
694
+ function requireParsedField(field, name) {
695
+ _init_properties_LocalDateFormat_kt__k1uk9u();
696
+ if (field == null) {
697
+ throw DateTimeFormatException_init_$Create$_0('Can not create a ' + name + ' from the given input: the field ' + name + ' is missing');
698
+ }
699
+ return field;
700
+ }
701
+ function AbstractWithDateBuilder() {
702
+ }
703
+ function YearDirective(padding, isYearOfEra) {
704
+ isYearOfEra = isYearOfEra === VOID ? false : isYearOfEra;
705
+ var tmp = DateFields_getInstance().bi_1;
706
+ // Inline function 'kotlinx.datetime.format.minDigits' call
707
+ var tmp_0 = padding.equals(Padding_ZERO_getInstance()) ? 4 : 1;
708
+ // Inline function 'kotlinx.datetime.format.spaces' call
709
+ var tmp$ret$1 = padding.equals(Padding_SPACE_getInstance()) ? 4 : null;
710
+ SignedIntFieldFormatDirective.call(this, tmp, tmp_0, null, tmp$ret$1, 4);
711
+ this.ki_1 = padding;
712
+ this.li_1 = isYearOfEra;
713
+ }
714
+ protoOf(YearDirective).equals = function (other) {
715
+ var tmp;
716
+ var tmp_0;
717
+ if (other instanceof YearDirective) {
718
+ tmp_0 = this.ki_1.equals(other.ki_1);
719
+ } else {
720
+ tmp_0 = false;
721
+ }
722
+ if (tmp_0) {
723
+ tmp = this.li_1 === other.li_1;
724
+ } else {
725
+ tmp = false;
726
+ }
727
+ return tmp;
728
+ };
729
+ protoOf(YearDirective).hashCode = function () {
730
+ return imul(this.ki_1.hashCode(), 31) + getBooleanHashCode(this.li_1) | 0;
731
+ };
732
+ function MonthDirective(padding) {
733
+ var tmp = DateFields_getInstance().ci_1;
734
+ // Inline function 'kotlinx.datetime.format.minDigits' call
735
+ var tmp_0 = padding.equals(Padding_ZERO_getInstance()) ? 2 : 1;
736
+ // Inline function 'kotlinx.datetime.format.spaces' call
737
+ var tmp$ret$1 = padding.equals(Padding_SPACE_getInstance()) ? 2 : null;
738
+ UnsignedIntFieldFormatDirective.call(this, tmp, tmp_0, tmp$ret$1);
739
+ this.wi_1 = padding;
740
+ }
741
+ protoOf(MonthDirective).equals = function (other) {
742
+ var tmp;
743
+ if (other instanceof MonthDirective) {
744
+ tmp = this.wi_1.equals(other.wi_1);
745
+ } else {
746
+ tmp = false;
747
+ }
748
+ return tmp;
749
+ };
750
+ protoOf(MonthDirective).hashCode = function () {
751
+ return this.wi_1.hashCode();
752
+ };
753
+ function DayDirective(padding) {
754
+ var tmp = DateFields_getInstance().di_1;
755
+ // Inline function 'kotlinx.datetime.format.minDigits' call
756
+ var tmp_0 = padding.equals(Padding_ZERO_getInstance()) ? 2 : 1;
757
+ // Inline function 'kotlinx.datetime.format.spaces' call
758
+ var tmp$ret$1 = padding.equals(Padding_SPACE_getInstance()) ? 2 : null;
759
+ UnsignedIntFieldFormatDirective.call(this, tmp, tmp_0, tmp$ret$1);
760
+ this.fj_1 = padding;
761
+ }
762
+ protoOf(DayDirective).equals = function (other) {
763
+ var tmp;
764
+ if (other instanceof DayDirective) {
765
+ tmp = this.fj_1.equals(other.fj_1);
766
+ } else {
767
+ tmp = false;
768
+ }
769
+ return tmp;
770
+ };
771
+ protoOf(DayDirective).hashCode = function () {
772
+ return this.fj_1.hashCode();
773
+ };
774
+ function DateFields() {
775
+ DateFields_instance = this;
776
+ this.bi_1 = new GenericFieldSpec(new PropertyAccessor(year$factory()));
777
+ this.ci_1 = new UnsignedFieldSpec(new PropertyAccessor(monthNumber$factory()), 1, 12);
778
+ this.di_1 = new UnsignedFieldSpec(new PropertyAccessor(dayOfMonth$factory()), 1, 31);
779
+ this.ei_1 = new UnsignedFieldSpec(new PropertyAccessor(isoDayOfWeek$factory()), 1, 7);
780
+ }
781
+ var DateFields_instance;
782
+ function DateFields_getInstance() {
783
+ if (DateFields_instance == null)
784
+ new DateFields();
785
+ return DateFields_instance;
786
+ }
787
+ function ISO_DATE$delegate$lambda() {
788
+ _init_properties_LocalDateFormat_kt__k1uk9u();
789
+ var tmp = Companion_instance_1;
790
+ return tmp.wh(ISO_DATE$delegate$lambda$lambda);
791
+ }
792
+ function ISO_DATE$delegate$lambda$lambda($this$build) {
793
+ _init_properties_LocalDateFormat_kt__k1uk9u();
794
+ $this$build.vg();
795
+ char($this$build, _Char___init__impl__6a9atx(45));
796
+ $this$build.xg();
797
+ char($this$build, _Char___init__impl__6a9atx(45));
798
+ $this$build.zg();
799
+ return Unit_instance;
800
+ }
801
+ function ISO_DATE_BASIC$delegate$lambda() {
802
+ _init_properties_LocalDateFormat_kt__k1uk9u();
803
+ var tmp = Companion_instance_1;
804
+ return tmp.wh(ISO_DATE_BASIC$delegate$lambda$lambda);
805
+ }
806
+ function ISO_DATE_BASIC$delegate$lambda$lambda($this$build) {
807
+ _init_properties_LocalDateFormat_kt__k1uk9u();
808
+ $this$build.vg();
809
+ $this$build.xg();
810
+ $this$build.zg();
811
+ return Unit_instance;
812
+ }
813
+ function ISO_DATE$factory() {
814
+ return getPropertyCallableRef('ISO_DATE', 0, KProperty0, function () {
815
+ return get_ISO_DATE();
816
+ }, null);
817
+ }
818
+ function ISO_DATE_BASIC$factory() {
819
+ return getPropertyCallableRef('ISO_DATE_BASIC', 0, KProperty0, function () {
820
+ return get_ISO_DATE_BASIC();
821
+ }, null);
822
+ }
823
+ function year$factory() {
824
+ return getPropertyCallableRef('year', 1, KMutableProperty1, function (receiver) {
825
+ return receiver.lh();
826
+ }, function (receiver, value) {
827
+ return receiver.kh(value);
828
+ });
829
+ }
830
+ function monthNumber$factory() {
831
+ return getPropertyCallableRef('monthNumber', 1, KMutableProperty1, function (receiver) {
832
+ return receiver.nh();
833
+ }, function (receiver, value) {
834
+ return receiver.mh(value);
835
+ });
836
+ }
837
+ function dayOfMonth$factory() {
838
+ return getPropertyCallableRef('dayOfMonth', 1, KMutableProperty1, function (receiver) {
839
+ return receiver.ph();
840
+ }, function (receiver, value) {
841
+ return receiver.oh(value);
842
+ });
843
+ }
844
+ function isoDayOfWeek$factory() {
845
+ return getPropertyCallableRef('isoDayOfWeek', 1, KMutableProperty1, function (receiver) {
846
+ return receiver.rh();
847
+ }, function (receiver, value) {
848
+ return receiver.qh(value);
849
+ });
850
+ }
851
+ var properties_initialized_LocalDateFormat_kt_fmnlhc;
852
+ function _init_properties_LocalDateFormat_kt__k1uk9u() {
853
+ if (!properties_initialized_LocalDateFormat_kt_fmnlhc) {
854
+ properties_initialized_LocalDateFormat_kt_fmnlhc = true;
855
+ ISO_DATE$delegate = lazy(ISO_DATE$delegate$lambda);
856
+ ISO_DATE_BASIC$delegate = lazy(ISO_DATE_BASIC$delegate$lambda);
857
+ emptyIncompleteLocalDate = new IncompleteLocalDate();
858
+ }
859
+ }
860
+ function AppendableFormatStructure() {
861
+ var tmp = this;
862
+ // Inline function 'kotlin.collections.mutableListOf' call
863
+ tmp.ch_1 = ArrayList_init_$Create$();
864
+ }
865
+ protoOf(AppendableFormatStructure).eh = function () {
866
+ return new ConcatenatedFormatStructure(this.ch_1);
867
+ };
868
+ protoOf(AppendableFormatStructure).dh = function (format) {
869
+ if (isInterface(format, NonConcatenatedFormatStructure)) {
870
+ this.ch_1.e(format);
871
+ } else {
872
+ if (format instanceof ConcatenatedFormatStructure) {
873
+ // Inline function 'kotlin.collections.forEach' call
874
+ var tmp0_iterator = format.fh_1.j();
875
+ while (tmp0_iterator.k()) {
876
+ var element = tmp0_iterator.l();
877
+ // Inline function 'kotlinx.datetime.internal.format.AppendableFormatStructure.add.<anonymous>' call
878
+ this.ch_1.e(element);
879
+ }
880
+ }
881
+ }
882
+ };
883
+ function Accessor$getterNotNull$ref($boundThis) {
884
+ var l = function (p0) {
885
+ return $boundThis.gj(p0);
886
+ };
887
+ l.callableName = 'getterNotNull';
888
+ return l;
889
+ }
890
+ function SignedIntFieldFormatDirective(field, minDigits, maxDigits, spacePadding, outputPlusOnExceededWidth) {
891
+ this.mi_1 = field;
892
+ this.ni_1 = minDigits;
893
+ this.oi_1 = maxDigits;
894
+ this.pi_1 = spacePadding;
895
+ this.qi_1 = outputPlusOnExceededWidth;
896
+ // Inline function 'kotlin.require' call
897
+ // Inline function 'kotlin.contracts.contract' call
898
+ if (!(this.ni_1 == null || this.ni_1 >= 0)) {
899
+ // Inline function 'kotlinx.datetime.internal.format.SignedIntFieldFormatDirective.<anonymous>' call
900
+ var message = 'The minimum number of digits (' + this.ni_1 + ') is negative';
901
+ throw IllegalArgumentException_init_$Create$(toString(message));
902
+ }
903
+ // Inline function 'kotlin.require' call
904
+ // Inline function 'kotlin.contracts.contract' call
905
+ if (!(this.oi_1 == null || this.ni_1 == null || this.oi_1 >= this.ni_1)) {
906
+ // Inline function 'kotlinx.datetime.internal.format.SignedIntFieldFormatDirective.<anonymous>' call
907
+ var message_0 = 'The maximum number of digits (' + this.oi_1 + ') is less than the minimum number of digits (' + this.ni_1 + ')';
908
+ throw IllegalArgumentException_init_$Create$(toString(message_0));
909
+ }
910
+ }
911
+ protoOf(SignedIntFieldFormatDirective).ri = function () {
912
+ var tmp = Accessor$getterNotNull$ref(this.mi_1.hj());
913
+ var tmp0_elvis_lhs = this.ni_1;
914
+ var formatter = new SignedIntFormatterStructure(tmp, tmp0_elvis_lhs == null ? 0 : tmp0_elvis_lhs, this.qi_1);
915
+ return !(this.pi_1 == null) ? new SpacePaddedFormatter(formatter, this.pi_1) : formatter;
916
+ };
917
+ protoOf(SignedIntFieldFormatDirective).tg = function () {
918
+ return SignedIntParser(this.ni_1, this.oi_1, this.pi_1, this.mi_1.hj(), this.mi_1.i2(), this.qi_1);
919
+ };
920
+ function Accessor$getterNotNull$ref_0($boundThis) {
921
+ var l = function (p0) {
922
+ return $boundThis.gj(p0);
923
+ };
924
+ l.callableName = 'getterNotNull';
925
+ return l;
926
+ }
927
+ function UnsignedIntFieldFormatDirective(field, minDigits, spacePadding) {
928
+ this.xi_1 = field;
929
+ this.yi_1 = minDigits;
930
+ this.zi_1 = spacePadding;
931
+ this.aj_1 = this.xi_1.oj_1;
932
+ // Inline function 'kotlin.require' call
933
+ // Inline function 'kotlin.contracts.contract' call
934
+ if (!(this.yi_1 >= 0)) {
935
+ // Inline function 'kotlinx.datetime.internal.format.UnsignedIntFieldFormatDirective.<anonymous>' call
936
+ var message = 'The minimum number of digits (' + this.yi_1 + ') is negative';
937
+ throw IllegalArgumentException_init_$Create$(toString(message));
938
+ }
939
+ // Inline function 'kotlin.require' call
940
+ // Inline function 'kotlin.contracts.contract' call
941
+ if (!(this.aj_1 >= this.yi_1)) {
942
+ // Inline function 'kotlinx.datetime.internal.format.UnsignedIntFieldFormatDirective.<anonymous>' call
943
+ var message_0 = 'The maximum number of digits (' + this.aj_1 + ') is less than the minimum number of digits (' + this.yi_1 + ')';
944
+ throw IllegalArgumentException_init_$Create$(toString(message_0));
945
+ }
946
+ if (!(this.zi_1 == null)) {
947
+ // Inline function 'kotlin.require' call
948
+ // Inline function 'kotlin.contracts.contract' call
949
+ if (!(this.zi_1 > this.yi_1)) {
950
+ // Inline function 'kotlinx.datetime.internal.format.UnsignedIntFieldFormatDirective.<anonymous>' call
951
+ var message_1 = 'The space padding (' + this.zi_1 + ') should be more than the minimum number of digits (' + this.yi_1 + ')';
952
+ throw IllegalArgumentException_init_$Create$(toString(message_1));
953
+ }
954
+ }
955
+ }
956
+ protoOf(UnsignedIntFieldFormatDirective).ri = function () {
957
+ var formatter = new UnsignedIntFormatterStructure(Accessor$getterNotNull$ref_0(this.xi_1.ij_1), this.yi_1);
958
+ return !(this.zi_1 == null) ? new SpacePaddedFormatter(formatter, this.zi_1) : formatter;
959
+ };
960
+ protoOf(UnsignedIntFieldFormatDirective).tg = function () {
961
+ return spaceAndZeroPaddedUnsignedInt(this.yi_1, this.aj_1, this.zi_1, this.xi_1.ij_1, this.xi_1.lj_1);
962
+ };
963
+ function GenericFieldSpec(accessor, name, defaultValue, sign) {
964
+ name = name === VOID ? accessor.i2() : name;
965
+ defaultValue = defaultValue === VOID ? null : defaultValue;
966
+ sign = sign === VOID ? null : sign;
967
+ AbstractFieldSpec.call(this);
968
+ this.pj_1 = accessor;
969
+ this.qj_1 = name;
970
+ this.rj_1 = defaultValue;
971
+ this.sj_1 = sign;
972
+ }
973
+ protoOf(GenericFieldSpec).hj = function () {
974
+ return this.pj_1;
975
+ };
976
+ protoOf(GenericFieldSpec).i2 = function () {
977
+ return this.qj_1;
978
+ };
979
+ protoOf(GenericFieldSpec).tj = function () {
980
+ return this.rj_1;
981
+ };
982
+ function PropertyAccessor(property) {
983
+ this.uj_1 = property;
984
+ }
985
+ protoOf(PropertyAccessor).i2 = function () {
986
+ return this.uj_1.callableName;
987
+ };
988
+ protoOf(PropertyAccessor).vj = function (container, newValue) {
989
+ var oldValue = this.uj_1.get(container);
990
+ var tmp;
991
+ if (oldValue === null) {
992
+ this.uj_1.set(container, newValue);
993
+ tmp = null;
994
+ } else if (equals(oldValue, newValue)) {
995
+ tmp = null;
996
+ } else {
997
+ tmp = oldValue;
998
+ }
999
+ return tmp;
1000
+ };
1001
+ protoOf(PropertyAccessor).wj = function (container, newValue) {
1002
+ var tmp = (container == null ? true : !(container == null)) ? container : THROW_CCE();
1003
+ return this.vj(tmp, (newValue == null ? true : !(newValue == null)) ? newValue : THROW_CCE());
1004
+ };
1005
+ protoOf(PropertyAccessor).xj = function (container) {
1006
+ return this.uj_1.get(container);
1007
+ };
1008
+ function UnsignedFieldSpec(accessor, minValue, maxValue, name, defaultValue, sign) {
1009
+ name = name === VOID ? accessor.i2() : name;
1010
+ defaultValue = defaultValue === VOID ? null : defaultValue;
1011
+ sign = sign === VOID ? null : sign;
1012
+ AbstractFieldSpec.call(this);
1013
+ this.ij_1 = accessor;
1014
+ this.jj_1 = minValue;
1015
+ this.kj_1 = maxValue;
1016
+ this.lj_1 = name;
1017
+ this.mj_1 = defaultValue;
1018
+ this.nj_1 = sign;
1019
+ var tmp = this;
1020
+ var tmp_0;
1021
+ if (this.kj_1 < 10) {
1022
+ tmp_0 = 1;
1023
+ } else if (this.kj_1 < 100) {
1024
+ tmp_0 = 2;
1025
+ } else if (this.kj_1 < 1000) {
1026
+ tmp_0 = 3;
1027
+ } else {
1028
+ throw IllegalArgumentException_init_$Create$('Max value ' + this.kj_1 + ' is too large');
1029
+ }
1030
+ tmp.oj_1 = tmp_0;
1031
+ }
1032
+ protoOf(UnsignedFieldSpec).hj = function () {
1033
+ return this.ij_1;
1034
+ };
1035
+ protoOf(UnsignedFieldSpec).i2 = function () {
1036
+ return this.lj_1;
1037
+ };
1038
+ protoOf(UnsignedFieldSpec).tj = function () {
1039
+ return this.mj_1;
1040
+ };
1041
+ function Accessor() {
1042
+ }
1043
+ function AbstractFieldSpec() {
1044
+ }
1045
+ protoOf(AbstractFieldSpec).toString = function () {
1046
+ return 'The field ' + this.i2() + ' (default value is ' + toString_1(this.tj()) + ')';
1047
+ };
1048
+ function CachedFormatStructure(formats) {
1049
+ ConcatenatedFormatStructure.call(this, formats);
1050
+ this.rg_1 = protoOf(ConcatenatedFormatStructure).ri.call(this);
1051
+ this.sg_1 = protoOf(ConcatenatedFormatStructure).tg.call(this);
1052
+ }
1053
+ protoOf(CachedFormatStructure).ri = function () {
1054
+ return this.rg_1;
1055
+ };
1056
+ protoOf(CachedFormatStructure).tg = function () {
1057
+ return this.sg_1;
1058
+ };
1059
+ function BasicFormatStructure(directive) {
1060
+ this.yj_1 = directive;
1061
+ }
1062
+ protoOf(BasicFormatStructure).toString = function () {
1063
+ return 'BasicFormatStructure(' + toString(this.yj_1) + ')';
1064
+ };
1065
+ protoOf(BasicFormatStructure).equals = function (other) {
1066
+ var tmp;
1067
+ if (other instanceof BasicFormatStructure) {
1068
+ tmp = equals(this.yj_1, other.yj_1);
1069
+ } else {
1070
+ tmp = false;
1071
+ }
1072
+ return tmp;
1073
+ };
1074
+ protoOf(BasicFormatStructure).hashCode = function () {
1075
+ return hashCode(this.yj_1);
1076
+ };
1077
+ protoOf(BasicFormatStructure).tg = function () {
1078
+ return this.yj_1.tg();
1079
+ };
1080
+ protoOf(BasicFormatStructure).ri = function () {
1081
+ return this.yj_1.ri();
1082
+ };
1083
+ function ConstantFormatStructure(string) {
1084
+ this.zj_1 = string;
1085
+ }
1086
+ protoOf(ConstantFormatStructure).toString = function () {
1087
+ return 'ConstantFormatStructure(' + this.zj_1 + ')';
1088
+ };
1089
+ protoOf(ConstantFormatStructure).equals = function (other) {
1090
+ var tmp;
1091
+ if (other instanceof ConstantFormatStructure) {
1092
+ tmp = this.zj_1 === other.zj_1;
1093
+ } else {
1094
+ tmp = false;
1095
+ }
1096
+ return tmp;
1097
+ };
1098
+ protoOf(ConstantFormatStructure).hashCode = function () {
1099
+ return getStringHashCode(this.zj_1);
1100
+ };
1101
+ protoOf(ConstantFormatStructure).tg = function () {
1102
+ var tmp;
1103
+ // Inline function 'kotlin.text.isEmpty' call
1104
+ var this_0 = this.zj_1;
1105
+ if (charSequenceLength(this_0) === 0) {
1106
+ tmp = emptyList();
1107
+ } else {
1108
+ // Inline function 'kotlin.collections.buildList' call
1109
+ // Inline function 'kotlin.contracts.contract' call
1110
+ // Inline function 'kotlin.collections.buildListInternal' call
1111
+ // Inline function 'kotlin.apply' call
1112
+ var this_1 = ArrayList_init_$Create$();
1113
+ // Inline function 'kotlin.contracts.contract' call
1114
+ // Inline function 'kotlinx.datetime.internal.format.ConstantFormatStructure.parser.<anonymous>' call
1115
+ var tmp_0;
1116
+ if (isAsciiDigit(charSequenceGet(this.zj_1, 0))) {
1117
+ var tmp$ret$4;
1118
+ $l$block: {
1119
+ // Inline function 'kotlin.text.takeWhile' call
1120
+ var this_2 = this.zj_1;
1121
+ var inductionVariable = 0;
1122
+ var last = this_2.length;
1123
+ if (inductionVariable < last)
1124
+ do {
1125
+ var index = inductionVariable;
1126
+ inductionVariable = inductionVariable + 1 | 0;
1127
+ // Inline function 'kotlinx.datetime.internal.format.ConstantFormatStructure.parser.<anonymous>.<anonymous>' call
1128
+ var it = charSequenceGet(this_2, index);
1129
+ if (!isAsciiDigit(it)) {
1130
+ // Inline function 'kotlin.text.substring' call
1131
+ // Inline function 'kotlin.js.asDynamic' call
1132
+ tmp$ret$4 = this_2.substring(0, index);
1133
+ break $l$block;
1134
+ }
1135
+ }
1136
+ while (inductionVariable < last);
1137
+ tmp$ret$4 = this_2;
1138
+ }
1139
+ this_1.e(new NumberSpanParserOperation(listOf(new ConstantNumberConsumer(tmp$ret$4))));
1140
+ var tmp$ret$8;
1141
+ $l$block_0: {
1142
+ // Inline function 'kotlin.text.dropWhile' call
1143
+ var this_3 = this.zj_1;
1144
+ var inductionVariable_0 = 0;
1145
+ var last_0 = charSequenceLength(this_3) - 1 | 0;
1146
+ if (inductionVariable_0 <= last_0)
1147
+ do {
1148
+ var index_0 = inductionVariable_0;
1149
+ inductionVariable_0 = inductionVariable_0 + 1 | 0;
1150
+ // Inline function 'kotlinx.datetime.internal.format.ConstantFormatStructure.parser.<anonymous>.<anonymous>' call
1151
+ var it_0 = charSequenceGet(this_3, index_0);
1152
+ if (!isAsciiDigit(it_0)) {
1153
+ // Inline function 'kotlin.text.substring' call
1154
+ // Inline function 'kotlin.js.asDynamic' call
1155
+ tmp$ret$8 = this_3.substring(index_0);
1156
+ break $l$block_0;
1157
+ }
1158
+ }
1159
+ while (inductionVariable_0 <= last_0);
1160
+ tmp$ret$8 = '';
1161
+ }
1162
+ tmp_0 = tmp$ret$8;
1163
+ } else {
1164
+ tmp_0 = this.zj_1;
1165
+ }
1166
+ var suffix = tmp_0;
1167
+ // Inline function 'kotlin.text.isNotEmpty' call
1168
+ if (charSequenceLength(suffix) > 0) {
1169
+ if (isAsciiDigit(charSequenceGet(suffix, suffix.length - 1 | 0))) {
1170
+ var tmp$ret$13;
1171
+ $l$block_1: {
1172
+ // Inline function 'kotlin.text.dropLastWhile' call
1173
+ var inductionVariable_1 = get_lastIndex(suffix);
1174
+ if (0 <= inductionVariable_1)
1175
+ do {
1176
+ var index_1 = inductionVariable_1;
1177
+ inductionVariable_1 = inductionVariable_1 + -1 | 0;
1178
+ // Inline function 'kotlinx.datetime.internal.format.ConstantFormatStructure.parser.<anonymous>.<anonymous>' call
1179
+ var it_1 = charSequenceGet(suffix, index_1);
1180
+ if (!isAsciiDigit(it_1)) {
1181
+ // Inline function 'kotlin.text.substring' call
1182
+ var endIndex = index_1 + 1 | 0;
1183
+ // Inline function 'kotlin.js.asDynamic' call
1184
+ tmp$ret$13 = suffix.substring(0, endIndex);
1185
+ break $l$block_1;
1186
+ }
1187
+ }
1188
+ while (0 <= inductionVariable_1);
1189
+ tmp$ret$13 = '';
1190
+ }
1191
+ this_1.e(new PlainStringParserOperation(tmp$ret$13));
1192
+ var tmp$ret$17;
1193
+ $l$block_2: {
1194
+ // Inline function 'kotlin.text.takeLastWhile' call
1195
+ var inductionVariable_2 = get_lastIndex(suffix);
1196
+ if (0 <= inductionVariable_2)
1197
+ do {
1198
+ var index_2 = inductionVariable_2;
1199
+ inductionVariable_2 = inductionVariable_2 + -1 | 0;
1200
+ // Inline function 'kotlinx.datetime.internal.format.ConstantFormatStructure.parser.<anonymous>.<anonymous>' call
1201
+ var it_2 = charSequenceGet(suffix, index_2);
1202
+ if (!isAsciiDigit(it_2)) {
1203
+ // Inline function 'kotlin.text.substring' call
1204
+ var startIndex = index_2 + 1 | 0;
1205
+ // Inline function 'kotlin.js.asDynamic' call
1206
+ tmp$ret$17 = suffix.substring(startIndex);
1207
+ break $l$block_2;
1208
+ }
1209
+ }
1210
+ while (0 <= inductionVariable_2);
1211
+ tmp$ret$17 = suffix;
1212
+ }
1213
+ this_1.e(new NumberSpanParserOperation(listOf(new ConstantNumberConsumer(tmp$ret$17))));
1214
+ } else {
1215
+ this_1.e(new PlainStringParserOperation(suffix));
1216
+ }
1217
+ }
1218
+ tmp = this_1.d5();
1219
+ }
1220
+ return new ParserStructure(tmp, emptyList());
1221
+ };
1222
+ protoOf(ConstantFormatStructure).ri = function () {
1223
+ return new ConstantStringFormatterStructure(this.zj_1);
1224
+ };
1225
+ function ConcatenatedFormatStructure(formats) {
1226
+ this.fh_1 = formats;
1227
+ }
1228
+ protoOf(ConcatenatedFormatStructure).toString = function () {
1229
+ return 'ConcatenatedFormatStructure(' + joinToString(this.fh_1, ', ') + ')';
1230
+ };
1231
+ protoOf(ConcatenatedFormatStructure).equals = function (other) {
1232
+ var tmp;
1233
+ if (other instanceof ConcatenatedFormatStructure) {
1234
+ tmp = equals(this.fh_1, other.fh_1);
1235
+ } else {
1236
+ tmp = false;
1237
+ }
1238
+ return tmp;
1239
+ };
1240
+ protoOf(ConcatenatedFormatStructure).hashCode = function () {
1241
+ return hashCode(this.fh_1);
1242
+ };
1243
+ protoOf(ConcatenatedFormatStructure).tg = function () {
1244
+ // Inline function 'kotlin.collections.map' call
1245
+ var this_0 = this.fh_1;
1246
+ // Inline function 'kotlin.collections.mapTo' call
1247
+ var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
1248
+ var tmp0_iterator = this_0.j();
1249
+ while (tmp0_iterator.k()) {
1250
+ var item = tmp0_iterator.l();
1251
+ // Inline function 'kotlinx.datetime.internal.format.ConcatenatedFormatStructure.parser.<anonymous>' call
1252
+ var tmp$ret$0 = item.tg();
1253
+ destination.e(tmp$ret$0);
1254
+ }
1255
+ return concat(destination);
1256
+ };
1257
+ protoOf(ConcatenatedFormatStructure).ri = function () {
1258
+ // Inline function 'kotlin.collections.map' call
1259
+ var this_0 = this.fh_1;
1260
+ // Inline function 'kotlin.collections.mapTo' call
1261
+ var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
1262
+ var tmp0_iterator = this_0.j();
1263
+ while (tmp0_iterator.k()) {
1264
+ var item = tmp0_iterator.l();
1265
+ // Inline function 'kotlinx.datetime.internal.format.ConcatenatedFormatStructure.formatter.<anonymous>' call
1266
+ var tmp$ret$0 = item.ri();
1267
+ destination.e(tmp$ret$0);
1268
+ }
1269
+ var formatters = destination;
1270
+ var tmp;
1271
+ if (formatters.o() === 1) {
1272
+ tmp = single(formatters);
1273
+ } else {
1274
+ tmp = new ConcatenatedFormatter(formatters);
1275
+ }
1276
+ return tmp;
1277
+ };
1278
+ function NonConcatenatedFormatStructure() {
1279
+ }
1280
+ function SpacePaddedFormatter(formatter, padding) {
1281
+ this.ak_1 = formatter;
1282
+ this.bk_1 = padding;
1283
+ }
1284
+ function ConcatenatedFormatter(formatters) {
1285
+ this.ck_1 = formatters;
1286
+ }
1287
+ function SignedIntFormatterStructure(number, zeroPadding, outputPlusOnExceededWidth) {
1288
+ this.dk_1 = number;
1289
+ this.ek_1 = zeroPadding;
1290
+ this.fk_1 = outputPlusOnExceededWidth;
1291
+ // Inline function 'kotlin.require' call
1292
+ // Inline function 'kotlin.contracts.contract' call
1293
+ if (!(this.ek_1 >= 0)) {
1294
+ // Inline function 'kotlinx.datetime.internal.format.formatter.SignedIntFormatterStructure.<anonymous>' call
1295
+ var message = 'The minimum number of digits (' + this.ek_1 + ') is negative';
1296
+ throw IllegalArgumentException_init_$Create$(toString(message));
1297
+ }
1298
+ // Inline function 'kotlin.require' call
1299
+ // Inline function 'kotlin.contracts.contract' call
1300
+ if (!(this.ek_1 <= 9)) {
1301
+ // Inline function 'kotlinx.datetime.internal.format.formatter.SignedIntFormatterStructure.<anonymous>' call
1302
+ var message_0 = 'The minimum number of digits (' + this.ek_1 + ') exceeds the length of an Int';
1303
+ throw IllegalArgumentException_init_$Create$(toString(message_0));
1304
+ }
1305
+ }
1306
+ function UnsignedIntFormatterStructure(number, zeroPadding) {
1307
+ this.gk_1 = number;
1308
+ this.hk_1 = zeroPadding;
1309
+ // Inline function 'kotlin.require' call
1310
+ // Inline function 'kotlin.contracts.contract' call
1311
+ if (!(this.hk_1 >= 0)) {
1312
+ // Inline function 'kotlinx.datetime.internal.format.formatter.UnsignedIntFormatterStructure.<anonymous>' call
1313
+ var message = 'The minimum number of digits (' + this.hk_1 + ') is negative';
1314
+ throw IllegalArgumentException_init_$Create$(toString(message));
1315
+ }
1316
+ // Inline function 'kotlin.require' call
1317
+ // Inline function 'kotlin.contracts.contract' call
1318
+ if (!(this.hk_1 <= 9)) {
1319
+ // Inline function 'kotlinx.datetime.internal.format.formatter.UnsignedIntFormatterStructure.<anonymous>' call
1320
+ var message_0 = 'The minimum number of digits (' + this.hk_1 + ') exceeds the length of an Int';
1321
+ throw IllegalArgumentException_init_$Create$(toString(message_0));
1322
+ }
1323
+ }
1324
+ function ConstantStringFormatterStructure(string) {
1325
+ this.ik_1 = string;
1326
+ }
1327
+ function ConstantNumberConsumer(expected) {
1328
+ NumberConsumer.call(this, expected.length, 'the predefined string ' + expected);
1329
+ this.lk_1 = expected;
1330
+ }
1331
+ protoOf(ConstantNumberConsumer).mk = function (storage, input, start, end) {
1332
+ var tmp;
1333
+ // Inline function 'kotlin.text.substring' call
1334
+ if (toString(charSequenceSubSequence(input, start, end)) === this.lk_1) {
1335
+ tmp = null;
1336
+ } else {
1337
+ tmp = new WrongConstant(this.lk_1);
1338
+ }
1339
+ return tmp;
1340
+ };
1341
+ function NumberConsumer(length, whatThisExpects) {
1342
+ this.nk_1 = length;
1343
+ this.ok_1 = whatThisExpects;
1344
+ }
1345
+ protoOf(NumberConsumer).a = function () {
1346
+ return this.nk_1;
1347
+ };
1348
+ function ExpectedInt() {
1349
+ }
1350
+ protoOf(ExpectedInt).pk = function () {
1351
+ return 'expected an Int value';
1352
+ };
1353
+ var ExpectedInt_instance;
1354
+ function ExpectedInt_getInstance() {
1355
+ return ExpectedInt_instance;
1356
+ }
1357
+ function TooManyDigits(maxDigits) {
1358
+ this.qk_1 = maxDigits;
1359
+ }
1360
+ protoOf(TooManyDigits).pk = function () {
1361
+ return 'expected at most ' + this.qk_1 + ' digits';
1362
+ };
1363
+ function TooFewDigits(minDigits) {
1364
+ this.rk_1 = minDigits;
1365
+ }
1366
+ protoOf(TooFewDigits).pk = function () {
1367
+ return 'expected at least ' + this.rk_1 + ' digits';
1368
+ };
1369
+ function WrongConstant(expected) {
1370
+ this.sk_1 = expected;
1371
+ }
1372
+ protoOf(WrongConstant).pk = function () {
1373
+ return "expected '" + this.sk_1 + "'";
1374
+ };
1375
+ function Conflicting(conflicting) {
1376
+ this.tk_1 = conflicting;
1377
+ }
1378
+ protoOf(Conflicting).pk = function () {
1379
+ return "attempted to overwrite the existing value '" + toString(this.tk_1) + "'";
1380
+ };
1381
+ function setWithoutReassigning(_this__u8e3s4, receiver, value) {
1382
+ var tmp0_elvis_lhs = _this__u8e3s4.wj(receiver, value);
1383
+ var tmp;
1384
+ if (tmp0_elvis_lhs == null) {
1385
+ return null;
1386
+ } else {
1387
+ tmp = tmp0_elvis_lhs;
1388
+ }
1389
+ var conflictingValue = tmp;
1390
+ return new Conflicting(conflictingValue);
1391
+ }
1392
+ function UnsignedIntConsumer(minLength, maxLength, setter, name, multiplyByMinus1) {
1393
+ multiplyByMinus1 = multiplyByMinus1 === VOID ? false : multiplyByMinus1;
1394
+ NumberConsumer.call(this, minLength == maxLength ? minLength : null, name);
1395
+ this.wk_1 = minLength;
1396
+ this.xk_1 = maxLength;
1397
+ this.yk_1 = setter;
1398
+ this.zk_1 = multiplyByMinus1;
1399
+ // Inline function 'kotlin.require' call
1400
+ // Inline function 'kotlin.contracts.contract' call
1401
+ if (!(this.a() == null || numberRangeToNumber(1, 9).ge(this.a()))) {
1402
+ // Inline function 'kotlinx.datetime.internal.format.parser.UnsignedIntConsumer.<anonymous>' call
1403
+ var message = 'Invalid length for field ' + this.ok_1 + ': ' + this.a();
1404
+ throw IllegalArgumentException_init_$Create$(toString(message));
1405
+ }
1406
+ }
1407
+ protoOf(UnsignedIntConsumer).mk = function (storage, input, start, end) {
1408
+ var tmp;
1409
+ if (!(this.xk_1 == null) && (end - start | 0) > this.xk_1) {
1410
+ tmp = new TooManyDigits(this.xk_1);
1411
+ } else if (!(this.wk_1 == null) && (end - start | 0) < this.wk_1) {
1412
+ tmp = new TooFewDigits(this.wk_1);
1413
+ } else {
1414
+ var result = parseAsciiIntOrNull(input, start, end);
1415
+ tmp = result == null ? ExpectedInt_instance : setWithoutReassigning(this.yk_1, storage, this.zk_1 ? -result | 0 : result);
1416
+ }
1417
+ return tmp;
1418
+ };
1419
+ function parseAsciiIntOrNull(_this__u8e3s4, start, end) {
1420
+ var result = 0;
1421
+ var inductionVariable = start;
1422
+ if (inductionVariable < end)
1423
+ do {
1424
+ var i = inductionVariable;
1425
+ inductionVariable = inductionVariable + 1 | 0;
1426
+ var digit = charSequenceGet(_this__u8e3s4, i);
1427
+ result = imul(result, 10) + asciiDigitToInt(digit) | 0;
1428
+ if (result < 0)
1429
+ return null;
1430
+ }
1431
+ while (inductionVariable < end);
1432
+ return result;
1433
+ }
1434
+ function ParseError(position, message) {
1435
+ this.al_1 = position;
1436
+ this.bl_1 = message;
1437
+ }
1438
+ function _ParseResult___init__impl__gvz3cn(value) {
1439
+ return value;
1440
+ }
1441
+ function _ParseResult___get_value__impl__86mnxf($this) {
1442
+ return $this;
1443
+ }
1444
+ function Companion_2() {
1445
+ }
1446
+ protoOf(Companion_2).cl = function (indexOfNextUnparsed) {
1447
+ return _ParseResult___init__impl__gvz3cn(indexOfNextUnparsed);
1448
+ };
1449
+ protoOf(Companion_2).dl = function (position, message) {
1450
+ return _ParseResult___init__impl__gvz3cn(new ParseError(position, message));
1451
+ };
1452
+ var Companion_instance_2;
1453
+ function Companion_getInstance_2() {
1454
+ return Companion_instance_2;
1455
+ }
1456
+ function _Parser___init__impl__gdyfby(commands) {
1457
+ return commands;
1458
+ }
1459
+ function _get_commands__a20n1($this) {
1460
+ return $this;
1461
+ }
1462
+ function Parser__match_impl_nzt83d($this, input, initialContainer, startIndex) {
1463
+ // Inline function 'kotlin.collections.mutableListOf' call
1464
+ var errors = ArrayList_init_$Create$();
1465
+ // Inline function 'kotlinx.datetime.internal.format.parser.Parser.parse' call
1466
+ var parseOptions = mutableListOf([new ParserState(initialContainer, _get_commands__a20n1($this), startIndex)]);
1467
+ iterate_over_alternatives: while (true) {
1468
+ var tmp0_elvis_lhs = removeLastOrNull(parseOptions);
1469
+ var tmp;
1470
+ if (tmp0_elvis_lhs == null) {
1471
+ break iterate_over_alternatives;
1472
+ } else {
1473
+ tmp = tmp0_elvis_lhs;
1474
+ }
1475
+ var state = tmp;
1476
+ var output = state.el_1.vh();
1477
+ var inputPosition = state.gl_1;
1478
+ var parserStructure = state.fl_1;
1479
+ // Inline function 'kotlin.run' call
1480
+ var this_0 = new Parser($this);
1481
+ // Inline function 'kotlin.contracts.contract' call
1482
+ $l$block: {
1483
+ // Inline function 'kotlinx.datetime.internal.format.parser.Parser.parse.<anonymous>' call
1484
+ this_0.hl_1;
1485
+ var inductionVariable = 0;
1486
+ var last = parserStructure.il_1.o() - 1 | 0;
1487
+ if (inductionVariable <= last)
1488
+ do {
1489
+ var ix = inductionVariable;
1490
+ inductionVariable = inductionVariable + 1 | 0;
1491
+ // Inline function 'kotlinx.datetime.internal.format.parser.ParseResult.match' call
1492
+ var this_1 = parserStructure.il_1.n(ix).kl(output, input, inputPosition);
1493
+ var tmp0_subject = _ParseResult___get_value__impl__86mnxf(this_1);
1494
+ var tmp_0;
1495
+ if (typeof tmp0_subject === 'number') {
1496
+ inputPosition = _ParseResult___get_value__impl__86mnxf(this_1);
1497
+ tmp_0 = Unit_instance;
1498
+ } else {
1499
+ if (tmp0_subject instanceof ParseError) {
1500
+ // Inline function 'kotlinx.datetime.internal.format.parser.Parser.match.<anonymous>' call
1501
+ var it = _ParseResult___get_value__impl__86mnxf(this_1);
1502
+ errors.e(it);
1503
+ break $l$block;
1504
+ } else {
1505
+ var message = 'Unexpected parse result: ' + toString(_ParseResult___get_value__impl__86mnxf(this_1));
1506
+ throw IllegalStateException_init_$Create$(toString(message));
1507
+ }
1508
+ }
1509
+ }
1510
+ while (inductionVariable <= last);
1511
+ if (parserStructure.jl_1.m()) {
1512
+ if (false || inputPosition === charSequenceLength(input)) {
1513
+ // Inline function 'kotlinx.datetime.internal.format.parser.Parser.match.<anonymous>' call
1514
+ return output;
1515
+ } else {
1516
+ // Inline function 'kotlinx.datetime.internal.format.parser.Parser.match.<anonymous>' call
1517
+ var tmp_1 = inputPosition;
1518
+ var it_0 = new ParseError(tmp_1, Parser$match$lambda);
1519
+ errors.e(it_0);
1520
+ }
1521
+ } else {
1522
+ var inductionVariable_0 = parserStructure.jl_1.o() - 1 | 0;
1523
+ if (0 <= inductionVariable_0)
1524
+ do {
1525
+ var ix_0 = inductionVariable_0;
1526
+ inductionVariable_0 = inductionVariable_0 + -1 | 0;
1527
+ parseOptions.e(new ParserState(output, parserStructure.jl_1.n(ix_0), inputPosition));
1528
+ }
1529
+ while (0 <= inductionVariable_0);
1530
+ }
1531
+ }
1532
+ }
1533
+ // Inline function 'kotlin.collections.sortByDescending' call
1534
+ if (errors.o() > 1) {
1535
+ // Inline function 'kotlin.comparisons.compareByDescending' call
1536
+ var tmp_2 = Parser$match$lambda_0;
1537
+ var tmp$ret$4 = new sam$kotlin_Comparator$0(tmp_2);
1538
+ sortWith(errors, tmp$ret$4);
1539
+ }
1540
+ throw new ParseException(errors);
1541
+ }
1542
+ function Parser__match$default_impl_x2xlti($this, input, initialContainer, startIndex, $super) {
1543
+ startIndex = startIndex === VOID ? 0 : startIndex;
1544
+ var tmp;
1545
+ if ($super === VOID) {
1546
+ tmp = Parser__match_impl_nzt83d($this, input, initialContainer, startIndex);
1547
+ } else {
1548
+ var tmp_0 = $super;
1549
+ tmp = (tmp_0 == null ? null : new Parser(tmp_0)).ll.call(new Parser($this), input, initialContainer, startIndex);
1550
+ }
1551
+ return tmp;
1552
+ }
1553
+ function ParserState(output, parserStructure, inputPosition) {
1554
+ this.el_1 = output;
1555
+ this.fl_1 = parserStructure;
1556
+ this.gl_1 = inputPosition;
1557
+ }
1558
+ function Parser__toString_impl_x33iea($this) {
1559
+ return 'Parser(commands=' + $this.toString() + ')';
1560
+ }
1561
+ function Parser__hashCode_impl_bbxllf($this) {
1562
+ return hashCode($this);
1563
+ }
1564
+ function Parser__equals_impl_djxokv($this, other) {
1565
+ if (!(other instanceof Parser))
1566
+ return false;
1567
+ var tmp0_other_with_cast = other instanceof Parser ? other.hl_1 : THROW_CCE();
1568
+ if (!equals($this, tmp0_other_with_cast))
1569
+ return false;
1570
+ return true;
1571
+ }
1572
+ function sam$kotlin_Comparator$0(function_0) {
1573
+ this.ml_1 = function_0;
1574
+ }
1575
+ protoOf(sam$kotlin_Comparator$0).mb = function (a, b) {
1576
+ return this.ml_1(a, b);
1577
+ };
1578
+ protoOf(sam$kotlin_Comparator$0).compare = function (a, b) {
1579
+ return this.mb(a, b);
1580
+ };
1581
+ protoOf(sam$kotlin_Comparator$0).e3 = function () {
1582
+ return this.ml_1;
1583
+ };
1584
+ protoOf(sam$kotlin_Comparator$0).equals = function (other) {
1585
+ var tmp;
1586
+ if (!(other == null) ? isInterface(other, Comparator) : false) {
1587
+ var tmp_0;
1588
+ if (!(other == null) ? isInterface(other, FunctionAdapter) : false) {
1589
+ tmp_0 = equals(this.e3(), other.e3());
1590
+ } else {
1591
+ tmp_0 = false;
1592
+ }
1593
+ tmp = tmp_0;
1594
+ } else {
1595
+ tmp = false;
1596
+ }
1597
+ return tmp;
1598
+ };
1599
+ protoOf(sam$kotlin_Comparator$0).hashCode = function () {
1600
+ return hashCode(this.e3());
1601
+ };
1602
+ function Parser$match$lambda() {
1603
+ return 'There is more input to consume';
1604
+ }
1605
+ function Parser$match$lambda_0(a, b) {
1606
+ // Inline function 'kotlin.comparisons.compareValuesBy' call
1607
+ // Inline function 'kotlinx.datetime.internal.format.parser.Parser.match.<anonymous>' call
1608
+ var tmp = b.al_1;
1609
+ // Inline function 'kotlinx.datetime.internal.format.parser.Parser.match.<anonymous>' call
1610
+ var tmp$ret$1 = a.al_1;
1611
+ return compareValues(tmp, tmp$ret$1);
1612
+ }
1613
+ function Parser(commands) {
1614
+ this.hl_1 = commands;
1615
+ }
1616
+ protoOf(Parser).toString = function () {
1617
+ return Parser__toString_impl_x33iea(this.hl_1);
1618
+ };
1619
+ protoOf(Parser).hashCode = function () {
1620
+ return Parser__hashCode_impl_bbxllf(this.hl_1);
1621
+ };
1622
+ protoOf(Parser).equals = function (other) {
1623
+ return Parser__equals_impl_djxokv(this.hl_1, other);
1624
+ };
1625
+ function ParserStructure(operations, followedBy) {
1626
+ this.il_1 = operations;
1627
+ this.jl_1 = followedBy;
1628
+ }
1629
+ protoOf(ParserStructure).toString = function () {
1630
+ return joinToString(this.il_1, ', ') + '(' + joinToString(this.jl_1, ';') + ')';
1631
+ };
1632
+ function ParseException(errors) {
1633
+ Exception_init_$Init$(formatError(errors), this);
1634
+ captureStack(this, ParseException);
1635
+ }
1636
+ function concat(_this__u8e3s4) {
1637
+ // Inline function 'kotlin.collections.foldRight' call
1638
+ var accumulator = new ParserStructure(emptyList(), emptyList());
1639
+ if (!_this__u8e3s4.m()) {
1640
+ var iterator = _this__u8e3s4.q(_this__u8e3s4.o());
1641
+ while (iterator.j4()) {
1642
+ // Inline function 'kotlinx.datetime.internal.format.parser.concat.<anonymous>' call
1643
+ var parser = iterator.l4();
1644
+ var acc = accumulator;
1645
+ accumulator = concat$append(parser, acc);
1646
+ }
1647
+ }
1648
+ var naiveParser = accumulator;
1649
+ return concat$simplify(naiveParser, emptyList());
1650
+ }
1651
+ function formatError(errors) {
1652
+ if (errors.o() === 1) {
1653
+ return 'Position ' + errors.n(0).al_1 + ': ' + errors.n(0).bl_1();
1654
+ }
1655
+ var averageMessageLength = 33;
1656
+ var tmp0_buffer = StringBuilder_init_$Create$_0(imul(averageMessageLength, errors.o()));
1657
+ return joinTo(errors, tmp0_buffer, ', ', 'Errors: ', VOID, VOID, VOID, formatError$lambda).toString();
1658
+ }
1659
+ function concat$append(_this__u8e3s4, other) {
1660
+ var tmp;
1661
+ if (_this__u8e3s4.jl_1.m()) {
1662
+ tmp = new ParserStructure(plus(_this__u8e3s4.il_1, other.il_1), other.jl_1);
1663
+ } else {
1664
+ // Inline function 'kotlin.collections.map' call
1665
+ var this_0 = _this__u8e3s4.jl_1;
1666
+ // Inline function 'kotlin.collections.mapTo' call
1667
+ var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
1668
+ var tmp0_iterator = this_0.j();
1669
+ while (tmp0_iterator.k()) {
1670
+ var item = tmp0_iterator.l();
1671
+ // Inline function 'kotlinx.datetime.internal.format.parser.concat.append.<anonymous>' call
1672
+ var tmp$ret$0 = concat$append(item, other);
1673
+ destination.e(tmp$ret$0);
1674
+ }
1675
+ tmp = new ParserStructure(_this__u8e3s4.il_1, destination);
1676
+ }
1677
+ return tmp;
1678
+ }
1679
+ function concat$simplify(_this__u8e3s4, unconditionalModifications) {
1680
+ // Inline function 'kotlin.collections.mutableListOf' call
1681
+ var newOperations = ArrayList_init_$Create$();
1682
+ var currentNumberSpan = null;
1683
+ var unconditionalModificationsForTails = toMutableList(unconditionalModifications);
1684
+ var tmp0_iterator = _this__u8e3s4.il_1.j();
1685
+ while (tmp0_iterator.k()) {
1686
+ var op = tmp0_iterator.l();
1687
+ if (op instanceof NumberSpanParserOperation) {
1688
+ if (!(currentNumberSpan == null)) {
1689
+ currentNumberSpan.p(op.nl_1);
1690
+ } else {
1691
+ currentNumberSpan = toMutableList(op.nl_1);
1692
+ }
1693
+ } else {
1694
+ if (op instanceof UnconditionalModification) {
1695
+ unconditionalModificationsForTails.e(op);
1696
+ } else {
1697
+ if (!(currentNumberSpan == null)) {
1698
+ newOperations.e(new NumberSpanParserOperation(currentNumberSpan));
1699
+ currentNumberSpan = null;
1700
+ }
1701
+ newOperations.e(op);
1702
+ }
1703
+ }
1704
+ }
1705
+ // Inline function 'kotlin.collections.ifEmpty' call
1706
+ // Inline function 'kotlin.collections.flatMap' call
1707
+ // Inline function 'kotlin.collections.flatMapTo' call
1708
+ var this_0 = _this__u8e3s4.jl_1;
1709
+ var destination = ArrayList_init_$Create$();
1710
+ var tmp0_iterator_0 = this_0.j();
1711
+ while (tmp0_iterator_0.k()) {
1712
+ var element = tmp0_iterator_0.l();
1713
+ // Inline function 'kotlinx.datetime.internal.format.parser.concat.simplify.<anonymous>' call
1714
+ var simplified = concat$simplify(element, unconditionalModificationsForTails);
1715
+ var tmp;
1716
+ if (simplified.il_1.m()) {
1717
+ // Inline function 'kotlin.collections.ifEmpty' call
1718
+ var this_1 = simplified.jl_1;
1719
+ // Inline function 'kotlin.contracts.contract' call
1720
+ var tmp_0;
1721
+ if (this_1.m()) {
1722
+ // Inline function 'kotlinx.datetime.internal.format.parser.concat.simplify.<anonymous>.<anonymous>' call
1723
+ tmp_0 = listOf(simplified);
1724
+ } else {
1725
+ tmp_0 = this_1;
1726
+ }
1727
+ tmp = tmp_0;
1728
+ } else {
1729
+ tmp = listOf(simplified);
1730
+ }
1731
+ var list = tmp;
1732
+ addAll(destination, list);
1733
+ }
1734
+ // Inline function 'kotlin.contracts.contract' call
1735
+ var tmp_1;
1736
+ if (destination.m()) {
1737
+ // Inline function 'kotlinx.datetime.internal.format.parser.concat.simplify.<anonymous>' call
1738
+ tmp_1 = listOf(new ParserStructure(unconditionalModificationsForTails, emptyList()));
1739
+ } else {
1740
+ tmp_1 = destination;
1741
+ }
1742
+ var mergedTails = tmp_1;
1743
+ var tmp_2;
1744
+ if (currentNumberSpan == null) {
1745
+ tmp_2 = new ParserStructure(newOperations, mergedTails);
1746
+ } else {
1747
+ var tmp$ret$8;
1748
+ $l$block_0: {
1749
+ // Inline function 'kotlin.collections.none' call
1750
+ var tmp_3;
1751
+ if (isInterface(mergedTails, Collection)) {
1752
+ tmp_3 = mergedTails.m();
1753
+ } else {
1754
+ tmp_3 = false;
1755
+ }
1756
+ if (tmp_3) {
1757
+ tmp$ret$8 = true;
1758
+ break $l$block_0;
1759
+ }
1760
+ var tmp0_iterator_1 = mergedTails.j();
1761
+ while (tmp0_iterator_1.k()) {
1762
+ var element_0 = tmp0_iterator_1.l();
1763
+ // Inline function 'kotlinx.datetime.internal.format.parser.concat.simplify.<anonymous>' call
1764
+ var tmp0_safe_receiver = firstOrNull(element_0.il_1);
1765
+ var tmp_4;
1766
+ if (tmp0_safe_receiver == null) {
1767
+ tmp_4 = null;
1768
+ } else {
1769
+ // Inline function 'kotlin.let' call
1770
+ // Inline function 'kotlin.contracts.contract' call
1771
+ // Inline function 'kotlinx.datetime.internal.format.parser.concat.simplify.<anonymous>.<anonymous>' call
1772
+ tmp_4 = tmp0_safe_receiver instanceof NumberSpanParserOperation;
1773
+ }
1774
+ if (tmp_4 === true) {
1775
+ tmp$ret$8 = false;
1776
+ break $l$block_0;
1777
+ }
1778
+ }
1779
+ tmp$ret$8 = true;
1780
+ }
1781
+ if (tmp$ret$8) {
1782
+ newOperations.e(new NumberSpanParserOperation(currentNumberSpan));
1783
+ tmp_2 = new ParserStructure(newOperations, mergedTails);
1784
+ } else {
1785
+ // Inline function 'kotlin.collections.map' call
1786
+ // Inline function 'kotlin.collections.mapTo' call
1787
+ var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(mergedTails, 10));
1788
+ var tmp0_iterator_2 = mergedTails.j();
1789
+ while (tmp0_iterator_2.k()) {
1790
+ var item = tmp0_iterator_2.l();
1791
+ // Inline function 'kotlinx.datetime.internal.format.parser.concat.simplify.<anonymous>' call
1792
+ var firstOperation = firstOrNull(item.il_1);
1793
+ var tmp_5;
1794
+ if (firstOperation instanceof NumberSpanParserOperation) {
1795
+ tmp_5 = new ParserStructure(plus(listOf(new NumberSpanParserOperation(plus(currentNumberSpan, firstOperation.nl_1))), drop(item.il_1, 1)), item.jl_1);
1796
+ } else {
1797
+ if (firstOperation == null) {
1798
+ tmp_5 = new ParserStructure(listOf(new NumberSpanParserOperation(currentNumberSpan)), item.jl_1);
1799
+ } else {
1800
+ tmp_5 = new ParserStructure(plus(listOf(new NumberSpanParserOperation(currentNumberSpan)), item.il_1), item.jl_1);
1801
+ }
1802
+ }
1803
+ var tmp$ret$12 = tmp_5;
1804
+ destination_0.e(tmp$ret$12);
1805
+ }
1806
+ var newTails = destination_0;
1807
+ tmp_2 = new ParserStructure(newOperations, newTails);
1808
+ }
1809
+ }
1810
+ return tmp_2;
1811
+ }
1812
+ function formatError$lambda(it) {
1813
+ return 'position ' + it.al_1 + ": '" + it.bl_1() + "'";
1814
+ }
1815
+ function SignedIntParser(minDigits, maxDigits, spacePadding, setter, name, plusOnExceedsWidth) {
1816
+ var parsers = mutableListOf([spaceAndZeroPaddedUnsignedInt(minDigits, maxDigits, spacePadding, setter, name, true)]);
1817
+ if (!(plusOnExceedsWidth == null)) {
1818
+ parsers.e(spaceAndZeroPaddedUnsignedInt(minDigits, plusOnExceedsWidth, spacePadding, setter, name));
1819
+ parsers.e(new ParserStructure(listOf_0([new PlainStringParserOperation('+'), new NumberSpanParserOperation(listOf(new UnsignedIntConsumer(plusOnExceedsWidth + 1 | 0, maxDigits, setter, name, false)))]), emptyList()));
1820
+ } else {
1821
+ parsers.e(spaceAndZeroPaddedUnsignedInt(minDigits, maxDigits, spacePadding, setter, name));
1822
+ }
1823
+ return new ParserStructure(emptyList(), parsers);
1824
+ }
1825
+ function spaceAndZeroPaddedUnsignedInt(minDigits, maxDigits, spacePadding, setter, name, withMinus) {
1826
+ withMinus = withMinus === VOID ? false : withMinus;
1827
+ var minNumberLength = (minDigits == null ? 1 : minDigits) + (withMinus ? 1 : 0) | 0;
1828
+ var tmp;
1829
+ if (maxDigits == null) {
1830
+ tmp = null;
1831
+ } else {
1832
+ // Inline function 'kotlin.let' call
1833
+ // Inline function 'kotlin.contracts.contract' call
1834
+ // Inline function 'kotlinx.datetime.internal.format.parser.spaceAndZeroPaddedUnsignedInt.<anonymous>' call
1835
+ tmp = withMinus ? maxDigits + 1 | 0 : maxDigits;
1836
+ }
1837
+ var tmp2_elvis_lhs = tmp;
1838
+ var maxNumberLength = tmp2_elvis_lhs == null ? 2147483647 : tmp2_elvis_lhs;
1839
+ var spacePadding_0 = spacePadding == null ? 0 : spacePadding;
1840
+ // Inline function 'kotlin.comparisons.minOf' call
1841
+ var maxPaddedNumberLength = Math.min(maxNumberLength, spacePadding_0);
1842
+ if (minNumberLength >= maxPaddedNumberLength)
1843
+ return spaceAndZeroPaddedUnsignedInt$numberOfRequiredLengths(withMinus, setter, name, minNumberLength, maxNumberLength);
1844
+ var accumulated = spaceAndZeroPaddedUnsignedInt$numberOfRequiredLengths(withMinus, setter, name, minNumberLength, minNumberLength);
1845
+ var inductionVariable = minNumberLength;
1846
+ if (inductionVariable < maxPaddedNumberLength)
1847
+ do {
1848
+ var accumulatedWidth = inductionVariable;
1849
+ inductionVariable = inductionVariable + 1 | 0;
1850
+ accumulated = new ParserStructure(emptyList(), listOf_0([spaceAndZeroPaddedUnsignedInt$numberOfRequiredLengths(withMinus, setter, name, accumulatedWidth + 1 | 0, accumulatedWidth + 1 | 0), concat(listOf_0([new ParserStructure(listOf(new PlainStringParserOperation(' ')), emptyList()), accumulated]))]));
1851
+ }
1852
+ while (inductionVariable < maxPaddedNumberLength);
1853
+ var tmp_0;
1854
+ if (spacePadding_0 > maxNumberLength) {
1855
+ var prepadding = new PlainStringParserOperation(repeat(' ', spacePadding_0 - maxNumberLength | 0));
1856
+ tmp_0 = concat(listOf_0([new ParserStructure(listOf(prepadding), emptyList()), accumulated]));
1857
+ } else if (spacePadding_0 === maxNumberLength) {
1858
+ tmp_0 = accumulated;
1859
+ } else {
1860
+ var r = new ParserStructure(emptyList(), listOf_0([spaceAndZeroPaddedUnsignedInt$numberOfRequiredLengths(withMinus, setter, name, spacePadding_0 + 1 | 0, maxNumberLength), accumulated]));
1861
+ tmp_0 = r;
1862
+ }
1863
+ return tmp_0;
1864
+ }
1865
+ function _get_whatThisExpects__4pg11j($this) {
1866
+ // Inline function 'kotlin.collections.map' call
1867
+ var this_0 = $this.nl_1;
1868
+ // Inline function 'kotlin.collections.mapTo' call
1869
+ var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
1870
+ var tmp0_iterator = this_0.j();
1871
+ while (tmp0_iterator.k()) {
1872
+ var item = tmp0_iterator.l();
1873
+ // Inline function 'kotlinx.datetime.internal.format.parser.NumberSpanParserOperation.<get-whatThisExpects>.<anonymous>' call
1874
+ var length = item.a();
1875
+ var tmp$ret$0 = (length == null ? 'at least one digit' : '' + length + ' digits') + (' for ' + item.ok_1);
1876
+ destination.e(tmp$ret$0);
1877
+ }
1878
+ var consumerLengths = destination;
1879
+ var tmp;
1880
+ if ($this.pl_1) {
1881
+ tmp = 'a number with at least ' + $this.ol_1 + ' digits: ' + toString(consumerLengths);
1882
+ } else {
1883
+ tmp = 'a number with exactly ' + $this.ol_1 + ' digits: ' + toString(consumerLengths);
1884
+ }
1885
+ return tmp;
1886
+ }
1887
+ function NumberSpanParserOperation$consume$lambda(this$0) {
1888
+ return function () {
1889
+ return 'Unexpected end of input: yet to parse ' + _get_whatThisExpects__4pg11j(this$0);
1890
+ };
1891
+ }
1892
+ function NumberSpanParserOperation$consume$lambda_0($digitsInRow, this$0) {
1893
+ return function () {
1894
+ return 'Only found ' + $digitsInRow._v + ' digits in a row, but need to parse ' + _get_whatThisExpects__4pg11j(this$0);
1895
+ };
1896
+ }
1897
+ function NumberSpanParserOperation$consume$lambda_1($numberString, this$0, $i, $error) {
1898
+ return function () {
1899
+ return "Can not interpret the string '" + $numberString + "' as " + this$0.nl_1.n($i).ok_1 + ': ' + $error.pk();
1900
+ };
1901
+ }
1902
+ function NumberSpanParserOperation(consumers) {
1903
+ this.nl_1 = consumers;
1904
+ var tmp = this;
1905
+ // Inline function 'kotlin.collections.sumOf' call
1906
+ var sum = 0;
1907
+ var tmp0_iterator = this.nl_1.j();
1908
+ while (tmp0_iterator.k()) {
1909
+ var element = tmp0_iterator.l();
1910
+ var tmp_0 = sum;
1911
+ // Inline function 'kotlinx.datetime.internal.format.parser.NumberSpanParserOperation.minLength.<anonymous>' call
1912
+ var tmp0_elvis_lhs = element.a();
1913
+ sum = tmp_0 + (tmp0_elvis_lhs == null ? 1 : tmp0_elvis_lhs) | 0;
1914
+ }
1915
+ tmp.ol_1 = sum;
1916
+ var tmp_1 = this;
1917
+ var tmp$ret$2;
1918
+ $l$block_0: {
1919
+ // Inline function 'kotlin.collections.any' call
1920
+ var this_0 = this.nl_1;
1921
+ var tmp_2;
1922
+ if (isInterface(this_0, Collection)) {
1923
+ tmp_2 = this_0.m();
1924
+ } else {
1925
+ tmp_2 = false;
1926
+ }
1927
+ if (tmp_2) {
1928
+ tmp$ret$2 = false;
1929
+ break $l$block_0;
1930
+ }
1931
+ var tmp0_iterator_0 = this_0.j();
1932
+ while (tmp0_iterator_0.k()) {
1933
+ var element_0 = tmp0_iterator_0.l();
1934
+ // Inline function 'kotlinx.datetime.internal.format.parser.NumberSpanParserOperation.isFlexible.<anonymous>' call
1935
+ if (element_0.a() == null) {
1936
+ tmp$ret$2 = true;
1937
+ break $l$block_0;
1938
+ }
1939
+ }
1940
+ tmp$ret$2 = false;
1941
+ }
1942
+ tmp_1.pl_1 = tmp$ret$2;
1943
+ // Inline function 'kotlin.require' call
1944
+ var tmp$ret$4;
1945
+ $l$block_2: {
1946
+ // Inline function 'kotlin.collections.all' call
1947
+ var this_1 = this.nl_1;
1948
+ var tmp_3;
1949
+ if (isInterface(this_1, Collection)) {
1950
+ tmp_3 = this_1.m();
1951
+ } else {
1952
+ tmp_3 = false;
1953
+ }
1954
+ if (tmp_3) {
1955
+ tmp$ret$4 = true;
1956
+ break $l$block_2;
1957
+ }
1958
+ var tmp0_iterator_1 = this_1.j();
1959
+ while (tmp0_iterator_1.k()) {
1960
+ var element_1 = tmp0_iterator_1.l();
1961
+ // Inline function 'kotlinx.datetime.internal.format.parser.NumberSpanParserOperation.<anonymous>' call
1962
+ var tmp0_elvis_lhs_0 = element_1.a();
1963
+ if (!((tmp0_elvis_lhs_0 == null ? 2147483647 : tmp0_elvis_lhs_0) > 0)) {
1964
+ tmp$ret$4 = false;
1965
+ break $l$block_2;
1966
+ }
1967
+ }
1968
+ tmp$ret$4 = true;
1969
+ }
1970
+ // Inline function 'kotlin.contracts.contract' call
1971
+ // Inline function 'kotlin.require' call
1972
+ // Inline function 'kotlin.contracts.contract' call
1973
+ if (!tmp$ret$4) {
1974
+ // Inline function 'kotlin.require.<anonymous>' call
1975
+ var message = 'Failed requirement.';
1976
+ throw IllegalArgumentException_init_$Create$(toString(message));
1977
+ }
1978
+ // Inline function 'kotlin.require' call
1979
+ var tmp$ret$7;
1980
+ $l$block_3: {
1981
+ // Inline function 'kotlin.collections.count' call
1982
+ var this_2 = this.nl_1;
1983
+ var tmp_4;
1984
+ if (isInterface(this_2, Collection)) {
1985
+ tmp_4 = this_2.m();
1986
+ } else {
1987
+ tmp_4 = false;
1988
+ }
1989
+ if (tmp_4) {
1990
+ tmp$ret$7 = 0;
1991
+ break $l$block_3;
1992
+ }
1993
+ var count = 0;
1994
+ var tmp0_iterator_2 = this_2.j();
1995
+ while (tmp0_iterator_2.k()) {
1996
+ var element_2 = tmp0_iterator_2.l();
1997
+ // Inline function 'kotlinx.datetime.internal.format.parser.NumberSpanParserOperation.<anonymous>' call
1998
+ if (element_2.a() == null) {
1999
+ count = count + 1 | 0;
2000
+ checkCountOverflow(count);
2001
+ }
2002
+ }
2003
+ tmp$ret$7 = count;
2004
+ }
2005
+ // Inline function 'kotlin.contracts.contract' call
2006
+ if (!(tmp$ret$7 <= 1)) {
2007
+ // Inline function 'kotlinx.datetime.internal.format.parser.NumberSpanParserOperation.<anonymous>' call
2008
+ // Inline function 'kotlin.collections.map' call
2009
+ // Inline function 'kotlin.collections.filter' call
2010
+ // Inline function 'kotlin.collections.filterTo' call
2011
+ var this_3 = this.nl_1;
2012
+ var destination = ArrayList_init_$Create$();
2013
+ var tmp0_iterator_3 = this_3.j();
2014
+ while (tmp0_iterator_3.k()) {
2015
+ var element_3 = tmp0_iterator_3.l();
2016
+ // Inline function 'kotlinx.datetime.internal.format.parser.NumberSpanParserOperation.<anonymous>.<anonymous>' call
2017
+ if (element_3.a() == null) {
2018
+ destination.e(element_3);
2019
+ }
2020
+ }
2021
+ // Inline function 'kotlin.collections.mapTo' call
2022
+ var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(destination, 10));
2023
+ var tmp0_iterator_4 = destination.j();
2024
+ while (tmp0_iterator_4.k()) {
2025
+ var item = tmp0_iterator_4.l();
2026
+ // Inline function 'kotlinx.datetime.internal.format.parser.NumberSpanParserOperation.<anonymous>.<anonymous>' call
2027
+ var tmp$ret$12 = item.ok_1;
2028
+ destination_0.e(tmp$ret$12);
2029
+ }
2030
+ var fieldNames = destination_0;
2031
+ var message_0 = 'At most one variable-length numeric field in a row is allowed, but got several: ' + toString(fieldNames) + '. ' + 'Parsing is undefined: for example, with variable-length month number ' + "and variable-length day of month, '111' can be parsed as Jan 11th or Nov 1st.";
2032
+ throw IllegalArgumentException_init_$Create$(toString(message_0));
2033
+ }
2034
+ }
2035
+ protoOf(NumberSpanParserOperation).kl = function (storage, input, startIndex) {
2036
+ if ((startIndex + this.ol_1 | 0) > charSequenceLength(input)) {
2037
+ var tmp = Companion_instance_2;
2038
+ return tmp.dl(startIndex, NumberSpanParserOperation$consume$lambda(this));
2039
+ }
2040
+ var digitsInRow = {_v: 0};
2041
+ while ((startIndex + digitsInRow._v | 0) < charSequenceLength(input) && isAsciiDigit(charSequenceGet(input, startIndex + digitsInRow._v | 0))) {
2042
+ digitsInRow._v = digitsInRow._v + 1 | 0;
2043
+ digitsInRow._v;
2044
+ }
2045
+ if (digitsInRow._v < this.ol_1) {
2046
+ var tmp_0 = Companion_instance_2;
2047
+ return tmp_0.dl(startIndex, NumberSpanParserOperation$consume$lambda_0(digitsInRow, this));
2048
+ }
2049
+ var index = startIndex;
2050
+ var inductionVariable = 0;
2051
+ var last = this.nl_1.o() - 1 | 0;
2052
+ if (inductionVariable <= last)
2053
+ do {
2054
+ var i = inductionVariable;
2055
+ inductionVariable = inductionVariable + 1 | 0;
2056
+ var tmp1_elvis_lhs = this.nl_1.n(i).a();
2057
+ var length = tmp1_elvis_lhs == null ? (digitsInRow._v - this.ol_1 | 0) + 1 | 0 : tmp1_elvis_lhs;
2058
+ var error = this.nl_1.n(i).mk(storage, input, index, index + length | 0);
2059
+ if (!(error == null)) {
2060
+ // Inline function 'kotlin.text.substring' call
2061
+ var startIndex_0 = index;
2062
+ var endIndex = index + length | 0;
2063
+ var numberString = toString(charSequenceSubSequence(input, startIndex_0, endIndex));
2064
+ var tmp_1 = Companion_instance_2;
2065
+ var tmp_2 = index;
2066
+ return tmp_1.dl(tmp_2, NumberSpanParserOperation$consume$lambda_1(numberString, this, i, error));
2067
+ }
2068
+ index = index + length | 0;
2069
+ }
2070
+ while (inductionVariable <= last);
2071
+ return Companion_instance_2.cl(index);
2072
+ };
2073
+ protoOf(NumberSpanParserOperation).toString = function () {
2074
+ return _get_whatThisExpects__4pg11j(this);
2075
+ };
2076
+ function PlainStringParserOperation$consume$lambda(this$0) {
2077
+ return function () {
2078
+ return "Unexpected end of input: yet to parse '" + this$0.ql_1 + "'";
2079
+ };
2080
+ }
2081
+ function PlainStringParserOperation$consume$lambda_0(this$0, $input, $startIndex, $i) {
2082
+ return function () {
2083
+ // Inline function 'kotlin.text.substring' call
2084
+ var this_0 = $input;
2085
+ var startIndex = $startIndex;
2086
+ var endIndex = ($startIndex + $i | 0) + 1 | 0;
2087
+ var tmp$ret$0 = toString(charSequenceSubSequence(this_0, startIndex, endIndex));
2088
+ return 'Expected ' + this$0.ql_1 + ' but got ' + tmp$ret$0;
2089
+ };
2090
+ }
2091
+ function PlainStringParserOperation(string) {
2092
+ this.ql_1 = string;
2093
+ // Inline function 'kotlin.require' call
2094
+ // Inline function 'kotlin.text.isNotEmpty' call
2095
+ var this_0 = this.ql_1;
2096
+ // Inline function 'kotlin.contracts.contract' call
2097
+ if (!(charSequenceLength(this_0) > 0)) {
2098
+ // Inline function 'kotlinx.datetime.internal.format.parser.PlainStringParserOperation.<anonymous>' call
2099
+ var message = 'Empty string is not allowed';
2100
+ throw IllegalArgumentException_init_$Create$(toString(message));
2101
+ }
2102
+ // Inline function 'kotlin.require' call
2103
+ // Inline function 'kotlin.contracts.contract' call
2104
+ if (!!isAsciiDigit(charSequenceGet(this.ql_1, 0))) {
2105
+ // Inline function 'kotlinx.datetime.internal.format.parser.PlainStringParserOperation.<anonymous>' call
2106
+ var message_0 = "String '" + this.ql_1 + "' starts with a digit";
2107
+ throw IllegalArgumentException_init_$Create$(toString(message_0));
2108
+ }
2109
+ // Inline function 'kotlin.require' call
2110
+ // Inline function 'kotlin.contracts.contract' call
2111
+ if (!!isAsciiDigit(charSequenceGet(this.ql_1, this.ql_1.length - 1 | 0))) {
2112
+ // Inline function 'kotlinx.datetime.internal.format.parser.PlainStringParserOperation.<anonymous>' call
2113
+ var message_1 = "String '" + this.ql_1 + "' ends with a digit";
2114
+ throw IllegalArgumentException_init_$Create$(toString(message_1));
2115
+ }
2116
+ }
2117
+ protoOf(PlainStringParserOperation).kl = function (storage, input, startIndex) {
2118
+ if ((startIndex + this.ql_1.length | 0) > charSequenceLength(input)) {
2119
+ var tmp = Companion_instance_2;
2120
+ return tmp.dl(startIndex, PlainStringParserOperation$consume$lambda(this));
2121
+ }
2122
+ var inductionVariable = 0;
2123
+ var last = charSequenceLength(this.ql_1) - 1 | 0;
2124
+ if (inductionVariable <= last)
2125
+ do {
2126
+ var i = inductionVariable;
2127
+ inductionVariable = inductionVariable + 1 | 0;
2128
+ if (!(charSequenceGet(input, startIndex + i | 0) === charSequenceGet(this.ql_1, i))) {
2129
+ var tmp_0 = Companion_instance_2;
2130
+ return tmp_0.dl(startIndex, PlainStringParserOperation$consume$lambda_0(this, input, startIndex, i));
2131
+ }
2132
+ }
2133
+ while (inductionVariable <= last);
2134
+ return Companion_instance_2.cl(startIndex + this.ql_1.length | 0);
2135
+ };
2136
+ protoOf(PlainStringParserOperation).toString = function () {
2137
+ return "'" + this.ql_1 + "'";
2138
+ };
2139
+ function UnconditionalModification() {
2140
+ }
2141
+ function spaceAndZeroPaddedUnsignedInt$numberOfRequiredLengths($withMinus, $setter, $name, minNumberLength, maxNumberLength) {
2142
+ // Inline function 'kotlin.check' call
2143
+ // Inline function 'kotlin.contracts.contract' call
2144
+ // Inline function 'kotlin.check' call
2145
+ // Inline function 'kotlin.contracts.contract' call
2146
+ if (!(maxNumberLength >= (1 + ($withMinus ? 1 : 0) | 0))) {
2147
+ // Inline function 'kotlin.check.<anonymous>' call
2148
+ var message = 'Check failed.';
2149
+ throw IllegalStateException_init_$Create$(toString(message));
2150
+ }
2151
+ // Inline function 'kotlin.collections.buildList' call
2152
+ // Inline function 'kotlin.contracts.contract' call
2153
+ // Inline function 'kotlin.collections.buildListInternal' call
2154
+ // Inline function 'kotlin.apply' call
2155
+ var this_0 = ArrayList_init_$Create$();
2156
+ // Inline function 'kotlin.contracts.contract' call
2157
+ // Inline function 'kotlinx.datetime.internal.format.parser.spaceAndZeroPaddedUnsignedInt.numberOfRequiredLengths.<anonymous>' call
2158
+ if ($withMinus) {
2159
+ this_0.e(new PlainStringParserOperation('-'));
2160
+ }
2161
+ this_0.e(new NumberSpanParserOperation(listOf(new UnsignedIntConsumer(minNumberLength - ($withMinus ? 1 : 0) | 0, maxNumberLength - ($withMinus ? 1 : 0) | 0, $setter, $name, $withMinus))));
2162
+ var tmp$ret$3 = this_0.d5();
2163
+ return new ParserStructure(tmp$ret$3, emptyList());
2164
+ }
2165
+ function isAsciiDigit(_this__u8e3s4) {
2166
+ return _Char___init__impl__6a9atx(48) <= _this__u8e3s4 ? _this__u8e3s4 <= _Char___init__impl__6a9atx(57) : false;
2167
+ }
2168
+ function asciiDigitToInt(_this__u8e3s4) {
2169
+ return Char__minus_impl_a2frrh(_this__u8e3s4, _Char___init__impl__6a9atx(48));
2170
+ }
2171
+ var DayOfWeek_MONDAY_instance;
2172
+ var DayOfWeek_TUESDAY_instance;
2173
+ var DayOfWeek_WEDNESDAY_instance;
2174
+ var DayOfWeek_THURSDAY_instance;
2175
+ var DayOfWeek_FRIDAY_instance;
2176
+ var DayOfWeek_SATURDAY_instance;
2177
+ var DayOfWeek_SUNDAY_instance;
2178
+ function values() {
2179
+ return [DayOfWeek_MONDAY_getInstance(), DayOfWeek_TUESDAY_getInstance(), DayOfWeek_WEDNESDAY_getInstance(), DayOfWeek_THURSDAY_getInstance(), DayOfWeek_FRIDAY_getInstance(), DayOfWeek_SATURDAY_getInstance(), DayOfWeek_SUNDAY_getInstance()];
2180
+ }
2181
+ function get_entries() {
2182
+ if ($ENTRIES == null)
2183
+ $ENTRIES = enumEntries(values());
2184
+ return $ENTRIES;
2185
+ }
2186
+ var DayOfWeek_entriesInitialized;
2187
+ function DayOfWeek_initEntries() {
2188
+ if (DayOfWeek_entriesInitialized)
2189
+ return Unit_instance;
2190
+ DayOfWeek_entriesInitialized = true;
2191
+ DayOfWeek_MONDAY_instance = new DayOfWeek_0('MONDAY', 0);
2192
+ DayOfWeek_TUESDAY_instance = new DayOfWeek_0('TUESDAY', 1);
2193
+ DayOfWeek_WEDNESDAY_instance = new DayOfWeek_0('WEDNESDAY', 2);
2194
+ DayOfWeek_THURSDAY_instance = new DayOfWeek_0('THURSDAY', 3);
2195
+ DayOfWeek_FRIDAY_instance = new DayOfWeek_0('FRIDAY', 4);
2196
+ DayOfWeek_SATURDAY_instance = new DayOfWeek_0('SATURDAY', 5);
2197
+ DayOfWeek_SUNDAY_instance = new DayOfWeek_0('SUNDAY', 6);
2198
+ }
2199
+ var $ENTRIES;
2200
+ function DayOfWeek_0(name, ordinal) {
2201
+ Enum.call(this, name, ordinal);
2202
+ }
2203
+ function toDayOfWeek(_this__u8e3s4) {
2204
+ return DayOfWeek(_this__u8e3s4.value());
2205
+ }
2206
+ function DayOfWeek_MONDAY_getInstance() {
2207
+ DayOfWeek_initEntries();
2208
+ return DayOfWeek_MONDAY_instance;
2209
+ }
2210
+ function DayOfWeek_TUESDAY_getInstance() {
2211
+ DayOfWeek_initEntries();
2212
+ return DayOfWeek_TUESDAY_instance;
2213
+ }
2214
+ function DayOfWeek_WEDNESDAY_getInstance() {
2215
+ DayOfWeek_initEntries();
2216
+ return DayOfWeek_WEDNESDAY_instance;
2217
+ }
2218
+ function DayOfWeek_THURSDAY_getInstance() {
2219
+ DayOfWeek_initEntries();
2220
+ return DayOfWeek_THURSDAY_instance;
2221
+ }
2222
+ function DayOfWeek_FRIDAY_getInstance() {
2223
+ DayOfWeek_initEntries();
2224
+ return DayOfWeek_FRIDAY_instance;
2225
+ }
2226
+ function DayOfWeek_SATURDAY_getInstance() {
2227
+ DayOfWeek_initEntries();
2228
+ return DayOfWeek_SATURDAY_instance;
2229
+ }
2230
+ function DayOfWeek_SUNDAY_getInstance() {
2231
+ DayOfWeek_initEntries();
2232
+ return DayOfWeek_SUNDAY_instance;
2233
+ }
2234
+ function Instant() {
2235
+ }
2236
+ function isJodaDateTimeParseException(_this__u8e3s4) {
2237
+ return hasJsExceptionName(_this__u8e3s4, 'DateTimeParseException');
2238
+ }
2239
+ function isJodaDateTimeException(_this__u8e3s4) {
2240
+ return hasJsExceptionName(_this__u8e3s4, 'DateTimeException');
2241
+ }
2242
+ function isJodaArithmeticException(_this__u8e3s4) {
2243
+ return hasJsExceptionName(_this__u8e3s4, 'ArithmeticException');
2244
+ }
2245
+ function Companion_3() {
2246
+ Companion_instance_3 = this;
2247
+ this.rl_1 = new LocalDate_0(LocalDate.MIN);
2248
+ this.sl_1 = new LocalDate_0(LocalDate.MAX);
2249
+ }
2250
+ protoOf(Companion_3).tl = function (input, format) {
2251
+ var tmp;
2252
+ if (format === Formats_getInstance().lg()) {
2253
+ var tmp_0;
2254
+ try {
2255
+ // Inline function 'kotlin.let' call
2256
+ // Inline function 'kotlinx.datetime.jsTry' call
2257
+ // Inline function 'kotlinx.datetime.Companion.parse.<anonymous>' call
2258
+ // Inline function 'kotlin.contracts.contract' call
2259
+ var p0 = LocalDate.parse(toString(input));
2260
+ tmp_0 = new LocalDate_0(p0);
2261
+ } catch ($p) {
2262
+ var tmp_1;
2263
+ if ($p instanceof Error) {
2264
+ var e = $p;
2265
+ if (isJodaDateTimeParseException(e))
2266
+ throw DateTimeFormatException_init_$Create$_1(e);
2267
+ throw e;
2268
+ } else {
2269
+ throw $p;
2270
+ }
2271
+ }
2272
+ tmp = tmp_0;
2273
+ } else {
2274
+ tmp = format.pg(input);
2275
+ }
2276
+ return tmp;
2277
+ };
2278
+ protoOf(Companion_3).ul = function (input, format, $super) {
2279
+ format = format === VOID ? getIsoDateFormat() : format;
2280
+ return $super === VOID ? this.tl(input, format) : $super.tl.call(this, input, format);
2281
+ };
2282
+ var Companion_instance_3;
2283
+ function Companion_getInstance_3() {
2284
+ if (Companion_instance_3 == null)
2285
+ new Companion_3();
2286
+ return Companion_instance_3;
2287
+ }
2288
+ function Formats() {
2289
+ Formats_instance = this;
2290
+ this.kg_1 = get_ISO_DATE_BASIC();
2291
+ }
2292
+ protoOf(Formats).lg = function () {
2293
+ return get_ISO_DATE();
2294
+ };
2295
+ var Formats_instance;
2296
+ function Formats_getInstance() {
2297
+ if (Formats_instance == null)
2298
+ new Formats();
2299
+ return Formats_instance;
2300
+ }
2301
+ function LocalDate_init_$Init$(year, monthNumber, dayOfMonth, $this) {
2302
+ var tmp;
2303
+ try {
2304
+ // Inline function 'kotlinx.datetime.jsTry' call
2305
+ // Inline function 'kotlinx.datetime.LocalDate.<init>.<anonymous>' call
2306
+ tmp = LocalDate.of(year, monthNumber, dayOfMonth);
2307
+ } catch ($p) {
2308
+ var tmp_0;
2309
+ if ($p instanceof Error) {
2310
+ var e = $p;
2311
+ if (isJodaDateTimeException(e))
2312
+ throw IllegalArgumentException_init_$Create$_0(e);
2313
+ throw e;
2314
+ } else {
2315
+ throw $p;
2316
+ }
2317
+ }
2318
+ LocalDate_0.call($this, tmp);
2319
+ return $this;
2320
+ }
2321
+ function LocalDate_init_$Create$(year, monthNumber, dayOfMonth) {
2322
+ return LocalDate_init_$Init$(year, monthNumber, dayOfMonth, objectCreate(protoOf(LocalDate_0)));
2323
+ }
2324
+ function LocalDate_0(value) {
2325
+ Companion_getInstance_3();
2326
+ this.th_1 = value;
2327
+ }
2328
+ protoOf(LocalDate_0).uh = function () {
2329
+ return toDayOfWeek(this.th_1.dayOfWeek());
2330
+ };
2331
+ protoOf(LocalDate_0).equals = function (other) {
2332
+ var tmp;
2333
+ if (this === other) {
2334
+ tmp = true;
2335
+ } else {
2336
+ var tmp_0;
2337
+ if (other instanceof LocalDate_0) {
2338
+ tmp_0 = this.th_1 === other.th_1 || this.th_1.equals(other.th_1);
2339
+ } else {
2340
+ tmp_0 = false;
2341
+ }
2342
+ tmp = tmp_0;
2343
+ }
2344
+ return tmp;
2345
+ };
2346
+ protoOf(LocalDate_0).hashCode = function () {
2347
+ return this.th_1.hashCode();
2348
+ };
2349
+ protoOf(LocalDate_0).toString = function () {
2350
+ return this.th_1.toString();
2351
+ };
2352
+ protoOf(LocalDate_0).vl = function (other) {
2353
+ return this.th_1.compareTo(other.th_1);
2354
+ };
2355
+ protoOf(LocalDate_0).d = function (other) {
2356
+ return this.vl(other instanceof LocalDate_0 ? other : THROW_CCE());
2357
+ };
2358
+ protoOf(LocalDate_0).wl = function () {
2359
+ return numberToInt(this.th_1.toEpochDay());
2360
+ };
2361
+ function plus_0(_this__u8e3s4, period) {
2362
+ var tmp;
2363
+ try {
2364
+ // Inline function 'kotlin.let' call
2365
+ // Inline function 'kotlin.with' call
2366
+ // Inline function 'kotlin.contracts.contract' call
2367
+ // Inline function 'kotlinx.datetime.plus.<anonymous>' call
2368
+ // Inline function 'kotlin.run' call
2369
+ // Inline function 'kotlin.run' call
2370
+ // Inline function 'kotlin.contracts.contract' call
2371
+ // Inline function 'kotlinx.datetime.plus.<anonymous>.<anonymous>' call
2372
+ var $this$run = _this__u8e3s4.th_1;
2373
+ var tmp_0;
2374
+ if (!(period.zf_1 === 0)) {
2375
+ // Inline function 'kotlinx.datetime.jsTry' call
2376
+ // Inline function 'kotlinx.datetime.plus.<anonymous>.<anonymous>.<anonymous>' call
2377
+ tmp_0 = $this$run.plusMonths(period.zf_1);
2378
+ } else {
2379
+ tmp_0 = $this$run;
2380
+ }
2381
+ // Inline function 'kotlin.contracts.contract' call
2382
+ // Inline function 'kotlinx.datetime.plus.<anonymous>.<anonymous>' call
2383
+ var $this$run_0 = tmp_0;
2384
+ var tmp_1;
2385
+ if (!(period.ag_1 === 0)) {
2386
+ // Inline function 'kotlinx.datetime.jsTry' call
2387
+ // Inline function 'kotlinx.datetime.plus.<anonymous>.<anonymous>.<anonymous>' call
2388
+ tmp_1 = $this$run_0.plusDays(period.ag_1);
2389
+ } else {
2390
+ tmp_1 = $this$run_0;
2391
+ }
2392
+ // Inline function 'kotlin.contracts.contract' call
2393
+ var p0 = tmp_1;
2394
+ tmp = new LocalDate_0(p0);
2395
+ } catch ($p) {
2396
+ var tmp_2;
2397
+ if ($p instanceof Error) {
2398
+ var e = $p;
2399
+ if (isJodaDateTimeException(e) || isJodaArithmeticException(e))
2400
+ throw DateTimeArithmeticException_init_$Create$_0(e);
2401
+ throw e;
2402
+ } else {
2403
+ throw $p;
2404
+ }
2405
+ }
2406
+ return tmp;
2407
+ }
2408
+ function daysUntil(_this__u8e3s4, other) {
2409
+ return numberToInt(_this__u8e3s4.th_1.until(other.th_1, ChronoUnit.DAYS));
2410
+ }
2411
+ function monthsUntil(_this__u8e3s4, other) {
2412
+ return numberToInt(_this__u8e3s4.th_1.until(other.th_1, ChronoUnit.MONTHS));
2413
+ }
2414
+ function yearsUntil(_this__u8e3s4, other) {
2415
+ return numberToInt(_this__u8e3s4.th_1.until(other.th_1, ChronoUnit.YEARS));
2416
+ }
2417
+ function Companion_4() {
2418
+ Companion_instance_4 = this;
2419
+ this.xl_1 = new LocalDateTime_0(LocalDateTime.MIN);
2420
+ this.yl_1 = new LocalDateTime_0(LocalDateTime.MAX);
2421
+ }
2422
+ var Companion_instance_4;
2423
+ function Companion_getInstance_4() {
2424
+ if (Companion_instance_4 == null)
2425
+ new Companion_4();
2426
+ return Companion_instance_4;
2427
+ }
2428
+ function LocalDateTime_0(value) {
2429
+ Companion_getInstance_4();
2430
+ this.zl_1 = value;
2431
+ }
2432
+ protoOf(LocalDateTime_0).am = function () {
2433
+ return new LocalDate_0(this.zl_1.toLocalDate());
2434
+ };
2435
+ protoOf(LocalDateTime_0).equals = function (other) {
2436
+ var tmp;
2437
+ if (this === other) {
2438
+ tmp = true;
2439
+ } else {
2440
+ var tmp_0;
2441
+ if (other instanceof LocalDateTime_0) {
2442
+ tmp_0 = this.zl_1 === other.zl_1 || this.zl_1.equals(other.zl_1);
2443
+ } else {
2444
+ tmp_0 = false;
2445
+ }
2446
+ tmp = tmp_0;
2447
+ }
2448
+ return tmp;
2449
+ };
2450
+ protoOf(LocalDateTime_0).hashCode = function () {
2451
+ return this.zl_1.hashCode();
2452
+ };
2453
+ protoOf(LocalDateTime_0).toString = function () {
2454
+ return this.zl_1.toString();
2455
+ };
2456
+ protoOf(LocalDateTime_0).bm = function (other) {
2457
+ return this.zl_1.compareTo(other.zl_1);
2458
+ };
2459
+ protoOf(LocalDateTime_0).d = function (other) {
2460
+ return this.bm(other instanceof LocalDateTime_0 ? other : THROW_CCE());
2461
+ };
2462
+ function ofZone($this, zoneId) {
2463
+ var tmp;
2464
+ if (zoneId instanceof ZoneOffset) {
2465
+ tmp = FixedOffsetTimeZone_init_$Create$(new UtcOffset(zoneId));
2466
+ } else {
2467
+ if (zoneId.rules().isFixedOffset()) {
2468
+ var tmp_0 = zoneId.normalized();
2469
+ tmp = new FixedOffsetTimeZone(new UtcOffset(tmp_0 instanceof ZoneOffset ? tmp_0 : THROW_CCE()), zoneId);
2470
+ } else {
2471
+ tmp = new TimeZone(zoneId);
2472
+ }
2473
+ }
2474
+ return tmp;
2475
+ }
2476
+ function Companion_5() {
2477
+ Companion_instance_5 = this;
2478
+ this.cm_1 = asTimeZone(new UtcOffset(ZoneOffset.UTC));
2479
+ }
2480
+ protoOf(Companion_5).dm = function () {
2481
+ return ofZone(this, ZoneId.systemDefault());
2482
+ };
2483
+ var Companion_instance_5;
2484
+ function Companion_getInstance_5() {
2485
+ if (Companion_instance_5 == null)
2486
+ new Companion_5();
2487
+ return Companion_instance_5;
2488
+ }
2489
+ function TimeZone(zoneId) {
2490
+ Companion_getInstance_5();
2491
+ this.em_1 = zoneId;
2492
+ }
2493
+ protoOf(TimeZone).equals = function (other) {
2494
+ var tmp;
2495
+ if (this === other) {
2496
+ tmp = true;
2497
+ } else {
2498
+ var tmp_0;
2499
+ if (other instanceof TimeZone) {
2500
+ tmp_0 = this.em_1 === other.em_1 || this.em_1.equals(other.em_1);
2501
+ } else {
2502
+ tmp_0 = false;
2503
+ }
2504
+ tmp = tmp_0;
2505
+ }
2506
+ return tmp;
2507
+ };
2508
+ protoOf(TimeZone).hashCode = function () {
2509
+ return this.em_1.hashCode();
2510
+ };
2511
+ protoOf(TimeZone).toString = function () {
2512
+ return this.em_1.toString();
2513
+ };
2514
+ function toLocalDateTime(_this__u8e3s4, timeZone) {
2515
+ var tmp;
2516
+ try {
2517
+ // Inline function 'kotlin.let' call
2518
+ // Inline function 'kotlinx.datetime.jsTry' call
2519
+ // Inline function 'kotlinx.datetime.toLocalDateTime.<anonymous>' call
2520
+ // Inline function 'kotlin.contracts.contract' call
2521
+ var p0 = LocalDateTime.ofInstant(_this__u8e3s4.fm_1, timeZone.em_1);
2522
+ tmp = new LocalDateTime_0(p0);
2523
+ } catch ($p) {
2524
+ var tmp_0;
2525
+ if ($p instanceof Error) {
2526
+ var e = $p;
2527
+ if (isJodaDateTimeException(e))
2528
+ throw DateTimeArithmeticException_init_$Create$_0(e);
2529
+ throw e;
2530
+ } else {
2531
+ throw $p;
2532
+ }
2533
+ }
2534
+ return tmp;
2535
+ }
2536
+ function FixedOffsetTimeZone_init_$Init$(offset, $this) {
2537
+ FixedOffsetTimeZone.call($this, offset, offset.gm_1);
2538
+ return $this;
2539
+ }
2540
+ function FixedOffsetTimeZone_init_$Create$(offset) {
2541
+ return FixedOffsetTimeZone_init_$Init$(offset, objectCreate(protoOf(FixedOffsetTimeZone)));
2542
+ }
2543
+ function Companion_6() {
2544
+ }
2545
+ var Companion_instance_6;
2546
+ function Companion_getInstance_6() {
2547
+ return Companion_instance_6;
2548
+ }
2549
+ function FixedOffsetTimeZone(offset, zoneId) {
2550
+ TimeZone.call(this, zoneId);
2551
+ this.im_1 = offset;
2552
+ }
2553
+ function Companion_7() {
2554
+ Companion_instance_7 = this;
2555
+ this.jm_1 = new UtcOffset(ZoneOffset.UTC);
2556
+ }
2557
+ var Companion_instance_7;
2558
+ function Companion_getInstance_7() {
2559
+ if (Companion_instance_7 == null)
2560
+ new Companion_7();
2561
+ return Companion_instance_7;
2562
+ }
2563
+ function UtcOffset(zoneOffset) {
2564
+ Companion_getInstance_7();
2565
+ this.gm_1 = zoneOffset;
2566
+ }
2567
+ protoOf(UtcOffset).hashCode = function () {
2568
+ return this.gm_1.hashCode();
2569
+ };
2570
+ protoOf(UtcOffset).equals = function (other) {
2571
+ var tmp;
2572
+ if (other instanceof UtcOffset) {
2573
+ tmp = this.gm_1 === other.gm_1 || this.gm_1.equals(other.gm_1);
2574
+ } else {
2575
+ tmp = false;
2576
+ }
2577
+ return tmp;
2578
+ };
2579
+ protoOf(UtcOffset).toString = function () {
2580
+ return this.gm_1.toString();
2581
+ };
2582
+ function hasJsExceptionName(_this__u8e3s4, name) {
2583
+ // Inline function 'kotlin.js.asDynamic' call
2584
+ return _this__u8e3s4.name == name;
2585
+ }
2586
+ //region block: post-declaration
2587
+ protoOf(Builder).ah = chars;
2588
+ protoOf(Builder).eh = build;
2589
+ protoOf(Builder).ug = year;
2590
+ protoOf(Builder).vg = year$default;
2591
+ protoOf(Builder).wg = monthNumber;
2592
+ protoOf(Builder).xg = monthNumber$default;
2593
+ protoOf(Builder).yg = dayOfMonth;
2594
+ protoOf(Builder).zg = dayOfMonth$default;
2595
+ protoOf(PropertyAccessor).gj = getterNotNull;
2596
+ //endregion
2597
+ //region block: init
2598
+ Companion_instance = new Companion();
2599
+ Companion_instance_0 = new Companion_0();
2600
+ Companion_instance_1 = new Companion_1();
2601
+ ExpectedInt_instance = new ExpectedInt();
2602
+ Companion_instance_2 = new Companion_2();
2603
+ Companion_instance_6 = new Companion_6();
2604
+ //endregion
2605
+ //region block: exports
2606
+ export {
2607
+ DatePeriod_init_$Create$ as DatePeriod_init_$Create$pxdfqo7eaqju,
2608
+ Companion_getInstance_3 as Companion_getInstancehhs08a75ybhj,
2609
+ Companion_getInstance_5 as Companion_getInstancefmyaurjojj7x,
2610
+ Instant as Instant3cn81rq2kpflk,
2611
+ LocalDate_0 as LocalDate31mqn6zavbpi8,
2612
+ daysUntil as daysUntili13lhjyhczcn,
2613
+ monthsUntil as monthsUntil3ipc0mlqu40r9,
2614
+ plus_0 as plus1oi9f9vif99u2,
2615
+ toLocalDateTime as toLocalDateTime3u4c8ydzr4ubp,
2616
+ yearsUntil as yearsUntil1qbvcre5j21z1,
2617
+ };
2618
+ //endregion
2619
+
2620
+ //# sourceMappingURL=Kotlin-DateTime-library-kotlinx-datetime.mjs.map