@godaan/shared 1.0.0-SNAPSHOT-202512150300 → 1.0.0-SNAPSHOT-202512160231
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/kotlin/compose-multiplatform-core-compose-foundation-foundation.js +1 -1
- package/kotlin/compose-multiplatform-core-compose-runtime-runtime.js +1 -1
- package/kotlin/godaan-backend-shared.d.ts +1 -0
- package/kotlin/godaan-backend-shared.js +84 -4
- package/kotlin/godaan-backend-shared.js.map +1 -1
- package/kotlin/kotlin-kotlin-stdlib.js +9554 -76
- package/kotlin/kotlin-kotlin-stdlib.js.map +1 -1
- package/kotlin/kotlinx-atomicfu.js +190 -6
- package/kotlin/kotlinx-atomicfu.js.map +1 -1
- package/kotlin/kotlinx-coroutines-core.js +8162 -5
- package/kotlin/kotlinx-coroutines-core.js.map +1 -1
- package/kotlin/kotlinx-io-kotlinx-io-bytestring.js +204 -5
- package/kotlin/kotlinx-io-kotlinx-io-bytestring.js.map +1 -1
- package/kotlin/kotlinx-io-kotlinx-io-core.js +2019 -5
- package/kotlin/kotlinx-io-kotlinx-io-core.js.map +1 -1
- package/kotlin/kotlinx-serialization-kotlinx-serialization-core.js +772 -5
- package/kotlin/kotlinx-serialization-kotlinx-serialization-core.js.map +1 -1
- package/kotlin/ktor-ktor-client-core.js +8305 -26
- package/kotlin/ktor-ktor-client-core.js.map +1 -1
- package/kotlin/ktor-ktor-events.js +84 -5
- package/kotlin/ktor-ktor-events.js.map +1 -1
- package/kotlin/ktor-ktor-http-cio.js +2268 -5
- package/kotlin/ktor-ktor-http-cio.js.map +1 -1
- package/kotlin/ktor-ktor-http.js +3026 -5
- package/kotlin/ktor-ktor-http.js.map +1 -1
- package/kotlin/ktor-ktor-io.js +3159 -5
- package/kotlin/ktor-ktor-io.js.map +1 -1
- package/kotlin/ktor-ktor-utils.js +2355 -5
- package/kotlin/ktor-ktor-utils.js.map +1 -1
- package/kotlin/ktor-ktor-websockets.js +437 -5
- package/kotlin/ktor-ktor-websockets.js.map +1 -1
- package/package.json +1 -1
package/kotlin/ktor-ktor-http.js
CHANGED
|
@@ -1,13 +1,3034 @@
|
|
|
1
1
|
(function (factory) {
|
|
2
2
|
if (typeof define === 'function' && define.amd)
|
|
3
|
-
define(['exports'], factory);
|
|
3
|
+
define(['exports', './kotlin-kotlin-stdlib.js', './ktor-ktor-io.js', './ktor-ktor-utils.js'], factory);
|
|
4
4
|
else if (typeof exports === 'object')
|
|
5
|
-
factory(module.exports);
|
|
6
|
-
else
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
factory(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./ktor-ktor-io.js'), require('./ktor-ktor-utils.js'));
|
|
6
|
+
else {
|
|
7
|
+
if (typeof globalThis['kotlin-kotlin-stdlib'] === 'undefined') {
|
|
8
|
+
throw new Error("Error loading module 'ktor-ktor-http'. Its dependency 'kotlin-kotlin-stdlib' was not found. Please, check whether 'kotlin-kotlin-stdlib' is loaded prior to 'ktor-ktor-http'.");
|
|
9
|
+
}
|
|
10
|
+
if (typeof globalThis['ktor-ktor-io'] === 'undefined') {
|
|
11
|
+
throw new Error("Error loading module 'ktor-ktor-http'. Its dependency 'ktor-ktor-io' was not found. Please, check whether 'ktor-ktor-io' is loaded prior to 'ktor-ktor-http'.");
|
|
12
|
+
}
|
|
13
|
+
if (typeof globalThis['ktor-ktor-utils'] === 'undefined') {
|
|
14
|
+
throw new Error("Error loading module 'ktor-ktor-http'. Its dependency 'ktor-ktor-utils' was not found. Please, check whether 'ktor-ktor-utils' is loaded prior to 'ktor-ktor-http'.");
|
|
15
|
+
}
|
|
16
|
+
globalThis['ktor-ktor-http'] = factory(typeof globalThis['ktor-ktor-http'] === 'undefined' ? {} : globalThis['ktor-ktor-http'], globalThis['kotlin-kotlin-stdlib'], globalThis['ktor-ktor-io'], globalThis['ktor-ktor-utils']);
|
|
17
|
+
}
|
|
18
|
+
}(function (_, kotlin_kotlin, kotlin_io_ktor_ktor_io, kotlin_io_ktor_ktor_utils) {
|
|
9
19
|
'use strict';
|
|
20
|
+
//region block: imports
|
|
21
|
+
var imul = Math.imul;
|
|
22
|
+
var VOID = kotlin_kotlin.$_$.a;
|
|
23
|
+
var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.s;
|
|
24
|
+
var Charsets_getInstance = kotlin_io_ktor_ktor_io.$_$.k;
|
|
25
|
+
var encode = kotlin_io_ktor_ktor_io.$_$.p;
|
|
26
|
+
var Unit_instance = kotlin_kotlin.$_$.k2;
|
|
27
|
+
var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.r1;
|
|
28
|
+
var Char__plus_impl_qi7pgj = kotlin_kotlin.$_$.v1;
|
|
29
|
+
var Char__minus_impl_a2frrh = kotlin_kotlin.$_$.u1;
|
|
30
|
+
var takeWhile = kotlin_io_ktor_ktor_io.$_$.v;
|
|
31
|
+
var charArray = kotlin_kotlin.$_$.d6;
|
|
32
|
+
var concatToString = kotlin_kotlin.$_$.a8;
|
|
33
|
+
var charCodeAt = kotlin_kotlin.$_$.e6;
|
|
34
|
+
var substring = kotlin_kotlin.$_$.z8;
|
|
35
|
+
var toString = kotlin_kotlin.$_$.j7;
|
|
36
|
+
var Char = kotlin_kotlin.$_$.m9;
|
|
37
|
+
var isSurrogate = kotlin_kotlin.$_$.n8;
|
|
38
|
+
var StringBuilder_init_$Create$_0 = kotlin_kotlin.$_$.r;
|
|
39
|
+
var charSequenceGet = kotlin_kotlin.$_$.f6;
|
|
40
|
+
var charSequenceLength = kotlin_kotlin.$_$.g6;
|
|
41
|
+
var charSequenceSubSequence = kotlin_kotlin.$_$.h6;
|
|
42
|
+
var toString_0 = kotlin_kotlin.$_$.y1;
|
|
43
|
+
var toByte = kotlin_kotlin.$_$.h7;
|
|
44
|
+
var decodeToString = kotlin_kotlin.$_$.e8;
|
|
45
|
+
var Exception = kotlin_kotlin.$_$.r9;
|
|
46
|
+
var Exception_init_$Init$ = kotlin_kotlin.$_$.w;
|
|
47
|
+
var captureStack = kotlin_kotlin.$_$.b6;
|
|
48
|
+
var protoOf = kotlin_kotlin.$_$.g7;
|
|
49
|
+
var initMetadataForClass = kotlin_kotlin.$_$.q6;
|
|
50
|
+
var Char__minus_impl_a2frrh_0 = kotlin_kotlin.$_$.t1;
|
|
51
|
+
var Char__toInt_impl_vasixd = kotlin_kotlin.$_$.x1;
|
|
52
|
+
var numberToChar = kotlin_kotlin.$_$.e7;
|
|
53
|
+
var canRead = kotlin_io_ktor_ktor_io.$_$.s;
|
|
54
|
+
var Char__rangeTo_impl_tkncvp = kotlin_kotlin.$_$.w1;
|
|
55
|
+
var plus = kotlin_kotlin.$_$.u3;
|
|
56
|
+
var plus_0 = kotlin_kotlin.$_$.v3;
|
|
57
|
+
var collectionSizeOrDefault = kotlin_kotlin.$_$.v2;
|
|
58
|
+
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.f;
|
|
59
|
+
var toSet = kotlin_kotlin.$_$.l4;
|
|
60
|
+
var setOf = kotlin_kotlin.$_$.a4;
|
|
61
|
+
var plus_1 = kotlin_kotlin.$_$.t3;
|
|
62
|
+
var listOf = kotlin_kotlin.$_$.q3;
|
|
63
|
+
var emptyList = kotlin_kotlin.$_$.d3;
|
|
64
|
+
var objectCreate = kotlin_kotlin.$_$.f7;
|
|
65
|
+
var equals = kotlin_kotlin.$_$.h8;
|
|
66
|
+
var Collection = kotlin_kotlin.$_$.m2;
|
|
67
|
+
var isInterface = kotlin_kotlin.$_$.a7;
|
|
68
|
+
var isBlank = kotlin_kotlin.$_$.m8;
|
|
69
|
+
var last = kotlin_kotlin.$_$.o3;
|
|
70
|
+
var indexOf = kotlin_kotlin.$_$.l8;
|
|
71
|
+
var THROW_CCE = kotlin_kotlin.$_$.y9;
|
|
72
|
+
var isCharSequence = kotlin_kotlin.$_$.y6;
|
|
73
|
+
var trim = kotlin_kotlin.$_$.j9;
|
|
74
|
+
var substring_0 = kotlin_kotlin.$_$.y8;
|
|
75
|
+
var contains = kotlin_kotlin.$_$.c8;
|
|
76
|
+
var initMetadataForCompanion = kotlin_kotlin.$_$.r6;
|
|
77
|
+
var initMetadataForObject = kotlin_kotlin.$_$.w6;
|
|
78
|
+
var startsWith = kotlin_kotlin.$_$.w8;
|
|
79
|
+
var plus_2 = kotlin_kotlin.$_$.w3;
|
|
80
|
+
var equals_0 = kotlin_kotlin.$_$.k6;
|
|
81
|
+
var getStringHashCode = kotlin_kotlin.$_$.o6;
|
|
82
|
+
var hashCode = kotlin_kotlin.$_$.p6;
|
|
83
|
+
var forName = kotlin_io_ktor_ktor_io.$_$.q;
|
|
84
|
+
var IllegalArgumentException = kotlin_kotlin.$_$.s9;
|
|
85
|
+
var get_name = kotlin_io_ktor_ktor_io.$_$.r;
|
|
86
|
+
var get_lastIndex = kotlin_kotlin.$_$.n3;
|
|
87
|
+
var first = kotlin_kotlin.$_$.i8;
|
|
88
|
+
var last_0 = kotlin_kotlin.$_$.q8;
|
|
89
|
+
var get_lastIndex_0 = kotlin_kotlin.$_$.p8;
|
|
90
|
+
var StringValuesBuilderImpl = kotlin_io_ktor_ktor_utils.$_$.r;
|
|
91
|
+
var listOf_0 = kotlin_kotlin.$_$.p3;
|
|
92
|
+
var emptySet = kotlin_kotlin.$_$.f3;
|
|
93
|
+
var get = kotlin_io_ktor_ktor_utils.$_$.q;
|
|
94
|
+
var forEach = kotlin_io_ktor_ktor_utils.$_$.p;
|
|
95
|
+
var StringValues = kotlin_io_ktor_ktor_utils.$_$.u;
|
|
96
|
+
var StringValuesImpl = kotlin_io_ktor_ktor_utils.$_$.s;
|
|
97
|
+
var emptyMap = kotlin_kotlin.$_$.e3;
|
|
98
|
+
var StringValuesSingleImpl = kotlin_io_ktor_ktor_utils.$_$.t;
|
|
99
|
+
var toDoubleOrNull = kotlin_kotlin.$_$.c9;
|
|
100
|
+
var LazyThreadSafetyMode_NONE_getInstance = kotlin_kotlin.$_$.b;
|
|
101
|
+
var lazy = kotlin_kotlin.$_$.ha;
|
|
102
|
+
var to = kotlin_kotlin.$_$.na;
|
|
103
|
+
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.g;
|
|
104
|
+
var asList = kotlin_kotlin.$_$.u2;
|
|
105
|
+
var Char__compareTo_impl_ypi4mb = kotlin_kotlin.$_$.s1;
|
|
106
|
+
var IllegalArgumentException_init_$Init$ = kotlin_kotlin.$_$.a1;
|
|
107
|
+
var toLongOrNull = kotlin_kotlin.$_$.e9;
|
|
108
|
+
var mapCapacity = kotlin_kotlin.$_$.r3;
|
|
109
|
+
var coerceAtLeast = kotlin_kotlin.$_$.m7;
|
|
110
|
+
var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.k;
|
|
111
|
+
var Comparable = kotlin_kotlin.$_$.n9;
|
|
112
|
+
var initMetadataForInterface = kotlin_kotlin.$_$.u6;
|
|
113
|
+
var isWhitespace = kotlin_kotlin.$_$.o8;
|
|
114
|
+
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.b1;
|
|
115
|
+
var startsWith_0 = kotlin_kotlin.$_$.v8;
|
|
116
|
+
var charArrayOf = kotlin_kotlin.$_$.c6;
|
|
117
|
+
var split = kotlin_kotlin.$_$.t8;
|
|
118
|
+
var toMutableList = kotlin_kotlin.$_$.k4;
|
|
119
|
+
var first_0 = kotlin_kotlin.$_$.i3;
|
|
120
|
+
var joinToString = kotlin_kotlin.$_$.l3;
|
|
121
|
+
var toCharArray = kotlin_io_ktor_ktor_utils.$_$.y;
|
|
122
|
+
var indexOfAny = kotlin_kotlin.$_$.j8;
|
|
123
|
+
var dropLast = kotlin_kotlin.$_$.c3;
|
|
124
|
+
var IllegalStateException = kotlin_kotlin.$_$.t9;
|
|
125
|
+
var IllegalStateException_init_$Init$ = kotlin_kotlin.$_$.f1;
|
|
126
|
+
var indexOf_0 = kotlin_kotlin.$_$.k8;
|
|
127
|
+
var toInt = kotlin_kotlin.$_$.d9;
|
|
128
|
+
var toLowerCasePreservingASCIIRules = kotlin_io_ktor_ktor_utils.$_$.z;
|
|
129
|
+
var isLowerCase = kotlin_io_ktor_ktor_utils.$_$.w;
|
|
130
|
+
var appendAll = kotlin_io_ktor_ktor_utils.$_$.v;
|
|
131
|
+
var startsWith_1 = kotlin_kotlin.$_$.u8;
|
|
132
|
+
var addAll = kotlin_kotlin.$_$.s2;
|
|
133
|
+
var joinTo = kotlin_kotlin.$_$.m3;
|
|
134
|
+
var toString_1 = kotlin_kotlin.$_$.ma;
|
|
135
|
+
var lazy_0 = kotlin_kotlin.$_$.ia;
|
|
136
|
+
var KProperty1 = kotlin_kotlin.$_$.x7;
|
|
137
|
+
var getPropertyCallableRef = kotlin_kotlin.$_$.n6;
|
|
138
|
+
var getKClassFromExpression = kotlin_kotlin.$_$.s7;
|
|
139
|
+
var toByteArray = kotlin_io_ktor_ktor_io.$_$.w;
|
|
140
|
+
var fromInt = kotlin_kotlin.$_$.q5;
|
|
141
|
+
var take = kotlin_kotlin.$_$.a9;
|
|
142
|
+
var PlatformUtils_getInstance = kotlin_io_ktor_ktor_utils.$_$.a;
|
|
143
|
+
//endregion
|
|
10
144
|
//region block: pre-declaration
|
|
145
|
+
initMetadataForClass(URLDecodeException, 'URLDecodeException', VOID, Exception);
|
|
146
|
+
initMetadataForCompanion(Companion);
|
|
147
|
+
initMetadataForObject(Application, 'Application');
|
|
148
|
+
initMetadataForObject(MultiPart, 'MultiPart');
|
|
149
|
+
initMetadataForObject(Text, 'Text');
|
|
150
|
+
initMetadataForClass(HeaderValueWithParameters, 'HeaderValueWithParameters');
|
|
151
|
+
initMetadataForClass(ContentType, 'ContentType', VOID, HeaderValueWithParameters);
|
|
152
|
+
initMetadataForClass(BadContentTypeFormatException, 'BadContentTypeFormatException', VOID, Exception);
|
|
153
|
+
initMetadataForCompanion(Companion_0);
|
|
154
|
+
initMetadataForCompanion(Companion_1);
|
|
155
|
+
initMetadataForClass(HeadersBuilder, 'HeadersBuilder', HeadersBuilder, StringValuesBuilderImpl);
|
|
156
|
+
initMetadataForObject(EmptyHeaders, 'EmptyHeaders', VOID, VOID, [StringValues]);
|
|
157
|
+
initMetadataForClass(HeadersImpl, 'HeadersImpl', HeadersImpl, StringValuesImpl, [StringValues, StringValuesImpl]);
|
|
158
|
+
initMetadataForClass(HeadersSingleImpl, 'HeadersSingleImpl', VOID, StringValuesSingleImpl, [StringValues, StringValuesSingleImpl]);
|
|
159
|
+
initMetadataForClass(HeaderValueParam, 'HeaderValueParam');
|
|
160
|
+
initMetadataForClass(HeaderValue, 'HeaderValue');
|
|
161
|
+
initMetadataForObject(HttpHeaders, 'HttpHeaders');
|
|
162
|
+
initMetadataForClass(UnsafeHeaderException, 'UnsafeHeaderException', VOID, IllegalArgumentException);
|
|
163
|
+
initMetadataForClass(IllegalHeaderNameException, 'IllegalHeaderNameException', VOID, IllegalArgumentException);
|
|
164
|
+
initMetadataForClass(IllegalHeaderValueException, 'IllegalHeaderValueException', VOID, IllegalArgumentException);
|
|
165
|
+
initMetadataForCompanion(Companion_2);
|
|
166
|
+
initMetadataForClass(HttpMethod, 'HttpMethod');
|
|
167
|
+
initMetadataForCompanion(Companion_3);
|
|
168
|
+
initMetadataForClass(HttpProtocolVersion, 'HttpProtocolVersion');
|
|
169
|
+
initMetadataForCompanion(Companion_4);
|
|
170
|
+
initMetadataForClass(HttpStatusCode, 'HttpStatusCode', VOID, VOID, [Comparable]);
|
|
171
|
+
initMetadataForCompanion(Companion_5);
|
|
172
|
+
initMetadataForInterface(Parameters, 'Parameters', VOID, VOID, [StringValues]);
|
|
173
|
+
initMetadataForObject(EmptyParameters, 'EmptyParameters', VOID, VOID, [Parameters]);
|
|
174
|
+
initMetadataForClass(ParametersBuilderImpl, 'ParametersBuilderImpl', ParametersBuilderImpl, StringValuesBuilderImpl);
|
|
175
|
+
initMetadataForClass(ParametersImpl, 'ParametersImpl', ParametersImpl, StringValuesImpl, [Parameters, StringValuesImpl]);
|
|
176
|
+
initMetadataForCompanion(Companion_6);
|
|
177
|
+
initMetadataForClass(URLBuilder, 'URLBuilder', URLBuilder);
|
|
178
|
+
initMetadataForClass(URLParserException, 'URLParserException', VOID, IllegalStateException);
|
|
179
|
+
initMetadataForCompanion(Companion_7);
|
|
180
|
+
initMetadataForClass(URLProtocol, 'URLProtocol');
|
|
181
|
+
initMetadataForCompanion(Companion_8);
|
|
182
|
+
initMetadataForClass(Url_0, 'Url');
|
|
183
|
+
initMetadataForClass(UrlDecodedParametersBuilder, 'UrlDecodedParametersBuilder');
|
|
184
|
+
initMetadataForInterface(MultiPartData, 'MultiPartData', VOID, VOID, VOID, [0]);
|
|
185
|
+
initMetadataForClass(OutgoingContent, 'OutgoingContent');
|
|
186
|
+
initMetadataForClass(NoContent, 'NoContent', VOID, OutgoingContent);
|
|
187
|
+
initMetadataForClass(ReadChannelContent, 'ReadChannelContent', VOID, OutgoingContent);
|
|
188
|
+
initMetadataForClass(WriteChannelContent, 'WriteChannelContent', VOID, OutgoingContent, VOID, [1]);
|
|
189
|
+
initMetadataForClass(ByteArrayContent, 'ByteArrayContent', VOID, OutgoingContent);
|
|
190
|
+
initMetadataForClass(ProtocolUpgrade, 'ProtocolUpgrade', VOID, OutgoingContent, VOID, [4]);
|
|
191
|
+
initMetadataForClass(ContentWrapper, 'ContentWrapper', VOID, OutgoingContent);
|
|
192
|
+
initMetadataForObject(NullBody, 'NullBody');
|
|
193
|
+
initMetadataForClass(TextContent, 'TextContent', VOID, ByteArrayContent);
|
|
194
|
+
//endregion
|
|
195
|
+
function get_URL_ALPHABET() {
|
|
196
|
+
_init_properties_Codecs_kt__fudxxf();
|
|
197
|
+
return URL_ALPHABET;
|
|
198
|
+
}
|
|
199
|
+
var URL_ALPHABET;
|
|
200
|
+
function get_URL_ALPHABET_CHARS() {
|
|
201
|
+
_init_properties_Codecs_kt__fudxxf();
|
|
202
|
+
return URL_ALPHABET_CHARS;
|
|
203
|
+
}
|
|
204
|
+
var URL_ALPHABET_CHARS;
|
|
205
|
+
function get_HEX_ALPHABET() {
|
|
206
|
+
_init_properties_Codecs_kt__fudxxf();
|
|
207
|
+
return HEX_ALPHABET;
|
|
208
|
+
}
|
|
209
|
+
var HEX_ALPHABET;
|
|
210
|
+
function get_URL_PROTOCOL_PART() {
|
|
211
|
+
_init_properties_Codecs_kt__fudxxf();
|
|
212
|
+
return URL_PROTOCOL_PART;
|
|
213
|
+
}
|
|
214
|
+
var URL_PROTOCOL_PART;
|
|
215
|
+
function get_VALID_PATH_PART() {
|
|
216
|
+
_init_properties_Codecs_kt__fudxxf();
|
|
217
|
+
return VALID_PATH_PART;
|
|
218
|
+
}
|
|
219
|
+
var VALID_PATH_PART;
|
|
220
|
+
var ATTRIBUTE_CHARACTERS;
|
|
221
|
+
function get_SPECIAL_SYMBOLS() {
|
|
222
|
+
_init_properties_Codecs_kt__fudxxf();
|
|
223
|
+
return SPECIAL_SYMBOLS;
|
|
224
|
+
}
|
|
225
|
+
var SPECIAL_SYMBOLS;
|
|
226
|
+
function encodeURLParameter(_this__u8e3s4, spaceToPlus) {
|
|
227
|
+
spaceToPlus = spaceToPlus === VOID ? false : spaceToPlus;
|
|
228
|
+
_init_properties_Codecs_kt__fudxxf();
|
|
229
|
+
// Inline function 'kotlin.text.buildString' call
|
|
230
|
+
// Inline function 'kotlin.apply' call
|
|
231
|
+
var this_0 = StringBuilder_init_$Create$();
|
|
232
|
+
var content = encode(Charsets_getInstance().r1d_1.v1d(), _this__u8e3s4);
|
|
233
|
+
forEach_0(content, encodeURLParameter$lambda(this_0, spaceToPlus));
|
|
234
|
+
return this_0.toString();
|
|
235
|
+
}
|
|
236
|
+
function decodeURLPart(_this__u8e3s4, start, end, charset) {
|
|
237
|
+
start = start === VOID ? 0 : start;
|
|
238
|
+
end = end === VOID ? _this__u8e3s4.length : end;
|
|
239
|
+
charset = charset === VOID ? Charsets_getInstance().r1d_1 : charset;
|
|
240
|
+
_init_properties_Codecs_kt__fudxxf();
|
|
241
|
+
return decodeScan(_this__u8e3s4, start, end, false, charset);
|
|
242
|
+
}
|
|
243
|
+
function encodeURLQueryComponent(_this__u8e3s4, encodeFull, spaceToPlus, charset) {
|
|
244
|
+
encodeFull = encodeFull === VOID ? false : encodeFull;
|
|
245
|
+
spaceToPlus = spaceToPlus === VOID ? false : spaceToPlus;
|
|
246
|
+
charset = charset === VOID ? Charsets_getInstance().r1d_1 : charset;
|
|
247
|
+
_init_properties_Codecs_kt__fudxxf();
|
|
248
|
+
// Inline function 'kotlin.text.buildString' call
|
|
249
|
+
// Inline function 'kotlin.apply' call
|
|
250
|
+
var this_0 = StringBuilder_init_$Create$();
|
|
251
|
+
var content = encode(charset.v1d(), _this__u8e3s4);
|
|
252
|
+
forEach_0(content, encodeURLQueryComponent$lambda(spaceToPlus, this_0, encodeFull));
|
|
253
|
+
return this_0.toString();
|
|
254
|
+
}
|
|
255
|
+
function decodeURLQueryComponent(_this__u8e3s4, start, end, plusIsSpace, charset) {
|
|
256
|
+
start = start === VOID ? 0 : start;
|
|
257
|
+
end = end === VOID ? _this__u8e3s4.length : end;
|
|
258
|
+
plusIsSpace = plusIsSpace === VOID ? false : plusIsSpace;
|
|
259
|
+
charset = charset === VOID ? Charsets_getInstance().r1d_1 : charset;
|
|
260
|
+
_init_properties_Codecs_kt__fudxxf();
|
|
261
|
+
return decodeScan(_this__u8e3s4, start, end, plusIsSpace, charset);
|
|
262
|
+
}
|
|
263
|
+
function encodeURLPathPart(_this__u8e3s4) {
|
|
264
|
+
_init_properties_Codecs_kt__fudxxf();
|
|
265
|
+
return encodeURLPath(_this__u8e3s4, true);
|
|
266
|
+
}
|
|
267
|
+
function encodeURLParameterValue(_this__u8e3s4) {
|
|
268
|
+
_init_properties_Codecs_kt__fudxxf();
|
|
269
|
+
return encodeURLParameter(_this__u8e3s4, true);
|
|
270
|
+
}
|
|
271
|
+
function hexDigitToChar(digit) {
|
|
272
|
+
_init_properties_Codecs_kt__fudxxf();
|
|
273
|
+
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);
|
|
274
|
+
}
|
|
275
|
+
function forEach_0(_this__u8e3s4, block) {
|
|
276
|
+
_init_properties_Codecs_kt__fudxxf();
|
|
277
|
+
takeWhile(_this__u8e3s4, forEach$lambda(block));
|
|
278
|
+
}
|
|
279
|
+
function percentEncode(_this__u8e3s4) {
|
|
280
|
+
_init_properties_Codecs_kt__fudxxf();
|
|
281
|
+
var code = _this__u8e3s4 & 255;
|
|
282
|
+
var array = charArray(3);
|
|
283
|
+
array[0] = _Char___init__impl__6a9atx(37);
|
|
284
|
+
array[1] = hexDigitToChar(code >> 4);
|
|
285
|
+
array[2] = hexDigitToChar(code & 15);
|
|
286
|
+
return concatToString(array);
|
|
287
|
+
}
|
|
288
|
+
function decodeScan(_this__u8e3s4, start, end, plusIsSpace, charset) {
|
|
289
|
+
_init_properties_Codecs_kt__fudxxf();
|
|
290
|
+
var inductionVariable = start;
|
|
291
|
+
if (inductionVariable < end)
|
|
292
|
+
do {
|
|
293
|
+
var index = inductionVariable;
|
|
294
|
+
inductionVariable = inductionVariable + 1 | 0;
|
|
295
|
+
var ch = charCodeAt(_this__u8e3s4, index);
|
|
296
|
+
if (ch === _Char___init__impl__6a9atx(37) || (plusIsSpace && ch === _Char___init__impl__6a9atx(43))) {
|
|
297
|
+
return decodeImpl(_this__u8e3s4, start, end, index, plusIsSpace, charset);
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
while (inductionVariable < end);
|
|
301
|
+
return start === 0 && end === _this__u8e3s4.length ? toString(_this__u8e3s4) : substring(_this__u8e3s4, start, end);
|
|
302
|
+
}
|
|
303
|
+
function encodeURLPath(_this__u8e3s4, encodeSlash, encodeEncoded) {
|
|
304
|
+
encodeSlash = encodeSlash === VOID ? false : encodeSlash;
|
|
305
|
+
encodeEncoded = encodeEncoded === VOID ? true : encodeEncoded;
|
|
306
|
+
_init_properties_Codecs_kt__fudxxf();
|
|
307
|
+
// Inline function 'kotlin.text.buildString' call
|
|
308
|
+
// Inline function 'kotlin.apply' call
|
|
309
|
+
var this_0 = StringBuilder_init_$Create$();
|
|
310
|
+
var charset = Charsets_getInstance().r1d_1;
|
|
311
|
+
var index = 0;
|
|
312
|
+
$l$loop_0: while (index < _this__u8e3s4.length) {
|
|
313
|
+
var current = charCodeAt(_this__u8e3s4, index);
|
|
314
|
+
if (!encodeSlash && current === _Char___init__impl__6a9atx(47) || get_URL_ALPHABET_CHARS().k1(new Char(current)) || get_VALID_PATH_PART().k1(new Char(current))) {
|
|
315
|
+
this_0.r6(current);
|
|
316
|
+
index = index + 1 | 0;
|
|
317
|
+
continue $l$loop_0;
|
|
318
|
+
}
|
|
319
|
+
if (!encodeEncoded && current === _Char___init__impl__6a9atx(37) && (index + 2 | 0) < _this__u8e3s4.length && get_HEX_ALPHABET().k1(new Char(charCodeAt(_this__u8e3s4, index + 1 | 0))) && get_HEX_ALPHABET().k1(new Char(charCodeAt(_this__u8e3s4, index + 2 | 0)))) {
|
|
320
|
+
this_0.r6(current);
|
|
321
|
+
this_0.r6(charCodeAt(_this__u8e3s4, index + 1 | 0));
|
|
322
|
+
this_0.r6(charCodeAt(_this__u8e3s4, index + 2 | 0));
|
|
323
|
+
index = index + 3 | 0;
|
|
324
|
+
continue $l$loop_0;
|
|
325
|
+
}
|
|
326
|
+
var symbolSize = isSurrogate(current) ? 2 : 1;
|
|
327
|
+
var tmp = encode(charset.v1d(), _this__u8e3s4, index, index + symbolSize | 0);
|
|
328
|
+
forEach_0(tmp, encodeURLPath$lambda(this_0));
|
|
329
|
+
index = index + symbolSize | 0;
|
|
330
|
+
}
|
|
331
|
+
return this_0.toString();
|
|
332
|
+
}
|
|
333
|
+
function decodeImpl(_this__u8e3s4, start, end, prefixEnd, plusIsSpace, charset) {
|
|
334
|
+
_init_properties_Codecs_kt__fudxxf();
|
|
335
|
+
var length = end - start | 0;
|
|
336
|
+
var sbSize = length > 255 ? length / 3 | 0 : length;
|
|
337
|
+
var sb = StringBuilder_init_$Create$_0(sbSize);
|
|
338
|
+
if (prefixEnd > start) {
|
|
339
|
+
sb.qa(_this__u8e3s4, start, prefixEnd);
|
|
340
|
+
}
|
|
341
|
+
var index = prefixEnd;
|
|
342
|
+
var bytes = null;
|
|
343
|
+
while (index < end) {
|
|
344
|
+
var c = charSequenceGet(_this__u8e3s4, index);
|
|
345
|
+
if (plusIsSpace && c === _Char___init__impl__6a9atx(43)) {
|
|
346
|
+
sb.r6(_Char___init__impl__6a9atx(32));
|
|
347
|
+
index = index + 1 | 0;
|
|
348
|
+
} else if (c === _Char___init__impl__6a9atx(37)) {
|
|
349
|
+
if (bytes == null) {
|
|
350
|
+
bytes = new Int8Array((end - index | 0) / 3 | 0);
|
|
351
|
+
}
|
|
352
|
+
var count = 0;
|
|
353
|
+
while (index < end && charSequenceGet(_this__u8e3s4, index) === _Char___init__impl__6a9atx(37)) {
|
|
354
|
+
if ((index + 2 | 0) >= end) {
|
|
355
|
+
// Inline function 'kotlin.text.substring' call
|
|
356
|
+
var startIndex = index;
|
|
357
|
+
var endIndex = charSequenceLength(_this__u8e3s4);
|
|
358
|
+
var tmp$ret$0 = toString(charSequenceSubSequence(_this__u8e3s4, startIndex, endIndex));
|
|
359
|
+
throw new URLDecodeException('Incomplete trailing HEX escape: ' + tmp$ret$0 + ', in ' + toString(_this__u8e3s4) + ' at ' + index);
|
|
360
|
+
}
|
|
361
|
+
var digit1 = charToHexDigit(charSequenceGet(_this__u8e3s4, index + 1 | 0));
|
|
362
|
+
var digit2 = charToHexDigit(charSequenceGet(_this__u8e3s4, index + 2 | 0));
|
|
363
|
+
if (digit1 === -1 || digit2 === -1) {
|
|
364
|
+
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);
|
|
365
|
+
}
|
|
366
|
+
var tmp = bytes;
|
|
367
|
+
var _unary__edvuaz = count;
|
|
368
|
+
count = _unary__edvuaz + 1 | 0;
|
|
369
|
+
tmp[_unary__edvuaz] = toByte(imul(digit1, 16) + digit2 | 0);
|
|
370
|
+
index = index + 3 | 0;
|
|
371
|
+
}
|
|
372
|
+
sb.q6(decodeToString(bytes, 0, 0 + count | 0));
|
|
373
|
+
} else {
|
|
374
|
+
sb.r6(c);
|
|
375
|
+
index = index + 1 | 0;
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
return sb.toString();
|
|
379
|
+
}
|
|
380
|
+
function URLDecodeException(message) {
|
|
381
|
+
Exception_init_$Init$(message, this);
|
|
382
|
+
captureStack(this, URLDecodeException);
|
|
383
|
+
}
|
|
384
|
+
function charToHexDigit(c2) {
|
|
385
|
+
_init_properties_Codecs_kt__fudxxf();
|
|
386
|
+
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;
|
|
387
|
+
}
|
|
388
|
+
function encodeURLParameter$lambda($$this$buildString, $spaceToPlus) {
|
|
389
|
+
return function (it) {
|
|
390
|
+
if (get_URL_ALPHABET().k1(it) || get_SPECIAL_SYMBOLS().k1(it))
|
|
391
|
+
$$this$buildString.r6(numberToChar(it));
|
|
392
|
+
else {
|
|
393
|
+
var tmp;
|
|
394
|
+
if ($spaceToPlus) {
|
|
395
|
+
var tmp_0 = it;
|
|
396
|
+
// Inline function 'kotlin.code' call
|
|
397
|
+
var this_0 = _Char___init__impl__6a9atx(32);
|
|
398
|
+
var tmp$ret$0 = Char__toInt_impl_vasixd(this_0);
|
|
399
|
+
tmp = tmp_0 === toByte(tmp$ret$0);
|
|
400
|
+
} else {
|
|
401
|
+
tmp = false;
|
|
402
|
+
}
|
|
403
|
+
if (tmp)
|
|
404
|
+
$$this$buildString.r6(_Char___init__impl__6a9atx(43));
|
|
405
|
+
else {
|
|
406
|
+
$$this$buildString.q6(percentEncode(it));
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
return Unit_instance;
|
|
410
|
+
};
|
|
411
|
+
}
|
|
412
|
+
function encodeURLQueryComponent$lambda($spaceToPlus, $$this$buildString, $encodeFull) {
|
|
413
|
+
return function (it) {
|
|
414
|
+
var tmp = it;
|
|
415
|
+
// Inline function 'kotlin.code' call
|
|
416
|
+
var this_0 = _Char___init__impl__6a9atx(32);
|
|
417
|
+
var tmp$ret$0 = Char__toInt_impl_vasixd(this_0);
|
|
418
|
+
if (tmp === toByte(tmp$ret$0))
|
|
419
|
+
if ($spaceToPlus)
|
|
420
|
+
$$this$buildString.r6(_Char___init__impl__6a9atx(43));
|
|
421
|
+
else
|
|
422
|
+
$$this$buildString.q6('%20');
|
|
423
|
+
else {
|
|
424
|
+
if (get_URL_ALPHABET().k1(it) || (!$encodeFull && get_URL_PROTOCOL_PART().k1(it)))
|
|
425
|
+
$$this$buildString.r6(numberToChar(it));
|
|
426
|
+
else {
|
|
427
|
+
$$this$buildString.q6(percentEncode(it));
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
return Unit_instance;
|
|
431
|
+
};
|
|
432
|
+
}
|
|
433
|
+
function forEach$lambda($block) {
|
|
434
|
+
return function (buffer) {
|
|
435
|
+
while (canRead(buffer)) {
|
|
436
|
+
$block(buffer.pg());
|
|
437
|
+
}
|
|
438
|
+
return true;
|
|
439
|
+
};
|
|
440
|
+
}
|
|
441
|
+
function encodeURLPath$lambda($$this$buildString) {
|
|
442
|
+
return function (it) {
|
|
443
|
+
$$this$buildString.q6(percentEncode(it));
|
|
444
|
+
return Unit_instance;
|
|
445
|
+
};
|
|
446
|
+
}
|
|
447
|
+
var properties_initialized_Codecs_kt_hkj9s1;
|
|
448
|
+
function _init_properties_Codecs_kt__fudxxf() {
|
|
449
|
+
if (!properties_initialized_Codecs_kt_hkj9s1) {
|
|
450
|
+
properties_initialized_Codecs_kt_hkj9s1 = true;
|
|
451
|
+
// Inline function 'kotlin.collections.map' call
|
|
452
|
+
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)));
|
|
453
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
454
|
+
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
455
|
+
var _iterator__ex2g4s = this_0.i();
|
|
456
|
+
while (_iterator__ex2g4s.j()) {
|
|
457
|
+
var item = _iterator__ex2g4s.k();
|
|
458
|
+
// Inline function 'kotlin.code' call
|
|
459
|
+
var this_1 = item.y_1;
|
|
460
|
+
var tmp$ret$0 = Char__toInt_impl_vasixd(this_1);
|
|
461
|
+
var tmp$ret$1 = toByte(tmp$ret$0);
|
|
462
|
+
destination.g(tmp$ret$1);
|
|
463
|
+
}
|
|
464
|
+
URL_ALPHABET = toSet(destination);
|
|
465
|
+
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))));
|
|
466
|
+
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))));
|
|
467
|
+
// Inline function 'kotlin.collections.map' call
|
|
468
|
+
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))]);
|
|
469
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
470
|
+
var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_2, 10));
|
|
471
|
+
var _iterator__ex2g4s_0 = this_2.i();
|
|
472
|
+
while (_iterator__ex2g4s_0.j()) {
|
|
473
|
+
var item_0 = _iterator__ex2g4s_0.k();
|
|
474
|
+
// Inline function 'kotlin.code' call
|
|
475
|
+
var this_3 = item_0.y_1;
|
|
476
|
+
var tmp$ret$0_0 = Char__toInt_impl_vasixd(this_3);
|
|
477
|
+
var tmp$ret$1_0 = toByte(tmp$ret$0_0);
|
|
478
|
+
destination_0.g(tmp$ret$1_0);
|
|
479
|
+
}
|
|
480
|
+
URL_PROTOCOL_PART = destination_0;
|
|
481
|
+
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))]);
|
|
482
|
+
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))]));
|
|
483
|
+
// Inline function 'kotlin.collections.map' call
|
|
484
|
+
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))]);
|
|
485
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
486
|
+
var destination_1 = ArrayList_init_$Create$(collectionSizeOrDefault(this_4, 10));
|
|
487
|
+
var _iterator__ex2g4s_1 = this_4.i();
|
|
488
|
+
while (_iterator__ex2g4s_1.j()) {
|
|
489
|
+
var item_1 = _iterator__ex2g4s_1.k();
|
|
490
|
+
// Inline function 'kotlin.code' call
|
|
491
|
+
var this_5 = item_1.y_1;
|
|
492
|
+
var tmp$ret$0_1 = Char__toInt_impl_vasixd(this_5);
|
|
493
|
+
var tmp$ret$1_1 = toByte(tmp$ret$0_1);
|
|
494
|
+
destination_1.g(tmp$ret$1_1);
|
|
495
|
+
}
|
|
496
|
+
SPECIAL_SYMBOLS = destination_1;
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
function ContentType_init_$Init$(contentType, contentSubtype, parameters, $this) {
|
|
500
|
+
parameters = parameters === VOID ? emptyList() : parameters;
|
|
501
|
+
ContentType.call($this, contentType, contentSubtype, contentType + '/' + contentSubtype, parameters);
|
|
502
|
+
return $this;
|
|
503
|
+
}
|
|
504
|
+
function ContentType_init_$Create$(contentType, contentSubtype, parameters) {
|
|
505
|
+
return ContentType_init_$Init$(contentType, contentSubtype, parameters, objectCreate(protoOf(ContentType)));
|
|
506
|
+
}
|
|
507
|
+
function hasParameter($this, name, value) {
|
|
508
|
+
var tmp;
|
|
509
|
+
switch ($this.h1n_1.n()) {
|
|
510
|
+
case 0:
|
|
511
|
+
tmp = false;
|
|
512
|
+
break;
|
|
513
|
+
case 1:
|
|
514
|
+
// Inline function 'kotlin.let' call
|
|
515
|
+
|
|
516
|
+
var it = $this.h1n_1.m(0);
|
|
517
|
+
tmp = (equals(it.i1n_1, name, true) && equals(it.j1n_1, value, true));
|
|
518
|
+
break;
|
|
519
|
+
default:
|
|
520
|
+
var tmp0 = $this.h1n_1;
|
|
521
|
+
var tmp$ret$2;
|
|
522
|
+
$l$block_0: {
|
|
523
|
+
// Inline function 'kotlin.collections.any' call
|
|
524
|
+
var tmp_0;
|
|
525
|
+
if (isInterface(tmp0, Collection)) {
|
|
526
|
+
tmp_0 = tmp0.l();
|
|
527
|
+
} else {
|
|
528
|
+
tmp_0 = false;
|
|
529
|
+
}
|
|
530
|
+
if (tmp_0) {
|
|
531
|
+
tmp$ret$2 = false;
|
|
532
|
+
break $l$block_0;
|
|
533
|
+
}
|
|
534
|
+
var _iterator__ex2g4s = tmp0.i();
|
|
535
|
+
while (_iterator__ex2g4s.j()) {
|
|
536
|
+
var element = _iterator__ex2g4s.k();
|
|
537
|
+
if (equals(element.i1n_1, name, true) && equals(element.j1n_1, value, true)) {
|
|
538
|
+
tmp$ret$2 = true;
|
|
539
|
+
break $l$block_0;
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
tmp$ret$2 = false;
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
tmp = tmp$ret$2;
|
|
546
|
+
break;
|
|
547
|
+
}
|
|
548
|
+
return tmp;
|
|
549
|
+
}
|
|
550
|
+
function Companion() {
|
|
551
|
+
Companion_instance = this;
|
|
552
|
+
this.l1n_1 = ContentType_init_$Create$('*', '*');
|
|
553
|
+
}
|
|
554
|
+
protoOf(Companion).m1n = function (value) {
|
|
555
|
+
if (isBlank(value))
|
|
556
|
+
return this.l1n_1;
|
|
557
|
+
// Inline function 'io.ktor.http.Companion.parse' call
|
|
558
|
+
var headerValue = last(parseHeaderValue(value));
|
|
559
|
+
var tmp0 = headerValue.n1n_1;
|
|
560
|
+
var parameters = headerValue.o1n_1;
|
|
561
|
+
var slash = indexOf(tmp0, _Char___init__impl__6a9atx(47));
|
|
562
|
+
if (slash === -1) {
|
|
563
|
+
// Inline function 'kotlin.text.trim' call
|
|
564
|
+
if (toString(trim(isCharSequence(tmp0) ? tmp0 : THROW_CCE())) === '*')
|
|
565
|
+
return Companion_getInstance().l1n_1;
|
|
566
|
+
throw new BadContentTypeFormatException(value);
|
|
567
|
+
}
|
|
568
|
+
// Inline function 'kotlin.text.trim' call
|
|
569
|
+
var this_0 = substring(tmp0, 0, slash);
|
|
570
|
+
var type = toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE()));
|
|
571
|
+
// Inline function 'kotlin.text.isEmpty' call
|
|
572
|
+
if (charSequenceLength(type) === 0) {
|
|
573
|
+
throw new BadContentTypeFormatException(value);
|
|
574
|
+
}
|
|
575
|
+
// Inline function 'kotlin.text.trim' call
|
|
576
|
+
var this_1 = substring_0(tmp0, slash + 1 | 0);
|
|
577
|
+
var subtype = toString(trim(isCharSequence(this_1) ? this_1 : THROW_CCE()));
|
|
578
|
+
if (contains(type, _Char___init__impl__6a9atx(32)) || contains(subtype, _Char___init__impl__6a9atx(32))) {
|
|
579
|
+
throw new BadContentTypeFormatException(value);
|
|
580
|
+
}
|
|
581
|
+
var tmp;
|
|
582
|
+
// Inline function 'kotlin.text.isEmpty' call
|
|
583
|
+
if (charSequenceLength(subtype) === 0) {
|
|
584
|
+
tmp = true;
|
|
585
|
+
} else {
|
|
586
|
+
tmp = contains(subtype, _Char___init__impl__6a9atx(47));
|
|
587
|
+
}
|
|
588
|
+
if (tmp) {
|
|
589
|
+
throw new BadContentTypeFormatException(value);
|
|
590
|
+
}
|
|
591
|
+
return ContentType_init_$Create$(type, subtype, parameters);
|
|
592
|
+
};
|
|
593
|
+
var Companion_instance;
|
|
594
|
+
function Companion_getInstance() {
|
|
595
|
+
if (Companion_instance == null)
|
|
596
|
+
new Companion();
|
|
597
|
+
return Companion_instance;
|
|
598
|
+
}
|
|
599
|
+
function Application() {
|
|
600
|
+
Application_instance = this;
|
|
601
|
+
this.q1n_1 = 'application';
|
|
602
|
+
this.r1n_1 = ContentType_init_$Create$('application', '*');
|
|
603
|
+
this.s1n_1 = ContentType_init_$Create$('application', 'atom+xml');
|
|
604
|
+
this.t1n_1 = ContentType_init_$Create$('application', 'cbor');
|
|
605
|
+
this.u1n_1 = ContentType_init_$Create$('application', 'json');
|
|
606
|
+
this.v1n_1 = ContentType_init_$Create$('application', 'hal+json');
|
|
607
|
+
this.w1n_1 = ContentType_init_$Create$('application', 'javascript');
|
|
608
|
+
this.x1n_1 = ContentType_init_$Create$('application', 'octet-stream');
|
|
609
|
+
this.y1n_1 = ContentType_init_$Create$('application', 'rss+xml');
|
|
610
|
+
this.z1n_1 = ContentType_init_$Create$('application', 'soap+xml');
|
|
611
|
+
this.a1o_1 = ContentType_init_$Create$('application', 'xml');
|
|
612
|
+
this.b1o_1 = ContentType_init_$Create$('application', 'xml-dtd');
|
|
613
|
+
this.c1o_1 = ContentType_init_$Create$('application', 'yaml');
|
|
614
|
+
this.d1o_1 = ContentType_init_$Create$('application', 'zip');
|
|
615
|
+
this.e1o_1 = ContentType_init_$Create$('application', 'gzip');
|
|
616
|
+
this.f1o_1 = ContentType_init_$Create$('application', 'x-www-form-urlencoded');
|
|
617
|
+
this.g1o_1 = ContentType_init_$Create$('application', 'pdf');
|
|
618
|
+
this.h1o_1 = ContentType_init_$Create$('application', 'vnd.openxmlformats-officedocument.spreadsheetml.sheet');
|
|
619
|
+
this.i1o_1 = ContentType_init_$Create$('application', 'vnd.openxmlformats-officedocument.wordprocessingml.document');
|
|
620
|
+
this.j1o_1 = ContentType_init_$Create$('application', 'vnd.openxmlformats-officedocument.presentationml.presentation');
|
|
621
|
+
this.k1o_1 = ContentType_init_$Create$('application', 'protobuf');
|
|
622
|
+
this.l1o_1 = ContentType_init_$Create$('application', 'wasm');
|
|
623
|
+
this.m1o_1 = ContentType_init_$Create$('application', 'problem+json');
|
|
624
|
+
this.n1o_1 = ContentType_init_$Create$('application', 'problem+xml');
|
|
625
|
+
}
|
|
626
|
+
var Application_instance;
|
|
627
|
+
function Application_getInstance() {
|
|
628
|
+
if (Application_instance == null)
|
|
629
|
+
new Application();
|
|
630
|
+
return Application_instance;
|
|
631
|
+
}
|
|
632
|
+
function MultiPart() {
|
|
633
|
+
MultiPart_instance = this;
|
|
634
|
+
this.o1o_1 = 'multipart';
|
|
635
|
+
this.p1o_1 = ContentType_init_$Create$('multipart', '*');
|
|
636
|
+
this.q1o_1 = ContentType_init_$Create$('multipart', 'mixed');
|
|
637
|
+
this.r1o_1 = ContentType_init_$Create$('multipart', 'alternative');
|
|
638
|
+
this.s1o_1 = ContentType_init_$Create$('multipart', 'related');
|
|
639
|
+
this.t1o_1 = ContentType_init_$Create$('multipart', 'form-data');
|
|
640
|
+
this.u1o_1 = ContentType_init_$Create$('multipart', 'signed');
|
|
641
|
+
this.v1o_1 = ContentType_init_$Create$('multipart', 'encrypted');
|
|
642
|
+
this.w1o_1 = ContentType_init_$Create$('multipart', 'byteranges');
|
|
643
|
+
}
|
|
644
|
+
protoOf(MultiPart).x1o = function (contentType) {
|
|
645
|
+
return startsWith(contentType, 'multipart/', true);
|
|
646
|
+
};
|
|
647
|
+
var MultiPart_instance;
|
|
648
|
+
function MultiPart_getInstance() {
|
|
649
|
+
if (MultiPart_instance == null)
|
|
650
|
+
new MultiPart();
|
|
651
|
+
return MultiPart_instance;
|
|
652
|
+
}
|
|
653
|
+
function Text() {
|
|
654
|
+
Text_instance = this;
|
|
655
|
+
this.y1o_1 = 'text';
|
|
656
|
+
this.z1o_1 = ContentType_init_$Create$('text', '*');
|
|
657
|
+
this.a1p_1 = ContentType_init_$Create$('text', 'plain');
|
|
658
|
+
this.b1p_1 = ContentType_init_$Create$('text', 'css');
|
|
659
|
+
this.c1p_1 = ContentType_init_$Create$('text', 'csv');
|
|
660
|
+
this.d1p_1 = ContentType_init_$Create$('text', 'html');
|
|
661
|
+
this.e1p_1 = ContentType_init_$Create$('text', 'javascript');
|
|
662
|
+
this.f1p_1 = ContentType_init_$Create$('text', 'vcard');
|
|
663
|
+
this.g1p_1 = ContentType_init_$Create$('text', 'xml');
|
|
664
|
+
this.h1p_1 = ContentType_init_$Create$('text', 'event-stream');
|
|
665
|
+
}
|
|
666
|
+
var Text_instance;
|
|
667
|
+
function Text_getInstance() {
|
|
668
|
+
if (Text_instance == null)
|
|
669
|
+
new Text();
|
|
670
|
+
return Text_instance;
|
|
671
|
+
}
|
|
672
|
+
function ContentType(contentType, contentSubtype, existingContent, parameters) {
|
|
673
|
+
Companion_getInstance();
|
|
674
|
+
parameters = parameters === VOID ? emptyList() : parameters;
|
|
675
|
+
HeaderValueWithParameters.call(this, existingContent, parameters);
|
|
676
|
+
this.k1p_1 = contentType;
|
|
677
|
+
this.l1p_1 = contentSubtype;
|
|
678
|
+
}
|
|
679
|
+
protoOf(ContentType).m1p = function (name, value) {
|
|
680
|
+
if (hasParameter(this, name, value))
|
|
681
|
+
return this;
|
|
682
|
+
return new ContentType(this.k1p_1, this.l1p_1, this.g1n_1, plus_2(this.h1n_1, HeaderValueParam_init_$Create$(name, value)));
|
|
683
|
+
};
|
|
684
|
+
protoOf(ContentType).n1p = function (pattern) {
|
|
685
|
+
if (!(pattern.k1p_1 === '*') && !equals(pattern.k1p_1, this.k1p_1, true)) {
|
|
686
|
+
return false;
|
|
687
|
+
}
|
|
688
|
+
if (!(pattern.l1p_1 === '*') && !equals(pattern.l1p_1, this.l1p_1, true)) {
|
|
689
|
+
return false;
|
|
690
|
+
}
|
|
691
|
+
var _iterator__ex2g4s = pattern.h1n_1.i();
|
|
692
|
+
while (_iterator__ex2g4s.j()) {
|
|
693
|
+
var _destruct__k2r9zo = _iterator__ex2g4s.k();
|
|
694
|
+
var patternName = _destruct__k2r9zo.qc();
|
|
695
|
+
var patternValue = _destruct__k2r9zo.rc();
|
|
696
|
+
var tmp;
|
|
697
|
+
if (patternName === '*') {
|
|
698
|
+
var tmp_0;
|
|
699
|
+
if (patternValue === '*') {
|
|
700
|
+
tmp_0 = true;
|
|
701
|
+
} else {
|
|
702
|
+
var tmp0 = this.h1n_1;
|
|
703
|
+
var tmp$ret$0;
|
|
704
|
+
$l$block_0: {
|
|
705
|
+
// Inline function 'kotlin.collections.any' call
|
|
706
|
+
var tmp_1;
|
|
707
|
+
if (isInterface(tmp0, Collection)) {
|
|
708
|
+
tmp_1 = tmp0.l();
|
|
709
|
+
} else {
|
|
710
|
+
tmp_1 = false;
|
|
711
|
+
}
|
|
712
|
+
if (tmp_1) {
|
|
713
|
+
tmp$ret$0 = false;
|
|
714
|
+
break $l$block_0;
|
|
715
|
+
}
|
|
716
|
+
var _iterator__ex2g4s_0 = tmp0.i();
|
|
717
|
+
while (_iterator__ex2g4s_0.j()) {
|
|
718
|
+
var element = _iterator__ex2g4s_0.k();
|
|
719
|
+
if (equals(element.j1n_1, patternValue, true)) {
|
|
720
|
+
tmp$ret$0 = true;
|
|
721
|
+
break $l$block_0;
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
tmp$ret$0 = false;
|
|
725
|
+
}
|
|
726
|
+
tmp_0 = tmp$ret$0;
|
|
727
|
+
}
|
|
728
|
+
tmp = tmp_0;
|
|
729
|
+
} else {
|
|
730
|
+
var value = this.o1p(patternName);
|
|
731
|
+
tmp = patternValue === '*' ? !(value == null) : equals(value, patternValue, true);
|
|
732
|
+
}
|
|
733
|
+
var matches = tmp;
|
|
734
|
+
if (!matches) {
|
|
735
|
+
return false;
|
|
736
|
+
}
|
|
737
|
+
}
|
|
738
|
+
return true;
|
|
739
|
+
};
|
|
740
|
+
protoOf(ContentType).equals = function (other) {
|
|
741
|
+
var tmp;
|
|
742
|
+
var tmp_0;
|
|
743
|
+
var tmp_1;
|
|
744
|
+
if (other instanceof ContentType) {
|
|
745
|
+
tmp_1 = equals(this.k1p_1, other.k1p_1, true);
|
|
746
|
+
} else {
|
|
747
|
+
tmp_1 = false;
|
|
748
|
+
}
|
|
749
|
+
if (tmp_1) {
|
|
750
|
+
tmp_0 = equals(this.l1p_1, other.l1p_1, true);
|
|
751
|
+
} else {
|
|
752
|
+
tmp_0 = false;
|
|
753
|
+
}
|
|
754
|
+
if (tmp_0) {
|
|
755
|
+
tmp = equals_0(this.h1n_1, other.h1n_1);
|
|
756
|
+
} else {
|
|
757
|
+
tmp = false;
|
|
758
|
+
}
|
|
759
|
+
return tmp;
|
|
760
|
+
};
|
|
761
|
+
protoOf(ContentType).hashCode = function () {
|
|
762
|
+
// Inline function 'kotlin.text.lowercase' call
|
|
763
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
764
|
+
var tmp$ret$1 = this.k1p_1.toLowerCase();
|
|
765
|
+
var result = getStringHashCode(tmp$ret$1);
|
|
766
|
+
var tmp = result;
|
|
767
|
+
var tmp_0 = imul(31, result);
|
|
768
|
+
// Inline function 'kotlin.text.lowercase' call
|
|
769
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
770
|
+
var tmp$ret$3 = this.l1p_1.toLowerCase();
|
|
771
|
+
result = tmp + (tmp_0 + getStringHashCode(tmp$ret$3) | 0) | 0;
|
|
772
|
+
result = result + imul(31, hashCode(this.h1n_1)) | 0;
|
|
773
|
+
return result;
|
|
774
|
+
};
|
|
775
|
+
function charset(_this__u8e3s4) {
|
|
776
|
+
var tmp0_safe_receiver = _this__u8e3s4.o1p('charset');
|
|
777
|
+
var tmp;
|
|
778
|
+
if (tmp0_safe_receiver == null) {
|
|
779
|
+
tmp = null;
|
|
780
|
+
} else {
|
|
781
|
+
// Inline function 'kotlin.let' call
|
|
782
|
+
var tmp_0;
|
|
783
|
+
try {
|
|
784
|
+
tmp_0 = forName(Charsets_getInstance(), tmp0_safe_receiver);
|
|
785
|
+
} catch ($p) {
|
|
786
|
+
var tmp_1;
|
|
787
|
+
if ($p instanceof IllegalArgumentException) {
|
|
788
|
+
var exception = $p;
|
|
789
|
+
tmp_1 = null;
|
|
790
|
+
} else {
|
|
791
|
+
throw $p;
|
|
792
|
+
}
|
|
793
|
+
tmp_0 = tmp_1;
|
|
794
|
+
}
|
|
795
|
+
tmp = tmp_0;
|
|
796
|
+
}
|
|
797
|
+
return tmp;
|
|
798
|
+
}
|
|
799
|
+
function withCharset(_this__u8e3s4, charset) {
|
|
800
|
+
return _this__u8e3s4.m1p('charset', get_name(charset));
|
|
801
|
+
}
|
|
802
|
+
function BadContentTypeFormatException(value) {
|
|
803
|
+
Exception_init_$Init$('Bad Content-Type format: ' + value, this);
|
|
804
|
+
captureStack(this, BadContentTypeFormatException);
|
|
805
|
+
}
|
|
806
|
+
function get_HeaderFieldValueSeparators() {
|
|
807
|
+
_init_properties_HeaderValueWithParameters_kt__z6luvy();
|
|
808
|
+
return HeaderFieldValueSeparators;
|
|
809
|
+
}
|
|
810
|
+
var HeaderFieldValueSeparators;
|
|
811
|
+
function Companion_0() {
|
|
812
|
+
}
|
|
813
|
+
var Companion_instance_0;
|
|
814
|
+
function Companion_getInstance_0() {
|
|
815
|
+
return Companion_instance_0;
|
|
816
|
+
}
|
|
817
|
+
function HeaderValueWithParameters(content, parameters) {
|
|
818
|
+
parameters = parameters === VOID ? emptyList() : parameters;
|
|
819
|
+
this.g1n_1 = content;
|
|
820
|
+
this.h1n_1 = parameters;
|
|
821
|
+
}
|
|
822
|
+
protoOf(HeaderValueWithParameters).o1p = function (name) {
|
|
823
|
+
var inductionVariable = 0;
|
|
824
|
+
var last = get_lastIndex(this.h1n_1);
|
|
825
|
+
if (inductionVariable <= last)
|
|
826
|
+
do {
|
|
827
|
+
var index = inductionVariable;
|
|
828
|
+
inductionVariable = inductionVariable + 1 | 0;
|
|
829
|
+
var parameter = this.h1n_1.m(index);
|
|
830
|
+
if (equals(parameter.i1n_1, name, true)) {
|
|
831
|
+
return parameter.j1n_1;
|
|
832
|
+
}
|
|
833
|
+
}
|
|
834
|
+
while (!(index === last));
|
|
835
|
+
return null;
|
|
836
|
+
};
|
|
837
|
+
protoOf(HeaderValueWithParameters).toString = function () {
|
|
838
|
+
var tmp;
|
|
839
|
+
if (this.h1n_1.l()) {
|
|
840
|
+
tmp = this.g1n_1;
|
|
841
|
+
} else {
|
|
842
|
+
var tmp_0 = this.g1n_1.length;
|
|
843
|
+
// Inline function 'kotlin.collections.sumOf' call
|
|
844
|
+
var sum = 0;
|
|
845
|
+
var _iterator__ex2g4s = this.h1n_1.i();
|
|
846
|
+
while (_iterator__ex2g4s.j()) {
|
|
847
|
+
var element = _iterator__ex2g4s.k();
|
|
848
|
+
var tmp_1 = sum;
|
|
849
|
+
sum = tmp_1 + ((element.i1n_1.length + element.j1n_1.length | 0) + 3 | 0) | 0;
|
|
850
|
+
}
|
|
851
|
+
var size = tmp_0 + sum | 0;
|
|
852
|
+
// Inline function 'kotlin.apply' call
|
|
853
|
+
var this_0 = StringBuilder_init_$Create$_0(size);
|
|
854
|
+
this_0.q6(this.g1n_1);
|
|
855
|
+
var inductionVariable = 0;
|
|
856
|
+
var last = get_lastIndex(this.h1n_1);
|
|
857
|
+
if (inductionVariable <= last)
|
|
858
|
+
do {
|
|
859
|
+
var index = inductionVariable;
|
|
860
|
+
inductionVariable = inductionVariable + 1 | 0;
|
|
861
|
+
var element_0 = this.h1n_1.m(index);
|
|
862
|
+
this_0.q6('; ');
|
|
863
|
+
this_0.q6(element_0.i1n_1);
|
|
864
|
+
this_0.q6('=');
|
|
865
|
+
// Inline function 'io.ktor.http.escapeIfNeededTo' call
|
|
866
|
+
var this_1 = element_0.j1n_1;
|
|
867
|
+
if (needQuotes(this_1))
|
|
868
|
+
this_0.q6(quote(this_1));
|
|
869
|
+
else
|
|
870
|
+
this_0.q6(this_1);
|
|
871
|
+
}
|
|
872
|
+
while (!(index === last));
|
|
873
|
+
tmp = this_0.toString();
|
|
874
|
+
}
|
|
875
|
+
return tmp;
|
|
876
|
+
};
|
|
877
|
+
function needQuotes(_this__u8e3s4) {
|
|
878
|
+
_init_properties_HeaderValueWithParameters_kt__z6luvy();
|
|
879
|
+
// Inline function 'kotlin.text.isEmpty' call
|
|
880
|
+
if (charSequenceLength(_this__u8e3s4) === 0)
|
|
881
|
+
return true;
|
|
882
|
+
if (isQuoted(_this__u8e3s4))
|
|
883
|
+
return false;
|
|
884
|
+
var inductionVariable = 0;
|
|
885
|
+
var last = _this__u8e3s4.length;
|
|
886
|
+
while (inductionVariable < last) {
|
|
887
|
+
var element = charCodeAt(_this__u8e3s4, inductionVariable);
|
|
888
|
+
inductionVariable = inductionVariable + 1 | 0;
|
|
889
|
+
if (get_HeaderFieldValueSeparators().k1(new Char(element)))
|
|
890
|
+
return true;
|
|
891
|
+
}
|
|
892
|
+
return false;
|
|
893
|
+
}
|
|
894
|
+
function quote(_this__u8e3s4) {
|
|
895
|
+
_init_properties_HeaderValueWithParameters_kt__z6luvy();
|
|
896
|
+
// Inline function 'kotlin.text.buildString' call
|
|
897
|
+
// Inline function 'kotlin.apply' call
|
|
898
|
+
var this_0 = StringBuilder_init_$Create$();
|
|
899
|
+
quoteTo(_this__u8e3s4, this_0);
|
|
900
|
+
return this_0.toString();
|
|
901
|
+
}
|
|
902
|
+
function isQuoted(_this__u8e3s4) {
|
|
903
|
+
_init_properties_HeaderValueWithParameters_kt__z6luvy();
|
|
904
|
+
if (_this__u8e3s4.length < 2) {
|
|
905
|
+
return false;
|
|
906
|
+
}
|
|
907
|
+
if (!(first(_this__u8e3s4) === _Char___init__impl__6a9atx(34)) || !(last_0(_this__u8e3s4) === _Char___init__impl__6a9atx(34))) {
|
|
908
|
+
return false;
|
|
909
|
+
}
|
|
910
|
+
var startIndex = 1;
|
|
911
|
+
$l$loop: do {
|
|
912
|
+
var index = indexOf(_this__u8e3s4, _Char___init__impl__6a9atx(34), startIndex);
|
|
913
|
+
if (index === get_lastIndex_0(_this__u8e3s4)) {
|
|
914
|
+
break $l$loop;
|
|
915
|
+
}
|
|
916
|
+
var slashesCount = 0;
|
|
917
|
+
var slashIndex = index - 1 | 0;
|
|
918
|
+
while (charCodeAt(_this__u8e3s4, slashIndex) === _Char___init__impl__6a9atx(92)) {
|
|
919
|
+
slashesCount = slashesCount + 1 | 0;
|
|
920
|
+
slashIndex = slashIndex - 1 | 0;
|
|
921
|
+
}
|
|
922
|
+
if ((slashesCount % 2 | 0) === 0) {
|
|
923
|
+
return false;
|
|
924
|
+
}
|
|
925
|
+
startIndex = index + 1 | 0;
|
|
926
|
+
}
|
|
927
|
+
while (startIndex < _this__u8e3s4.length);
|
|
928
|
+
return true;
|
|
929
|
+
}
|
|
930
|
+
function quoteTo(_this__u8e3s4, out) {
|
|
931
|
+
_init_properties_HeaderValueWithParameters_kt__z6luvy();
|
|
932
|
+
out.q6('"');
|
|
933
|
+
var inductionVariable = 0;
|
|
934
|
+
var last = _this__u8e3s4.length;
|
|
935
|
+
while (inductionVariable < last) {
|
|
936
|
+
var element = charCodeAt(_this__u8e3s4, inductionVariable);
|
|
937
|
+
inductionVariable = inductionVariable + 1 | 0;
|
|
938
|
+
var ch = element;
|
|
939
|
+
if (ch === _Char___init__impl__6a9atx(92))
|
|
940
|
+
out.q6('\\\\');
|
|
941
|
+
else if (ch === _Char___init__impl__6a9atx(10))
|
|
942
|
+
out.q6('\\n');
|
|
943
|
+
else if (ch === _Char___init__impl__6a9atx(13))
|
|
944
|
+
out.q6('\\r');
|
|
945
|
+
else if (ch === _Char___init__impl__6a9atx(9))
|
|
946
|
+
out.q6('\\t');
|
|
947
|
+
else if (ch === _Char___init__impl__6a9atx(34))
|
|
948
|
+
out.q6('\\"');
|
|
949
|
+
else
|
|
950
|
+
out.r6(ch);
|
|
951
|
+
}
|
|
952
|
+
out.q6('"');
|
|
953
|
+
}
|
|
954
|
+
var properties_initialized_HeaderValueWithParameters_kt_yu5xg;
|
|
955
|
+
function _init_properties_HeaderValueWithParameters_kt__z6luvy() {
|
|
956
|
+
if (!properties_initialized_HeaderValueWithParameters_kt_yu5xg) {
|
|
957
|
+
properties_initialized_HeaderValueWithParameters_kt_yu5xg = true;
|
|
958
|
+
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))]);
|
|
959
|
+
}
|
|
960
|
+
}
|
|
961
|
+
function Companion_1() {
|
|
962
|
+
Companion_instance_1 = this;
|
|
963
|
+
this.p1p_1 = EmptyHeaders_instance;
|
|
964
|
+
}
|
|
965
|
+
var Companion_instance_1;
|
|
966
|
+
function Companion_getInstance_1() {
|
|
967
|
+
if (Companion_instance_1 == null)
|
|
968
|
+
new Companion_1();
|
|
969
|
+
return Companion_instance_1;
|
|
970
|
+
}
|
|
971
|
+
function HeadersBuilder(size) {
|
|
972
|
+
size = size === VOID ? 8 : size;
|
|
973
|
+
StringValuesBuilderImpl.call(this, true, size);
|
|
974
|
+
}
|
|
975
|
+
protoOf(HeadersBuilder).s1p = function () {
|
|
976
|
+
return new HeadersImpl(this.f1j_1);
|
|
977
|
+
};
|
|
978
|
+
protoOf(HeadersBuilder).g1j = function (name) {
|
|
979
|
+
protoOf(StringValuesBuilderImpl).g1j.call(this, name);
|
|
980
|
+
HttpHeaders_getInstance().q1t(name);
|
|
981
|
+
};
|
|
982
|
+
protoOf(HeadersBuilder).i1j = function (value) {
|
|
983
|
+
protoOf(StringValuesBuilderImpl).i1j.call(this, value);
|
|
984
|
+
HttpHeaders_getInstance().r1t(value);
|
|
985
|
+
};
|
|
986
|
+
function headersOf(name, value) {
|
|
987
|
+
return new HeadersSingleImpl(name, listOf_0(value));
|
|
988
|
+
}
|
|
989
|
+
function EmptyHeaders() {
|
|
990
|
+
}
|
|
991
|
+
protoOf(EmptyHeaders).a1j = function () {
|
|
992
|
+
return true;
|
|
993
|
+
};
|
|
994
|
+
protoOf(EmptyHeaders).b1j = function (name) {
|
|
995
|
+
return null;
|
|
996
|
+
};
|
|
997
|
+
protoOf(EmptyHeaders).c1j = function () {
|
|
998
|
+
return emptySet();
|
|
999
|
+
};
|
|
1000
|
+
protoOf(EmptyHeaders).y1i = function () {
|
|
1001
|
+
return emptySet();
|
|
1002
|
+
};
|
|
1003
|
+
protoOf(EmptyHeaders).l = function () {
|
|
1004
|
+
return true;
|
|
1005
|
+
};
|
|
1006
|
+
protoOf(EmptyHeaders).toString = function () {
|
|
1007
|
+
return 'Headers ' + toString(this.y1i());
|
|
1008
|
+
};
|
|
1009
|
+
var EmptyHeaders_instance;
|
|
1010
|
+
function EmptyHeaders_getInstance() {
|
|
1011
|
+
return EmptyHeaders_instance;
|
|
1012
|
+
}
|
|
1013
|
+
function HeadersImpl(values) {
|
|
1014
|
+
values = values === VOID ? emptyMap() : values;
|
|
1015
|
+
StringValuesImpl.call(this, true, values);
|
|
1016
|
+
}
|
|
1017
|
+
protoOf(HeadersImpl).toString = function () {
|
|
1018
|
+
return 'Headers ' + toString(this.y1i());
|
|
1019
|
+
};
|
|
1020
|
+
function HeadersSingleImpl(name, values) {
|
|
1021
|
+
StringValuesSingleImpl.call(this, true, name, values);
|
|
1022
|
+
}
|
|
1023
|
+
protoOf(HeadersSingleImpl).toString = function () {
|
|
1024
|
+
return 'Headers ' + toString(this.y1i());
|
|
1025
|
+
};
|
|
1026
|
+
function HeaderValueParam_init_$Init$(name, value, $this) {
|
|
1027
|
+
HeaderValueParam.call($this, name, value, false);
|
|
1028
|
+
return $this;
|
|
1029
|
+
}
|
|
1030
|
+
function HeaderValueParam_init_$Create$(name, value) {
|
|
1031
|
+
return HeaderValueParam_init_$Init$(name, value, objectCreate(protoOf(HeaderValueParam)));
|
|
1032
|
+
}
|
|
1033
|
+
function HeaderValueParam(name, value, escapeValue) {
|
|
1034
|
+
this.i1n_1 = name;
|
|
1035
|
+
this.j1n_1 = value;
|
|
1036
|
+
this.k1n_1 = escapeValue;
|
|
1037
|
+
}
|
|
1038
|
+
protoOf(HeaderValueParam).equals = function (other) {
|
|
1039
|
+
var tmp;
|
|
1040
|
+
var tmp_0;
|
|
1041
|
+
if (other instanceof HeaderValueParam) {
|
|
1042
|
+
tmp_0 = equals(other.i1n_1, this.i1n_1, true);
|
|
1043
|
+
} else {
|
|
1044
|
+
tmp_0 = false;
|
|
1045
|
+
}
|
|
1046
|
+
if (tmp_0) {
|
|
1047
|
+
tmp = equals(other.j1n_1, this.j1n_1, true);
|
|
1048
|
+
} else {
|
|
1049
|
+
tmp = false;
|
|
1050
|
+
}
|
|
1051
|
+
return tmp;
|
|
1052
|
+
};
|
|
1053
|
+
protoOf(HeaderValueParam).hashCode = function () {
|
|
1054
|
+
// Inline function 'kotlin.text.lowercase' call
|
|
1055
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
1056
|
+
var tmp$ret$1 = this.i1n_1.toLowerCase();
|
|
1057
|
+
var result = getStringHashCode(tmp$ret$1);
|
|
1058
|
+
var tmp = result;
|
|
1059
|
+
var tmp_0 = imul(31, result);
|
|
1060
|
+
// Inline function 'kotlin.text.lowercase' call
|
|
1061
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
1062
|
+
var tmp$ret$3 = this.j1n_1.toLowerCase();
|
|
1063
|
+
result = tmp + (tmp_0 + getStringHashCode(tmp$ret$3) | 0) | 0;
|
|
1064
|
+
return result;
|
|
1065
|
+
};
|
|
1066
|
+
protoOf(HeaderValueParam).qc = function () {
|
|
1067
|
+
return this.i1n_1;
|
|
1068
|
+
};
|
|
1069
|
+
protoOf(HeaderValueParam).rc = function () {
|
|
1070
|
+
return this.j1n_1;
|
|
1071
|
+
};
|
|
1072
|
+
protoOf(HeaderValueParam).toString = function () {
|
|
1073
|
+
return 'HeaderValueParam(name=' + this.i1n_1 + ', value=' + this.j1n_1 + ', escapeValue=' + this.k1n_1 + ')';
|
|
1074
|
+
};
|
|
1075
|
+
function HeaderValue(value, params) {
|
|
1076
|
+
params = params === VOID ? emptyList() : params;
|
|
1077
|
+
this.n1n_1 = value;
|
|
1078
|
+
this.o1n_1 = params;
|
|
1079
|
+
var tmp = this;
|
|
1080
|
+
var tmp0 = this.o1n_1;
|
|
1081
|
+
var tmp$ret$1;
|
|
1082
|
+
$l$block: {
|
|
1083
|
+
// Inline function 'kotlin.collections.firstOrNull' call
|
|
1084
|
+
var _iterator__ex2g4s = tmp0.i();
|
|
1085
|
+
while (_iterator__ex2g4s.j()) {
|
|
1086
|
+
var element = _iterator__ex2g4s.k();
|
|
1087
|
+
if (element.i1n_1 === 'q') {
|
|
1088
|
+
tmp$ret$1 = element;
|
|
1089
|
+
break $l$block;
|
|
1090
|
+
}
|
|
1091
|
+
}
|
|
1092
|
+
tmp$ret$1 = null;
|
|
1093
|
+
}
|
|
1094
|
+
var tmp0_safe_receiver = tmp$ret$1;
|
|
1095
|
+
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.j1n_1;
|
|
1096
|
+
var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : toDoubleOrNull(tmp1_safe_receiver);
|
|
1097
|
+
var tmp_0;
|
|
1098
|
+
if (tmp2_safe_receiver == null) {
|
|
1099
|
+
tmp_0 = null;
|
|
1100
|
+
} else {
|
|
1101
|
+
// Inline function 'kotlin.takeIf' call
|
|
1102
|
+
var tmp_1;
|
|
1103
|
+
if (0.0 <= tmp2_safe_receiver ? tmp2_safe_receiver <= 1.0 : false) {
|
|
1104
|
+
tmp_1 = tmp2_safe_receiver;
|
|
1105
|
+
} else {
|
|
1106
|
+
tmp_1 = null;
|
|
1107
|
+
}
|
|
1108
|
+
tmp_0 = tmp_1;
|
|
1109
|
+
}
|
|
1110
|
+
var tmp3_elvis_lhs = tmp_0;
|
|
1111
|
+
tmp.p1n_1 = tmp3_elvis_lhs == null ? 1.0 : tmp3_elvis_lhs;
|
|
1112
|
+
}
|
|
1113
|
+
protoOf(HeaderValue).toString = function () {
|
|
1114
|
+
return 'HeaderValue(value=' + this.n1n_1 + ', params=' + toString(this.o1n_1) + ')';
|
|
1115
|
+
};
|
|
1116
|
+
protoOf(HeaderValue).hashCode = function () {
|
|
1117
|
+
var result = getStringHashCode(this.n1n_1);
|
|
1118
|
+
result = imul(result, 31) + hashCode(this.o1n_1) | 0;
|
|
1119
|
+
return result;
|
|
1120
|
+
};
|
|
1121
|
+
protoOf(HeaderValue).equals = function (other) {
|
|
1122
|
+
if (this === other)
|
|
1123
|
+
return true;
|
|
1124
|
+
if (!(other instanceof HeaderValue))
|
|
1125
|
+
return false;
|
|
1126
|
+
if (!(this.n1n_1 === other.n1n_1))
|
|
1127
|
+
return false;
|
|
1128
|
+
if (!equals_0(this.o1n_1, other.o1n_1))
|
|
1129
|
+
return false;
|
|
1130
|
+
return true;
|
|
1131
|
+
};
|
|
1132
|
+
function parseHeaderValue(text) {
|
|
1133
|
+
return parseHeaderValue_0(text, false);
|
|
1134
|
+
}
|
|
1135
|
+
function parseHeaderValue_0(text, parametersOnly) {
|
|
1136
|
+
if (text == null) {
|
|
1137
|
+
return emptyList();
|
|
1138
|
+
}
|
|
1139
|
+
var position = 0;
|
|
1140
|
+
var tmp = LazyThreadSafetyMode_NONE_getInstance();
|
|
1141
|
+
var items = lazy(tmp, parseHeaderValue$lambda);
|
|
1142
|
+
while (position <= get_lastIndex_0(text)) {
|
|
1143
|
+
position = parseHeaderValueItem(text, position, items, parametersOnly);
|
|
1144
|
+
}
|
|
1145
|
+
return valueOrEmpty(items);
|
|
1146
|
+
}
|
|
1147
|
+
function parseHeaderValueItem(text, start, items, parametersOnly) {
|
|
1148
|
+
var position = start;
|
|
1149
|
+
var tmp = LazyThreadSafetyMode_NONE_getInstance();
|
|
1150
|
+
var parameters = lazy(tmp, parseHeaderValueItem$lambda);
|
|
1151
|
+
var valueEnd = parametersOnly ? position : null;
|
|
1152
|
+
while (position <= get_lastIndex_0(text)) {
|
|
1153
|
+
var tmp0_subject = charCodeAt(text, position);
|
|
1154
|
+
if (tmp0_subject === _Char___init__impl__6a9atx(44)) {
|
|
1155
|
+
var tmp_0 = items.u();
|
|
1156
|
+
var tmp1_elvis_lhs = valueEnd;
|
|
1157
|
+
tmp_0.g(new HeaderValue(subtrim(text, start, tmp1_elvis_lhs == null ? position : tmp1_elvis_lhs), valueOrEmpty(parameters)));
|
|
1158
|
+
return position + 1 | 0;
|
|
1159
|
+
} else if (tmp0_subject === _Char___init__impl__6a9atx(59)) {
|
|
1160
|
+
if (valueEnd == null)
|
|
1161
|
+
valueEnd = position;
|
|
1162
|
+
position = parseHeaderValueParameter(text, position + 1 | 0, parameters);
|
|
1163
|
+
} else {
|
|
1164
|
+
var tmp_1;
|
|
1165
|
+
if (parametersOnly) {
|
|
1166
|
+
tmp_1 = parseHeaderValueParameter(text, position, parameters);
|
|
1167
|
+
} else {
|
|
1168
|
+
tmp_1 = position + 1 | 0;
|
|
1169
|
+
}
|
|
1170
|
+
position = tmp_1;
|
|
1171
|
+
}
|
|
1172
|
+
}
|
|
1173
|
+
var tmp_2 = items.u();
|
|
1174
|
+
var tmp2_elvis_lhs = valueEnd;
|
|
1175
|
+
tmp_2.g(new HeaderValue(subtrim(text, start, tmp2_elvis_lhs == null ? position : tmp2_elvis_lhs), valueOrEmpty(parameters)));
|
|
1176
|
+
return position;
|
|
1177
|
+
}
|
|
1178
|
+
function valueOrEmpty(_this__u8e3s4) {
|
|
1179
|
+
return _this__u8e3s4.wf() ? _this__u8e3s4.u() : emptyList();
|
|
1180
|
+
}
|
|
1181
|
+
function subtrim(_this__u8e3s4, start, end) {
|
|
1182
|
+
// Inline function 'kotlin.text.trim' call
|
|
1183
|
+
var this_0 = substring(_this__u8e3s4, start, end);
|
|
1184
|
+
return toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE()));
|
|
1185
|
+
}
|
|
1186
|
+
function parseHeaderValueParameter(text, start, parameters) {
|
|
1187
|
+
var position = start;
|
|
1188
|
+
while (position <= get_lastIndex_0(text)) {
|
|
1189
|
+
var tmp0_subject = charCodeAt(text, position);
|
|
1190
|
+
if (tmp0_subject === _Char___init__impl__6a9atx(61)) {
|
|
1191
|
+
var _destruct__k2r9zo = parseHeaderValueParameterValue(text, position + 1 | 0);
|
|
1192
|
+
var paramEnd = _destruct__k2r9zo.qc();
|
|
1193
|
+
var paramValue = _destruct__k2r9zo.rc();
|
|
1194
|
+
parseHeaderValueParameter$addParam(parameters, text, start, position, paramValue);
|
|
1195
|
+
return paramEnd;
|
|
1196
|
+
} else if (tmp0_subject === _Char___init__impl__6a9atx(59) || tmp0_subject === _Char___init__impl__6a9atx(44)) {
|
|
1197
|
+
parseHeaderValueParameter$addParam(parameters, text, start, position, '');
|
|
1198
|
+
return position;
|
|
1199
|
+
} else {
|
|
1200
|
+
position = position + 1 | 0;
|
|
1201
|
+
}
|
|
1202
|
+
}
|
|
1203
|
+
parseHeaderValueParameter$addParam(parameters, text, start, position, '');
|
|
1204
|
+
return position;
|
|
1205
|
+
}
|
|
1206
|
+
function parseHeaderValueParameterValue(value, start) {
|
|
1207
|
+
if (value.length === start) {
|
|
1208
|
+
return to(start, '');
|
|
1209
|
+
}
|
|
1210
|
+
var position = start;
|
|
1211
|
+
if (charCodeAt(value, start) === _Char___init__impl__6a9atx(34)) {
|
|
1212
|
+
return parseHeaderValueParameterValueQuoted(value, position + 1 | 0);
|
|
1213
|
+
}
|
|
1214
|
+
while (position <= get_lastIndex_0(value)) {
|
|
1215
|
+
var tmp0_subject = charCodeAt(value, position);
|
|
1216
|
+
if (tmp0_subject === _Char___init__impl__6a9atx(59) || tmp0_subject === _Char___init__impl__6a9atx(44))
|
|
1217
|
+
return to(position, subtrim(value, start, position));
|
|
1218
|
+
else {
|
|
1219
|
+
position = position + 1 | 0;
|
|
1220
|
+
}
|
|
1221
|
+
}
|
|
1222
|
+
return to(position, subtrim(value, start, position));
|
|
1223
|
+
}
|
|
1224
|
+
function parseHeaderValueParameterValueQuoted(value, start) {
|
|
1225
|
+
var position = start;
|
|
1226
|
+
var builder = StringBuilder_init_$Create$();
|
|
1227
|
+
loop: while (position <= get_lastIndex_0(value)) {
|
|
1228
|
+
var currentChar = charCodeAt(value, position);
|
|
1229
|
+
if (currentChar === _Char___init__impl__6a9atx(34) && nextIsDelimiterOrEnd(value, position)) {
|
|
1230
|
+
return to(position + 1 | 0, builder.toString());
|
|
1231
|
+
} else if (currentChar === _Char___init__impl__6a9atx(92) && position < (get_lastIndex_0(value) - 2 | 0)) {
|
|
1232
|
+
builder.r6(charCodeAt(value, position + 1 | 0));
|
|
1233
|
+
position = position + 2 | 0;
|
|
1234
|
+
continue loop;
|
|
1235
|
+
}
|
|
1236
|
+
builder.r6(currentChar);
|
|
1237
|
+
position = position + 1 | 0;
|
|
1238
|
+
}
|
|
1239
|
+
var tmp = position;
|
|
1240
|
+
var tmp0 = _Char___init__impl__6a9atx(34);
|
|
1241
|
+
// Inline function 'kotlin.text.plus' call
|
|
1242
|
+
var other = builder.toString();
|
|
1243
|
+
var tmp$ret$0 = toString_0(tmp0) + other;
|
|
1244
|
+
return to(tmp, tmp$ret$0);
|
|
1245
|
+
}
|
|
1246
|
+
function nextIsDelimiterOrEnd(_this__u8e3s4, start) {
|
|
1247
|
+
var position = start + 1 | 0;
|
|
1248
|
+
loop: while (position < _this__u8e3s4.length && charCodeAt(_this__u8e3s4, position) === _Char___init__impl__6a9atx(32)) {
|
|
1249
|
+
position = position + 1 | 0;
|
|
1250
|
+
}
|
|
1251
|
+
return position === _this__u8e3s4.length || charCodeAt(_this__u8e3s4, position) === _Char___init__impl__6a9atx(59) || charCodeAt(_this__u8e3s4, position) === _Char___init__impl__6a9atx(44);
|
|
1252
|
+
}
|
|
1253
|
+
function parseHeaderValueParameter$addParam($parameters, text, start, end, value) {
|
|
1254
|
+
var name = subtrim(text, start, end);
|
|
1255
|
+
// Inline function 'kotlin.text.isEmpty' call
|
|
1256
|
+
if (charSequenceLength(name) === 0) {
|
|
1257
|
+
return Unit_instance;
|
|
1258
|
+
}
|
|
1259
|
+
$parameters.u().g(HeaderValueParam_init_$Create$(name, value));
|
|
1260
|
+
}
|
|
1261
|
+
function parseHeaderValue$lambda() {
|
|
1262
|
+
// Inline function 'kotlin.collections.arrayListOf' call
|
|
1263
|
+
return ArrayList_init_$Create$_0();
|
|
1264
|
+
}
|
|
1265
|
+
function parseHeaderValueItem$lambda() {
|
|
1266
|
+
// Inline function 'kotlin.collections.arrayListOf' call
|
|
1267
|
+
return ArrayList_init_$Create$_0();
|
|
1268
|
+
}
|
|
1269
|
+
function HttpHeaders() {
|
|
1270
|
+
HttpHeaders_instance = this;
|
|
1271
|
+
this.t1p_1 = 'Accept';
|
|
1272
|
+
this.u1p_1 = 'Accept-Charset';
|
|
1273
|
+
this.v1p_1 = 'Accept-Encoding';
|
|
1274
|
+
this.w1p_1 = 'Accept-Language';
|
|
1275
|
+
this.x1p_1 = 'Accept-Ranges';
|
|
1276
|
+
this.y1p_1 = 'Age';
|
|
1277
|
+
this.z1p_1 = 'Allow';
|
|
1278
|
+
this.a1q_1 = 'ALPN';
|
|
1279
|
+
this.b1q_1 = 'Authentication-Info';
|
|
1280
|
+
this.c1q_1 = 'Authorization';
|
|
1281
|
+
this.d1q_1 = 'Cache-Control';
|
|
1282
|
+
this.e1q_1 = 'Connection';
|
|
1283
|
+
this.f1q_1 = 'Content-Disposition';
|
|
1284
|
+
this.g1q_1 = 'Content-Encoding';
|
|
1285
|
+
this.h1q_1 = 'Content-Language';
|
|
1286
|
+
this.i1q_1 = 'Content-Length';
|
|
1287
|
+
this.j1q_1 = 'Content-Location';
|
|
1288
|
+
this.k1q_1 = 'Content-Range';
|
|
1289
|
+
this.l1q_1 = 'Content-Type';
|
|
1290
|
+
this.m1q_1 = 'Cookie';
|
|
1291
|
+
this.n1q_1 = 'DASL';
|
|
1292
|
+
this.o1q_1 = 'Date';
|
|
1293
|
+
this.p1q_1 = 'DAV';
|
|
1294
|
+
this.q1q_1 = 'Depth';
|
|
1295
|
+
this.r1q_1 = 'Destination';
|
|
1296
|
+
this.s1q_1 = 'ETag';
|
|
1297
|
+
this.t1q_1 = 'Expect';
|
|
1298
|
+
this.u1q_1 = 'Expires';
|
|
1299
|
+
this.v1q_1 = 'From';
|
|
1300
|
+
this.w1q_1 = 'Forwarded';
|
|
1301
|
+
this.x1q_1 = 'Host';
|
|
1302
|
+
this.y1q_1 = 'HTTP2-Settings';
|
|
1303
|
+
this.z1q_1 = 'If';
|
|
1304
|
+
this.a1r_1 = 'If-Match';
|
|
1305
|
+
this.b1r_1 = 'If-Modified-Since';
|
|
1306
|
+
this.c1r_1 = 'If-None-Match';
|
|
1307
|
+
this.d1r_1 = 'If-Range';
|
|
1308
|
+
this.e1r_1 = 'If-Schedule-Tag-Match';
|
|
1309
|
+
this.f1r_1 = 'If-Unmodified-Since';
|
|
1310
|
+
this.g1r_1 = 'Last-Modified';
|
|
1311
|
+
this.h1r_1 = 'Location';
|
|
1312
|
+
this.i1r_1 = 'Lock-Token';
|
|
1313
|
+
this.j1r_1 = 'Link';
|
|
1314
|
+
this.k1r_1 = 'Max-Forwards';
|
|
1315
|
+
this.l1r_1 = 'MIME-Version';
|
|
1316
|
+
this.m1r_1 = 'Ordering-Type';
|
|
1317
|
+
this.n1r_1 = 'Origin';
|
|
1318
|
+
this.o1r_1 = 'Overwrite';
|
|
1319
|
+
this.p1r_1 = 'Position';
|
|
1320
|
+
this.q1r_1 = 'Pragma';
|
|
1321
|
+
this.r1r_1 = 'Prefer';
|
|
1322
|
+
this.s1r_1 = 'Preference-Applied';
|
|
1323
|
+
this.t1r_1 = 'Proxy-Authenticate';
|
|
1324
|
+
this.u1r_1 = 'Proxy-Authentication-Info';
|
|
1325
|
+
this.v1r_1 = 'Proxy-Authorization';
|
|
1326
|
+
this.w1r_1 = 'Public-Key-Pins';
|
|
1327
|
+
this.x1r_1 = 'Public-Key-Pins-Report-Only';
|
|
1328
|
+
this.y1r_1 = 'Range';
|
|
1329
|
+
this.z1r_1 = 'Referer';
|
|
1330
|
+
this.a1s_1 = 'Retry-After';
|
|
1331
|
+
this.b1s_1 = 'Schedule-Reply';
|
|
1332
|
+
this.c1s_1 = 'Schedule-Tag';
|
|
1333
|
+
this.d1s_1 = 'Sec-WebSocket-Accept';
|
|
1334
|
+
this.e1s_1 = 'Sec-WebSocket-Extensions';
|
|
1335
|
+
this.f1s_1 = 'Sec-WebSocket-Key';
|
|
1336
|
+
this.g1s_1 = 'Sec-WebSocket-Protocol';
|
|
1337
|
+
this.h1s_1 = 'Sec-WebSocket-Version';
|
|
1338
|
+
this.i1s_1 = 'Server';
|
|
1339
|
+
this.j1s_1 = 'Set-Cookie';
|
|
1340
|
+
this.k1s_1 = 'SLUG';
|
|
1341
|
+
this.l1s_1 = 'Strict-Transport-Security';
|
|
1342
|
+
this.m1s_1 = 'TE';
|
|
1343
|
+
this.n1s_1 = 'Timeout';
|
|
1344
|
+
this.o1s_1 = 'Trailer';
|
|
1345
|
+
this.p1s_1 = 'Transfer-Encoding';
|
|
1346
|
+
this.q1s_1 = 'Upgrade';
|
|
1347
|
+
this.r1s_1 = 'User-Agent';
|
|
1348
|
+
this.s1s_1 = 'Vary';
|
|
1349
|
+
this.t1s_1 = 'Via';
|
|
1350
|
+
this.u1s_1 = 'Warning';
|
|
1351
|
+
this.v1s_1 = 'WWW-Authenticate';
|
|
1352
|
+
this.w1s_1 = 'Access-Control-Allow-Origin';
|
|
1353
|
+
this.x1s_1 = 'Access-Control-Allow-Methods';
|
|
1354
|
+
this.y1s_1 = 'Access-Control-Allow-Credentials';
|
|
1355
|
+
this.z1s_1 = 'Access-Control-Allow-Headers';
|
|
1356
|
+
this.a1t_1 = 'Access-Control-Request-Method';
|
|
1357
|
+
this.b1t_1 = 'Access-Control-Request-Headers';
|
|
1358
|
+
this.c1t_1 = 'Access-Control-Expose-Headers';
|
|
1359
|
+
this.d1t_1 = 'Access-Control-Max-Age';
|
|
1360
|
+
this.e1t_1 = 'X-Http-Method-Override';
|
|
1361
|
+
this.f1t_1 = 'X-Forwarded-Host';
|
|
1362
|
+
this.g1t_1 = 'X-Forwarded-Server';
|
|
1363
|
+
this.h1t_1 = 'X-Forwarded-Proto';
|
|
1364
|
+
this.i1t_1 = 'X-Forwarded-For';
|
|
1365
|
+
this.j1t_1 = 'X-Forwarded-Port';
|
|
1366
|
+
this.k1t_1 = 'X-Request-ID';
|
|
1367
|
+
this.l1t_1 = 'X-Correlation-ID';
|
|
1368
|
+
this.m1t_1 = 'X-Total-Count';
|
|
1369
|
+
this.n1t_1 = 'Last-Event-ID';
|
|
1370
|
+
var tmp = this;
|
|
1371
|
+
// Inline function 'kotlin.arrayOf' call
|
|
1372
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
1373
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
1374
|
+
tmp.o1t_1 = [this.p1s_1, this.q1s_1];
|
|
1375
|
+
this.p1t_1 = asList(this.o1t_1);
|
|
1376
|
+
}
|
|
1377
|
+
protoOf(HttpHeaders).q1t = function (name) {
|
|
1378
|
+
// Inline function 'kotlin.text.forEachIndexed' call
|
|
1379
|
+
var index = 0;
|
|
1380
|
+
var inductionVariable = 0;
|
|
1381
|
+
while (inductionVariable < charSequenceLength(name)) {
|
|
1382
|
+
var item = charSequenceGet(name, inductionVariable);
|
|
1383
|
+
inductionVariable = inductionVariable + 1 | 0;
|
|
1384
|
+
var _unary__edvuaz = index;
|
|
1385
|
+
index = _unary__edvuaz + 1 | 0;
|
|
1386
|
+
if (Char__compareTo_impl_ypi4mb(item, _Char___init__impl__6a9atx(32)) <= 0 || isDelimiter(item)) {
|
|
1387
|
+
throw new IllegalHeaderNameException(name, _unary__edvuaz);
|
|
1388
|
+
}
|
|
1389
|
+
}
|
|
1390
|
+
};
|
|
1391
|
+
protoOf(HttpHeaders).r1t = function (value) {
|
|
1392
|
+
// Inline function 'kotlin.text.forEachIndexed' call
|
|
1393
|
+
var index = 0;
|
|
1394
|
+
var inductionVariable = 0;
|
|
1395
|
+
while (inductionVariable < charSequenceLength(value)) {
|
|
1396
|
+
var item = charSequenceGet(value, inductionVariable);
|
|
1397
|
+
inductionVariable = inductionVariable + 1 | 0;
|
|
1398
|
+
var _unary__edvuaz = index;
|
|
1399
|
+
index = _unary__edvuaz + 1 | 0;
|
|
1400
|
+
if (Char__compareTo_impl_ypi4mb(item, _Char___init__impl__6a9atx(32)) < 0 && !(item === _Char___init__impl__6a9atx(9))) {
|
|
1401
|
+
throw new IllegalHeaderValueException(value, _unary__edvuaz);
|
|
1402
|
+
}
|
|
1403
|
+
}
|
|
1404
|
+
};
|
|
1405
|
+
var HttpHeaders_instance;
|
|
1406
|
+
function HttpHeaders_getInstance() {
|
|
1407
|
+
if (HttpHeaders_instance == null)
|
|
1408
|
+
new HttpHeaders();
|
|
1409
|
+
return HttpHeaders_instance;
|
|
1410
|
+
}
|
|
1411
|
+
function UnsafeHeaderException(header) {
|
|
1412
|
+
IllegalArgumentException_init_$Init$('Header(s) ' + header + ' are controlled by the engine and ' + 'cannot be set explicitly', this);
|
|
1413
|
+
captureStack(this, UnsafeHeaderException);
|
|
1414
|
+
}
|
|
1415
|
+
function isDelimiter(ch) {
|
|
1416
|
+
return contains('"(),/:;<=>?@[\\]{}', ch);
|
|
1417
|
+
}
|
|
1418
|
+
function IllegalHeaderNameException(headerName, position) {
|
|
1419
|
+
var tmp = "Header name '" + headerName + "' contains illegal character '" + toString_0(charCodeAt(headerName, position)) + "'";
|
|
1420
|
+
// Inline function 'kotlin.code' call
|
|
1421
|
+
var this_0 = charCodeAt(headerName, position);
|
|
1422
|
+
var tmp$ret$0 = Char__toInt_impl_vasixd(this_0);
|
|
1423
|
+
IllegalArgumentException_init_$Init$(tmp + (' (code ' + (tmp$ret$0 & 255) + ')'), this);
|
|
1424
|
+
captureStack(this, IllegalHeaderNameException);
|
|
1425
|
+
this.s1t_1 = headerName;
|
|
1426
|
+
this.t1t_1 = position;
|
|
1427
|
+
}
|
|
1428
|
+
function IllegalHeaderValueException(headerValue, position) {
|
|
1429
|
+
var tmp = "Header value '" + headerValue + "' contains illegal character '" + toString_0(charCodeAt(headerValue, position)) + "'";
|
|
1430
|
+
// Inline function 'kotlin.code' call
|
|
1431
|
+
var this_0 = charCodeAt(headerValue, position);
|
|
1432
|
+
var tmp$ret$0 = Char__toInt_impl_vasixd(this_0);
|
|
1433
|
+
IllegalArgumentException_init_$Init$(tmp + (' (code ' + (tmp$ret$0 & 255) + ')'), this);
|
|
1434
|
+
captureStack(this, IllegalHeaderValueException);
|
|
1435
|
+
this.u1t_1 = headerValue;
|
|
1436
|
+
this.v1t_1 = position;
|
|
1437
|
+
}
|
|
1438
|
+
function contentLength(_this__u8e3s4) {
|
|
1439
|
+
var tmp0_safe_receiver = _this__u8e3s4.w1t().v1h(HttpHeaders_getInstance().i1q_1);
|
|
1440
|
+
return tmp0_safe_receiver == null ? null : toLongOrNull(tmp0_safe_receiver);
|
|
1441
|
+
}
|
|
1442
|
+
function charset_0(_this__u8e3s4) {
|
|
1443
|
+
var tmp0_safe_receiver = contentType_0(_this__u8e3s4);
|
|
1444
|
+
return tmp0_safe_receiver == null ? null : charset(tmp0_safe_receiver);
|
|
1445
|
+
}
|
|
1446
|
+
function contentType(_this__u8e3s4) {
|
|
1447
|
+
var tmp0_safe_receiver = _this__u8e3s4.w1t().v1h(HttpHeaders_getInstance().l1q_1);
|
|
1448
|
+
var tmp;
|
|
1449
|
+
if (tmp0_safe_receiver == null) {
|
|
1450
|
+
tmp = null;
|
|
1451
|
+
} else {
|
|
1452
|
+
// Inline function 'kotlin.let' call
|
|
1453
|
+
tmp = Companion_getInstance().m1n(tmp0_safe_receiver);
|
|
1454
|
+
}
|
|
1455
|
+
return tmp;
|
|
1456
|
+
}
|
|
1457
|
+
function contentType_0(_this__u8e3s4) {
|
|
1458
|
+
var tmp0_safe_receiver = _this__u8e3s4.w1t().v1h(HttpHeaders_getInstance().l1q_1);
|
|
1459
|
+
var tmp;
|
|
1460
|
+
if (tmp0_safe_receiver == null) {
|
|
1461
|
+
tmp = null;
|
|
1462
|
+
} else {
|
|
1463
|
+
// Inline function 'kotlin.let' call
|
|
1464
|
+
tmp = Companion_getInstance().m1n(tmp0_safe_receiver);
|
|
1465
|
+
}
|
|
1466
|
+
return tmp;
|
|
1467
|
+
}
|
|
1468
|
+
function get_REQUESTS_WITHOUT_BODY() {
|
|
1469
|
+
_init_properties_HttpMethod_kt__cbus5z();
|
|
1470
|
+
return REQUESTS_WITHOUT_BODY;
|
|
1471
|
+
}
|
|
1472
|
+
var REQUESTS_WITHOUT_BODY;
|
|
1473
|
+
function Companion_2() {
|
|
1474
|
+
Companion_instance_2 = this;
|
|
1475
|
+
this.x1t_1 = new HttpMethod('GET');
|
|
1476
|
+
this.y1t_1 = new HttpMethod('POST');
|
|
1477
|
+
this.z1t_1 = new HttpMethod('PUT');
|
|
1478
|
+
this.a1u_1 = new HttpMethod('PATCH');
|
|
1479
|
+
this.b1u_1 = new HttpMethod('DELETE');
|
|
1480
|
+
this.c1u_1 = new HttpMethod('HEAD');
|
|
1481
|
+
this.d1u_1 = new HttpMethod('OPTIONS');
|
|
1482
|
+
this.e1u_1 = listOf([this.x1t_1, this.y1t_1, this.z1t_1, this.a1u_1, this.b1u_1, this.c1u_1, this.d1u_1]);
|
|
1483
|
+
}
|
|
1484
|
+
var Companion_instance_2;
|
|
1485
|
+
function Companion_getInstance_2() {
|
|
1486
|
+
if (Companion_instance_2 == null)
|
|
1487
|
+
new Companion_2();
|
|
1488
|
+
return Companion_instance_2;
|
|
1489
|
+
}
|
|
1490
|
+
function HttpMethod(value) {
|
|
1491
|
+
Companion_getInstance_2();
|
|
1492
|
+
this.f1u_1 = value;
|
|
1493
|
+
}
|
|
1494
|
+
protoOf(HttpMethod).toString = function () {
|
|
1495
|
+
return this.f1u_1;
|
|
1496
|
+
};
|
|
1497
|
+
protoOf(HttpMethod).hashCode = function () {
|
|
1498
|
+
return getStringHashCode(this.f1u_1);
|
|
1499
|
+
};
|
|
1500
|
+
protoOf(HttpMethod).equals = function (other) {
|
|
1501
|
+
if (this === other)
|
|
1502
|
+
return true;
|
|
1503
|
+
if (!(other instanceof HttpMethod))
|
|
1504
|
+
return false;
|
|
1505
|
+
if (!(this.f1u_1 === other.f1u_1))
|
|
1506
|
+
return false;
|
|
1507
|
+
return true;
|
|
1508
|
+
};
|
|
1509
|
+
function get_supportsRequestBody(_this__u8e3s4) {
|
|
1510
|
+
_init_properties_HttpMethod_kt__cbus5z();
|
|
1511
|
+
return !get_REQUESTS_WITHOUT_BODY().k1(_this__u8e3s4);
|
|
1512
|
+
}
|
|
1513
|
+
var properties_initialized_HttpMethod_kt_ogor3f;
|
|
1514
|
+
function _init_properties_HttpMethod_kt__cbus5z() {
|
|
1515
|
+
if (!properties_initialized_HttpMethod_kt_ogor3f) {
|
|
1516
|
+
properties_initialized_HttpMethod_kt_ogor3f = true;
|
|
1517
|
+
REQUESTS_WITHOUT_BODY = setOf([Companion_getInstance_2().x1t_1, Companion_getInstance_2().c1u_1, Companion_getInstance_2().d1u_1, new HttpMethod('TRACE')]);
|
|
1518
|
+
}
|
|
1519
|
+
}
|
|
1520
|
+
function Companion_3() {
|
|
1521
|
+
Companion_instance_3 = this;
|
|
1522
|
+
this.g1u_1 = new HttpProtocolVersion('HTTP', 3, 0);
|
|
1523
|
+
this.h1u_1 = new HttpProtocolVersion('HTTP', 2, 0);
|
|
1524
|
+
this.i1u_1 = new HttpProtocolVersion('HTTP', 1, 1);
|
|
1525
|
+
this.j1u_1 = new HttpProtocolVersion('HTTP', 1, 0);
|
|
1526
|
+
this.k1u_1 = new HttpProtocolVersion('SPDY', 3, 0);
|
|
1527
|
+
this.l1u_1 = new HttpProtocolVersion('QUIC', 1, 0);
|
|
1528
|
+
}
|
|
1529
|
+
var Companion_instance_3;
|
|
1530
|
+
function Companion_getInstance_3() {
|
|
1531
|
+
if (Companion_instance_3 == null)
|
|
1532
|
+
new Companion_3();
|
|
1533
|
+
return Companion_instance_3;
|
|
1534
|
+
}
|
|
1535
|
+
function HttpProtocolVersion(name, major, minor) {
|
|
1536
|
+
Companion_getInstance_3();
|
|
1537
|
+
this.m1u_1 = name;
|
|
1538
|
+
this.n1u_1 = major;
|
|
1539
|
+
this.o1u_1 = minor;
|
|
1540
|
+
}
|
|
1541
|
+
protoOf(HttpProtocolVersion).toString = function () {
|
|
1542
|
+
return this.m1u_1 + '/' + this.n1u_1 + '.' + this.o1u_1;
|
|
1543
|
+
};
|
|
1544
|
+
protoOf(HttpProtocolVersion).hashCode = function () {
|
|
1545
|
+
var result = getStringHashCode(this.m1u_1);
|
|
1546
|
+
result = imul(result, 31) + this.n1u_1 | 0;
|
|
1547
|
+
result = imul(result, 31) + this.o1u_1 | 0;
|
|
1548
|
+
return result;
|
|
1549
|
+
};
|
|
1550
|
+
protoOf(HttpProtocolVersion).equals = function (other) {
|
|
1551
|
+
if (this === other)
|
|
1552
|
+
return true;
|
|
1553
|
+
if (!(other instanceof HttpProtocolVersion))
|
|
1554
|
+
return false;
|
|
1555
|
+
if (!(this.m1u_1 === other.m1u_1))
|
|
1556
|
+
return false;
|
|
1557
|
+
if (!(this.n1u_1 === other.n1u_1))
|
|
1558
|
+
return false;
|
|
1559
|
+
if (!(this.o1u_1 === other.o1u_1))
|
|
1560
|
+
return false;
|
|
1561
|
+
return true;
|
|
1562
|
+
};
|
|
1563
|
+
function Companion_4() {
|
|
1564
|
+
Companion_instance_4 = this;
|
|
1565
|
+
this.p1u_1 = new HttpStatusCode(100, 'Continue');
|
|
1566
|
+
this.q1u_1 = new HttpStatusCode(101, 'Switching Protocols');
|
|
1567
|
+
this.r1u_1 = new HttpStatusCode(102, 'Processing');
|
|
1568
|
+
this.s1u_1 = new HttpStatusCode(200, 'OK');
|
|
1569
|
+
this.t1u_1 = new HttpStatusCode(201, 'Created');
|
|
1570
|
+
this.u1u_1 = new HttpStatusCode(202, 'Accepted');
|
|
1571
|
+
this.v1u_1 = new HttpStatusCode(203, 'Non-Authoritative Information');
|
|
1572
|
+
this.w1u_1 = new HttpStatusCode(204, 'No Content');
|
|
1573
|
+
this.x1u_1 = new HttpStatusCode(205, 'Reset Content');
|
|
1574
|
+
this.y1u_1 = new HttpStatusCode(206, 'Partial Content');
|
|
1575
|
+
this.z1u_1 = new HttpStatusCode(207, 'Multi-Status');
|
|
1576
|
+
this.a1v_1 = new HttpStatusCode(300, 'Multiple Choices');
|
|
1577
|
+
this.b1v_1 = new HttpStatusCode(301, 'Moved Permanently');
|
|
1578
|
+
this.c1v_1 = new HttpStatusCode(302, 'Found');
|
|
1579
|
+
this.d1v_1 = new HttpStatusCode(303, 'See Other');
|
|
1580
|
+
this.e1v_1 = new HttpStatusCode(304, 'Not Modified');
|
|
1581
|
+
this.f1v_1 = new HttpStatusCode(305, 'Use Proxy');
|
|
1582
|
+
this.g1v_1 = new HttpStatusCode(306, 'Switch Proxy');
|
|
1583
|
+
this.h1v_1 = new HttpStatusCode(307, 'Temporary Redirect');
|
|
1584
|
+
this.i1v_1 = new HttpStatusCode(308, 'Permanent Redirect');
|
|
1585
|
+
this.j1v_1 = new HttpStatusCode(400, 'Bad Request');
|
|
1586
|
+
this.k1v_1 = new HttpStatusCode(401, 'Unauthorized');
|
|
1587
|
+
this.l1v_1 = new HttpStatusCode(402, 'Payment Required');
|
|
1588
|
+
this.m1v_1 = new HttpStatusCode(403, 'Forbidden');
|
|
1589
|
+
this.n1v_1 = new HttpStatusCode(404, 'Not Found');
|
|
1590
|
+
this.o1v_1 = new HttpStatusCode(405, 'Method Not Allowed');
|
|
1591
|
+
this.p1v_1 = new HttpStatusCode(406, 'Not Acceptable');
|
|
1592
|
+
this.q1v_1 = new HttpStatusCode(407, 'Proxy Authentication Required');
|
|
1593
|
+
this.r1v_1 = new HttpStatusCode(408, 'Request Timeout');
|
|
1594
|
+
this.s1v_1 = new HttpStatusCode(409, 'Conflict');
|
|
1595
|
+
this.t1v_1 = new HttpStatusCode(410, 'Gone');
|
|
1596
|
+
this.u1v_1 = new HttpStatusCode(411, 'Length Required');
|
|
1597
|
+
this.v1v_1 = new HttpStatusCode(412, 'Precondition Failed');
|
|
1598
|
+
this.w1v_1 = new HttpStatusCode(413, 'Payload Too Large');
|
|
1599
|
+
this.x1v_1 = new HttpStatusCode(414, 'Request-URI Too Long');
|
|
1600
|
+
this.y1v_1 = new HttpStatusCode(415, 'Unsupported Media Type');
|
|
1601
|
+
this.z1v_1 = new HttpStatusCode(416, 'Requested Range Not Satisfiable');
|
|
1602
|
+
this.a1w_1 = new HttpStatusCode(417, 'Expectation Failed');
|
|
1603
|
+
this.b1w_1 = new HttpStatusCode(422, 'Unprocessable Entity');
|
|
1604
|
+
this.c1w_1 = new HttpStatusCode(423, 'Locked');
|
|
1605
|
+
this.d1w_1 = new HttpStatusCode(424, 'Failed Dependency');
|
|
1606
|
+
this.e1w_1 = new HttpStatusCode(425, 'Too Early');
|
|
1607
|
+
this.f1w_1 = new HttpStatusCode(426, 'Upgrade Required');
|
|
1608
|
+
this.g1w_1 = new HttpStatusCode(429, 'Too Many Requests');
|
|
1609
|
+
this.h1w_1 = new HttpStatusCode(431, 'Request Header Fields Too Large');
|
|
1610
|
+
this.i1w_1 = new HttpStatusCode(500, 'Internal Server Error');
|
|
1611
|
+
this.j1w_1 = new HttpStatusCode(501, 'Not Implemented');
|
|
1612
|
+
this.k1w_1 = new HttpStatusCode(502, 'Bad Gateway');
|
|
1613
|
+
this.l1w_1 = new HttpStatusCode(503, 'Service Unavailable');
|
|
1614
|
+
this.m1w_1 = new HttpStatusCode(504, 'Gateway Timeout');
|
|
1615
|
+
this.n1w_1 = new HttpStatusCode(505, 'HTTP Version Not Supported');
|
|
1616
|
+
this.o1w_1 = new HttpStatusCode(506, 'Variant Also Negotiates');
|
|
1617
|
+
this.p1w_1 = new HttpStatusCode(507, 'Insufficient Storage');
|
|
1618
|
+
this.q1w_1 = allStatusCodes();
|
|
1619
|
+
var tmp = this;
|
|
1620
|
+
// Inline function 'kotlin.collections.associateBy' call
|
|
1621
|
+
var this_0 = this.q1w_1;
|
|
1622
|
+
var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(this_0, 10)), 16);
|
|
1623
|
+
// Inline function 'kotlin.collections.associateByTo' call
|
|
1624
|
+
var destination = LinkedHashMap_init_$Create$(capacity);
|
|
1625
|
+
var _iterator__ex2g4s = this_0.i();
|
|
1626
|
+
while (_iterator__ex2g4s.j()) {
|
|
1627
|
+
var element = _iterator__ex2g4s.k();
|
|
1628
|
+
var tmp$ret$0 = element.s1w_1;
|
|
1629
|
+
destination.w1(tmp$ret$0, element);
|
|
1630
|
+
}
|
|
1631
|
+
tmp.r1w_1 = destination;
|
|
1632
|
+
}
|
|
1633
|
+
var Companion_instance_4;
|
|
1634
|
+
function Companion_getInstance_4() {
|
|
1635
|
+
if (Companion_instance_4 == null)
|
|
1636
|
+
new Companion_4();
|
|
1637
|
+
return Companion_instance_4;
|
|
1638
|
+
}
|
|
1639
|
+
function HttpStatusCode(value, description) {
|
|
1640
|
+
Companion_getInstance_4();
|
|
1641
|
+
this.s1w_1 = value;
|
|
1642
|
+
this.t1w_1 = description;
|
|
1643
|
+
}
|
|
1644
|
+
protoOf(HttpStatusCode).toString = function () {
|
|
1645
|
+
return '' + this.s1w_1 + ' ' + this.t1w_1;
|
|
1646
|
+
};
|
|
1647
|
+
protoOf(HttpStatusCode).equals = function (other) {
|
|
1648
|
+
var tmp;
|
|
1649
|
+
if (other instanceof HttpStatusCode) {
|
|
1650
|
+
tmp = other.s1w_1 === this.s1w_1;
|
|
1651
|
+
} else {
|
|
1652
|
+
tmp = false;
|
|
1653
|
+
}
|
|
1654
|
+
return tmp;
|
|
1655
|
+
};
|
|
1656
|
+
protoOf(HttpStatusCode).hashCode = function () {
|
|
1657
|
+
return this.s1w_1;
|
|
1658
|
+
};
|
|
1659
|
+
protoOf(HttpStatusCode).u1w = function (other) {
|
|
1660
|
+
return this.s1w_1 - other.s1w_1 | 0;
|
|
1661
|
+
};
|
|
1662
|
+
protoOf(HttpStatusCode).d = function (other) {
|
|
1663
|
+
return this.u1w(other instanceof HttpStatusCode ? other : THROW_CCE());
|
|
1664
|
+
};
|
|
1665
|
+
function allStatusCodes() {
|
|
1666
|
+
return listOf([Companion_getInstance_4().p1u_1, Companion_getInstance_4().q1u_1, Companion_getInstance_4().r1u_1, Companion_getInstance_4().s1u_1, Companion_getInstance_4().t1u_1, Companion_getInstance_4().u1u_1, Companion_getInstance_4().v1u_1, Companion_getInstance_4().w1u_1, Companion_getInstance_4().x1u_1, Companion_getInstance_4().y1u_1, Companion_getInstance_4().z1u_1, Companion_getInstance_4().a1v_1, Companion_getInstance_4().b1v_1, Companion_getInstance_4().c1v_1, Companion_getInstance_4().d1v_1, Companion_getInstance_4().e1v_1, Companion_getInstance_4().f1v_1, Companion_getInstance_4().g1v_1, Companion_getInstance_4().h1v_1, Companion_getInstance_4().i1v_1, Companion_getInstance_4().j1v_1, Companion_getInstance_4().k1v_1, Companion_getInstance_4().l1v_1, Companion_getInstance_4().m1v_1, Companion_getInstance_4().n1v_1, Companion_getInstance_4().o1v_1, Companion_getInstance_4().p1v_1, Companion_getInstance_4().q1v_1, Companion_getInstance_4().r1v_1, Companion_getInstance_4().s1v_1, Companion_getInstance_4().t1v_1, Companion_getInstance_4().u1v_1, Companion_getInstance_4().v1v_1, Companion_getInstance_4().w1v_1, Companion_getInstance_4().x1v_1, Companion_getInstance_4().y1v_1, Companion_getInstance_4().z1v_1, Companion_getInstance_4().a1w_1, Companion_getInstance_4().b1w_1, Companion_getInstance_4().c1w_1, Companion_getInstance_4().d1w_1, Companion_getInstance_4().e1w_1, Companion_getInstance_4().f1w_1, Companion_getInstance_4().g1w_1, Companion_getInstance_4().h1w_1, Companion_getInstance_4().i1w_1, Companion_getInstance_4().j1w_1, Companion_getInstance_4().k1w_1, Companion_getInstance_4().l1w_1, Companion_getInstance_4().m1w_1, Companion_getInstance_4().n1w_1, Companion_getInstance_4().o1w_1, Companion_getInstance_4().p1w_1]);
|
|
1667
|
+
}
|
|
1668
|
+
function Companion_5() {
|
|
1669
|
+
Companion_instance_5 = this;
|
|
1670
|
+
this.v1w_1 = EmptyParameters_instance;
|
|
1671
|
+
}
|
|
1672
|
+
var Companion_instance_5;
|
|
1673
|
+
function Companion_getInstance_5() {
|
|
1674
|
+
if (Companion_instance_5 == null)
|
|
1675
|
+
new Companion_5();
|
|
1676
|
+
return Companion_instance_5;
|
|
1677
|
+
}
|
|
1678
|
+
function Parameters() {
|
|
1679
|
+
}
|
|
1680
|
+
function EmptyParameters() {
|
|
1681
|
+
}
|
|
1682
|
+
protoOf(EmptyParameters).a1j = function () {
|
|
1683
|
+
return true;
|
|
1684
|
+
};
|
|
1685
|
+
protoOf(EmptyParameters).b1j = function (name) {
|
|
1686
|
+
return null;
|
|
1687
|
+
};
|
|
1688
|
+
protoOf(EmptyParameters).c1j = function () {
|
|
1689
|
+
return emptySet();
|
|
1690
|
+
};
|
|
1691
|
+
protoOf(EmptyParameters).y1i = function () {
|
|
1692
|
+
return emptySet();
|
|
1693
|
+
};
|
|
1694
|
+
protoOf(EmptyParameters).l = function () {
|
|
1695
|
+
return true;
|
|
1696
|
+
};
|
|
1697
|
+
protoOf(EmptyParameters).toString = function () {
|
|
1698
|
+
return 'Parameters ' + toString(this.y1i());
|
|
1699
|
+
};
|
|
1700
|
+
protoOf(EmptyParameters).equals = function (other) {
|
|
1701
|
+
var tmp;
|
|
1702
|
+
if (!(other == null) ? isInterface(other, Parameters) : false) {
|
|
1703
|
+
tmp = other.l();
|
|
1704
|
+
} else {
|
|
1705
|
+
tmp = false;
|
|
1706
|
+
}
|
|
1707
|
+
return tmp;
|
|
1708
|
+
};
|
|
1709
|
+
var EmptyParameters_instance;
|
|
1710
|
+
function EmptyParameters_getInstance() {
|
|
1711
|
+
return EmptyParameters_instance;
|
|
1712
|
+
}
|
|
1713
|
+
function ParametersBuilder(size) {
|
|
1714
|
+
size = size === VOID ? 8 : size;
|
|
1715
|
+
return new ParametersBuilderImpl(size);
|
|
1716
|
+
}
|
|
1717
|
+
function ParametersBuilderImpl(size) {
|
|
1718
|
+
size = size === VOID ? 8 : size;
|
|
1719
|
+
StringValuesBuilderImpl.call(this, true, size);
|
|
1720
|
+
}
|
|
1721
|
+
protoOf(ParametersBuilderImpl).s1p = function () {
|
|
1722
|
+
return new ParametersImpl(this.f1j_1);
|
|
1723
|
+
};
|
|
1724
|
+
function ParametersImpl(values) {
|
|
1725
|
+
values = values === VOID ? emptyMap() : values;
|
|
1726
|
+
StringValuesImpl.call(this, true, values);
|
|
1727
|
+
}
|
|
1728
|
+
protoOf(ParametersImpl).toString = function () {
|
|
1729
|
+
return 'Parameters ' + toString(this.y1i());
|
|
1730
|
+
};
|
|
1731
|
+
function parseQueryString(query, startIndex, limit, decode) {
|
|
1732
|
+
startIndex = startIndex === VOID ? 0 : startIndex;
|
|
1733
|
+
limit = limit === VOID ? 1000 : limit;
|
|
1734
|
+
decode = decode === VOID ? true : decode;
|
|
1735
|
+
var tmp;
|
|
1736
|
+
if (startIndex > get_lastIndex_0(query)) {
|
|
1737
|
+
tmp = Companion_getInstance_5().v1w_1;
|
|
1738
|
+
} else {
|
|
1739
|
+
// Inline function 'io.ktor.http.Companion.build' call
|
|
1740
|
+
Companion_getInstance_5();
|
|
1741
|
+
// Inline function 'kotlin.apply' call
|
|
1742
|
+
var this_0 = ParametersBuilder();
|
|
1743
|
+
parse(this_0, query, startIndex, limit, decode);
|
|
1744
|
+
tmp = this_0.s1p();
|
|
1745
|
+
}
|
|
1746
|
+
return tmp;
|
|
1747
|
+
}
|
|
1748
|
+
function parse(_this__u8e3s4, query, startIndex, limit, decode) {
|
|
1749
|
+
var count = 0;
|
|
1750
|
+
var nameIndex = startIndex;
|
|
1751
|
+
var equalIndex = -1;
|
|
1752
|
+
var inductionVariable = startIndex;
|
|
1753
|
+
var last = get_lastIndex_0(query);
|
|
1754
|
+
if (inductionVariable <= last)
|
|
1755
|
+
do {
|
|
1756
|
+
var index = inductionVariable;
|
|
1757
|
+
inductionVariable = inductionVariable + 1 | 0;
|
|
1758
|
+
if (count === limit) {
|
|
1759
|
+
return Unit_instance;
|
|
1760
|
+
}
|
|
1761
|
+
var tmp0_subject = charCodeAt(query, index);
|
|
1762
|
+
if (tmp0_subject === _Char___init__impl__6a9atx(38)) {
|
|
1763
|
+
appendParam(_this__u8e3s4, query, nameIndex, equalIndex, index, decode);
|
|
1764
|
+
nameIndex = index + 1 | 0;
|
|
1765
|
+
equalIndex = -1;
|
|
1766
|
+
count = count + 1 | 0;
|
|
1767
|
+
} else if (tmp0_subject === _Char___init__impl__6a9atx(61)) {
|
|
1768
|
+
if (equalIndex === -1) {
|
|
1769
|
+
equalIndex = index;
|
|
1770
|
+
}
|
|
1771
|
+
}
|
|
1772
|
+
}
|
|
1773
|
+
while (!(index === last));
|
|
1774
|
+
if (count === limit) {
|
|
1775
|
+
return Unit_instance;
|
|
1776
|
+
}
|
|
1777
|
+
appendParam(_this__u8e3s4, query, nameIndex, equalIndex, query.length, decode);
|
|
1778
|
+
}
|
|
1779
|
+
function appendParam(_this__u8e3s4, query, nameIndex, equalIndex, endIndex, decode) {
|
|
1780
|
+
if (equalIndex === -1) {
|
|
1781
|
+
var spaceNameIndex = trimStart(nameIndex, endIndex, query);
|
|
1782
|
+
var spaceEndIndex = trimEnd(spaceNameIndex, endIndex, query);
|
|
1783
|
+
if (spaceEndIndex > spaceNameIndex) {
|
|
1784
|
+
var name = decode ? decodeURLQueryComponent(query, spaceNameIndex, spaceEndIndex) : substring(query, spaceNameIndex, spaceEndIndex);
|
|
1785
|
+
_this__u8e3s4.z1i(name, emptyList());
|
|
1786
|
+
}
|
|
1787
|
+
return Unit_instance;
|
|
1788
|
+
}
|
|
1789
|
+
var spaceNameIndex_0 = trimStart(nameIndex, equalIndex, query);
|
|
1790
|
+
var spaceEqualIndex = trimEnd(spaceNameIndex_0, equalIndex, query);
|
|
1791
|
+
if (spaceEqualIndex > spaceNameIndex_0) {
|
|
1792
|
+
var name_0 = decode ? decodeURLQueryComponent(query, spaceNameIndex_0, spaceEqualIndex) : substring(query, spaceNameIndex_0, spaceEqualIndex);
|
|
1793
|
+
var spaceValueIndex = trimStart(equalIndex + 1 | 0, endIndex, query);
|
|
1794
|
+
var spaceEndIndex_0 = trimEnd(spaceValueIndex, endIndex, query);
|
|
1795
|
+
var value = decode ? decodeURLQueryComponent(query, spaceValueIndex, spaceEndIndex_0, true) : substring(query, spaceValueIndex, spaceEndIndex_0);
|
|
1796
|
+
_this__u8e3s4.j1j(name_0, value);
|
|
1797
|
+
}
|
|
1798
|
+
}
|
|
1799
|
+
function trimStart(start, end, query) {
|
|
1800
|
+
var spaceIndex = start;
|
|
1801
|
+
while (spaceIndex < end && isWhitespace(charSequenceGet(query, spaceIndex))) {
|
|
1802
|
+
spaceIndex = spaceIndex + 1 | 0;
|
|
1803
|
+
}
|
|
1804
|
+
return spaceIndex;
|
|
1805
|
+
}
|
|
1806
|
+
function trimEnd(start, end, text) {
|
|
1807
|
+
var spaceIndex = end;
|
|
1808
|
+
while (spaceIndex > start && isWhitespace(charSequenceGet(text, spaceIndex - 1 | 0))) {
|
|
1809
|
+
spaceIndex = spaceIndex - 1 | 0;
|
|
1810
|
+
}
|
|
1811
|
+
return spaceIndex;
|
|
1812
|
+
}
|
|
1813
|
+
function applyOrigin($this) {
|
|
1814
|
+
var tmp;
|
|
1815
|
+
// Inline function 'kotlin.text.isNotEmpty' call
|
|
1816
|
+
var this_0 = $this.y1w_1;
|
|
1817
|
+
if (charSequenceLength(this_0) > 0) {
|
|
1818
|
+
tmp = true;
|
|
1819
|
+
} else {
|
|
1820
|
+
tmp = $this.k1x().i1x_1 === 'file';
|
|
1821
|
+
}
|
|
1822
|
+
if (tmp)
|
|
1823
|
+
return Unit_instance;
|
|
1824
|
+
$this.y1w_1 = Companion_getInstance_6().e1y_1.l1x_1;
|
|
1825
|
+
if ($this.b1x_1 == null)
|
|
1826
|
+
$this.b1x_1 = Companion_getInstance_6().e1y_1.w1x_1;
|
|
1827
|
+
if ($this.a1x_1 === 0) {
|
|
1828
|
+
$this.g1y(Companion_getInstance_6().e1y_1.m1x_1);
|
|
1829
|
+
}
|
|
1830
|
+
}
|
|
1831
|
+
function Companion_6() {
|
|
1832
|
+
Companion_instance_6 = this;
|
|
1833
|
+
this.e1y_1 = Url(get_origin(this));
|
|
1834
|
+
this.f1y_1 = 256;
|
|
1835
|
+
}
|
|
1836
|
+
var Companion_instance_6;
|
|
1837
|
+
function Companion_getInstance_6() {
|
|
1838
|
+
if (Companion_instance_6 == null)
|
|
1839
|
+
new Companion_6();
|
|
1840
|
+
return Companion_instance_6;
|
|
1841
|
+
}
|
|
1842
|
+
function URLBuilder(protocol, host, port, user, password, pathSegments, parameters, fragment, trailingQuery) {
|
|
1843
|
+
Companion_getInstance_6();
|
|
1844
|
+
protocol = protocol === VOID ? null : protocol;
|
|
1845
|
+
host = host === VOID ? '' : host;
|
|
1846
|
+
port = port === VOID ? 0 : port;
|
|
1847
|
+
user = user === VOID ? null : user;
|
|
1848
|
+
password = password === VOID ? null : password;
|
|
1849
|
+
pathSegments = pathSegments === VOID ? emptyList() : pathSegments;
|
|
1850
|
+
parameters = parameters === VOID ? Companion_getInstance_5().v1w_1 : parameters;
|
|
1851
|
+
fragment = fragment === VOID ? '' : fragment;
|
|
1852
|
+
trailingQuery = trailingQuery === VOID ? false : trailingQuery;
|
|
1853
|
+
this.y1w_1 = host;
|
|
1854
|
+
this.z1w_1 = trailingQuery;
|
|
1855
|
+
this.a1x_1 = port;
|
|
1856
|
+
this.b1x_1 = protocol;
|
|
1857
|
+
var tmp = this;
|
|
1858
|
+
tmp.c1x_1 = user == null ? null : encodeURLParameter(user);
|
|
1859
|
+
var tmp_0 = this;
|
|
1860
|
+
tmp_0.d1x_1 = password == null ? null : encodeURLParameter(password);
|
|
1861
|
+
this.e1x_1 = encodeURLQueryComponent(fragment);
|
|
1862
|
+
var tmp_1 = this;
|
|
1863
|
+
// Inline function 'kotlin.collections.map' call
|
|
1864
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
1865
|
+
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(pathSegments, 10));
|
|
1866
|
+
var _iterator__ex2g4s = pathSegments.i();
|
|
1867
|
+
while (_iterator__ex2g4s.j()) {
|
|
1868
|
+
var item = _iterator__ex2g4s.k();
|
|
1869
|
+
var tmp$ret$0 = encodeURLPathPart(item);
|
|
1870
|
+
destination.g(tmp$ret$0);
|
|
1871
|
+
}
|
|
1872
|
+
tmp_1.f1x_1 = destination;
|
|
1873
|
+
this.g1x_1 = encodeParameters(parameters);
|
|
1874
|
+
this.h1x_1 = new UrlDecodedParametersBuilder(this.g1x_1);
|
|
1875
|
+
}
|
|
1876
|
+
protoOf(URLBuilder).g1y = function (value) {
|
|
1877
|
+
// Inline function 'kotlin.require' call
|
|
1878
|
+
if (!(0 <= value ? value <= 65535 : false)) {
|
|
1879
|
+
var message = 'Port must be between 0 and 65535, or 0 if not set. Provided: ' + value;
|
|
1880
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1881
|
+
}
|
|
1882
|
+
this.a1x_1 = value;
|
|
1883
|
+
};
|
|
1884
|
+
protoOf(URLBuilder).h1y = function (value) {
|
|
1885
|
+
this.b1x_1 = value;
|
|
1886
|
+
};
|
|
1887
|
+
protoOf(URLBuilder).k1x = function () {
|
|
1888
|
+
var tmp0_elvis_lhs = this.b1x_1;
|
|
1889
|
+
return tmp0_elvis_lhs == null ? Companion_getInstance_7().i1y_1 : tmp0_elvis_lhs;
|
|
1890
|
+
};
|
|
1891
|
+
protoOf(URLBuilder).o1y = function (value) {
|
|
1892
|
+
var tmp = this;
|
|
1893
|
+
tmp.c1x_1 = value == null ? null : encodeURLParameter(value);
|
|
1894
|
+
};
|
|
1895
|
+
protoOf(URLBuilder).p1y = function () {
|
|
1896
|
+
var tmp0_safe_receiver = this.c1x_1;
|
|
1897
|
+
return tmp0_safe_receiver == null ? null : decodeURLPart(tmp0_safe_receiver);
|
|
1898
|
+
};
|
|
1899
|
+
protoOf(URLBuilder).q1y = function () {
|
|
1900
|
+
var tmp0_safe_receiver = this.d1x_1;
|
|
1901
|
+
return tmp0_safe_receiver == null ? null : decodeURLPart(tmp0_safe_receiver);
|
|
1902
|
+
};
|
|
1903
|
+
protoOf(URLBuilder).r1y = function () {
|
|
1904
|
+
return decodeURLQueryComponent(this.e1x_1);
|
|
1905
|
+
};
|
|
1906
|
+
protoOf(URLBuilder).s1y = function () {
|
|
1907
|
+
// Inline function 'kotlin.collections.map' call
|
|
1908
|
+
var this_0 = this.f1x_1;
|
|
1909
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
1910
|
+
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1911
|
+
var _iterator__ex2g4s = this_0.i();
|
|
1912
|
+
while (_iterator__ex2g4s.j()) {
|
|
1913
|
+
var item = _iterator__ex2g4s.k();
|
|
1914
|
+
var tmp$ret$0 = decodeURLPart(item);
|
|
1915
|
+
destination.g(tmp$ret$0);
|
|
1916
|
+
}
|
|
1917
|
+
return destination;
|
|
1918
|
+
};
|
|
1919
|
+
protoOf(URLBuilder).t1y = function (value) {
|
|
1920
|
+
this.g1x_1 = value;
|
|
1921
|
+
this.h1x_1 = new UrlDecodedParametersBuilder(value);
|
|
1922
|
+
};
|
|
1923
|
+
protoOf(URLBuilder).u1y = function () {
|
|
1924
|
+
applyOrigin(this);
|
|
1925
|
+
return appendTo(this, StringBuilder_init_$Create$_0(256)).toString();
|
|
1926
|
+
};
|
|
1927
|
+
protoOf(URLBuilder).toString = function () {
|
|
1928
|
+
return appendTo(this, StringBuilder_init_$Create$_0(256)).toString();
|
|
1929
|
+
};
|
|
1930
|
+
protoOf(URLBuilder).s1p = function () {
|
|
1931
|
+
applyOrigin(this);
|
|
1932
|
+
return new Url_0(this.b1x_1, this.y1w_1, this.a1x_1, this.s1y(), this.h1x_1.s1p(), this.r1y(), this.p1y(), this.q1y(), this.z1w_1, this.u1y());
|
|
1933
|
+
};
|
|
1934
|
+
function get_authority(_this__u8e3s4) {
|
|
1935
|
+
// Inline function 'kotlin.text.buildString' call
|
|
1936
|
+
// Inline function 'kotlin.apply' call
|
|
1937
|
+
var this_0 = StringBuilder_init_$Create$();
|
|
1938
|
+
this_0.q6(get_encodedUserAndPassword(_this__u8e3s4));
|
|
1939
|
+
this_0.q6(_this__u8e3s4.y1w_1);
|
|
1940
|
+
if (!(_this__u8e3s4.a1x_1 === 0) && !(_this__u8e3s4.a1x_1 === _this__u8e3s4.k1x().j1x_1)) {
|
|
1941
|
+
this_0.q6(':');
|
|
1942
|
+
this_0.q6(_this__u8e3s4.a1x_1.toString());
|
|
1943
|
+
}
|
|
1944
|
+
return this_0.toString();
|
|
1945
|
+
}
|
|
1946
|
+
function appendTo(_this__u8e3s4, out) {
|
|
1947
|
+
out.h(_this__u8e3s4.k1x().i1x_1);
|
|
1948
|
+
switch (_this__u8e3s4.k1x().i1x_1) {
|
|
1949
|
+
case 'file':
|
|
1950
|
+
appendFile(out, _this__u8e3s4.y1w_1, get_encodedPath(_this__u8e3s4));
|
|
1951
|
+
return out;
|
|
1952
|
+
case 'mailto':
|
|
1953
|
+
appendMailto(out, get_encodedUserAndPassword(_this__u8e3s4), _this__u8e3s4.y1w_1);
|
|
1954
|
+
return out;
|
|
1955
|
+
case 'about':
|
|
1956
|
+
appendPayload(out, _this__u8e3s4.y1w_1);
|
|
1957
|
+
return out;
|
|
1958
|
+
case 'tel':
|
|
1959
|
+
appendPayload(out, _this__u8e3s4.y1w_1);
|
|
1960
|
+
return out;
|
|
1961
|
+
case 'data':
|
|
1962
|
+
appendPayload(out, _this__u8e3s4.y1w_1);
|
|
1963
|
+
return out;
|
|
1964
|
+
}
|
|
1965
|
+
out.h('://');
|
|
1966
|
+
out.h(get_authority(_this__u8e3s4));
|
|
1967
|
+
appendUrlFullPath(out, get_encodedPath(_this__u8e3s4), _this__u8e3s4.g1x_1, _this__u8e3s4.z1w_1);
|
|
1968
|
+
// Inline function 'kotlin.text.isNotEmpty' call
|
|
1969
|
+
var this_0 = _this__u8e3s4.e1x_1;
|
|
1970
|
+
if (charSequenceLength(this_0) > 0) {
|
|
1971
|
+
out.r6(_Char___init__impl__6a9atx(35));
|
|
1972
|
+
out.h(_this__u8e3s4.e1x_1);
|
|
1973
|
+
}
|
|
1974
|
+
return out;
|
|
1975
|
+
}
|
|
1976
|
+
function get_encodedUserAndPassword(_this__u8e3s4) {
|
|
1977
|
+
// Inline function 'kotlin.text.buildString' call
|
|
1978
|
+
// Inline function 'kotlin.apply' call
|
|
1979
|
+
var this_0 = StringBuilder_init_$Create$();
|
|
1980
|
+
appendUserAndPassword(this_0, _this__u8e3s4.c1x_1, _this__u8e3s4.d1x_1);
|
|
1981
|
+
return this_0.toString();
|
|
1982
|
+
}
|
|
1983
|
+
function appendFile(_this__u8e3s4, host, encodedPath) {
|
|
1984
|
+
_this__u8e3s4.h('://');
|
|
1985
|
+
_this__u8e3s4.h(host);
|
|
1986
|
+
if (!startsWith_0(encodedPath, _Char___init__impl__6a9atx(47))) {
|
|
1987
|
+
_this__u8e3s4.r6(_Char___init__impl__6a9atx(47));
|
|
1988
|
+
}
|
|
1989
|
+
_this__u8e3s4.h(encodedPath);
|
|
1990
|
+
}
|
|
1991
|
+
function set_encodedPath(_this__u8e3s4, value) {
|
|
1992
|
+
_this__u8e3s4.f1x_1 = isBlank(value) ? emptyList() : value === '/' ? get_ROOT_PATH() : toMutableList(split(value, charArrayOf([_Char___init__impl__6a9atx(47)])));
|
|
1993
|
+
}
|
|
1994
|
+
function get_encodedPath(_this__u8e3s4) {
|
|
1995
|
+
return joinPath(_this__u8e3s4.f1x_1);
|
|
1996
|
+
}
|
|
1997
|
+
function appendMailto(_this__u8e3s4, encodedUser, host) {
|
|
1998
|
+
_this__u8e3s4.h(':');
|
|
1999
|
+
_this__u8e3s4.h(encodedUser);
|
|
2000
|
+
_this__u8e3s4.h(host);
|
|
2001
|
+
}
|
|
2002
|
+
function appendPayload(_this__u8e3s4, host) {
|
|
2003
|
+
_this__u8e3s4.h(':');
|
|
2004
|
+
_this__u8e3s4.h(host);
|
|
2005
|
+
}
|
|
2006
|
+
function joinPath(_this__u8e3s4) {
|
|
2007
|
+
if (_this__u8e3s4.l())
|
|
2008
|
+
return '';
|
|
2009
|
+
if (_this__u8e3s4.n() === 1) {
|
|
2010
|
+
// Inline function 'kotlin.text.isEmpty' call
|
|
2011
|
+
var this_0 = first_0(_this__u8e3s4);
|
|
2012
|
+
if (charSequenceLength(this_0) === 0)
|
|
2013
|
+
return '/';
|
|
2014
|
+
return first_0(_this__u8e3s4);
|
|
2015
|
+
}
|
|
2016
|
+
return joinToString(_this__u8e3s4, '/');
|
|
2017
|
+
}
|
|
2018
|
+
function get_ROOT_PATH() {
|
|
2019
|
+
_init_properties_URLParser_kt__sf11to();
|
|
2020
|
+
return ROOT_PATH;
|
|
2021
|
+
}
|
|
2022
|
+
var ROOT_PATH;
|
|
2023
|
+
function takeFrom(_this__u8e3s4, urlString) {
|
|
2024
|
+
_init_properties_URLParser_kt__sf11to();
|
|
2025
|
+
if (isBlank(urlString))
|
|
2026
|
+
return _this__u8e3s4;
|
|
2027
|
+
var tmp;
|
|
2028
|
+
try {
|
|
2029
|
+
tmp = takeFromUnsafe(_this__u8e3s4, urlString);
|
|
2030
|
+
} catch ($p) {
|
|
2031
|
+
var tmp_0;
|
|
2032
|
+
if ($p instanceof Error) {
|
|
2033
|
+
var cause = $p;
|
|
2034
|
+
throw new URLParserException(urlString, cause);
|
|
2035
|
+
} else {
|
|
2036
|
+
throw $p;
|
|
2037
|
+
}
|
|
2038
|
+
}
|
|
2039
|
+
return tmp;
|
|
2040
|
+
}
|
|
2041
|
+
function takeFromUnsafe(_this__u8e3s4, urlString) {
|
|
2042
|
+
_init_properties_URLParser_kt__sf11to();
|
|
2043
|
+
var tmp$ret$1;
|
|
2044
|
+
$l$block: {
|
|
2045
|
+
// Inline function 'kotlin.text.indexOfFirst' call
|
|
2046
|
+
var inductionVariable = 0;
|
|
2047
|
+
var last = charSequenceLength(urlString) - 1 | 0;
|
|
2048
|
+
if (inductionVariable <= last)
|
|
2049
|
+
do {
|
|
2050
|
+
var index = inductionVariable;
|
|
2051
|
+
inductionVariable = inductionVariable + 1 | 0;
|
|
2052
|
+
var it = charSequenceGet(urlString, index);
|
|
2053
|
+
if (!isWhitespace(it)) {
|
|
2054
|
+
tmp$ret$1 = index;
|
|
2055
|
+
break $l$block;
|
|
2056
|
+
}
|
|
2057
|
+
}
|
|
2058
|
+
while (inductionVariable <= last);
|
|
2059
|
+
tmp$ret$1 = -1;
|
|
2060
|
+
}
|
|
2061
|
+
var startIndex = tmp$ret$1;
|
|
2062
|
+
var tmp$ret$3;
|
|
2063
|
+
$l$block_0: {
|
|
2064
|
+
// Inline function 'kotlin.text.indexOfLast' call
|
|
2065
|
+
var inductionVariable_0 = charSequenceLength(urlString) - 1 | 0;
|
|
2066
|
+
if (0 <= inductionVariable_0)
|
|
2067
|
+
do {
|
|
2068
|
+
var index_0 = inductionVariable_0;
|
|
2069
|
+
inductionVariable_0 = inductionVariable_0 + -1 | 0;
|
|
2070
|
+
var it_0 = charSequenceGet(urlString, index_0);
|
|
2071
|
+
if (!isWhitespace(it_0)) {
|
|
2072
|
+
tmp$ret$3 = index_0;
|
|
2073
|
+
break $l$block_0;
|
|
2074
|
+
}
|
|
2075
|
+
}
|
|
2076
|
+
while (0 <= inductionVariable_0);
|
|
2077
|
+
tmp$ret$3 = -1;
|
|
2078
|
+
}
|
|
2079
|
+
var endIndex = tmp$ret$3 + 1 | 0;
|
|
2080
|
+
var schemeLength = findScheme(urlString, startIndex, endIndex);
|
|
2081
|
+
if (schemeLength > 0) {
|
|
2082
|
+
var scheme = substring(urlString, startIndex, startIndex + schemeLength | 0);
|
|
2083
|
+
_this__u8e3s4.h1y(Companion_getInstance_7().v1y(scheme));
|
|
2084
|
+
startIndex = startIndex + (schemeLength + 1 | 0) | 0;
|
|
2085
|
+
}
|
|
2086
|
+
if (_this__u8e3s4.k1x().i1x_1 === 'data') {
|
|
2087
|
+
_this__u8e3s4.y1w_1 = substring(urlString, startIndex, endIndex);
|
|
2088
|
+
return _this__u8e3s4;
|
|
2089
|
+
}
|
|
2090
|
+
var slashCount = count(urlString, startIndex, endIndex, _Char___init__impl__6a9atx(47));
|
|
2091
|
+
startIndex = startIndex + slashCount | 0;
|
|
2092
|
+
if (_this__u8e3s4.k1x().i1x_1 === 'file') {
|
|
2093
|
+
parseFile(_this__u8e3s4, urlString, startIndex, endIndex, slashCount);
|
|
2094
|
+
return _this__u8e3s4;
|
|
2095
|
+
}
|
|
2096
|
+
if (_this__u8e3s4.k1x().i1x_1 === 'mailto') {
|
|
2097
|
+
// Inline function 'kotlin.require' call
|
|
2098
|
+
// Inline function 'kotlin.require' call
|
|
2099
|
+
if (!(slashCount === 0)) {
|
|
2100
|
+
var message = 'Failed requirement.';
|
|
2101
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
2102
|
+
}
|
|
2103
|
+
parseMailto(_this__u8e3s4, urlString, startIndex, endIndex);
|
|
2104
|
+
return _this__u8e3s4;
|
|
2105
|
+
}
|
|
2106
|
+
if (_this__u8e3s4.k1x().i1x_1 === 'about') {
|
|
2107
|
+
// Inline function 'kotlin.require' call
|
|
2108
|
+
// Inline function 'kotlin.require' call
|
|
2109
|
+
if (!(slashCount === 0)) {
|
|
2110
|
+
var message_0 = 'Failed requirement.';
|
|
2111
|
+
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
2112
|
+
}
|
|
2113
|
+
_this__u8e3s4.y1w_1 = substring(urlString, startIndex, endIndex);
|
|
2114
|
+
return _this__u8e3s4;
|
|
2115
|
+
}
|
|
2116
|
+
if (_this__u8e3s4.k1x().i1x_1 === 'tel') {
|
|
2117
|
+
// Inline function 'kotlin.require' call
|
|
2118
|
+
// Inline function 'kotlin.require' call
|
|
2119
|
+
if (!(slashCount === 0)) {
|
|
2120
|
+
var message_1 = 'Failed requirement.';
|
|
2121
|
+
throw IllegalArgumentException_init_$Create$(toString(message_1));
|
|
2122
|
+
}
|
|
2123
|
+
_this__u8e3s4.y1w_1 = substring(urlString, startIndex, endIndex);
|
|
2124
|
+
return _this__u8e3s4;
|
|
2125
|
+
}
|
|
2126
|
+
if (slashCount >= 2) {
|
|
2127
|
+
loop: while (true) {
|
|
2128
|
+
// Inline function 'kotlin.takeIf' call
|
|
2129
|
+
var this_0 = indexOfAny(urlString, toCharArray('@/\\?#'), startIndex);
|
|
2130
|
+
var tmp;
|
|
2131
|
+
if (this_0 > 0) {
|
|
2132
|
+
tmp = this_0;
|
|
2133
|
+
} else {
|
|
2134
|
+
tmp = null;
|
|
2135
|
+
}
|
|
2136
|
+
var tmp0_elvis_lhs = tmp;
|
|
2137
|
+
var delimiter = tmp0_elvis_lhs == null ? endIndex : tmp0_elvis_lhs;
|
|
2138
|
+
if (delimiter < endIndex && charCodeAt(urlString, delimiter) === _Char___init__impl__6a9atx(64)) {
|
|
2139
|
+
var passwordIndex = indexOfColonInHostPort(urlString, startIndex, delimiter);
|
|
2140
|
+
if (!(passwordIndex === -1)) {
|
|
2141
|
+
_this__u8e3s4.c1x_1 = substring(urlString, startIndex, passwordIndex);
|
|
2142
|
+
_this__u8e3s4.d1x_1 = substring(urlString, passwordIndex + 1 | 0, delimiter);
|
|
2143
|
+
} else {
|
|
2144
|
+
_this__u8e3s4.c1x_1 = substring(urlString, startIndex, delimiter);
|
|
2145
|
+
}
|
|
2146
|
+
startIndex = delimiter + 1 | 0;
|
|
2147
|
+
} else {
|
|
2148
|
+
fillHost(_this__u8e3s4, urlString, startIndex, delimiter);
|
|
2149
|
+
startIndex = delimiter;
|
|
2150
|
+
break loop;
|
|
2151
|
+
}
|
|
2152
|
+
}
|
|
2153
|
+
}
|
|
2154
|
+
if (startIndex >= endIndex) {
|
|
2155
|
+
_this__u8e3s4.f1x_1 = charCodeAt(urlString, endIndex - 1 | 0) === _Char___init__impl__6a9atx(47) ? get_ROOT_PATH() : emptyList();
|
|
2156
|
+
return _this__u8e3s4;
|
|
2157
|
+
}
|
|
2158
|
+
var tmp_0 = _this__u8e3s4;
|
|
2159
|
+
var tmp_1;
|
|
2160
|
+
if (slashCount === 0) {
|
|
2161
|
+
tmp_1 = dropLast(_this__u8e3s4.f1x_1, 1);
|
|
2162
|
+
} else {
|
|
2163
|
+
tmp_1 = emptyList();
|
|
2164
|
+
}
|
|
2165
|
+
tmp_0.f1x_1 = tmp_1;
|
|
2166
|
+
// Inline function 'kotlin.takeIf' call
|
|
2167
|
+
var this_1 = indexOfAny(urlString, toCharArray('?#'), startIndex);
|
|
2168
|
+
var tmp_2;
|
|
2169
|
+
if (this_1 > 0) {
|
|
2170
|
+
tmp_2 = this_1;
|
|
2171
|
+
} else {
|
|
2172
|
+
tmp_2 = null;
|
|
2173
|
+
}
|
|
2174
|
+
var tmp1_elvis_lhs = tmp_2;
|
|
2175
|
+
var pathEnd = tmp1_elvis_lhs == null ? endIndex : tmp1_elvis_lhs;
|
|
2176
|
+
if (pathEnd > startIndex) {
|
|
2177
|
+
var rawPath = substring(urlString, startIndex, pathEnd);
|
|
2178
|
+
var tmp_3;
|
|
2179
|
+
var tmp_4;
|
|
2180
|
+
if (_this__u8e3s4.f1x_1.n() === 1) {
|
|
2181
|
+
// Inline function 'kotlin.text.isEmpty' call
|
|
2182
|
+
var this_2 = first_0(_this__u8e3s4.f1x_1);
|
|
2183
|
+
tmp_4 = charSequenceLength(this_2) === 0;
|
|
2184
|
+
} else {
|
|
2185
|
+
tmp_4 = false;
|
|
2186
|
+
}
|
|
2187
|
+
if (tmp_4) {
|
|
2188
|
+
tmp_3 = emptyList();
|
|
2189
|
+
} else {
|
|
2190
|
+
tmp_3 = _this__u8e3s4.f1x_1;
|
|
2191
|
+
}
|
|
2192
|
+
var basePath = tmp_3;
|
|
2193
|
+
var rawChunks = rawPath === '/' ? get_ROOT_PATH() : split(rawPath, charArrayOf([_Char___init__impl__6a9atx(47)]));
|
|
2194
|
+
var relativePath = plus_0(slashCount === 1 ? get_ROOT_PATH() : emptyList(), rawChunks);
|
|
2195
|
+
_this__u8e3s4.f1x_1 = plus_0(basePath, relativePath);
|
|
2196
|
+
startIndex = pathEnd;
|
|
2197
|
+
}
|
|
2198
|
+
if (startIndex < endIndex && charCodeAt(urlString, startIndex) === _Char___init__impl__6a9atx(63)) {
|
|
2199
|
+
startIndex = parseQuery(_this__u8e3s4, urlString, startIndex, endIndex);
|
|
2200
|
+
}
|
|
2201
|
+
parseFragment(_this__u8e3s4, urlString, startIndex, endIndex);
|
|
2202
|
+
return _this__u8e3s4;
|
|
2203
|
+
}
|
|
2204
|
+
function URLParserException(urlString, cause) {
|
|
2205
|
+
IllegalStateException_init_$Init$('Fail to parse url: ' + urlString, cause, this);
|
|
2206
|
+
captureStack(this, URLParserException);
|
|
2207
|
+
}
|
|
2208
|
+
function findScheme(urlString, startIndex, endIndex) {
|
|
2209
|
+
_init_properties_URLParser_kt__sf11to();
|
|
2210
|
+
var current = startIndex;
|
|
2211
|
+
var incorrectSchemePosition = -1;
|
|
2212
|
+
var firstChar = charCodeAt(urlString, current);
|
|
2213
|
+
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)) {
|
|
2214
|
+
incorrectSchemePosition = current;
|
|
2215
|
+
}
|
|
2216
|
+
while (current < endIndex) {
|
|
2217
|
+
var char = charCodeAt(urlString, current);
|
|
2218
|
+
if (char === _Char___init__impl__6a9atx(58)) {
|
|
2219
|
+
if (!(incorrectSchemePosition === -1)) {
|
|
2220
|
+
throw IllegalArgumentException_init_$Create$('Illegal character in scheme at position ' + incorrectSchemePosition);
|
|
2221
|
+
}
|
|
2222
|
+
return current - startIndex | 0;
|
|
2223
|
+
}
|
|
2224
|
+
if (char === _Char___init__impl__6a9atx(47) || char === _Char___init__impl__6a9atx(63) || char === _Char___init__impl__6a9atx(35))
|
|
2225
|
+
return -1;
|
|
2226
|
+
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))) {
|
|
2227
|
+
incorrectSchemePosition = current;
|
|
2228
|
+
}
|
|
2229
|
+
current = current + 1 | 0;
|
|
2230
|
+
}
|
|
2231
|
+
return -1;
|
|
2232
|
+
}
|
|
2233
|
+
function count(urlString, startIndex, endIndex, char) {
|
|
2234
|
+
_init_properties_URLParser_kt__sf11to();
|
|
2235
|
+
var result = 0;
|
|
2236
|
+
$l$loop: while ((startIndex + result | 0) < endIndex && charCodeAt(urlString, startIndex + result | 0) === char) {
|
|
2237
|
+
result = result + 1 | 0;
|
|
2238
|
+
}
|
|
2239
|
+
return result;
|
|
2240
|
+
}
|
|
2241
|
+
function parseFile(_this__u8e3s4, urlString, startIndex, endIndex, slashCount) {
|
|
2242
|
+
_init_properties_URLParser_kt__sf11to();
|
|
2243
|
+
switch (slashCount) {
|
|
2244
|
+
case 1:
|
|
2245
|
+
_this__u8e3s4.y1w_1 = '';
|
|
2246
|
+
set_encodedPath(_this__u8e3s4, substring(urlString, startIndex, endIndex));
|
|
2247
|
+
break;
|
|
2248
|
+
case 2:
|
|
2249
|
+
var nextSlash = indexOf(urlString, _Char___init__impl__6a9atx(47), startIndex);
|
|
2250
|
+
if (nextSlash === -1 || nextSlash === endIndex) {
|
|
2251
|
+
_this__u8e3s4.y1w_1 = substring(urlString, startIndex, endIndex);
|
|
2252
|
+
return Unit_instance;
|
|
2253
|
+
}
|
|
2254
|
+
|
|
2255
|
+
_this__u8e3s4.y1w_1 = substring(urlString, startIndex, nextSlash);
|
|
2256
|
+
set_encodedPath(_this__u8e3s4, substring(urlString, nextSlash, endIndex));
|
|
2257
|
+
break;
|
|
2258
|
+
case 3:
|
|
2259
|
+
_this__u8e3s4.y1w_1 = '';
|
|
2260
|
+
set_encodedPath(_this__u8e3s4, '/' + substring(urlString, startIndex, endIndex));
|
|
2261
|
+
break;
|
|
2262
|
+
default:
|
|
2263
|
+
throw IllegalArgumentException_init_$Create$('Invalid file url: ' + urlString);
|
|
2264
|
+
}
|
|
2265
|
+
}
|
|
2266
|
+
function parseMailto(_this__u8e3s4, urlString, startIndex, endIndex) {
|
|
2267
|
+
_init_properties_URLParser_kt__sf11to();
|
|
2268
|
+
var delimiter = indexOf_0(urlString, '@', startIndex);
|
|
2269
|
+
if (delimiter === -1) {
|
|
2270
|
+
throw IllegalArgumentException_init_$Create$('Invalid mailto url: ' + urlString + ", it should contain '@'.");
|
|
2271
|
+
}
|
|
2272
|
+
_this__u8e3s4.o1y(decodeURLPart(substring(urlString, startIndex, delimiter)));
|
|
2273
|
+
_this__u8e3s4.y1w_1 = substring(urlString, delimiter + 1 | 0, endIndex);
|
|
2274
|
+
}
|
|
2275
|
+
function indexOfColonInHostPort(_this__u8e3s4, startIndex, endIndex) {
|
|
2276
|
+
_init_properties_URLParser_kt__sf11to();
|
|
2277
|
+
var skip = false;
|
|
2278
|
+
var inductionVariable = startIndex;
|
|
2279
|
+
if (inductionVariable < endIndex)
|
|
2280
|
+
do {
|
|
2281
|
+
var index = inductionVariable;
|
|
2282
|
+
inductionVariable = inductionVariable + 1 | 0;
|
|
2283
|
+
var tmp0_subject = charCodeAt(_this__u8e3s4, index);
|
|
2284
|
+
if (tmp0_subject === _Char___init__impl__6a9atx(91))
|
|
2285
|
+
skip = true;
|
|
2286
|
+
else if (tmp0_subject === _Char___init__impl__6a9atx(93))
|
|
2287
|
+
skip = false;
|
|
2288
|
+
else if (tmp0_subject === _Char___init__impl__6a9atx(58))
|
|
2289
|
+
if (!skip)
|
|
2290
|
+
return index;
|
|
2291
|
+
}
|
|
2292
|
+
while (inductionVariable < endIndex);
|
|
2293
|
+
return -1;
|
|
2294
|
+
}
|
|
2295
|
+
function fillHost(_this__u8e3s4, urlString, startIndex, endIndex) {
|
|
2296
|
+
_init_properties_URLParser_kt__sf11to();
|
|
2297
|
+
// Inline function 'kotlin.takeIf' call
|
|
2298
|
+
var this_0 = indexOfColonInHostPort(urlString, startIndex, endIndex);
|
|
2299
|
+
var tmp;
|
|
2300
|
+
if (this_0 > 0) {
|
|
2301
|
+
tmp = this_0;
|
|
2302
|
+
} else {
|
|
2303
|
+
tmp = null;
|
|
2304
|
+
}
|
|
2305
|
+
var tmp0_elvis_lhs = tmp;
|
|
2306
|
+
var colonIndex = tmp0_elvis_lhs == null ? endIndex : tmp0_elvis_lhs;
|
|
2307
|
+
_this__u8e3s4.y1w_1 = substring(urlString, startIndex, colonIndex);
|
|
2308
|
+
var tmp_0;
|
|
2309
|
+
if ((colonIndex + 1 | 0) < endIndex) {
|
|
2310
|
+
tmp_0 = toInt(substring(urlString, colonIndex + 1 | 0, endIndex));
|
|
2311
|
+
} else {
|
|
2312
|
+
tmp_0 = 0;
|
|
2313
|
+
}
|
|
2314
|
+
_this__u8e3s4.g1y(tmp_0);
|
|
2315
|
+
}
|
|
2316
|
+
function parseQuery(_this__u8e3s4, urlString, startIndex, endIndex) {
|
|
2317
|
+
_init_properties_URLParser_kt__sf11to();
|
|
2318
|
+
if ((startIndex + 1 | 0) === endIndex) {
|
|
2319
|
+
_this__u8e3s4.z1w_1 = true;
|
|
2320
|
+
return endIndex;
|
|
2321
|
+
}
|
|
2322
|
+
// Inline function 'kotlin.takeIf' call
|
|
2323
|
+
var this_0 = indexOf(urlString, _Char___init__impl__6a9atx(35), startIndex + 1 | 0);
|
|
2324
|
+
var tmp;
|
|
2325
|
+
if (this_0 > 0) {
|
|
2326
|
+
tmp = this_0;
|
|
2327
|
+
} else {
|
|
2328
|
+
tmp = null;
|
|
2329
|
+
}
|
|
2330
|
+
var tmp0_elvis_lhs = tmp;
|
|
2331
|
+
var fragmentStart = tmp0_elvis_lhs == null ? endIndex : tmp0_elvis_lhs;
|
|
2332
|
+
var rawParameters = parseQueryString(substring(urlString, startIndex + 1 | 0, fragmentStart), VOID, VOID, false);
|
|
2333
|
+
rawParameters.d1j(parseQuery$lambda(_this__u8e3s4));
|
|
2334
|
+
return fragmentStart;
|
|
2335
|
+
}
|
|
2336
|
+
function parseFragment(_this__u8e3s4, urlString, startIndex, endIndex) {
|
|
2337
|
+
_init_properties_URLParser_kt__sf11to();
|
|
2338
|
+
if (startIndex < endIndex && charCodeAt(urlString, startIndex) === _Char___init__impl__6a9atx(35)) {
|
|
2339
|
+
_this__u8e3s4.e1x_1 = substring(urlString, startIndex + 1 | 0, endIndex);
|
|
2340
|
+
}
|
|
2341
|
+
}
|
|
2342
|
+
function parseQuery$lambda($this_parseQuery) {
|
|
2343
|
+
return function (key, values) {
|
|
2344
|
+
$this_parseQuery.g1x_1.z1i(key, values);
|
|
2345
|
+
return Unit_instance;
|
|
2346
|
+
};
|
|
2347
|
+
}
|
|
2348
|
+
var properties_initialized_URLParser_kt_hd1g6a;
|
|
2349
|
+
function _init_properties_URLParser_kt__sf11to() {
|
|
2350
|
+
if (!properties_initialized_URLParser_kt_hd1g6a) {
|
|
2351
|
+
properties_initialized_URLParser_kt_hd1g6a = true;
|
|
2352
|
+
ROOT_PATH = listOf_0('');
|
|
2353
|
+
}
|
|
2354
|
+
}
|
|
2355
|
+
function Companion_7() {
|
|
2356
|
+
Companion_instance_7 = this;
|
|
2357
|
+
this.i1y_1 = new URLProtocol('http', 80);
|
|
2358
|
+
this.j1y_1 = new URLProtocol('https', 443);
|
|
2359
|
+
this.k1y_1 = new URLProtocol('ws', 80);
|
|
2360
|
+
this.l1y_1 = new URLProtocol('wss', 443);
|
|
2361
|
+
this.m1y_1 = new URLProtocol('socks', 1080);
|
|
2362
|
+
var tmp = this;
|
|
2363
|
+
// Inline function 'kotlin.collections.associateBy' call
|
|
2364
|
+
var this_0 = listOf([this.i1y_1, this.j1y_1, this.k1y_1, this.l1y_1, this.m1y_1]);
|
|
2365
|
+
var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(this_0, 10)), 16);
|
|
2366
|
+
// Inline function 'kotlin.collections.associateByTo' call
|
|
2367
|
+
var destination = LinkedHashMap_init_$Create$(capacity);
|
|
2368
|
+
var _iterator__ex2g4s = this_0.i();
|
|
2369
|
+
while (_iterator__ex2g4s.j()) {
|
|
2370
|
+
var element = _iterator__ex2g4s.k();
|
|
2371
|
+
var tmp$ret$0 = element.i1x_1;
|
|
2372
|
+
destination.w1(tmp$ret$0, element);
|
|
2373
|
+
}
|
|
2374
|
+
tmp.n1y_1 = destination;
|
|
2375
|
+
}
|
|
2376
|
+
protoOf(Companion_7).v1y = function (name) {
|
|
2377
|
+
// Inline function 'kotlin.let' call
|
|
2378
|
+
var it = toLowerCasePreservingASCIIRules(name);
|
|
2379
|
+
var tmp0_elvis_lhs = Companion_getInstance_7().n1y_1.p1(it);
|
|
2380
|
+
return tmp0_elvis_lhs == null ? new URLProtocol(it, 0) : tmp0_elvis_lhs;
|
|
2381
|
+
};
|
|
2382
|
+
var Companion_instance_7;
|
|
2383
|
+
function Companion_getInstance_7() {
|
|
2384
|
+
if (Companion_instance_7 == null)
|
|
2385
|
+
new Companion_7();
|
|
2386
|
+
return Companion_instance_7;
|
|
2387
|
+
}
|
|
2388
|
+
function URLProtocol(name, defaultPort) {
|
|
2389
|
+
Companion_getInstance_7();
|
|
2390
|
+
this.i1x_1 = name;
|
|
2391
|
+
this.j1x_1 = defaultPort;
|
|
2392
|
+
var tmp0 = this.i1x_1;
|
|
2393
|
+
var tmp$ret$1;
|
|
2394
|
+
$l$block: {
|
|
2395
|
+
// Inline function 'kotlin.text.all' call
|
|
2396
|
+
var inductionVariable = 0;
|
|
2397
|
+
while (inductionVariable < charSequenceLength(tmp0)) {
|
|
2398
|
+
var element = charSequenceGet(tmp0, inductionVariable);
|
|
2399
|
+
inductionVariable = inductionVariable + 1 | 0;
|
|
2400
|
+
if (!isLowerCase(element)) {
|
|
2401
|
+
tmp$ret$1 = false;
|
|
2402
|
+
break $l$block;
|
|
2403
|
+
}
|
|
2404
|
+
}
|
|
2405
|
+
tmp$ret$1 = true;
|
|
2406
|
+
}
|
|
2407
|
+
// Inline function 'kotlin.require' call
|
|
2408
|
+
if (!tmp$ret$1) {
|
|
2409
|
+
var message = 'All characters should be lower case';
|
|
2410
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
2411
|
+
}
|
|
2412
|
+
}
|
|
2413
|
+
protoOf(URLProtocol).toString = function () {
|
|
2414
|
+
return 'URLProtocol(name=' + this.i1x_1 + ', defaultPort=' + this.j1x_1 + ')';
|
|
2415
|
+
};
|
|
2416
|
+
protoOf(URLProtocol).hashCode = function () {
|
|
2417
|
+
var result = getStringHashCode(this.i1x_1);
|
|
2418
|
+
result = imul(result, 31) + this.j1x_1 | 0;
|
|
2419
|
+
return result;
|
|
2420
|
+
};
|
|
2421
|
+
protoOf(URLProtocol).equals = function (other) {
|
|
2422
|
+
if (this === other)
|
|
2423
|
+
return true;
|
|
2424
|
+
if (!(other instanceof URLProtocol))
|
|
2425
|
+
return false;
|
|
2426
|
+
if (!(this.i1x_1 === other.i1x_1))
|
|
2427
|
+
return false;
|
|
2428
|
+
if (!(this.j1x_1 === other.j1x_1))
|
|
2429
|
+
return false;
|
|
2430
|
+
return true;
|
|
2431
|
+
};
|
|
2432
|
+
function isSecure(_this__u8e3s4) {
|
|
2433
|
+
return _this__u8e3s4.i1x_1 === 'https' || _this__u8e3s4.i1x_1 === 'wss';
|
|
2434
|
+
}
|
|
2435
|
+
function takeFrom_0(_this__u8e3s4, url) {
|
|
2436
|
+
_this__u8e3s4.b1x_1 = url.b1x_1;
|
|
2437
|
+
_this__u8e3s4.y1w_1 = url.y1w_1;
|
|
2438
|
+
_this__u8e3s4.g1y(url.a1x_1);
|
|
2439
|
+
_this__u8e3s4.f1x_1 = url.f1x_1;
|
|
2440
|
+
_this__u8e3s4.c1x_1 = url.c1x_1;
|
|
2441
|
+
_this__u8e3s4.d1x_1 = url.d1x_1;
|
|
2442
|
+
// Inline function 'kotlin.apply' call
|
|
2443
|
+
var this_0 = ParametersBuilder();
|
|
2444
|
+
appendAll(this_0, url.g1x_1);
|
|
2445
|
+
_this__u8e3s4.t1y(this_0);
|
|
2446
|
+
_this__u8e3s4.e1x_1 = url.e1x_1;
|
|
2447
|
+
_this__u8e3s4.z1w_1 = url.z1w_1;
|
|
2448
|
+
return _this__u8e3s4;
|
|
2449
|
+
}
|
|
2450
|
+
function Url(urlString) {
|
|
2451
|
+
return URLBuilder_0(urlString).s1p();
|
|
2452
|
+
}
|
|
2453
|
+
function appendUrlFullPath(_this__u8e3s4, encodedPath, encodedQueryParameters, trailingQuery) {
|
|
2454
|
+
var tmp;
|
|
2455
|
+
// Inline function 'kotlin.text.isNotBlank' call
|
|
2456
|
+
if (!isBlank(encodedPath)) {
|
|
2457
|
+
tmp = !startsWith_1(encodedPath, '/');
|
|
2458
|
+
} else {
|
|
2459
|
+
tmp = false;
|
|
2460
|
+
}
|
|
2461
|
+
if (tmp) {
|
|
2462
|
+
_this__u8e3s4.r6(_Char___init__impl__6a9atx(47));
|
|
2463
|
+
}
|
|
2464
|
+
_this__u8e3s4.h(encodedPath);
|
|
2465
|
+
if (!encodedQueryParameters.l() || trailingQuery) {
|
|
2466
|
+
_this__u8e3s4.h('?');
|
|
2467
|
+
}
|
|
2468
|
+
// Inline function 'kotlin.collections.flatMap' call
|
|
2469
|
+
var tmp0 = encodedQueryParameters.y1i();
|
|
2470
|
+
// Inline function 'kotlin.collections.flatMapTo' call
|
|
2471
|
+
var destination = ArrayList_init_$Create$_0();
|
|
2472
|
+
var _iterator__ex2g4s = tmp0.i();
|
|
2473
|
+
while (_iterator__ex2g4s.j()) {
|
|
2474
|
+
var element = _iterator__ex2g4s.k();
|
|
2475
|
+
// Inline function 'kotlin.collections.component1' call
|
|
2476
|
+
var key = element.t();
|
|
2477
|
+
// Inline function 'kotlin.collections.component2' call
|
|
2478
|
+
var value = element.u();
|
|
2479
|
+
var tmp_0;
|
|
2480
|
+
if (value.l()) {
|
|
2481
|
+
tmp_0 = listOf_0(to(key, null));
|
|
2482
|
+
} else {
|
|
2483
|
+
// Inline function 'kotlin.collections.map' call
|
|
2484
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
2485
|
+
var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(value, 10));
|
|
2486
|
+
var _iterator__ex2g4s_0 = value.i();
|
|
2487
|
+
while (_iterator__ex2g4s_0.j()) {
|
|
2488
|
+
var item = _iterator__ex2g4s_0.k();
|
|
2489
|
+
var tmp$ret$3 = to(key, item);
|
|
2490
|
+
destination_0.g(tmp$ret$3);
|
|
2491
|
+
}
|
|
2492
|
+
tmp_0 = destination_0;
|
|
2493
|
+
}
|
|
2494
|
+
var list = tmp_0;
|
|
2495
|
+
addAll(destination, list);
|
|
2496
|
+
}
|
|
2497
|
+
var tmp_1 = destination;
|
|
2498
|
+
joinTo(tmp_1, _this__u8e3s4, '&', VOID, VOID, VOID, VOID, appendUrlFullPath$lambda);
|
|
2499
|
+
}
|
|
2500
|
+
function appendUserAndPassword(_this__u8e3s4, encodedUser, encodedPassword) {
|
|
2501
|
+
if (encodedUser == null) {
|
|
2502
|
+
return Unit_instance;
|
|
2503
|
+
}
|
|
2504
|
+
_this__u8e3s4.q6(encodedUser);
|
|
2505
|
+
if (!(encodedPassword == null)) {
|
|
2506
|
+
_this__u8e3s4.r6(_Char___init__impl__6a9atx(58));
|
|
2507
|
+
_this__u8e3s4.q6(encodedPassword);
|
|
2508
|
+
}
|
|
2509
|
+
_this__u8e3s4.q6('@');
|
|
2510
|
+
}
|
|
2511
|
+
function URLBuilder_0(urlString) {
|
|
2512
|
+
return takeFrom(new URLBuilder(), urlString);
|
|
2513
|
+
}
|
|
2514
|
+
function get_hostWithPortIfSpecified(_this__u8e3s4) {
|
|
2515
|
+
var tmp0_subject = _this__u8e3s4.m1x_1;
|
|
2516
|
+
return tmp0_subject === 0 || tmp0_subject === _this__u8e3s4.x1x_1.j1x_1 ? _this__u8e3s4.l1x_1 : get_hostWithPort(_this__u8e3s4);
|
|
2517
|
+
}
|
|
2518
|
+
function get_hostWithPort(_this__u8e3s4) {
|
|
2519
|
+
return _this__u8e3s4.l1x_1 + ':' + _this__u8e3s4.w1y();
|
|
2520
|
+
}
|
|
2521
|
+
function appendUrlFullPath$lambda(it) {
|
|
2522
|
+
var key = it.oc_1;
|
|
2523
|
+
var tmp;
|
|
2524
|
+
if (it.pc_1 == null) {
|
|
2525
|
+
tmp = key;
|
|
2526
|
+
} else {
|
|
2527
|
+
var value = toString_1(it.pc_1);
|
|
2528
|
+
tmp = key + '=' + value;
|
|
2529
|
+
}
|
|
2530
|
+
return tmp;
|
|
2531
|
+
}
|
|
2532
|
+
function Companion_8() {
|
|
2533
|
+
}
|
|
2534
|
+
var Companion_instance_8;
|
|
2535
|
+
function Companion_getInstance_8() {
|
|
2536
|
+
return Companion_instance_8;
|
|
2537
|
+
}
|
|
2538
|
+
function Url$segments$delegate$lambda($pathSegments) {
|
|
2539
|
+
return function () {
|
|
2540
|
+
var tmp;
|
|
2541
|
+
if ($pathSegments.l()) {
|
|
2542
|
+
return emptyList();
|
|
2543
|
+
}
|
|
2544
|
+
var tmp_0;
|
|
2545
|
+
var tmp_1;
|
|
2546
|
+
// Inline function 'kotlin.text.isEmpty' call
|
|
2547
|
+
var this_0 = first_0($pathSegments);
|
|
2548
|
+
if (charSequenceLength(this_0) === 0) {
|
|
2549
|
+
tmp_1 = $pathSegments.n() > 1;
|
|
2550
|
+
} else {
|
|
2551
|
+
tmp_1 = false;
|
|
2552
|
+
}
|
|
2553
|
+
if (tmp_1) {
|
|
2554
|
+
tmp_0 = 1;
|
|
2555
|
+
} else {
|
|
2556
|
+
tmp_0 = 0;
|
|
2557
|
+
}
|
|
2558
|
+
var start = tmp_0;
|
|
2559
|
+
var tmp_2;
|
|
2560
|
+
// Inline function 'kotlin.text.isEmpty' call
|
|
2561
|
+
var this_1 = last($pathSegments);
|
|
2562
|
+
if (charSequenceLength(this_1) === 0) {
|
|
2563
|
+
tmp_2 = get_lastIndex($pathSegments);
|
|
2564
|
+
} else {
|
|
2565
|
+
tmp_2 = get_lastIndex($pathSegments) + 1 | 0;
|
|
2566
|
+
}
|
|
2567
|
+
var end = tmp_2;
|
|
2568
|
+
return $pathSegments.m1(start, end);
|
|
2569
|
+
};
|
|
2570
|
+
}
|
|
2571
|
+
function Url$encodedPath$delegate$lambda($pathSegments, this$0) {
|
|
2572
|
+
return function () {
|
|
2573
|
+
var tmp;
|
|
2574
|
+
if ($pathSegments.l()) {
|
|
2575
|
+
return '';
|
|
2576
|
+
}
|
|
2577
|
+
var pathStartIndex = indexOf(this$0.s1x_1, _Char___init__impl__6a9atx(47), this$0.x1x_1.i1x_1.length + 3 | 0);
|
|
2578
|
+
var tmp_0;
|
|
2579
|
+
if (pathStartIndex === -1) {
|
|
2580
|
+
return '';
|
|
2581
|
+
}
|
|
2582
|
+
// Inline function 'kotlin.charArrayOf' call
|
|
2583
|
+
var tmp$ret$0 = charArrayOf([_Char___init__impl__6a9atx(63), _Char___init__impl__6a9atx(35)]);
|
|
2584
|
+
var pathEndIndex = indexOfAny(this$0.s1x_1, tmp$ret$0, pathStartIndex);
|
|
2585
|
+
var tmp_1;
|
|
2586
|
+
if (pathEndIndex === -1) {
|
|
2587
|
+
return substring_0(this$0.s1x_1, pathStartIndex);
|
|
2588
|
+
}
|
|
2589
|
+
return substring(this$0.s1x_1, pathStartIndex, pathEndIndex);
|
|
2590
|
+
};
|
|
2591
|
+
}
|
|
2592
|
+
function Url$encodedQuery$delegate$lambda(this$0) {
|
|
2593
|
+
return function () {
|
|
2594
|
+
var queryStart = indexOf(this$0.s1x_1, _Char___init__impl__6a9atx(63)) + 1 | 0;
|
|
2595
|
+
var tmp;
|
|
2596
|
+
if (queryStart === 0) {
|
|
2597
|
+
return '';
|
|
2598
|
+
}
|
|
2599
|
+
var queryEnd = indexOf(this$0.s1x_1, _Char___init__impl__6a9atx(35), queryStart);
|
|
2600
|
+
var tmp_0;
|
|
2601
|
+
if (queryEnd === -1) {
|
|
2602
|
+
return substring_0(this$0.s1x_1, queryStart);
|
|
2603
|
+
}
|
|
2604
|
+
return substring(this$0.s1x_1, queryStart, queryEnd);
|
|
2605
|
+
};
|
|
2606
|
+
}
|
|
2607
|
+
function Url$encodedPathAndQuery$delegate$lambda(this$0) {
|
|
2608
|
+
return function () {
|
|
2609
|
+
var pathStart = indexOf(this$0.s1x_1, _Char___init__impl__6a9atx(47), this$0.x1x_1.i1x_1.length + 3 | 0);
|
|
2610
|
+
var tmp;
|
|
2611
|
+
if (pathStart === -1) {
|
|
2612
|
+
return '';
|
|
2613
|
+
}
|
|
2614
|
+
var queryEnd = indexOf(this$0.s1x_1, _Char___init__impl__6a9atx(35), pathStart);
|
|
2615
|
+
var tmp_0;
|
|
2616
|
+
if (queryEnd === -1) {
|
|
2617
|
+
return substring_0(this$0.s1x_1, pathStart);
|
|
2618
|
+
}
|
|
2619
|
+
return substring(this$0.s1x_1, pathStart, queryEnd);
|
|
2620
|
+
};
|
|
2621
|
+
}
|
|
2622
|
+
function Url$encodedUser$delegate$lambda(this$0) {
|
|
2623
|
+
return function () {
|
|
2624
|
+
var tmp;
|
|
2625
|
+
if (this$0.p1x_1 == null) {
|
|
2626
|
+
return null;
|
|
2627
|
+
}
|
|
2628
|
+
var tmp_0;
|
|
2629
|
+
// Inline function 'kotlin.text.isEmpty' call
|
|
2630
|
+
var this_0 = this$0.p1x_1;
|
|
2631
|
+
if (charSequenceLength(this_0) === 0) {
|
|
2632
|
+
return '';
|
|
2633
|
+
}
|
|
2634
|
+
var usernameStart = this$0.x1x_1.i1x_1.length + 3 | 0;
|
|
2635
|
+
// Inline function 'kotlin.charArrayOf' call
|
|
2636
|
+
var tmp$ret$1 = charArrayOf([_Char___init__impl__6a9atx(58), _Char___init__impl__6a9atx(64)]);
|
|
2637
|
+
var usernameEnd = indexOfAny(this$0.s1x_1, tmp$ret$1, usernameStart);
|
|
2638
|
+
return substring(this$0.s1x_1, usernameStart, usernameEnd);
|
|
2639
|
+
};
|
|
2640
|
+
}
|
|
2641
|
+
function Url$_get_encodedUser_$ref_3lb9bi() {
|
|
2642
|
+
return function (p0) {
|
|
2643
|
+
return p0.x1y();
|
|
2644
|
+
};
|
|
2645
|
+
}
|
|
2646
|
+
function Url$encodedPassword$delegate$lambda(this$0) {
|
|
2647
|
+
return function () {
|
|
2648
|
+
var tmp;
|
|
2649
|
+
if (this$0.q1x_1 == null) {
|
|
2650
|
+
return null;
|
|
2651
|
+
}
|
|
2652
|
+
var tmp_0;
|
|
2653
|
+
// Inline function 'kotlin.text.isEmpty' call
|
|
2654
|
+
var this_0 = this$0.q1x_1;
|
|
2655
|
+
if (charSequenceLength(this_0) === 0) {
|
|
2656
|
+
return '';
|
|
2657
|
+
}
|
|
2658
|
+
var passwordStart = indexOf(this$0.s1x_1, _Char___init__impl__6a9atx(58), this$0.x1x_1.i1x_1.length + 3 | 0) + 1 | 0;
|
|
2659
|
+
var passwordEnd = indexOf(this$0.s1x_1, _Char___init__impl__6a9atx(64));
|
|
2660
|
+
return substring(this$0.s1x_1, passwordStart, passwordEnd);
|
|
2661
|
+
};
|
|
2662
|
+
}
|
|
2663
|
+
function Url$_get_encodedPassword_$ref_25ixc2() {
|
|
2664
|
+
return function (p0) {
|
|
2665
|
+
return p0.y1y();
|
|
2666
|
+
};
|
|
2667
|
+
}
|
|
2668
|
+
function Url$encodedFragment$delegate$lambda(this$0) {
|
|
2669
|
+
return function () {
|
|
2670
|
+
var fragmentStart = indexOf(this$0.s1x_1, _Char___init__impl__6a9atx(35)) + 1 | 0;
|
|
2671
|
+
var tmp;
|
|
2672
|
+
if (fragmentStart === 0) {
|
|
2673
|
+
return '';
|
|
2674
|
+
}
|
|
2675
|
+
return substring_0(this$0.s1x_1, fragmentStart);
|
|
2676
|
+
};
|
|
2677
|
+
}
|
|
2678
|
+
function Url_0(protocol, host, specifiedPort, pathSegments, parameters, fragment, user, password, trailingQuery, urlString) {
|
|
2679
|
+
this.l1x_1 = host;
|
|
2680
|
+
this.m1x_1 = specifiedPort;
|
|
2681
|
+
this.n1x_1 = parameters;
|
|
2682
|
+
this.o1x_1 = fragment;
|
|
2683
|
+
this.p1x_1 = user;
|
|
2684
|
+
this.q1x_1 = password;
|
|
2685
|
+
this.r1x_1 = trailingQuery;
|
|
2686
|
+
this.s1x_1 = urlString;
|
|
2687
|
+
var containsArg = this.m1x_1;
|
|
2688
|
+
// Inline function 'kotlin.require' call
|
|
2689
|
+
if (!(0 <= containsArg ? containsArg <= 65535 : false)) {
|
|
2690
|
+
var message = 'Port must be between 0 and 65535, or 0 if not set. Provided: ' + this.m1x_1;
|
|
2691
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
2692
|
+
}
|
|
2693
|
+
this.t1x_1 = pathSegments;
|
|
2694
|
+
this.u1x_1 = pathSegments;
|
|
2695
|
+
var tmp = this;
|
|
2696
|
+
tmp.v1x_1 = lazy_0(Url$segments$delegate$lambda(pathSegments));
|
|
2697
|
+
this.w1x_1 = protocol;
|
|
2698
|
+
var tmp_0 = this;
|
|
2699
|
+
var tmp0_elvis_lhs = this.w1x_1;
|
|
2700
|
+
tmp_0.x1x_1 = tmp0_elvis_lhs == null ? Companion_getInstance_7().i1y_1 : tmp0_elvis_lhs;
|
|
2701
|
+
var tmp_1 = this;
|
|
2702
|
+
tmp_1.y1x_1 = lazy_0(Url$encodedPath$delegate$lambda(pathSegments, this));
|
|
2703
|
+
var tmp_2 = this;
|
|
2704
|
+
tmp_2.z1x_1 = lazy_0(Url$encodedQuery$delegate$lambda(this));
|
|
2705
|
+
var tmp_3 = this;
|
|
2706
|
+
tmp_3.a1y_1 = lazy_0(Url$encodedPathAndQuery$delegate$lambda(this));
|
|
2707
|
+
var tmp_4 = this;
|
|
2708
|
+
tmp_4.b1y_1 = lazy_0(Url$encodedUser$delegate$lambda(this));
|
|
2709
|
+
var tmp_5 = this;
|
|
2710
|
+
tmp_5.c1y_1 = lazy_0(Url$encodedPassword$delegate$lambda(this));
|
|
2711
|
+
var tmp_6 = this;
|
|
2712
|
+
tmp_6.d1y_1 = lazy_0(Url$encodedFragment$delegate$lambda(this));
|
|
2713
|
+
}
|
|
2714
|
+
protoOf(Url_0).w1y = function () {
|
|
2715
|
+
// Inline function 'kotlin.takeUnless' call
|
|
2716
|
+
var this_0 = this.m1x_1;
|
|
2717
|
+
var tmp;
|
|
2718
|
+
if (!(this_0 === 0)) {
|
|
2719
|
+
tmp = this_0;
|
|
2720
|
+
} else {
|
|
2721
|
+
tmp = null;
|
|
2722
|
+
}
|
|
2723
|
+
var tmp0_elvis_lhs = tmp;
|
|
2724
|
+
return tmp0_elvis_lhs == null ? this.x1x_1.j1x_1 : tmp0_elvis_lhs;
|
|
2725
|
+
};
|
|
2726
|
+
protoOf(Url_0).x1y = function () {
|
|
2727
|
+
var tmp0 = this.b1y_1;
|
|
2728
|
+
var tmp = KProperty1;
|
|
2729
|
+
// Inline function 'kotlin.getValue' call
|
|
2730
|
+
getPropertyCallableRef('encodedUser', 1, tmp, Url$_get_encodedUser_$ref_3lb9bi(), null);
|
|
2731
|
+
return tmp0.u();
|
|
2732
|
+
};
|
|
2733
|
+
protoOf(Url_0).y1y = function () {
|
|
2734
|
+
var tmp0 = this.c1y_1;
|
|
2735
|
+
var tmp = KProperty1;
|
|
2736
|
+
// Inline function 'kotlin.getValue' call
|
|
2737
|
+
getPropertyCallableRef('encodedPassword', 1, tmp, Url$_get_encodedPassword_$ref_25ixc2(), null);
|
|
2738
|
+
return tmp0.u();
|
|
2739
|
+
};
|
|
2740
|
+
protoOf(Url_0).toString = function () {
|
|
2741
|
+
return this.s1x_1;
|
|
2742
|
+
};
|
|
2743
|
+
protoOf(Url_0).equals = function (other) {
|
|
2744
|
+
if (this === other)
|
|
2745
|
+
return true;
|
|
2746
|
+
if (other == null || !getKClassFromExpression(this).equals(getKClassFromExpression(other)))
|
|
2747
|
+
return false;
|
|
2748
|
+
if (!(other instanceof Url_0))
|
|
2749
|
+
THROW_CCE();
|
|
2750
|
+
return this.s1x_1 === other.s1x_1;
|
|
2751
|
+
};
|
|
2752
|
+
protoOf(Url_0).hashCode = function () {
|
|
2753
|
+
return getStringHashCode(this.s1x_1);
|
|
2754
|
+
};
|
|
2755
|
+
function get_authority_0(_this__u8e3s4) {
|
|
2756
|
+
// Inline function 'kotlin.text.buildString' call
|
|
2757
|
+
// Inline function 'kotlin.apply' call
|
|
2758
|
+
var this_0 = StringBuilder_init_$Create$();
|
|
2759
|
+
this_0.q6(get_encodedUserAndPassword_0(_this__u8e3s4));
|
|
2760
|
+
this_0.q6(get_hostWithPortIfSpecified(_this__u8e3s4));
|
|
2761
|
+
return this_0.toString();
|
|
2762
|
+
}
|
|
2763
|
+
function get_encodedUserAndPassword_0(_this__u8e3s4) {
|
|
2764
|
+
// Inline function 'kotlin.text.buildString' call
|
|
2765
|
+
// Inline function 'kotlin.apply' call
|
|
2766
|
+
var this_0 = StringBuilder_init_$Create$();
|
|
2767
|
+
appendUserAndPassword(this_0, _this__u8e3s4.x1y(), _this__u8e3s4.y1y());
|
|
2768
|
+
return this_0.toString();
|
|
2769
|
+
}
|
|
2770
|
+
function UrlDecodedParametersBuilder(encodedParametersBuilder) {
|
|
2771
|
+
this.z1y_1 = encodedParametersBuilder;
|
|
2772
|
+
this.a1z_1 = this.z1y_1.a1j();
|
|
2773
|
+
}
|
|
2774
|
+
protoOf(UrlDecodedParametersBuilder).s1p = function () {
|
|
2775
|
+
return decodeParameters(this.z1y_1);
|
|
2776
|
+
};
|
|
2777
|
+
protoOf(UrlDecodedParametersBuilder).a1j = function () {
|
|
2778
|
+
return this.a1z_1;
|
|
2779
|
+
};
|
|
2780
|
+
protoOf(UrlDecodedParametersBuilder).b1j = function (name) {
|
|
2781
|
+
var tmp0_safe_receiver = this.z1y_1.b1j(encodeURLParameter(name));
|
|
2782
|
+
var tmp;
|
|
2783
|
+
if (tmp0_safe_receiver == null) {
|
|
2784
|
+
tmp = null;
|
|
2785
|
+
} else {
|
|
2786
|
+
// Inline function 'kotlin.collections.map' call
|
|
2787
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
2788
|
+
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(tmp0_safe_receiver, 10));
|
|
2789
|
+
var _iterator__ex2g4s = tmp0_safe_receiver.i();
|
|
2790
|
+
while (_iterator__ex2g4s.j()) {
|
|
2791
|
+
var item = _iterator__ex2g4s.k();
|
|
2792
|
+
var tmp$ret$0 = decodeURLQueryComponent(item, VOID, VOID, true);
|
|
2793
|
+
destination.g(tmp$ret$0);
|
|
2794
|
+
}
|
|
2795
|
+
tmp = destination;
|
|
2796
|
+
}
|
|
2797
|
+
return tmp;
|
|
2798
|
+
};
|
|
2799
|
+
protoOf(UrlDecodedParametersBuilder).c1j = function () {
|
|
2800
|
+
// Inline function 'kotlin.collections.map' call
|
|
2801
|
+
var this_0 = this.z1y_1.c1j();
|
|
2802
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
2803
|
+
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
2804
|
+
var _iterator__ex2g4s = this_0.i();
|
|
2805
|
+
while (_iterator__ex2g4s.j()) {
|
|
2806
|
+
var item = _iterator__ex2g4s.k();
|
|
2807
|
+
var tmp$ret$0 = decodeURLQueryComponent(item);
|
|
2808
|
+
destination.g(tmp$ret$0);
|
|
2809
|
+
}
|
|
2810
|
+
return toSet(destination);
|
|
2811
|
+
};
|
|
2812
|
+
protoOf(UrlDecodedParametersBuilder).l = function () {
|
|
2813
|
+
return this.z1y_1.l();
|
|
2814
|
+
};
|
|
2815
|
+
protoOf(UrlDecodedParametersBuilder).y1i = function () {
|
|
2816
|
+
return decodeParameters(this.z1y_1).y1i();
|
|
2817
|
+
};
|
|
2818
|
+
protoOf(UrlDecodedParametersBuilder).j1j = function (name, value) {
|
|
2819
|
+
return this.z1y_1.j1j(encodeURLParameter(name), encodeURLParameterValue(value));
|
|
2820
|
+
};
|
|
2821
|
+
protoOf(UrlDecodedParametersBuilder).z1i = function (name, values) {
|
|
2822
|
+
var tmp = encodeURLParameter(name);
|
|
2823
|
+
// Inline function 'kotlin.collections.map' call
|
|
2824
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
2825
|
+
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(values, 10));
|
|
2826
|
+
var _iterator__ex2g4s = values.i();
|
|
2827
|
+
while (_iterator__ex2g4s.j()) {
|
|
2828
|
+
var item = _iterator__ex2g4s.k();
|
|
2829
|
+
var tmp$ret$0 = encodeURLParameterValue(item);
|
|
2830
|
+
destination.g(tmp$ret$0);
|
|
2831
|
+
}
|
|
2832
|
+
return this.z1y_1.z1i(tmp, destination);
|
|
2833
|
+
};
|
|
2834
|
+
protoOf(UrlDecodedParametersBuilder).r1 = function () {
|
|
2835
|
+
return this.z1y_1.r1();
|
|
2836
|
+
};
|
|
2837
|
+
function encodeParameters(parameters) {
|
|
2838
|
+
// Inline function 'kotlin.apply' call
|
|
2839
|
+
var this_0 = ParametersBuilder();
|
|
2840
|
+
appendAllEncoded(this_0, parameters);
|
|
2841
|
+
return this_0;
|
|
2842
|
+
}
|
|
2843
|
+
function decodeParameters(parameters) {
|
|
2844
|
+
// Inline function 'kotlin.apply' call
|
|
2845
|
+
var this_0 = ParametersBuilder();
|
|
2846
|
+
appendAllDecoded(this_0, parameters);
|
|
2847
|
+
return this_0.s1p();
|
|
2848
|
+
}
|
|
2849
|
+
function appendAllEncoded(_this__u8e3s4, parameters) {
|
|
2850
|
+
// Inline function 'kotlin.collections.forEach' call
|
|
2851
|
+
var _iterator__ex2g4s = parameters.c1j().i();
|
|
2852
|
+
while (_iterator__ex2g4s.j()) {
|
|
2853
|
+
var element = _iterator__ex2g4s.k();
|
|
2854
|
+
var tmp0_elvis_lhs = parameters.b1j(element);
|
|
2855
|
+
var values = tmp0_elvis_lhs == null ? emptyList() : tmp0_elvis_lhs;
|
|
2856
|
+
var tmp = encodeURLParameter(element);
|
|
2857
|
+
// Inline function 'kotlin.collections.map' call
|
|
2858
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
2859
|
+
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(values, 10));
|
|
2860
|
+
var _iterator__ex2g4s_0 = values.i();
|
|
2861
|
+
while (_iterator__ex2g4s_0.j()) {
|
|
2862
|
+
var item = _iterator__ex2g4s_0.k();
|
|
2863
|
+
var tmp$ret$0 = encodeURLParameterValue(item);
|
|
2864
|
+
destination.g(tmp$ret$0);
|
|
2865
|
+
}
|
|
2866
|
+
_this__u8e3s4.z1i(tmp, destination);
|
|
2867
|
+
}
|
|
2868
|
+
}
|
|
2869
|
+
function appendAllDecoded(_this__u8e3s4, parameters) {
|
|
2870
|
+
// Inline function 'kotlin.collections.forEach' call
|
|
2871
|
+
var _iterator__ex2g4s = parameters.c1j().i();
|
|
2872
|
+
while (_iterator__ex2g4s.j()) {
|
|
2873
|
+
var element = _iterator__ex2g4s.k();
|
|
2874
|
+
var tmp0_elvis_lhs = parameters.b1j(element);
|
|
2875
|
+
var values = tmp0_elvis_lhs == null ? emptyList() : tmp0_elvis_lhs;
|
|
2876
|
+
var tmp = decodeURLQueryComponent(element);
|
|
2877
|
+
// Inline function 'kotlin.collections.map' call
|
|
2878
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
2879
|
+
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(values, 10));
|
|
2880
|
+
var _iterator__ex2g4s_0 = values.i();
|
|
2881
|
+
while (_iterator__ex2g4s_0.j()) {
|
|
2882
|
+
var item = _iterator__ex2g4s_0.k();
|
|
2883
|
+
var tmp$ret$0 = decodeURLQueryComponent(item, VOID, VOID, true);
|
|
2884
|
+
destination.g(tmp$ret$0);
|
|
2885
|
+
}
|
|
2886
|
+
_this__u8e3s4.z1i(tmp, destination);
|
|
2887
|
+
}
|
|
2888
|
+
}
|
|
2889
|
+
function MultiPartData() {
|
|
2890
|
+
}
|
|
2891
|
+
function NoContent() {
|
|
2892
|
+
OutgoingContent.call(this);
|
|
2893
|
+
}
|
|
2894
|
+
function ReadChannelContent() {
|
|
2895
|
+
OutgoingContent.call(this);
|
|
2896
|
+
}
|
|
2897
|
+
function WriteChannelContent() {
|
|
2898
|
+
}
|
|
2899
|
+
function ByteArrayContent() {
|
|
2900
|
+
OutgoingContent.call(this);
|
|
2901
|
+
}
|
|
2902
|
+
function ProtocolUpgrade() {
|
|
2903
|
+
}
|
|
2904
|
+
function ContentWrapper() {
|
|
2905
|
+
}
|
|
2906
|
+
protoOf(ContentWrapper).m1z = function () {
|
|
2907
|
+
return this.l1z_1;
|
|
2908
|
+
};
|
|
2909
|
+
function OutgoingContent() {
|
|
2910
|
+
this.b1z_1 = null;
|
|
2911
|
+
}
|
|
2912
|
+
protoOf(OutgoingContent).c1z = function () {
|
|
2913
|
+
return null;
|
|
2914
|
+
};
|
|
2915
|
+
protoOf(OutgoingContent).d1z = function () {
|
|
2916
|
+
return null;
|
|
2917
|
+
};
|
|
2918
|
+
protoOf(OutgoingContent).w1t = function () {
|
|
2919
|
+
return Companion_getInstance_1().p1p_1;
|
|
2920
|
+
};
|
|
2921
|
+
function NullBody() {
|
|
2922
|
+
}
|
|
2923
|
+
var NullBody_instance;
|
|
2924
|
+
function NullBody_getInstance() {
|
|
2925
|
+
return NullBody_instance;
|
|
2926
|
+
}
|
|
2927
|
+
function isEmpty(_this__u8e3s4) {
|
|
2928
|
+
var tmp;
|
|
2929
|
+
if (_this__u8e3s4 instanceof NoContent) {
|
|
2930
|
+
tmp = true;
|
|
2931
|
+
} else {
|
|
2932
|
+
if (_this__u8e3s4 instanceof ContentWrapper) {
|
|
2933
|
+
tmp = isEmpty(_this__u8e3s4.m1z());
|
|
2934
|
+
} else {
|
|
2935
|
+
tmp = false;
|
|
2936
|
+
}
|
|
2937
|
+
}
|
|
2938
|
+
return tmp;
|
|
2939
|
+
}
|
|
2940
|
+
function TextContent(text, contentType, status) {
|
|
2941
|
+
status = status === VOID ? null : status;
|
|
2942
|
+
ByteArrayContent.call(this);
|
|
2943
|
+
this.o1z_1 = text;
|
|
2944
|
+
this.p1z_1 = contentType;
|
|
2945
|
+
this.q1z_1 = status;
|
|
2946
|
+
var tmp = this;
|
|
2947
|
+
var tmp0_elvis_lhs = charset(this.p1z_1);
|
|
2948
|
+
tmp.r1z_1 = toByteArray(this.o1z_1, tmp0_elvis_lhs == null ? Charsets_getInstance().r1d_1 : tmp0_elvis_lhs);
|
|
2949
|
+
}
|
|
2950
|
+
protoOf(TextContent).c1z = function () {
|
|
2951
|
+
return this.p1z_1;
|
|
2952
|
+
};
|
|
2953
|
+
protoOf(TextContent).d1z = function () {
|
|
2954
|
+
return fromInt(this.r1z_1.length);
|
|
2955
|
+
};
|
|
2956
|
+
protoOf(TextContent).j1z = function () {
|
|
2957
|
+
return this.r1z_1;
|
|
2958
|
+
};
|
|
2959
|
+
protoOf(TextContent).toString = function () {
|
|
2960
|
+
return 'TextContent[' + this.p1z_1.toString() + '] "' + take(this.o1z_1, 30) + '"';
|
|
2961
|
+
};
|
|
2962
|
+
function get_origin(_this__u8e3s4) {
|
|
2963
|
+
return PlatformUtils_getInstance().q1i_1 ? locationOrigin() : 'http://localhost';
|
|
2964
|
+
}
|
|
2965
|
+
function locationOrigin() {
|
|
2966
|
+
return function () {
|
|
2967
|
+
var tmpLocation = null;
|
|
2968
|
+
if (typeof window !== 'undefined') {
|
|
2969
|
+
tmpLocation = window.location;
|
|
2970
|
+
} else if (typeof self !== 'undefined') {
|
|
2971
|
+
tmpLocation = self.location;
|
|
2972
|
+
}
|
|
2973
|
+
var origin = '';
|
|
2974
|
+
if (tmpLocation) {
|
|
2975
|
+
origin = tmpLocation.origin;
|
|
2976
|
+
}
|
|
2977
|
+
return origin && origin != 'null' ? origin : 'http://localhost';
|
|
2978
|
+
}();
|
|
2979
|
+
}
|
|
2980
|
+
//region block: post-declaration
|
|
2981
|
+
protoOf(EmptyHeaders).v1h = get;
|
|
2982
|
+
protoOf(EmptyHeaders).d1j = forEach;
|
|
2983
|
+
protoOf(EmptyParameters).v1h = get;
|
|
2984
|
+
protoOf(EmptyParameters).d1j = forEach;
|
|
2985
|
+
//endregion
|
|
2986
|
+
//region block: init
|
|
2987
|
+
Companion_instance_0 = new Companion_0();
|
|
2988
|
+
EmptyHeaders_instance = new EmptyHeaders();
|
|
2989
|
+
EmptyParameters_instance = new EmptyParameters();
|
|
2990
|
+
Companion_instance_8 = new Companion_8();
|
|
2991
|
+
NullBody_instance = new NullBody();
|
|
2992
|
+
//endregion
|
|
2993
|
+
//region block: exports
|
|
2994
|
+
_.$_$ = _.$_$ || {};
|
|
2995
|
+
_.$_$.a = NullBody_instance;
|
|
2996
|
+
_.$_$.b = Application_getInstance;
|
|
2997
|
+
_.$_$.c = Companion_getInstance;
|
|
2998
|
+
_.$_$.d = MultiPart_getInstance;
|
|
2999
|
+
_.$_$.e = Text_getInstance;
|
|
3000
|
+
_.$_$.f = Companion_getInstance_1;
|
|
3001
|
+
_.$_$.g = HttpHeaders_getInstance;
|
|
3002
|
+
_.$_$.h = Companion_getInstance_2;
|
|
3003
|
+
_.$_$.i = Companion_getInstance_3;
|
|
3004
|
+
_.$_$.j = Companion_getInstance_4;
|
|
3005
|
+
_.$_$.k = MultiPartData;
|
|
3006
|
+
_.$_$.l = NullBody;
|
|
3007
|
+
_.$_$.m = ByteArrayContent;
|
|
3008
|
+
_.$_$.n = ContentWrapper;
|
|
3009
|
+
_.$_$.o = NoContent;
|
|
3010
|
+
_.$_$.p = ProtocolUpgrade;
|
|
3011
|
+
_.$_$.q = ReadChannelContent;
|
|
3012
|
+
_.$_$.r = WriteChannelContent;
|
|
3013
|
+
_.$_$.s = OutgoingContent;
|
|
3014
|
+
_.$_$.t = TextContent;
|
|
3015
|
+
_.$_$.u = isEmpty;
|
|
3016
|
+
_.$_$.v = HeadersBuilder;
|
|
3017
|
+
_.$_$.w = HttpStatusCode;
|
|
3018
|
+
_.$_$.x = URLBuilder;
|
|
3019
|
+
_.$_$.y = UnsafeHeaderException;
|
|
3020
|
+
_.$_$.z = get_authority;
|
|
3021
|
+
_.$_$.a1 = get_authority_0;
|
|
3022
|
+
_.$_$.b1 = charset_0;
|
|
3023
|
+
_.$_$.c1 = charset;
|
|
3024
|
+
_.$_$.d1 = contentLength;
|
|
3025
|
+
_.$_$.e1 = contentType;
|
|
3026
|
+
_.$_$.f1 = headersOf;
|
|
3027
|
+
_.$_$.g1 = isSecure;
|
|
3028
|
+
_.$_$.h1 = get_supportsRequestBody;
|
|
3029
|
+
_.$_$.i1 = takeFrom_0;
|
|
3030
|
+
_.$_$.j1 = takeFrom;
|
|
3031
|
+
_.$_$.k1 = withCharset;
|
|
11
3032
|
//endregion
|
|
12
3033
|
return _;
|
|
13
3034
|
}));
|