@solibo/home-api 1.1.9 → 1.1.10

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 (113) hide show
  1. package/Kotlin-DateTime-library-kotlinx-datetime.mjs +3601 -0
  2. package/Kotlin-DateTime-library-kotlinx-datetime.mjs.map +1 -0
  3. package/MultiplatformSettings-multiplatform-settings-no-arg.mjs +4 -0
  4. package/{MultiplatformSettings-multiplatform-settings.js.map → MultiplatformSettings-multiplatform-settings-no-arg.mjs.map} +1 -1
  5. package/MultiplatformSettings-multiplatform-settings.mjs +4 -0
  6. package/{kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js.map → MultiplatformSettings-multiplatform-settings.mjs.map} +1 -1
  7. package/kotlin-kotlin-stdlib.mjs +17369 -0
  8. package/kotlin-kotlin-stdlib.mjs.map +1 -0
  9. package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.mjs +4 -0
  10. package/{kotlinx-serialization-kotlinx-serialization-json-io.js.map → kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.mjs.map} +1 -1
  11. package/kotlinx-atomicfu.mjs +250 -0
  12. package/kotlinx-atomicfu.mjs.map +1 -0
  13. package/kotlinx-browser.mjs +8 -0
  14. package/{kotlinx-browser.js.map → kotlinx-browser.mjs.map} +1 -1
  15. package/kotlinx-coroutines-core.mjs +8888 -0
  16. package/kotlinx-coroutines-core.mjs.map +1 -0
  17. package/kotlinx-io-kotlinx-io-bytestring.mjs +202 -0
  18. package/kotlinx-io-kotlinx-io-bytestring.mjs.map +1 -0
  19. package/kotlinx-io-kotlinx-io-core.mjs +2020 -0
  20. package/kotlinx-io-kotlinx-io-core.mjs.map +1 -0
  21. package/kotlinx-serialization-kotlinx-serialization-core.mjs +6045 -0
  22. package/kotlinx-serialization-kotlinx-serialization-core.mjs.map +1 -0
  23. package/kotlinx-serialization-kotlinx-serialization-json-io.mjs +4 -0
  24. package/{MultiplatformSettings-multiplatform-settings-no-arg.js.map → kotlinx-serialization-kotlinx-serialization-json-io.mjs.map} +1 -1
  25. package/kotlinx-serialization-kotlinx-serialization-json.mjs +5061 -0
  26. package/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -0
  27. package/ktor-ktor-client-auth.mjs +4 -0
  28. package/ktor-ktor-client-auth.mjs.map +1 -0
  29. package/ktor-ktor-client-content-negotiation.mjs +750 -0
  30. package/ktor-ktor-client-content-negotiation.mjs.map +1 -0
  31. package/ktor-ktor-client-core.mjs +9810 -0
  32. package/ktor-ktor-client-core.mjs.map +1 -0
  33. package/ktor-ktor-client-logging.mjs +4 -0
  34. package/ktor-ktor-client-logging.mjs.map +1 -0
  35. package/ktor-ktor-events.mjs +81 -0
  36. package/ktor-ktor-events.mjs.map +1 -0
  37. package/ktor-ktor-http-cio.mjs +2254 -0
  38. package/ktor-ktor-http-cio.mjs.map +1 -0
  39. package/ktor-ktor-http.mjs +3238 -0
  40. package/ktor-ktor-http.mjs.map +1 -0
  41. package/ktor-ktor-io.mjs +3536 -0
  42. package/ktor-ktor-io.mjs.map +1 -0
  43. package/ktor-ktor-serialization-kotlinx-json.mjs +46 -0
  44. package/{ktor-ktor-serialization-kotlinx-json.js.map → ktor-ktor-serialization-kotlinx-json.mjs.map} +1 -1
  45. package/ktor-ktor-serialization-kotlinx.mjs +843 -0
  46. package/ktor-ktor-serialization-kotlinx.mjs.map +1 -0
  47. package/ktor-ktor-serialization.mjs +364 -0
  48. package/ktor-ktor-serialization.mjs.map +1 -0
  49. package/ktor-ktor-sse.mjs +4 -0
  50. package/ktor-ktor-sse.mjs.map +1 -0
  51. package/ktor-ktor-utils.mjs +2620 -0
  52. package/ktor-ktor-utils.mjs.map +1 -0
  53. package/ktor-ktor-websocket-serialization.mjs +4 -0
  54. package/ktor-ktor-websocket-serialization.mjs.map +1 -0
  55. package/ktor-ktor-websockets.mjs +2535 -0
  56. package/ktor-ktor-websockets.mjs.map +1 -0
  57. package/package.json +2 -3
  58. package/solibo-sdk-sdk-home-api.d.mts +13419 -0
  59. package/solibo-sdk-sdk-home-api.mjs +199394 -0
  60. package/solibo-sdk-sdk-home-api.mjs.map +1 -0
  61. package/Kotlin-DateTime-library-kotlinx-datetime.js +0 -3614
  62. package/Kotlin-DateTime-library-kotlinx-datetime.js.map +0 -1
  63. package/MultiplatformSettings-multiplatform-settings-no-arg.js +0 -15
  64. package/MultiplatformSettings-multiplatform-settings.js +0 -15
  65. package/kotlin-kotlin-stdlib.js +0 -17392
  66. package/kotlin-kotlin-stdlib.js.map +0 -1
  67. package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js +0 -15
  68. package/kotlinx-atomicfu.js +0 -262
  69. package/kotlinx-atomicfu.js.map +0 -1
  70. package/kotlinx-browser.js +0 -19
  71. package/kotlinx-coroutines-core.js +0 -8901
  72. package/kotlinx-coroutines-core.js.map +0 -1
  73. package/kotlinx-io-kotlinx-io-bytestring.js +0 -214
  74. package/kotlinx-io-kotlinx-io-bytestring.js.map +0 -1
  75. package/kotlinx-io-kotlinx-io-core.js +0 -2035
  76. package/kotlinx-io-kotlinx-io-core.js.map +0 -1
  77. package/kotlinx-serialization-kotlinx-serialization-core.js +0 -6057
  78. package/kotlinx-serialization-kotlinx-serialization-core.js.map +0 -1
  79. package/kotlinx-serialization-kotlinx-serialization-json-io.js +0 -15
  80. package/kotlinx-serialization-kotlinx-serialization-json.js +0 -5074
  81. package/kotlinx-serialization-kotlinx-serialization-json.js.map +0 -1
  82. package/ktor-ktor-client-auth.js +0 -15
  83. package/ktor-ktor-client-auth.js.map +0 -1
  84. package/ktor-ktor-client-content-negotiation.js +0 -767
  85. package/ktor-ktor-client-content-negotiation.js.map +0 -1
  86. package/ktor-ktor-client-core.js +0 -9839
  87. package/ktor-ktor-client-core.js.map +0 -1
  88. package/ktor-ktor-client-logging.js +0 -15
  89. package/ktor-ktor-client-logging.js.map +0 -1
  90. package/ktor-ktor-events.js +0 -94
  91. package/ktor-ktor-events.js.map +0 -1
  92. package/ktor-ktor-http-cio.js +0 -2271
  93. package/ktor-ktor-http-cio.js.map +0 -1
  94. package/ktor-ktor-http.js +0 -3253
  95. package/ktor-ktor-http.js.map +0 -1
  96. package/ktor-ktor-io.js +0 -3556
  97. package/ktor-ktor-io.js.map +0 -1
  98. package/ktor-ktor-serialization-kotlinx-json.js +0 -67
  99. package/ktor-ktor-serialization-kotlinx.js +0 -865
  100. package/ktor-ktor-serialization-kotlinx.js.map +0 -1
  101. package/ktor-ktor-serialization.js +0 -379
  102. package/ktor-ktor-serialization.js.map +0 -1
  103. package/ktor-ktor-sse.js +0 -15
  104. package/ktor-ktor-sse.js.map +0 -1
  105. package/ktor-ktor-utils.js +0 -2639
  106. package/ktor-ktor-utils.js.map +0 -1
  107. package/ktor-ktor-websocket-serialization.js +0 -15
  108. package/ktor-ktor-websocket-serialization.js.map +0 -1
  109. package/ktor-ktor-websockets.js +0 -2552
  110. package/ktor-ktor-websockets.js.map +0 -1
  111. package/solibo-sdk-sdk-home-api.d.ts +0 -12624
  112. package/solibo-sdk-sdk-home-api.js +0 -203510
  113. package/solibo-sdk-sdk-home-api.js.map +0 -1
@@ -0,0 +1,3238 @@
1
+ import {
2
+ VOID3gxj6tk5isa35 as VOID,
3
+ StringBuilder_init_$Create$322n630qt3r8c as StringBuilder_init_$Create$,
4
+ Unit_instance28fytmsmm6r23 as Unit_instance,
5
+ _Char___init__impl__6a9atx1csff5kwtduxl as _Char___init__impl__6a9atx,
6
+ Char__plus_impl_qi7pgjyhbgymrgrgr1 as Char__plus_impl_qi7pgj,
7
+ Char__minus_impl_a2frrh2ola79r4k82yr as Char__minus_impl_a2frrh,
8
+ charArray2ujmm1qusno00 as charArray,
9
+ concatToString2syawgu50khxi as concatToString,
10
+ charCodeAt1yspne1d8erbm as charCodeAt,
11
+ substringiqarkczpya5m as substring,
12
+ toString1pkumu07cwy4m as toString,
13
+ Char19o2r8palgjof as Char,
14
+ isSurrogatewe8xicw8z84n as isSurrogate,
15
+ StringBuilder_init_$Create$39ouzl6b47q8d as StringBuilder_init_$Create$_0,
16
+ charSequenceGet1vxk1y5n17t1z as charSequenceGet,
17
+ charSequenceLength3278n89t01tmv as charSequenceLength,
18
+ charSequenceSubSequence1iwpdba8s3jc7 as charSequenceSubSequence,
19
+ toString3dhdjl9yf50de as toString_0,
20
+ toByte4i43936u611k as toByte,
21
+ decodeToString1dbzcjd620q25 as decodeToString,
22
+ Exceptiondt2hlxn7j7vw as Exception,
23
+ Exception_init_$Init$2jymvyiuv5u42 as Exception_init_$Init$,
24
+ captureStack1fzi4aczwc4hg as captureStack,
25
+ protoOf180f3jzyo7rfj as protoOf,
26
+ initMetadataForClassbxx6q50dy2s7 as initMetadataForClass,
27
+ Char__minus_impl_a2frrh1dka2ec6zg6dk as Char__minus_impl_a2frrh_0,
28
+ Char__toInt_impl_vasixd3jl92hthlhyn7 as Char__toInt_impl_vasixd,
29
+ numberToChar93r9buh19yek as numberToChar,
30
+ Char__rangeTo_impl_tkncvp2rh7j0ueljywd as Char__rangeTo_impl_tkncvp,
31
+ plus39kp8wyage607 as plus,
32
+ plus310ted5e4i90h as plus_0,
33
+ collectionSizeOrDefault36dulx8yinfqm as collectionSizeOrDefault,
34
+ ArrayList_init_$Create$3ivpeip4ouddx as ArrayList_init_$Create$,
35
+ toSet2orjxp16sotqu as toSet,
36
+ setOf45ia9pnfhe90 as setOf,
37
+ plus1ogy4liedzq5j as plus_1,
38
+ listOf1jh22dvmctj1r as listOf,
39
+ emptyList1g2z5xcrvp2zy as emptyList,
40
+ objectCreate1ve4bgxiu4x98 as objectCreate,
41
+ equals2v6cggk171b6e as equals,
42
+ Collection1k04j3hzsbod0 as Collection,
43
+ isInterface3d6p8outrmvmk as isInterface,
44
+ isBlank1dvkhjjvox3p0 as isBlank,
45
+ last1vo29oleiqj36 as last,
46
+ indexOf1xbs558u7wr52 as indexOf,
47
+ THROW_CCE2g6jy02ryeudk as THROW_CCE,
48
+ isCharSequence1ju9jr1w86plq as isCharSequence,
49
+ trim11nh7r46at6sx as trim,
50
+ take9j4462mea726 as take,
51
+ substring3saq8ornu0luv as substring_0,
52
+ contains2el4s70rdq4ld as contains,
53
+ initMetadataForCompanion1wyw17z38v6ac as initMetadataForCompanion,
54
+ startsWith38d3sbg25w0lx as startsWith,
55
+ initMetadataForObject1cxne3s9w65el as initMetadataForObject,
56
+ plus20p0vtfmu0596 as plus_2,
57
+ equals2au1ep9vhcato as equals_0,
58
+ getStringHashCode26igk1bx568vk as getStringHashCode,
59
+ hashCodeq5arwsb9dgti as hashCode,
60
+ IllegalArgumentException2asla15b5jaob as IllegalArgumentException,
61
+ get_lastIndex1yw0x4k50k51w as get_lastIndex,
62
+ first3kg261hmihapu as first,
63
+ last2n4gf5az1lkn4 as last_0,
64
+ get_lastIndexld83bqhfgcdd as get_lastIndex_0,
65
+ listOfvhqybd2zx248 as listOf_0,
66
+ emptySetcxexqki71qfa as emptySet,
67
+ emptyMapr06gerzljqtm as emptyMap,
68
+ toDoubleOrNullkxwozihadygj as toDoubleOrNull,
69
+ sortedWith2csnbbb21k0lg as sortedWith,
70
+ LazyThreadSafetyMode_NONE_getInstance2abdqcc8psbru as LazyThreadSafetyMode_NONE_getInstance,
71
+ lazy1261dae0bgscp as lazy,
72
+ to2cs3ny02qtbcb as to,
73
+ FunctionAdapter3lcrrz3moet5b as FunctionAdapter,
74
+ Comparator2b3maoeh98xtg as Comparator,
75
+ compareValues1n2ayl87ihzfk as compareValues,
76
+ ArrayList_init_$Create$1jemgvhi5v0js as ArrayList_init_$Create$_0,
77
+ asList2ho2pewtsfvv as asList,
78
+ Char__compareTo_impl_ypi4mb3frsmupst9pih as Char__compareTo_impl_ypi4mb,
79
+ IllegalArgumentException_init_$Init$36j4g3r1a2ezi as IllegalArgumentException_init_$Init$,
80
+ toLongOrNullutqivezb0wx1 as toLongOrNull,
81
+ mapCapacity1h45rc3eh9p2l as mapCapacity,
82
+ coerceAtLeast2bkz8m9ik7hep as coerceAtLeast,
83
+ LinkedHashMap_init_$Create$1s75e1k23v4xj as LinkedHashMap_init_$Create$,
84
+ Comparable198qfk8pnblz0 as Comparable,
85
+ addAll1k27qatfgp3k5 as addAll,
86
+ joinTo3lkanfaxbzac2 as joinTo,
87
+ toString30pk9tzaqopn as toString_1,
88
+ initMetadataForInterface1egvbzx539z91 as initMetadataForInterface,
89
+ isWhitespace25occ8z1ed1s9 as isWhitespace,
90
+ IllegalArgumentException_init_$Create$1j1aj36nbo0wg as IllegalArgumentException_init_$Create$,
91
+ startsWith1bgirhbedtv2y as startsWith_0,
92
+ charArrayOf27f4r3dozbrk1 as charArrayOf,
93
+ split3d3yeauc4rm2n as split,
94
+ toMutableList20rdgwi7d3cwi as toMutableList,
95
+ first58ocm7j58k3q as first_0,
96
+ joinToString1cxrrlmo0chqs as joinToString,
97
+ indexOfAny2ijjuuzpljsyd as indexOfAny,
98
+ dropLast1vpiyky649o34 as dropLast,
99
+ IllegalStateExceptionkoljg5n0nrlr as IllegalStateException,
100
+ IllegalStateException_init_$Init$2vym5snx4gpwu as IllegalStateException_init_$Init$,
101
+ indexOfwa4w6635jewi as indexOf_0,
102
+ toInt2q8uldh7sc951 as toInt,
103
+ startsWith26w8qjqapeeq6 as startsWith_1,
104
+ lazy2hsh8ze7j6ikd as lazy_0,
105
+ KProperty1ca4yb4wlo496 as KProperty1,
106
+ getPropertyCallableRef3hckxc0xueiaj as getPropertyCallableRef,
107
+ getKClassFromExpression348iqjl4fnx2f as getKClassFromExpression,
108
+ fromInt2ii0rejb1w62w as fromInt,
109
+ } from './kotlin-kotlin-stdlib.mjs';
110
+ import {
111
+ Charsets_getInstanceq0o82sizm30g as Charsets_getInstance,
112
+ encode35e4rpnc94tb5 as encode,
113
+ takeWhile34751tcfg6owx as takeWhile,
114
+ canRead1guo8vbveth0f as canRead,
115
+ forName2faodmskqnoz5 as forName,
116
+ get_name2f11g4r0d5pxp as get_name,
117
+ toByteArray1i3ns5jnoqlv6 as toByteArray,
118
+ } from './ktor-ktor-io.mjs';
119
+ import {
120
+ StringValuesBuilderImpl3ey9etj3bwnqf as StringValuesBuilderImpl,
121
+ get3oezx9z3zutmm as get,
122
+ forEachghjt92rkrpzo as forEach,
123
+ StringValuesjqid5a6cuday as StringValues,
124
+ StringValuesImpl2l95y9du7b61t as StringValuesImpl,
125
+ StringValuesSingleImpl1uh7q2c2zm7va as StringValuesSingleImpl,
126
+ toCharArray1qby3f4cdahde as toCharArray,
127
+ toLowerCasePreservingASCIIRulesa2d90zyoc6kw as toLowerCasePreservingASCIIRules,
128
+ isLowerCase2jodys5jo7d58 as isLowerCase,
129
+ appendAlltwnjnu28pmtx as appendAll,
130
+ PlatformUtils_getInstanceitqdjrwn2jrm as PlatformUtils_getInstance,
131
+ } from './ktor-ktor-utils.mjs';
132
+ import {
133
+ STRING_getInstance2dgfp43qdvxn4 as STRING_getInstance,
134
+ PrimitiveSerialDescriptor3egfp53lutxj2 as PrimitiveSerialDescriptor,
135
+ KSerializerzf77vz1967fq as KSerializer,
136
+ } from './kotlinx-serialization-kotlinx-serialization-core.mjs';
137
+ //region block: imports
138
+ var imul = Math.imul;
139
+ //endregion
140
+ //region block: pre-declaration
141
+ initMetadataForClass(URLDecodeException, 'URLDecodeException', VOID, Exception);
142
+ initMetadataForCompanion(Companion);
143
+ initMetadataForObject(Application, 'Application');
144
+ initMetadataForObject(MultiPart, 'MultiPart');
145
+ initMetadataForObject(Text, 'Text');
146
+ initMetadataForClass(HeaderValueWithParameters, 'HeaderValueWithParameters');
147
+ initMetadataForClass(ContentType, 'ContentType', VOID, HeaderValueWithParameters);
148
+ initMetadataForClass(BadContentTypeFormatException, 'BadContentTypeFormatException', VOID, Exception);
149
+ initMetadataForCompanion(Companion_0);
150
+ initMetadataForCompanion(Companion_1);
151
+ initMetadataForClass(HeadersBuilder, 'HeadersBuilder', HeadersBuilder, StringValuesBuilderImpl);
152
+ initMetadataForObject(EmptyHeaders, 'EmptyHeaders', VOID, VOID, [StringValues]);
153
+ initMetadataForClass(HeadersImpl, 'HeadersImpl', HeadersImpl, StringValuesImpl, [StringValues, StringValuesImpl]);
154
+ initMetadataForClass(HeadersSingleImpl, 'HeadersSingleImpl', VOID, StringValuesSingleImpl, [StringValues, StringValuesSingleImpl]);
155
+ initMetadataForClass(HeaderValue, 'HeaderValue');
156
+ initMetadataForClass(HeaderValueParam, 'HeaderValueParam');
157
+ initMetadataForClass(sam$kotlin_Comparator$0, 'sam$kotlin_Comparator$0', VOID, VOID, [Comparator, FunctionAdapter]);
158
+ initMetadataForObject(HttpHeaders, 'HttpHeaders');
159
+ initMetadataForClass(UnsafeHeaderException, 'UnsafeHeaderException', VOID, IllegalArgumentException);
160
+ initMetadataForClass(IllegalHeaderNameException, 'IllegalHeaderNameException', VOID, IllegalArgumentException);
161
+ initMetadataForClass(IllegalHeaderValueException, 'IllegalHeaderValueException', VOID, IllegalArgumentException);
162
+ initMetadataForCompanion(Companion_2);
163
+ initMetadataForClass(HttpMethod, 'HttpMethod');
164
+ initMetadataForCompanion(Companion_3);
165
+ initMetadataForClass(HttpProtocolVersion, 'HttpProtocolVersion');
166
+ initMetadataForCompanion(Companion_4);
167
+ initMetadataForClass(HttpStatusCode, 'HttpStatusCode', VOID, VOID, [Comparable]);
168
+ initMetadataForCompanion(Companion_5);
169
+ initMetadataForInterface(Parameters, 'Parameters', VOID, VOID, [StringValues]);
170
+ initMetadataForObject(EmptyParameters, 'EmptyParameters', VOID, VOID, [Parameters]);
171
+ initMetadataForClass(ParametersBuilderImpl, 'ParametersBuilderImpl', ParametersBuilderImpl, StringValuesBuilderImpl);
172
+ initMetadataForClass(ParametersImpl, 'ParametersImpl', ParametersImpl, StringValuesImpl, [Parameters, StringValuesImpl]);
173
+ initMetadataForCompanion(Companion_6);
174
+ initMetadataForClass(URLBuilder, 'URLBuilder', URLBuilder);
175
+ initMetadataForClass(URLParserException, 'URLParserException', VOID, IllegalStateException);
176
+ initMetadataForCompanion(Companion_7);
177
+ initMetadataForClass(URLProtocol, 'URLProtocol');
178
+ initMetadataForCompanion(Companion_8);
179
+ initMetadataForClass(Url_0, 'Url', VOID, VOID, VOID, VOID, VOID, {0: UrlSerializer_getInstance});
180
+ initMetadataForObject(UrlSerializer, 'UrlSerializer', VOID, VOID, [KSerializer]);
181
+ initMetadataForClass(UrlDecodedParametersBuilder, 'UrlDecodedParametersBuilder');
182
+ initMetadataForClass(OutgoingContent, 'OutgoingContent');
183
+ initMetadataForClass(ByteArrayContent_0, 'ByteArrayContent', VOID, OutgoingContent);
184
+ initMetadataForClass(ByteArrayContent, 'ByteArrayContent', VOID, ByteArrayContent_0);
185
+ initMetadataForClass(PartData, 'PartData');
186
+ initMetadataForClass(FormItem, 'FormItem', VOID, PartData);
187
+ initMetadataForClass(FileItem, 'FileItem', VOID, PartData);
188
+ initMetadataForClass(BinaryItem, 'BinaryItem', VOID, PartData);
189
+ initMetadataForClass(BinaryChannelItem, 'BinaryChannelItem', VOID, PartData);
190
+ initMetadataForInterface(MultiPartData, 'MultiPartData', VOID, VOID, VOID, [0]);
191
+ initMetadataForClass(NoContent, 'NoContent', VOID, OutgoingContent);
192
+ initMetadataForClass(ReadChannelContent, 'ReadChannelContent', VOID, OutgoingContent);
193
+ initMetadataForClass(WriteChannelContent, 'WriteChannelContent', VOID, OutgoingContent, VOID, [1]);
194
+ initMetadataForClass(ProtocolUpgrade, 'ProtocolUpgrade', VOID, OutgoingContent, VOID, [4]);
195
+ initMetadataForClass(ContentWrapper, 'ContentWrapper', VOID, OutgoingContent);
196
+ initMetadataForObject(NullBody, 'NullBody');
197
+ initMetadataForClass(TextContent, 'TextContent', VOID, ByteArrayContent_0);
198
+ //endregion
199
+ function get_URL_ALPHABET() {
200
+ _init_properties_Codecs_kt__fudxxf();
201
+ return URL_ALPHABET;
202
+ }
203
+ var URL_ALPHABET;
204
+ function get_URL_ALPHABET_CHARS() {
205
+ _init_properties_Codecs_kt__fudxxf();
206
+ return URL_ALPHABET_CHARS;
207
+ }
208
+ var URL_ALPHABET_CHARS;
209
+ function get_HEX_ALPHABET() {
210
+ _init_properties_Codecs_kt__fudxxf();
211
+ return HEX_ALPHABET;
212
+ }
213
+ var HEX_ALPHABET;
214
+ function get_URL_PROTOCOL_PART() {
215
+ _init_properties_Codecs_kt__fudxxf();
216
+ return URL_PROTOCOL_PART;
217
+ }
218
+ var URL_PROTOCOL_PART;
219
+ function get_VALID_PATH_PART() {
220
+ _init_properties_Codecs_kt__fudxxf();
221
+ return VALID_PATH_PART;
222
+ }
223
+ var VALID_PATH_PART;
224
+ var ATTRIBUTE_CHARACTERS;
225
+ function get_SPECIAL_SYMBOLS() {
226
+ _init_properties_Codecs_kt__fudxxf();
227
+ return SPECIAL_SYMBOLS;
228
+ }
229
+ var SPECIAL_SYMBOLS;
230
+ function encodeURLParameter(_this__u8e3s4, spaceToPlus) {
231
+ spaceToPlus = spaceToPlus === VOID ? false : spaceToPlus;
232
+ _init_properties_Codecs_kt__fudxxf();
233
+ // Inline function 'kotlin.text.buildString' call
234
+ // Inline function 'kotlin.apply' call
235
+ var this_0 = StringBuilder_init_$Create$();
236
+ var content = encode(Charsets_getInstance().w1q_1.a1r(), _this__u8e3s4);
237
+ forEach_0(content, encodeURLParameter$lambda(this_0, spaceToPlus));
238
+ return this_0.toString();
239
+ }
240
+ function decodeURLPart(_this__u8e3s4, start, end, charset) {
241
+ start = start === VOID ? 0 : start;
242
+ end = end === VOID ? _this__u8e3s4.length : end;
243
+ charset = charset === VOID ? Charsets_getInstance().w1q_1 : charset;
244
+ _init_properties_Codecs_kt__fudxxf();
245
+ return decodeScan(_this__u8e3s4, start, end, false, charset);
246
+ }
247
+ function encodeURLQueryComponent(_this__u8e3s4, encodeFull, spaceToPlus, charset) {
248
+ encodeFull = encodeFull === VOID ? false : encodeFull;
249
+ spaceToPlus = spaceToPlus === VOID ? false : spaceToPlus;
250
+ charset = charset === VOID ? Charsets_getInstance().w1q_1 : charset;
251
+ _init_properties_Codecs_kt__fudxxf();
252
+ // Inline function 'kotlin.text.buildString' call
253
+ // Inline function 'kotlin.apply' call
254
+ var this_0 = StringBuilder_init_$Create$();
255
+ var content = encode(charset.a1r(), _this__u8e3s4);
256
+ forEach_0(content, encodeURLQueryComponent$lambda(spaceToPlus, this_0, encodeFull));
257
+ return this_0.toString();
258
+ }
259
+ function decodeURLQueryComponent(_this__u8e3s4, start, end, plusIsSpace, charset) {
260
+ start = start === VOID ? 0 : start;
261
+ end = end === VOID ? _this__u8e3s4.length : end;
262
+ plusIsSpace = plusIsSpace === VOID ? false : plusIsSpace;
263
+ charset = charset === VOID ? Charsets_getInstance().w1q_1 : charset;
264
+ _init_properties_Codecs_kt__fudxxf();
265
+ return decodeScan(_this__u8e3s4, start, end, plusIsSpace, charset);
266
+ }
267
+ function encodeURLPathPart(_this__u8e3s4) {
268
+ _init_properties_Codecs_kt__fudxxf();
269
+ return encodeURLPath(_this__u8e3s4, true);
270
+ }
271
+ function encodeURLParameterValue(_this__u8e3s4) {
272
+ _init_properties_Codecs_kt__fudxxf();
273
+ return encodeURLParameter(_this__u8e3s4, true);
274
+ }
275
+ function hexDigitToChar(digit) {
276
+ _init_properties_Codecs_kt__fudxxf();
277
+ return (0 <= digit ? digit <= 9 : false) ? Char__plus_impl_qi7pgj(_Char___init__impl__6a9atx(48), digit) : Char__minus_impl_a2frrh(Char__plus_impl_qi7pgj(_Char___init__impl__6a9atx(65), digit), 10);
278
+ }
279
+ function forEach_0(_this__u8e3s4, block) {
280
+ _init_properties_Codecs_kt__fudxxf();
281
+ takeWhile(_this__u8e3s4, forEach$lambda(block));
282
+ }
283
+ function percentEncode(_this__u8e3s4) {
284
+ _init_properties_Codecs_kt__fudxxf();
285
+ var code = _this__u8e3s4 & 255;
286
+ var array = charArray(3);
287
+ array[0] = _Char___init__impl__6a9atx(37);
288
+ array[1] = hexDigitToChar(code >> 4);
289
+ array[2] = hexDigitToChar(code & 15);
290
+ return concatToString(array);
291
+ }
292
+ function decodeScan(_this__u8e3s4, start, end, plusIsSpace, charset) {
293
+ _init_properties_Codecs_kt__fudxxf();
294
+ var inductionVariable = start;
295
+ if (inductionVariable < end)
296
+ do {
297
+ var index = inductionVariable;
298
+ inductionVariable = inductionVariable + 1 | 0;
299
+ var ch = charCodeAt(_this__u8e3s4, index);
300
+ if (ch === _Char___init__impl__6a9atx(37) || (plusIsSpace && ch === _Char___init__impl__6a9atx(43))) {
301
+ return decodeImpl(_this__u8e3s4, start, end, index, plusIsSpace, charset);
302
+ }
303
+ }
304
+ while (inductionVariable < end);
305
+ return start === 0 && end === _this__u8e3s4.length ? toString(_this__u8e3s4) : substring(_this__u8e3s4, start, end);
306
+ }
307
+ function encodeURLPath(_this__u8e3s4, encodeSlash, encodeEncoded) {
308
+ encodeSlash = encodeSlash === VOID ? false : encodeSlash;
309
+ encodeEncoded = encodeEncoded === VOID ? true : encodeEncoded;
310
+ _init_properties_Codecs_kt__fudxxf();
311
+ // Inline function 'kotlin.text.buildString' call
312
+ // Inline function 'kotlin.apply' call
313
+ var this_0 = StringBuilder_init_$Create$();
314
+ var charset = Charsets_getInstance().w1q_1;
315
+ var index = 0;
316
+ $l$loop_0: while (index < _this__u8e3s4.length) {
317
+ var current = charCodeAt(_this__u8e3s4, index);
318
+ if (!encodeSlash && current === _Char___init__impl__6a9atx(47) || get_URL_ALPHABET_CHARS().h2(new Char(current)) || get_VALID_PATH_PART().h2(new Char(current))) {
319
+ this_0.s(current);
320
+ index = index + 1 | 0;
321
+ continue $l$loop_0;
322
+ }
323
+ if (!encodeEncoded && current === _Char___init__impl__6a9atx(37) && (index + 2 | 0) < _this__u8e3s4.length && get_HEX_ALPHABET().h2(new Char(charCodeAt(_this__u8e3s4, index + 1 | 0))) && get_HEX_ALPHABET().h2(new Char(charCodeAt(_this__u8e3s4, index + 2 | 0)))) {
324
+ this_0.s(current);
325
+ this_0.s(charCodeAt(_this__u8e3s4, index + 1 | 0));
326
+ this_0.s(charCodeAt(_this__u8e3s4, index + 2 | 0));
327
+ index = index + 3 | 0;
328
+ continue $l$loop_0;
329
+ }
330
+ var symbolSize = isSurrogate(current) ? 2 : 1;
331
+ var tmp = encode(charset.a1r(), _this__u8e3s4, index, index + symbolSize | 0);
332
+ forEach_0(tmp, encodeURLPath$lambda(this_0));
333
+ index = index + symbolSize | 0;
334
+ }
335
+ return this_0.toString();
336
+ }
337
+ function decodeImpl(_this__u8e3s4, start, end, prefixEnd, plusIsSpace, charset) {
338
+ _init_properties_Codecs_kt__fudxxf();
339
+ var length = end - start | 0;
340
+ var sbSize = length > 255 ? length / 3 | 0 : length;
341
+ var sb = StringBuilder_init_$Create$_0(sbSize);
342
+ if (prefixEnd > start) {
343
+ sb.wb(_this__u8e3s4, start, prefixEnd);
344
+ }
345
+ var index = prefixEnd;
346
+ var bytes = null;
347
+ while (index < end) {
348
+ var c = charSequenceGet(_this__u8e3s4, index);
349
+ if (plusIsSpace && c === _Char___init__impl__6a9atx(43)) {
350
+ sb.s(_Char___init__impl__6a9atx(32));
351
+ index = index + 1 | 0;
352
+ } else if (c === _Char___init__impl__6a9atx(37)) {
353
+ if (bytes == null) {
354
+ bytes = new Int8Array((end - index | 0) / 3 | 0);
355
+ }
356
+ var count = 0;
357
+ while (index < end && charSequenceGet(_this__u8e3s4, index) === _Char___init__impl__6a9atx(37)) {
358
+ if ((index + 2 | 0) >= end) {
359
+ // Inline function 'kotlin.text.substring' call
360
+ var startIndex = index;
361
+ var endIndex = charSequenceLength(_this__u8e3s4);
362
+ var tmp$ret$0 = toString(charSequenceSubSequence(_this__u8e3s4, startIndex, endIndex));
363
+ throw new URLDecodeException('Incomplete trailing HEX escape: ' + tmp$ret$0 + ', in ' + toString(_this__u8e3s4) + ' at ' + index);
364
+ }
365
+ var digit1 = charToHexDigit(charSequenceGet(_this__u8e3s4, index + 1 | 0));
366
+ var digit2 = charToHexDigit(charSequenceGet(_this__u8e3s4, index + 2 | 0));
367
+ if (digit1 === -1 || digit2 === -1) {
368
+ throw new URLDecodeException('Wrong HEX escape: %' + toString_0(charSequenceGet(_this__u8e3s4, index + 1 | 0)) + toString_0(charSequenceGet(_this__u8e3s4, index + 2 | 0)) + ', in ' + toString(_this__u8e3s4) + ', at ' + index);
369
+ }
370
+ var tmp = bytes;
371
+ var _unary__edvuaz = count;
372
+ count = _unary__edvuaz + 1 | 0;
373
+ tmp[_unary__edvuaz] = toByte(imul(digit1, 16) + digit2 | 0);
374
+ index = index + 3 | 0;
375
+ }
376
+ sb.q(decodeToString(bytes, 0, 0 + count | 0));
377
+ } else {
378
+ sb.s(c);
379
+ index = index + 1 | 0;
380
+ }
381
+ }
382
+ return sb.toString();
383
+ }
384
+ function URLDecodeException(message) {
385
+ Exception_init_$Init$(message, this);
386
+ captureStack(this, URLDecodeException);
387
+ }
388
+ function charToHexDigit(c2) {
389
+ _init_properties_Codecs_kt__fudxxf();
390
+ return (_Char___init__impl__6a9atx(48) <= c2 ? c2 <= _Char___init__impl__6a9atx(57) : false) ? Char__minus_impl_a2frrh_0(c2, _Char___init__impl__6a9atx(48)) : (_Char___init__impl__6a9atx(65) <= c2 ? c2 <= _Char___init__impl__6a9atx(70) : false) ? Char__minus_impl_a2frrh_0(c2, _Char___init__impl__6a9atx(65)) + 10 | 0 : (_Char___init__impl__6a9atx(97) <= c2 ? c2 <= _Char___init__impl__6a9atx(102) : false) ? Char__minus_impl_a2frrh_0(c2, _Char___init__impl__6a9atx(97)) + 10 | 0 : -1;
391
+ }
392
+ function encodeURLParameter$lambda($$this$buildString, $spaceToPlus) {
393
+ return function (it) {
394
+ if (get_URL_ALPHABET().h2(it) || get_SPECIAL_SYMBOLS().h2(it))
395
+ $$this$buildString.s(numberToChar(it));
396
+ else {
397
+ var tmp;
398
+ if ($spaceToPlus) {
399
+ var tmp_0 = it;
400
+ // Inline function 'kotlin.code' call
401
+ var this_0 = _Char___init__impl__6a9atx(32);
402
+ var tmp$ret$0 = Char__toInt_impl_vasixd(this_0);
403
+ tmp = tmp_0 === toByte(tmp$ret$0);
404
+ } else {
405
+ tmp = false;
406
+ }
407
+ if (tmp)
408
+ $$this$buildString.s(_Char___init__impl__6a9atx(43));
409
+ else {
410
+ $$this$buildString.q(percentEncode(it));
411
+ }
412
+ }
413
+ return Unit_instance;
414
+ };
415
+ }
416
+ function encodeURLQueryComponent$lambda($spaceToPlus, $$this$buildString, $encodeFull) {
417
+ return function (it) {
418
+ var tmp = it;
419
+ // Inline function 'kotlin.code' call
420
+ var this_0 = _Char___init__impl__6a9atx(32);
421
+ var tmp$ret$0 = Char__toInt_impl_vasixd(this_0);
422
+ if (tmp === toByte(tmp$ret$0))
423
+ if ($spaceToPlus)
424
+ $$this$buildString.s(_Char___init__impl__6a9atx(43));
425
+ else
426
+ $$this$buildString.q('%20');
427
+ else {
428
+ if (get_URL_ALPHABET().h2(it) || (!$encodeFull && get_URL_PROTOCOL_PART().h2(it)))
429
+ $$this$buildString.s(numberToChar(it));
430
+ else {
431
+ $$this$buildString.q(percentEncode(it));
432
+ }
433
+ }
434
+ return Unit_instance;
435
+ };
436
+ }
437
+ function forEach$lambda($block) {
438
+ return function (buffer) {
439
+ while (canRead(buffer)) {
440
+ $block(buffer.uo());
441
+ }
442
+ return true;
443
+ };
444
+ }
445
+ function encodeURLPath$lambda($$this$buildString) {
446
+ return function (it) {
447
+ $$this$buildString.q(percentEncode(it));
448
+ return Unit_instance;
449
+ };
450
+ }
451
+ var properties_initialized_Codecs_kt_hkj9s1;
452
+ function _init_properties_Codecs_kt__fudxxf() {
453
+ if (!properties_initialized_Codecs_kt_hkj9s1) {
454
+ properties_initialized_Codecs_kt_hkj9s1 = true;
455
+ // Inline function 'kotlin.collections.map' call
456
+ var this_0 = plus_0(plus(Char__rangeTo_impl_tkncvp(_Char___init__impl__6a9atx(97), _Char___init__impl__6a9atx(122)), Char__rangeTo_impl_tkncvp(_Char___init__impl__6a9atx(65), _Char___init__impl__6a9atx(90))), Char__rangeTo_impl_tkncvp(_Char___init__impl__6a9atx(48), _Char___init__impl__6a9atx(57)));
457
+ // Inline function 'kotlin.collections.mapTo' call
458
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
459
+ var _iterator__ex2g4s = this_0.t();
460
+ while (_iterator__ex2g4s.u()) {
461
+ var item = _iterator__ex2g4s.v();
462
+ // Inline function 'kotlin.code' call
463
+ var this_1 = item.u1_1;
464
+ var tmp$ret$0 = Char__toInt_impl_vasixd(this_1);
465
+ var tmp$ret$1 = toByte(tmp$ret$0);
466
+ destination.e1(tmp$ret$1);
467
+ }
468
+ URL_ALPHABET = toSet(destination);
469
+ URL_ALPHABET_CHARS = toSet(plus_0(plus(Char__rangeTo_impl_tkncvp(_Char___init__impl__6a9atx(97), _Char___init__impl__6a9atx(122)), Char__rangeTo_impl_tkncvp(_Char___init__impl__6a9atx(65), _Char___init__impl__6a9atx(90))), Char__rangeTo_impl_tkncvp(_Char___init__impl__6a9atx(48), _Char___init__impl__6a9atx(57))));
470
+ HEX_ALPHABET = toSet(plus_0(plus(Char__rangeTo_impl_tkncvp(_Char___init__impl__6a9atx(97), _Char___init__impl__6a9atx(102)), Char__rangeTo_impl_tkncvp(_Char___init__impl__6a9atx(65), _Char___init__impl__6a9atx(70))), Char__rangeTo_impl_tkncvp(_Char___init__impl__6a9atx(48), _Char___init__impl__6a9atx(57))));
471
+ // Inline function 'kotlin.collections.map' call
472
+ var this_2 = setOf([new Char(_Char___init__impl__6a9atx(58)), new Char(_Char___init__impl__6a9atx(47)), new Char(_Char___init__impl__6a9atx(63)), new Char(_Char___init__impl__6a9atx(35)), new Char(_Char___init__impl__6a9atx(91)), new Char(_Char___init__impl__6a9atx(93)), new Char(_Char___init__impl__6a9atx(64)), new Char(_Char___init__impl__6a9atx(33)), new Char(_Char___init__impl__6a9atx(36)), new Char(_Char___init__impl__6a9atx(38)), new Char(_Char___init__impl__6a9atx(39)), new Char(_Char___init__impl__6a9atx(40)), new Char(_Char___init__impl__6a9atx(41)), new Char(_Char___init__impl__6a9atx(42)), new Char(_Char___init__impl__6a9atx(44)), new Char(_Char___init__impl__6a9atx(59)), new Char(_Char___init__impl__6a9atx(61)), new Char(_Char___init__impl__6a9atx(45)), new Char(_Char___init__impl__6a9atx(46)), new Char(_Char___init__impl__6a9atx(95)), new Char(_Char___init__impl__6a9atx(126)), new Char(_Char___init__impl__6a9atx(43))]);
473
+ // Inline function 'kotlin.collections.mapTo' call
474
+ var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_2, 10));
475
+ var _iterator__ex2g4s_0 = this_2.t();
476
+ while (_iterator__ex2g4s_0.u()) {
477
+ var item_0 = _iterator__ex2g4s_0.v();
478
+ // Inline function 'kotlin.code' call
479
+ var this_3 = item_0.u1_1;
480
+ var tmp$ret$0_0 = Char__toInt_impl_vasixd(this_3);
481
+ var tmp$ret$1_0 = toByte(tmp$ret$0_0);
482
+ destination_0.e1(tmp$ret$1_0);
483
+ }
484
+ URL_PROTOCOL_PART = destination_0;
485
+ VALID_PATH_PART = setOf([new Char(_Char___init__impl__6a9atx(58)), new Char(_Char___init__impl__6a9atx(64)), new Char(_Char___init__impl__6a9atx(33)), new Char(_Char___init__impl__6a9atx(36)), new Char(_Char___init__impl__6a9atx(38)), new Char(_Char___init__impl__6a9atx(39)), new Char(_Char___init__impl__6a9atx(40)), new Char(_Char___init__impl__6a9atx(41)), new Char(_Char___init__impl__6a9atx(42)), new Char(_Char___init__impl__6a9atx(43)), new Char(_Char___init__impl__6a9atx(44)), new Char(_Char___init__impl__6a9atx(59)), new Char(_Char___init__impl__6a9atx(61)), new Char(_Char___init__impl__6a9atx(45)), new Char(_Char___init__impl__6a9atx(46)), new Char(_Char___init__impl__6a9atx(95)), new Char(_Char___init__impl__6a9atx(126))]);
486
+ ATTRIBUTE_CHARACTERS = plus_1(get_URL_ALPHABET_CHARS(), setOf([new Char(_Char___init__impl__6a9atx(33)), new Char(_Char___init__impl__6a9atx(35)), new Char(_Char___init__impl__6a9atx(36)), new Char(_Char___init__impl__6a9atx(38)), new Char(_Char___init__impl__6a9atx(43)), new Char(_Char___init__impl__6a9atx(45)), new Char(_Char___init__impl__6a9atx(46)), new Char(_Char___init__impl__6a9atx(94)), new Char(_Char___init__impl__6a9atx(95)), new Char(_Char___init__impl__6a9atx(96)), new Char(_Char___init__impl__6a9atx(124)), new Char(_Char___init__impl__6a9atx(126))]));
487
+ // Inline function 'kotlin.collections.map' call
488
+ var this_4 = listOf([new Char(_Char___init__impl__6a9atx(45)), new Char(_Char___init__impl__6a9atx(46)), new Char(_Char___init__impl__6a9atx(95)), new Char(_Char___init__impl__6a9atx(126))]);
489
+ // Inline function 'kotlin.collections.mapTo' call
490
+ var destination_1 = ArrayList_init_$Create$(collectionSizeOrDefault(this_4, 10));
491
+ var _iterator__ex2g4s_1 = this_4.t();
492
+ while (_iterator__ex2g4s_1.u()) {
493
+ var item_1 = _iterator__ex2g4s_1.v();
494
+ // Inline function 'kotlin.code' call
495
+ var this_5 = item_1.u1_1;
496
+ var tmp$ret$0_1 = Char__toInt_impl_vasixd(this_5);
497
+ var tmp$ret$1_1 = toByte(tmp$ret$0_1);
498
+ destination_1.e1(tmp$ret$1_1);
499
+ }
500
+ SPECIAL_SYMBOLS = destination_1;
501
+ }
502
+ }
503
+ var textSubTypes;
504
+ function ContentType_init_$Init$(contentType, contentSubtype, parameters, $this) {
505
+ parameters = parameters === VOID ? emptyList() : parameters;
506
+ ContentType.call($this, contentType, contentSubtype, contentType + '/' + contentSubtype, parameters);
507
+ return $this;
508
+ }
509
+ function ContentType_init_$Create$(contentType, contentSubtype, parameters) {
510
+ return ContentType_init_$Init$(contentType, contentSubtype, parameters, objectCreate(protoOf(ContentType)));
511
+ }
512
+ function hasParameter($this, name, value) {
513
+ var tmp;
514
+ switch ($this.x2i_1.g1()) {
515
+ case 0:
516
+ tmp = false;
517
+ break;
518
+ case 1:
519
+ // Inline function 'kotlin.let' call
520
+
521
+ var it = $this.x2i_1.h1(0);
522
+ tmp = (equals(it.y2i_1, name, true) && equals(it.z2i_1, value, true));
523
+ break;
524
+ default:
525
+ var tmp0 = $this.x2i_1;
526
+ var tmp$ret$2;
527
+ $l$block_0: {
528
+ // Inline function 'kotlin.collections.any' call
529
+ var tmp_0;
530
+ if (isInterface(tmp0, Collection)) {
531
+ tmp_0 = tmp0.r();
532
+ } else {
533
+ tmp_0 = false;
534
+ }
535
+ if (tmp_0) {
536
+ tmp$ret$2 = false;
537
+ break $l$block_0;
538
+ }
539
+ var _iterator__ex2g4s = tmp0.t();
540
+ while (_iterator__ex2g4s.u()) {
541
+ var element = _iterator__ex2g4s.v();
542
+ if (equals(element.y2i_1, name, true) && equals(element.z2i_1, value, true)) {
543
+ tmp$ret$2 = true;
544
+ break $l$block_0;
545
+ }
546
+ }
547
+ tmp$ret$2 = false;
548
+ }
549
+
550
+ tmp = tmp$ret$2;
551
+ break;
552
+ }
553
+ return tmp;
554
+ }
555
+ function Companion() {
556
+ Companion_instance = this;
557
+ this.b2j_1 = ContentType_init_$Create$('*', '*');
558
+ }
559
+ protoOf(Companion).gm = function (value) {
560
+ if (isBlank(value))
561
+ return this.b2j_1;
562
+ // Inline function 'io.ktor.http.Companion.parse' call
563
+ var headerValue = last(parseHeaderValue(value));
564
+ var tmp0 = headerValue.c2j_1;
565
+ var parameters = headerValue.d2j_1;
566
+ var slash = indexOf(tmp0, _Char___init__impl__6a9atx(47));
567
+ if (slash === -1) {
568
+ // Inline function 'kotlin.text.trim' call
569
+ if (toString(trim(isCharSequence(tmp0) ? tmp0 : THROW_CCE())) === '*')
570
+ return Companion_getInstance().b2j_1;
571
+ throw new BadContentTypeFormatException(value);
572
+ }
573
+ // Inline function 'kotlin.text.trim' call
574
+ var this_0 = take(tmp0, slash);
575
+ var type = toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE()));
576
+ // Inline function 'kotlin.text.isEmpty' call
577
+ if (charSequenceLength(type) === 0) {
578
+ throw new BadContentTypeFormatException(value);
579
+ }
580
+ // Inline function 'kotlin.text.trim' call
581
+ var this_1 = substring_0(tmp0, slash + 1 | 0);
582
+ var subtype = toString(trim(isCharSequence(this_1) ? this_1 : THROW_CCE()));
583
+ if (contains(type, _Char___init__impl__6a9atx(32)) || contains(subtype, _Char___init__impl__6a9atx(32))) {
584
+ throw new BadContentTypeFormatException(value);
585
+ }
586
+ var tmp;
587
+ // Inline function 'kotlin.text.isEmpty' call
588
+ if (charSequenceLength(subtype) === 0) {
589
+ tmp = true;
590
+ } else {
591
+ tmp = contains(subtype, _Char___init__impl__6a9atx(47));
592
+ }
593
+ if (tmp) {
594
+ throw new BadContentTypeFormatException(value);
595
+ }
596
+ return ContentType_init_$Create$(type, subtype, parameters);
597
+ };
598
+ var Companion_instance;
599
+ function Companion_getInstance() {
600
+ if (Companion_instance == null)
601
+ new Companion();
602
+ return Companion_instance;
603
+ }
604
+ function Application() {
605
+ Application_instance = this;
606
+ this.f2j_1 = 'application';
607
+ this.g2j_1 = ContentType_init_$Create$('application', '*');
608
+ this.h2j_1 = ContentType_init_$Create$('application', 'atom+xml');
609
+ this.i2j_1 = ContentType_init_$Create$('application', 'cbor');
610
+ this.j2j_1 = ContentType_init_$Create$('application', 'json');
611
+ this.k2j_1 = ContentType_init_$Create$('application', 'hal+json');
612
+ this.l2j_1 = ContentType_init_$Create$('application', 'javascript');
613
+ this.m2j_1 = ContentType_init_$Create$('application', 'octet-stream');
614
+ this.n2j_1 = ContentType_init_$Create$('application', 'rss+xml');
615
+ this.o2j_1 = ContentType_init_$Create$('application', 'soap+xml');
616
+ this.p2j_1 = ContentType_init_$Create$('application', 'xml');
617
+ this.q2j_1 = ContentType_init_$Create$('application', 'xml-dtd');
618
+ this.r2j_1 = ContentType_init_$Create$('application', 'yaml');
619
+ this.s2j_1 = ContentType_init_$Create$('application', 'zip');
620
+ this.t2j_1 = ContentType_init_$Create$('application', 'gzip');
621
+ this.u2j_1 = ContentType_init_$Create$('application', 'x-www-form-urlencoded');
622
+ this.v2j_1 = ContentType_init_$Create$('application', 'pdf');
623
+ this.w2j_1 = ContentType_init_$Create$('application', 'vnd.openxmlformats-officedocument.spreadsheetml.sheet');
624
+ this.x2j_1 = ContentType_init_$Create$('application', 'vnd.openxmlformats-officedocument.wordprocessingml.document');
625
+ this.y2j_1 = ContentType_init_$Create$('application', 'vnd.openxmlformats-officedocument.presentationml.presentation');
626
+ this.z2j_1 = ContentType_init_$Create$('application', 'protobuf');
627
+ this.a2k_1 = ContentType_init_$Create$('application', 'wasm');
628
+ this.b2k_1 = ContentType_init_$Create$('application', 'problem+json');
629
+ this.c2k_1 = ContentType_init_$Create$('application', 'problem+xml');
630
+ }
631
+ protoOf(Application).d2k = function (contentType) {
632
+ return startsWith(contentType, 'application/', true);
633
+ };
634
+ var Application_instance;
635
+ function Application_getInstance() {
636
+ if (Application_instance == null)
637
+ new Application();
638
+ return Application_instance;
639
+ }
640
+ function MultiPart() {
641
+ MultiPart_instance = this;
642
+ this.e2k_1 = 'multipart';
643
+ this.f2k_1 = ContentType_init_$Create$('multipart', '*');
644
+ this.g2k_1 = ContentType_init_$Create$('multipart', 'mixed');
645
+ this.h2k_1 = ContentType_init_$Create$('multipart', 'alternative');
646
+ this.i2k_1 = ContentType_init_$Create$('multipart', 'related');
647
+ this.j2k_1 = ContentType_init_$Create$('multipart', 'form-data');
648
+ this.k2k_1 = ContentType_init_$Create$('multipart', 'signed');
649
+ this.l2k_1 = ContentType_init_$Create$('multipart', 'encrypted');
650
+ this.m2k_1 = ContentType_init_$Create$('multipart', 'byteranges');
651
+ }
652
+ protoOf(MultiPart).d2k = function (contentType) {
653
+ return startsWith(contentType, 'multipart/', true);
654
+ };
655
+ var MultiPart_instance;
656
+ function MultiPart_getInstance() {
657
+ if (MultiPart_instance == null)
658
+ new MultiPart();
659
+ return MultiPart_instance;
660
+ }
661
+ function Text() {
662
+ Text_instance = this;
663
+ this.n2k_1 = 'text';
664
+ this.o2k_1 = ContentType_init_$Create$('text', '*');
665
+ this.p2k_1 = ContentType_init_$Create$('text', 'plain');
666
+ this.q2k_1 = ContentType_init_$Create$('text', 'css');
667
+ this.r2k_1 = ContentType_init_$Create$('text', 'csv');
668
+ this.s2k_1 = ContentType_init_$Create$('text', 'html');
669
+ this.t2k_1 = ContentType_init_$Create$('text', 'javascript');
670
+ this.u2k_1 = ContentType_init_$Create$('text', 'vcard');
671
+ this.v2k_1 = ContentType_init_$Create$('text', 'xml');
672
+ this.w2k_1 = ContentType_init_$Create$('text', 'event-stream');
673
+ }
674
+ var Text_instance;
675
+ function Text_getInstance() {
676
+ if (Text_instance == null)
677
+ new Text();
678
+ return Text_instance;
679
+ }
680
+ function ContentType(contentType, contentSubtype, existingContent, parameters) {
681
+ Companion_getInstance();
682
+ parameters = parameters === VOID ? emptyList() : parameters;
683
+ HeaderValueWithParameters.call(this, existingContent, parameters);
684
+ this.z2k_1 = contentType;
685
+ this.a2l_1 = contentSubtype;
686
+ }
687
+ protoOf(ContentType).b2l = function (name, value) {
688
+ if (hasParameter(this, name, value))
689
+ return this;
690
+ return new ContentType(this.z2k_1, this.a2l_1, this.w2i_1, plus_2(this.x2i_1, HeaderValueParam_init_$Create$(name, value)));
691
+ };
692
+ protoOf(ContentType).c2l = function () {
693
+ return this.x2i_1.r() ? this : ContentType_init_$Create$(this.z2k_1, this.a2l_1);
694
+ };
695
+ protoOf(ContentType).d2l = function (pattern) {
696
+ if (!(pattern.z2k_1 === '*') && !equals(pattern.z2k_1, this.z2k_1, true)) {
697
+ return false;
698
+ }
699
+ if (!(pattern.a2l_1 === '*') && !equals(pattern.a2l_1, this.a2l_1, true)) {
700
+ return false;
701
+ }
702
+ var _iterator__ex2g4s = pattern.x2i_1.t();
703
+ while (_iterator__ex2g4s.u()) {
704
+ var _destruct__k2r9zo = _iterator__ex2g4s.v();
705
+ var patternName = _destruct__k2r9zo.se();
706
+ var patternValue = _destruct__k2r9zo.te();
707
+ var tmp;
708
+ if (patternName === '*') {
709
+ var tmp_0;
710
+ if (patternValue === '*') {
711
+ tmp_0 = true;
712
+ } else {
713
+ var tmp0 = this.x2i_1;
714
+ var tmp$ret$0;
715
+ $l$block_0: {
716
+ // Inline function 'kotlin.collections.any' call
717
+ var tmp_1;
718
+ if (isInterface(tmp0, Collection)) {
719
+ tmp_1 = tmp0.r();
720
+ } else {
721
+ tmp_1 = false;
722
+ }
723
+ if (tmp_1) {
724
+ tmp$ret$0 = false;
725
+ break $l$block_0;
726
+ }
727
+ var _iterator__ex2g4s_0 = tmp0.t();
728
+ while (_iterator__ex2g4s_0.u()) {
729
+ var element = _iterator__ex2g4s_0.v();
730
+ if (equals(element.z2i_1, patternValue, true)) {
731
+ tmp$ret$0 = true;
732
+ break $l$block_0;
733
+ }
734
+ }
735
+ tmp$ret$0 = false;
736
+ }
737
+ tmp_0 = tmp$ret$0;
738
+ }
739
+ tmp = tmp_0;
740
+ } else {
741
+ var value = this.e2l(patternName);
742
+ tmp = patternValue === '*' ? !(value == null) : equals(value, patternValue, true);
743
+ }
744
+ var matches = tmp;
745
+ if (!matches) {
746
+ return false;
747
+ }
748
+ }
749
+ return true;
750
+ };
751
+ protoOf(ContentType).equals = function (other) {
752
+ var tmp;
753
+ var tmp_0;
754
+ var tmp_1;
755
+ if (other instanceof ContentType) {
756
+ tmp_1 = equals(this.z2k_1, other.z2k_1, true);
757
+ } else {
758
+ tmp_1 = false;
759
+ }
760
+ if (tmp_1) {
761
+ tmp_0 = equals(this.a2l_1, other.a2l_1, true);
762
+ } else {
763
+ tmp_0 = false;
764
+ }
765
+ if (tmp_0) {
766
+ tmp = equals_0(this.x2i_1, other.x2i_1);
767
+ } else {
768
+ tmp = false;
769
+ }
770
+ return tmp;
771
+ };
772
+ protoOf(ContentType).hashCode = function () {
773
+ // Inline function 'kotlin.text.lowercase' call
774
+ // Inline function 'kotlin.js.asDynamic' call
775
+ var tmp$ret$1 = this.z2k_1.toLowerCase();
776
+ var result = getStringHashCode(tmp$ret$1);
777
+ var tmp = result;
778
+ var tmp_0 = imul(31, result);
779
+ // Inline function 'kotlin.text.lowercase' call
780
+ // Inline function 'kotlin.js.asDynamic' call
781
+ var tmp$ret$3 = this.a2l_1.toLowerCase();
782
+ result = tmp + (tmp_0 + getStringHashCode(tmp$ret$3) | 0) | 0;
783
+ result = result + imul(31, hashCode(this.x2i_1)) | 0;
784
+ return result;
785
+ };
786
+ function charset(_this__u8e3s4) {
787
+ _init_properties_ContentTypes_kt__i9dj34();
788
+ var tmp0_safe_receiver = _this__u8e3s4.e2l('charset');
789
+ var tmp;
790
+ if (tmp0_safe_receiver == null) {
791
+ tmp = null;
792
+ } else {
793
+ // Inline function 'kotlin.let' call
794
+ var tmp_0;
795
+ try {
796
+ tmp_0 = forName(Charsets_getInstance(), tmp0_safe_receiver);
797
+ } catch ($p) {
798
+ var tmp_1;
799
+ if ($p instanceof IllegalArgumentException) {
800
+ var _unused_var__etf5q3 = $p;
801
+ tmp_1 = null;
802
+ } else {
803
+ throw $p;
804
+ }
805
+ tmp_0 = tmp_1;
806
+ }
807
+ tmp = tmp_0;
808
+ }
809
+ return tmp;
810
+ }
811
+ function withCharset(_this__u8e3s4, charset) {
812
+ _init_properties_ContentTypes_kt__i9dj34();
813
+ return _this__u8e3s4.b2l('charset', get_name(charset));
814
+ }
815
+ function BadContentTypeFormatException(value) {
816
+ Exception_init_$Init$('Bad Content-Type format: ' + value, this);
817
+ captureStack(this, BadContentTypeFormatException);
818
+ }
819
+ function withCharsetIfNeeded(_this__u8e3s4, charset) {
820
+ _init_properties_ContentTypes_kt__i9dj34();
821
+ var tmp;
822
+ // Inline function 'kotlin.text.lowercase' call
823
+ // Inline function 'kotlin.js.asDynamic' call
824
+ if (!(_this__u8e3s4.z2k_1.toLowerCase() === 'text')) {
825
+ tmp = _this__u8e3s4;
826
+ } else {
827
+ tmp = _this__u8e3s4.b2l('charset', get_name(charset));
828
+ }
829
+ return tmp;
830
+ }
831
+ var properties_initialized_ContentTypes_kt_1k2nnm;
832
+ function _init_properties_ContentTypes_kt__i9dj34() {
833
+ if (!properties_initialized_ContentTypes_kt_1k2nnm) {
834
+ properties_initialized_ContentTypes_kt_1k2nnm = true;
835
+ textSubTypes = setOf(['json', 'ld+json', 'xml', 'xhtml+xml', 'rss+xml', 'atom+xml', 'x-www-form-urlencoded', 'svg+xml']);
836
+ }
837
+ }
838
+ function get_HeaderFieldValueSeparators() {
839
+ _init_properties_HeaderValueWithParameters_kt__z6luvy();
840
+ return HeaderFieldValueSeparators;
841
+ }
842
+ var HeaderFieldValueSeparators;
843
+ function Companion_0() {
844
+ }
845
+ var Companion_instance_0;
846
+ function Companion_getInstance_0() {
847
+ return Companion_instance_0;
848
+ }
849
+ function HeaderValueWithParameters(content, parameters) {
850
+ parameters = parameters === VOID ? emptyList() : parameters;
851
+ this.w2i_1 = content;
852
+ this.x2i_1 = parameters;
853
+ }
854
+ protoOf(HeaderValueWithParameters).e2l = function (name) {
855
+ var inductionVariable = 0;
856
+ var last = get_lastIndex(this.x2i_1);
857
+ if (inductionVariable <= last)
858
+ do {
859
+ var index = inductionVariable;
860
+ inductionVariable = inductionVariable + 1 | 0;
861
+ var parameter = this.x2i_1.h1(index);
862
+ if (equals(parameter.y2i_1, name, true)) {
863
+ return parameter.z2i_1;
864
+ }
865
+ }
866
+ while (!(index === last));
867
+ return null;
868
+ };
869
+ protoOf(HeaderValueWithParameters).toString = function () {
870
+ var tmp;
871
+ if (this.x2i_1.r()) {
872
+ tmp = this.w2i_1;
873
+ } else {
874
+ var tmp_0 = this.w2i_1.length;
875
+ // Inline function 'kotlin.collections.sumOf' call
876
+ var sum = 0;
877
+ var _iterator__ex2g4s = this.x2i_1.t();
878
+ while (_iterator__ex2g4s.u()) {
879
+ var element = _iterator__ex2g4s.v();
880
+ var tmp_1 = sum;
881
+ sum = tmp_1 + ((element.y2i_1.length + element.z2i_1.length | 0) + 3 | 0) | 0;
882
+ }
883
+ var size = tmp_0 + sum | 0;
884
+ // Inline function 'kotlin.apply' call
885
+ var this_0 = StringBuilder_init_$Create$_0(size);
886
+ this_0.q(this.w2i_1);
887
+ var inductionVariable = 0;
888
+ var last = get_lastIndex(this.x2i_1);
889
+ if (inductionVariable <= last)
890
+ do {
891
+ var index = inductionVariable;
892
+ inductionVariable = inductionVariable + 1 | 0;
893
+ var element_0 = this.x2i_1.h1(index);
894
+ this_0.q('; ');
895
+ this_0.q(element_0.y2i_1);
896
+ this_0.q('=');
897
+ // Inline function 'io.ktor.http.escapeIfNeededTo' call
898
+ var this_1 = element_0.z2i_1;
899
+ if (needQuotes(this_1))
900
+ this_0.q(quote(this_1));
901
+ else
902
+ this_0.q(this_1);
903
+ }
904
+ while (!(index === last));
905
+ tmp = this_0.toString();
906
+ }
907
+ return tmp;
908
+ };
909
+ function needQuotes(_this__u8e3s4) {
910
+ _init_properties_HeaderValueWithParameters_kt__z6luvy();
911
+ // Inline function 'kotlin.text.isEmpty' call
912
+ if (charSequenceLength(_this__u8e3s4) === 0)
913
+ return true;
914
+ if (isQuoted(_this__u8e3s4))
915
+ return false;
916
+ var inductionVariable = 0;
917
+ var last = _this__u8e3s4.length;
918
+ while (inductionVariable < last) {
919
+ var element = charCodeAt(_this__u8e3s4, inductionVariable);
920
+ inductionVariable = inductionVariable + 1 | 0;
921
+ if (get_HeaderFieldValueSeparators().h2(new Char(element)))
922
+ return true;
923
+ }
924
+ return false;
925
+ }
926
+ function quote(_this__u8e3s4) {
927
+ _init_properties_HeaderValueWithParameters_kt__z6luvy();
928
+ // Inline function 'kotlin.text.buildString' call
929
+ // Inline function 'kotlin.apply' call
930
+ var this_0 = StringBuilder_init_$Create$();
931
+ quoteTo(_this__u8e3s4, this_0);
932
+ return this_0.toString();
933
+ }
934
+ function isQuoted(_this__u8e3s4) {
935
+ _init_properties_HeaderValueWithParameters_kt__z6luvy();
936
+ if (_this__u8e3s4.length < 2) {
937
+ return false;
938
+ }
939
+ if (!(first(_this__u8e3s4) === _Char___init__impl__6a9atx(34)) || !(last_0(_this__u8e3s4) === _Char___init__impl__6a9atx(34))) {
940
+ return false;
941
+ }
942
+ var startIndex = 1;
943
+ $l$loop: do {
944
+ var index = indexOf(_this__u8e3s4, _Char___init__impl__6a9atx(34), startIndex);
945
+ if (index === get_lastIndex_0(_this__u8e3s4)) {
946
+ break $l$loop;
947
+ }
948
+ var slashesCount = 0;
949
+ var slashIndex = index - 1 | 0;
950
+ while (charCodeAt(_this__u8e3s4, slashIndex) === _Char___init__impl__6a9atx(92)) {
951
+ slashesCount = slashesCount + 1 | 0;
952
+ slashIndex = slashIndex - 1 | 0;
953
+ }
954
+ if ((slashesCount % 2 | 0) === 0) {
955
+ return false;
956
+ }
957
+ startIndex = index + 1 | 0;
958
+ }
959
+ while (startIndex < _this__u8e3s4.length);
960
+ return true;
961
+ }
962
+ function quoteTo(_this__u8e3s4, out) {
963
+ _init_properties_HeaderValueWithParameters_kt__z6luvy();
964
+ out.q('"');
965
+ var inductionVariable = 0;
966
+ var last = _this__u8e3s4.length;
967
+ while (inductionVariable < last) {
968
+ var element = charCodeAt(_this__u8e3s4, inductionVariable);
969
+ inductionVariable = inductionVariable + 1 | 0;
970
+ var ch = element;
971
+ if (ch === _Char___init__impl__6a9atx(92))
972
+ out.q('\\\\');
973
+ else if (ch === _Char___init__impl__6a9atx(10))
974
+ out.q('\\n');
975
+ else if (ch === _Char___init__impl__6a9atx(13))
976
+ out.q('\\r');
977
+ else if (ch === _Char___init__impl__6a9atx(9))
978
+ out.q('\\t');
979
+ else if (ch === _Char___init__impl__6a9atx(34))
980
+ out.q('\\"');
981
+ else
982
+ out.s(ch);
983
+ }
984
+ out.q('"');
985
+ }
986
+ var properties_initialized_HeaderValueWithParameters_kt_yu5xg;
987
+ function _init_properties_HeaderValueWithParameters_kt__z6luvy() {
988
+ if (!properties_initialized_HeaderValueWithParameters_kt_yu5xg) {
989
+ properties_initialized_HeaderValueWithParameters_kt_yu5xg = true;
990
+ HeaderFieldValueSeparators = setOf([new Char(_Char___init__impl__6a9atx(40)), new Char(_Char___init__impl__6a9atx(41)), new Char(_Char___init__impl__6a9atx(60)), new Char(_Char___init__impl__6a9atx(62)), new Char(_Char___init__impl__6a9atx(64)), new Char(_Char___init__impl__6a9atx(44)), new Char(_Char___init__impl__6a9atx(59)), new Char(_Char___init__impl__6a9atx(58)), new Char(_Char___init__impl__6a9atx(92)), new Char(_Char___init__impl__6a9atx(34)), new Char(_Char___init__impl__6a9atx(47)), new Char(_Char___init__impl__6a9atx(91)), new Char(_Char___init__impl__6a9atx(93)), new Char(_Char___init__impl__6a9atx(63)), new Char(_Char___init__impl__6a9atx(61)), new Char(_Char___init__impl__6a9atx(123)), new Char(_Char___init__impl__6a9atx(125)), new Char(_Char___init__impl__6a9atx(32)), new Char(_Char___init__impl__6a9atx(9)), new Char(_Char___init__impl__6a9atx(10)), new Char(_Char___init__impl__6a9atx(13))]);
991
+ }
992
+ }
993
+ function Companion_1() {
994
+ Companion_instance_1 = this;
995
+ this.f2l_1 = EmptyHeaders_instance;
996
+ }
997
+ var Companion_instance_1;
998
+ function Companion_getInstance_1() {
999
+ if (Companion_instance_1 == null)
1000
+ new Companion_1();
1001
+ return Companion_instance_1;
1002
+ }
1003
+ function HeadersBuilder(size) {
1004
+ size = size === VOID ? 8 : size;
1005
+ StringValuesBuilderImpl.call(this, true, size);
1006
+ }
1007
+ protoOf(HeadersBuilder).i2l = function () {
1008
+ return new HeadersImpl(this.p2e_1);
1009
+ };
1010
+ protoOf(HeadersBuilder).q2e = function (name) {
1011
+ protoOf(StringValuesBuilderImpl).q2e.call(this, name);
1012
+ HttpHeaders_getInstance().g2p(name);
1013
+ };
1014
+ protoOf(HeadersBuilder).s2e = function (value) {
1015
+ protoOf(StringValuesBuilderImpl).s2e.call(this, value);
1016
+ HttpHeaders_getInstance().h2p(value);
1017
+ };
1018
+ function headersOf(name, value) {
1019
+ return new HeadersSingleImpl(name, listOf_0(value));
1020
+ }
1021
+ function EmptyHeaders() {
1022
+ }
1023
+ protoOf(EmptyHeaders).k2e = function () {
1024
+ return true;
1025
+ };
1026
+ protoOf(EmptyHeaders).l2e = function (name) {
1027
+ return null;
1028
+ };
1029
+ protoOf(EmptyHeaders).m2e = function () {
1030
+ return emptySet();
1031
+ };
1032
+ protoOf(EmptyHeaders).i2e = function () {
1033
+ return emptySet();
1034
+ };
1035
+ protoOf(EmptyHeaders).r = function () {
1036
+ return true;
1037
+ };
1038
+ protoOf(EmptyHeaders).toString = function () {
1039
+ return 'Headers ' + toString(this.i2e());
1040
+ };
1041
+ var EmptyHeaders_instance;
1042
+ function EmptyHeaders_getInstance() {
1043
+ return EmptyHeaders_instance;
1044
+ }
1045
+ function HeadersImpl(values) {
1046
+ values = values === VOID ? emptyMap() : values;
1047
+ StringValuesImpl.call(this, true, values);
1048
+ }
1049
+ protoOf(HeadersImpl).toString = function () {
1050
+ return 'Headers ' + toString(this.i2e());
1051
+ };
1052
+ function HeadersSingleImpl(name, values) {
1053
+ StringValuesSingleImpl.call(this, true, name, values);
1054
+ }
1055
+ protoOf(HeadersSingleImpl).toString = function () {
1056
+ return 'Headers ' + toString(this.i2e());
1057
+ };
1058
+ function HeaderValue(value, params) {
1059
+ params = params === VOID ? emptyList() : params;
1060
+ this.c2j_1 = value;
1061
+ this.d2j_1 = params;
1062
+ var tmp = this;
1063
+ var tmp0 = this.d2j_1;
1064
+ var tmp$ret$1;
1065
+ $l$block: {
1066
+ // Inline function 'kotlin.collections.firstOrNull' call
1067
+ var _iterator__ex2g4s = tmp0.t();
1068
+ while (_iterator__ex2g4s.u()) {
1069
+ var element = _iterator__ex2g4s.v();
1070
+ if (element.y2i_1 === 'q') {
1071
+ tmp$ret$1 = element;
1072
+ break $l$block;
1073
+ }
1074
+ }
1075
+ tmp$ret$1 = null;
1076
+ }
1077
+ var tmp0_safe_receiver = tmp$ret$1;
1078
+ var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.z2i_1;
1079
+ var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : toDoubleOrNull(tmp1_safe_receiver);
1080
+ var tmp_0;
1081
+ if (tmp2_safe_receiver == null) {
1082
+ tmp_0 = null;
1083
+ } else {
1084
+ // Inline function 'kotlin.takeIf' call
1085
+ var tmp_1;
1086
+ if (0.0 <= tmp2_safe_receiver ? tmp2_safe_receiver <= 1.0 : false) {
1087
+ tmp_1 = tmp2_safe_receiver;
1088
+ } else {
1089
+ tmp_1 = null;
1090
+ }
1091
+ tmp_0 = tmp_1;
1092
+ }
1093
+ var tmp3_elvis_lhs = tmp_0;
1094
+ tmp.e2j_1 = tmp3_elvis_lhs == null ? 1.0 : tmp3_elvis_lhs;
1095
+ }
1096
+ protoOf(HeaderValue).se = function () {
1097
+ return this.c2j_1;
1098
+ };
1099
+ protoOf(HeaderValue).toString = function () {
1100
+ return 'HeaderValue(value=' + this.c2j_1 + ', params=' + toString(this.d2j_1) + ')';
1101
+ };
1102
+ protoOf(HeaderValue).hashCode = function () {
1103
+ var result = getStringHashCode(this.c2j_1);
1104
+ result = imul(result, 31) + hashCode(this.d2j_1) | 0;
1105
+ return result;
1106
+ };
1107
+ protoOf(HeaderValue).equals = function (other) {
1108
+ if (this === other)
1109
+ return true;
1110
+ if (!(other instanceof HeaderValue))
1111
+ return false;
1112
+ if (!(this.c2j_1 === other.c2j_1))
1113
+ return false;
1114
+ if (!equals_0(this.d2j_1, other.d2j_1))
1115
+ return false;
1116
+ return true;
1117
+ };
1118
+ function parseAndSortHeader(header) {
1119
+ // Inline function 'kotlin.collections.sortedByDescending' call
1120
+ var this_0 = parseHeaderValue(header);
1121
+ // Inline function 'kotlin.comparisons.compareByDescending' call
1122
+ var tmp = parseAndSortHeader$lambda;
1123
+ var tmp$ret$0 = new sam$kotlin_Comparator$0(tmp);
1124
+ return sortedWith(this_0, tmp$ret$0);
1125
+ }
1126
+ function HeaderValueParam_init_$Init$(name, value, $this) {
1127
+ HeaderValueParam.call($this, name, value, false);
1128
+ return $this;
1129
+ }
1130
+ function HeaderValueParam_init_$Create$(name, value) {
1131
+ return HeaderValueParam_init_$Init$(name, value, objectCreate(protoOf(HeaderValueParam)));
1132
+ }
1133
+ function HeaderValueParam(name, value, escapeValue) {
1134
+ this.y2i_1 = name;
1135
+ this.z2i_1 = value;
1136
+ this.a2j_1 = escapeValue;
1137
+ }
1138
+ protoOf(HeaderValueParam).equals = function (other) {
1139
+ var tmp;
1140
+ var tmp_0;
1141
+ if (other instanceof HeaderValueParam) {
1142
+ tmp_0 = equals(other.y2i_1, this.y2i_1, true);
1143
+ } else {
1144
+ tmp_0 = false;
1145
+ }
1146
+ if (tmp_0) {
1147
+ tmp = equals(other.z2i_1, this.z2i_1, true);
1148
+ } else {
1149
+ tmp = false;
1150
+ }
1151
+ return tmp;
1152
+ };
1153
+ protoOf(HeaderValueParam).hashCode = function () {
1154
+ // Inline function 'kotlin.text.lowercase' call
1155
+ // Inline function 'kotlin.js.asDynamic' call
1156
+ var tmp$ret$1 = this.y2i_1.toLowerCase();
1157
+ var result = getStringHashCode(tmp$ret$1);
1158
+ var tmp = result;
1159
+ var tmp_0 = imul(31, result);
1160
+ // Inline function 'kotlin.text.lowercase' call
1161
+ // Inline function 'kotlin.js.asDynamic' call
1162
+ var tmp$ret$3 = this.z2i_1.toLowerCase();
1163
+ result = tmp + (tmp_0 + getStringHashCode(tmp$ret$3) | 0) | 0;
1164
+ return result;
1165
+ };
1166
+ protoOf(HeaderValueParam).se = function () {
1167
+ return this.y2i_1;
1168
+ };
1169
+ protoOf(HeaderValueParam).te = function () {
1170
+ return this.z2i_1;
1171
+ };
1172
+ protoOf(HeaderValueParam).toString = function () {
1173
+ return 'HeaderValueParam(name=' + this.y2i_1 + ', value=' + this.z2i_1 + ', escapeValue=' + this.a2j_1 + ')';
1174
+ };
1175
+ function parseHeaderValue(text) {
1176
+ return parseHeaderValue_0(text, false);
1177
+ }
1178
+ function parseHeaderValue_0(text, parametersOnly) {
1179
+ if (text == null) {
1180
+ return emptyList();
1181
+ }
1182
+ var position = 0;
1183
+ var tmp = LazyThreadSafetyMode_NONE_getInstance();
1184
+ var items = lazy(tmp, parseHeaderValue$lambda);
1185
+ while (position <= get_lastIndex_0(text)) {
1186
+ position = parseHeaderValueItem(text, position, items, parametersOnly);
1187
+ }
1188
+ return valueOrEmpty(items);
1189
+ }
1190
+ function parseHeaderValueItem(text, start, items, parametersOnly) {
1191
+ var position = start;
1192
+ var tmp = LazyThreadSafetyMode_NONE_getInstance();
1193
+ var parameters = lazy(tmp, parseHeaderValueItem$lambda);
1194
+ var valueEnd = parametersOnly ? position : null;
1195
+ while (position <= get_lastIndex_0(text)) {
1196
+ var tmp0_subject = charCodeAt(text, position);
1197
+ if (tmp0_subject === _Char___init__impl__6a9atx(44)) {
1198
+ var tmp_0 = items.m1();
1199
+ var tmp1_elvis_lhs = valueEnd;
1200
+ tmp_0.e1(new HeaderValue(subtrim(text, start, tmp1_elvis_lhs == null ? position : tmp1_elvis_lhs), valueOrEmpty(parameters)));
1201
+ return position + 1 | 0;
1202
+ } else if (tmp0_subject === _Char___init__impl__6a9atx(59)) {
1203
+ if (valueEnd == null)
1204
+ valueEnd = position;
1205
+ position = parseHeaderValueParameter(text, position + 1 | 0, parameters);
1206
+ } else {
1207
+ var tmp_1;
1208
+ if (parametersOnly) {
1209
+ tmp_1 = parseHeaderValueParameter(text, position, parameters);
1210
+ } else {
1211
+ tmp_1 = position + 1 | 0;
1212
+ }
1213
+ position = tmp_1;
1214
+ }
1215
+ }
1216
+ var tmp_2 = items.m1();
1217
+ var tmp2_elvis_lhs = valueEnd;
1218
+ tmp_2.e1(new HeaderValue(subtrim(text, start, tmp2_elvis_lhs == null ? position : tmp2_elvis_lhs), valueOrEmpty(parameters)));
1219
+ return position;
1220
+ }
1221
+ function valueOrEmpty(_this__u8e3s4) {
1222
+ return _this__u8e3s4.bm() ? _this__u8e3s4.m1() : emptyList();
1223
+ }
1224
+ function subtrim(_this__u8e3s4, start, end) {
1225
+ // Inline function 'kotlin.text.trim' call
1226
+ var this_0 = substring(_this__u8e3s4, start, end);
1227
+ return toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE()));
1228
+ }
1229
+ function parseHeaderValueParameter(text, start, parameters) {
1230
+ var position = start;
1231
+ while (position <= get_lastIndex_0(text)) {
1232
+ var tmp0_subject = charCodeAt(text, position);
1233
+ if (tmp0_subject === _Char___init__impl__6a9atx(61)) {
1234
+ var _destruct__k2r9zo = parseHeaderValueParameterValue(text, position + 1 | 0);
1235
+ var paramEnd = _destruct__k2r9zo.se();
1236
+ var paramValue = _destruct__k2r9zo.te();
1237
+ parseHeaderValueParameter$addParam(parameters, text, start, position, paramValue);
1238
+ return paramEnd;
1239
+ } else if (tmp0_subject === _Char___init__impl__6a9atx(59) || tmp0_subject === _Char___init__impl__6a9atx(44)) {
1240
+ parseHeaderValueParameter$addParam(parameters, text, start, position, '');
1241
+ return position;
1242
+ } else {
1243
+ position = position + 1 | 0;
1244
+ }
1245
+ }
1246
+ parseHeaderValueParameter$addParam(parameters, text, start, position, '');
1247
+ return position;
1248
+ }
1249
+ function parseHeaderValueParameterValue(value, start) {
1250
+ if (value.length === start) {
1251
+ return to(start, '');
1252
+ }
1253
+ var position = start;
1254
+ if (charCodeAt(value, start) === _Char___init__impl__6a9atx(34)) {
1255
+ return parseHeaderValueParameterValueQuoted(value, position + 1 | 0);
1256
+ }
1257
+ while (position <= get_lastIndex_0(value)) {
1258
+ var tmp0_subject = charCodeAt(value, position);
1259
+ if (tmp0_subject === _Char___init__impl__6a9atx(59) || tmp0_subject === _Char___init__impl__6a9atx(44))
1260
+ return to(position, subtrim(value, start, position));
1261
+ else {
1262
+ position = position + 1 | 0;
1263
+ }
1264
+ }
1265
+ return to(position, subtrim(value, start, position));
1266
+ }
1267
+ function parseHeaderValueParameterValueQuoted(value, start) {
1268
+ var position = start;
1269
+ var builder = StringBuilder_init_$Create$();
1270
+ loop: while (position <= get_lastIndex_0(value)) {
1271
+ var currentChar = charCodeAt(value, position);
1272
+ if (currentChar === _Char___init__impl__6a9atx(34) && nextIsDelimiterOrEnd(value, position)) {
1273
+ return to(position + 1 | 0, builder.toString());
1274
+ } else if (currentChar === _Char___init__impl__6a9atx(92) && position < (get_lastIndex_0(value) - 2 | 0)) {
1275
+ builder.s(charCodeAt(value, position + 1 | 0));
1276
+ position = position + 2 | 0;
1277
+ continue loop;
1278
+ }
1279
+ builder.s(currentChar);
1280
+ position = position + 1 | 0;
1281
+ }
1282
+ var tmp = position;
1283
+ var tmp0 = _Char___init__impl__6a9atx(34);
1284
+ // Inline function 'kotlin.text.plus' call
1285
+ var other = builder.toString();
1286
+ var tmp$ret$0 = toString_0(tmp0) + other;
1287
+ return to(tmp, tmp$ret$0);
1288
+ }
1289
+ function nextIsDelimiterOrEnd(_this__u8e3s4, start) {
1290
+ var position = start + 1 | 0;
1291
+ loop: while (position < _this__u8e3s4.length && charCodeAt(_this__u8e3s4, position) === _Char___init__impl__6a9atx(32)) {
1292
+ position = position + 1 | 0;
1293
+ }
1294
+ return position === _this__u8e3s4.length || charCodeAt(_this__u8e3s4, position) === _Char___init__impl__6a9atx(59) || charCodeAt(_this__u8e3s4, position) === _Char___init__impl__6a9atx(44);
1295
+ }
1296
+ function sam$kotlin_Comparator$0(function_0) {
1297
+ this.i2p_1 = function_0;
1298
+ }
1299
+ protoOf(sam$kotlin_Comparator$0).mc = function (a, b) {
1300
+ return this.i2p_1(a, b);
1301
+ };
1302
+ protoOf(sam$kotlin_Comparator$0).compare = function (a, b) {
1303
+ return this.mc(a, b);
1304
+ };
1305
+ protoOf(sam$kotlin_Comparator$0).g3 = function () {
1306
+ return this.i2p_1;
1307
+ };
1308
+ protoOf(sam$kotlin_Comparator$0).equals = function (other) {
1309
+ var tmp;
1310
+ if (!(other == null) ? isInterface(other, Comparator) : false) {
1311
+ var tmp_0;
1312
+ if (!(other == null) ? isInterface(other, FunctionAdapter) : false) {
1313
+ tmp_0 = equals_0(this.g3(), other.g3());
1314
+ } else {
1315
+ tmp_0 = false;
1316
+ }
1317
+ tmp = tmp_0;
1318
+ } else {
1319
+ tmp = false;
1320
+ }
1321
+ return tmp;
1322
+ };
1323
+ protoOf(sam$kotlin_Comparator$0).hashCode = function () {
1324
+ return hashCode(this.g3());
1325
+ };
1326
+ function parseAndSortHeader$lambda(a, b) {
1327
+ // Inline function 'kotlin.comparisons.compareValuesBy' call
1328
+ var tmp = b.e2j_1;
1329
+ var tmp$ret$1 = a.e2j_1;
1330
+ return compareValues(tmp, tmp$ret$1);
1331
+ }
1332
+ function parseHeaderValue$lambda() {
1333
+ // Inline function 'kotlin.collections.arrayListOf' call
1334
+ return ArrayList_init_$Create$_0();
1335
+ }
1336
+ function parseHeaderValueItem$lambda() {
1337
+ // Inline function 'kotlin.collections.arrayListOf' call
1338
+ return ArrayList_init_$Create$_0();
1339
+ }
1340
+ function parseHeaderValueParameter$addParam($parameters, text, start, end, value) {
1341
+ var name = subtrim(text, start, end);
1342
+ // Inline function 'kotlin.text.isEmpty' call
1343
+ if (charSequenceLength(name) === 0) {
1344
+ return Unit_instance;
1345
+ }
1346
+ $parameters.m1().e1(HeaderValueParam_init_$Create$(name, value));
1347
+ }
1348
+ function HttpHeaders() {
1349
+ HttpHeaders_instance = this;
1350
+ this.j2l_1 = 'Accept';
1351
+ this.k2l_1 = 'Accept-Charset';
1352
+ this.l2l_1 = 'Accept-Encoding';
1353
+ this.m2l_1 = 'Accept-Language';
1354
+ this.n2l_1 = 'Accept-Ranges';
1355
+ this.o2l_1 = 'Age';
1356
+ this.p2l_1 = 'Allow';
1357
+ this.q2l_1 = 'ALPN';
1358
+ this.r2l_1 = 'Authentication-Info';
1359
+ this.s2l_1 = 'Authorization';
1360
+ this.t2l_1 = 'Cache-Control';
1361
+ this.u2l_1 = 'Connection';
1362
+ this.v2l_1 = 'Content-Disposition';
1363
+ this.w2l_1 = 'Content-Encoding';
1364
+ this.x2l_1 = 'Content-Language';
1365
+ this.y2l_1 = 'Content-Length';
1366
+ this.z2l_1 = 'Content-Location';
1367
+ this.a2m_1 = 'Content-Range';
1368
+ this.b2m_1 = 'Content-Type';
1369
+ this.c2m_1 = 'Cookie';
1370
+ this.d2m_1 = 'DASL';
1371
+ this.e2m_1 = 'Date';
1372
+ this.f2m_1 = 'DAV';
1373
+ this.g2m_1 = 'Depth';
1374
+ this.h2m_1 = 'Destination';
1375
+ this.i2m_1 = 'ETag';
1376
+ this.j2m_1 = 'Expect';
1377
+ this.k2m_1 = 'Expires';
1378
+ this.l2m_1 = 'From';
1379
+ this.m2m_1 = 'Forwarded';
1380
+ this.n2m_1 = 'Host';
1381
+ this.o2m_1 = 'HTTP2-Settings';
1382
+ this.p2m_1 = 'If';
1383
+ this.q2m_1 = 'If-Match';
1384
+ this.r2m_1 = 'If-Modified-Since';
1385
+ this.s2m_1 = 'If-None-Match';
1386
+ this.t2m_1 = 'If-Range';
1387
+ this.u2m_1 = 'If-Schedule-Tag-Match';
1388
+ this.v2m_1 = 'If-Unmodified-Since';
1389
+ this.w2m_1 = 'Last-Modified';
1390
+ this.x2m_1 = 'Location';
1391
+ this.y2m_1 = 'Lock-Token';
1392
+ this.z2m_1 = 'Link';
1393
+ this.a2n_1 = 'Max-Forwards';
1394
+ this.b2n_1 = 'MIME-Version';
1395
+ this.c2n_1 = 'Ordering-Type';
1396
+ this.d2n_1 = 'Origin';
1397
+ this.e2n_1 = 'Overwrite';
1398
+ this.f2n_1 = 'Position';
1399
+ this.g2n_1 = 'Pragma';
1400
+ this.h2n_1 = 'Prefer';
1401
+ this.i2n_1 = 'Preference-Applied';
1402
+ this.j2n_1 = 'Proxy-Authenticate';
1403
+ this.k2n_1 = 'Proxy-Authentication-Info';
1404
+ this.l2n_1 = 'Proxy-Authorization';
1405
+ this.m2n_1 = 'Public-Key-Pins';
1406
+ this.n2n_1 = 'Public-Key-Pins-Report-Only';
1407
+ this.o2n_1 = 'Range';
1408
+ this.p2n_1 = 'Referer';
1409
+ this.q2n_1 = 'Retry-After';
1410
+ this.r2n_1 = 'Schedule-Reply';
1411
+ this.s2n_1 = 'Schedule-Tag';
1412
+ this.t2n_1 = 'Sec-WebSocket-Accept';
1413
+ this.u2n_1 = 'Sec-WebSocket-Extensions';
1414
+ this.v2n_1 = 'Sec-WebSocket-Key';
1415
+ this.w2n_1 = 'Sec-WebSocket-Protocol';
1416
+ this.x2n_1 = 'Sec-WebSocket-Version';
1417
+ this.y2n_1 = 'Server';
1418
+ this.z2n_1 = 'Set-Cookie';
1419
+ this.a2o_1 = 'SLUG';
1420
+ this.b2o_1 = 'Strict-Transport-Security';
1421
+ this.c2o_1 = 'TE';
1422
+ this.d2o_1 = 'Timeout';
1423
+ this.e2o_1 = 'Trailer';
1424
+ this.f2o_1 = 'Transfer-Encoding';
1425
+ this.g2o_1 = 'Upgrade';
1426
+ this.h2o_1 = 'User-Agent';
1427
+ this.i2o_1 = 'Vary';
1428
+ this.j2o_1 = 'Via';
1429
+ this.k2o_1 = 'Warning';
1430
+ this.l2o_1 = 'WWW-Authenticate';
1431
+ this.m2o_1 = 'Access-Control-Allow-Origin';
1432
+ this.n2o_1 = 'Access-Control-Allow-Methods';
1433
+ this.o2o_1 = 'Access-Control-Allow-Credentials';
1434
+ this.p2o_1 = 'Access-Control-Allow-Headers';
1435
+ this.q2o_1 = 'Access-Control-Request-Method';
1436
+ this.r2o_1 = 'Access-Control-Request-Headers';
1437
+ this.s2o_1 = 'Access-Control-Expose-Headers';
1438
+ this.t2o_1 = 'Access-Control-Max-Age';
1439
+ this.u2o_1 = 'X-Http-Method-Override';
1440
+ this.v2o_1 = 'X-Forwarded-Host';
1441
+ this.w2o_1 = 'X-Forwarded-Server';
1442
+ this.x2o_1 = 'X-Forwarded-Proto';
1443
+ this.y2o_1 = 'X-Forwarded-For';
1444
+ this.z2o_1 = 'X-Forwarded-Port';
1445
+ this.a2p_1 = 'X-Request-ID';
1446
+ this.b2p_1 = 'X-Correlation-ID';
1447
+ this.c2p_1 = 'X-Total-Count';
1448
+ this.d2p_1 = 'Last-Event-ID';
1449
+ var tmp = this;
1450
+ // Inline function 'kotlin.arrayOf' call
1451
+ // Inline function 'kotlin.js.unsafeCast' call
1452
+ // Inline function 'kotlin.js.asDynamic' call
1453
+ tmp.e2p_1 = ['Transfer-Encoding', 'Upgrade'];
1454
+ this.f2p_1 = asList(this.e2p_1);
1455
+ }
1456
+ protoOf(HttpHeaders).g2p = function (name) {
1457
+ // Inline function 'kotlin.text.forEachIndexed' call
1458
+ var index = 0;
1459
+ var inductionVariable = 0;
1460
+ while (inductionVariable < charSequenceLength(name)) {
1461
+ var item = charSequenceGet(name, inductionVariable);
1462
+ inductionVariable = inductionVariable + 1 | 0;
1463
+ var _unary__edvuaz = index;
1464
+ index = _unary__edvuaz + 1 | 0;
1465
+ if (Char__compareTo_impl_ypi4mb(item, _Char___init__impl__6a9atx(32)) <= 0 || isDelimiter(item)) {
1466
+ throw new IllegalHeaderNameException(name, _unary__edvuaz);
1467
+ }
1468
+ }
1469
+ };
1470
+ protoOf(HttpHeaders).h2p = function (value) {
1471
+ // Inline function 'kotlin.text.forEachIndexed' call
1472
+ var index = 0;
1473
+ var inductionVariable = 0;
1474
+ while (inductionVariable < charSequenceLength(value)) {
1475
+ var item = charSequenceGet(value, inductionVariable);
1476
+ inductionVariable = inductionVariable + 1 | 0;
1477
+ var _unary__edvuaz = index;
1478
+ index = _unary__edvuaz + 1 | 0;
1479
+ if (Char__compareTo_impl_ypi4mb(item, _Char___init__impl__6a9atx(32)) < 0 && !(item === _Char___init__impl__6a9atx(9))) {
1480
+ throw new IllegalHeaderValueException(value, _unary__edvuaz);
1481
+ }
1482
+ }
1483
+ };
1484
+ var HttpHeaders_instance;
1485
+ function HttpHeaders_getInstance() {
1486
+ if (HttpHeaders_instance == null)
1487
+ new HttpHeaders();
1488
+ return HttpHeaders_instance;
1489
+ }
1490
+ function UnsafeHeaderException(header) {
1491
+ IllegalArgumentException_init_$Init$('Header(s) ' + header + ' are controlled by the engine and ' + 'cannot be set explicitly', this);
1492
+ captureStack(this, UnsafeHeaderException);
1493
+ }
1494
+ function isDelimiter(ch) {
1495
+ return contains('"(),/:;<=>?@[\\]{}', ch);
1496
+ }
1497
+ function IllegalHeaderNameException(headerName, position) {
1498
+ var tmp = "Header name '" + headerName + "' contains illegal character '" + toString_0(charCodeAt(headerName, position)) + "'";
1499
+ // Inline function 'kotlin.code' call
1500
+ var this_0 = charCodeAt(headerName, position);
1501
+ var tmp$ret$0 = Char__toInt_impl_vasixd(this_0);
1502
+ IllegalArgumentException_init_$Init$(tmp + (' (code ' + (tmp$ret$0 & 255) + ')'), this);
1503
+ captureStack(this, IllegalHeaderNameException);
1504
+ this.j2p_1 = headerName;
1505
+ this.k2p_1 = position;
1506
+ }
1507
+ function IllegalHeaderValueException(headerValue, position) {
1508
+ var tmp = "Header value '" + headerValue + "' contains illegal character '" + toString_0(charCodeAt(headerValue, position)) + "'";
1509
+ // Inline function 'kotlin.code' call
1510
+ var this_0 = charCodeAt(headerValue, position);
1511
+ var tmp$ret$0 = Char__toInt_impl_vasixd(this_0);
1512
+ IllegalArgumentException_init_$Init$(tmp + (' (code ' + (tmp$ret$0 & 255) + ')'), this);
1513
+ captureStack(this, IllegalHeaderValueException);
1514
+ this.l2p_1 = headerValue;
1515
+ this.m2p_1 = position;
1516
+ }
1517
+ function contentLength(_this__u8e3s4) {
1518
+ var tmp0_safe_receiver = _this__u8e3s4.n2p().f2d('Content-Length');
1519
+ return tmp0_safe_receiver == null ? null : toLongOrNull(tmp0_safe_receiver);
1520
+ }
1521
+ function contentType(_this__u8e3s4) {
1522
+ var tmp0_safe_receiver = _this__u8e3s4.n2p().f2d('Content-Type');
1523
+ var tmp;
1524
+ if (tmp0_safe_receiver == null) {
1525
+ tmp = null;
1526
+ } else {
1527
+ // Inline function 'kotlin.let' call
1528
+ tmp = Companion_getInstance().gm(tmp0_safe_receiver);
1529
+ }
1530
+ return tmp;
1531
+ }
1532
+ function contentType_0(_this__u8e3s4) {
1533
+ var tmp0_safe_receiver = _this__u8e3s4.n2p().f2d('Content-Type');
1534
+ var tmp;
1535
+ if (tmp0_safe_receiver == null) {
1536
+ tmp = null;
1537
+ } else {
1538
+ // Inline function 'kotlin.let' call
1539
+ tmp = Companion_getInstance().gm(tmp0_safe_receiver);
1540
+ }
1541
+ return tmp;
1542
+ }
1543
+ function charset_0(_this__u8e3s4) {
1544
+ var tmp0_safe_receiver = contentType(_this__u8e3s4);
1545
+ return tmp0_safe_receiver == null ? null : charset(tmp0_safe_receiver);
1546
+ }
1547
+ function contentType_1(_this__u8e3s4, type) {
1548
+ return _this__u8e3s4.n2p().r2e('Content-Type', type.toString());
1549
+ }
1550
+ function get_REQUESTS_WITHOUT_BODY() {
1551
+ _init_properties_HttpMethod_kt__cbus5z();
1552
+ return REQUESTS_WITHOUT_BODY;
1553
+ }
1554
+ var REQUESTS_WITHOUT_BODY;
1555
+ function Companion_2() {
1556
+ Companion_instance_2 = this;
1557
+ this.o2p_1 = new HttpMethod('GET');
1558
+ this.p2p_1 = new HttpMethod('POST');
1559
+ this.q2p_1 = new HttpMethod('PUT');
1560
+ this.r2p_1 = new HttpMethod('PATCH');
1561
+ this.s2p_1 = new HttpMethod('DELETE');
1562
+ this.t2p_1 = new HttpMethod('HEAD');
1563
+ this.u2p_1 = new HttpMethod('OPTIONS');
1564
+ this.v2p_1 = new HttpMethod('TRACE');
1565
+ this.w2p_1 = new HttpMethod('QUERY');
1566
+ this.x2p_1 = listOf([this.o2p_1, this.p2p_1, this.q2p_1, this.r2p_1, this.s2p_1, this.t2p_1, this.u2p_1]);
1567
+ }
1568
+ var Companion_instance_2;
1569
+ function Companion_getInstance_2() {
1570
+ if (Companion_instance_2 == null)
1571
+ new Companion_2();
1572
+ return Companion_instance_2;
1573
+ }
1574
+ function HttpMethod(value) {
1575
+ Companion_getInstance_2();
1576
+ this.y2p_1 = value;
1577
+ }
1578
+ protoOf(HttpMethod).toString = function () {
1579
+ return this.y2p_1;
1580
+ };
1581
+ protoOf(HttpMethod).hashCode = function () {
1582
+ return getStringHashCode(this.y2p_1);
1583
+ };
1584
+ protoOf(HttpMethod).equals = function (other) {
1585
+ if (this === other)
1586
+ return true;
1587
+ if (!(other instanceof HttpMethod))
1588
+ return false;
1589
+ if (!(this.y2p_1 === other.y2p_1))
1590
+ return false;
1591
+ return true;
1592
+ };
1593
+ function get_supportsRequestBody(_this__u8e3s4) {
1594
+ _init_properties_HttpMethod_kt__cbus5z();
1595
+ return !get_REQUESTS_WITHOUT_BODY().h2(_this__u8e3s4);
1596
+ }
1597
+ var properties_initialized_HttpMethod_kt_ogor3f;
1598
+ function _init_properties_HttpMethod_kt__cbus5z() {
1599
+ if (!properties_initialized_HttpMethod_kt_ogor3f) {
1600
+ properties_initialized_HttpMethod_kt_ogor3f = true;
1601
+ REQUESTS_WITHOUT_BODY = setOf([Companion_getInstance_2().o2p_1, Companion_getInstance_2().t2p_1, Companion_getInstance_2().u2p_1, Companion_getInstance_2().v2p_1]);
1602
+ }
1603
+ }
1604
+ function Companion_3() {
1605
+ Companion_instance_3 = this;
1606
+ this.z2p_1 = new HttpProtocolVersion('HTTP', 3, 0);
1607
+ this.a2q_1 = new HttpProtocolVersion('HTTP', 2, 0);
1608
+ this.b2q_1 = new HttpProtocolVersion('HTTP', 1, 1);
1609
+ this.c2q_1 = new HttpProtocolVersion('HTTP', 1, 0);
1610
+ this.d2q_1 = new HttpProtocolVersion('SPDY', 3, 0);
1611
+ this.e2q_1 = new HttpProtocolVersion('QUIC', 1, 0);
1612
+ }
1613
+ var Companion_instance_3;
1614
+ function Companion_getInstance_3() {
1615
+ if (Companion_instance_3 == null)
1616
+ new Companion_3();
1617
+ return Companion_instance_3;
1618
+ }
1619
+ function HttpProtocolVersion(name, major, minor) {
1620
+ Companion_getInstance_3();
1621
+ this.f2q_1 = name;
1622
+ this.g2q_1 = major;
1623
+ this.h2q_1 = minor;
1624
+ }
1625
+ protoOf(HttpProtocolVersion).toString = function () {
1626
+ return this.f2q_1 + '/' + this.g2q_1 + '.' + this.h2q_1;
1627
+ };
1628
+ protoOf(HttpProtocolVersion).hashCode = function () {
1629
+ var result = getStringHashCode(this.f2q_1);
1630
+ result = imul(result, 31) + this.g2q_1 | 0;
1631
+ result = imul(result, 31) + this.h2q_1 | 0;
1632
+ return result;
1633
+ };
1634
+ protoOf(HttpProtocolVersion).equals = function (other) {
1635
+ if (this === other)
1636
+ return true;
1637
+ if (!(other instanceof HttpProtocolVersion))
1638
+ return false;
1639
+ if (!(this.f2q_1 === other.f2q_1))
1640
+ return false;
1641
+ if (!(this.g2q_1 === other.g2q_1))
1642
+ return false;
1643
+ if (!(this.h2q_1 === other.h2q_1))
1644
+ return false;
1645
+ return true;
1646
+ };
1647
+ function Companion_4() {
1648
+ Companion_instance_4 = this;
1649
+ this.i2q_1 = new HttpStatusCode(100, 'Continue');
1650
+ this.j2q_1 = new HttpStatusCode(101, 'Switching Protocols');
1651
+ this.k2q_1 = new HttpStatusCode(102, 'Processing');
1652
+ this.l2q_1 = new HttpStatusCode(200, 'OK');
1653
+ this.m2q_1 = new HttpStatusCode(201, 'Created');
1654
+ this.n2q_1 = new HttpStatusCode(202, 'Accepted');
1655
+ this.o2q_1 = new HttpStatusCode(203, 'Non-Authoritative Information');
1656
+ this.p2q_1 = new HttpStatusCode(204, 'No Content');
1657
+ this.q2q_1 = new HttpStatusCode(205, 'Reset Content');
1658
+ this.r2q_1 = new HttpStatusCode(206, 'Partial Content');
1659
+ this.s2q_1 = new HttpStatusCode(207, 'Multi-Status');
1660
+ this.t2q_1 = new HttpStatusCode(300, 'Multiple Choices');
1661
+ this.u2q_1 = new HttpStatusCode(301, 'Moved Permanently');
1662
+ this.v2q_1 = new HttpStatusCode(302, 'Found');
1663
+ this.w2q_1 = new HttpStatusCode(303, 'See Other');
1664
+ this.x2q_1 = new HttpStatusCode(304, 'Not Modified');
1665
+ this.y2q_1 = new HttpStatusCode(305, 'Use Proxy');
1666
+ this.z2q_1 = new HttpStatusCode(306, 'Switch Proxy');
1667
+ this.a2r_1 = new HttpStatusCode(307, 'Temporary Redirect');
1668
+ this.b2r_1 = new HttpStatusCode(308, 'Permanent Redirect');
1669
+ this.c2r_1 = new HttpStatusCode(400, 'Bad Request');
1670
+ this.d2r_1 = new HttpStatusCode(401, 'Unauthorized');
1671
+ this.e2r_1 = new HttpStatusCode(402, 'Payment Required');
1672
+ this.f2r_1 = new HttpStatusCode(403, 'Forbidden');
1673
+ this.g2r_1 = new HttpStatusCode(404, 'Not Found');
1674
+ this.h2r_1 = new HttpStatusCode(405, 'Method Not Allowed');
1675
+ this.i2r_1 = new HttpStatusCode(406, 'Not Acceptable');
1676
+ this.j2r_1 = new HttpStatusCode(407, 'Proxy Authentication Required');
1677
+ this.k2r_1 = new HttpStatusCode(408, 'Request Timeout');
1678
+ this.l2r_1 = new HttpStatusCode(409, 'Conflict');
1679
+ this.m2r_1 = new HttpStatusCode(410, 'Gone');
1680
+ this.n2r_1 = new HttpStatusCode(411, 'Length Required');
1681
+ this.o2r_1 = new HttpStatusCode(412, 'Precondition Failed');
1682
+ this.p2r_1 = new HttpStatusCode(413, 'Payload Too Large');
1683
+ this.q2r_1 = new HttpStatusCode(414, 'Request-URI Too Long');
1684
+ this.r2r_1 = new HttpStatusCode(415, 'Unsupported Media Type');
1685
+ this.s2r_1 = new HttpStatusCode(416, 'Requested Range Not Satisfiable');
1686
+ this.t2r_1 = new HttpStatusCode(417, 'Expectation Failed');
1687
+ this.u2r_1 = new HttpStatusCode(422, 'Unprocessable Entity');
1688
+ this.v2r_1 = new HttpStatusCode(423, 'Locked');
1689
+ this.w2r_1 = new HttpStatusCode(424, 'Failed Dependency');
1690
+ this.x2r_1 = new HttpStatusCode(425, 'Too Early');
1691
+ this.y2r_1 = new HttpStatusCode(426, 'Upgrade Required');
1692
+ this.z2r_1 = new HttpStatusCode(429, 'Too Many Requests');
1693
+ this.a2s_1 = new HttpStatusCode(431, 'Request Header Fields Too Large');
1694
+ this.b2s_1 = new HttpStatusCode(500, 'Internal Server Error');
1695
+ this.c2s_1 = new HttpStatusCode(501, 'Not Implemented');
1696
+ this.d2s_1 = new HttpStatusCode(502, 'Bad Gateway');
1697
+ this.e2s_1 = new HttpStatusCode(503, 'Service Unavailable');
1698
+ this.f2s_1 = new HttpStatusCode(504, 'Gateway Timeout');
1699
+ this.g2s_1 = new HttpStatusCode(505, 'HTTP Version Not Supported');
1700
+ this.h2s_1 = new HttpStatusCode(506, 'Variant Also Negotiates');
1701
+ this.i2s_1 = new HttpStatusCode(507, 'Insufficient Storage');
1702
+ this.j2s_1 = allStatusCodes();
1703
+ var tmp = this;
1704
+ // Inline function 'kotlin.collections.associateBy' call
1705
+ var this_0 = this.j2s_1;
1706
+ var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(this_0, 10)), 16);
1707
+ // Inline function 'kotlin.collections.associateByTo' call
1708
+ var destination = LinkedHashMap_init_$Create$(capacity);
1709
+ var _iterator__ex2g4s = this_0.t();
1710
+ while (_iterator__ex2g4s.u()) {
1711
+ var element = _iterator__ex2g4s.v();
1712
+ var tmp$ret$0 = element.l2s_1;
1713
+ destination.s2(tmp$ret$0, element);
1714
+ }
1715
+ tmp.k2s_1 = destination;
1716
+ }
1717
+ var Companion_instance_4;
1718
+ function Companion_getInstance_4() {
1719
+ if (Companion_instance_4 == null)
1720
+ new Companion_4();
1721
+ return Companion_instance_4;
1722
+ }
1723
+ function HttpStatusCode(value, description) {
1724
+ Companion_getInstance_4();
1725
+ this.l2s_1 = value;
1726
+ this.m2s_1 = description;
1727
+ }
1728
+ protoOf(HttpStatusCode).toString = function () {
1729
+ return '' + this.l2s_1 + ' ' + this.m2s_1;
1730
+ };
1731
+ protoOf(HttpStatusCode).equals = function (other) {
1732
+ var tmp;
1733
+ if (other instanceof HttpStatusCode) {
1734
+ tmp = other.l2s_1 === this.l2s_1;
1735
+ } else {
1736
+ tmp = false;
1737
+ }
1738
+ return tmp;
1739
+ };
1740
+ protoOf(HttpStatusCode).hashCode = function () {
1741
+ return this.l2s_1;
1742
+ };
1743
+ protoOf(HttpStatusCode).n2s = function (other) {
1744
+ return this.l2s_1 - other.l2s_1 | 0;
1745
+ };
1746
+ protoOf(HttpStatusCode).d = function (other) {
1747
+ return this.n2s(other instanceof HttpStatusCode ? other : THROW_CCE());
1748
+ };
1749
+ function allStatusCodes() {
1750
+ return listOf([Companion_getInstance_4().i2q_1, Companion_getInstance_4().j2q_1, Companion_getInstance_4().k2q_1, Companion_getInstance_4().l2q_1, Companion_getInstance_4().m2q_1, Companion_getInstance_4().n2q_1, Companion_getInstance_4().o2q_1, Companion_getInstance_4().p2q_1, Companion_getInstance_4().q2q_1, Companion_getInstance_4().r2q_1, Companion_getInstance_4().s2q_1, Companion_getInstance_4().t2q_1, Companion_getInstance_4().u2q_1, Companion_getInstance_4().v2q_1, Companion_getInstance_4().w2q_1, Companion_getInstance_4().x2q_1, Companion_getInstance_4().y2q_1, Companion_getInstance_4().z2q_1, Companion_getInstance_4().a2r_1, Companion_getInstance_4().b2r_1, Companion_getInstance_4().c2r_1, Companion_getInstance_4().d2r_1, Companion_getInstance_4().e2r_1, Companion_getInstance_4().f2r_1, Companion_getInstance_4().g2r_1, Companion_getInstance_4().h2r_1, Companion_getInstance_4().i2r_1, Companion_getInstance_4().j2r_1, Companion_getInstance_4().k2r_1, Companion_getInstance_4().l2r_1, Companion_getInstance_4().m2r_1, Companion_getInstance_4().n2r_1, Companion_getInstance_4().o2r_1, Companion_getInstance_4().p2r_1, Companion_getInstance_4().q2r_1, Companion_getInstance_4().r2r_1, Companion_getInstance_4().s2r_1, Companion_getInstance_4().t2r_1, Companion_getInstance_4().u2r_1, Companion_getInstance_4().v2r_1, Companion_getInstance_4().w2r_1, Companion_getInstance_4().x2r_1, Companion_getInstance_4().y2r_1, Companion_getInstance_4().z2r_1, Companion_getInstance_4().a2s_1, Companion_getInstance_4().b2s_1, Companion_getInstance_4().c2s_1, Companion_getInstance_4().d2s_1, Companion_getInstance_4().e2s_1, Companion_getInstance_4().f2s_1, Companion_getInstance_4().g2s_1, Companion_getInstance_4().h2s_1, Companion_getInstance_4().i2s_1]);
1751
+ }
1752
+ function isSuccess(_this__u8e3s4) {
1753
+ var containsArg = _this__u8e3s4.l2s_1;
1754
+ return 200 <= containsArg ? containsArg < 300 : false;
1755
+ }
1756
+ function formUrlEncode(_this__u8e3s4) {
1757
+ // Inline function 'kotlin.collections.flatMap' call
1758
+ var tmp0 = _this__u8e3s4.i2e();
1759
+ // Inline function 'kotlin.collections.flatMapTo' call
1760
+ var destination = ArrayList_init_$Create$_0();
1761
+ var _iterator__ex2g4s = tmp0.t();
1762
+ while (_iterator__ex2g4s.u()) {
1763
+ var element = _iterator__ex2g4s.v();
1764
+ // Inline function 'kotlin.collections.map' call
1765
+ var this_0 = element.m1();
1766
+ // Inline function 'kotlin.collections.mapTo' call
1767
+ var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
1768
+ var _iterator__ex2g4s_0 = this_0.t();
1769
+ while (_iterator__ex2g4s_0.u()) {
1770
+ var item = _iterator__ex2g4s_0.v();
1771
+ var tmp$ret$0 = to(element.l1(), item);
1772
+ destination_0.e1(tmp$ret$0);
1773
+ }
1774
+ var list = destination_0;
1775
+ addAll(destination, list);
1776
+ }
1777
+ return formUrlEncode_0(destination);
1778
+ }
1779
+ function formUrlEncode_0(_this__u8e3s4) {
1780
+ // Inline function 'kotlin.text.buildString' call
1781
+ // Inline function 'kotlin.apply' call
1782
+ var this_0 = StringBuilder_init_$Create$();
1783
+ formUrlEncodeTo(_this__u8e3s4, this_0);
1784
+ return this_0.toString();
1785
+ }
1786
+ function formUrlEncodeTo(_this__u8e3s4, out) {
1787
+ joinTo(_this__u8e3s4, out, '&', VOID, VOID, VOID, VOID, formUrlEncodeTo$lambda);
1788
+ }
1789
+ function formUrlEncodeTo$lambda(it) {
1790
+ var key = encodeURLParameter(it.qe_1, true);
1791
+ var tmp;
1792
+ if (it.re_1 == null) {
1793
+ tmp = key;
1794
+ } else {
1795
+ var value = encodeURLParameterValue(toString_1(it.re_1));
1796
+ tmp = key + '=' + value;
1797
+ }
1798
+ return tmp;
1799
+ }
1800
+ function Companion_5() {
1801
+ Companion_instance_5 = this;
1802
+ this.o2s_1 = EmptyParameters_instance;
1803
+ }
1804
+ var Companion_instance_5;
1805
+ function Companion_getInstance_5() {
1806
+ if (Companion_instance_5 == null)
1807
+ new Companion_5();
1808
+ return Companion_instance_5;
1809
+ }
1810
+ function Parameters() {
1811
+ }
1812
+ function EmptyParameters() {
1813
+ }
1814
+ protoOf(EmptyParameters).k2e = function () {
1815
+ return true;
1816
+ };
1817
+ protoOf(EmptyParameters).l2e = function (name) {
1818
+ return null;
1819
+ };
1820
+ protoOf(EmptyParameters).m2e = function () {
1821
+ return emptySet();
1822
+ };
1823
+ protoOf(EmptyParameters).i2e = function () {
1824
+ return emptySet();
1825
+ };
1826
+ protoOf(EmptyParameters).r = function () {
1827
+ return true;
1828
+ };
1829
+ protoOf(EmptyParameters).toString = function () {
1830
+ return 'Parameters ' + toString(this.i2e());
1831
+ };
1832
+ protoOf(EmptyParameters).equals = function (other) {
1833
+ var tmp;
1834
+ if (!(other == null) ? isInterface(other, Parameters) : false) {
1835
+ tmp = other.r();
1836
+ } else {
1837
+ tmp = false;
1838
+ }
1839
+ return tmp;
1840
+ };
1841
+ var EmptyParameters_instance;
1842
+ function EmptyParameters_getInstance() {
1843
+ return EmptyParameters_instance;
1844
+ }
1845
+ function ParametersBuilder(size) {
1846
+ size = size === VOID ? 8 : size;
1847
+ return new ParametersBuilderImpl(size);
1848
+ }
1849
+ function ParametersBuilderImpl(size) {
1850
+ size = size === VOID ? 8 : size;
1851
+ StringValuesBuilderImpl.call(this, true, size);
1852
+ }
1853
+ protoOf(ParametersBuilderImpl).i2l = function () {
1854
+ return new ParametersImpl(this.p2e_1);
1855
+ };
1856
+ function ParametersImpl(values) {
1857
+ values = values === VOID ? emptyMap() : values;
1858
+ StringValuesImpl.call(this, true, values);
1859
+ }
1860
+ protoOf(ParametersImpl).toString = function () {
1861
+ return 'Parameters ' + toString(this.i2e());
1862
+ };
1863
+ function parseQueryString(query, startIndex, limit, decode) {
1864
+ startIndex = startIndex === VOID ? 0 : startIndex;
1865
+ limit = limit === VOID ? 1000 : limit;
1866
+ decode = decode === VOID ? true : decode;
1867
+ var tmp;
1868
+ if (startIndex > get_lastIndex_0(query)) {
1869
+ tmp = Companion_getInstance_5().o2s_1;
1870
+ } else {
1871
+ // Inline function 'io.ktor.http.Companion.build' call
1872
+ Companion_getInstance_5();
1873
+ // Inline function 'kotlin.apply' call
1874
+ var this_0 = ParametersBuilder();
1875
+ parse(this_0, query, startIndex, limit, decode);
1876
+ tmp = this_0.i2l();
1877
+ }
1878
+ return tmp;
1879
+ }
1880
+ function parse(_this__u8e3s4, query, startIndex, limit, decode) {
1881
+ var count = 0;
1882
+ var nameIndex = startIndex;
1883
+ var equalIndex = -1;
1884
+ var inductionVariable = startIndex;
1885
+ var last = get_lastIndex_0(query);
1886
+ if (inductionVariable <= last)
1887
+ do {
1888
+ var index = inductionVariable;
1889
+ inductionVariable = inductionVariable + 1 | 0;
1890
+ if (count === limit) {
1891
+ return Unit_instance;
1892
+ }
1893
+ var tmp0_subject = charCodeAt(query, index);
1894
+ if (tmp0_subject === _Char___init__impl__6a9atx(38)) {
1895
+ appendParam(_this__u8e3s4, query, nameIndex, equalIndex, index, decode);
1896
+ nameIndex = index + 1 | 0;
1897
+ equalIndex = -1;
1898
+ count = count + 1 | 0;
1899
+ } else if (tmp0_subject === _Char___init__impl__6a9atx(61)) {
1900
+ if (equalIndex === -1) {
1901
+ equalIndex = index;
1902
+ }
1903
+ }
1904
+ }
1905
+ while (!(index === last));
1906
+ if (count === limit) {
1907
+ return Unit_instance;
1908
+ }
1909
+ appendParam(_this__u8e3s4, query, nameIndex, equalIndex, query.length, decode);
1910
+ }
1911
+ function appendParam(_this__u8e3s4, query, nameIndex, equalIndex, endIndex, decode) {
1912
+ if (equalIndex === -1) {
1913
+ var spaceNameIndex = trimStart(nameIndex, endIndex, query);
1914
+ var spaceEndIndex = trimEnd(spaceNameIndex, endIndex, query);
1915
+ if (spaceEndIndex > spaceNameIndex) {
1916
+ var name = decode ? decodeURLQueryComponent(query, spaceNameIndex, spaceEndIndex) : substring(query, spaceNameIndex, spaceEndIndex);
1917
+ _this__u8e3s4.j2e(name, emptyList());
1918
+ }
1919
+ return Unit_instance;
1920
+ }
1921
+ var spaceNameIndex_0 = trimStart(nameIndex, equalIndex, query);
1922
+ var spaceEqualIndex = trimEnd(spaceNameIndex_0, equalIndex, query);
1923
+ if (spaceEqualIndex > spaceNameIndex_0) {
1924
+ var name_0 = decode ? decodeURLQueryComponent(query, spaceNameIndex_0, spaceEqualIndex) : substring(query, spaceNameIndex_0, spaceEqualIndex);
1925
+ var spaceValueIndex = trimStart(equalIndex + 1 | 0, endIndex, query);
1926
+ var spaceEndIndex_0 = trimEnd(spaceValueIndex, endIndex, query);
1927
+ var value = decode ? decodeURLQueryComponent(query, spaceValueIndex, spaceEndIndex_0, true) : substring(query, spaceValueIndex, spaceEndIndex_0);
1928
+ _this__u8e3s4.t2e(name_0, value);
1929
+ }
1930
+ }
1931
+ function trimStart(start, end, query) {
1932
+ var spaceIndex = start;
1933
+ while (spaceIndex < end && isWhitespace(charSequenceGet(query, spaceIndex))) {
1934
+ spaceIndex = spaceIndex + 1 | 0;
1935
+ }
1936
+ return spaceIndex;
1937
+ }
1938
+ function trimEnd(start, end, text) {
1939
+ var spaceIndex = end;
1940
+ while (spaceIndex > start && isWhitespace(charSequenceGet(text, spaceIndex - 1 | 0))) {
1941
+ spaceIndex = spaceIndex - 1 | 0;
1942
+ }
1943
+ return spaceIndex;
1944
+ }
1945
+ function applyOrigin($this) {
1946
+ var tmp;
1947
+ // Inline function 'kotlin.text.isNotEmpty' call
1948
+ var this_0 = $this.r2s_1;
1949
+ if (charSequenceLength(this_0) > 0) {
1950
+ tmp = true;
1951
+ } else {
1952
+ tmp = $this.d2t().b2t_1 === 'file';
1953
+ }
1954
+ if (tmp)
1955
+ return Unit_instance;
1956
+ $this.r2s_1 = Companion_getInstance_6().x2t_1.e2t_1;
1957
+ if ($this.u2s_1 == null)
1958
+ $this.u2s_1 = Companion_getInstance_6().x2t_1.p2t_1;
1959
+ if ($this.t2s_1 === 0) {
1960
+ $this.z2t(Companion_getInstance_6().x2t_1.f2t_1);
1961
+ }
1962
+ }
1963
+ function Companion_6() {
1964
+ Companion_instance_6 = this;
1965
+ this.x2t_1 = Url(get_origin(this));
1966
+ this.y2t_1 = 256;
1967
+ }
1968
+ var Companion_instance_6;
1969
+ function Companion_getInstance_6() {
1970
+ if (Companion_instance_6 == null)
1971
+ new Companion_6();
1972
+ return Companion_instance_6;
1973
+ }
1974
+ function URLBuilder(protocol, host, port, user, password, pathSegments, parameters, fragment, trailingQuery) {
1975
+ Companion_getInstance_6();
1976
+ protocol = protocol === VOID ? null : protocol;
1977
+ host = host === VOID ? '' : host;
1978
+ port = port === VOID ? 0 : port;
1979
+ user = user === VOID ? null : user;
1980
+ password = password === VOID ? null : password;
1981
+ pathSegments = pathSegments === VOID ? emptyList() : pathSegments;
1982
+ parameters = parameters === VOID ? Companion_getInstance_5().o2s_1 : parameters;
1983
+ fragment = fragment === VOID ? '' : fragment;
1984
+ trailingQuery = trailingQuery === VOID ? false : trailingQuery;
1985
+ this.r2s_1 = host;
1986
+ this.s2s_1 = trailingQuery;
1987
+ this.t2s_1 = port;
1988
+ this.u2s_1 = protocol;
1989
+ var tmp = this;
1990
+ tmp.v2s_1 = user == null ? null : encodeURLParameter(user);
1991
+ var tmp_0 = this;
1992
+ tmp_0.w2s_1 = password == null ? null : encodeURLParameter(password);
1993
+ this.x2s_1 = encodeURLQueryComponent(fragment);
1994
+ var tmp_1 = this;
1995
+ // Inline function 'kotlin.collections.map' call
1996
+ // Inline function 'kotlin.collections.mapTo' call
1997
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(pathSegments, 10));
1998
+ var _iterator__ex2g4s = pathSegments.t();
1999
+ while (_iterator__ex2g4s.u()) {
2000
+ var item = _iterator__ex2g4s.v();
2001
+ var tmp$ret$0 = encodeURLPathPart(item);
2002
+ destination.e1(tmp$ret$0);
2003
+ }
2004
+ tmp_1.y2s_1 = destination;
2005
+ this.z2s_1 = encodeParameters(parameters);
2006
+ this.a2t_1 = new UrlDecodedParametersBuilder(this.z2s_1);
2007
+ }
2008
+ protoOf(URLBuilder).z2t = function (value) {
2009
+ // Inline function 'kotlin.require' call
2010
+ if (!(0 <= value ? value <= 65535 : false)) {
2011
+ var message = 'Port must be between 0 and 65535, or 0 if not set. Provided: ' + value;
2012
+ throw IllegalArgumentException_init_$Create$(toString(message));
2013
+ }
2014
+ this.t2s_1 = value;
2015
+ };
2016
+ protoOf(URLBuilder).a2u = function (value) {
2017
+ this.u2s_1 = value;
2018
+ };
2019
+ protoOf(URLBuilder).d2t = function () {
2020
+ var tmp0_elvis_lhs = this.u2s_1;
2021
+ return tmp0_elvis_lhs == null ? Companion_getInstance_7().b2u_1 : tmp0_elvis_lhs;
2022
+ };
2023
+ protoOf(URLBuilder).h2u = function (value) {
2024
+ var tmp = this;
2025
+ tmp.v2s_1 = value == null ? null : encodeURLParameter(value);
2026
+ };
2027
+ protoOf(URLBuilder).i2u = function () {
2028
+ var tmp0_safe_receiver = this.v2s_1;
2029
+ return tmp0_safe_receiver == null ? null : decodeURLPart(tmp0_safe_receiver);
2030
+ };
2031
+ protoOf(URLBuilder).j2u = function () {
2032
+ var tmp0_safe_receiver = this.w2s_1;
2033
+ return tmp0_safe_receiver == null ? null : decodeURLPart(tmp0_safe_receiver);
2034
+ };
2035
+ protoOf(URLBuilder).k2u = function () {
2036
+ return decodeURLQueryComponent(this.x2s_1);
2037
+ };
2038
+ protoOf(URLBuilder).l2u = function () {
2039
+ // Inline function 'kotlin.collections.map' call
2040
+ var this_0 = this.y2s_1;
2041
+ // Inline function 'kotlin.collections.mapTo' call
2042
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
2043
+ var _iterator__ex2g4s = this_0.t();
2044
+ while (_iterator__ex2g4s.u()) {
2045
+ var item = _iterator__ex2g4s.v();
2046
+ var tmp$ret$0 = decodeURLPart(item);
2047
+ destination.e1(tmp$ret$0);
2048
+ }
2049
+ return destination;
2050
+ };
2051
+ protoOf(URLBuilder).m2u = function (value) {
2052
+ this.z2s_1 = value;
2053
+ this.a2t_1 = new UrlDecodedParametersBuilder(value);
2054
+ };
2055
+ protoOf(URLBuilder).n2u = function () {
2056
+ applyOrigin(this);
2057
+ return appendTo(this, StringBuilder_init_$Create$_0(256)).toString();
2058
+ };
2059
+ protoOf(URLBuilder).toString = function () {
2060
+ return appendTo(this, StringBuilder_init_$Create$_0(256)).toString();
2061
+ };
2062
+ protoOf(URLBuilder).i2l = function () {
2063
+ applyOrigin(this);
2064
+ return new Url_0(this.u2s_1, this.r2s_1, this.t2s_1, this.l2u(), this.a2t_1.i2l(), this.k2u(), this.i2u(), this.j2u(), this.s2s_1, this.n2u());
2065
+ };
2066
+ function get_authority(_this__u8e3s4) {
2067
+ // Inline function 'kotlin.text.buildString' call
2068
+ // Inline function 'kotlin.apply' call
2069
+ var this_0 = StringBuilder_init_$Create$();
2070
+ this_0.q(get_encodedUserAndPassword(_this__u8e3s4));
2071
+ this_0.q(_this__u8e3s4.r2s_1);
2072
+ if (!(_this__u8e3s4.t2s_1 === 0) && !(_this__u8e3s4.t2s_1 === _this__u8e3s4.d2t().c2t_1)) {
2073
+ this_0.q(':');
2074
+ this_0.q(_this__u8e3s4.t2s_1.toString());
2075
+ }
2076
+ return this_0.toString();
2077
+ }
2078
+ function appendTo(_this__u8e3s4, out) {
2079
+ out.f1(_this__u8e3s4.d2t().b2t_1);
2080
+ switch (_this__u8e3s4.d2t().b2t_1) {
2081
+ case 'file':
2082
+ appendFile(out, _this__u8e3s4.r2s_1, get_encodedPath(_this__u8e3s4));
2083
+ return out;
2084
+ case 'mailto':
2085
+ appendMailto(out, get_encodedUserAndPassword(_this__u8e3s4), _this__u8e3s4.r2s_1);
2086
+ return out;
2087
+ case 'about':
2088
+ appendPayload(out, _this__u8e3s4.r2s_1);
2089
+ return out;
2090
+ case 'tel':
2091
+ appendPayload(out, _this__u8e3s4.r2s_1);
2092
+ return out;
2093
+ case 'data':
2094
+ appendPayload(out, _this__u8e3s4.r2s_1);
2095
+ return out;
2096
+ }
2097
+ out.f1('://');
2098
+ out.f1(get_authority(_this__u8e3s4));
2099
+ appendUrlFullPath(out, get_encodedPath(_this__u8e3s4), _this__u8e3s4.z2s_1, _this__u8e3s4.s2s_1);
2100
+ // Inline function 'kotlin.text.isNotEmpty' call
2101
+ var this_0 = _this__u8e3s4.x2s_1;
2102
+ if (charSequenceLength(this_0) > 0) {
2103
+ out.s(_Char___init__impl__6a9atx(35));
2104
+ out.f1(_this__u8e3s4.x2s_1);
2105
+ }
2106
+ return out;
2107
+ }
2108
+ function get_encodedUserAndPassword(_this__u8e3s4) {
2109
+ // Inline function 'kotlin.text.buildString' call
2110
+ // Inline function 'kotlin.apply' call
2111
+ var this_0 = StringBuilder_init_$Create$();
2112
+ appendUserAndPassword(this_0, _this__u8e3s4.v2s_1, _this__u8e3s4.w2s_1);
2113
+ return this_0.toString();
2114
+ }
2115
+ function appendFile(_this__u8e3s4, host, encodedPath) {
2116
+ _this__u8e3s4.f1('://');
2117
+ _this__u8e3s4.f1(host);
2118
+ if (!startsWith_0(encodedPath, _Char___init__impl__6a9atx(47))) {
2119
+ _this__u8e3s4.s(_Char___init__impl__6a9atx(47));
2120
+ }
2121
+ _this__u8e3s4.f1(encodedPath);
2122
+ }
2123
+ function set_encodedPath(_this__u8e3s4, value) {
2124
+ _this__u8e3s4.y2s_1 = isBlank(value) ? emptyList() : value === '/' ? get_ROOT_PATH() : toMutableList(split(value, charArrayOf([_Char___init__impl__6a9atx(47)])));
2125
+ }
2126
+ function get_encodedPath(_this__u8e3s4) {
2127
+ return joinPath(_this__u8e3s4.y2s_1);
2128
+ }
2129
+ function appendMailto(_this__u8e3s4, encodedUser, host) {
2130
+ _this__u8e3s4.f1(':');
2131
+ _this__u8e3s4.f1(encodedUser);
2132
+ _this__u8e3s4.f1(host);
2133
+ }
2134
+ function appendPayload(_this__u8e3s4, host) {
2135
+ _this__u8e3s4.f1(':');
2136
+ _this__u8e3s4.f1(host);
2137
+ }
2138
+ function joinPath(_this__u8e3s4) {
2139
+ if (_this__u8e3s4.r())
2140
+ return '';
2141
+ if (_this__u8e3s4.g1() === 1) {
2142
+ // Inline function 'kotlin.text.isEmpty' call
2143
+ var this_0 = first_0(_this__u8e3s4);
2144
+ if (charSequenceLength(this_0) === 0)
2145
+ return '/';
2146
+ return first_0(_this__u8e3s4);
2147
+ }
2148
+ return joinToString(_this__u8e3s4, '/');
2149
+ }
2150
+ function get_ROOT_PATH() {
2151
+ _init_properties_URLParser_kt__sf11to();
2152
+ return ROOT_PATH;
2153
+ }
2154
+ var ROOT_PATH;
2155
+ function takeFrom(_this__u8e3s4, urlString) {
2156
+ _init_properties_URLParser_kt__sf11to();
2157
+ if (isBlank(urlString))
2158
+ return _this__u8e3s4;
2159
+ var tmp;
2160
+ try {
2161
+ tmp = takeFromUnsafe(_this__u8e3s4, urlString);
2162
+ } catch ($p) {
2163
+ var tmp_0;
2164
+ if ($p instanceof Error) {
2165
+ var cause = $p;
2166
+ throw new URLParserException(urlString, cause);
2167
+ } else {
2168
+ throw $p;
2169
+ }
2170
+ }
2171
+ return tmp;
2172
+ }
2173
+ function takeFromUnsafe(_this__u8e3s4, urlString) {
2174
+ _init_properties_URLParser_kt__sf11to();
2175
+ var tmp$ret$1;
2176
+ $l$block: {
2177
+ // Inline function 'kotlin.text.indexOfFirst' call
2178
+ var inductionVariable = 0;
2179
+ var last = charSequenceLength(urlString) - 1 | 0;
2180
+ if (inductionVariable <= last)
2181
+ do {
2182
+ var index = inductionVariable;
2183
+ inductionVariable = inductionVariable + 1 | 0;
2184
+ var it = charSequenceGet(urlString, index);
2185
+ if (!isWhitespace(it)) {
2186
+ tmp$ret$1 = index;
2187
+ break $l$block;
2188
+ }
2189
+ }
2190
+ while (inductionVariable <= last);
2191
+ tmp$ret$1 = -1;
2192
+ }
2193
+ var startIndex = tmp$ret$1;
2194
+ var tmp$ret$3;
2195
+ $l$block_0: {
2196
+ // Inline function 'kotlin.text.indexOfLast' call
2197
+ var inductionVariable_0 = charSequenceLength(urlString) - 1 | 0;
2198
+ if (0 <= inductionVariable_0)
2199
+ do {
2200
+ var index_0 = inductionVariable_0;
2201
+ inductionVariable_0 = inductionVariable_0 + -1 | 0;
2202
+ var it_0 = charSequenceGet(urlString, index_0);
2203
+ if (!isWhitespace(it_0)) {
2204
+ tmp$ret$3 = index_0;
2205
+ break $l$block_0;
2206
+ }
2207
+ }
2208
+ while (0 <= inductionVariable_0);
2209
+ tmp$ret$3 = -1;
2210
+ }
2211
+ var endIndex = tmp$ret$3 + 1 | 0;
2212
+ var schemeLength = findScheme(urlString, startIndex, endIndex);
2213
+ if (schemeLength > 0) {
2214
+ var scheme = substring(urlString, startIndex, startIndex + schemeLength | 0);
2215
+ _this__u8e3s4.a2u(Companion_getInstance_7().o2u(scheme));
2216
+ startIndex = startIndex + (schemeLength + 1 | 0) | 0;
2217
+ }
2218
+ if (_this__u8e3s4.d2t().b2t_1 === 'data') {
2219
+ _this__u8e3s4.r2s_1 = substring(urlString, startIndex, endIndex);
2220
+ return _this__u8e3s4;
2221
+ }
2222
+ var slashCount = count(urlString, startIndex, endIndex, _Char___init__impl__6a9atx(47));
2223
+ startIndex = startIndex + slashCount | 0;
2224
+ if (_this__u8e3s4.d2t().b2t_1 === 'file') {
2225
+ parseFile(_this__u8e3s4, urlString, startIndex, endIndex, slashCount);
2226
+ return _this__u8e3s4;
2227
+ }
2228
+ if (_this__u8e3s4.d2t().b2t_1 === 'mailto') {
2229
+ // Inline function 'kotlin.require' call
2230
+ // Inline function 'kotlin.require' call
2231
+ if (!(slashCount === 0)) {
2232
+ var message = 'Failed requirement.';
2233
+ throw IllegalArgumentException_init_$Create$(toString(message));
2234
+ }
2235
+ parseMailto(_this__u8e3s4, urlString, startIndex, endIndex);
2236
+ return _this__u8e3s4;
2237
+ }
2238
+ if (_this__u8e3s4.d2t().b2t_1 === 'about') {
2239
+ // Inline function 'kotlin.require' call
2240
+ // Inline function 'kotlin.require' call
2241
+ if (!(slashCount === 0)) {
2242
+ var message_0 = 'Failed requirement.';
2243
+ throw IllegalArgumentException_init_$Create$(toString(message_0));
2244
+ }
2245
+ _this__u8e3s4.r2s_1 = substring(urlString, startIndex, endIndex);
2246
+ return _this__u8e3s4;
2247
+ }
2248
+ if (_this__u8e3s4.d2t().b2t_1 === 'tel') {
2249
+ // Inline function 'kotlin.require' call
2250
+ // Inline function 'kotlin.require' call
2251
+ if (!(slashCount === 0)) {
2252
+ var message_1 = 'Failed requirement.';
2253
+ throw IllegalArgumentException_init_$Create$(toString(message_1));
2254
+ }
2255
+ _this__u8e3s4.r2s_1 = substring(urlString, startIndex, endIndex);
2256
+ return _this__u8e3s4;
2257
+ }
2258
+ if (slashCount >= 2) {
2259
+ loop: while (true) {
2260
+ // Inline function 'kotlin.takeIf' call
2261
+ var this_0 = indexOfAny(urlString, toCharArray('@/\\?#'), startIndex);
2262
+ var tmp;
2263
+ if (this_0 > 0) {
2264
+ tmp = this_0;
2265
+ } else {
2266
+ tmp = null;
2267
+ }
2268
+ var tmp0_elvis_lhs = tmp;
2269
+ var delimiter = tmp0_elvis_lhs == null ? endIndex : tmp0_elvis_lhs;
2270
+ if (delimiter < endIndex && charCodeAt(urlString, delimiter) === _Char___init__impl__6a9atx(64)) {
2271
+ var passwordIndex = indexOfColonInHostPort(urlString, startIndex, delimiter);
2272
+ if (!(passwordIndex === -1)) {
2273
+ _this__u8e3s4.v2s_1 = substring(urlString, startIndex, passwordIndex);
2274
+ _this__u8e3s4.w2s_1 = substring(urlString, passwordIndex + 1 | 0, delimiter);
2275
+ } else {
2276
+ _this__u8e3s4.v2s_1 = substring(urlString, startIndex, delimiter);
2277
+ }
2278
+ startIndex = delimiter + 1 | 0;
2279
+ } else {
2280
+ fillHost(_this__u8e3s4, urlString, startIndex, delimiter);
2281
+ startIndex = delimiter;
2282
+ break loop;
2283
+ }
2284
+ }
2285
+ }
2286
+ if (startIndex >= endIndex) {
2287
+ _this__u8e3s4.y2s_1 = charCodeAt(urlString, endIndex - 1 | 0) === _Char___init__impl__6a9atx(47) ? get_ROOT_PATH() : emptyList();
2288
+ return _this__u8e3s4;
2289
+ }
2290
+ var tmp_0 = _this__u8e3s4;
2291
+ var tmp_1;
2292
+ if (slashCount === 0) {
2293
+ tmp_1 = dropLast(_this__u8e3s4.y2s_1, 1);
2294
+ } else {
2295
+ tmp_1 = emptyList();
2296
+ }
2297
+ tmp_0.y2s_1 = tmp_1;
2298
+ // Inline function 'kotlin.takeIf' call
2299
+ var this_1 = indexOfAny(urlString, toCharArray('?#'), startIndex);
2300
+ var tmp_2;
2301
+ if (this_1 > 0) {
2302
+ tmp_2 = this_1;
2303
+ } else {
2304
+ tmp_2 = null;
2305
+ }
2306
+ var tmp1_elvis_lhs = tmp_2;
2307
+ var pathEnd = tmp1_elvis_lhs == null ? endIndex : tmp1_elvis_lhs;
2308
+ if (pathEnd > startIndex) {
2309
+ var rawPath = substring(urlString, startIndex, pathEnd);
2310
+ var tmp_3;
2311
+ var tmp_4;
2312
+ if (_this__u8e3s4.y2s_1.g1() === 1) {
2313
+ // Inline function 'kotlin.text.isEmpty' call
2314
+ var this_2 = first_0(_this__u8e3s4.y2s_1);
2315
+ tmp_4 = charSequenceLength(this_2) === 0;
2316
+ } else {
2317
+ tmp_4 = false;
2318
+ }
2319
+ if (tmp_4) {
2320
+ tmp_3 = emptyList();
2321
+ } else {
2322
+ tmp_3 = _this__u8e3s4.y2s_1;
2323
+ }
2324
+ var basePath = tmp_3;
2325
+ var rawChunks = rawPath === '/' ? get_ROOT_PATH() : split(rawPath, charArrayOf([_Char___init__impl__6a9atx(47)]));
2326
+ var relativePath = plus_0(slashCount === 1 ? get_ROOT_PATH() : emptyList(), rawChunks);
2327
+ _this__u8e3s4.y2s_1 = plus_0(basePath, relativePath);
2328
+ startIndex = pathEnd;
2329
+ }
2330
+ if (startIndex < endIndex && charCodeAt(urlString, startIndex) === _Char___init__impl__6a9atx(63)) {
2331
+ startIndex = parseQuery(_this__u8e3s4, urlString, startIndex, endIndex);
2332
+ }
2333
+ parseFragment(_this__u8e3s4, urlString, startIndex, endIndex);
2334
+ return _this__u8e3s4;
2335
+ }
2336
+ function URLParserException(urlString, cause) {
2337
+ IllegalStateException_init_$Init$('Fail to parse url: ' + urlString, cause, this);
2338
+ captureStack(this, URLParserException);
2339
+ }
2340
+ function findScheme(urlString, startIndex, endIndex) {
2341
+ _init_properties_URLParser_kt__sf11to();
2342
+ var current = startIndex;
2343
+ var incorrectSchemePosition = -1;
2344
+ var firstChar = charCodeAt(urlString, current);
2345
+ if (!(_Char___init__impl__6a9atx(97) <= firstChar ? firstChar <= _Char___init__impl__6a9atx(122) : false) && !(_Char___init__impl__6a9atx(65) <= firstChar ? firstChar <= _Char___init__impl__6a9atx(90) : false)) {
2346
+ incorrectSchemePosition = current;
2347
+ }
2348
+ while (current < endIndex) {
2349
+ var char = charCodeAt(urlString, current);
2350
+ if (char === _Char___init__impl__6a9atx(58)) {
2351
+ if (!(incorrectSchemePosition === -1)) {
2352
+ throw IllegalArgumentException_init_$Create$('Illegal character in scheme at position ' + incorrectSchemePosition);
2353
+ }
2354
+ return current - startIndex | 0;
2355
+ }
2356
+ if (char === _Char___init__impl__6a9atx(47) || char === _Char___init__impl__6a9atx(63) || char === _Char___init__impl__6a9atx(35))
2357
+ return -1;
2358
+ if (incorrectSchemePosition === -1 && !(_Char___init__impl__6a9atx(97) <= char ? char <= _Char___init__impl__6a9atx(122) : false) && !(_Char___init__impl__6a9atx(65) <= char ? char <= _Char___init__impl__6a9atx(90) : false) && !(_Char___init__impl__6a9atx(48) <= char ? char <= _Char___init__impl__6a9atx(57) : false) && !(char === _Char___init__impl__6a9atx(46)) && !(char === _Char___init__impl__6a9atx(43)) && !(char === _Char___init__impl__6a9atx(45))) {
2359
+ incorrectSchemePosition = current;
2360
+ }
2361
+ current = current + 1 | 0;
2362
+ }
2363
+ return -1;
2364
+ }
2365
+ function count(urlString, startIndex, endIndex, char) {
2366
+ _init_properties_URLParser_kt__sf11to();
2367
+ var result = 0;
2368
+ $l$loop: while ((startIndex + result | 0) < endIndex && charCodeAt(urlString, startIndex + result | 0) === char) {
2369
+ result = result + 1 | 0;
2370
+ }
2371
+ return result;
2372
+ }
2373
+ function parseFile(_this__u8e3s4, urlString, startIndex, endIndex, slashCount) {
2374
+ _init_properties_URLParser_kt__sf11to();
2375
+ switch (slashCount) {
2376
+ case 1:
2377
+ _this__u8e3s4.r2s_1 = '';
2378
+ set_encodedPath(_this__u8e3s4, substring(urlString, startIndex, endIndex));
2379
+ break;
2380
+ case 2:
2381
+ var nextSlash = indexOf(urlString, _Char___init__impl__6a9atx(47), startIndex);
2382
+ if (nextSlash === -1 || nextSlash === endIndex) {
2383
+ _this__u8e3s4.r2s_1 = substring(urlString, startIndex, endIndex);
2384
+ return Unit_instance;
2385
+ }
2386
+
2387
+ _this__u8e3s4.r2s_1 = substring(urlString, startIndex, nextSlash);
2388
+ set_encodedPath(_this__u8e3s4, substring(urlString, nextSlash, endIndex));
2389
+ break;
2390
+ case 3:
2391
+ _this__u8e3s4.r2s_1 = '';
2392
+ set_encodedPath(_this__u8e3s4, '/' + substring(urlString, startIndex, endIndex));
2393
+ break;
2394
+ default:
2395
+ throw IllegalArgumentException_init_$Create$('Invalid file url: ' + urlString);
2396
+ }
2397
+ }
2398
+ function parseMailto(_this__u8e3s4, urlString, startIndex, endIndex) {
2399
+ _init_properties_URLParser_kt__sf11to();
2400
+ var delimiter = indexOf_0(urlString, '@', startIndex);
2401
+ if (delimiter === -1) {
2402
+ throw IllegalArgumentException_init_$Create$('Invalid mailto url: ' + urlString + ", it should contain '@'.");
2403
+ }
2404
+ _this__u8e3s4.h2u(decodeURLPart(substring(urlString, startIndex, delimiter)));
2405
+ _this__u8e3s4.r2s_1 = substring(urlString, delimiter + 1 | 0, endIndex);
2406
+ }
2407
+ function indexOfColonInHostPort(_this__u8e3s4, startIndex, endIndex) {
2408
+ _init_properties_URLParser_kt__sf11to();
2409
+ var skip = false;
2410
+ var inductionVariable = startIndex;
2411
+ if (inductionVariable < endIndex)
2412
+ do {
2413
+ var index = inductionVariable;
2414
+ inductionVariable = inductionVariable + 1 | 0;
2415
+ var tmp0_subject = charCodeAt(_this__u8e3s4, index);
2416
+ if (tmp0_subject === _Char___init__impl__6a9atx(91))
2417
+ skip = true;
2418
+ else if (tmp0_subject === _Char___init__impl__6a9atx(93))
2419
+ skip = false;
2420
+ else if (tmp0_subject === _Char___init__impl__6a9atx(58))
2421
+ if (!skip)
2422
+ return index;
2423
+ }
2424
+ while (inductionVariable < endIndex);
2425
+ return -1;
2426
+ }
2427
+ function fillHost(_this__u8e3s4, urlString, startIndex, endIndex) {
2428
+ _init_properties_URLParser_kt__sf11to();
2429
+ // Inline function 'kotlin.takeIf' call
2430
+ var this_0 = indexOfColonInHostPort(urlString, startIndex, endIndex);
2431
+ var tmp;
2432
+ if (this_0 > 0) {
2433
+ tmp = this_0;
2434
+ } else {
2435
+ tmp = null;
2436
+ }
2437
+ var tmp0_elvis_lhs = tmp;
2438
+ var colonIndex = tmp0_elvis_lhs == null ? endIndex : tmp0_elvis_lhs;
2439
+ _this__u8e3s4.r2s_1 = substring(urlString, startIndex, colonIndex);
2440
+ var tmp_0;
2441
+ if ((colonIndex + 1 | 0) < endIndex) {
2442
+ tmp_0 = toInt(substring(urlString, colonIndex + 1 | 0, endIndex));
2443
+ } else {
2444
+ tmp_0 = 0;
2445
+ }
2446
+ _this__u8e3s4.z2t(tmp_0);
2447
+ }
2448
+ function parseQuery(_this__u8e3s4, urlString, startIndex, endIndex) {
2449
+ _init_properties_URLParser_kt__sf11to();
2450
+ if ((startIndex + 1 | 0) === endIndex) {
2451
+ _this__u8e3s4.s2s_1 = true;
2452
+ return endIndex;
2453
+ }
2454
+ // Inline function 'kotlin.takeIf' call
2455
+ var this_0 = indexOf(urlString, _Char___init__impl__6a9atx(35), startIndex + 1 | 0);
2456
+ var tmp;
2457
+ if (this_0 > 0) {
2458
+ tmp = this_0;
2459
+ } else {
2460
+ tmp = null;
2461
+ }
2462
+ var tmp0_elvis_lhs = tmp;
2463
+ var fragmentStart = tmp0_elvis_lhs == null ? endIndex : tmp0_elvis_lhs;
2464
+ var rawParameters = parseQueryString(substring(urlString, startIndex + 1 | 0, fragmentStart), VOID, VOID, false);
2465
+ rawParameters.n2e(parseQuery$lambda(_this__u8e3s4));
2466
+ return fragmentStart;
2467
+ }
2468
+ function parseFragment(_this__u8e3s4, urlString, startIndex, endIndex) {
2469
+ _init_properties_URLParser_kt__sf11to();
2470
+ if (startIndex < endIndex && charCodeAt(urlString, startIndex) === _Char___init__impl__6a9atx(35)) {
2471
+ _this__u8e3s4.x2s_1 = substring(urlString, startIndex + 1 | 0, endIndex);
2472
+ }
2473
+ }
2474
+ function parseQuery$lambda($this_parseQuery) {
2475
+ return function (key, values) {
2476
+ $this_parseQuery.z2s_1.j2e(key, values);
2477
+ return Unit_instance;
2478
+ };
2479
+ }
2480
+ var properties_initialized_URLParser_kt_hd1g6a;
2481
+ function _init_properties_URLParser_kt__sf11to() {
2482
+ if (!properties_initialized_URLParser_kt_hd1g6a) {
2483
+ properties_initialized_URLParser_kt_hd1g6a = true;
2484
+ ROOT_PATH = listOf_0('');
2485
+ }
2486
+ }
2487
+ function Companion_7() {
2488
+ Companion_instance_7 = this;
2489
+ this.b2u_1 = new URLProtocol('http', 80);
2490
+ this.c2u_1 = new URLProtocol('https', 443);
2491
+ this.d2u_1 = new URLProtocol('ws', 80);
2492
+ this.e2u_1 = new URLProtocol('wss', 443);
2493
+ this.f2u_1 = new URLProtocol('socks', 1080);
2494
+ var tmp = this;
2495
+ // Inline function 'kotlin.collections.associateBy' call
2496
+ var this_0 = listOf([this.b2u_1, this.c2u_1, this.d2u_1, this.e2u_1, this.f2u_1]);
2497
+ var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(this_0, 10)), 16);
2498
+ // Inline function 'kotlin.collections.associateByTo' call
2499
+ var destination = LinkedHashMap_init_$Create$(capacity);
2500
+ var _iterator__ex2g4s = this_0.t();
2501
+ while (_iterator__ex2g4s.u()) {
2502
+ var element = _iterator__ex2g4s.v();
2503
+ var tmp$ret$0 = element.b2t_1;
2504
+ destination.s2(tmp$ret$0, element);
2505
+ }
2506
+ tmp.g2u_1 = destination;
2507
+ }
2508
+ protoOf(Companion_7).o2u = function (name) {
2509
+ // Inline function 'kotlin.let' call
2510
+ var it = toLowerCasePreservingASCIIRules(name);
2511
+ var tmp0_elvis_lhs = Companion_getInstance_7().g2u_1.z2(it);
2512
+ return tmp0_elvis_lhs == null ? new URLProtocol(it, 0) : tmp0_elvis_lhs;
2513
+ };
2514
+ var Companion_instance_7;
2515
+ function Companion_getInstance_7() {
2516
+ if (Companion_instance_7 == null)
2517
+ new Companion_7();
2518
+ return Companion_instance_7;
2519
+ }
2520
+ function URLProtocol(name, defaultPort) {
2521
+ Companion_getInstance_7();
2522
+ this.b2t_1 = name;
2523
+ this.c2t_1 = defaultPort;
2524
+ var tmp0 = this.b2t_1;
2525
+ var tmp$ret$1;
2526
+ $l$block: {
2527
+ // Inline function 'kotlin.text.all' call
2528
+ var inductionVariable = 0;
2529
+ while (inductionVariable < charSequenceLength(tmp0)) {
2530
+ var element = charSequenceGet(tmp0, inductionVariable);
2531
+ inductionVariable = inductionVariable + 1 | 0;
2532
+ if (!isLowerCase(element)) {
2533
+ tmp$ret$1 = false;
2534
+ break $l$block;
2535
+ }
2536
+ }
2537
+ tmp$ret$1 = true;
2538
+ }
2539
+ // Inline function 'kotlin.require' call
2540
+ if (!tmp$ret$1) {
2541
+ var message = 'All characters should be lower case';
2542
+ throw IllegalArgumentException_init_$Create$(toString(message));
2543
+ }
2544
+ }
2545
+ protoOf(URLProtocol).toString = function () {
2546
+ return 'URLProtocol(name=' + this.b2t_1 + ', defaultPort=' + this.c2t_1 + ')';
2547
+ };
2548
+ protoOf(URLProtocol).hashCode = function () {
2549
+ var result = getStringHashCode(this.b2t_1);
2550
+ result = imul(result, 31) + this.c2t_1 | 0;
2551
+ return result;
2552
+ };
2553
+ protoOf(URLProtocol).equals = function (other) {
2554
+ if (this === other)
2555
+ return true;
2556
+ if (!(other instanceof URLProtocol))
2557
+ return false;
2558
+ if (!(this.b2t_1 === other.b2t_1))
2559
+ return false;
2560
+ if (!(this.c2t_1 === other.c2t_1))
2561
+ return false;
2562
+ return true;
2563
+ };
2564
+ function isSecure(_this__u8e3s4) {
2565
+ return _this__u8e3s4.b2t_1 === 'https' || _this__u8e3s4.b2t_1 === 'wss';
2566
+ }
2567
+ function isWebsocket(_this__u8e3s4) {
2568
+ return _this__u8e3s4.b2t_1 === 'ws' || _this__u8e3s4.b2t_1 === 'wss';
2569
+ }
2570
+ function takeFrom_0(_this__u8e3s4, url) {
2571
+ _this__u8e3s4.u2s_1 = url.u2s_1;
2572
+ _this__u8e3s4.r2s_1 = url.r2s_1;
2573
+ _this__u8e3s4.z2t(url.t2s_1);
2574
+ _this__u8e3s4.y2s_1 = url.y2s_1;
2575
+ _this__u8e3s4.v2s_1 = url.v2s_1;
2576
+ _this__u8e3s4.w2s_1 = url.w2s_1;
2577
+ // Inline function 'kotlin.apply' call
2578
+ var this_0 = ParametersBuilder();
2579
+ appendAll(this_0, url.z2s_1);
2580
+ _this__u8e3s4.m2u(this_0);
2581
+ _this__u8e3s4.x2s_1 = url.x2s_1;
2582
+ _this__u8e3s4.s2s_1 = url.s2s_1;
2583
+ return _this__u8e3s4;
2584
+ }
2585
+ function Url(urlString) {
2586
+ return URLBuilder_0(urlString).i2l();
2587
+ }
2588
+ function appendUrlFullPath(_this__u8e3s4, encodedPath, encodedQueryParameters, trailingQuery) {
2589
+ var tmp;
2590
+ // Inline function 'kotlin.text.isNotBlank' call
2591
+ if (!isBlank(encodedPath)) {
2592
+ tmp = !startsWith_1(encodedPath, '/');
2593
+ } else {
2594
+ tmp = false;
2595
+ }
2596
+ if (tmp) {
2597
+ _this__u8e3s4.s(_Char___init__impl__6a9atx(47));
2598
+ }
2599
+ _this__u8e3s4.f1(encodedPath);
2600
+ if (!encodedQueryParameters.r() || trailingQuery) {
2601
+ _this__u8e3s4.f1('?');
2602
+ }
2603
+ // Inline function 'kotlin.collections.flatMap' call
2604
+ var tmp0 = encodedQueryParameters.i2e();
2605
+ // Inline function 'kotlin.collections.flatMapTo' call
2606
+ var destination = ArrayList_init_$Create$_0();
2607
+ var _iterator__ex2g4s = tmp0.t();
2608
+ while (_iterator__ex2g4s.u()) {
2609
+ var element = _iterator__ex2g4s.v();
2610
+ // Inline function 'kotlin.collections.component1' call
2611
+ var key = element.l1();
2612
+ // Inline function 'kotlin.collections.component2' call
2613
+ var value = element.m1();
2614
+ var tmp_0;
2615
+ if (value.r()) {
2616
+ tmp_0 = listOf_0(to(key, null));
2617
+ } else {
2618
+ // Inline function 'kotlin.collections.map' call
2619
+ // Inline function 'kotlin.collections.mapTo' call
2620
+ var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(value, 10));
2621
+ var _iterator__ex2g4s_0 = value.t();
2622
+ while (_iterator__ex2g4s_0.u()) {
2623
+ var item = _iterator__ex2g4s_0.v();
2624
+ var tmp$ret$3 = to(key, item);
2625
+ destination_0.e1(tmp$ret$3);
2626
+ }
2627
+ tmp_0 = destination_0;
2628
+ }
2629
+ var list = tmp_0;
2630
+ addAll(destination, list);
2631
+ }
2632
+ var tmp_1 = destination;
2633
+ joinTo(tmp_1, _this__u8e3s4, '&', VOID, VOID, VOID, VOID, appendUrlFullPath$lambda);
2634
+ }
2635
+ function appendUserAndPassword(_this__u8e3s4, encodedUser, encodedPassword) {
2636
+ if (encodedUser == null) {
2637
+ return Unit_instance;
2638
+ }
2639
+ _this__u8e3s4.q(encodedUser);
2640
+ if (!(encodedPassword == null)) {
2641
+ _this__u8e3s4.s(_Char___init__impl__6a9atx(58));
2642
+ _this__u8e3s4.q(encodedPassword);
2643
+ }
2644
+ _this__u8e3s4.q('@');
2645
+ }
2646
+ function URLBuilder_0(urlString) {
2647
+ return takeFrom(new URLBuilder(), urlString);
2648
+ }
2649
+ function get_hostWithPortIfSpecified(_this__u8e3s4) {
2650
+ var tmp0_subject = _this__u8e3s4.f2t_1;
2651
+ return tmp0_subject === 0 || tmp0_subject === _this__u8e3s4.q2t_1.c2t_1 ? _this__u8e3s4.e2t_1 : get_hostWithPort(_this__u8e3s4);
2652
+ }
2653
+ function get_hostWithPort(_this__u8e3s4) {
2654
+ return _this__u8e3s4.e2t_1 + ':' + _this__u8e3s4.p2u();
2655
+ }
2656
+ function appendUrlFullPath$lambda(it) {
2657
+ var key = it.qe_1;
2658
+ var tmp;
2659
+ if (it.re_1 == null) {
2660
+ tmp = key;
2661
+ } else {
2662
+ var value = toString_1(it.re_1);
2663
+ tmp = key + '=' + value;
2664
+ }
2665
+ return tmp;
2666
+ }
2667
+ function Companion_8() {
2668
+ }
2669
+ var Companion_instance_8;
2670
+ function Companion_getInstance_8() {
2671
+ return Companion_instance_8;
2672
+ }
2673
+ function Url$segments$delegate$lambda($pathSegments) {
2674
+ return function () {
2675
+ var tmp;
2676
+ if ($pathSegments.r()) {
2677
+ return emptyList();
2678
+ }
2679
+ var tmp_0;
2680
+ var tmp_1;
2681
+ // Inline function 'kotlin.text.isEmpty' call
2682
+ var this_0 = first_0($pathSegments);
2683
+ if (charSequenceLength(this_0) === 0) {
2684
+ tmp_1 = $pathSegments.g1() > 1;
2685
+ } else {
2686
+ tmp_1 = false;
2687
+ }
2688
+ if (tmp_1) {
2689
+ tmp_0 = 1;
2690
+ } else {
2691
+ tmp_0 = 0;
2692
+ }
2693
+ var start = tmp_0;
2694
+ var tmp_2;
2695
+ // Inline function 'kotlin.text.isEmpty' call
2696
+ var this_1 = last($pathSegments);
2697
+ if (charSequenceLength(this_1) === 0) {
2698
+ tmp_2 = get_lastIndex($pathSegments);
2699
+ } else {
2700
+ tmp_2 = get_lastIndex($pathSegments) + 1 | 0;
2701
+ }
2702
+ var end = tmp_2;
2703
+ return $pathSegments.m2(start, end);
2704
+ };
2705
+ }
2706
+ function Url$encodedPath$delegate$lambda($pathSegments, this$0) {
2707
+ return function () {
2708
+ var tmp;
2709
+ if ($pathSegments.r()) {
2710
+ return '';
2711
+ }
2712
+ var pathStartIndex = indexOf(this$0.l2t_1, _Char___init__impl__6a9atx(47), this$0.q2t_1.b2t_1.length + 3 | 0);
2713
+ var tmp_0;
2714
+ if (pathStartIndex === -1) {
2715
+ return '';
2716
+ }
2717
+ // Inline function 'kotlin.charArrayOf' call
2718
+ var tmp$ret$0 = charArrayOf([_Char___init__impl__6a9atx(63), _Char___init__impl__6a9atx(35)]);
2719
+ var pathEndIndex = indexOfAny(this$0.l2t_1, tmp$ret$0, pathStartIndex);
2720
+ var tmp_1;
2721
+ if (pathEndIndex === -1) {
2722
+ return substring_0(this$0.l2t_1, pathStartIndex);
2723
+ }
2724
+ return substring(this$0.l2t_1, pathStartIndex, pathEndIndex);
2725
+ };
2726
+ }
2727
+ function Url$encodedQuery$delegate$lambda(this$0) {
2728
+ return function () {
2729
+ var queryStart = indexOf(this$0.l2t_1, _Char___init__impl__6a9atx(63)) + 1 | 0;
2730
+ var tmp;
2731
+ if (queryStart === 0) {
2732
+ return '';
2733
+ }
2734
+ var queryEnd = indexOf(this$0.l2t_1, _Char___init__impl__6a9atx(35), queryStart);
2735
+ var tmp_0;
2736
+ if (queryEnd === -1) {
2737
+ return substring_0(this$0.l2t_1, queryStart);
2738
+ }
2739
+ return substring(this$0.l2t_1, queryStart, queryEnd);
2740
+ };
2741
+ }
2742
+ function Url$encodedPathAndQuery$delegate$lambda(this$0) {
2743
+ return function () {
2744
+ var pathStart = indexOf(this$0.l2t_1, _Char___init__impl__6a9atx(47), this$0.q2t_1.b2t_1.length + 3 | 0);
2745
+ var tmp;
2746
+ if (pathStart === -1) {
2747
+ return '';
2748
+ }
2749
+ var queryEnd = indexOf(this$0.l2t_1, _Char___init__impl__6a9atx(35), pathStart);
2750
+ var tmp_0;
2751
+ if (queryEnd === -1) {
2752
+ return substring_0(this$0.l2t_1, pathStart);
2753
+ }
2754
+ return substring(this$0.l2t_1, pathStart, queryEnd);
2755
+ };
2756
+ }
2757
+ function Url$encodedUser$delegate$lambda(this$0) {
2758
+ return function () {
2759
+ var tmp;
2760
+ if (this$0.i2t_1 == null) {
2761
+ return null;
2762
+ }
2763
+ var tmp_0;
2764
+ // Inline function 'kotlin.text.isEmpty' call
2765
+ var this_0 = this$0.i2t_1;
2766
+ if (charSequenceLength(this_0) === 0) {
2767
+ return '';
2768
+ }
2769
+ var usernameStart = this$0.q2t_1.b2t_1.length + 3 | 0;
2770
+ // Inline function 'kotlin.charArrayOf' call
2771
+ var tmp$ret$1 = charArrayOf([_Char___init__impl__6a9atx(58), _Char___init__impl__6a9atx(64)]);
2772
+ var usernameEnd = indexOfAny(this$0.l2t_1, tmp$ret$1, usernameStart);
2773
+ return substring(this$0.l2t_1, usernameStart, usernameEnd);
2774
+ };
2775
+ }
2776
+ function Url$_get_encodedUser_$ref_3lb9bi() {
2777
+ return function (p0) {
2778
+ return p0.q2u();
2779
+ };
2780
+ }
2781
+ function Url$encodedPassword$delegate$lambda(this$0) {
2782
+ return function () {
2783
+ var tmp;
2784
+ if (this$0.j2t_1 == null) {
2785
+ return null;
2786
+ }
2787
+ var tmp_0;
2788
+ // Inline function 'kotlin.text.isEmpty' call
2789
+ var this_0 = this$0.j2t_1;
2790
+ if (charSequenceLength(this_0) === 0) {
2791
+ return '';
2792
+ }
2793
+ var passwordStart = indexOf(this$0.l2t_1, _Char___init__impl__6a9atx(58), this$0.q2t_1.b2t_1.length + 3 | 0) + 1 | 0;
2794
+ var passwordEnd = indexOf(this$0.l2t_1, _Char___init__impl__6a9atx(64));
2795
+ return substring(this$0.l2t_1, passwordStart, passwordEnd);
2796
+ };
2797
+ }
2798
+ function Url$_get_encodedPassword_$ref_25ixc2() {
2799
+ return function (p0) {
2800
+ return p0.r2u();
2801
+ };
2802
+ }
2803
+ function Url$encodedFragment$delegate$lambda(this$0) {
2804
+ return function () {
2805
+ var fragmentStart = indexOf(this$0.l2t_1, _Char___init__impl__6a9atx(35)) + 1 | 0;
2806
+ var tmp;
2807
+ if (fragmentStart === 0) {
2808
+ return '';
2809
+ }
2810
+ return substring_0(this$0.l2t_1, fragmentStart);
2811
+ };
2812
+ }
2813
+ function Url_0(protocol, host, specifiedPort, pathSegments, parameters, fragment, user, password, trailingQuery, urlString) {
2814
+ this.e2t_1 = host;
2815
+ this.f2t_1 = specifiedPort;
2816
+ this.g2t_1 = parameters;
2817
+ this.h2t_1 = fragment;
2818
+ this.i2t_1 = user;
2819
+ this.j2t_1 = password;
2820
+ this.k2t_1 = trailingQuery;
2821
+ this.l2t_1 = urlString;
2822
+ var containsArg = this.f2t_1;
2823
+ // Inline function 'kotlin.require' call
2824
+ if (!(0 <= containsArg ? containsArg <= 65535 : false)) {
2825
+ var message = 'Port must be between 0 and 65535, or 0 if not set. Provided: ' + this.f2t_1;
2826
+ throw IllegalArgumentException_init_$Create$(toString(message));
2827
+ }
2828
+ this.m2t_1 = pathSegments;
2829
+ this.n2t_1 = pathSegments;
2830
+ var tmp = this;
2831
+ tmp.o2t_1 = lazy_0(Url$segments$delegate$lambda(pathSegments));
2832
+ this.p2t_1 = protocol;
2833
+ var tmp_0 = this;
2834
+ var tmp0_elvis_lhs = this.p2t_1;
2835
+ tmp_0.q2t_1 = tmp0_elvis_lhs == null ? Companion_getInstance_7().b2u_1 : tmp0_elvis_lhs;
2836
+ var tmp_1 = this;
2837
+ tmp_1.r2t_1 = lazy_0(Url$encodedPath$delegate$lambda(pathSegments, this));
2838
+ var tmp_2 = this;
2839
+ tmp_2.s2t_1 = lazy_0(Url$encodedQuery$delegate$lambda(this));
2840
+ var tmp_3 = this;
2841
+ tmp_3.t2t_1 = lazy_0(Url$encodedPathAndQuery$delegate$lambda(this));
2842
+ var tmp_4 = this;
2843
+ tmp_4.u2t_1 = lazy_0(Url$encodedUser$delegate$lambda(this));
2844
+ var tmp_5 = this;
2845
+ tmp_5.v2t_1 = lazy_0(Url$encodedPassword$delegate$lambda(this));
2846
+ var tmp_6 = this;
2847
+ tmp_6.w2t_1 = lazy_0(Url$encodedFragment$delegate$lambda(this));
2848
+ }
2849
+ protoOf(Url_0).p2u = function () {
2850
+ // Inline function 'kotlin.takeUnless' call
2851
+ var this_0 = this.f2t_1;
2852
+ var tmp;
2853
+ if (!(this_0 === 0)) {
2854
+ tmp = this_0;
2855
+ } else {
2856
+ tmp = null;
2857
+ }
2858
+ var tmp0_elvis_lhs = tmp;
2859
+ return tmp0_elvis_lhs == null ? this.q2t_1.c2t_1 : tmp0_elvis_lhs;
2860
+ };
2861
+ protoOf(Url_0).q2u = function () {
2862
+ var tmp0 = this.u2t_1;
2863
+ var tmp = KProperty1;
2864
+ // Inline function 'kotlin.getValue' call
2865
+ getPropertyCallableRef('encodedUser', 1, tmp, Url$_get_encodedUser_$ref_3lb9bi(), null);
2866
+ return tmp0.m1();
2867
+ };
2868
+ protoOf(Url_0).r2u = function () {
2869
+ var tmp0 = this.v2t_1;
2870
+ var tmp = KProperty1;
2871
+ // Inline function 'kotlin.getValue' call
2872
+ getPropertyCallableRef('encodedPassword', 1, tmp, Url$_get_encodedPassword_$ref_25ixc2(), null);
2873
+ return tmp0.m1();
2874
+ };
2875
+ protoOf(Url_0).toString = function () {
2876
+ return this.l2t_1;
2877
+ };
2878
+ protoOf(Url_0).equals = function (other) {
2879
+ if (this === other)
2880
+ return true;
2881
+ if (other == null || !getKClassFromExpression(this).equals(getKClassFromExpression(other)))
2882
+ return false;
2883
+ if (!(other instanceof Url_0))
2884
+ THROW_CCE();
2885
+ return this.l2t_1 === other.l2t_1;
2886
+ };
2887
+ protoOf(Url_0).hashCode = function () {
2888
+ return getStringHashCode(this.l2t_1);
2889
+ };
2890
+ function get_authority_0(_this__u8e3s4) {
2891
+ // Inline function 'kotlin.text.buildString' call
2892
+ // Inline function 'kotlin.apply' call
2893
+ var this_0 = StringBuilder_init_$Create$();
2894
+ this_0.q(get_encodedUserAndPassword_0(_this__u8e3s4));
2895
+ this_0.q(get_hostWithPortIfSpecified(_this__u8e3s4));
2896
+ return this_0.toString();
2897
+ }
2898
+ function UrlSerializer() {
2899
+ UrlSerializer_instance = this;
2900
+ this.s2u_1 = PrimitiveSerialDescriptor('io.ktor.http.Url', STRING_getInstance());
2901
+ }
2902
+ protoOf(UrlSerializer).z1r = function () {
2903
+ return this.s2u_1;
2904
+ };
2905
+ protoOf(UrlSerializer).b1s = function (decoder) {
2906
+ return Url(decoder.i1v());
2907
+ };
2908
+ protoOf(UrlSerializer).t2u = function (encoder, value) {
2909
+ encoder.r1w(value.toString());
2910
+ };
2911
+ protoOf(UrlSerializer).a1s = function (encoder, value) {
2912
+ return this.t2u(encoder, value instanceof Url_0 ? value : THROW_CCE());
2913
+ };
2914
+ var UrlSerializer_instance;
2915
+ function UrlSerializer_getInstance() {
2916
+ if (UrlSerializer_instance == null)
2917
+ new UrlSerializer();
2918
+ return UrlSerializer_instance;
2919
+ }
2920
+ function get_encodedUserAndPassword_0(_this__u8e3s4) {
2921
+ // Inline function 'kotlin.text.buildString' call
2922
+ // Inline function 'kotlin.apply' call
2923
+ var this_0 = StringBuilder_init_$Create$();
2924
+ appendUserAndPassword(this_0, _this__u8e3s4.q2u(), _this__u8e3s4.r2u());
2925
+ return this_0.toString();
2926
+ }
2927
+ function UrlDecodedParametersBuilder(encodedParametersBuilder) {
2928
+ this.u2u_1 = encodedParametersBuilder;
2929
+ this.v2u_1 = this.u2u_1.k2e();
2930
+ }
2931
+ protoOf(UrlDecodedParametersBuilder).i2l = function () {
2932
+ return decodeParameters(this.u2u_1);
2933
+ };
2934
+ protoOf(UrlDecodedParametersBuilder).k2e = function () {
2935
+ return this.v2u_1;
2936
+ };
2937
+ protoOf(UrlDecodedParametersBuilder).l2e = function (name) {
2938
+ var tmp0_safe_receiver = this.u2u_1.l2e(encodeURLParameter(name));
2939
+ var tmp;
2940
+ if (tmp0_safe_receiver == null) {
2941
+ tmp = null;
2942
+ } else {
2943
+ // Inline function 'kotlin.collections.map' call
2944
+ // Inline function 'kotlin.collections.mapTo' call
2945
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(tmp0_safe_receiver, 10));
2946
+ var _iterator__ex2g4s = tmp0_safe_receiver.t();
2947
+ while (_iterator__ex2g4s.u()) {
2948
+ var item = _iterator__ex2g4s.v();
2949
+ var tmp$ret$0 = decodeURLQueryComponent(item, VOID, VOID, true);
2950
+ destination.e1(tmp$ret$0);
2951
+ }
2952
+ tmp = destination;
2953
+ }
2954
+ return tmp;
2955
+ };
2956
+ protoOf(UrlDecodedParametersBuilder).m2e = function () {
2957
+ // Inline function 'kotlin.collections.map' call
2958
+ var this_0 = this.u2u_1.m2e();
2959
+ // Inline function 'kotlin.collections.mapTo' call
2960
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
2961
+ var _iterator__ex2g4s = this_0.t();
2962
+ while (_iterator__ex2g4s.u()) {
2963
+ var item = _iterator__ex2g4s.v();
2964
+ var tmp$ret$0 = decodeURLQueryComponent(item);
2965
+ destination.e1(tmp$ret$0);
2966
+ }
2967
+ return toSet(destination);
2968
+ };
2969
+ protoOf(UrlDecodedParametersBuilder).r = function () {
2970
+ return this.u2u_1.r();
2971
+ };
2972
+ protoOf(UrlDecodedParametersBuilder).i2e = function () {
2973
+ return decodeParameters(this.u2u_1).i2e();
2974
+ };
2975
+ protoOf(UrlDecodedParametersBuilder).t2e = function (name, value) {
2976
+ return this.u2u_1.t2e(encodeURLParameter(name), encodeURLParameterValue(value));
2977
+ };
2978
+ protoOf(UrlDecodedParametersBuilder).j2e = function (name, values) {
2979
+ var tmp = encodeURLParameter(name);
2980
+ // Inline function 'kotlin.collections.map' call
2981
+ // Inline function 'kotlin.collections.mapTo' call
2982
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(values, 10));
2983
+ var _iterator__ex2g4s = values.t();
2984
+ while (_iterator__ex2g4s.u()) {
2985
+ var item = _iterator__ex2g4s.v();
2986
+ var tmp$ret$0 = encodeURLParameterValue(item);
2987
+ destination.e1(tmp$ret$0);
2988
+ }
2989
+ return this.u2u_1.j2e(tmp, destination);
2990
+ };
2991
+ protoOf(UrlDecodedParametersBuilder).n2 = function () {
2992
+ return this.u2u_1.n2();
2993
+ };
2994
+ function encodeParameters(parameters) {
2995
+ // Inline function 'kotlin.apply' call
2996
+ var this_0 = ParametersBuilder();
2997
+ appendAllEncoded(this_0, parameters);
2998
+ return this_0;
2999
+ }
3000
+ function decodeParameters(parameters) {
3001
+ // Inline function 'kotlin.apply' call
3002
+ var this_0 = ParametersBuilder();
3003
+ appendAllDecoded(this_0, parameters);
3004
+ return this_0.i2l();
3005
+ }
3006
+ function appendAllEncoded(_this__u8e3s4, parameters) {
3007
+ // Inline function 'kotlin.collections.forEach' call
3008
+ var _iterator__ex2g4s = parameters.m2e().t();
3009
+ while (_iterator__ex2g4s.u()) {
3010
+ var element = _iterator__ex2g4s.v();
3011
+ var tmp0_elvis_lhs = parameters.l2e(element);
3012
+ var values = tmp0_elvis_lhs == null ? emptyList() : tmp0_elvis_lhs;
3013
+ var tmp = encodeURLParameter(element);
3014
+ // Inline function 'kotlin.collections.map' call
3015
+ // Inline function 'kotlin.collections.mapTo' call
3016
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(values, 10));
3017
+ var _iterator__ex2g4s_0 = values.t();
3018
+ while (_iterator__ex2g4s_0.u()) {
3019
+ var item = _iterator__ex2g4s_0.v();
3020
+ var tmp$ret$0 = encodeURLParameterValue(item);
3021
+ destination.e1(tmp$ret$0);
3022
+ }
3023
+ _this__u8e3s4.j2e(tmp, destination);
3024
+ }
3025
+ }
3026
+ function appendAllDecoded(_this__u8e3s4, parameters) {
3027
+ // Inline function 'kotlin.collections.forEach' call
3028
+ var _iterator__ex2g4s = parameters.m2e().t();
3029
+ while (_iterator__ex2g4s.u()) {
3030
+ var element = _iterator__ex2g4s.v();
3031
+ var tmp0_elvis_lhs = parameters.l2e(element);
3032
+ var values = tmp0_elvis_lhs == null ? emptyList() : tmp0_elvis_lhs;
3033
+ var tmp = decodeURLQueryComponent(element);
3034
+ // Inline function 'kotlin.collections.map' call
3035
+ // Inline function 'kotlin.collections.mapTo' call
3036
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(values, 10));
3037
+ var _iterator__ex2g4s_0 = values.t();
3038
+ while (_iterator__ex2g4s_0.u()) {
3039
+ var item = _iterator__ex2g4s_0.v();
3040
+ var tmp$ret$0 = decodeURLQueryComponent(item, VOID, VOID, true);
3041
+ destination.e1(tmp$ret$0);
3042
+ }
3043
+ _this__u8e3s4.j2e(tmp, destination);
3044
+ }
3045
+ }
3046
+ function ByteArrayContent(bytes, contentType, status) {
3047
+ contentType = contentType === VOID ? null : contentType;
3048
+ status = status === VOID ? null : status;
3049
+ ByteArrayContent_0.call(this);
3050
+ this.x2u_1 = bytes;
3051
+ this.y2u_1 = contentType;
3052
+ this.z2u_1 = status;
3053
+ }
3054
+ protoOf(ByteArrayContent).a2v = function () {
3055
+ return this.y2u_1;
3056
+ };
3057
+ protoOf(ByteArrayContent).b2v = function () {
3058
+ return fromInt(this.x2u_1.length);
3059
+ };
3060
+ protoOf(ByteArrayContent).c2v = function () {
3061
+ return this.x2u_1;
3062
+ };
3063
+ function FormItem() {
3064
+ }
3065
+ function FileItem() {
3066
+ }
3067
+ function BinaryItem() {
3068
+ }
3069
+ function BinaryChannelItem() {
3070
+ }
3071
+ function PartData() {
3072
+ }
3073
+ function MultiPartData() {
3074
+ }
3075
+ function NoContent() {
3076
+ OutgoingContent.call(this);
3077
+ }
3078
+ function ReadChannelContent() {
3079
+ OutgoingContent.call(this);
3080
+ }
3081
+ function WriteChannelContent() {
3082
+ OutgoingContent.call(this);
3083
+ }
3084
+ function ByteArrayContent_0() {
3085
+ OutgoingContent.call(this);
3086
+ }
3087
+ function ProtocolUpgrade() {
3088
+ }
3089
+ function ContentWrapper() {
3090
+ }
3091
+ protoOf(ContentWrapper).l2v = function () {
3092
+ return this.k2v_1;
3093
+ };
3094
+ function OutgoingContent() {
3095
+ this.d2v_1 = null;
3096
+ }
3097
+ protoOf(OutgoingContent).a2v = function () {
3098
+ return null;
3099
+ };
3100
+ protoOf(OutgoingContent).b2v = function () {
3101
+ return null;
3102
+ };
3103
+ protoOf(OutgoingContent).n2p = function () {
3104
+ return Companion_getInstance_1().f2l_1;
3105
+ };
3106
+ function NullBody() {
3107
+ }
3108
+ var NullBody_instance;
3109
+ function NullBody_getInstance() {
3110
+ return NullBody_instance;
3111
+ }
3112
+ function isEmpty(_this__u8e3s4) {
3113
+ var tmp;
3114
+ if (_this__u8e3s4 instanceof NoContent) {
3115
+ tmp = true;
3116
+ } else {
3117
+ if (_this__u8e3s4 instanceof ContentWrapper) {
3118
+ tmp = isEmpty(_this__u8e3s4.l2v());
3119
+ } else {
3120
+ tmp = false;
3121
+ }
3122
+ }
3123
+ return tmp;
3124
+ }
3125
+ function TextContent(text, contentType, status) {
3126
+ status = status === VOID ? null : status;
3127
+ ByteArrayContent_0.call(this);
3128
+ this.n2v_1 = text;
3129
+ this.o2v_1 = contentType;
3130
+ this.p2v_1 = status;
3131
+ var tmp = this;
3132
+ var tmp0_elvis_lhs = charset(this.o2v_1);
3133
+ tmp.q2v_1 = toByteArray(this.n2v_1, tmp0_elvis_lhs == null ? Charsets_getInstance().w1q_1 : tmp0_elvis_lhs);
3134
+ }
3135
+ protoOf(TextContent).a2v = function () {
3136
+ return this.o2v_1;
3137
+ };
3138
+ protoOf(TextContent).b2v = function () {
3139
+ return fromInt(this.q2v_1.length);
3140
+ };
3141
+ protoOf(TextContent).c2v = function () {
3142
+ return this.q2v_1;
3143
+ };
3144
+ protoOf(TextContent).toString = function () {
3145
+ return 'TextContent[' + this.o2v_1.toString() + '] "' + take(this.n2v_1, 30) + '"';
3146
+ };
3147
+ function get_origin(_this__u8e3s4) {
3148
+ return PlatformUtils_getInstance().a2e_1 ? locationOrigin() : 'http://localhost';
3149
+ }
3150
+ function locationOrigin() {
3151
+ return function () {
3152
+ var tmpLocation = null;
3153
+ if (typeof window !== 'undefined') {
3154
+ tmpLocation = window.location;
3155
+ } else if (typeof self !== 'undefined') {
3156
+ tmpLocation = self.location;
3157
+ }
3158
+ var origin = '';
3159
+ if (tmpLocation) {
3160
+ origin = tmpLocation.origin;
3161
+ }
3162
+ return origin && origin != 'null' ? origin : 'http://localhost';
3163
+ }();
3164
+ }
3165
+ //region block: post-declaration
3166
+ protoOf(EmptyHeaders).f2d = get;
3167
+ protoOf(EmptyHeaders).n2e = forEach;
3168
+ protoOf(EmptyParameters).f2d = get;
3169
+ protoOf(EmptyParameters).n2e = forEach;
3170
+ //endregion
3171
+ //region block: init
3172
+ Companion_instance_0 = new Companion_0();
3173
+ EmptyHeaders_instance = new EmptyHeaders();
3174
+ EmptyParameters_instance = new EmptyParameters();
3175
+ Companion_instance_8 = new Companion_8();
3176
+ NullBody_instance = new NullBody();
3177
+ //endregion
3178
+ //region block: exports
3179
+ export {
3180
+ NullBody_instance as NullBody_instanceoz9dr731l81q,
3181
+ Application_getInstance as Application_getInstanceueakgx5l255p,
3182
+ Companion_getInstance as Companion_getInstance24sa2b20ejg3q,
3183
+ MultiPart_getInstance as MultiPart_getInstance2hpkqlzozpomu,
3184
+ Text_getInstance as Text_getInstance38vnirw8um9kn,
3185
+ Companion_getInstance_1 as Companion_getInstance363ajpo4f7xlh,
3186
+ HttpHeaders_getInstance as HttpHeaders_getInstance1z5nmwg0t7mku,
3187
+ Companion_getInstance_2 as Companion_getInstance12092dx8psw4e,
3188
+ Companion_getInstance_3 as Companion_getInstance3v7nep4taho4u,
3189
+ Companion_getInstance_4 as Companion_getInstance3047yo46wk0eo,
3190
+ Companion_getInstance_5 as Companion_getInstance1qo23ej9noujo,
3191
+ ByteArrayContent as ByteArrayContent9zol65b22hp0,
3192
+ MultiPartData as MultiPartData57syw40llxls,
3193
+ NullBody as NullBody1903zz7riiwr0,
3194
+ ByteArrayContent_0 as ByteArrayContent2n0wb43y6ugs1,
3195
+ ContentWrapper as ContentWrapper3n9gdymgnbto9,
3196
+ NoContent as NoContent1bdx48poqrifq,
3197
+ ProtocolUpgrade as ProtocolUpgradexnnpt2xliy8g,
3198
+ ReadChannelContent as ReadChannelContentz1amb4hnpqp4,
3199
+ WriteChannelContent as WriteChannelContent1d7f40hsfcaxg,
3200
+ OutgoingContent as OutgoingContent3t2ohmyam9o76,
3201
+ BinaryChannelItem as BinaryChannelItem1738w5tfrge2v,
3202
+ BinaryItem as BinaryItemfmhmorcwxqpu,
3203
+ FileItem as FileItem1x1gsh4ba5lnh,
3204
+ FormItem as FormItem1iov1k1zypjjb,
3205
+ TextContent as TextContent1rb6ftlpvl1d2,
3206
+ isEmpty as isEmpty1yq29t926r0va,
3207
+ ContentType as ContentType1svlpabm9v7iz,
3208
+ HeadersBuilder as HeadersBuilder3h7sn3kkvu98m,
3209
+ HttpStatusCode as HttpStatusCode3o1wkms10pg4k,
3210
+ URLBuilder_0 as URLBuilder1nlnzfhn643pn,
3211
+ URLBuilder as URLBuilder2mz8zkz4u9ray,
3212
+ UnsafeHeaderException as UnsafeHeaderException3ncvrrp48xjzq,
3213
+ get_authority as get_authorityakhc3pgcrb9j,
3214
+ get_authority_0 as get_authority2s3hk87lssumy,
3215
+ charset_0 as charset3qqtyytkmxogi,
3216
+ charset as charset1dribv3ku48b1,
3217
+ contentLength as contentLength2suzxu1lzutku,
3218
+ contentType_0 as contentType2zzm38yxo3syt,
3219
+ contentType_1 as contentType1lwcfjsjo0z8g,
3220
+ contentType as contentType317fn4f991q9a,
3221
+ encodeURLQueryComponent as encodeURLQueryComponent1fjq9wb8rn8hq,
3222
+ get_encodedPath as get_encodedPathb4r5okm1fzvh,
3223
+ set_encodedPath as set_encodedPath3q0i8nsv3a7qy,
3224
+ formUrlEncode as formUrlEncode1cs6tvna5e1qw,
3225
+ headersOf as headersOf2tgdoojg8tifn,
3226
+ isSecure as isSecurex1qiiavqi0xu,
3227
+ isSuccess as isSuccess1pokn37fdu56v,
3228
+ isWebsocket as isWebsocket1w1xog9vfgwm1,
3229
+ parseAndSortHeader as parseAndSortHeader33xgq5fx7y6j1,
3230
+ get_supportsRequestBody as get_supportsRequestBodyjdtitrt33hir,
3231
+ takeFrom_0 as takeFromkqlcz7c6dx2r,
3232
+ takeFrom as takeFrom3rd40szpqy350,
3233
+ withCharsetIfNeeded as withCharsetIfNeeded3sz33ys0x9vfx,
3234
+ withCharset as withCharset27k3t3dvzhi4n,
3235
+ };
3236
+ //endregion
3237
+
3238
+ //# sourceMappingURL=ktor-ktor-http.mjs.map