@solibo/home-api 1.15.15 → 1.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Kotlin-DateTime-library-kotlinx-datetime.mjs +1019 -943
- package/Kotlin-DateTime-library-kotlinx-datetime.mjs.map +1 -0
- package/MultiplatformSettings-multiplatform-settings-no-arg.mjs +1 -1
- package/MultiplatformSettings-multiplatform-settings-no-arg.mjs.map +1 -0
- package/MultiplatformSettings-multiplatform-settings.mjs +1 -1
- package/MultiplatformSettings-multiplatform-settings.mjs.map +1 -0
- package/kotlin-kotlin-stdlib.mjs +2223 -1914
- package/kotlin-kotlin-stdlib.mjs.map +1 -0
- package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.mjs +1 -1
- package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.mjs.map +1 -0
- package/kotlinx-atomicfu.mjs +14 -14
- package/kotlinx-atomicfu.mjs.map +1 -0
- package/kotlinx-browser.mjs +1 -1
- package/kotlinx-browser.mjs.map +1 -0
- package/kotlinx-coroutines-core.mjs +2307 -2247
- package/kotlinx-coroutines-core.mjs.map +1 -0
- package/kotlinx-io-kotlinx-io-bytestring.mjs +41 -41
- package/kotlinx-io-kotlinx-io-bytestring.mjs.map +1 -0
- package/kotlinx-io-kotlinx-io-core.mjs +474 -470
- package/kotlinx-io-kotlinx-io-core.mjs.map +1 -0
- package/kotlinx-serialization-kotlinx-serialization-core.mjs +1909 -1910
- package/kotlinx-serialization-kotlinx-serialization-core.mjs.map +1 -0
- package/kotlinx-serialization-kotlinx-serialization-json-io.mjs +1 -1
- package/kotlinx-serialization-kotlinx-serialization-json-io.mjs.map +1 -0
- package/kotlinx-serialization-kotlinx-serialization-json.mjs +1986 -1658
- package/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -0
- package/ktor-ktor-client-auth.mjs +1 -1
- package/ktor-ktor-client-auth.mjs.map +1 -0
- package/ktor-ktor-client-content-negotiation.mjs +260 -234
- package/ktor-ktor-client-content-negotiation.mjs.map +1 -0
- package/ktor-ktor-client-core.mjs +3240 -3326
- package/ktor-ktor-client-core.mjs.map +1 -0
- package/ktor-ktor-client-encoding.mjs +1 -1
- package/ktor-ktor-client-encoding.mjs.map +1 -0
- package/ktor-ktor-client-logging.mjs +1 -1
- package/ktor-ktor-client-logging.mjs.map +1 -0
- package/ktor-ktor-client-websockets.mjs +1 -1
- package/ktor-ktor-client-websockets.mjs.map +1 -0
- package/ktor-ktor-events.mjs +8 -8
- package/ktor-ktor-events.mjs.map +1 -0
- package/ktor-ktor-http-cio.mjs +525 -530
- package/ktor-ktor-http-cio.mjs.map +1 -0
- package/ktor-ktor-http.mjs +735 -766
- package/ktor-ktor-http.mjs.map +1 -0
- package/ktor-ktor-io.mjs +1502 -1279
- package/ktor-ktor-io.mjs.map +1 -0
- package/ktor-ktor-serialization-kotlinx-json.mjs +10 -10
- package/ktor-ktor-serialization-kotlinx-json.mjs.map +1 -0
- package/ktor-ktor-serialization-kotlinx.mjs +272 -389
- package/ktor-ktor-serialization-kotlinx.mjs.map +1 -0
- package/ktor-ktor-serialization.mjs +113 -142
- package/ktor-ktor-serialization.mjs.map +1 -0
- package/ktor-ktor-sse.mjs +1 -1
- package/ktor-ktor-sse.mjs.map +1 -0
- package/ktor-ktor-utils.mjs +812 -787
- package/ktor-ktor-utils.mjs.map +1 -0
- package/ktor-ktor-websocket-serialization.mjs +1 -1
- package/ktor-ktor-websocket-serialization.mjs.map +1 -0
- package/ktor-ktor-websockets.mjs +901 -862
- package/ktor-ktor-websockets.mjs.map +1 -0
- package/package.json +2 -2
- package/solibo-sdk-sdk-home-api.d.mts +127 -14
- package/solibo-sdk-sdk-home-api.mjs +110003 -108257
- package/solibo-sdk-sdk-home-api.mjs.map +1 -0
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
import {
|
|
2
|
-
IndexOutOfBoundsException_init_$Create$
|
|
3
|
-
IllegalArgumentException_init_$Create$
|
|
2
|
+
IndexOutOfBoundsException_init_$Create$1dzbcrcoqjvjq as IndexOutOfBoundsException_init_$Create$,
|
|
3
|
+
IllegalArgumentException_init_$Create$1mgk48flhjim3 as IllegalArgumentException_init_$Create$,
|
|
4
4
|
subtract2orl8z9upxd9l as subtract,
|
|
5
|
-
|
|
5
|
+
_Char___init__impl__6a9atx2yltdocdrxs4d as _Char___init__impl__6a9atx,
|
|
6
6
|
charArrayOf27f4r3dozbrk1 as charArrayOf,
|
|
7
7
|
protoOf180f3jzyo7rfj as protoOf,
|
|
8
8
|
toString1pkumu07cwy4m as toString,
|
|
9
|
-
|
|
9
|
+
Unit_instance3vdlo4e4f5ggx as Unit_instance,
|
|
10
10
|
toShort36kaw0zjdq3ex as toShort,
|
|
11
11
|
add2suhfggl4zvkk as add,
|
|
12
12
|
ensureNotNull1e947j3ixpazm as ensureNotNull,
|
|
13
13
|
fromInt2ii0rejb1w62w as fromInt,
|
|
14
14
|
convertToInty04h231mmjoh as convertToInt,
|
|
15
|
-
StringBuilder_init_$Create$
|
|
15
|
+
StringBuilder_init_$Create$3q4yitjcnfjo as StringBuilder_init_$Create$,
|
|
16
16
|
initMetadataForClassbxx6q50dy2s7 as initMetadataForClass,
|
|
17
17
|
VOID3gxj6tk5isa35 as VOID,
|
|
18
|
-
IllegalStateException_init_$Create$
|
|
18
|
+
IllegalStateException_init_$Create$3394faf8tdm0h as IllegalStateException_init_$Create$,
|
|
19
19
|
AutoCloseable1l5p57f9lp7kv as AutoCloseable,
|
|
20
20
|
objectCreate1ve4bgxiu4x98 as objectCreate,
|
|
21
21
|
initMetadataForCompanion1wyw17z38v6ac as initMetadataForCompanion,
|
|
22
22
|
arrayCopytctsywo3h7gj as arrayCopy,
|
|
23
23
|
toByte4i43936u611k as toByte,
|
|
24
|
-
IllegalArgumentException_init_$Create$
|
|
24
|
+
IllegalArgumentException_init_$Create$3iqt7dot1ye95 as IllegalArgumentException_init_$Create$_0,
|
|
25
25
|
initMetadataForObject1cxne3s9w65el as initMetadataForObject,
|
|
26
26
|
initMetadataForInterface1egvbzx539z91 as initMetadataForInterface,
|
|
27
27
|
multiply2k9eolhnz1bjv as multiply,
|
|
28
28
|
charCodeAt1yspne1d8erbm as charCodeAt,
|
|
29
|
-
|
|
29
|
+
Char__toInt_impl_vasixd1ka89vowck9tn as Char__toInt_impl_vasixd,
|
|
30
30
|
charArray2ujmm1qusno00 as charArray,
|
|
31
31
|
numberToChar93r9buh19yek as numberToChar,
|
|
32
32
|
concatToString3cxf0c1gqonpo as concatToString,
|
|
33
|
-
Exception_init_$Init$
|
|
33
|
+
Exception_init_$Init$2vwhrp06ljvx1 as Exception_init_$Init$,
|
|
34
34
|
captureStack1fzi4aczwc4hg as captureStack,
|
|
35
|
-
Exception_init_$Init$
|
|
36
|
-
Exception_init_$Init$
|
|
35
|
+
Exception_init_$Init$1ksq2fk0jxaag as Exception_init_$Init$_0,
|
|
36
|
+
Exception_init_$Init$1h6nhjelrr18t as Exception_init_$Init$_1,
|
|
37
37
|
Exceptiondt2hlxn7j7vw as Exception,
|
|
38
38
|
} from './kotlin-kotlin-stdlib.mjs';
|
|
39
|
-
import {
|
|
39
|
+
import { UnsafeByteStringOperations_instance32go50d8u0bll as UnsafeByteStringOperations_instance } from './kotlinx-io-kotlinx-io-bytestring.mjs';
|
|
40
40
|
//region block: imports
|
|
41
41
|
var imul = Math.imul;
|
|
42
42
|
//endregion
|
|
@@ -47,10 +47,10 @@ function write$default(source, startIndex, endIndex, $super) {
|
|
|
47
47
|
endIndex = endIndex === VOID ? source.length : endIndex;
|
|
48
48
|
var tmp;
|
|
49
49
|
if ($super === VOID) {
|
|
50
|
-
this.
|
|
50
|
+
this.gq(source, startIndex, endIndex);
|
|
51
51
|
tmp = Unit_instance;
|
|
52
52
|
} else {
|
|
53
|
-
tmp = $super.
|
|
53
|
+
tmp = $super.gq.call(this, source, startIndex, endIndex);
|
|
54
54
|
}
|
|
55
55
|
return tmp;
|
|
56
56
|
}
|
|
@@ -102,20 +102,20 @@ function throwEof($this, byteCount) {
|
|
|
102
102
|
throw EOFException_init_$Create$_0("Buffer doesn't contain required number of bytes (size: " + $this.g1().toString() + ', required: ' + byteCount.toString() + ')');
|
|
103
103
|
}
|
|
104
104
|
function Buffer() {
|
|
105
|
-
this.
|
|
106
|
-
this.
|
|
107
|
-
this.
|
|
105
|
+
this.to_1 = null;
|
|
106
|
+
this.uo_1 = null;
|
|
107
|
+
this.vo_1 = 0n;
|
|
108
108
|
}
|
|
109
109
|
protoOf(Buffer).g1 = function () {
|
|
110
|
-
return this.
|
|
110
|
+
return this.vo_1;
|
|
111
111
|
};
|
|
112
|
-
protoOf(Buffer).
|
|
112
|
+
protoOf(Buffer).wo = function () {
|
|
113
113
|
return this;
|
|
114
114
|
};
|
|
115
|
-
protoOf(Buffer).
|
|
115
|
+
protoOf(Buffer).xo = function () {
|
|
116
116
|
return this.g1() === 0n;
|
|
117
117
|
};
|
|
118
|
-
protoOf(Buffer).
|
|
118
|
+
protoOf(Buffer).yo = function (byteCount) {
|
|
119
119
|
// Inline function 'kotlin.require' call
|
|
120
120
|
if (!(byteCount >= 0n)) {
|
|
121
121
|
var message = 'byteCount: ' + byteCount.toString();
|
|
@@ -125,7 +125,7 @@ protoOf(Buffer).ko = function (byteCount) {
|
|
|
125
125
|
throw EOFException_init_$Create$_0("Buffer doesn't contain required number of bytes (size: " + this.g1().toString() + ', required: ' + byteCount.toString() + ')');
|
|
126
126
|
}
|
|
127
127
|
};
|
|
128
|
-
protoOf(Buffer).
|
|
128
|
+
protoOf(Buffer).zo = function (byteCount) {
|
|
129
129
|
// Inline function 'kotlin.require' call
|
|
130
130
|
if (!(byteCount >= 0n)) {
|
|
131
131
|
var message = 'byteCount: ' + byteCount.toString() + ' < 0';
|
|
@@ -133,8 +133,8 @@ protoOf(Buffer).lo = function (byteCount) {
|
|
|
133
133
|
}
|
|
134
134
|
return this.g1() >= byteCount;
|
|
135
135
|
};
|
|
136
|
-
protoOf(Buffer).
|
|
137
|
-
var tmp0_elvis_lhs = this.
|
|
136
|
+
protoOf(Buffer).ap = function () {
|
|
137
|
+
var tmp0_elvis_lhs = this.to_1;
|
|
138
138
|
var tmp;
|
|
139
139
|
if (tmp0_elvis_lhs == null) {
|
|
140
140
|
throwEof(this, 1n);
|
|
@@ -144,18 +144,18 @@ protoOf(Buffer).mo = function () {
|
|
|
144
144
|
var segment = tmp;
|
|
145
145
|
var segmentSize = segment.g1();
|
|
146
146
|
if (segmentSize === 0) {
|
|
147
|
-
this.
|
|
148
|
-
return this.
|
|
147
|
+
this.ip();
|
|
148
|
+
return this.ap();
|
|
149
149
|
}
|
|
150
|
-
var v = segment.
|
|
151
|
-
this.
|
|
150
|
+
var v = segment.jp();
|
|
151
|
+
this.vo_1 = subtract(this.vo_1, 1n);
|
|
152
152
|
if (segmentSize === 1) {
|
|
153
|
-
this.
|
|
153
|
+
this.ip();
|
|
154
154
|
}
|
|
155
155
|
return v;
|
|
156
156
|
};
|
|
157
|
-
protoOf(Buffer).
|
|
158
|
-
var tmp0_elvis_lhs = this.
|
|
157
|
+
protoOf(Buffer).kp = function () {
|
|
158
|
+
var tmp0_elvis_lhs = this.to_1;
|
|
159
159
|
var tmp;
|
|
160
160
|
if (tmp0_elvis_lhs == null) {
|
|
161
161
|
throwEof(this, 2n);
|
|
@@ -165,121 +165,121 @@ protoOf(Buffer).wo = function () {
|
|
|
165
165
|
var segment = tmp;
|
|
166
166
|
var segmentSize = segment.g1();
|
|
167
167
|
if (segmentSize < 2) {
|
|
168
|
-
this.
|
|
168
|
+
this.yo(2n);
|
|
169
169
|
if (segmentSize === 0) {
|
|
170
|
-
this.
|
|
171
|
-
return this.
|
|
170
|
+
this.ip();
|
|
171
|
+
return this.kp();
|
|
172
172
|
}
|
|
173
173
|
// Inline function 'kotlinx.io.and' call
|
|
174
|
-
var tmp_0 = (this.
|
|
174
|
+
var tmp_0 = (this.ap() & 255) << 8;
|
|
175
175
|
// Inline function 'kotlinx.io.and' call
|
|
176
|
-
var tmp$ret$1 = this.
|
|
176
|
+
var tmp$ret$1 = this.ap() & 255;
|
|
177
177
|
return toShort(tmp_0 | tmp$ret$1);
|
|
178
178
|
}
|
|
179
|
-
var v = segment.
|
|
180
|
-
this.
|
|
179
|
+
var v = segment.lp();
|
|
180
|
+
this.vo_1 = subtract(this.vo_1, 2n);
|
|
181
181
|
if (segmentSize === 2) {
|
|
182
|
-
this.
|
|
182
|
+
this.ip();
|
|
183
183
|
}
|
|
184
184
|
return v;
|
|
185
185
|
};
|
|
186
|
-
protoOf(Buffer).
|
|
186
|
+
protoOf(Buffer).mp = function () {
|
|
187
187
|
return Unit_instance;
|
|
188
188
|
};
|
|
189
|
-
protoOf(Buffer).
|
|
189
|
+
protoOf(Buffer).np = function (out, startIndex, endIndex) {
|
|
190
190
|
checkBounds(this.g1(), startIndex, endIndex);
|
|
191
191
|
if (startIndex === endIndex)
|
|
192
192
|
return Unit_instance;
|
|
193
193
|
var currentOffset = startIndex;
|
|
194
194
|
var remainingByteCount = subtract(endIndex, startIndex);
|
|
195
|
-
out.
|
|
196
|
-
var s = this.
|
|
197
|
-
while (currentOffset >= fromInt(ensureNotNull(s).
|
|
198
|
-
currentOffset = subtract(currentOffset, fromInt(s.
|
|
199
|
-
s = s.
|
|
195
|
+
out.vo_1 = add(out.vo_1, remainingByteCount);
|
|
196
|
+
var s = this.to_1;
|
|
197
|
+
while (currentOffset >= fromInt(ensureNotNull(s).dp_1 - s.cp_1 | 0)) {
|
|
198
|
+
currentOffset = subtract(currentOffset, fromInt(s.dp_1 - s.cp_1 | 0));
|
|
199
|
+
s = s.gp_1;
|
|
200
200
|
}
|
|
201
201
|
while (remainingByteCount > 0n) {
|
|
202
|
-
var copy = ensureNotNull(s).
|
|
203
|
-
copy.
|
|
202
|
+
var copy = ensureNotNull(s).op();
|
|
203
|
+
copy.cp_1 = copy.cp_1 + convertToInt(currentOffset) | 0;
|
|
204
204
|
var tmp = copy;
|
|
205
|
-
var tmp0 = copy.
|
|
205
|
+
var tmp0 = copy.cp_1 + convertToInt(remainingByteCount) | 0;
|
|
206
206
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
207
|
-
var b = copy.
|
|
208
|
-
tmp.
|
|
207
|
+
var b = copy.dp_1;
|
|
208
|
+
tmp.dp_1 = Math.min(tmp0, b);
|
|
209
209
|
// Inline function 'kotlinx.io.Buffer.pushSegment' call
|
|
210
|
-
if (out.
|
|
211
|
-
out.
|
|
212
|
-
out.
|
|
210
|
+
if (out.to_1 == null) {
|
|
211
|
+
out.to_1 = copy;
|
|
212
|
+
out.uo_1 = copy;
|
|
213
213
|
} else if (false) {
|
|
214
|
-
out.
|
|
215
|
-
if (ensureNotNull(out.
|
|
216
|
-
out.
|
|
214
|
+
out.uo_1 = ensureNotNull(out.uo_1).pp(copy).qp();
|
|
215
|
+
if (ensureNotNull(out.uo_1).hp_1 == null) {
|
|
216
|
+
out.to_1 = out.uo_1;
|
|
217
217
|
}
|
|
218
218
|
} else {
|
|
219
|
-
out.
|
|
219
|
+
out.uo_1 = ensureNotNull(out.uo_1).pp(copy);
|
|
220
220
|
}
|
|
221
|
-
remainingByteCount = subtract(remainingByteCount, fromInt(copy.
|
|
221
|
+
remainingByteCount = subtract(remainingByteCount, fromInt(copy.dp_1 - copy.cp_1 | 0));
|
|
222
222
|
currentOffset = 0n;
|
|
223
|
-
s = s.
|
|
223
|
+
s = s.gp_1;
|
|
224
224
|
}
|
|
225
225
|
};
|
|
226
|
-
protoOf(Buffer).
|
|
226
|
+
protoOf(Buffer).rp = function () {
|
|
227
227
|
var result = this.g1();
|
|
228
228
|
if (result === 0n)
|
|
229
229
|
return 0n;
|
|
230
|
-
var tail = ensureNotNull(this.
|
|
231
|
-
if (tail.
|
|
232
|
-
result = subtract(result, fromInt(tail.
|
|
230
|
+
var tail = ensureNotNull(this.uo_1);
|
|
231
|
+
if (tail.dp_1 < 8192 && tail.fp_1) {
|
|
232
|
+
result = subtract(result, fromInt(tail.dp_1 - tail.cp_1 | 0));
|
|
233
233
|
}
|
|
234
234
|
return result;
|
|
235
235
|
};
|
|
236
|
-
protoOf(Buffer).
|
|
236
|
+
protoOf(Buffer).sp = function (position) {
|
|
237
237
|
if (position < 0n || position >= this.g1()) {
|
|
238
238
|
throw IndexOutOfBoundsException_init_$Create$('position (' + position.toString() + ') is not within the range [0..size(' + this.g1().toString() + '))');
|
|
239
239
|
}
|
|
240
240
|
if (position === 0n) {
|
|
241
|
-
return ensureNotNull(this.
|
|
241
|
+
return ensureNotNull(this.to_1).tp(0);
|
|
242
242
|
}
|
|
243
243
|
$l$block_1: {
|
|
244
244
|
// Inline function 'kotlinx.io.seek' call
|
|
245
|
-
if (this.
|
|
246
|
-
return ensureNotNull(null).
|
|
245
|
+
if (this.to_1 == null) {
|
|
246
|
+
return ensureNotNull(null).tp(convertToInt(subtract(position, -1n)));
|
|
247
247
|
}
|
|
248
248
|
if (subtract(this.g1(), position) < position) {
|
|
249
|
-
var s = this.
|
|
249
|
+
var s = this.uo_1;
|
|
250
250
|
var offset = this.g1();
|
|
251
251
|
$l$loop: while (!(s == null) && offset > position) {
|
|
252
|
-
offset = subtract(offset, fromInt(s.
|
|
252
|
+
offset = subtract(offset, fromInt(s.dp_1 - s.cp_1 | 0));
|
|
253
253
|
if (offset <= position)
|
|
254
254
|
break $l$loop;
|
|
255
|
-
s = s.
|
|
255
|
+
s = s.hp_1;
|
|
256
256
|
}
|
|
257
257
|
var tmp0 = s;
|
|
258
258
|
var offset_0 = offset;
|
|
259
|
-
return ensureNotNull(tmp0).
|
|
259
|
+
return ensureNotNull(tmp0).tp(convertToInt(subtract(position, offset_0)));
|
|
260
260
|
} else {
|
|
261
|
-
var s_0 = this.
|
|
261
|
+
var s_0 = this.to_1;
|
|
262
262
|
var offset_1 = 0n;
|
|
263
263
|
$l$loop_0: while (!(s_0 == null)) {
|
|
264
264
|
var tmp0_0 = offset_1;
|
|
265
265
|
// Inline function 'kotlin.Long.plus' call
|
|
266
|
-
var other = s_0.
|
|
266
|
+
var other = s_0.dp_1 - s_0.cp_1 | 0;
|
|
267
267
|
var nextOffset = add(tmp0_0, fromInt(other));
|
|
268
268
|
if (nextOffset > position)
|
|
269
269
|
break $l$loop_0;
|
|
270
|
-
s_0 = s_0.
|
|
270
|
+
s_0 = s_0.gp_1;
|
|
271
271
|
offset_1 = nextOffset;
|
|
272
272
|
}
|
|
273
273
|
var tmp0_1 = s_0;
|
|
274
274
|
var offset_2 = offset_1;
|
|
275
|
-
return ensureNotNull(tmp0_1).
|
|
275
|
+
return ensureNotNull(tmp0_1).tp(convertToInt(subtract(position, offset_2)));
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
278
|
};
|
|
279
279
|
protoOf(Buffer).n2 = function () {
|
|
280
|
-
return this.
|
|
280
|
+
return this.up(this.g1());
|
|
281
281
|
};
|
|
282
|
-
protoOf(Buffer).
|
|
282
|
+
protoOf(Buffer).up = function (byteCount) {
|
|
283
283
|
// Inline function 'kotlinx.io.checkByteCount' call
|
|
284
284
|
// Inline function 'kotlin.require' call
|
|
285
285
|
if (!(byteCount >= 0n)) {
|
|
@@ -288,7 +288,7 @@ protoOf(Buffer).gp = function (byteCount) {
|
|
|
288
288
|
}
|
|
289
289
|
var remainingByteCount = byteCount;
|
|
290
290
|
while (remainingByteCount > 0n) {
|
|
291
|
-
var tmp0_elvis_lhs = this.
|
|
291
|
+
var tmp0_elvis_lhs = this.to_1;
|
|
292
292
|
var tmp;
|
|
293
293
|
if (tmp0_elvis_lhs == null) {
|
|
294
294
|
throw EOFException_init_$Create$_0('Buffer exhausted before skipping ' + byteCount.toString() + ' bytes.');
|
|
@@ -298,24 +298,24 @@ protoOf(Buffer).gp = function (byteCount) {
|
|
|
298
298
|
var head = tmp;
|
|
299
299
|
var tmp0 = remainingByteCount;
|
|
300
300
|
// Inline function 'kotlinx.io.minOf' call
|
|
301
|
-
var b = head.
|
|
301
|
+
var b = head.dp_1 - head.cp_1 | 0;
|
|
302
302
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
303
303
|
var b_0 = fromInt(b);
|
|
304
304
|
var tmp$ret$3 = tmp0 <= b_0 ? tmp0 : b_0;
|
|
305
305
|
var toSkip = convertToInt(tmp$ret$3);
|
|
306
|
-
this.
|
|
306
|
+
this.vo_1 = subtract(this.vo_1, fromInt(toSkip));
|
|
307
307
|
remainingByteCount = subtract(remainingByteCount, fromInt(toSkip));
|
|
308
|
-
head.
|
|
309
|
-
if (head.
|
|
310
|
-
this.
|
|
308
|
+
head.cp_1 = head.cp_1 + toSkip | 0;
|
|
309
|
+
if (head.cp_1 === head.dp_1) {
|
|
310
|
+
this.ip();
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
313
|
};
|
|
314
|
-
protoOf(Buffer).
|
|
314
|
+
protoOf(Buffer).vp = function (sink, startIndex, endIndex) {
|
|
315
315
|
// Inline function 'kotlinx.io.checkBounds' call
|
|
316
316
|
var size = sink.length;
|
|
317
317
|
checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
|
|
318
|
-
var tmp0_elvis_lhs = this.
|
|
318
|
+
var tmp0_elvis_lhs = this.to_1;
|
|
319
319
|
var tmp;
|
|
320
320
|
if (tmp0_elvis_lhs == null) {
|
|
321
321
|
return -1;
|
|
@@ -327,14 +327,14 @@ protoOf(Buffer).hp = function (sink, startIndex, endIndex) {
|
|
|
327
327
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
328
328
|
var b = s.g1();
|
|
329
329
|
var toCopy = Math.min(tmp0, b);
|
|
330
|
-
s.
|
|
331
|
-
this.
|
|
330
|
+
s.wp(sink, startIndex, startIndex + toCopy | 0);
|
|
331
|
+
this.vo_1 = subtract(this.vo_1, fromInt(toCopy));
|
|
332
332
|
if (isEmpty(s)) {
|
|
333
|
-
this.
|
|
333
|
+
this.ip();
|
|
334
334
|
}
|
|
335
335
|
return toCopy;
|
|
336
336
|
};
|
|
337
|
-
protoOf(Buffer).
|
|
337
|
+
protoOf(Buffer).xp = function (sink, byteCount) {
|
|
338
338
|
// Inline function 'kotlinx.io.checkByteCount' call
|
|
339
339
|
// Inline function 'kotlin.require' call
|
|
340
340
|
if (!(byteCount >= 0n)) {
|
|
@@ -344,10 +344,10 @@ protoOf(Buffer).jp = function (sink, byteCount) {
|
|
|
344
344
|
if (this.g1() === 0n)
|
|
345
345
|
return -1n;
|
|
346
346
|
var bytesWritten = byteCount > this.g1() ? this.g1() : byteCount;
|
|
347
|
-
sink.
|
|
347
|
+
sink.yp(this, bytesWritten);
|
|
348
348
|
return bytesWritten;
|
|
349
349
|
};
|
|
350
|
-
protoOf(Buffer).
|
|
350
|
+
protoOf(Buffer).zp = function (sink, byteCount) {
|
|
351
351
|
// Inline function 'kotlinx.io.checkByteCount' call
|
|
352
352
|
// Inline function 'kotlin.require' call
|
|
353
353
|
if (!(byteCount >= 0n)) {
|
|
@@ -355,62 +355,62 @@ protoOf(Buffer).lp = function (sink, byteCount) {
|
|
|
355
355
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
356
356
|
}
|
|
357
357
|
if (this.g1() < byteCount) {
|
|
358
|
-
sink.
|
|
358
|
+
sink.yp(this, this.g1());
|
|
359
359
|
throw EOFException_init_$Create$_0('Buffer exhausted before writing ' + byteCount.toString() + ' bytes. Only ' + this.g1().toString() + ' bytes were written.');
|
|
360
360
|
}
|
|
361
|
-
sink.
|
|
361
|
+
sink.yp(this, byteCount);
|
|
362
362
|
};
|
|
363
|
-
protoOf(Buffer).
|
|
363
|
+
protoOf(Buffer).aq = function (sink) {
|
|
364
364
|
var byteCount = this.g1();
|
|
365
365
|
if (byteCount > 0n) {
|
|
366
|
-
sink.
|
|
366
|
+
sink.yp(this, byteCount);
|
|
367
367
|
}
|
|
368
368
|
return byteCount;
|
|
369
369
|
};
|
|
370
|
-
protoOf(Buffer).
|
|
370
|
+
protoOf(Buffer).bq = function () {
|
|
371
371
|
return buffered(new PeekSource(this));
|
|
372
372
|
};
|
|
373
|
-
protoOf(Buffer).
|
|
373
|
+
protoOf(Buffer).cq = function (minimumCapacity) {
|
|
374
374
|
// Inline function 'kotlin.require' call
|
|
375
375
|
if (!(minimumCapacity >= 1 && minimumCapacity <= 8192)) {
|
|
376
376
|
var message = 'unexpected capacity (' + minimumCapacity + '), should be in range [1, 8192]';
|
|
377
377
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
378
378
|
}
|
|
379
|
-
if (this.
|
|
380
|
-
var result = SegmentPool_instance.
|
|
381
|
-
this.
|
|
382
|
-
this.
|
|
379
|
+
if (this.uo_1 == null) {
|
|
380
|
+
var result = SegmentPool_instance.fq();
|
|
381
|
+
this.to_1 = result;
|
|
382
|
+
this.uo_1 = result;
|
|
383
383
|
return result;
|
|
384
384
|
}
|
|
385
|
-
var t = ensureNotNull(this.
|
|
386
|
-
if ((t.
|
|
387
|
-
var newTail = t.
|
|
388
|
-
this.
|
|
385
|
+
var t = ensureNotNull(this.uo_1);
|
|
386
|
+
if ((t.dp_1 + minimumCapacity | 0) > 8192 || !t.fp_1) {
|
|
387
|
+
var newTail = t.pp(SegmentPool_instance.fq());
|
|
388
|
+
this.uo_1 = newTail;
|
|
389
389
|
return newTail;
|
|
390
390
|
}
|
|
391
391
|
return t;
|
|
392
392
|
};
|
|
393
|
-
protoOf(Buffer).
|
|
393
|
+
protoOf(Buffer).gq = function (source, startIndex, endIndex) {
|
|
394
394
|
// Inline function 'kotlinx.io.checkBounds' call
|
|
395
395
|
var size = source.length;
|
|
396
396
|
checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
|
|
397
397
|
var currentOffset = startIndex;
|
|
398
398
|
while (currentOffset < endIndex) {
|
|
399
|
-
var tail = this.
|
|
399
|
+
var tail = this.cq(1);
|
|
400
400
|
var tmp0 = endIndex - currentOffset | 0;
|
|
401
401
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
402
|
-
var b = tail.
|
|
402
|
+
var b = tail.hq();
|
|
403
403
|
var toCopy = Math.min(tmp0, b);
|
|
404
|
-
tail.
|
|
404
|
+
tail.iq(source, currentOffset, currentOffset + toCopy | 0);
|
|
405
405
|
currentOffset = currentOffset + toCopy | 0;
|
|
406
406
|
}
|
|
407
407
|
var tmp = this;
|
|
408
|
-
var tmp0_0 = this.
|
|
408
|
+
var tmp0_0 = this.vo_1;
|
|
409
409
|
// Inline function 'kotlin.Long.plus' call
|
|
410
410
|
var other = endIndex - startIndex | 0;
|
|
411
|
-
tmp.
|
|
411
|
+
tmp.vo_1 = add(tmp0_0, fromInt(other));
|
|
412
412
|
};
|
|
413
|
-
protoOf(Buffer).
|
|
413
|
+
protoOf(Buffer).kq = function (source, byteCount) {
|
|
414
414
|
// Inline function 'kotlinx.io.checkByteCount' call
|
|
415
415
|
// Inline function 'kotlin.require' call
|
|
416
416
|
if (!(byteCount >= 0n)) {
|
|
@@ -419,85 +419,85 @@ protoOf(Buffer).wp = function (source, byteCount) {
|
|
|
419
419
|
}
|
|
420
420
|
var remainingByteCount = byteCount;
|
|
421
421
|
while (remainingByteCount > 0n) {
|
|
422
|
-
var read = source.
|
|
422
|
+
var read = source.xp(this, remainingByteCount);
|
|
423
423
|
if (read === -1n) {
|
|
424
424
|
throw EOFException_init_$Create$_0('Source exhausted before reading ' + byteCount.toString() + ' bytes. ' + ('Only ' + subtract(byteCount, remainingByteCount).toString() + ' were read.'));
|
|
425
425
|
}
|
|
426
426
|
remainingByteCount = subtract(remainingByteCount, read);
|
|
427
427
|
}
|
|
428
428
|
};
|
|
429
|
-
protoOf(Buffer).
|
|
429
|
+
protoOf(Buffer).yp = function (source, byteCount) {
|
|
430
430
|
// Inline function 'kotlin.require' call
|
|
431
431
|
if (!!(source === this)) {
|
|
432
432
|
var message = 'source == this';
|
|
433
433
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
434
434
|
}
|
|
435
|
-
checkOffsetAndCount(source.
|
|
435
|
+
checkOffsetAndCount(source.vo_1, 0n, byteCount);
|
|
436
436
|
var remainingByteCount = byteCount;
|
|
437
437
|
while (remainingByteCount > 0n) {
|
|
438
|
-
if (remainingByteCount < fromInt(ensureNotNull(source.
|
|
439
|
-
var tail = this.
|
|
438
|
+
if (remainingByteCount < fromInt(ensureNotNull(source.to_1).g1())) {
|
|
439
|
+
var tail = this.uo_1;
|
|
440
440
|
var tmp;
|
|
441
|
-
if (!(tail == null) && tail.
|
|
441
|
+
if (!(tail == null) && tail.fp_1) {
|
|
442
442
|
var tmp0 = remainingByteCount;
|
|
443
443
|
// Inline function 'kotlin.Long.plus' call
|
|
444
|
-
var other = tail.
|
|
444
|
+
var other = tail.dp_1;
|
|
445
445
|
var tmp0_0 = add(tmp0, fromInt(other));
|
|
446
446
|
// Inline function 'kotlin.Long.minus' call
|
|
447
|
-
var other_0 = tail.
|
|
447
|
+
var other_0 = tail.lq() ? 0 : tail.cp_1;
|
|
448
448
|
tmp = subtract(tmp0_0, fromInt(other_0)) <= 8192n;
|
|
449
449
|
} else {
|
|
450
450
|
tmp = false;
|
|
451
451
|
}
|
|
452
452
|
if (tmp) {
|
|
453
|
-
ensureNotNull(source.
|
|
454
|
-
source.
|
|
455
|
-
this.
|
|
453
|
+
ensureNotNull(source.to_1).nq(tail, convertToInt(remainingByteCount));
|
|
454
|
+
source.vo_1 = subtract(source.vo_1, remainingByteCount);
|
|
455
|
+
this.vo_1 = add(this.vo_1, remainingByteCount);
|
|
456
456
|
return Unit_instance;
|
|
457
457
|
} else {
|
|
458
|
-
source.
|
|
458
|
+
source.to_1 = ensureNotNull(source.to_1).mq(convertToInt(remainingByteCount));
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
var segmentToMove = ensureNotNull(source.
|
|
461
|
+
var segmentToMove = ensureNotNull(source.to_1);
|
|
462
462
|
var movedByteCount = fromInt(segmentToMove.g1());
|
|
463
|
-
source.
|
|
464
|
-
if (source.
|
|
465
|
-
source.
|
|
463
|
+
source.to_1 = segmentToMove.oq();
|
|
464
|
+
if (source.to_1 == null) {
|
|
465
|
+
source.uo_1 = null;
|
|
466
466
|
}
|
|
467
467
|
// Inline function 'kotlinx.io.Buffer.pushSegment' call
|
|
468
|
-
if (this.
|
|
469
|
-
this.
|
|
470
|
-
this.
|
|
468
|
+
if (this.to_1 == null) {
|
|
469
|
+
this.to_1 = segmentToMove;
|
|
470
|
+
this.uo_1 = segmentToMove;
|
|
471
471
|
} else if (true) {
|
|
472
|
-
this.
|
|
473
|
-
if (ensureNotNull(this.
|
|
474
|
-
this.
|
|
472
|
+
this.uo_1 = ensureNotNull(this.uo_1).pp(segmentToMove).qp();
|
|
473
|
+
if (ensureNotNull(this.uo_1).hp_1 == null) {
|
|
474
|
+
this.to_1 = this.uo_1;
|
|
475
475
|
}
|
|
476
476
|
} else {
|
|
477
|
-
this.
|
|
477
|
+
this.uo_1 = ensureNotNull(this.uo_1).pp(segmentToMove);
|
|
478
478
|
}
|
|
479
|
-
source.
|
|
480
|
-
this.
|
|
479
|
+
source.vo_1 = subtract(source.vo_1, movedByteCount);
|
|
480
|
+
this.vo_1 = add(this.vo_1, movedByteCount);
|
|
481
481
|
remainingByteCount = subtract(remainingByteCount, movedByteCount);
|
|
482
482
|
}
|
|
483
483
|
};
|
|
484
|
-
protoOf(Buffer).
|
|
484
|
+
protoOf(Buffer).pq = function (source) {
|
|
485
485
|
var totalBytesRead = 0n;
|
|
486
486
|
$l$loop: while (true) {
|
|
487
|
-
var readCount = source.
|
|
487
|
+
var readCount = source.xp(this, 8192n);
|
|
488
488
|
if (readCount === -1n)
|
|
489
489
|
break $l$loop;
|
|
490
490
|
totalBytesRead = add(totalBytesRead, readCount);
|
|
491
491
|
}
|
|
492
492
|
return totalBytesRead;
|
|
493
493
|
};
|
|
494
|
-
protoOf(Buffer).
|
|
495
|
-
this.
|
|
496
|
-
this.
|
|
494
|
+
protoOf(Buffer).qq = function (byte) {
|
|
495
|
+
this.cq(1).rq(byte);
|
|
496
|
+
this.vo_1 = add(this.vo_1, 1n);
|
|
497
497
|
};
|
|
498
|
-
protoOf(Buffer).
|
|
499
|
-
this.
|
|
500
|
-
this.
|
|
498
|
+
protoOf(Buffer).sq = function (short) {
|
|
499
|
+
this.cq(2).tq(short);
|
|
500
|
+
this.vo_1 = add(this.vo_1, 2n);
|
|
501
501
|
};
|
|
502
502
|
protoOf(Buffer).j4 = function () {
|
|
503
503
|
return Unit_instance;
|
|
@@ -515,7 +515,7 @@ protoOf(Buffer).toString = function () {
|
|
|
515
515
|
var builder = StringBuilder_init_$Create$(imul(len, 2) + (this.g1() > fromInt(maxPrintableBytes) ? 1 : 0) | 0);
|
|
516
516
|
var bytesWritten = 0;
|
|
517
517
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.forEachSegment' call
|
|
518
|
-
var curr = this.
|
|
518
|
+
var curr = this.to_1;
|
|
519
519
|
while (!(curr == null)) {
|
|
520
520
|
var tmp0 = get_SegmentReadContextImpl();
|
|
521
521
|
var segment = curr;
|
|
@@ -523,7 +523,7 @@ protoOf(Buffer).toString = function () {
|
|
|
523
523
|
while (bytesWritten < len && idx < segment.g1()) {
|
|
524
524
|
var _unary__edvuaz = idx;
|
|
525
525
|
idx = _unary__edvuaz + 1 | 0;
|
|
526
|
-
var b_0 = tmp0.
|
|
526
|
+
var b_0 = tmp0.uq(segment, _unary__edvuaz);
|
|
527
527
|
bytesWritten = bytesWritten + 1 | 0;
|
|
528
528
|
var tmp = get_HEX_DIGIT_CHARS();
|
|
529
529
|
// Inline function 'kotlinx.io.shr' call
|
|
@@ -534,36 +534,36 @@ protoOf(Buffer).toString = function () {
|
|
|
534
534
|
var tmp$ret$5 = b_0 & 15;
|
|
535
535
|
tmp_0.s(tmp_1[tmp$ret$5]);
|
|
536
536
|
}
|
|
537
|
-
curr = curr.
|
|
537
|
+
curr = curr.gp_1;
|
|
538
538
|
}
|
|
539
539
|
if (this.g1() > fromInt(maxPrintableBytes)) {
|
|
540
540
|
builder.s(_Char___init__impl__6a9atx(8230));
|
|
541
541
|
}
|
|
542
542
|
return 'Buffer(size=' + this.g1().toString() + ' hex=' + builder.toString() + ')';
|
|
543
543
|
};
|
|
544
|
-
protoOf(Buffer).
|
|
545
|
-
var oldHead = ensureNotNull(this.
|
|
546
|
-
var nextHead = oldHead.
|
|
547
|
-
this.
|
|
544
|
+
protoOf(Buffer).ip = function () {
|
|
545
|
+
var oldHead = ensureNotNull(this.to_1);
|
|
546
|
+
var nextHead = oldHead.gp_1;
|
|
547
|
+
this.to_1 = nextHead;
|
|
548
548
|
if (nextHead == null) {
|
|
549
|
-
this.
|
|
549
|
+
this.uo_1 = null;
|
|
550
550
|
} else {
|
|
551
|
-
nextHead.
|
|
551
|
+
nextHead.hp_1 = null;
|
|
552
552
|
}
|
|
553
|
-
oldHead.
|
|
554
|
-
SegmentPool_instance.
|
|
553
|
+
oldHead.gp_1 = null;
|
|
554
|
+
SegmentPool_instance.vq(oldHead);
|
|
555
555
|
};
|
|
556
|
-
protoOf(Buffer).
|
|
557
|
-
var oldTail = ensureNotNull(this.
|
|
558
|
-
var newTail = oldTail.
|
|
559
|
-
this.
|
|
556
|
+
protoOf(Buffer).wq = function () {
|
|
557
|
+
var oldTail = ensureNotNull(this.uo_1);
|
|
558
|
+
var newTail = oldTail.hp_1;
|
|
559
|
+
this.uo_1 = newTail;
|
|
560
560
|
if (newTail == null) {
|
|
561
|
-
this.
|
|
561
|
+
this.to_1 = null;
|
|
562
562
|
} else {
|
|
563
|
-
newTail.
|
|
563
|
+
newTail.gp_1 = null;
|
|
564
564
|
}
|
|
565
|
-
oldTail.
|
|
566
|
-
SegmentPool_instance.
|
|
565
|
+
oldTail.hp_1 = null;
|
|
566
|
+
SegmentPool_instance.vq(oldTail);
|
|
567
567
|
};
|
|
568
568
|
function indexOf(_this__u8e3s4, byte, startIndex, endIndex) {
|
|
569
569
|
startIndex = startIndex === VOID ? 0n : startIndex;
|
|
@@ -576,7 +576,7 @@ function indexOf(_this__u8e3s4, byte, startIndex, endIndex) {
|
|
|
576
576
|
return -1n;
|
|
577
577
|
$l$block_1: {
|
|
578
578
|
// Inline function 'kotlinx.io.seek' call
|
|
579
|
-
if (_this__u8e3s4.
|
|
579
|
+
if (_this__u8e3s4.to_1 == null) {
|
|
580
580
|
if (-1n === -1n) {
|
|
581
581
|
return -1n;
|
|
582
582
|
}
|
|
@@ -604,19 +604,19 @@ function indexOf(_this__u8e3s4, byte, startIndex, endIndex) {
|
|
|
604
604
|
// Inline function 'kotlin.Long.plus' call
|
|
605
605
|
var other = segment.g1();
|
|
606
606
|
offset = add(tmp0_0, fromInt(other));
|
|
607
|
-
segment = segment.
|
|
607
|
+
segment = segment.gp_1;
|
|
608
608
|
}
|
|
609
609
|
while (!(segment == null) && offset < endOffset);
|
|
610
610
|
return -1n;
|
|
611
611
|
}
|
|
612
612
|
if (subtract(_this__u8e3s4.g1(), startIndex) < startIndex) {
|
|
613
|
-
var s = _this__u8e3s4.
|
|
613
|
+
var s = _this__u8e3s4.uo_1;
|
|
614
614
|
var offset_0 = _this__u8e3s4.g1();
|
|
615
615
|
$l$loop: while (!(s == null) && offset_0 > startIndex) {
|
|
616
|
-
offset_0 = subtract(offset_0, fromInt(s.
|
|
616
|
+
offset_0 = subtract(offset_0, fromInt(s.dp_1 - s.cp_1 | 0));
|
|
617
617
|
if (offset_0 <= startIndex)
|
|
618
618
|
break $l$loop;
|
|
619
|
-
s = s.
|
|
619
|
+
s = s.hp_1;
|
|
620
620
|
}
|
|
621
621
|
var tmp0_1 = s;
|
|
622
622
|
var o = offset_0;
|
|
@@ -647,21 +647,21 @@ function indexOf(_this__u8e3s4, byte, startIndex, endIndex) {
|
|
|
647
647
|
// Inline function 'kotlin.Long.plus' call
|
|
648
648
|
var other_0 = segment_0.g1();
|
|
649
649
|
offset_1 = add(tmp0_3, fromInt(other_0));
|
|
650
|
-
segment_0 = segment_0.
|
|
650
|
+
segment_0 = segment_0.gp_1;
|
|
651
651
|
}
|
|
652
652
|
while (!(segment_0 == null) && offset_1 < endOffset);
|
|
653
653
|
return -1n;
|
|
654
654
|
} else {
|
|
655
|
-
var s_0 = _this__u8e3s4.
|
|
655
|
+
var s_0 = _this__u8e3s4.to_1;
|
|
656
656
|
var offset_2 = 0n;
|
|
657
657
|
$l$loop_0: while (!(s_0 == null)) {
|
|
658
658
|
var tmp0_4 = offset_2;
|
|
659
659
|
// Inline function 'kotlin.Long.plus' call
|
|
660
|
-
var other_1 = s_0.
|
|
660
|
+
var other_1 = s_0.dp_1 - s_0.cp_1 | 0;
|
|
661
661
|
var nextOffset = add(tmp0_4, fromInt(other_1));
|
|
662
662
|
if (nextOffset > startIndex)
|
|
663
663
|
break $l$loop_0;
|
|
664
|
-
s_0 = s_0.
|
|
664
|
+
s_0 = s_0.gp_1;
|
|
665
665
|
offset_2 = nextOffset;
|
|
666
666
|
}
|
|
667
667
|
var tmp0_5 = s_0;
|
|
@@ -693,7 +693,7 @@ function indexOf(_this__u8e3s4, byte, startIndex, endIndex) {
|
|
|
693
693
|
// Inline function 'kotlin.Long.plus' call
|
|
694
694
|
var other_2 = segment_1.g1();
|
|
695
695
|
offset_3 = add(tmp0_7, fromInt(other_2));
|
|
696
|
-
segment_1 = segment_1.
|
|
696
|
+
segment_1 = segment_1.gp_1;
|
|
697
697
|
}
|
|
698
698
|
while (!(segment_1 == null) && offset_3 < endOffset);
|
|
699
699
|
return -1n;
|
|
@@ -701,25 +701,25 @@ function indexOf(_this__u8e3s4, byte, startIndex, endIndex) {
|
|
|
701
701
|
}
|
|
702
702
|
}
|
|
703
703
|
function readByteString(_this__u8e3s4, byteCount) {
|
|
704
|
-
return UnsafeByteStringOperations_instance.
|
|
704
|
+
return UnsafeByteStringOperations_instance.so(readByteArray_0(_this__u8e3s4, byteCount));
|
|
705
705
|
}
|
|
706
706
|
function buffered(_this__u8e3s4) {
|
|
707
707
|
return new RealSource(_this__u8e3s4);
|
|
708
708
|
}
|
|
709
709
|
function PeekSource(upstream) {
|
|
710
|
-
this.
|
|
711
|
-
this.
|
|
712
|
-
this.
|
|
710
|
+
this.xq_1 = upstream;
|
|
711
|
+
this.yq_1 = this.xq_1.wo();
|
|
712
|
+
this.zq_1 = this.yq_1.to_1;
|
|
713
713
|
var tmp = this;
|
|
714
|
-
var tmp0_safe_receiver = this.
|
|
715
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
716
|
-
tmp.
|
|
717
|
-
this.
|
|
718
|
-
this.
|
|
714
|
+
var tmp0_safe_receiver = this.yq_1.to_1;
|
|
715
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.cp_1;
|
|
716
|
+
tmp.ar_1 = tmp1_elvis_lhs == null ? -1 : tmp1_elvis_lhs;
|
|
717
|
+
this.br_1 = false;
|
|
718
|
+
this.cr_1 = 0n;
|
|
719
719
|
}
|
|
720
|
-
protoOf(PeekSource).
|
|
720
|
+
protoOf(PeekSource).xp = function (sink, byteCount) {
|
|
721
721
|
// Inline function 'kotlin.check' call
|
|
722
|
-
if (!!this.
|
|
722
|
+
if (!!this.br_1) {
|
|
723
723
|
var message = 'Source is closed.';
|
|
724
724
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
725
725
|
}
|
|
@@ -730,43 +730,43 @@ protoOf(PeekSource).jp = function (sink, byteCount) {
|
|
|
730
730
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
731
731
|
}
|
|
732
732
|
// Inline function 'kotlin.check' call
|
|
733
|
-
if (!(this.
|
|
733
|
+
if (!(this.zq_1 == null || (this.zq_1 === this.yq_1.to_1 && this.ar_1 === ensureNotNull(this.yq_1.to_1).cp_1))) {
|
|
734
734
|
var message_1 = 'Peek source is invalid because upstream source was used';
|
|
735
735
|
throw IllegalStateException_init_$Create$(toString(message_1));
|
|
736
736
|
}
|
|
737
737
|
if (byteCount === 0n)
|
|
738
738
|
return 0n;
|
|
739
739
|
// Inline function 'kotlin.Long.plus' call
|
|
740
|
-
var this_0 = this.
|
|
740
|
+
var this_0 = this.cr_1;
|
|
741
741
|
var tmp$ret$7 = add(this_0, fromInt(1));
|
|
742
|
-
if (!this.
|
|
742
|
+
if (!this.xq_1.zo(tmp$ret$7))
|
|
743
743
|
return -1n;
|
|
744
|
-
if (this.
|
|
745
|
-
this.
|
|
746
|
-
this.
|
|
744
|
+
if (this.zq_1 == null && !(this.yq_1.to_1 == null)) {
|
|
745
|
+
this.zq_1 = this.yq_1.to_1;
|
|
746
|
+
this.ar_1 = ensureNotNull(this.yq_1.to_1).cp_1;
|
|
747
747
|
}
|
|
748
748
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
749
|
-
var b = subtract(this.
|
|
749
|
+
var b = subtract(this.yq_1.g1(), this.cr_1);
|
|
750
750
|
var toCopy = byteCount <= b ? byteCount : b;
|
|
751
|
-
this.
|
|
752
|
-
this.
|
|
751
|
+
this.yq_1.np(sink, this.cr_1, add(this.cr_1, toCopy));
|
|
752
|
+
this.cr_1 = add(this.cr_1, toCopy);
|
|
753
753
|
return toCopy;
|
|
754
754
|
};
|
|
755
755
|
protoOf(PeekSource).j4 = function () {
|
|
756
|
-
this.
|
|
756
|
+
this.br_1 = true;
|
|
757
757
|
};
|
|
758
758
|
function RealSource(source) {
|
|
759
|
-
this.
|
|
760
|
-
this.
|
|
761
|
-
this.
|
|
759
|
+
this.dr_1 = source;
|
|
760
|
+
this.er_1 = false;
|
|
761
|
+
this.fr_1 = new Buffer();
|
|
762
762
|
}
|
|
763
|
-
protoOf(RealSource).
|
|
764
|
-
return this.
|
|
763
|
+
protoOf(RealSource).wo = function () {
|
|
764
|
+
return this.fr_1;
|
|
765
765
|
};
|
|
766
|
-
protoOf(RealSource).
|
|
766
|
+
protoOf(RealSource).xp = function (sink, byteCount) {
|
|
767
767
|
// Inline function 'kotlinx.io.RealSource.checkNotClosed' call
|
|
768
768
|
// Inline function 'kotlin.check' call
|
|
769
|
-
if (!!this.
|
|
769
|
+
if (!!this.er_1) {
|
|
770
770
|
var message = 'Source is closed.';
|
|
771
771
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
772
772
|
}
|
|
@@ -775,33 +775,33 @@ protoOf(RealSource).jp = function (sink, byteCount) {
|
|
|
775
775
|
var message_0 = 'byteCount: ' + byteCount.toString();
|
|
776
776
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
777
777
|
}
|
|
778
|
-
if (this.
|
|
779
|
-
var read = this.
|
|
778
|
+
if (this.fr_1.g1() === 0n) {
|
|
779
|
+
var read = this.dr_1.xp(this.fr_1, 8192n);
|
|
780
780
|
if (read === -1n)
|
|
781
781
|
return -1n;
|
|
782
782
|
}
|
|
783
783
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
784
|
-
var b = this.
|
|
784
|
+
var b = this.fr_1.g1();
|
|
785
785
|
var toRead = byteCount <= b ? byteCount : b;
|
|
786
|
-
return this.
|
|
786
|
+
return this.fr_1.xp(sink, toRead);
|
|
787
787
|
};
|
|
788
|
-
protoOf(RealSource).
|
|
788
|
+
protoOf(RealSource).xo = function () {
|
|
789
789
|
// Inline function 'kotlinx.io.RealSource.checkNotClosed' call
|
|
790
790
|
// Inline function 'kotlin.check' call
|
|
791
|
-
if (!!this.
|
|
791
|
+
if (!!this.er_1) {
|
|
792
792
|
var message = 'Source is closed.';
|
|
793
793
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
794
794
|
}
|
|
795
|
-
return this.
|
|
795
|
+
return this.fr_1.xo() && this.dr_1.xp(this.fr_1, 8192n) === -1n;
|
|
796
796
|
};
|
|
797
|
-
protoOf(RealSource).
|
|
798
|
-
if (!this.
|
|
797
|
+
protoOf(RealSource).yo = function (byteCount) {
|
|
798
|
+
if (!this.zo(byteCount))
|
|
799
799
|
throw EOFException_init_$Create$_0("Source doesn't contain required number of bytes (" + byteCount.toString() + ').');
|
|
800
800
|
};
|
|
801
|
-
protoOf(RealSource).
|
|
801
|
+
protoOf(RealSource).zo = function (byteCount) {
|
|
802
802
|
// Inline function 'kotlinx.io.RealSource.checkNotClosed' call
|
|
803
803
|
// Inline function 'kotlin.check' call
|
|
804
|
-
if (!!this.
|
|
804
|
+
if (!!this.er_1) {
|
|
805
805
|
var message = 'Source is closed.';
|
|
806
806
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
807
807
|
}
|
|
@@ -810,91 +810,91 @@ protoOf(RealSource).lo = function (byteCount) {
|
|
|
810
810
|
var message_0 = 'byteCount: ' + byteCount.toString();
|
|
811
811
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
812
812
|
}
|
|
813
|
-
while (this.
|
|
814
|
-
if (this.
|
|
813
|
+
while (this.fr_1.g1() < byteCount) {
|
|
814
|
+
if (this.dr_1.xp(this.fr_1, 8192n) === -1n)
|
|
815
815
|
return false;
|
|
816
816
|
}
|
|
817
817
|
return true;
|
|
818
818
|
};
|
|
819
|
-
protoOf(RealSource).
|
|
820
|
-
this.
|
|
821
|
-
return this.
|
|
819
|
+
protoOf(RealSource).ap = function () {
|
|
820
|
+
this.yo(1n);
|
|
821
|
+
return this.fr_1.ap();
|
|
822
822
|
};
|
|
823
|
-
protoOf(RealSource).
|
|
823
|
+
protoOf(RealSource).vp = function (sink, startIndex, endIndex) {
|
|
824
824
|
// Inline function 'kotlinx.io.checkBounds' call
|
|
825
825
|
var size = sink.length;
|
|
826
826
|
checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
|
|
827
|
-
if (this.
|
|
828
|
-
var read = this.
|
|
827
|
+
if (this.fr_1.g1() === 0n) {
|
|
828
|
+
var read = this.dr_1.xp(this.fr_1, 8192n);
|
|
829
829
|
if (read === -1n)
|
|
830
830
|
return -1;
|
|
831
831
|
}
|
|
832
832
|
var tmp0 = endIndex - startIndex | 0;
|
|
833
833
|
// Inline function 'kotlinx.io.minOf' call
|
|
834
|
-
var b = this.
|
|
834
|
+
var b = this.fr_1.g1();
|
|
835
835
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
836
836
|
var a = fromInt(tmp0);
|
|
837
837
|
var tmp$ret$1 = a <= b ? a : b;
|
|
838
838
|
var toRead = convertToInt(tmp$ret$1);
|
|
839
|
-
return this.
|
|
839
|
+
return this.fr_1.vp(sink, startIndex, startIndex + toRead | 0);
|
|
840
840
|
};
|
|
841
|
-
protoOf(RealSource).
|
|
841
|
+
protoOf(RealSource).zp = function (sink, byteCount) {
|
|
842
842
|
try {
|
|
843
|
-
this.
|
|
843
|
+
this.yo(byteCount);
|
|
844
844
|
} catch ($p) {
|
|
845
845
|
if ($p instanceof EOFException) {
|
|
846
846
|
var e = $p;
|
|
847
|
-
sink.
|
|
847
|
+
sink.yp(this.fr_1, this.fr_1.g1());
|
|
848
848
|
throw e;
|
|
849
849
|
} else {
|
|
850
850
|
throw $p;
|
|
851
851
|
}
|
|
852
852
|
}
|
|
853
|
-
this.
|
|
853
|
+
this.fr_1.zp(sink, byteCount);
|
|
854
854
|
};
|
|
855
|
-
protoOf(RealSource).
|
|
855
|
+
protoOf(RealSource).aq = function (sink) {
|
|
856
856
|
var totalBytesWritten = 0n;
|
|
857
|
-
while (!(this.
|
|
858
|
-
var emitByteCount = this.
|
|
857
|
+
while (!(this.dr_1.xp(this.fr_1, 8192n) === -1n)) {
|
|
858
|
+
var emitByteCount = this.fr_1.rp();
|
|
859
859
|
if (emitByteCount > 0n) {
|
|
860
860
|
totalBytesWritten = add(totalBytesWritten, emitByteCount);
|
|
861
|
-
sink.
|
|
861
|
+
sink.yp(this.fr_1, emitByteCount);
|
|
862
862
|
}
|
|
863
863
|
}
|
|
864
|
-
if (this.
|
|
865
|
-
totalBytesWritten = add(totalBytesWritten, this.
|
|
866
|
-
sink.
|
|
864
|
+
if (this.fr_1.g1() > 0n) {
|
|
865
|
+
totalBytesWritten = add(totalBytesWritten, this.fr_1.g1());
|
|
866
|
+
sink.yp(this.fr_1, this.fr_1.g1());
|
|
867
867
|
}
|
|
868
868
|
return totalBytesWritten;
|
|
869
869
|
};
|
|
870
|
-
protoOf(RealSource).
|
|
871
|
-
this.
|
|
872
|
-
return this.
|
|
870
|
+
protoOf(RealSource).kp = function () {
|
|
871
|
+
this.yo(2n);
|
|
872
|
+
return this.fr_1.kp();
|
|
873
873
|
};
|
|
874
|
-
protoOf(RealSource).
|
|
874
|
+
protoOf(RealSource).bq = function () {
|
|
875
875
|
// Inline function 'kotlinx.io.RealSource.checkNotClosed' call
|
|
876
876
|
// Inline function 'kotlin.check' call
|
|
877
|
-
if (!!this.
|
|
877
|
+
if (!!this.er_1) {
|
|
878
878
|
var message = 'Source is closed.';
|
|
879
879
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
880
880
|
}
|
|
881
881
|
return buffered(new PeekSource(this));
|
|
882
882
|
};
|
|
883
883
|
protoOf(RealSource).j4 = function () {
|
|
884
|
-
if (this.
|
|
884
|
+
if (this.er_1)
|
|
885
885
|
return Unit_instance;
|
|
886
|
-
this.
|
|
887
|
-
this.
|
|
888
|
-
this.
|
|
886
|
+
this.er_1 = true;
|
|
887
|
+
this.dr_1.j4();
|
|
888
|
+
this.fr_1.n2();
|
|
889
889
|
};
|
|
890
890
|
protoOf(RealSource).toString = function () {
|
|
891
|
-
return 'buffered(' + toString(this.
|
|
891
|
+
return 'buffered(' + toString(this.dr_1) + ')';
|
|
892
892
|
};
|
|
893
893
|
function Segment_init_$Init$($this) {
|
|
894
894
|
Segment.call($this);
|
|
895
|
-
$this.
|
|
896
|
-
$this.
|
|
897
|
-
$this.
|
|
895
|
+
$this.bp_1 = new Int8Array(8192);
|
|
896
|
+
$this.fp_1 = true;
|
|
897
|
+
$this.ep_1 = null;
|
|
898
898
|
return $this;
|
|
899
899
|
}
|
|
900
900
|
function Segment_init_$Create$() {
|
|
@@ -902,87 +902,87 @@ function Segment_init_$Create$() {
|
|
|
902
902
|
}
|
|
903
903
|
function Segment_init_$Init$_0(data, pos, limit, shareToken, owner, $this) {
|
|
904
904
|
Segment.call($this);
|
|
905
|
-
$this.
|
|
906
|
-
$this.
|
|
907
|
-
$this.
|
|
908
|
-
$this.
|
|
909
|
-
$this.
|
|
905
|
+
$this.bp_1 = data;
|
|
906
|
+
$this.cp_1 = pos;
|
|
907
|
+
$this.dp_1 = limit;
|
|
908
|
+
$this.ep_1 = shareToken;
|
|
909
|
+
$this.fp_1 = owner;
|
|
910
910
|
return $this;
|
|
911
911
|
}
|
|
912
912
|
function Segment_init_$Create$_0(data, pos, limit, shareToken, owner) {
|
|
913
913
|
return Segment_init_$Init$_0(data, pos, limit, shareToken, owner, objectCreate(protoOf(Segment)));
|
|
914
914
|
}
|
|
915
915
|
function Companion() {
|
|
916
|
-
this.
|
|
917
|
-
this.
|
|
916
|
+
this.gr_1 = 8192;
|
|
917
|
+
this.hr_1 = 1024;
|
|
918
918
|
}
|
|
919
|
-
protoOf(Companion).
|
|
919
|
+
protoOf(Companion).ir = function () {
|
|
920
920
|
return Segment_init_$Create$();
|
|
921
921
|
};
|
|
922
922
|
var Companion_instance;
|
|
923
923
|
function Companion_getInstance() {
|
|
924
924
|
return Companion_instance;
|
|
925
925
|
}
|
|
926
|
-
protoOf(Segment).
|
|
927
|
-
var tmp0_safe_receiver = this.
|
|
928
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
926
|
+
protoOf(Segment).lq = function () {
|
|
927
|
+
var tmp0_safe_receiver = this.ep_1;
|
|
928
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.jr();
|
|
929
929
|
return tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs;
|
|
930
930
|
};
|
|
931
|
-
protoOf(Segment).
|
|
932
|
-
var tmp0_elvis_lhs = this.
|
|
931
|
+
protoOf(Segment).op = function () {
|
|
932
|
+
var tmp0_elvis_lhs = this.ep_1;
|
|
933
933
|
var tmp;
|
|
934
934
|
if (tmp0_elvis_lhs == null) {
|
|
935
935
|
// Inline function 'kotlin.also' call
|
|
936
|
-
var this_0 = SegmentPool_instance.
|
|
937
|
-
this.
|
|
936
|
+
var this_0 = SegmentPool_instance.kr();
|
|
937
|
+
this.ep_1 = this_0;
|
|
938
938
|
tmp = this_0;
|
|
939
939
|
} else {
|
|
940
940
|
tmp = tmp0_elvis_lhs;
|
|
941
941
|
}
|
|
942
942
|
var t = tmp;
|
|
943
|
-
var tmp_0 = this.
|
|
944
|
-
var tmp_1 = this.
|
|
943
|
+
var tmp_0 = this.cp_1;
|
|
944
|
+
var tmp_1 = this.dp_1;
|
|
945
945
|
// Inline function 'kotlin.also' call
|
|
946
|
-
t.
|
|
947
|
-
return Segment_init_$Create$_0(this.
|
|
946
|
+
t.lr();
|
|
947
|
+
return Segment_init_$Create$_0(this.bp_1, tmp_0, tmp_1, t, false);
|
|
948
948
|
};
|
|
949
|
-
protoOf(Segment).
|
|
950
|
-
var result = this.
|
|
951
|
-
if (!(this.
|
|
952
|
-
ensureNotNull(this.
|
|
949
|
+
protoOf(Segment).oq = function () {
|
|
950
|
+
var result = this.gp_1;
|
|
951
|
+
if (!(this.hp_1 == null)) {
|
|
952
|
+
ensureNotNull(this.hp_1).gp_1 = this.gp_1;
|
|
953
953
|
}
|
|
954
|
-
if (!(this.
|
|
955
|
-
ensureNotNull(this.
|
|
954
|
+
if (!(this.gp_1 == null)) {
|
|
955
|
+
ensureNotNull(this.gp_1).hp_1 = this.hp_1;
|
|
956
956
|
}
|
|
957
|
-
this.
|
|
958
|
-
this.
|
|
957
|
+
this.gp_1 = null;
|
|
958
|
+
this.hp_1 = null;
|
|
959
959
|
return result;
|
|
960
960
|
};
|
|
961
|
-
protoOf(Segment).
|
|
962
|
-
segment.
|
|
963
|
-
segment.
|
|
964
|
-
if (!(this.
|
|
965
|
-
ensureNotNull(this.
|
|
961
|
+
protoOf(Segment).pp = function (segment) {
|
|
962
|
+
segment.hp_1 = this;
|
|
963
|
+
segment.gp_1 = this.gp_1;
|
|
964
|
+
if (!(this.gp_1 == null)) {
|
|
965
|
+
ensureNotNull(this.gp_1).hp_1 = segment;
|
|
966
966
|
}
|
|
967
|
-
this.
|
|
967
|
+
this.gp_1 = segment;
|
|
968
968
|
return segment;
|
|
969
969
|
};
|
|
970
|
-
protoOf(Segment).
|
|
970
|
+
protoOf(Segment).mq = function (byteCount) {
|
|
971
971
|
// Inline function 'kotlin.require' call
|
|
972
|
-
if (!(byteCount > 0 && byteCount <= (this.
|
|
972
|
+
if (!(byteCount > 0 && byteCount <= (this.dp_1 - this.cp_1 | 0))) {
|
|
973
973
|
var message = 'byteCount out of range';
|
|
974
974
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
975
975
|
}
|
|
976
976
|
var prefix;
|
|
977
977
|
if (byteCount >= 1024) {
|
|
978
|
-
prefix = this.
|
|
978
|
+
prefix = this.op();
|
|
979
979
|
} else {
|
|
980
|
-
prefix = SegmentPool_instance.
|
|
981
|
-
var tmp0 = this.
|
|
982
|
-
var tmp2 = prefix.
|
|
983
|
-
var tmp5 = this.
|
|
980
|
+
prefix = SegmentPool_instance.fq();
|
|
981
|
+
var tmp0 = this.bp_1;
|
|
982
|
+
var tmp2 = prefix.bp_1;
|
|
983
|
+
var tmp5 = this.cp_1;
|
|
984
984
|
// Inline function 'kotlin.collections.copyInto' call
|
|
985
|
-
var endIndex = this.
|
|
985
|
+
var endIndex = this.cp_1 + byteCount | 0;
|
|
986
986
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
987
987
|
// Inline function 'kotlin.js.asDynamic' call
|
|
988
988
|
var tmp = tmp0;
|
|
@@ -990,62 +990,62 @@ protoOf(Segment).yp = function (byteCount) {
|
|
|
990
990
|
// Inline function 'kotlin.js.asDynamic' call
|
|
991
991
|
arrayCopy(tmp, tmp2, 0, tmp5, endIndex);
|
|
992
992
|
}
|
|
993
|
-
prefix.
|
|
994
|
-
this.
|
|
995
|
-
if (!(this.
|
|
996
|
-
ensureNotNull(this.
|
|
993
|
+
prefix.dp_1 = prefix.cp_1 + byteCount | 0;
|
|
994
|
+
this.cp_1 = this.cp_1 + byteCount | 0;
|
|
995
|
+
if (!(this.hp_1 == null)) {
|
|
996
|
+
ensureNotNull(this.hp_1).pp(prefix);
|
|
997
997
|
} else {
|
|
998
|
-
prefix.
|
|
999
|
-
this.
|
|
998
|
+
prefix.gp_1 = this;
|
|
999
|
+
this.hp_1 = prefix;
|
|
1000
1000
|
}
|
|
1001
1001
|
return prefix;
|
|
1002
1002
|
};
|
|
1003
|
-
protoOf(Segment).
|
|
1003
|
+
protoOf(Segment).qp = function () {
|
|
1004
1004
|
// Inline function 'kotlin.check' call
|
|
1005
|
-
if (!!(this.
|
|
1005
|
+
if (!!(this.hp_1 == null)) {
|
|
1006
1006
|
var message = 'cannot compact';
|
|
1007
1007
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
1008
1008
|
}
|
|
1009
|
-
if (!ensureNotNull(this.
|
|
1009
|
+
if (!ensureNotNull(this.hp_1).fp_1)
|
|
1010
1010
|
return this;
|
|
1011
|
-
var byteCount = this.
|
|
1012
|
-
var availableByteCount = (8192 - ensureNotNull(this.
|
|
1011
|
+
var byteCount = this.dp_1 - this.cp_1 | 0;
|
|
1012
|
+
var availableByteCount = (8192 - ensureNotNull(this.hp_1).dp_1 | 0) + (ensureNotNull(this.hp_1).lq() ? 0 : ensureNotNull(this.hp_1).cp_1) | 0;
|
|
1013
1013
|
if (byteCount > availableByteCount)
|
|
1014
1014
|
return this;
|
|
1015
|
-
var predecessor = this.
|
|
1016
|
-
this.
|
|
1017
|
-
var successor = this.
|
|
1015
|
+
var predecessor = this.hp_1;
|
|
1016
|
+
this.nq(ensureNotNull(predecessor), byteCount);
|
|
1017
|
+
var successor = this.oq();
|
|
1018
1018
|
// Inline function 'kotlin.check' call
|
|
1019
1019
|
if (!(successor == null)) {
|
|
1020
1020
|
throw IllegalStateException_init_$Create$('Check failed.');
|
|
1021
1021
|
}
|
|
1022
|
-
SegmentPool_instance.
|
|
1022
|
+
SegmentPool_instance.vq(this);
|
|
1023
1023
|
return predecessor;
|
|
1024
1024
|
};
|
|
1025
|
-
protoOf(Segment).
|
|
1026
|
-
var _unary__edvuaz = this.
|
|
1027
|
-
this.
|
|
1028
|
-
this.
|
|
1025
|
+
protoOf(Segment).rq = function (byte) {
|
|
1026
|
+
var _unary__edvuaz = this.dp_1;
|
|
1027
|
+
this.dp_1 = _unary__edvuaz + 1 | 0;
|
|
1028
|
+
this.bp_1[_unary__edvuaz] = byte;
|
|
1029
1029
|
};
|
|
1030
|
-
protoOf(Segment).
|
|
1031
|
-
var data = this.
|
|
1032
|
-
var limit = this.
|
|
1030
|
+
protoOf(Segment).tq = function (short) {
|
|
1031
|
+
var data = this.bp_1;
|
|
1032
|
+
var limit = this.dp_1;
|
|
1033
1033
|
var _unary__edvuaz = limit;
|
|
1034
1034
|
limit = _unary__edvuaz + 1 | 0;
|
|
1035
1035
|
data[_unary__edvuaz] = toByte((short >>> 8 | 0) & 255);
|
|
1036
1036
|
var _unary__edvuaz_0 = limit;
|
|
1037
1037
|
limit = _unary__edvuaz_0 + 1 | 0;
|
|
1038
1038
|
data[_unary__edvuaz_0] = toByte(short & 255);
|
|
1039
|
-
this.
|
|
1039
|
+
this.dp_1 = limit;
|
|
1040
1040
|
};
|
|
1041
|
-
protoOf(Segment).
|
|
1042
|
-
var _unary__edvuaz = this.
|
|
1043
|
-
this.
|
|
1044
|
-
return this.
|
|
1041
|
+
protoOf(Segment).jp = function () {
|
|
1042
|
+
var _unary__edvuaz = this.cp_1;
|
|
1043
|
+
this.cp_1 = _unary__edvuaz + 1 | 0;
|
|
1044
|
+
return this.bp_1[_unary__edvuaz];
|
|
1045
1045
|
};
|
|
1046
|
-
protoOf(Segment).
|
|
1047
|
-
var data = this.
|
|
1048
|
-
var pos = this.
|
|
1046
|
+
protoOf(Segment).lp = function () {
|
|
1047
|
+
var data = this.bp_1;
|
|
1048
|
+
var pos = this.cp_1;
|
|
1049
1049
|
var _unary__edvuaz = pos;
|
|
1050
1050
|
pos = _unary__edvuaz + 1 | 0;
|
|
1051
1051
|
// Inline function 'kotlinx.io.and' call
|
|
@@ -1055,118 +1055,118 @@ protoOf(Segment).xo = function () {
|
|
|
1055
1055
|
// Inline function 'kotlinx.io.and' call
|
|
1056
1056
|
var tmp$ret$1 = data[_unary__edvuaz_0] & 255;
|
|
1057
1057
|
var s = toShort(tmp | tmp$ret$1);
|
|
1058
|
-
this.
|
|
1058
|
+
this.cp_1 = pos;
|
|
1059
1059
|
return s;
|
|
1060
1060
|
};
|
|
1061
|
-
protoOf(Segment).
|
|
1061
|
+
protoOf(Segment).nq = function (sink, byteCount) {
|
|
1062
1062
|
// Inline function 'kotlin.check' call
|
|
1063
|
-
if (!sink.
|
|
1063
|
+
if (!sink.fp_1) {
|
|
1064
1064
|
var message = 'only owner can write';
|
|
1065
1065
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
1066
1066
|
}
|
|
1067
|
-
if ((sink.
|
|
1068
|
-
if (sink.
|
|
1067
|
+
if ((sink.dp_1 + byteCount | 0) > 8192) {
|
|
1068
|
+
if (sink.lq())
|
|
1069
1069
|
throw IllegalArgumentException_init_$Create$_0();
|
|
1070
|
-
if (((sink.
|
|
1070
|
+
if (((sink.dp_1 + byteCount | 0) - sink.cp_1 | 0) > 8192)
|
|
1071
1071
|
throw IllegalArgumentException_init_$Create$_0();
|
|
1072
|
-
var tmp0 = sink.
|
|
1073
|
-
var tmp2 = sink.
|
|
1074
|
-
var tmp5 = sink.
|
|
1072
|
+
var tmp0 = sink.bp_1;
|
|
1073
|
+
var tmp2 = sink.bp_1;
|
|
1074
|
+
var tmp5 = sink.cp_1;
|
|
1075
1075
|
// Inline function 'kotlin.collections.copyInto' call
|
|
1076
|
-
var endIndex = sink.
|
|
1076
|
+
var endIndex = sink.dp_1;
|
|
1077
1077
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1078
1078
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1079
1079
|
var tmp = tmp0;
|
|
1080
1080
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1081
1081
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1082
1082
|
arrayCopy(tmp, tmp2, 0, tmp5, endIndex);
|
|
1083
|
-
sink.
|
|
1084
|
-
sink.
|
|
1083
|
+
sink.dp_1 = sink.dp_1 - sink.cp_1 | 0;
|
|
1084
|
+
sink.cp_1 = 0;
|
|
1085
1085
|
}
|
|
1086
|
-
var tmp0_0 = this.
|
|
1087
|
-
var tmp2_0 = sink.
|
|
1088
|
-
var tmp4 = sink.
|
|
1089
|
-
var tmp6 = this.
|
|
1086
|
+
var tmp0_0 = this.bp_1;
|
|
1087
|
+
var tmp2_0 = sink.bp_1;
|
|
1088
|
+
var tmp4 = sink.dp_1;
|
|
1089
|
+
var tmp6 = this.cp_1;
|
|
1090
1090
|
// Inline function 'kotlin.collections.copyInto' call
|
|
1091
|
-
var endIndex_0 = this.
|
|
1091
|
+
var endIndex_0 = this.cp_1 + byteCount | 0;
|
|
1092
1092
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1093
1093
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1094
1094
|
var tmp_0 = tmp0_0;
|
|
1095
1095
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1096
1096
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1097
1097
|
arrayCopy(tmp_0, tmp2_0, tmp4, tmp6, endIndex_0);
|
|
1098
|
-
sink.
|
|
1099
|
-
this.
|
|
1098
|
+
sink.dp_1 = sink.dp_1 + byteCount | 0;
|
|
1099
|
+
this.cp_1 = this.cp_1 + byteCount | 0;
|
|
1100
1100
|
};
|
|
1101
|
-
protoOf(Segment).
|
|
1101
|
+
protoOf(Segment).wp = function (dst, dstStartOffset, dstEndOffset) {
|
|
1102
1102
|
var len = dstEndOffset - dstStartOffset | 0;
|
|
1103
|
-
var tmp0 = this.
|
|
1104
|
-
var tmp6 = this.
|
|
1103
|
+
var tmp0 = this.bp_1;
|
|
1104
|
+
var tmp6 = this.cp_1;
|
|
1105
1105
|
// Inline function 'kotlin.collections.copyInto' call
|
|
1106
|
-
var endIndex = this.
|
|
1106
|
+
var endIndex = this.cp_1 + len | 0;
|
|
1107
1107
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1108
1108
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1109
1109
|
var tmp = tmp0;
|
|
1110
1110
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1111
1111
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1112
1112
|
arrayCopy(tmp, dst, dstStartOffset, tmp6, endIndex);
|
|
1113
|
-
this.
|
|
1113
|
+
this.cp_1 = this.cp_1 + len | 0;
|
|
1114
1114
|
};
|
|
1115
|
-
protoOf(Segment).
|
|
1116
|
-
var tmp2 = this.
|
|
1115
|
+
protoOf(Segment).iq = function (src, srcStartOffset, srcEndOffset) {
|
|
1116
|
+
var tmp2 = this.bp_1;
|
|
1117
1117
|
// Inline function 'kotlin.collections.copyInto' call
|
|
1118
|
-
var destinationOffset = this.
|
|
1118
|
+
var destinationOffset = this.dp_1;
|
|
1119
1119
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1120
1120
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1121
1121
|
var tmp = src;
|
|
1122
1122
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1123
1123
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1124
1124
|
arrayCopy(tmp, tmp2, destinationOffset, srcStartOffset, srcEndOffset);
|
|
1125
|
-
this.
|
|
1125
|
+
this.dp_1 = this.dp_1 + (srcEndOffset - srcStartOffset | 0) | 0;
|
|
1126
1126
|
};
|
|
1127
1127
|
protoOf(Segment).g1 = function () {
|
|
1128
|
-
return this.
|
|
1128
|
+
return this.dp_1 - this.cp_1 | 0;
|
|
1129
1129
|
};
|
|
1130
|
-
protoOf(Segment).
|
|
1131
|
-
return this.
|
|
1130
|
+
protoOf(Segment).hq = function () {
|
|
1131
|
+
return this.bp_1.length - this.dp_1 | 0;
|
|
1132
1132
|
};
|
|
1133
|
-
protoOf(Segment).
|
|
1134
|
-
return this.
|
|
1133
|
+
protoOf(Segment).mr = function (readOnly) {
|
|
1134
|
+
return this.bp_1;
|
|
1135
1135
|
};
|
|
1136
|
-
protoOf(Segment).
|
|
1137
|
-
return this.
|
|
1136
|
+
protoOf(Segment).tp = function (index) {
|
|
1137
|
+
return this.bp_1[this.cp_1 + index | 0];
|
|
1138
1138
|
};
|
|
1139
|
-
protoOf(Segment).
|
|
1140
|
-
this.
|
|
1139
|
+
protoOf(Segment).nr = function (index, value) {
|
|
1140
|
+
this.bp_1[this.dp_1 + index | 0] = value;
|
|
1141
1141
|
};
|
|
1142
|
-
protoOf(Segment).
|
|
1143
|
-
var d = this.
|
|
1144
|
-
var l = this.
|
|
1142
|
+
protoOf(Segment).or = function (index, b0, b1) {
|
|
1143
|
+
var d = this.bp_1;
|
|
1144
|
+
var l = this.dp_1;
|
|
1145
1145
|
d[l + index | 0] = b0;
|
|
1146
1146
|
d[(l + index | 0) + 1 | 0] = b1;
|
|
1147
1147
|
};
|
|
1148
|
-
protoOf(Segment).
|
|
1149
|
-
var d = this.
|
|
1150
|
-
var l = this.
|
|
1148
|
+
protoOf(Segment).pr = function (index, b0, b1, b2) {
|
|
1149
|
+
var d = this.bp_1;
|
|
1150
|
+
var l = this.dp_1;
|
|
1151
1151
|
d[l + index | 0] = b0;
|
|
1152
1152
|
d[(l + index | 0) + 1 | 0] = b1;
|
|
1153
1153
|
d[(l + index | 0) + 2 | 0] = b2;
|
|
1154
1154
|
};
|
|
1155
|
-
protoOf(Segment).
|
|
1156
|
-
var d = this.
|
|
1157
|
-
var l = this.
|
|
1155
|
+
protoOf(Segment).qr = function (index, b0, b1, b2, b3) {
|
|
1156
|
+
var d = this.bp_1;
|
|
1157
|
+
var l = this.dp_1;
|
|
1158
1158
|
d[l + index | 0] = b0;
|
|
1159
1159
|
d[(l + index | 0) + 1 | 0] = b1;
|
|
1160
1160
|
d[(l + index | 0) + 2 | 0] = b2;
|
|
1161
1161
|
d[(l + index | 0) + 3 | 0] = b3;
|
|
1162
1162
|
};
|
|
1163
1163
|
function Segment() {
|
|
1164
|
-
this.
|
|
1165
|
-
this.
|
|
1166
|
-
this.
|
|
1167
|
-
this.
|
|
1168
|
-
this.
|
|
1169
|
-
this.
|
|
1164
|
+
this.cp_1 = 0;
|
|
1165
|
+
this.dp_1 = 0;
|
|
1166
|
+
this.ep_1 = null;
|
|
1167
|
+
this.fp_1 = false;
|
|
1168
|
+
this.gp_1 = null;
|
|
1169
|
+
this.hp_1 = null;
|
|
1170
1170
|
}
|
|
1171
1171
|
function isEmpty(_this__u8e3s4) {
|
|
1172
1172
|
return _this__u8e3s4.g1() === 0;
|
|
@@ -1177,10 +1177,10 @@ function AlwaysSharedCopyTracker() {
|
|
|
1177
1177
|
AlwaysSharedCopyTracker_instance = this;
|
|
1178
1178
|
SegmentCopyTracker.call(this);
|
|
1179
1179
|
}
|
|
1180
|
-
protoOf(AlwaysSharedCopyTracker).
|
|
1180
|
+
protoOf(AlwaysSharedCopyTracker).jr = function () {
|
|
1181
1181
|
return true;
|
|
1182
1182
|
};
|
|
1183
|
-
protoOf(AlwaysSharedCopyTracker).
|
|
1183
|
+
protoOf(AlwaysSharedCopyTracker).lr = function () {
|
|
1184
1184
|
return Unit_instance;
|
|
1185
1185
|
};
|
|
1186
1186
|
var AlwaysSharedCopyTracker_instance;
|
|
@@ -1200,8 +1200,8 @@ function indexOf_0(_this__u8e3s4, byte, startOffset, endOffset) {
|
|
|
1200
1200
|
var message_0 = '' + endOffset;
|
|
1201
1201
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
1202
1202
|
}
|
|
1203
|
-
var p = _this__u8e3s4.
|
|
1204
|
-
var data = _this__u8e3s4.
|
|
1203
|
+
var p = _this__u8e3s4.cp_1;
|
|
1204
|
+
var data = _this__u8e3s4.mr(true);
|
|
1205
1205
|
var inductionVariable = startOffset;
|
|
1206
1206
|
if (inductionVariable < endOffset)
|
|
1207
1207
|
do {
|
|
@@ -1254,23 +1254,23 @@ function indexOf_1(_this__u8e3s4, byte, startIndex, endIndex) {
|
|
|
1254
1254
|
// Inline function 'kotlin.Long.plus' call
|
|
1255
1255
|
var this_0 = offset;
|
|
1256
1256
|
var tmp$ret$2 = add(this_0, fromInt(1));
|
|
1257
|
-
tmp_0 = _this__u8e3s4.
|
|
1257
|
+
tmp_0 = _this__u8e3s4.zo(tmp$ret$2);
|
|
1258
1258
|
} else {
|
|
1259
1259
|
tmp_0 = false;
|
|
1260
1260
|
}
|
|
1261
1261
|
if (!tmp_0) {
|
|
1262
1262
|
break $l$loop;
|
|
1263
1263
|
}
|
|
1264
|
-
var tmp_1 = _this__u8e3s4.
|
|
1264
|
+
var tmp_1 = _this__u8e3s4.wo();
|
|
1265
1265
|
var tmp_2 = offset;
|
|
1266
1266
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
1267
|
-
var b = _this__u8e3s4.
|
|
1267
|
+
var b = _this__u8e3s4.wo().g1();
|
|
1268
1268
|
var tmp$ret$3 = endIndex <= b ? endIndex : b;
|
|
1269
1269
|
var idx = indexOf(tmp_1, byte, tmp_2, tmp$ret$3);
|
|
1270
1270
|
if (!(idx === -1n)) {
|
|
1271
1271
|
return idx;
|
|
1272
1272
|
}
|
|
1273
|
-
offset = _this__u8e3s4.
|
|
1273
|
+
offset = _this__u8e3s4.wo().g1();
|
|
1274
1274
|
}
|
|
1275
1275
|
return -1n;
|
|
1276
1276
|
}
|
|
@@ -1278,22 +1278,22 @@ function readByteArrayImpl(_this__u8e3s4, size) {
|
|
|
1278
1278
|
var arraySize = size;
|
|
1279
1279
|
if (size === -1) {
|
|
1280
1280
|
var fetchSize = 2147483647n;
|
|
1281
|
-
while (_this__u8e3s4.
|
|
1281
|
+
while (_this__u8e3s4.wo().g1() < 2147483647n && _this__u8e3s4.zo(fetchSize)) {
|
|
1282
1282
|
// Inline function 'kotlin.Long.times' call
|
|
1283
1283
|
var this_0 = fetchSize;
|
|
1284
1284
|
fetchSize = multiply(this_0, fromInt(2));
|
|
1285
1285
|
}
|
|
1286
1286
|
// Inline function 'kotlin.check' call
|
|
1287
|
-
if (!(_this__u8e3s4.
|
|
1288
|
-
var message = "Can't create an array of size " + _this__u8e3s4.
|
|
1287
|
+
if (!(_this__u8e3s4.wo().g1() < 2147483647n)) {
|
|
1288
|
+
var message = "Can't create an array of size " + _this__u8e3s4.wo().g1().toString();
|
|
1289
1289
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
1290
1290
|
}
|
|
1291
|
-
arraySize = convertToInt(_this__u8e3s4.
|
|
1291
|
+
arraySize = convertToInt(_this__u8e3s4.wo().g1());
|
|
1292
1292
|
} else {
|
|
1293
|
-
_this__u8e3s4.
|
|
1293
|
+
_this__u8e3s4.yo(fromInt(size));
|
|
1294
1294
|
}
|
|
1295
1295
|
var array = new Int8Array(arraySize);
|
|
1296
|
-
readTo(_this__u8e3s4.
|
|
1296
|
+
readTo(_this__u8e3s4.wo(), array);
|
|
1297
1297
|
return array;
|
|
1298
1298
|
}
|
|
1299
1299
|
function readTo(_this__u8e3s4, sink, startIndex, endIndex) {
|
|
@@ -1304,7 +1304,7 @@ function readTo(_this__u8e3s4, sink, startIndex, endIndex) {
|
|
|
1304
1304
|
checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
|
|
1305
1305
|
var offset = startIndex;
|
|
1306
1306
|
while (offset < endIndex) {
|
|
1307
|
-
var bytesRead = _this__u8e3s4.
|
|
1307
|
+
var bytesRead = _this__u8e3s4.vp(sink, offset, endIndex);
|
|
1308
1308
|
if (bytesRead === -1) {
|
|
1309
1309
|
throw EOFException_init_$Create$_0('Source exhausted before reading ' + (endIndex - startIndex | 0) + ' bytes. ' + ('Only ' + bytesRead + ' bytes were read.'));
|
|
1310
1310
|
}
|
|
@@ -1312,12 +1312,15 @@ function readTo(_this__u8e3s4, sink, startIndex, endIndex) {
|
|
|
1312
1312
|
}
|
|
1313
1313
|
}
|
|
1314
1314
|
function readString(_this__u8e3s4, byteCount) {
|
|
1315
|
-
_this__u8e3s4.
|
|
1316
|
-
return commonReadUtf8(_this__u8e3s4.
|
|
1315
|
+
_this__u8e3s4.yo(byteCount);
|
|
1316
|
+
return commonReadUtf8(_this__u8e3s4.wo(), byteCount);
|
|
1317
1317
|
}
|
|
1318
1318
|
function readString_0(_this__u8e3s4) {
|
|
1319
|
-
_this__u8e3s4.
|
|
1320
|
-
|
|
1319
|
+
return commonReadUtf8(_this__u8e3s4, _this__u8e3s4.g1());
|
|
1320
|
+
}
|
|
1321
|
+
function readString_1(_this__u8e3s4) {
|
|
1322
|
+
_this__u8e3s4.zo(9223372036854775807n);
|
|
1323
|
+
return commonReadUtf8(_this__u8e3s4.wo(), _this__u8e3s4.wo().g1());
|
|
1321
1324
|
}
|
|
1322
1325
|
function writeString(_this__u8e3s4, string, startIndex, endIndex) {
|
|
1323
1326
|
startIndex = startIndex === VOID ? 0 : startIndex;
|
|
@@ -1327,7 +1330,7 @@ function writeString(_this__u8e3s4, string, startIndex, endIndex) {
|
|
|
1327
1330
|
checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
|
|
1328
1331
|
// Inline function 'kotlinx.io.writeToInternalBuffer' call
|
|
1329
1332
|
// Inline function 'kotlinx.io.commonWriteUtf8' call
|
|
1330
|
-
var this_0 = _this__u8e3s4.
|
|
1333
|
+
var this_0 = _this__u8e3s4.wo();
|
|
1331
1334
|
var i = startIndex;
|
|
1332
1335
|
while (i < endIndex) {
|
|
1333
1336
|
var p0 = i;
|
|
@@ -1337,15 +1340,15 @@ function writeString(_this__u8e3s4, string, startIndex, endIndex) {
|
|
|
1337
1340
|
if (c < 128) {
|
|
1338
1341
|
$l$block_0: {
|
|
1339
1342
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
|
|
1340
|
-
var tail = this_0.
|
|
1343
|
+
var tail = this_0.cq(1);
|
|
1341
1344
|
var ctx = get_SegmentWriteContextImpl();
|
|
1342
1345
|
var segmentOffset = -i | 0;
|
|
1343
1346
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
1344
|
-
var b = i + tail.
|
|
1347
|
+
var b = i + tail.hq() | 0;
|
|
1345
1348
|
var runLimit = Math.min(endIndex, b);
|
|
1346
1349
|
var _unary__edvuaz = i;
|
|
1347
1350
|
i = _unary__edvuaz + 1 | 0;
|
|
1348
|
-
ctx.
|
|
1351
|
+
ctx.ur(tail, segmentOffset + _unary__edvuaz | 0, toByte(c));
|
|
1349
1352
|
$l$loop: while (i < runLimit) {
|
|
1350
1353
|
var p0_0 = i;
|
|
1351
1354
|
// Inline function 'kotlin.code' call
|
|
@@ -1355,95 +1358,95 @@ function writeString(_this__u8e3s4, string, startIndex, endIndex) {
|
|
|
1355
1358
|
break $l$loop;
|
|
1356
1359
|
var _unary__edvuaz_0 = i;
|
|
1357
1360
|
i = _unary__edvuaz_0 + 1 | 0;
|
|
1358
|
-
ctx.
|
|
1361
|
+
ctx.ur(tail, segmentOffset + _unary__edvuaz_0 | 0, toByte(c));
|
|
1359
1362
|
}
|
|
1360
1363
|
var bytesWritten = i + segmentOffset | 0;
|
|
1361
1364
|
if (bytesWritten === 1) {
|
|
1362
|
-
tail.
|
|
1365
|
+
tail.dp_1 = tail.dp_1 + bytesWritten | 0;
|
|
1363
1366
|
var tmp = this_0;
|
|
1364
1367
|
// Inline function 'kotlin.Long.plus' call
|
|
1365
|
-
var this_3 = this_0.
|
|
1366
|
-
tmp.
|
|
1368
|
+
var this_3 = this_0.vo_1;
|
|
1369
|
+
tmp.vo_1 = add(this_3, fromInt(bytesWritten));
|
|
1367
1370
|
break $l$block_0;
|
|
1368
1371
|
}
|
|
1369
1372
|
// Inline function 'kotlin.check' call
|
|
1370
|
-
if (!(0 <= bytesWritten ? bytesWritten <= tail.
|
|
1371
|
-
var message = 'Invalid number of bytes written: ' + bytesWritten + '. Should be in 0..' + tail.
|
|
1373
|
+
if (!(0 <= bytesWritten ? bytesWritten <= tail.hq() : false)) {
|
|
1374
|
+
var message = 'Invalid number of bytes written: ' + bytesWritten + '. Should be in 0..' + tail.hq();
|
|
1372
1375
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
1373
1376
|
}
|
|
1374
1377
|
if (!(bytesWritten === 0)) {
|
|
1375
|
-
tail.
|
|
1378
|
+
tail.dp_1 = tail.dp_1 + bytesWritten | 0;
|
|
1376
1379
|
var tmp_0 = this_0;
|
|
1377
1380
|
// Inline function 'kotlin.Long.plus' call
|
|
1378
|
-
var this_4 = this_0.
|
|
1379
|
-
tmp_0.
|
|
1381
|
+
var this_4 = this_0.vo_1;
|
|
1382
|
+
tmp_0.vo_1 = add(this_4, fromInt(bytesWritten));
|
|
1380
1383
|
break $l$block_0;
|
|
1381
1384
|
}
|
|
1382
1385
|
if (isEmpty(tail)) {
|
|
1383
|
-
this_0.
|
|
1386
|
+
this_0.wq();
|
|
1384
1387
|
}
|
|
1385
1388
|
}
|
|
1386
1389
|
} else if (c < 2048) {
|
|
1387
1390
|
$l$block_2: {
|
|
1388
1391
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
|
|
1389
|
-
var tail_0 = this_0.
|
|
1390
|
-
get_SegmentWriteContextImpl().
|
|
1392
|
+
var tail_0 = this_0.cq(2);
|
|
1393
|
+
get_SegmentWriteContextImpl().tr(tail_0, 0, toByte(c >> 6 | 192), toByte(c & 63 | 128));
|
|
1391
1394
|
var bytesWritten_0 = 2;
|
|
1392
1395
|
if (bytesWritten_0 === 2) {
|
|
1393
|
-
tail_0.
|
|
1396
|
+
tail_0.dp_1 = tail_0.dp_1 + bytesWritten_0 | 0;
|
|
1394
1397
|
var tmp_1 = this_0;
|
|
1395
1398
|
// Inline function 'kotlin.Long.plus' call
|
|
1396
|
-
var this_5 = this_0.
|
|
1397
|
-
tmp_1.
|
|
1399
|
+
var this_5 = this_0.vo_1;
|
|
1400
|
+
tmp_1.vo_1 = add(this_5, fromInt(bytesWritten_0));
|
|
1398
1401
|
break $l$block_2;
|
|
1399
1402
|
}
|
|
1400
1403
|
// Inline function 'kotlin.check' call
|
|
1401
|
-
if (!(0 <= bytesWritten_0 ? bytesWritten_0 <= tail_0.
|
|
1402
|
-
var message_0 = 'Invalid number of bytes written: ' + bytesWritten_0 + '. Should be in 0..' + tail_0.
|
|
1404
|
+
if (!(0 <= bytesWritten_0 ? bytesWritten_0 <= tail_0.hq() : false)) {
|
|
1405
|
+
var message_0 = 'Invalid number of bytes written: ' + bytesWritten_0 + '. Should be in 0..' + tail_0.hq();
|
|
1403
1406
|
throw IllegalStateException_init_$Create$(toString(message_0));
|
|
1404
1407
|
}
|
|
1405
1408
|
if (!(bytesWritten_0 === 0)) {
|
|
1406
|
-
tail_0.
|
|
1409
|
+
tail_0.dp_1 = tail_0.dp_1 + bytesWritten_0 | 0;
|
|
1407
1410
|
var tmp_2 = this_0;
|
|
1408
1411
|
// Inline function 'kotlin.Long.plus' call
|
|
1409
|
-
var this_6 = this_0.
|
|
1410
|
-
tmp_2.
|
|
1412
|
+
var this_6 = this_0.vo_1;
|
|
1413
|
+
tmp_2.vo_1 = add(this_6, fromInt(bytesWritten_0));
|
|
1411
1414
|
break $l$block_2;
|
|
1412
1415
|
}
|
|
1413
1416
|
if (isEmpty(tail_0)) {
|
|
1414
|
-
this_0.
|
|
1417
|
+
this_0.wq();
|
|
1415
1418
|
}
|
|
1416
1419
|
}
|
|
1417
1420
|
i = i + 1 | 0;
|
|
1418
1421
|
} else if (c < 55296 || c > 57343) {
|
|
1419
1422
|
$l$block_4: {
|
|
1420
1423
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
|
|
1421
|
-
var tail_1 = this_0.
|
|
1422
|
-
get_SegmentWriteContextImpl().
|
|
1424
|
+
var tail_1 = this_0.cq(3);
|
|
1425
|
+
get_SegmentWriteContextImpl().sr(tail_1, 0, toByte(c >> 12 | 224), toByte(c >> 6 & 63 | 128), toByte(c & 63 | 128));
|
|
1423
1426
|
var bytesWritten_1 = 3;
|
|
1424
1427
|
if (bytesWritten_1 === 3) {
|
|
1425
|
-
tail_1.
|
|
1428
|
+
tail_1.dp_1 = tail_1.dp_1 + bytesWritten_1 | 0;
|
|
1426
1429
|
var tmp_3 = this_0;
|
|
1427
1430
|
// Inline function 'kotlin.Long.plus' call
|
|
1428
|
-
var this_7 = this_0.
|
|
1429
|
-
tmp_3.
|
|
1431
|
+
var this_7 = this_0.vo_1;
|
|
1432
|
+
tmp_3.vo_1 = add(this_7, fromInt(bytesWritten_1));
|
|
1430
1433
|
break $l$block_4;
|
|
1431
1434
|
}
|
|
1432
1435
|
// Inline function 'kotlin.check' call
|
|
1433
|
-
if (!(0 <= bytesWritten_1 ? bytesWritten_1 <= tail_1.
|
|
1434
|
-
var message_1 = 'Invalid number of bytes written: ' + bytesWritten_1 + '. Should be in 0..' + tail_1.
|
|
1436
|
+
if (!(0 <= bytesWritten_1 ? bytesWritten_1 <= tail_1.hq() : false)) {
|
|
1437
|
+
var message_1 = 'Invalid number of bytes written: ' + bytesWritten_1 + '. Should be in 0..' + tail_1.hq();
|
|
1435
1438
|
throw IllegalStateException_init_$Create$(toString(message_1));
|
|
1436
1439
|
}
|
|
1437
1440
|
if (!(bytesWritten_1 === 0)) {
|
|
1438
|
-
tail_1.
|
|
1441
|
+
tail_1.dp_1 = tail_1.dp_1 + bytesWritten_1 | 0;
|
|
1439
1442
|
var tmp_4 = this_0;
|
|
1440
1443
|
// Inline function 'kotlin.Long.plus' call
|
|
1441
|
-
var this_8 = this_0.
|
|
1442
|
-
tmp_4.
|
|
1444
|
+
var this_8 = this_0.vo_1;
|
|
1445
|
+
tmp_4.vo_1 = add(this_8, fromInt(bytesWritten_1));
|
|
1443
1446
|
break $l$block_4;
|
|
1444
1447
|
}
|
|
1445
1448
|
if (isEmpty(tail_1)) {
|
|
1446
|
-
this_0.
|
|
1449
|
+
this_0.wq();
|
|
1447
1450
|
}
|
|
1448
1451
|
}
|
|
1449
1452
|
i = i + 1 | 0;
|
|
@@ -1462,64 +1465,64 @@ function writeString(_this__u8e3s4, string, startIndex, endIndex) {
|
|
|
1462
1465
|
// Inline function 'kotlin.code' call
|
|
1463
1466
|
var this_10 = _Char___init__impl__6a9atx(63);
|
|
1464
1467
|
var tmp$ret$29 = Char__toInt_impl_vasixd(this_10);
|
|
1465
|
-
this_0.
|
|
1468
|
+
this_0.qq(toByte(tmp$ret$29));
|
|
1466
1469
|
i = i + 1 | 0;
|
|
1467
1470
|
} else {
|
|
1468
1471
|
var codePoint = 65536 + ((c & 1023) << 10 | low & 1023) | 0;
|
|
1469
1472
|
$l$block_6: {
|
|
1470
1473
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
|
|
1471
|
-
var tail_2 = this_0.
|
|
1472
|
-
get_SegmentWriteContextImpl().
|
|
1474
|
+
var tail_2 = this_0.cq(4);
|
|
1475
|
+
get_SegmentWriteContextImpl().rr(tail_2, 0, toByte(codePoint >> 18 | 240), toByte(codePoint >> 12 & 63 | 128), toByte(codePoint >> 6 & 63 | 128), toByte(codePoint & 63 | 128));
|
|
1473
1476
|
var bytesWritten_2 = 4;
|
|
1474
1477
|
if (bytesWritten_2 === 4) {
|
|
1475
|
-
tail_2.
|
|
1478
|
+
tail_2.dp_1 = tail_2.dp_1 + bytesWritten_2 | 0;
|
|
1476
1479
|
var tmp_6 = this_0;
|
|
1477
1480
|
// Inline function 'kotlin.Long.plus' call
|
|
1478
|
-
var this_11 = this_0.
|
|
1479
|
-
tmp_6.
|
|
1481
|
+
var this_11 = this_0.vo_1;
|
|
1482
|
+
tmp_6.vo_1 = add(this_11, fromInt(bytesWritten_2));
|
|
1480
1483
|
break $l$block_6;
|
|
1481
1484
|
}
|
|
1482
1485
|
// Inline function 'kotlin.check' call
|
|
1483
|
-
if (!(0 <= bytesWritten_2 ? bytesWritten_2 <= tail_2.
|
|
1484
|
-
var message_2 = 'Invalid number of bytes written: ' + bytesWritten_2 + '. Should be in 0..' + tail_2.
|
|
1486
|
+
if (!(0 <= bytesWritten_2 ? bytesWritten_2 <= tail_2.hq() : false)) {
|
|
1487
|
+
var message_2 = 'Invalid number of bytes written: ' + bytesWritten_2 + '. Should be in 0..' + tail_2.hq();
|
|
1485
1488
|
throw IllegalStateException_init_$Create$(toString(message_2));
|
|
1486
1489
|
}
|
|
1487
1490
|
if (!(bytesWritten_2 === 0)) {
|
|
1488
|
-
tail_2.
|
|
1491
|
+
tail_2.dp_1 = tail_2.dp_1 + bytesWritten_2 | 0;
|
|
1489
1492
|
var tmp_7 = this_0;
|
|
1490
1493
|
// Inline function 'kotlin.Long.plus' call
|
|
1491
|
-
var this_12 = this_0.
|
|
1492
|
-
tmp_7.
|
|
1494
|
+
var this_12 = this_0.vo_1;
|
|
1495
|
+
tmp_7.vo_1 = add(this_12, fromInt(bytesWritten_2));
|
|
1493
1496
|
break $l$block_6;
|
|
1494
1497
|
}
|
|
1495
1498
|
if (isEmpty(tail_2)) {
|
|
1496
|
-
this_0.
|
|
1499
|
+
this_0.wq();
|
|
1497
1500
|
}
|
|
1498
1501
|
}
|
|
1499
1502
|
i = i + 2 | 0;
|
|
1500
1503
|
}
|
|
1501
1504
|
}
|
|
1502
1505
|
}
|
|
1503
|
-
_this__u8e3s4.
|
|
1506
|
+
_this__u8e3s4.mp();
|
|
1504
1507
|
}
|
|
1505
1508
|
function commonReadUtf8(_this__u8e3s4, byteCount) {
|
|
1506
1509
|
if (byteCount === 0n)
|
|
1507
1510
|
return '';
|
|
1508
1511
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.forEachSegment' call
|
|
1509
|
-
var curr = _this__u8e3s4.
|
|
1512
|
+
var curr = _this__u8e3s4.to_1;
|
|
1510
1513
|
while (!(curr == null)) {
|
|
1511
1514
|
get_SegmentReadContextImpl();
|
|
1512
1515
|
if (fromInt(curr.g1()) >= byteCount) {
|
|
1513
1516
|
var result = '';
|
|
1514
1517
|
// Inline function 'kotlinx.io.unsafe.withData' call
|
|
1515
|
-
var tmp0 = curr.
|
|
1516
|
-
var tmp2 = curr.
|
|
1517
|
-
var tmp0_0 = curr.
|
|
1518
|
+
var tmp0 = curr.mr(true);
|
|
1519
|
+
var tmp2 = curr.cp_1;
|
|
1520
|
+
var tmp0_0 = curr.dp_1;
|
|
1518
1521
|
// Inline function 'kotlin.math.min' call
|
|
1519
1522
|
var b = tmp2 + convertToInt(byteCount) | 0;
|
|
1520
1523
|
var tmp$ret$4 = Math.min(tmp0_0, b);
|
|
1521
1524
|
result = commonToUtf8String(tmp0, tmp2, tmp$ret$4);
|
|
1522
|
-
_this__u8e3s4.
|
|
1525
|
+
_this__u8e3s4.up(byteCount);
|
|
1523
1526
|
return result;
|
|
1524
1527
|
}
|
|
1525
1528
|
return commonToUtf8String(readByteArray_0(_this__u8e3s4, convertToInt(byteCount)));
|
|
@@ -1890,27 +1893,27 @@ function UnsafeBufferOperations_getInstance() {
|
|
|
1890
1893
|
}
|
|
1891
1894
|
function SegmentReadContextImpl$1() {
|
|
1892
1895
|
}
|
|
1893
|
-
protoOf(SegmentReadContextImpl$1).
|
|
1894
|
-
return segment.
|
|
1896
|
+
protoOf(SegmentReadContextImpl$1).uq = function (segment, offset) {
|
|
1897
|
+
return segment.tp(offset);
|
|
1895
1898
|
};
|
|
1896
1899
|
function SegmentWriteContextImpl$1() {
|
|
1897
1900
|
}
|
|
1898
|
-
protoOf(SegmentWriteContextImpl$1).
|
|
1899
|
-
segment.
|
|
1901
|
+
protoOf(SegmentWriteContextImpl$1).ur = function (segment, offset, value) {
|
|
1902
|
+
segment.nr(offset, value);
|
|
1900
1903
|
};
|
|
1901
|
-
protoOf(SegmentWriteContextImpl$1).
|
|
1902
|
-
segment.
|
|
1904
|
+
protoOf(SegmentWriteContextImpl$1).tr = function (segment, offset, b0, b1) {
|
|
1905
|
+
segment.or(offset, b0, b1);
|
|
1903
1906
|
};
|
|
1904
|
-
protoOf(SegmentWriteContextImpl$1).
|
|
1905
|
-
segment.
|
|
1907
|
+
protoOf(SegmentWriteContextImpl$1).sr = function (segment, offset, b0, b1, b2) {
|
|
1908
|
+
segment.pr(offset, b0, b1, b2);
|
|
1906
1909
|
};
|
|
1907
|
-
protoOf(SegmentWriteContextImpl$1).
|
|
1908
|
-
segment.
|
|
1910
|
+
protoOf(SegmentWriteContextImpl$1).rr = function (segment, offset, b0, b1, b2, b3) {
|
|
1911
|
+
segment.qr(offset, b0, b1, b2, b3);
|
|
1909
1912
|
};
|
|
1910
1913
|
function BufferIterationContextImpl$1() {
|
|
1911
1914
|
}
|
|
1912
|
-
protoOf(BufferIterationContextImpl$1).
|
|
1913
|
-
return get_SegmentReadContextImpl().
|
|
1915
|
+
protoOf(BufferIterationContextImpl$1).uq = function (segment, offset) {
|
|
1916
|
+
return get_SegmentReadContextImpl().uq(segment, offset);
|
|
1914
1917
|
};
|
|
1915
1918
|
var properties_initialized_UnsafeBufferOperations_kt_2xfgoc;
|
|
1916
1919
|
function _init_properties_UnsafeBufferOperations_kt__xw75gy() {
|
|
@@ -1978,15 +1981,15 @@ function EOFException() {
|
|
|
1978
1981
|
captureStack(this, EOFException);
|
|
1979
1982
|
}
|
|
1980
1983
|
function SegmentPool() {
|
|
1981
|
-
this.
|
|
1982
|
-
this.
|
|
1984
|
+
this.dq_1 = 0;
|
|
1985
|
+
this.eq_1 = 0;
|
|
1983
1986
|
}
|
|
1984
|
-
protoOf(SegmentPool).
|
|
1985
|
-
return Companion_instance.
|
|
1987
|
+
protoOf(SegmentPool).fq = function () {
|
|
1988
|
+
return Companion_instance.ir();
|
|
1986
1989
|
};
|
|
1987
|
-
protoOf(SegmentPool).
|
|
1990
|
+
protoOf(SegmentPool).vq = function (segment) {
|
|
1988
1991
|
};
|
|
1989
|
-
protoOf(SegmentPool).
|
|
1992
|
+
protoOf(SegmentPool).kr = function () {
|
|
1990
1993
|
return AlwaysSharedCopyTracker_getInstance();
|
|
1991
1994
|
};
|
|
1992
1995
|
var SegmentPool_instance;
|
|
@@ -1994,7 +1997,7 @@ function SegmentPool_getInstance() {
|
|
|
1994
1997
|
return SegmentPool_instance;
|
|
1995
1998
|
}
|
|
1996
1999
|
//region block: post-declaration
|
|
1997
|
-
protoOf(Buffer).
|
|
2000
|
+
protoOf(Buffer).jq = write$default;
|
|
1998
2001
|
//endregion
|
|
1999
2002
|
//region block: init
|
|
2000
2003
|
Companion_instance = new Companion();
|
|
@@ -2003,11 +2006,11 @@ SegmentPool_instance = new SegmentPool();
|
|
|
2003
2006
|
//endregion
|
|
2004
2007
|
//region block: exports
|
|
2005
2008
|
export {
|
|
2006
|
-
EOFException_init_$Create$_0 as EOFException_init_$Create$
|
|
2007
|
-
IOException_init_$Init$_0 as IOException_init_$Init$
|
|
2008
|
-
IOException_init_$Create$_0 as IOException_init_$Create$
|
|
2009
|
-
IOException_init_$Init$_1 as IOException_init_$Init$
|
|
2010
|
-
IOException_init_$Create$_1 as IOException_init_$Create$
|
|
2009
|
+
EOFException_init_$Create$_0 as EOFException_init_$Create$28fkhq0q0kobq,
|
|
2010
|
+
IOException_init_$Init$_0 as IOException_init_$Init$214bkj3jbj847,
|
|
2011
|
+
IOException_init_$Create$_0 as IOException_init_$Create$30ael4xxp8cz,
|
|
2012
|
+
IOException_init_$Init$_1 as IOException_init_$Init$1v5tzhogkz08y,
|
|
2013
|
+
IOException_init_$Create$_1 as IOException_init_$Create$1n9wqi59tj1t7,
|
|
2011
2014
|
Buffer as Buffergs925ekssbch,
|
|
2012
2015
|
IOException as IOException1wyutdmfe71nu,
|
|
2013
2016
|
Source as Source1shr0ps16u4p4,
|
|
@@ -2015,10 +2018,11 @@ export {
|
|
|
2015
2018
|
readByteArray_0 as readByteArray1fhzfwi2j014k,
|
|
2016
2019
|
readByteArray as readByteArray1ri21h2rciakw,
|
|
2017
2020
|
readByteString as readByteString2hnsbql6t4ads,
|
|
2018
|
-
|
|
2021
|
+
readString_1 as readString2nvggcfaijfhd,
|
|
2019
2022
|
readString as readString3v6duspiz33tv,
|
|
2023
|
+
readString_0 as readStringo8i62qxt5m4m,
|
|
2020
2024
|
writeString as writeString33ca4btrgctw7,
|
|
2021
2025
|
};
|
|
2022
2026
|
//endregion
|
|
2023
2027
|
|
|
2024
|
-
|
|
2028
|
+
//# sourceMappingURL=kotlinx-io-kotlinx-io-core.mjs.map
|