@flock/wirespec 0.11.6 → 0.11.8
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/arrow-arrow-atomic.js +13 -13
- package/arrow-arrow-continuations.js +1 -1
- package/arrow-arrow-core.js +87 -88
- package/arrow-arrow-core.js.map +1 -1
- package/clikt-clikt.js +1258 -1258
- package/colormath-root-colormath.js +436 -436
- package/kotlin-kotlin-stdlib.js +826 -755
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kotlin-openapi-bindings.js +4694 -4694
- package/kotlin-rgxgen.js +1853 -1853
- package/kotlinx-io-kotlinx-io-bytestring.js +15 -0
- package/kotlinx-io-kotlinx-io-bytestring.js.map +1 -0
- package/kotlinx-io-kotlinx-io-core.js +2219 -0
- package/kotlinx-io-kotlinx-io-core.js.map +1 -0
- package/kotlinx-serialization-kotlinx-serialization-core.js +1799 -1800
- package/kotlinx-serialization-kotlinx-serialization-core.js.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-json.js +1407 -1407
- package/markdown.js +1904 -1904
- package/mordant-mordant.js +1638 -1638
- package/package.json +1 -1
- package/wirespec-src-compiler-core.js +1515 -1515
- package/wirespec-src-compiler-core.js.map +1 -1
- package/wirespec-src-compiler-lib.js +319 -319
- package/wirespec-src-compiler-lib.js.map +1 -1
- package/wirespec-src-converter-avro.js +382 -382
- package/wirespec-src-converter-avro.js.map +1 -1
- package/wirespec-src-converter-openapi.js +607 -588
- package/wirespec-src-converter-openapi.js.map +1 -1
- package/wirespec-src-plugin-arguments.js +104 -104
- package/wirespec-src-plugin-arguments.js.map +1 -1
- package/wirespec-src-plugin-cli.js +313 -317
- package/wirespec-src-plugin-cli.js.map +1 -1
- package/wirespec-src-plugin-npm.js +34 -34
- package/wirespec-src-tools-generator.js +35 -35
- package/wirespec-src-tools-generator.js.map +1 -1
|
@@ -0,0 +1,2219 @@
|
|
|
1
|
+
(function (factory) {
|
|
2
|
+
if (typeof define === 'function' && define.amd)
|
|
3
|
+
define(['exports', './kotlin-kotlin-stdlib.js'], factory);
|
|
4
|
+
else if (typeof exports === 'object')
|
|
5
|
+
factory(module.exports, require('./kotlin-kotlin-stdlib.js'));
|
|
6
|
+
else {
|
|
7
|
+
if (typeof globalThis['kotlin-kotlin-stdlib'] === 'undefined') {
|
|
8
|
+
throw new Error("Error loading module 'kotlinx-io-kotlinx-io-core'. Its dependency 'kotlin-kotlin-stdlib' was not found. Please, check whether 'kotlin-kotlin-stdlib' is loaded prior to 'kotlinx-io-kotlinx-io-core'.");
|
|
9
|
+
}
|
|
10
|
+
globalThis['kotlinx-io-kotlinx-io-core'] = factory(typeof globalThis['kotlinx-io-kotlinx-io-core'] === 'undefined' ? {} : globalThis['kotlinx-io-kotlinx-io-core'], globalThis['kotlin-kotlin-stdlib']);
|
|
11
|
+
}
|
|
12
|
+
}(function (_, kotlin_kotlin) {
|
|
13
|
+
'use strict';
|
|
14
|
+
//region block: imports
|
|
15
|
+
var imul = Math.imul;
|
|
16
|
+
var IndexOutOfBoundsException_init_$Create$ = kotlin_kotlin.$_$.r1;
|
|
17
|
+
var Long = kotlin_kotlin.$_$.if;
|
|
18
|
+
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.l1;
|
|
19
|
+
var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.a2;
|
|
20
|
+
var charArrayOf = kotlin_kotlin.$_$.p9;
|
|
21
|
+
var protoOf = kotlin_kotlin.$_$.cb;
|
|
22
|
+
var toString = kotlin_kotlin.$_$.gb;
|
|
23
|
+
var Unit_instance = kotlin_kotlin.$_$.l4;
|
|
24
|
+
var ensureNotNull = kotlin_kotlin.$_$.eg;
|
|
25
|
+
var toLong = kotlin_kotlin.$_$.eb;
|
|
26
|
+
var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.b1;
|
|
27
|
+
var initMetadataForClass = kotlin_kotlin.$_$.da;
|
|
28
|
+
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.p1;
|
|
29
|
+
var objectCreate = kotlin_kotlin.$_$.bb;
|
|
30
|
+
var initMetadataForCompanion = kotlin_kotlin.$_$.ea;
|
|
31
|
+
var arrayCopy = kotlin_kotlin.$_$.d5;
|
|
32
|
+
var IllegalArgumentException_init_$Create$_0 = kotlin_kotlin.$_$.j1;
|
|
33
|
+
var initMetadataForObject = kotlin_kotlin.$_$.ia;
|
|
34
|
+
var VOID = kotlin_kotlin.$_$.g;
|
|
35
|
+
var charSequenceGet = kotlin_kotlin.$_$.r9;
|
|
36
|
+
var Char__toInt_impl_vasixd = kotlin_kotlin.$_$.d2;
|
|
37
|
+
var toByte = kotlin_kotlin.$_$.db;
|
|
38
|
+
var initMetadataForInterface = kotlin_kotlin.$_$.ga;
|
|
39
|
+
var StringBuilder_init_$Create$_0 = kotlin_kotlin.$_$.c1;
|
|
40
|
+
var charSequenceLength = kotlin_kotlin.$_$.s9;
|
|
41
|
+
var endsWith = kotlin_kotlin.$_$.rc;
|
|
42
|
+
var startsWith = kotlin_kotlin.$_$.ud;
|
|
43
|
+
var charArray = kotlin_kotlin.$_$.q9;
|
|
44
|
+
var numberToChar = kotlin_kotlin.$_$.xa;
|
|
45
|
+
var concatToString = kotlin_kotlin.$_$.mc;
|
|
46
|
+
var Exception_init_$Init$ = kotlin_kotlin.$_$.f1;
|
|
47
|
+
var captureStack = kotlin_kotlin.$_$.o9;
|
|
48
|
+
var Exception_init_$Init$_0 = kotlin_kotlin.$_$.g1;
|
|
49
|
+
var Exception_init_$Init$_1 = kotlin_kotlin.$_$.h1;
|
|
50
|
+
var Exception = kotlin_kotlin.$_$.ff;
|
|
51
|
+
var UnsupportedOperationException_init_$Create$ = kotlin_kotlin.$_$.y1;
|
|
52
|
+
var KProperty0 = kotlin_kotlin.$_$.xb;
|
|
53
|
+
var getPropertyCallableRef = kotlin_kotlin.$_$.aa;
|
|
54
|
+
var lazy = kotlin_kotlin.$_$.jg;
|
|
55
|
+
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.l;
|
|
56
|
+
var asReversed = kotlin_kotlin.$_$.f5;
|
|
57
|
+
var contains = kotlin_kotlin.$_$.oc;
|
|
58
|
+
var getStringHashCode = kotlin_kotlin.$_$.ba;
|
|
59
|
+
var Char = kotlin_kotlin.$_$.ye;
|
|
60
|
+
//endregion
|
|
61
|
+
//region block: pre-declaration
|
|
62
|
+
initMetadataForClass(Buffer, 'Buffer', Buffer);
|
|
63
|
+
initMetadataForClass(RealSink, 'RealSink');
|
|
64
|
+
initMetadataForClass(RealSource, 'RealSource');
|
|
65
|
+
initMetadataForCompanion(Companion);
|
|
66
|
+
initMetadataForClass(Segment, 'Segment');
|
|
67
|
+
initMetadataForClass(SegmentCopyTracker, 'SegmentCopyTracker');
|
|
68
|
+
initMetadataForObject(AlwaysSharedCopyTracker, 'AlwaysSharedCopyTracker', VOID, SegmentCopyTracker);
|
|
69
|
+
function sink$default(path, append, $super) {
|
|
70
|
+
append = append === VOID ? false : append;
|
|
71
|
+
return $super === VOID ? this.d47(path, append) : $super.d47.call(this, path, append);
|
|
72
|
+
}
|
|
73
|
+
initMetadataForInterface(FileSystem, 'FileSystem');
|
|
74
|
+
initMetadataForClass(SystemFileSystemImpl, 'SystemFileSystemImpl', VOID, VOID, [FileSystem]);
|
|
75
|
+
initMetadataForClass(FileMetadata, 'FileMetadata', FileMetadata);
|
|
76
|
+
initMetadataForObject(UnsafeBufferOperations, 'UnsafeBufferOperations');
|
|
77
|
+
initMetadataForClass(SegmentReadContextImpl$1);
|
|
78
|
+
initMetadataForClass(SegmentWriteContextImpl$1);
|
|
79
|
+
initMetadataForClass(BufferIterationContextImpl$1);
|
|
80
|
+
initMetadataForClass(IOException, 'IOException', IOException_init_$Create$, Exception);
|
|
81
|
+
initMetadataForClass(EOFException, 'EOFException', EOFException_init_$Create$, IOException);
|
|
82
|
+
initMetadataForObject(SegmentPool, 'SegmentPool');
|
|
83
|
+
initMetadataForClass(FileNotFoundException, 'FileNotFoundException', VOID, IOException);
|
|
84
|
+
initMetadataForClass(SystemFileSystem$1, VOID, VOID, SystemFileSystemImpl);
|
|
85
|
+
initMetadataForClass(Path_1, 'Path');
|
|
86
|
+
initMetadataForClass(FileSource, 'FileSource');
|
|
87
|
+
initMetadataForClass(FileSink, 'FileSink');
|
|
88
|
+
//endregion
|
|
89
|
+
function get_HEX_DIGIT_CHARS() {
|
|
90
|
+
_init_properties__Util_kt__g8tcl9();
|
|
91
|
+
return HEX_DIGIT_CHARS;
|
|
92
|
+
}
|
|
93
|
+
var HEX_DIGIT_CHARS;
|
|
94
|
+
function checkBounds(size, startIndex, endIndex) {
|
|
95
|
+
_init_properties__Util_kt__g8tcl9();
|
|
96
|
+
if (startIndex.j1(new Long(0, 0)) < 0 || endIndex.j1(size) > 0) {
|
|
97
|
+
throw IndexOutOfBoundsException_init_$Create$('startIndex (' + startIndex.toString() + ') and endIndex (' + endIndex.toString() + ') are not within the range [0..size(' + size.toString() + '))');
|
|
98
|
+
}
|
|
99
|
+
if (startIndex.j1(endIndex) > 0) {
|
|
100
|
+
throw IllegalArgumentException_init_$Create$('startIndex (' + startIndex.toString() + ') > endIndex (' + endIndex.toString() + ')');
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
function checkOffsetAndCount(size, offset, byteCount) {
|
|
104
|
+
_init_properties__Util_kt__g8tcl9();
|
|
105
|
+
if (offset.j1(new Long(0, 0)) < 0 || offset.j1(size) > 0 || size.z2(offset).j1(byteCount) < 0 || byteCount.j1(new Long(0, 0)) < 0) {
|
|
106
|
+
throw IllegalArgumentException_init_$Create$('offset (' + offset.toString() + ') and byteCount (' + byteCount.toString() + ') are not within the range [0..size(' + size.toString() + '))');
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
var properties_initialized__Util_kt_67kc5b;
|
|
110
|
+
function _init_properties__Util_kt__g8tcl9() {
|
|
111
|
+
if (!properties_initialized__Util_kt_67kc5b) {
|
|
112
|
+
properties_initialized__Util_kt_67kc5b = true;
|
|
113
|
+
// Inline function 'kotlin.charArrayOf' call
|
|
114
|
+
HEX_DIGIT_CHARS = charArrayOf([_Char___init__impl__6a9atx(48), _Char___init__impl__6a9atx(49), _Char___init__impl__6a9atx(50), _Char___init__impl__6a9atx(51), _Char___init__impl__6a9atx(52), _Char___init__impl__6a9atx(53), _Char___init__impl__6a9atx(54), _Char___init__impl__6a9atx(55), _Char___init__impl__6a9atx(56), _Char___init__impl__6a9atx(57), _Char___init__impl__6a9atx(97), _Char___init__impl__6a9atx(98), _Char___init__impl__6a9atx(99), _Char___init__impl__6a9atx(100), _Char___init__impl__6a9atx(101), _Char___init__impl__6a9atx(102)]);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
function Buffer() {
|
|
118
|
+
this.r44_1 = null;
|
|
119
|
+
this.s44_1 = null;
|
|
120
|
+
this.t44_1 = new Long(0, 0);
|
|
121
|
+
}
|
|
122
|
+
protoOf(Buffer).j = function () {
|
|
123
|
+
return this.t44_1;
|
|
124
|
+
};
|
|
125
|
+
protoOf(Buffer).u44 = function () {
|
|
126
|
+
return this;
|
|
127
|
+
};
|
|
128
|
+
protoOf(Buffer).v44 = function () {
|
|
129
|
+
return this.j().equals(new Long(0, 0));
|
|
130
|
+
};
|
|
131
|
+
protoOf(Buffer).w44 = function (byteCount) {
|
|
132
|
+
// Inline function 'kotlin.require' call
|
|
133
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
134
|
+
if (!(byteCount.j1(new Long(0, 0)) >= 0)) {
|
|
135
|
+
// Inline function 'kotlinx.io.Buffer.require.<anonymous>' call
|
|
136
|
+
var message = 'byteCount: ' + byteCount.toString();
|
|
137
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
138
|
+
}
|
|
139
|
+
if (this.j().j1(byteCount) < 0) {
|
|
140
|
+
throw EOFException_init_$Create$_0("Buffer doesn't contain required number of bytes (size: " + this.j().toString() + ', required: ' + byteCount.toString() + ')');
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
protoOf(Buffer).x44 = function (byteCount) {
|
|
144
|
+
// Inline function 'kotlin.require' call
|
|
145
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
146
|
+
if (!(byteCount.j1(new Long(0, 0)) >= 0)) {
|
|
147
|
+
// Inline function 'kotlinx.io.Buffer.request.<anonymous>' call
|
|
148
|
+
var message = 'byteCount: ' + byteCount.toString() + ' < 0';
|
|
149
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
150
|
+
}
|
|
151
|
+
return this.j().j1(byteCount) >= 0;
|
|
152
|
+
};
|
|
153
|
+
protoOf(Buffer).y44 = function () {
|
|
154
|
+
return Unit_instance;
|
|
155
|
+
};
|
|
156
|
+
protoOf(Buffer).o8 = function () {
|
|
157
|
+
return Unit_instance;
|
|
158
|
+
};
|
|
159
|
+
protoOf(Buffer).z44 = function () {
|
|
160
|
+
var result = this.j();
|
|
161
|
+
if (result.equals(new Long(0, 0)))
|
|
162
|
+
return new Long(0, 0);
|
|
163
|
+
var tail = ensureNotNull(this.s44_1);
|
|
164
|
+
if (tail.c45_1 < 8192 && tail.e45_1) {
|
|
165
|
+
result = result.z2(toLong(tail.c45_1 - tail.b45_1 | 0));
|
|
166
|
+
}
|
|
167
|
+
return result;
|
|
168
|
+
};
|
|
169
|
+
protoOf(Buffer).h45 = function (byteCount) {
|
|
170
|
+
// Inline function 'kotlinx.io.checkByteCount' call
|
|
171
|
+
// Inline function 'kotlin.require' call
|
|
172
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
173
|
+
if (!(byteCount.j1(new Long(0, 0)) >= 0)) {
|
|
174
|
+
// Inline function 'kotlinx.io.checkByteCount.<anonymous>' call
|
|
175
|
+
var message = 'byteCount (' + byteCount.toString() + ') < 0';
|
|
176
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
177
|
+
}
|
|
178
|
+
var remainingByteCount = byteCount;
|
|
179
|
+
while (remainingByteCount.j1(new Long(0, 0)) > 0) {
|
|
180
|
+
var tmp0_elvis_lhs = this.r44_1;
|
|
181
|
+
var tmp;
|
|
182
|
+
if (tmp0_elvis_lhs == null) {
|
|
183
|
+
throw EOFException_init_$Create$_0('Buffer exhausted before skipping ' + byteCount.toString() + ' bytes.');
|
|
184
|
+
} else {
|
|
185
|
+
tmp = tmp0_elvis_lhs;
|
|
186
|
+
}
|
|
187
|
+
var head = tmp;
|
|
188
|
+
// Inline function 'kotlinx.io.minOf' call
|
|
189
|
+
var a = remainingByteCount;
|
|
190
|
+
var b = head.c45_1 - head.b45_1 | 0;
|
|
191
|
+
// Inline function 'kotlin.comparisons.minOf' call
|
|
192
|
+
var b_0 = toLong(b);
|
|
193
|
+
var toSkip = (a.j1(b_0) <= 0 ? a : b_0).l1();
|
|
194
|
+
this.t44_1 = this.t44_1.z2(toLong(toSkip));
|
|
195
|
+
remainingByteCount = remainingByteCount.z2(toLong(toSkip));
|
|
196
|
+
head.b45_1 = head.b45_1 + toSkip | 0;
|
|
197
|
+
if (head.b45_1 === head.c45_1) {
|
|
198
|
+
this.i45();
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
};
|
|
202
|
+
protoOf(Buffer).j45 = function (sink, startIndex, endIndex) {
|
|
203
|
+
// Inline function 'kotlinx.io.checkBounds' call
|
|
204
|
+
var size = sink.length;
|
|
205
|
+
checkBounds(toLong(size), toLong(startIndex), toLong(endIndex));
|
|
206
|
+
var tmp0_elvis_lhs = this.r44_1;
|
|
207
|
+
var tmp;
|
|
208
|
+
if (tmp0_elvis_lhs == null) {
|
|
209
|
+
return -1;
|
|
210
|
+
} else {
|
|
211
|
+
tmp = tmp0_elvis_lhs;
|
|
212
|
+
}
|
|
213
|
+
var s = tmp;
|
|
214
|
+
// Inline function 'kotlin.comparisons.minOf' call
|
|
215
|
+
var a = endIndex - startIndex | 0;
|
|
216
|
+
var b = s.j();
|
|
217
|
+
var toCopy = Math.min(a, b);
|
|
218
|
+
s.k45(sink, startIndex, startIndex + toCopy | 0);
|
|
219
|
+
this.t44_1 = this.t44_1.z2(toLong(toCopy));
|
|
220
|
+
if (isEmpty(s)) {
|
|
221
|
+
this.i45();
|
|
222
|
+
}
|
|
223
|
+
return toCopy;
|
|
224
|
+
};
|
|
225
|
+
protoOf(Buffer).l45 = function (sink, byteCount) {
|
|
226
|
+
// Inline function 'kotlinx.io.checkByteCount' call
|
|
227
|
+
// Inline function 'kotlin.require' call
|
|
228
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
229
|
+
if (!(byteCount.j1(new Long(0, 0)) >= 0)) {
|
|
230
|
+
// Inline function 'kotlinx.io.checkByteCount.<anonymous>' call
|
|
231
|
+
var message = 'byteCount (' + byteCount.toString() + ') < 0';
|
|
232
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
233
|
+
}
|
|
234
|
+
if (this.j().equals(new Long(0, 0)))
|
|
235
|
+
return new Long(-1, -1);
|
|
236
|
+
var bytesWritten = byteCount.j1(this.j()) > 0 ? this.j() : byteCount;
|
|
237
|
+
sink.m45(this, bytesWritten);
|
|
238
|
+
return bytesWritten;
|
|
239
|
+
};
|
|
240
|
+
protoOf(Buffer).n45 = function (minimumCapacity) {
|
|
241
|
+
// Inline function 'kotlin.require' call
|
|
242
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
243
|
+
if (!(minimumCapacity >= 1 && minimumCapacity <= 8192)) {
|
|
244
|
+
// Inline function 'kotlinx.io.Buffer.writableSegment.<anonymous>' call
|
|
245
|
+
var message = 'unexpected capacity (' + minimumCapacity + '), should be in range [1, 8192]';
|
|
246
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
247
|
+
}
|
|
248
|
+
if (this.s44_1 == null) {
|
|
249
|
+
var result = SegmentPool_instance.q45();
|
|
250
|
+
this.r44_1 = result;
|
|
251
|
+
this.s44_1 = result;
|
|
252
|
+
return result;
|
|
253
|
+
}
|
|
254
|
+
var t = ensureNotNull(this.s44_1);
|
|
255
|
+
if ((t.c45_1 + minimumCapacity | 0) > 8192 || !t.e45_1) {
|
|
256
|
+
var newTail = t.r45(SegmentPool_instance.q45());
|
|
257
|
+
this.s44_1 = newTail;
|
|
258
|
+
return newTail;
|
|
259
|
+
}
|
|
260
|
+
return t;
|
|
261
|
+
};
|
|
262
|
+
protoOf(Buffer).m45 = function (source, byteCount) {
|
|
263
|
+
// Inline function 'kotlin.require' call
|
|
264
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
265
|
+
if (!!(source === this)) {
|
|
266
|
+
// Inline function 'kotlinx.io.Buffer.write.<anonymous>' call
|
|
267
|
+
var message = 'source == this';
|
|
268
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
269
|
+
}
|
|
270
|
+
checkOffsetAndCount(source.t44_1, new Long(0, 0), byteCount);
|
|
271
|
+
var remainingByteCount = byteCount;
|
|
272
|
+
while (remainingByteCount.j1(new Long(0, 0)) > 0) {
|
|
273
|
+
if (remainingByteCount.j1(toLong(ensureNotNull(source.r44_1).j())) < 0) {
|
|
274
|
+
var tail = this.s44_1;
|
|
275
|
+
var tmp;
|
|
276
|
+
if (!(tail == null) && tail.e45_1) {
|
|
277
|
+
// Inline function 'kotlin.Long.minus' call
|
|
278
|
+
// Inline function 'kotlin.Long.plus' call
|
|
279
|
+
var this_0 = remainingByteCount;
|
|
280
|
+
var other = tail.c45_1;
|
|
281
|
+
var this_1 = this_0.y2(toLong(other));
|
|
282
|
+
var other_0 = tail.s45() ? 0 : tail.b45_1;
|
|
283
|
+
tmp = this_1.z2(toLong(other_0)).j1(new Long(8192, 0)) <= 0;
|
|
284
|
+
} else {
|
|
285
|
+
tmp = false;
|
|
286
|
+
}
|
|
287
|
+
if (tmp) {
|
|
288
|
+
ensureNotNull(source.r44_1).u45(tail, remainingByteCount.l1());
|
|
289
|
+
source.t44_1 = source.t44_1.z2(remainingByteCount);
|
|
290
|
+
this.t44_1 = this.t44_1.y2(remainingByteCount);
|
|
291
|
+
return Unit_instance;
|
|
292
|
+
} else {
|
|
293
|
+
source.r44_1 = ensureNotNull(source.r44_1).t45(remainingByteCount.l1());
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
var segmentToMove = ensureNotNull(source.r44_1);
|
|
297
|
+
var movedByteCount = toLong(segmentToMove.j());
|
|
298
|
+
source.r44_1 = segmentToMove.v45();
|
|
299
|
+
if (source.r44_1 == null) {
|
|
300
|
+
source.s44_1 = null;
|
|
301
|
+
}
|
|
302
|
+
// Inline function 'kotlinx.io.Buffer.pushSegment' call
|
|
303
|
+
if (this.r44_1 == null) {
|
|
304
|
+
this.r44_1 = segmentToMove;
|
|
305
|
+
this.s44_1 = segmentToMove;
|
|
306
|
+
} else if (true) {
|
|
307
|
+
this.s44_1 = ensureNotNull(this.s44_1).r45(segmentToMove).w45();
|
|
308
|
+
if (ensureNotNull(this.s44_1).g45_1 == null) {
|
|
309
|
+
this.r44_1 = this.s44_1;
|
|
310
|
+
}
|
|
311
|
+
} else {
|
|
312
|
+
this.s44_1 = ensureNotNull(this.s44_1).r45(segmentToMove);
|
|
313
|
+
}
|
|
314
|
+
source.t44_1 = source.t44_1.z2(movedByteCount);
|
|
315
|
+
this.t44_1 = this.t44_1.y2(movedByteCount);
|
|
316
|
+
remainingByteCount = remainingByteCount.z2(movedByteCount);
|
|
317
|
+
}
|
|
318
|
+
};
|
|
319
|
+
protoOf(Buffer).x45 = function (byte) {
|
|
320
|
+
this.n45(1).y45(byte);
|
|
321
|
+
this.t44_1 = this.t44_1.y2(new Long(1, 0));
|
|
322
|
+
};
|
|
323
|
+
protoOf(Buffer).toString = function () {
|
|
324
|
+
if (this.j().equals(new Long(0, 0)))
|
|
325
|
+
return 'Buffer(size=0)';
|
|
326
|
+
var maxPrintableBytes = 64;
|
|
327
|
+
// Inline function 'kotlinx.io.minOf' call
|
|
328
|
+
var b = this.j();
|
|
329
|
+
// Inline function 'kotlin.comparisons.minOf' call
|
|
330
|
+
var a = toLong(maxPrintableBytes);
|
|
331
|
+
var len = (a.j1(b) <= 0 ? a : b).l1();
|
|
332
|
+
var builder = StringBuilder_init_$Create$(imul(len, 2) + (this.j().j1(toLong(maxPrintableBytes)) > 0 ? 1 : 0) | 0);
|
|
333
|
+
var bytesWritten = 0;
|
|
334
|
+
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.forEachSegment' call
|
|
335
|
+
var curr = this.r44_1;
|
|
336
|
+
while (!(curr == null)) {
|
|
337
|
+
// Inline function 'kotlinx.io.Buffer.toString.<anonymous>' call
|
|
338
|
+
var ctx = get_SegmentReadContextImpl();
|
|
339
|
+
var segment = curr;
|
|
340
|
+
var idx = 0;
|
|
341
|
+
while (bytesWritten < len && idx < segment.j()) {
|
|
342
|
+
var _unary__edvuaz = idx;
|
|
343
|
+
idx = _unary__edvuaz + 1 | 0;
|
|
344
|
+
var b_0 = ctx.z45(segment, _unary__edvuaz);
|
|
345
|
+
bytesWritten = bytesWritten + 1 | 0;
|
|
346
|
+
var tmp = get_HEX_DIGIT_CHARS();
|
|
347
|
+
// Inline function 'kotlinx.io.shr' call
|
|
348
|
+
var tmp$ret$2 = b_0 >> 4;
|
|
349
|
+
var tmp_0 = builder.x7(tmp[tmp$ret$2 & 15]);
|
|
350
|
+
var tmp_1 = get_HEX_DIGIT_CHARS();
|
|
351
|
+
// Inline function 'kotlinx.io.and' call
|
|
352
|
+
var tmp$ret$3 = b_0 & 15;
|
|
353
|
+
tmp_0.x7(tmp_1[tmp$ret$3]);
|
|
354
|
+
}
|
|
355
|
+
curr = curr.f45_1;
|
|
356
|
+
}
|
|
357
|
+
if (this.j().j1(toLong(maxPrintableBytes)) > 0) {
|
|
358
|
+
builder.x7(_Char___init__impl__6a9atx(8230));
|
|
359
|
+
}
|
|
360
|
+
return 'Buffer(size=' + this.j().toString() + ' hex=' + builder.toString() + ')';
|
|
361
|
+
};
|
|
362
|
+
protoOf(Buffer).i45 = function () {
|
|
363
|
+
var oldHead = ensureNotNull(this.r44_1);
|
|
364
|
+
var nextHead = oldHead.f45_1;
|
|
365
|
+
this.r44_1 = nextHead;
|
|
366
|
+
if (nextHead == null) {
|
|
367
|
+
this.s44_1 = null;
|
|
368
|
+
} else {
|
|
369
|
+
nextHead.g45_1 = null;
|
|
370
|
+
}
|
|
371
|
+
oldHead.f45_1 = null;
|
|
372
|
+
SegmentPool_instance.a46(oldHead);
|
|
373
|
+
};
|
|
374
|
+
protoOf(Buffer).b46 = function () {
|
|
375
|
+
var oldTail = ensureNotNull(this.s44_1);
|
|
376
|
+
var newTail = oldTail.g45_1;
|
|
377
|
+
this.s44_1 = newTail;
|
|
378
|
+
if (newTail == null) {
|
|
379
|
+
this.r44_1 = null;
|
|
380
|
+
} else {
|
|
381
|
+
newTail.f45_1 = null;
|
|
382
|
+
}
|
|
383
|
+
oldTail.g45_1 = null;
|
|
384
|
+
SegmentPool_instance.a46(oldTail);
|
|
385
|
+
};
|
|
386
|
+
function buffered(_this__u8e3s4) {
|
|
387
|
+
return new RealSource(_this__u8e3s4);
|
|
388
|
+
}
|
|
389
|
+
function buffered_0(_this__u8e3s4) {
|
|
390
|
+
return new RealSink(_this__u8e3s4);
|
|
391
|
+
}
|
|
392
|
+
function RealSink(sink) {
|
|
393
|
+
this.c46_1 = sink;
|
|
394
|
+
this.d46_1 = false;
|
|
395
|
+
this.e46_1 = new Buffer();
|
|
396
|
+
}
|
|
397
|
+
protoOf(RealSink).u44 = function () {
|
|
398
|
+
return this.e46_1;
|
|
399
|
+
};
|
|
400
|
+
protoOf(RealSink).m45 = function (source, byteCount) {
|
|
401
|
+
// Inline function 'kotlinx.io.RealSink.checkNotClosed' call
|
|
402
|
+
// Inline function 'kotlin.check' call
|
|
403
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
404
|
+
if (!!this.d46_1) {
|
|
405
|
+
// Inline function 'kotlinx.io.RealSink.checkNotClosed.<anonymous>' call
|
|
406
|
+
var message = 'Sink is closed.';
|
|
407
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
408
|
+
}
|
|
409
|
+
// Inline function 'kotlin.require' call
|
|
410
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
411
|
+
if (!(byteCount.j1(new Long(0, 0)) >= 0)) {
|
|
412
|
+
// Inline function 'kotlinx.io.RealSink.write.<anonymous>' call
|
|
413
|
+
var message_0 = 'byteCount: ' + byteCount.toString();
|
|
414
|
+
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
415
|
+
}
|
|
416
|
+
this.e46_1.m45(source, byteCount);
|
|
417
|
+
this.y44();
|
|
418
|
+
};
|
|
419
|
+
protoOf(RealSink).y44 = function () {
|
|
420
|
+
// Inline function 'kotlinx.io.RealSink.checkNotClosed' call
|
|
421
|
+
// Inline function 'kotlin.check' call
|
|
422
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
423
|
+
if (!!this.d46_1) {
|
|
424
|
+
// Inline function 'kotlinx.io.RealSink.checkNotClosed.<anonymous>' call
|
|
425
|
+
var message = 'Sink is closed.';
|
|
426
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
427
|
+
}
|
|
428
|
+
var byteCount = this.e46_1.z44();
|
|
429
|
+
if (byteCount.j1(new Long(0, 0)) > 0) {
|
|
430
|
+
this.c46_1.m45(this.e46_1, byteCount);
|
|
431
|
+
}
|
|
432
|
+
};
|
|
433
|
+
protoOf(RealSink).o8 = function () {
|
|
434
|
+
// Inline function 'kotlinx.io.RealSink.checkNotClosed' call
|
|
435
|
+
// Inline function 'kotlin.check' call
|
|
436
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
437
|
+
if (!!this.d46_1) {
|
|
438
|
+
// Inline function 'kotlinx.io.RealSink.checkNotClosed.<anonymous>' call
|
|
439
|
+
var message = 'Sink is closed.';
|
|
440
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
441
|
+
}
|
|
442
|
+
if (this.e46_1.j().j1(new Long(0, 0)) > 0) {
|
|
443
|
+
this.c46_1.m45(this.e46_1, this.e46_1.j());
|
|
444
|
+
}
|
|
445
|
+
this.c46_1.o8();
|
|
446
|
+
};
|
|
447
|
+
protoOf(RealSink).toString = function () {
|
|
448
|
+
return 'buffered(' + toString(this.c46_1) + ')';
|
|
449
|
+
};
|
|
450
|
+
function RealSource(source) {
|
|
451
|
+
this.f46_1 = source;
|
|
452
|
+
this.g46_1 = false;
|
|
453
|
+
this.h46_1 = new Buffer();
|
|
454
|
+
}
|
|
455
|
+
protoOf(RealSource).u44 = function () {
|
|
456
|
+
return this.h46_1;
|
|
457
|
+
};
|
|
458
|
+
protoOf(RealSource).l45 = function (sink, byteCount) {
|
|
459
|
+
// Inline function 'kotlinx.io.RealSource.checkNotClosed' call
|
|
460
|
+
// Inline function 'kotlin.check' call
|
|
461
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
462
|
+
if (!!this.g46_1) {
|
|
463
|
+
// Inline function 'kotlinx.io.RealSource.checkNotClosed.<anonymous>' call
|
|
464
|
+
var message = 'Source is closed.';
|
|
465
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
466
|
+
}
|
|
467
|
+
// Inline function 'kotlin.require' call
|
|
468
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
469
|
+
if (!(byteCount.j1(new Long(0, 0)) >= 0)) {
|
|
470
|
+
// Inline function 'kotlinx.io.RealSource.readAtMostTo.<anonymous>' call
|
|
471
|
+
var message_0 = 'byteCount: ' + byteCount.toString();
|
|
472
|
+
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
473
|
+
}
|
|
474
|
+
if (this.h46_1.j().equals(new Long(0, 0))) {
|
|
475
|
+
var read = this.f46_1.l45(this.h46_1, new Long(8192, 0));
|
|
476
|
+
if (read.equals(new Long(-1, -1)))
|
|
477
|
+
return new Long(-1, -1);
|
|
478
|
+
}
|
|
479
|
+
// Inline function 'kotlin.comparisons.minOf' call
|
|
480
|
+
var b = this.h46_1.j();
|
|
481
|
+
var toRead = byteCount.j1(b) <= 0 ? byteCount : b;
|
|
482
|
+
return this.h46_1.l45(sink, toRead);
|
|
483
|
+
};
|
|
484
|
+
protoOf(RealSource).w44 = function (byteCount) {
|
|
485
|
+
if (!this.x44(byteCount))
|
|
486
|
+
throw EOFException_init_$Create$_0("Source doesn't contain required number of bytes (" + byteCount.toString() + ').');
|
|
487
|
+
};
|
|
488
|
+
protoOf(RealSource).x44 = function (byteCount) {
|
|
489
|
+
// Inline function 'kotlinx.io.RealSource.checkNotClosed' call
|
|
490
|
+
// Inline function 'kotlin.check' call
|
|
491
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
492
|
+
if (!!this.g46_1) {
|
|
493
|
+
// Inline function 'kotlinx.io.RealSource.checkNotClosed.<anonymous>' call
|
|
494
|
+
var message = 'Source is closed.';
|
|
495
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
496
|
+
}
|
|
497
|
+
// Inline function 'kotlin.require' call
|
|
498
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
499
|
+
if (!(byteCount.j1(new Long(0, 0)) >= 0)) {
|
|
500
|
+
// Inline function 'kotlinx.io.RealSource.request.<anonymous>' call
|
|
501
|
+
var message_0 = 'byteCount: ' + byteCount.toString();
|
|
502
|
+
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
503
|
+
}
|
|
504
|
+
while (this.h46_1.j().j1(byteCount) < 0) {
|
|
505
|
+
if (this.f46_1.l45(this.h46_1, new Long(8192, 0)).equals(new Long(-1, -1)))
|
|
506
|
+
return false;
|
|
507
|
+
}
|
|
508
|
+
return true;
|
|
509
|
+
};
|
|
510
|
+
protoOf(RealSource).j45 = function (sink, startIndex, endIndex) {
|
|
511
|
+
// Inline function 'kotlinx.io.checkBounds' call
|
|
512
|
+
var size = sink.length;
|
|
513
|
+
checkBounds(toLong(size), toLong(startIndex), toLong(endIndex));
|
|
514
|
+
if (this.h46_1.j().equals(new Long(0, 0))) {
|
|
515
|
+
var read = this.f46_1.l45(this.h46_1, new Long(8192, 0));
|
|
516
|
+
if (read.equals(new Long(-1, -1)))
|
|
517
|
+
return -1;
|
|
518
|
+
}
|
|
519
|
+
// Inline function 'kotlinx.io.minOf' call
|
|
520
|
+
var a = endIndex - startIndex | 0;
|
|
521
|
+
var b = this.h46_1.j();
|
|
522
|
+
// Inline function 'kotlin.comparisons.minOf' call
|
|
523
|
+
var a_0 = toLong(a);
|
|
524
|
+
var toRead = (a_0.j1(b) <= 0 ? a_0 : b).l1();
|
|
525
|
+
return this.h46_1.j45(sink, startIndex, startIndex + toRead | 0);
|
|
526
|
+
};
|
|
527
|
+
protoOf(RealSource).toString = function () {
|
|
528
|
+
return 'buffered(' + toString(this.f46_1) + ')';
|
|
529
|
+
};
|
|
530
|
+
function Segment_init_$Init$($this) {
|
|
531
|
+
Segment.call($this);
|
|
532
|
+
$this.a45_1 = new Int8Array(8192);
|
|
533
|
+
$this.e45_1 = true;
|
|
534
|
+
$this.d45_1 = null;
|
|
535
|
+
return $this;
|
|
536
|
+
}
|
|
537
|
+
function Segment_init_$Create$() {
|
|
538
|
+
return Segment_init_$Init$(objectCreate(protoOf(Segment)));
|
|
539
|
+
}
|
|
540
|
+
function Segment_init_$Init$_0(data, pos, limit, shareToken, owner, $this) {
|
|
541
|
+
Segment.call($this);
|
|
542
|
+
$this.a45_1 = data;
|
|
543
|
+
$this.b45_1 = pos;
|
|
544
|
+
$this.c45_1 = limit;
|
|
545
|
+
$this.d45_1 = shareToken;
|
|
546
|
+
$this.e45_1 = owner;
|
|
547
|
+
return $this;
|
|
548
|
+
}
|
|
549
|
+
function Segment_init_$Create$_0(data, pos, limit, shareToken, owner) {
|
|
550
|
+
return Segment_init_$Init$_0(data, pos, limit, shareToken, owner, objectCreate(protoOf(Segment)));
|
|
551
|
+
}
|
|
552
|
+
function Companion() {
|
|
553
|
+
this.i46_1 = 8192;
|
|
554
|
+
this.j46_1 = 1024;
|
|
555
|
+
}
|
|
556
|
+
protoOf(Companion).k46 = function () {
|
|
557
|
+
return Segment_init_$Create$();
|
|
558
|
+
};
|
|
559
|
+
var Companion_instance;
|
|
560
|
+
function Companion_getInstance() {
|
|
561
|
+
return Companion_instance;
|
|
562
|
+
}
|
|
563
|
+
protoOf(Segment).s45 = function () {
|
|
564
|
+
var tmp1_safe_receiver = this.d45_1;
|
|
565
|
+
var tmp0_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.l46();
|
|
566
|
+
return tmp0_elvis_lhs == null ? false : tmp0_elvis_lhs;
|
|
567
|
+
};
|
|
568
|
+
protoOf(Segment).m46 = function () {
|
|
569
|
+
var tmp0_elvis_lhs = this.d45_1;
|
|
570
|
+
var tmp;
|
|
571
|
+
if (tmp0_elvis_lhs == null) {
|
|
572
|
+
// Inline function 'kotlin.also' call
|
|
573
|
+
var this_0 = SegmentPool_instance.n46();
|
|
574
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
575
|
+
// Inline function 'kotlinx.io.Segment.sharedCopy.<anonymous>' call
|
|
576
|
+
this.d45_1 = this_0;
|
|
577
|
+
tmp = this_0;
|
|
578
|
+
} else {
|
|
579
|
+
tmp = tmp0_elvis_lhs;
|
|
580
|
+
}
|
|
581
|
+
var t = tmp;
|
|
582
|
+
var tmp_0 = this.b45_1;
|
|
583
|
+
var tmp_1 = this.c45_1;
|
|
584
|
+
// Inline function 'kotlin.also' call
|
|
585
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
586
|
+
// Inline function 'kotlinx.io.Segment.sharedCopy.<anonymous>' call
|
|
587
|
+
t.o46();
|
|
588
|
+
return Segment_init_$Create$_0(this.a45_1, tmp_0, tmp_1, t, false);
|
|
589
|
+
};
|
|
590
|
+
protoOf(Segment).v45 = function () {
|
|
591
|
+
var result = this.f45_1;
|
|
592
|
+
if (!(this.g45_1 == null)) {
|
|
593
|
+
ensureNotNull(this.g45_1).f45_1 = this.f45_1;
|
|
594
|
+
}
|
|
595
|
+
if (!(this.f45_1 == null)) {
|
|
596
|
+
ensureNotNull(this.f45_1).g45_1 = this.g45_1;
|
|
597
|
+
}
|
|
598
|
+
this.f45_1 = null;
|
|
599
|
+
this.g45_1 = null;
|
|
600
|
+
return result;
|
|
601
|
+
};
|
|
602
|
+
protoOf(Segment).r45 = function (segment) {
|
|
603
|
+
segment.g45_1 = this;
|
|
604
|
+
segment.f45_1 = this.f45_1;
|
|
605
|
+
if (!(this.f45_1 == null)) {
|
|
606
|
+
ensureNotNull(this.f45_1).g45_1 = segment;
|
|
607
|
+
}
|
|
608
|
+
this.f45_1 = segment;
|
|
609
|
+
return segment;
|
|
610
|
+
};
|
|
611
|
+
protoOf(Segment).t45 = function (byteCount) {
|
|
612
|
+
// Inline function 'kotlin.require' call
|
|
613
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
614
|
+
if (!(byteCount > 0 && byteCount <= (this.c45_1 - this.b45_1 | 0))) {
|
|
615
|
+
// Inline function 'kotlinx.io.Segment.split.<anonymous>' call
|
|
616
|
+
var message = 'byteCount out of range';
|
|
617
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
618
|
+
}
|
|
619
|
+
var prefix;
|
|
620
|
+
if (byteCount >= 1024) {
|
|
621
|
+
prefix = this.m46();
|
|
622
|
+
} else {
|
|
623
|
+
prefix = SegmentPool_instance.q45();
|
|
624
|
+
// Inline function 'kotlin.collections.copyInto' call
|
|
625
|
+
var this_0 = this.a45_1;
|
|
626
|
+
var destination = prefix.a45_1;
|
|
627
|
+
var startIndex = this.b45_1;
|
|
628
|
+
var endIndex = this.b45_1 + byteCount | 0;
|
|
629
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
630
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
631
|
+
var tmp = this_0;
|
|
632
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
633
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
634
|
+
arrayCopy(tmp, destination, 0, startIndex, endIndex);
|
|
635
|
+
}
|
|
636
|
+
prefix.c45_1 = prefix.b45_1 + byteCount | 0;
|
|
637
|
+
this.b45_1 = this.b45_1 + byteCount | 0;
|
|
638
|
+
if (!(this.g45_1 == null)) {
|
|
639
|
+
ensureNotNull(this.g45_1).r45(prefix);
|
|
640
|
+
} else {
|
|
641
|
+
prefix.f45_1 = this;
|
|
642
|
+
this.g45_1 = prefix;
|
|
643
|
+
}
|
|
644
|
+
return prefix;
|
|
645
|
+
};
|
|
646
|
+
protoOf(Segment).w45 = function () {
|
|
647
|
+
// Inline function 'kotlin.check' call
|
|
648
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
649
|
+
if (!!(this.g45_1 == null)) {
|
|
650
|
+
// Inline function 'kotlinx.io.Segment.compact.<anonymous>' call
|
|
651
|
+
var message = 'cannot compact';
|
|
652
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
653
|
+
}
|
|
654
|
+
if (!ensureNotNull(this.g45_1).e45_1)
|
|
655
|
+
return this;
|
|
656
|
+
var byteCount = this.c45_1 - this.b45_1 | 0;
|
|
657
|
+
var availableByteCount = (8192 - ensureNotNull(this.g45_1).c45_1 | 0) + (ensureNotNull(this.g45_1).s45() ? 0 : ensureNotNull(this.g45_1).b45_1) | 0;
|
|
658
|
+
if (byteCount > availableByteCount)
|
|
659
|
+
return this;
|
|
660
|
+
var predecessor = this.g45_1;
|
|
661
|
+
this.u45(ensureNotNull(predecessor), byteCount);
|
|
662
|
+
var successor = this.v45();
|
|
663
|
+
// Inline function 'kotlin.check' call
|
|
664
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
665
|
+
// Inline function 'kotlin.check' call
|
|
666
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
667
|
+
if (!(successor == null)) {
|
|
668
|
+
// Inline function 'kotlin.check.<anonymous>' call
|
|
669
|
+
var message_0 = 'Check failed.';
|
|
670
|
+
throw IllegalStateException_init_$Create$(toString(message_0));
|
|
671
|
+
}
|
|
672
|
+
SegmentPool_instance.a46(this);
|
|
673
|
+
return predecessor;
|
|
674
|
+
};
|
|
675
|
+
protoOf(Segment).y45 = function (byte) {
|
|
676
|
+
var _unary__edvuaz = this.c45_1;
|
|
677
|
+
this.c45_1 = _unary__edvuaz + 1 | 0;
|
|
678
|
+
this.a45_1[_unary__edvuaz] = byte;
|
|
679
|
+
};
|
|
680
|
+
protoOf(Segment).u45 = function (sink, byteCount) {
|
|
681
|
+
// Inline function 'kotlin.check' call
|
|
682
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
683
|
+
if (!sink.e45_1) {
|
|
684
|
+
// Inline function 'kotlinx.io.Segment.writeTo.<anonymous>' call
|
|
685
|
+
var message = 'only owner can write';
|
|
686
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
687
|
+
}
|
|
688
|
+
if ((sink.c45_1 + byteCount | 0) > 8192) {
|
|
689
|
+
if (sink.s45())
|
|
690
|
+
throw IllegalArgumentException_init_$Create$_0();
|
|
691
|
+
if (((sink.c45_1 + byteCount | 0) - sink.b45_1 | 0) > 8192)
|
|
692
|
+
throw IllegalArgumentException_init_$Create$_0();
|
|
693
|
+
// Inline function 'kotlin.collections.copyInto' call
|
|
694
|
+
var this_0 = sink.a45_1;
|
|
695
|
+
var destination = sink.a45_1;
|
|
696
|
+
var startIndex = sink.b45_1;
|
|
697
|
+
var endIndex = sink.c45_1;
|
|
698
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
699
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
700
|
+
var tmp = this_0;
|
|
701
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
702
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
703
|
+
arrayCopy(tmp, destination, 0, startIndex, endIndex);
|
|
704
|
+
sink.c45_1 = sink.c45_1 - sink.b45_1 | 0;
|
|
705
|
+
sink.b45_1 = 0;
|
|
706
|
+
}
|
|
707
|
+
// Inline function 'kotlin.collections.copyInto' call
|
|
708
|
+
var this_1 = this.a45_1;
|
|
709
|
+
var destination_0 = sink.a45_1;
|
|
710
|
+
var destinationOffset = sink.c45_1;
|
|
711
|
+
var startIndex_0 = this.b45_1;
|
|
712
|
+
var endIndex_0 = this.b45_1 + byteCount | 0;
|
|
713
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
714
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
715
|
+
var tmp_0 = this_1;
|
|
716
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
717
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
718
|
+
arrayCopy(tmp_0, destination_0, destinationOffset, startIndex_0, endIndex_0);
|
|
719
|
+
sink.c45_1 = sink.c45_1 + byteCount | 0;
|
|
720
|
+
this.b45_1 = this.b45_1 + byteCount | 0;
|
|
721
|
+
};
|
|
722
|
+
protoOf(Segment).k45 = function (dst, dstStartOffset, dstEndOffset) {
|
|
723
|
+
var len = dstEndOffset - dstStartOffset | 0;
|
|
724
|
+
// Inline function 'kotlin.collections.copyInto' call
|
|
725
|
+
var this_0 = this.a45_1;
|
|
726
|
+
var startIndex = this.b45_1;
|
|
727
|
+
var endIndex = this.b45_1 + len | 0;
|
|
728
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
729
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
730
|
+
var tmp = this_0;
|
|
731
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
732
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
733
|
+
arrayCopy(tmp, dst, dstStartOffset, startIndex, endIndex);
|
|
734
|
+
this.b45_1 = this.b45_1 + len | 0;
|
|
735
|
+
};
|
|
736
|
+
protoOf(Segment).j = function () {
|
|
737
|
+
return this.c45_1 - this.b45_1 | 0;
|
|
738
|
+
};
|
|
739
|
+
protoOf(Segment).p46 = function () {
|
|
740
|
+
return this.a45_1.length - this.c45_1 | 0;
|
|
741
|
+
};
|
|
742
|
+
protoOf(Segment).q46 = function (readOnly) {
|
|
743
|
+
return this.a45_1;
|
|
744
|
+
};
|
|
745
|
+
protoOf(Segment).r46 = function (index) {
|
|
746
|
+
return this.a45_1[this.b45_1 + index | 0];
|
|
747
|
+
};
|
|
748
|
+
protoOf(Segment).s46 = function (index, value) {
|
|
749
|
+
this.a45_1[this.c45_1 + index | 0] = value;
|
|
750
|
+
};
|
|
751
|
+
protoOf(Segment).t46 = function (index, b0, b1) {
|
|
752
|
+
var d = this.a45_1;
|
|
753
|
+
var l = this.c45_1;
|
|
754
|
+
d[l + index | 0] = b0;
|
|
755
|
+
d[(l + index | 0) + 1 | 0] = b1;
|
|
756
|
+
};
|
|
757
|
+
protoOf(Segment).u46 = function (index, b0, b1, b2) {
|
|
758
|
+
var d = this.a45_1;
|
|
759
|
+
var l = this.c45_1;
|
|
760
|
+
d[l + index | 0] = b0;
|
|
761
|
+
d[(l + index | 0) + 1 | 0] = b1;
|
|
762
|
+
d[(l + index | 0) + 2 | 0] = b2;
|
|
763
|
+
};
|
|
764
|
+
protoOf(Segment).v46 = function (index, b0, b1, b2, b3) {
|
|
765
|
+
var d = this.a45_1;
|
|
766
|
+
var l = this.c45_1;
|
|
767
|
+
d[l + index | 0] = b0;
|
|
768
|
+
d[(l + index | 0) + 1 | 0] = b1;
|
|
769
|
+
d[(l + index | 0) + 2 | 0] = b2;
|
|
770
|
+
d[(l + index | 0) + 3 | 0] = b3;
|
|
771
|
+
};
|
|
772
|
+
function Segment() {
|
|
773
|
+
this.b45_1 = 0;
|
|
774
|
+
this.c45_1 = 0;
|
|
775
|
+
this.d45_1 = null;
|
|
776
|
+
this.e45_1 = false;
|
|
777
|
+
this.f45_1 = null;
|
|
778
|
+
this.g45_1 = null;
|
|
779
|
+
}
|
|
780
|
+
function SegmentCopyTracker() {
|
|
781
|
+
}
|
|
782
|
+
function isEmpty(_this__u8e3s4) {
|
|
783
|
+
return _this__u8e3s4.j() === 0;
|
|
784
|
+
}
|
|
785
|
+
function AlwaysSharedCopyTracker() {
|
|
786
|
+
AlwaysSharedCopyTracker_instance = this;
|
|
787
|
+
SegmentCopyTracker.call(this);
|
|
788
|
+
}
|
|
789
|
+
protoOf(AlwaysSharedCopyTracker).l46 = function () {
|
|
790
|
+
return true;
|
|
791
|
+
};
|
|
792
|
+
protoOf(AlwaysSharedCopyTracker).o46 = function () {
|
|
793
|
+
return Unit_instance;
|
|
794
|
+
};
|
|
795
|
+
var AlwaysSharedCopyTracker_instance;
|
|
796
|
+
function AlwaysSharedCopyTracker_getInstance() {
|
|
797
|
+
if (AlwaysSharedCopyTracker_instance == null)
|
|
798
|
+
new AlwaysSharedCopyTracker();
|
|
799
|
+
return AlwaysSharedCopyTracker_instance;
|
|
800
|
+
}
|
|
801
|
+
function readByteArray(_this__u8e3s4, byteCount) {
|
|
802
|
+
// Inline function 'kotlinx.io.checkByteCount' call
|
|
803
|
+
var byteCount_0 = toLong(byteCount);
|
|
804
|
+
// Inline function 'kotlin.require' call
|
|
805
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
806
|
+
if (!(byteCount_0.j1(new Long(0, 0)) >= 0)) {
|
|
807
|
+
// Inline function 'kotlinx.io.checkByteCount.<anonymous>' call
|
|
808
|
+
var message = 'byteCount (' + byteCount_0.toString() + ') < 0';
|
|
809
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
810
|
+
}
|
|
811
|
+
return readByteArrayImpl(_this__u8e3s4, byteCount);
|
|
812
|
+
}
|
|
813
|
+
function readByteArrayImpl(_this__u8e3s4, size) {
|
|
814
|
+
var arraySize = size;
|
|
815
|
+
if (size === -1) {
|
|
816
|
+
var fetchSize = new Long(2147483647, 0);
|
|
817
|
+
while (_this__u8e3s4.u44().j().j1(new Long(2147483647, 0)) < 0 && _this__u8e3s4.x44(fetchSize)) {
|
|
818
|
+
// Inline function 'kotlin.Long.times' call
|
|
819
|
+
fetchSize = fetchSize.a3(toLong(2));
|
|
820
|
+
}
|
|
821
|
+
// Inline function 'kotlin.check' call
|
|
822
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
823
|
+
if (!(_this__u8e3s4.u44().j().j1(new Long(2147483647, 0)) < 0)) {
|
|
824
|
+
// Inline function 'kotlinx.io.readByteArrayImpl.<anonymous>' call
|
|
825
|
+
var message = "Can't create an array of size " + _this__u8e3s4.u44().j().toString();
|
|
826
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
827
|
+
}
|
|
828
|
+
arraySize = _this__u8e3s4.u44().j().l1();
|
|
829
|
+
} else {
|
|
830
|
+
_this__u8e3s4.w44(toLong(size));
|
|
831
|
+
}
|
|
832
|
+
var array = new Int8Array(arraySize);
|
|
833
|
+
readTo(_this__u8e3s4.u44(), array);
|
|
834
|
+
return array;
|
|
835
|
+
}
|
|
836
|
+
function readTo(_this__u8e3s4, sink, startIndex, endIndex) {
|
|
837
|
+
startIndex = startIndex === VOID ? 0 : startIndex;
|
|
838
|
+
endIndex = endIndex === VOID ? sink.length : endIndex;
|
|
839
|
+
// Inline function 'kotlinx.io.checkBounds' call
|
|
840
|
+
var size = sink.length;
|
|
841
|
+
checkBounds(toLong(size), toLong(startIndex), toLong(endIndex));
|
|
842
|
+
var offset = startIndex;
|
|
843
|
+
while (offset < endIndex) {
|
|
844
|
+
var bytesRead = _this__u8e3s4.j45(sink, offset, endIndex);
|
|
845
|
+
if (bytesRead === -1) {
|
|
846
|
+
throw EOFException_init_$Create$_0('Source exhausted before reading ' + (endIndex - startIndex | 0) + ' bytes. ' + ('Only ' + bytesRead + ' bytes were read.'));
|
|
847
|
+
}
|
|
848
|
+
offset = offset + bytesRead | 0;
|
|
849
|
+
}
|
|
850
|
+
}
|
|
851
|
+
function readString(_this__u8e3s4) {
|
|
852
|
+
_this__u8e3s4.x44(new Long(-1, 2147483647));
|
|
853
|
+
return commonReadUtf8(_this__u8e3s4.u44(), _this__u8e3s4.u44().j());
|
|
854
|
+
}
|
|
855
|
+
function writeString(_this__u8e3s4, string, startIndex, endIndex) {
|
|
856
|
+
startIndex = startIndex === VOID ? 0 : startIndex;
|
|
857
|
+
endIndex = endIndex === VOID ? string.length : endIndex;
|
|
858
|
+
// Inline function 'kotlinx.io.checkBounds' call
|
|
859
|
+
var size = string.length;
|
|
860
|
+
checkBounds(toLong(size), toLong(startIndex), toLong(endIndex));
|
|
861
|
+
// Inline function 'kotlinx.io.writeToInternalBuffer' call
|
|
862
|
+
// Inline function 'kotlinx.io.writeString.<anonymous>' call
|
|
863
|
+
// Inline function 'kotlinx.io.commonWriteUtf8' call
|
|
864
|
+
var this_0 = _this__u8e3s4.u44();
|
|
865
|
+
var i = startIndex;
|
|
866
|
+
while (i < endIndex) {
|
|
867
|
+
// Inline function 'kotlin.code' call
|
|
868
|
+
var p0 = i;
|
|
869
|
+
var this_1 = charSequenceGet(string, p0);
|
|
870
|
+
var c = Char__toInt_impl_vasixd(this_1);
|
|
871
|
+
if (c < 128) {
|
|
872
|
+
$l$block_0: {
|
|
873
|
+
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
|
|
874
|
+
var tail = this_0.n45(1);
|
|
875
|
+
// Inline function 'kotlinx.io.commonWriteUtf8.<anonymous>' call
|
|
876
|
+
var ctx = get_SegmentWriteContextImpl();
|
|
877
|
+
var segmentOffset = -i | 0;
|
|
878
|
+
// Inline function 'kotlin.comparisons.minOf' call
|
|
879
|
+
var b = i + tail.p46() | 0;
|
|
880
|
+
var runLimit = Math.min(endIndex, b);
|
|
881
|
+
var _unary__edvuaz = i;
|
|
882
|
+
i = _unary__edvuaz + 1 | 0;
|
|
883
|
+
ctx.z46(tail, segmentOffset + _unary__edvuaz | 0, toByte(c));
|
|
884
|
+
$l$loop: while (i < runLimit) {
|
|
885
|
+
// Inline function 'kotlin.code' call
|
|
886
|
+
var p0_0 = i;
|
|
887
|
+
var this_2 = charSequenceGet(string, p0_0);
|
|
888
|
+
c = Char__toInt_impl_vasixd(this_2);
|
|
889
|
+
if (c >= 128)
|
|
890
|
+
break $l$loop;
|
|
891
|
+
var _unary__edvuaz_0 = i;
|
|
892
|
+
i = _unary__edvuaz_0 + 1 | 0;
|
|
893
|
+
ctx.z46(tail, segmentOffset + _unary__edvuaz_0 | 0, toByte(c));
|
|
894
|
+
}
|
|
895
|
+
var bytesWritten = i + segmentOffset | 0;
|
|
896
|
+
if (bytesWritten === 1) {
|
|
897
|
+
tail.c45_1 = tail.c45_1 + bytesWritten | 0;
|
|
898
|
+
var tmp = this_0;
|
|
899
|
+
// Inline function 'kotlin.Long.plus' call
|
|
900
|
+
tmp.t44_1 = this_0.t44_1.y2(toLong(bytesWritten));
|
|
901
|
+
break $l$block_0;
|
|
902
|
+
}
|
|
903
|
+
// Inline function 'kotlin.check' call
|
|
904
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
905
|
+
if (!(0 <= bytesWritten ? bytesWritten <= tail.p46() : false)) {
|
|
906
|
+
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail.<anonymous>' call
|
|
907
|
+
var message = 'Invalid number of bytes written: ' + bytesWritten + '. Should be in 0..' + tail.p46();
|
|
908
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
909
|
+
}
|
|
910
|
+
if (!(bytesWritten === 0)) {
|
|
911
|
+
tail.c45_1 = tail.c45_1 + bytesWritten | 0;
|
|
912
|
+
var tmp_0 = this_0;
|
|
913
|
+
// Inline function 'kotlin.Long.plus' call
|
|
914
|
+
tmp_0.t44_1 = this_0.t44_1.y2(toLong(bytesWritten));
|
|
915
|
+
break $l$block_0;
|
|
916
|
+
}
|
|
917
|
+
if (isEmpty(tail)) {
|
|
918
|
+
this_0.b46();
|
|
919
|
+
}
|
|
920
|
+
}
|
|
921
|
+
} else if (c < 2048) {
|
|
922
|
+
$l$block_2: {
|
|
923
|
+
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
|
|
924
|
+
var tail_0 = this_0.n45(2);
|
|
925
|
+
// Inline function 'kotlinx.io.commonWriteUtf8.<anonymous>' call
|
|
926
|
+
get_SegmentWriteContextImpl().y46(tail_0, 0, toByte(c >> 6 | 192), toByte(c & 63 | 128));
|
|
927
|
+
var bytesWritten_0 = 2;
|
|
928
|
+
if (bytesWritten_0 === 2) {
|
|
929
|
+
tail_0.c45_1 = tail_0.c45_1 + bytesWritten_0 | 0;
|
|
930
|
+
var tmp_1 = this_0;
|
|
931
|
+
// Inline function 'kotlin.Long.plus' call
|
|
932
|
+
tmp_1.t44_1 = this_0.t44_1.y2(toLong(bytesWritten_0));
|
|
933
|
+
break $l$block_2;
|
|
934
|
+
}
|
|
935
|
+
// Inline function 'kotlin.check' call
|
|
936
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
937
|
+
if (!(0 <= bytesWritten_0 ? bytesWritten_0 <= tail_0.p46() : false)) {
|
|
938
|
+
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail.<anonymous>' call
|
|
939
|
+
var message_0 = 'Invalid number of bytes written: ' + bytesWritten_0 + '. Should be in 0..' + tail_0.p46();
|
|
940
|
+
throw IllegalStateException_init_$Create$(toString(message_0));
|
|
941
|
+
}
|
|
942
|
+
if (!(bytesWritten_0 === 0)) {
|
|
943
|
+
tail_0.c45_1 = tail_0.c45_1 + bytesWritten_0 | 0;
|
|
944
|
+
var tmp_2 = this_0;
|
|
945
|
+
// Inline function 'kotlin.Long.plus' call
|
|
946
|
+
tmp_2.t44_1 = this_0.t44_1.y2(toLong(bytesWritten_0));
|
|
947
|
+
break $l$block_2;
|
|
948
|
+
}
|
|
949
|
+
if (isEmpty(tail_0)) {
|
|
950
|
+
this_0.b46();
|
|
951
|
+
}
|
|
952
|
+
}
|
|
953
|
+
i = i + 1 | 0;
|
|
954
|
+
} else if (c < 55296 || c > 57343) {
|
|
955
|
+
$l$block_4: {
|
|
956
|
+
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
|
|
957
|
+
var tail_1 = this_0.n45(3);
|
|
958
|
+
// Inline function 'kotlinx.io.commonWriteUtf8.<anonymous>' call
|
|
959
|
+
get_SegmentWriteContextImpl().x46(tail_1, 0, toByte(c >> 12 | 224), toByte(c >> 6 & 63 | 128), toByte(c & 63 | 128));
|
|
960
|
+
var bytesWritten_1 = 3;
|
|
961
|
+
if (bytesWritten_1 === 3) {
|
|
962
|
+
tail_1.c45_1 = tail_1.c45_1 + bytesWritten_1 | 0;
|
|
963
|
+
var tmp_3 = this_0;
|
|
964
|
+
// Inline function 'kotlin.Long.plus' call
|
|
965
|
+
tmp_3.t44_1 = this_0.t44_1.y2(toLong(bytesWritten_1));
|
|
966
|
+
break $l$block_4;
|
|
967
|
+
}
|
|
968
|
+
// Inline function 'kotlin.check' call
|
|
969
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
970
|
+
if (!(0 <= bytesWritten_1 ? bytesWritten_1 <= tail_1.p46() : false)) {
|
|
971
|
+
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail.<anonymous>' call
|
|
972
|
+
var message_1 = 'Invalid number of bytes written: ' + bytesWritten_1 + '. Should be in 0..' + tail_1.p46();
|
|
973
|
+
throw IllegalStateException_init_$Create$(toString(message_1));
|
|
974
|
+
}
|
|
975
|
+
if (!(bytesWritten_1 === 0)) {
|
|
976
|
+
tail_1.c45_1 = tail_1.c45_1 + bytesWritten_1 | 0;
|
|
977
|
+
var tmp_4 = this_0;
|
|
978
|
+
// Inline function 'kotlin.Long.plus' call
|
|
979
|
+
tmp_4.t44_1 = this_0.t44_1.y2(toLong(bytesWritten_1));
|
|
980
|
+
break $l$block_4;
|
|
981
|
+
}
|
|
982
|
+
if (isEmpty(tail_1)) {
|
|
983
|
+
this_0.b46();
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
i = i + 1 | 0;
|
|
987
|
+
} else {
|
|
988
|
+
var tmp_5;
|
|
989
|
+
if ((i + 1 | 0) < endIndex) {
|
|
990
|
+
// Inline function 'kotlin.code' call
|
|
991
|
+
var p0_1 = i + 1 | 0;
|
|
992
|
+
var this_3 = charSequenceGet(string, p0_1);
|
|
993
|
+
tmp_5 = Char__toInt_impl_vasixd(this_3);
|
|
994
|
+
} else {
|
|
995
|
+
tmp_5 = 0;
|
|
996
|
+
}
|
|
997
|
+
var low = tmp_5;
|
|
998
|
+
if (c > 56319 || !(56320 <= low ? low <= 57343 : false)) {
|
|
999
|
+
this_0.x45(63);
|
|
1000
|
+
i = i + 1 | 0;
|
|
1001
|
+
} else {
|
|
1002
|
+
var codePoint = 65536 + ((c & 1023) << 10 | low & 1023) | 0;
|
|
1003
|
+
$l$block_6: {
|
|
1004
|
+
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
|
|
1005
|
+
var tail_2 = this_0.n45(4);
|
|
1006
|
+
// Inline function 'kotlinx.io.commonWriteUtf8.<anonymous>' call
|
|
1007
|
+
get_SegmentWriteContextImpl().w46(tail_2, 0, toByte(codePoint >> 18 | 240), toByte(codePoint >> 12 & 63 | 128), toByte(codePoint >> 6 & 63 | 128), toByte(codePoint & 63 | 128));
|
|
1008
|
+
var bytesWritten_2 = 4;
|
|
1009
|
+
if (bytesWritten_2 === 4) {
|
|
1010
|
+
tail_2.c45_1 = tail_2.c45_1 + bytesWritten_2 | 0;
|
|
1011
|
+
var tmp_6 = this_0;
|
|
1012
|
+
// Inline function 'kotlin.Long.plus' call
|
|
1013
|
+
tmp_6.t44_1 = this_0.t44_1.y2(toLong(bytesWritten_2));
|
|
1014
|
+
break $l$block_6;
|
|
1015
|
+
}
|
|
1016
|
+
// Inline function 'kotlin.check' call
|
|
1017
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1018
|
+
if (!(0 <= bytesWritten_2 ? bytesWritten_2 <= tail_2.p46() : false)) {
|
|
1019
|
+
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail.<anonymous>' call
|
|
1020
|
+
var message_2 = 'Invalid number of bytes written: ' + bytesWritten_2 + '. Should be in 0..' + tail_2.p46();
|
|
1021
|
+
throw IllegalStateException_init_$Create$(toString(message_2));
|
|
1022
|
+
}
|
|
1023
|
+
if (!(bytesWritten_2 === 0)) {
|
|
1024
|
+
tail_2.c45_1 = tail_2.c45_1 + bytesWritten_2 | 0;
|
|
1025
|
+
var tmp_7 = this_0;
|
|
1026
|
+
// Inline function 'kotlin.Long.plus' call
|
|
1027
|
+
tmp_7.t44_1 = this_0.t44_1.y2(toLong(bytesWritten_2));
|
|
1028
|
+
break $l$block_6;
|
|
1029
|
+
}
|
|
1030
|
+
if (isEmpty(tail_2)) {
|
|
1031
|
+
this_0.b46();
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
i = i + 2 | 0;
|
|
1035
|
+
}
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
1038
|
+
_this__u8e3s4.y44();
|
|
1039
|
+
}
|
|
1040
|
+
function commonReadUtf8(_this__u8e3s4, byteCount) {
|
|
1041
|
+
if (byteCount.equals(new Long(0, 0)))
|
|
1042
|
+
return '';
|
|
1043
|
+
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.forEachSegment' call
|
|
1044
|
+
var curr = _this__u8e3s4.r44_1;
|
|
1045
|
+
while (!(curr == null)) {
|
|
1046
|
+
// Inline function 'kotlinx.io.commonReadUtf8.<anonymous>' call
|
|
1047
|
+
get_SegmentReadContextImpl();
|
|
1048
|
+
if (toLong(curr.j()).j1(byteCount) >= 0) {
|
|
1049
|
+
var result = '';
|
|
1050
|
+
// Inline function 'kotlinx.io.unsafe.withData' call
|
|
1051
|
+
// Inline function 'kotlinx.io.commonReadUtf8.<anonymous>.<anonymous>' call
|
|
1052
|
+
var data = curr.q46(true);
|
|
1053
|
+
var pos = curr.b45_1;
|
|
1054
|
+
// Inline function 'kotlin.math.min' call
|
|
1055
|
+
var a = curr.c45_1;
|
|
1056
|
+
var b = pos + byteCount.l1() | 0;
|
|
1057
|
+
var tmp$ret$0 = Math.min(a, b);
|
|
1058
|
+
result = commonToUtf8String(data, pos, tmp$ret$0);
|
|
1059
|
+
_this__u8e3s4.h45(byteCount);
|
|
1060
|
+
return result;
|
|
1061
|
+
}
|
|
1062
|
+
return commonToUtf8String(readByteArray(_this__u8e3s4, byteCount.l1()));
|
|
1063
|
+
}
|
|
1064
|
+
// Inline function 'kotlin.error' call
|
|
1065
|
+
var message = 'Unreacheable';
|
|
1066
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
1067
|
+
}
|
|
1068
|
+
function FileSystem() {
|
|
1069
|
+
}
|
|
1070
|
+
function SystemFileSystemImpl() {
|
|
1071
|
+
}
|
|
1072
|
+
function FileMetadata(isRegularFile, isDirectory, size) {
|
|
1073
|
+
isRegularFile = isRegularFile === VOID ? false : isRegularFile;
|
|
1074
|
+
isDirectory = isDirectory === VOID ? false : isDirectory;
|
|
1075
|
+
size = size === VOID ? new Long(0, 0) : size;
|
|
1076
|
+
this.h47_1 = isRegularFile;
|
|
1077
|
+
this.i47_1 = isDirectory;
|
|
1078
|
+
this.j47_1 = size;
|
|
1079
|
+
}
|
|
1080
|
+
function Path(base, parts) {
|
|
1081
|
+
return Path_0(base.toString(), parts.slice());
|
|
1082
|
+
}
|
|
1083
|
+
function removeTrailingSeparators(path, isWindows_) {
|
|
1084
|
+
isWindows_ = isWindows_ === VOID ? get_isWindows() : isWindows_;
|
|
1085
|
+
if (isWindows_) {
|
|
1086
|
+
var tmp;
|
|
1087
|
+
if (path.length > 1) {
|
|
1088
|
+
var tmp_0;
|
|
1089
|
+
if (charSequenceGet(path, 1) === _Char___init__impl__6a9atx(58)) {
|
|
1090
|
+
tmp_0 = 3;
|
|
1091
|
+
} else if (isUnc(path)) {
|
|
1092
|
+
tmp_0 = 2;
|
|
1093
|
+
} else {
|
|
1094
|
+
tmp_0 = 1;
|
|
1095
|
+
}
|
|
1096
|
+
tmp = tmp_0;
|
|
1097
|
+
} else {
|
|
1098
|
+
tmp = 1;
|
|
1099
|
+
}
|
|
1100
|
+
var limit = tmp;
|
|
1101
|
+
return removeTrailingSeparatorsWindows(limit, path);
|
|
1102
|
+
}
|
|
1103
|
+
return removeTrailingSeparatorsUnix(path);
|
|
1104
|
+
}
|
|
1105
|
+
function Path_0(base, parts) {
|
|
1106
|
+
// Inline function 'kotlin.text.buildString' call
|
|
1107
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1108
|
+
// Inline function 'kotlin.apply' call
|
|
1109
|
+
var this_0 = StringBuilder_init_$Create$_0();
|
|
1110
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1111
|
+
// Inline function 'kotlinx.io.files.Path.<anonymous>' call
|
|
1112
|
+
this_0.w7(base);
|
|
1113
|
+
// Inline function 'kotlin.collections.forEach' call
|
|
1114
|
+
var inductionVariable = 0;
|
|
1115
|
+
var last = parts.length;
|
|
1116
|
+
while (inductionVariable < last) {
|
|
1117
|
+
var element = parts[inductionVariable];
|
|
1118
|
+
inductionVariable = inductionVariable + 1 | 0;
|
|
1119
|
+
// Inline function 'kotlinx.io.files.Path.<anonymous>.<anonymous>' call
|
|
1120
|
+
var tmp;
|
|
1121
|
+
// Inline function 'kotlin.text.isNotEmpty' call
|
|
1122
|
+
if (charSequenceLength(this_0) > 0) {
|
|
1123
|
+
tmp = !endsWith(this_0, get_SystemPathSeparator());
|
|
1124
|
+
} else {
|
|
1125
|
+
tmp = false;
|
|
1126
|
+
}
|
|
1127
|
+
if (tmp) {
|
|
1128
|
+
this_0.x7(get_SystemPathSeparator());
|
|
1129
|
+
}
|
|
1130
|
+
this_0.w7(element);
|
|
1131
|
+
}
|
|
1132
|
+
var tmp$ret$2 = this_0.toString();
|
|
1133
|
+
return Path_2(tmp$ret$2);
|
|
1134
|
+
}
|
|
1135
|
+
function isUnc(path) {
|
|
1136
|
+
if (path.length < 2)
|
|
1137
|
+
return false;
|
|
1138
|
+
if (startsWith(path, '\\\\'))
|
|
1139
|
+
return true;
|
|
1140
|
+
if (startsWith(path, '//'))
|
|
1141
|
+
return true;
|
|
1142
|
+
return false;
|
|
1143
|
+
}
|
|
1144
|
+
function removeTrailingSeparatorsWindows(suffixLength, path) {
|
|
1145
|
+
// Inline function 'kotlin.require' call
|
|
1146
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1147
|
+
// Inline function 'kotlin.require' call
|
|
1148
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1149
|
+
if (!(suffixLength >= 1)) {
|
|
1150
|
+
// Inline function 'kotlin.require.<anonymous>' call
|
|
1151
|
+
var message = 'Failed requirement.';
|
|
1152
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1153
|
+
}
|
|
1154
|
+
var idx = path.length;
|
|
1155
|
+
$l$loop: while (idx > suffixLength) {
|
|
1156
|
+
var c = charSequenceGet(path, idx - 1 | 0);
|
|
1157
|
+
if (!(c === _Char___init__impl__6a9atx(92)) && !(c === _Char___init__impl__6a9atx(47)))
|
|
1158
|
+
break $l$loop;
|
|
1159
|
+
idx = idx - 1 | 0;
|
|
1160
|
+
}
|
|
1161
|
+
// Inline function 'kotlin.text.substring' call
|
|
1162
|
+
var endIndex = idx;
|
|
1163
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
1164
|
+
return path.substring(0, endIndex);
|
|
1165
|
+
}
|
|
1166
|
+
function removeTrailingSeparatorsUnix(path) {
|
|
1167
|
+
var idx = path.length;
|
|
1168
|
+
while (idx > 1 && charSequenceGet(path, idx - 1 | 0) === _Char___init__impl__6a9atx(47)) {
|
|
1169
|
+
idx = idx - 1 | 0;
|
|
1170
|
+
}
|
|
1171
|
+
// Inline function 'kotlin.text.substring' call
|
|
1172
|
+
var endIndex = idx;
|
|
1173
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
1174
|
+
return path.substring(0, endIndex);
|
|
1175
|
+
}
|
|
1176
|
+
function commonToUtf8String(_this__u8e3s4, beginIndex, endIndex) {
|
|
1177
|
+
beginIndex = beginIndex === VOID ? 0 : beginIndex;
|
|
1178
|
+
endIndex = endIndex === VOID ? _this__u8e3s4.length : endIndex;
|
|
1179
|
+
if (beginIndex < 0 || endIndex > _this__u8e3s4.length || beginIndex > endIndex) {
|
|
1180
|
+
throw IndexOutOfBoundsException_init_$Create$('size=' + _this__u8e3s4.length + ' beginIndex=' + beginIndex + ' endIndex=' + endIndex);
|
|
1181
|
+
}
|
|
1182
|
+
var chars = charArray(endIndex - beginIndex | 0);
|
|
1183
|
+
var length = 0;
|
|
1184
|
+
// Inline function 'kotlinx.io.internal.processUtf16Chars' call
|
|
1185
|
+
var index = beginIndex;
|
|
1186
|
+
while (index < endIndex) {
|
|
1187
|
+
var b0 = _this__u8e3s4[index];
|
|
1188
|
+
if (b0 >= 0) {
|
|
1189
|
+
// Inline function 'kotlinx.io.internal.commonToUtf8String.<anonymous>' call
|
|
1190
|
+
var _unary__edvuaz = length;
|
|
1191
|
+
length = _unary__edvuaz + 1 | 0;
|
|
1192
|
+
chars[_unary__edvuaz] = numberToChar(b0);
|
|
1193
|
+
index = index + 1 | 0;
|
|
1194
|
+
while (index < endIndex && _this__u8e3s4[index] >= 0) {
|
|
1195
|
+
// Inline function 'kotlinx.io.internal.commonToUtf8String.<anonymous>' call
|
|
1196
|
+
var _unary__edvuaz_0 = index;
|
|
1197
|
+
index = _unary__edvuaz_0 + 1 | 0;
|
|
1198
|
+
var _unary__edvuaz_1 = length;
|
|
1199
|
+
length = _unary__edvuaz_1 + 1 | 0;
|
|
1200
|
+
chars[_unary__edvuaz_1] = numberToChar(_this__u8e3s4[_unary__edvuaz_0]);
|
|
1201
|
+
}
|
|
1202
|
+
} else {
|
|
1203
|
+
// Inline function 'kotlinx.io.shr' call
|
|
1204
|
+
if (b0 >> 5 === -2) {
|
|
1205
|
+
var tmp = index;
|
|
1206
|
+
var tmp$ret$1;
|
|
1207
|
+
$l$block_0: {
|
|
1208
|
+
// Inline function 'kotlinx.io.internal.process2Utf8Bytes' call
|
|
1209
|
+
var beginIndex_0 = index;
|
|
1210
|
+
if (endIndex <= (beginIndex_0 + 1 | 0)) {
|
|
1211
|
+
// Inline function 'kotlinx.io.internal.processUtf16Chars.<anonymous>' call
|
|
1212
|
+
// Inline function 'kotlinx.io.internal.commonToUtf8String.<anonymous>' call
|
|
1213
|
+
var _unary__edvuaz_2 = length;
|
|
1214
|
+
length = _unary__edvuaz_2 + 1 | 0;
|
|
1215
|
+
chars[_unary__edvuaz_2] = numberToChar(65533);
|
|
1216
|
+
tmp$ret$1 = 1;
|
|
1217
|
+
break $l$block_0;
|
|
1218
|
+
}
|
|
1219
|
+
var b0_0 = _this__u8e3s4[beginIndex_0];
|
|
1220
|
+
var b1 = _this__u8e3s4[beginIndex_0 + 1 | 0];
|
|
1221
|
+
// Inline function 'kotlinx.io.internal.isUtf8Continuation' call
|
|
1222
|
+
// Inline function 'kotlinx.io.and' call
|
|
1223
|
+
if (!((b1 & 192) === 128)) {
|
|
1224
|
+
// Inline function 'kotlinx.io.internal.processUtf16Chars.<anonymous>' call
|
|
1225
|
+
// Inline function 'kotlinx.io.internal.commonToUtf8String.<anonymous>' call
|
|
1226
|
+
var _unary__edvuaz_3 = length;
|
|
1227
|
+
length = _unary__edvuaz_3 + 1 | 0;
|
|
1228
|
+
chars[_unary__edvuaz_3] = numberToChar(65533);
|
|
1229
|
+
tmp$ret$1 = 1;
|
|
1230
|
+
break $l$block_0;
|
|
1231
|
+
}
|
|
1232
|
+
var codePoint = 3968 ^ b1 ^ b0_0 << 6;
|
|
1233
|
+
if (codePoint < 128) {
|
|
1234
|
+
// Inline function 'kotlinx.io.internal.processUtf16Chars.<anonymous>' call
|
|
1235
|
+
// Inline function 'kotlinx.io.internal.commonToUtf8String.<anonymous>' call
|
|
1236
|
+
var _unary__edvuaz_4 = length;
|
|
1237
|
+
length = _unary__edvuaz_4 + 1 | 0;
|
|
1238
|
+
chars[_unary__edvuaz_4] = numberToChar(65533);
|
|
1239
|
+
} else {
|
|
1240
|
+
// Inline function 'kotlinx.io.internal.processUtf16Chars.<anonymous>' call
|
|
1241
|
+
// Inline function 'kotlinx.io.internal.commonToUtf8String.<anonymous>' call
|
|
1242
|
+
var _unary__edvuaz_5 = length;
|
|
1243
|
+
length = _unary__edvuaz_5 + 1 | 0;
|
|
1244
|
+
chars[_unary__edvuaz_5] = numberToChar(codePoint);
|
|
1245
|
+
}
|
|
1246
|
+
tmp$ret$1 = 2;
|
|
1247
|
+
}
|
|
1248
|
+
index = tmp + tmp$ret$1 | 0;
|
|
1249
|
+
} else {
|
|
1250
|
+
// Inline function 'kotlinx.io.shr' call
|
|
1251
|
+
if (b0 >> 4 === -2) {
|
|
1252
|
+
var tmp_0 = index;
|
|
1253
|
+
var tmp$ret$7;
|
|
1254
|
+
$l$block_4: {
|
|
1255
|
+
// Inline function 'kotlinx.io.internal.process3Utf8Bytes' call
|
|
1256
|
+
var beginIndex_1 = index;
|
|
1257
|
+
if (endIndex <= (beginIndex_1 + 2 | 0)) {
|
|
1258
|
+
// Inline function 'kotlinx.io.internal.processUtf16Chars.<anonymous>' call
|
|
1259
|
+
// Inline function 'kotlinx.io.internal.commonToUtf8String.<anonymous>' call
|
|
1260
|
+
var _unary__edvuaz_6 = length;
|
|
1261
|
+
length = _unary__edvuaz_6 + 1 | 0;
|
|
1262
|
+
chars[_unary__edvuaz_6] = numberToChar(65533);
|
|
1263
|
+
var tmp_1;
|
|
1264
|
+
if (endIndex <= (beginIndex_1 + 1 | 0)) {
|
|
1265
|
+
tmp_1 = true;
|
|
1266
|
+
} else {
|
|
1267
|
+
// Inline function 'kotlinx.io.internal.isUtf8Continuation' call
|
|
1268
|
+
// Inline function 'kotlinx.io.and' call
|
|
1269
|
+
tmp_1 = !((_this__u8e3s4[beginIndex_1 + 1 | 0] & 192) === 128);
|
|
1270
|
+
}
|
|
1271
|
+
if (tmp_1) {
|
|
1272
|
+
tmp$ret$7 = 1;
|
|
1273
|
+
break $l$block_4;
|
|
1274
|
+
} else {
|
|
1275
|
+
tmp$ret$7 = 2;
|
|
1276
|
+
break $l$block_4;
|
|
1277
|
+
}
|
|
1278
|
+
}
|
|
1279
|
+
var b0_1 = _this__u8e3s4[beginIndex_1];
|
|
1280
|
+
var b1_0 = _this__u8e3s4[beginIndex_1 + 1 | 0];
|
|
1281
|
+
// Inline function 'kotlinx.io.internal.isUtf8Continuation' call
|
|
1282
|
+
// Inline function 'kotlinx.io.and' call
|
|
1283
|
+
if (!((b1_0 & 192) === 128)) {
|
|
1284
|
+
// Inline function 'kotlinx.io.internal.processUtf16Chars.<anonymous>' call
|
|
1285
|
+
// Inline function 'kotlinx.io.internal.commonToUtf8String.<anonymous>' call
|
|
1286
|
+
var _unary__edvuaz_7 = length;
|
|
1287
|
+
length = _unary__edvuaz_7 + 1 | 0;
|
|
1288
|
+
chars[_unary__edvuaz_7] = numberToChar(65533);
|
|
1289
|
+
tmp$ret$7 = 1;
|
|
1290
|
+
break $l$block_4;
|
|
1291
|
+
}
|
|
1292
|
+
var b2 = _this__u8e3s4[beginIndex_1 + 2 | 0];
|
|
1293
|
+
// Inline function 'kotlinx.io.internal.isUtf8Continuation' call
|
|
1294
|
+
// Inline function 'kotlinx.io.and' call
|
|
1295
|
+
if (!((b2 & 192) === 128)) {
|
|
1296
|
+
// Inline function 'kotlinx.io.internal.processUtf16Chars.<anonymous>' call
|
|
1297
|
+
// Inline function 'kotlinx.io.internal.commonToUtf8String.<anonymous>' call
|
|
1298
|
+
var _unary__edvuaz_8 = length;
|
|
1299
|
+
length = _unary__edvuaz_8 + 1 | 0;
|
|
1300
|
+
chars[_unary__edvuaz_8] = numberToChar(65533);
|
|
1301
|
+
tmp$ret$7 = 2;
|
|
1302
|
+
break $l$block_4;
|
|
1303
|
+
}
|
|
1304
|
+
var codePoint_0 = -123008 ^ b2 ^ b1_0 << 6 ^ b0_1 << 12;
|
|
1305
|
+
if (codePoint_0 < 2048) {
|
|
1306
|
+
// Inline function 'kotlinx.io.internal.processUtf16Chars.<anonymous>' call
|
|
1307
|
+
// Inline function 'kotlinx.io.internal.commonToUtf8String.<anonymous>' call
|
|
1308
|
+
var _unary__edvuaz_9 = length;
|
|
1309
|
+
length = _unary__edvuaz_9 + 1 | 0;
|
|
1310
|
+
chars[_unary__edvuaz_9] = numberToChar(65533);
|
|
1311
|
+
} else if (55296 <= codePoint_0 ? codePoint_0 <= 57343 : false) {
|
|
1312
|
+
// Inline function 'kotlinx.io.internal.processUtf16Chars.<anonymous>' call
|
|
1313
|
+
// Inline function 'kotlinx.io.internal.commonToUtf8String.<anonymous>' call
|
|
1314
|
+
var _unary__edvuaz_10 = length;
|
|
1315
|
+
length = _unary__edvuaz_10 + 1 | 0;
|
|
1316
|
+
chars[_unary__edvuaz_10] = numberToChar(65533);
|
|
1317
|
+
} else {
|
|
1318
|
+
// Inline function 'kotlinx.io.internal.processUtf16Chars.<anonymous>' call
|
|
1319
|
+
// Inline function 'kotlinx.io.internal.commonToUtf8String.<anonymous>' call
|
|
1320
|
+
var _unary__edvuaz_11 = length;
|
|
1321
|
+
length = _unary__edvuaz_11 + 1 | 0;
|
|
1322
|
+
chars[_unary__edvuaz_11] = numberToChar(codePoint_0);
|
|
1323
|
+
}
|
|
1324
|
+
tmp$ret$7 = 3;
|
|
1325
|
+
}
|
|
1326
|
+
index = tmp_0 + tmp$ret$7 | 0;
|
|
1327
|
+
} else {
|
|
1328
|
+
// Inline function 'kotlinx.io.shr' call
|
|
1329
|
+
if (b0 >> 3 === -2) {
|
|
1330
|
+
var tmp_2 = index;
|
|
1331
|
+
var tmp$ret$15;
|
|
1332
|
+
$l$block_10: {
|
|
1333
|
+
// Inline function 'kotlinx.io.internal.process4Utf8Bytes' call
|
|
1334
|
+
var beginIndex_2 = index;
|
|
1335
|
+
if (endIndex <= (beginIndex_2 + 3 | 0)) {
|
|
1336
|
+
// Inline function 'kotlinx.io.internal.processUtf16Chars.<anonymous>' call
|
|
1337
|
+
if (!(65533 === 65533)) {
|
|
1338
|
+
// Inline function 'kotlinx.io.internal.commonToUtf8String.<anonymous>' call
|
|
1339
|
+
var _unary__edvuaz_12 = length;
|
|
1340
|
+
length = _unary__edvuaz_12 + 1 | 0;
|
|
1341
|
+
chars[_unary__edvuaz_12] = numberToChar((65533 >>> 10 | 0) + 55232 | 0);
|
|
1342
|
+
// Inline function 'kotlinx.io.internal.commonToUtf8String.<anonymous>' call
|
|
1343
|
+
var _unary__edvuaz_13 = length;
|
|
1344
|
+
length = _unary__edvuaz_13 + 1 | 0;
|
|
1345
|
+
chars[_unary__edvuaz_13] = numberToChar((65533 & 1023) + 56320 | 0);
|
|
1346
|
+
} else {
|
|
1347
|
+
// Inline function 'kotlinx.io.internal.commonToUtf8String.<anonymous>' call
|
|
1348
|
+
var _unary__edvuaz_14 = length;
|
|
1349
|
+
length = _unary__edvuaz_14 + 1 | 0;
|
|
1350
|
+
chars[_unary__edvuaz_14] = _Char___init__impl__6a9atx(65533);
|
|
1351
|
+
}
|
|
1352
|
+
var tmp_3;
|
|
1353
|
+
if (endIndex <= (beginIndex_2 + 1 | 0)) {
|
|
1354
|
+
tmp_3 = true;
|
|
1355
|
+
} else {
|
|
1356
|
+
// Inline function 'kotlinx.io.internal.isUtf8Continuation' call
|
|
1357
|
+
// Inline function 'kotlinx.io.and' call
|
|
1358
|
+
tmp_3 = !((_this__u8e3s4[beginIndex_2 + 1 | 0] & 192) === 128);
|
|
1359
|
+
}
|
|
1360
|
+
if (tmp_3) {
|
|
1361
|
+
tmp$ret$15 = 1;
|
|
1362
|
+
break $l$block_10;
|
|
1363
|
+
} else {
|
|
1364
|
+
var tmp_4;
|
|
1365
|
+
if (endIndex <= (beginIndex_2 + 2 | 0)) {
|
|
1366
|
+
tmp_4 = true;
|
|
1367
|
+
} else {
|
|
1368
|
+
// Inline function 'kotlinx.io.internal.isUtf8Continuation' call
|
|
1369
|
+
// Inline function 'kotlinx.io.and' call
|
|
1370
|
+
tmp_4 = !((_this__u8e3s4[beginIndex_2 + 2 | 0] & 192) === 128);
|
|
1371
|
+
}
|
|
1372
|
+
if (tmp_4) {
|
|
1373
|
+
tmp$ret$15 = 2;
|
|
1374
|
+
break $l$block_10;
|
|
1375
|
+
} else {
|
|
1376
|
+
tmp$ret$15 = 3;
|
|
1377
|
+
break $l$block_10;
|
|
1378
|
+
}
|
|
1379
|
+
}
|
|
1380
|
+
}
|
|
1381
|
+
var b0_2 = _this__u8e3s4[beginIndex_2];
|
|
1382
|
+
var b1_1 = _this__u8e3s4[beginIndex_2 + 1 | 0];
|
|
1383
|
+
// Inline function 'kotlinx.io.internal.isUtf8Continuation' call
|
|
1384
|
+
// Inline function 'kotlinx.io.and' call
|
|
1385
|
+
if (!((b1_1 & 192) === 128)) {
|
|
1386
|
+
// Inline function 'kotlinx.io.internal.processUtf16Chars.<anonymous>' call
|
|
1387
|
+
if (!(65533 === 65533)) {
|
|
1388
|
+
// Inline function 'kotlinx.io.internal.commonToUtf8String.<anonymous>' call
|
|
1389
|
+
var _unary__edvuaz_15 = length;
|
|
1390
|
+
length = _unary__edvuaz_15 + 1 | 0;
|
|
1391
|
+
chars[_unary__edvuaz_15] = numberToChar((65533 >>> 10 | 0) + 55232 | 0);
|
|
1392
|
+
// Inline function 'kotlinx.io.internal.commonToUtf8String.<anonymous>' call
|
|
1393
|
+
var _unary__edvuaz_16 = length;
|
|
1394
|
+
length = _unary__edvuaz_16 + 1 | 0;
|
|
1395
|
+
chars[_unary__edvuaz_16] = numberToChar((65533 & 1023) + 56320 | 0);
|
|
1396
|
+
} else {
|
|
1397
|
+
// Inline function 'kotlinx.io.internal.commonToUtf8String.<anonymous>' call
|
|
1398
|
+
var _unary__edvuaz_17 = length;
|
|
1399
|
+
length = _unary__edvuaz_17 + 1 | 0;
|
|
1400
|
+
chars[_unary__edvuaz_17] = _Char___init__impl__6a9atx(65533);
|
|
1401
|
+
}
|
|
1402
|
+
tmp$ret$15 = 1;
|
|
1403
|
+
break $l$block_10;
|
|
1404
|
+
}
|
|
1405
|
+
var b2_0 = _this__u8e3s4[beginIndex_2 + 2 | 0];
|
|
1406
|
+
// Inline function 'kotlinx.io.internal.isUtf8Continuation' call
|
|
1407
|
+
// Inline function 'kotlinx.io.and' call
|
|
1408
|
+
if (!((b2_0 & 192) === 128)) {
|
|
1409
|
+
// Inline function 'kotlinx.io.internal.processUtf16Chars.<anonymous>' call
|
|
1410
|
+
if (!(65533 === 65533)) {
|
|
1411
|
+
// Inline function 'kotlinx.io.internal.commonToUtf8String.<anonymous>' call
|
|
1412
|
+
var _unary__edvuaz_18 = length;
|
|
1413
|
+
length = _unary__edvuaz_18 + 1 | 0;
|
|
1414
|
+
chars[_unary__edvuaz_18] = numberToChar((65533 >>> 10 | 0) + 55232 | 0);
|
|
1415
|
+
// Inline function 'kotlinx.io.internal.commonToUtf8String.<anonymous>' call
|
|
1416
|
+
var _unary__edvuaz_19 = length;
|
|
1417
|
+
length = _unary__edvuaz_19 + 1 | 0;
|
|
1418
|
+
chars[_unary__edvuaz_19] = numberToChar((65533 & 1023) + 56320 | 0);
|
|
1419
|
+
} else {
|
|
1420
|
+
// Inline function 'kotlinx.io.internal.commonToUtf8String.<anonymous>' call
|
|
1421
|
+
var _unary__edvuaz_20 = length;
|
|
1422
|
+
length = _unary__edvuaz_20 + 1 | 0;
|
|
1423
|
+
chars[_unary__edvuaz_20] = _Char___init__impl__6a9atx(65533);
|
|
1424
|
+
}
|
|
1425
|
+
tmp$ret$15 = 2;
|
|
1426
|
+
break $l$block_10;
|
|
1427
|
+
}
|
|
1428
|
+
var b3 = _this__u8e3s4[beginIndex_2 + 3 | 0];
|
|
1429
|
+
// Inline function 'kotlinx.io.internal.isUtf8Continuation' call
|
|
1430
|
+
// Inline function 'kotlinx.io.and' call
|
|
1431
|
+
if (!((b3 & 192) === 128)) {
|
|
1432
|
+
// Inline function 'kotlinx.io.internal.processUtf16Chars.<anonymous>' call
|
|
1433
|
+
if (!(65533 === 65533)) {
|
|
1434
|
+
// Inline function 'kotlinx.io.internal.commonToUtf8String.<anonymous>' call
|
|
1435
|
+
var _unary__edvuaz_21 = length;
|
|
1436
|
+
length = _unary__edvuaz_21 + 1 | 0;
|
|
1437
|
+
chars[_unary__edvuaz_21] = numberToChar((65533 >>> 10 | 0) + 55232 | 0);
|
|
1438
|
+
// Inline function 'kotlinx.io.internal.commonToUtf8String.<anonymous>' call
|
|
1439
|
+
var _unary__edvuaz_22 = length;
|
|
1440
|
+
length = _unary__edvuaz_22 + 1 | 0;
|
|
1441
|
+
chars[_unary__edvuaz_22] = numberToChar((65533 & 1023) + 56320 | 0);
|
|
1442
|
+
} else {
|
|
1443
|
+
// Inline function 'kotlinx.io.internal.commonToUtf8String.<anonymous>' call
|
|
1444
|
+
var _unary__edvuaz_23 = length;
|
|
1445
|
+
length = _unary__edvuaz_23 + 1 | 0;
|
|
1446
|
+
chars[_unary__edvuaz_23] = _Char___init__impl__6a9atx(65533);
|
|
1447
|
+
}
|
|
1448
|
+
tmp$ret$15 = 3;
|
|
1449
|
+
break $l$block_10;
|
|
1450
|
+
}
|
|
1451
|
+
var codePoint_1 = 3678080 ^ b3 ^ b2_0 << 6 ^ b1_1 << 12 ^ b0_2 << 18;
|
|
1452
|
+
if (codePoint_1 > 1114111) {
|
|
1453
|
+
// Inline function 'kotlinx.io.internal.processUtf16Chars.<anonymous>' call
|
|
1454
|
+
if (!(65533 === 65533)) {
|
|
1455
|
+
// Inline function 'kotlinx.io.internal.commonToUtf8String.<anonymous>' call
|
|
1456
|
+
var _unary__edvuaz_24 = length;
|
|
1457
|
+
length = _unary__edvuaz_24 + 1 | 0;
|
|
1458
|
+
chars[_unary__edvuaz_24] = numberToChar((65533 >>> 10 | 0) + 55232 | 0);
|
|
1459
|
+
// Inline function 'kotlinx.io.internal.commonToUtf8String.<anonymous>' call
|
|
1460
|
+
var _unary__edvuaz_25 = length;
|
|
1461
|
+
length = _unary__edvuaz_25 + 1 | 0;
|
|
1462
|
+
chars[_unary__edvuaz_25] = numberToChar((65533 & 1023) + 56320 | 0);
|
|
1463
|
+
} else {
|
|
1464
|
+
// Inline function 'kotlinx.io.internal.commonToUtf8String.<anonymous>' call
|
|
1465
|
+
var _unary__edvuaz_26 = length;
|
|
1466
|
+
length = _unary__edvuaz_26 + 1 | 0;
|
|
1467
|
+
chars[_unary__edvuaz_26] = _Char___init__impl__6a9atx(65533);
|
|
1468
|
+
}
|
|
1469
|
+
} else if (55296 <= codePoint_1 ? codePoint_1 <= 57343 : false) {
|
|
1470
|
+
// Inline function 'kotlinx.io.internal.processUtf16Chars.<anonymous>' call
|
|
1471
|
+
if (!(65533 === 65533)) {
|
|
1472
|
+
// Inline function 'kotlinx.io.internal.commonToUtf8String.<anonymous>' call
|
|
1473
|
+
var _unary__edvuaz_27 = length;
|
|
1474
|
+
length = _unary__edvuaz_27 + 1 | 0;
|
|
1475
|
+
chars[_unary__edvuaz_27] = numberToChar((65533 >>> 10 | 0) + 55232 | 0);
|
|
1476
|
+
// Inline function 'kotlinx.io.internal.commonToUtf8String.<anonymous>' call
|
|
1477
|
+
var _unary__edvuaz_28 = length;
|
|
1478
|
+
length = _unary__edvuaz_28 + 1 | 0;
|
|
1479
|
+
chars[_unary__edvuaz_28] = numberToChar((65533 & 1023) + 56320 | 0);
|
|
1480
|
+
} else {
|
|
1481
|
+
// Inline function 'kotlinx.io.internal.commonToUtf8String.<anonymous>' call
|
|
1482
|
+
var _unary__edvuaz_29 = length;
|
|
1483
|
+
length = _unary__edvuaz_29 + 1 | 0;
|
|
1484
|
+
chars[_unary__edvuaz_29] = _Char___init__impl__6a9atx(65533);
|
|
1485
|
+
}
|
|
1486
|
+
} else if (codePoint_1 < 65536) {
|
|
1487
|
+
// Inline function 'kotlinx.io.internal.processUtf16Chars.<anonymous>' call
|
|
1488
|
+
if (!(65533 === 65533)) {
|
|
1489
|
+
// Inline function 'kotlinx.io.internal.commonToUtf8String.<anonymous>' call
|
|
1490
|
+
var _unary__edvuaz_30 = length;
|
|
1491
|
+
length = _unary__edvuaz_30 + 1 | 0;
|
|
1492
|
+
chars[_unary__edvuaz_30] = numberToChar((65533 >>> 10 | 0) + 55232 | 0);
|
|
1493
|
+
// Inline function 'kotlinx.io.internal.commonToUtf8String.<anonymous>' call
|
|
1494
|
+
var _unary__edvuaz_31 = length;
|
|
1495
|
+
length = _unary__edvuaz_31 + 1 | 0;
|
|
1496
|
+
chars[_unary__edvuaz_31] = numberToChar((65533 & 1023) + 56320 | 0);
|
|
1497
|
+
} else {
|
|
1498
|
+
// Inline function 'kotlinx.io.internal.commonToUtf8String.<anonymous>' call
|
|
1499
|
+
var _unary__edvuaz_32 = length;
|
|
1500
|
+
length = _unary__edvuaz_32 + 1 | 0;
|
|
1501
|
+
chars[_unary__edvuaz_32] = _Char___init__impl__6a9atx(65533);
|
|
1502
|
+
}
|
|
1503
|
+
} else {
|
|
1504
|
+
// Inline function 'kotlinx.io.internal.processUtf16Chars.<anonymous>' call
|
|
1505
|
+
if (!(codePoint_1 === 65533)) {
|
|
1506
|
+
// Inline function 'kotlinx.io.internal.commonToUtf8String.<anonymous>' call
|
|
1507
|
+
var _unary__edvuaz_33 = length;
|
|
1508
|
+
length = _unary__edvuaz_33 + 1 | 0;
|
|
1509
|
+
chars[_unary__edvuaz_33] = numberToChar((codePoint_1 >>> 10 | 0) + 55232 | 0);
|
|
1510
|
+
// Inline function 'kotlinx.io.internal.commonToUtf8String.<anonymous>' call
|
|
1511
|
+
var _unary__edvuaz_34 = length;
|
|
1512
|
+
length = _unary__edvuaz_34 + 1 | 0;
|
|
1513
|
+
chars[_unary__edvuaz_34] = numberToChar((codePoint_1 & 1023) + 56320 | 0);
|
|
1514
|
+
} else {
|
|
1515
|
+
// Inline function 'kotlinx.io.internal.commonToUtf8String.<anonymous>' call
|
|
1516
|
+
var _unary__edvuaz_35 = length;
|
|
1517
|
+
length = _unary__edvuaz_35 + 1 | 0;
|
|
1518
|
+
chars[_unary__edvuaz_35] = _Char___init__impl__6a9atx(65533);
|
|
1519
|
+
}
|
|
1520
|
+
}
|
|
1521
|
+
tmp$ret$15 = 4;
|
|
1522
|
+
}
|
|
1523
|
+
index = tmp_2 + tmp$ret$15 | 0;
|
|
1524
|
+
} else {
|
|
1525
|
+
// Inline function 'kotlinx.io.internal.commonToUtf8String.<anonymous>' call
|
|
1526
|
+
var _unary__edvuaz_36 = length;
|
|
1527
|
+
length = _unary__edvuaz_36 + 1 | 0;
|
|
1528
|
+
chars[_unary__edvuaz_36] = _Char___init__impl__6a9atx(65533);
|
|
1529
|
+
index = index + 1 | 0;
|
|
1530
|
+
}
|
|
1531
|
+
}
|
|
1532
|
+
}
|
|
1533
|
+
}
|
|
1534
|
+
}
|
|
1535
|
+
return concatToString(chars, 0, length);
|
|
1536
|
+
}
|
|
1537
|
+
function get_SegmentReadContextImpl() {
|
|
1538
|
+
_init_properties_UnsafeBufferOperations_kt__xw75gy();
|
|
1539
|
+
return SegmentReadContextImpl;
|
|
1540
|
+
}
|
|
1541
|
+
var SegmentReadContextImpl;
|
|
1542
|
+
function get_SegmentWriteContextImpl() {
|
|
1543
|
+
_init_properties_UnsafeBufferOperations_kt__xw75gy();
|
|
1544
|
+
return SegmentWriteContextImpl;
|
|
1545
|
+
}
|
|
1546
|
+
var SegmentWriteContextImpl;
|
|
1547
|
+
var BufferIterationContextImpl;
|
|
1548
|
+
function UnsafeBufferOperations() {
|
|
1549
|
+
}
|
|
1550
|
+
var UnsafeBufferOperations_instance;
|
|
1551
|
+
function UnsafeBufferOperations_getInstance() {
|
|
1552
|
+
return UnsafeBufferOperations_instance;
|
|
1553
|
+
}
|
|
1554
|
+
function SegmentReadContextImpl$1() {
|
|
1555
|
+
}
|
|
1556
|
+
protoOf(SegmentReadContextImpl$1).z45 = function (segment, offset) {
|
|
1557
|
+
return segment.r46(offset);
|
|
1558
|
+
};
|
|
1559
|
+
function SegmentWriteContextImpl$1() {
|
|
1560
|
+
}
|
|
1561
|
+
protoOf(SegmentWriteContextImpl$1).z46 = function (segment, offset, value) {
|
|
1562
|
+
segment.s46(offset, value);
|
|
1563
|
+
};
|
|
1564
|
+
protoOf(SegmentWriteContextImpl$1).y46 = function (segment, offset, b0, b1) {
|
|
1565
|
+
segment.t46(offset, b0, b1);
|
|
1566
|
+
};
|
|
1567
|
+
protoOf(SegmentWriteContextImpl$1).x46 = function (segment, offset, b0, b1, b2) {
|
|
1568
|
+
segment.u46(offset, b0, b1, b2);
|
|
1569
|
+
};
|
|
1570
|
+
protoOf(SegmentWriteContextImpl$1).w46 = function (segment, offset, b0, b1, b2, b3) {
|
|
1571
|
+
segment.v46(offset, b0, b1, b2, b3);
|
|
1572
|
+
};
|
|
1573
|
+
function BufferIterationContextImpl$1() {
|
|
1574
|
+
}
|
|
1575
|
+
protoOf(BufferIterationContextImpl$1).z45 = function (segment, offset) {
|
|
1576
|
+
return get_SegmentReadContextImpl().z45(segment, offset);
|
|
1577
|
+
};
|
|
1578
|
+
var properties_initialized_UnsafeBufferOperations_kt_2xfgoc;
|
|
1579
|
+
function _init_properties_UnsafeBufferOperations_kt__xw75gy() {
|
|
1580
|
+
if (!properties_initialized_UnsafeBufferOperations_kt_2xfgoc) {
|
|
1581
|
+
properties_initialized_UnsafeBufferOperations_kt_2xfgoc = true;
|
|
1582
|
+
SegmentReadContextImpl = new SegmentReadContextImpl$1();
|
|
1583
|
+
SegmentWriteContextImpl = new SegmentWriteContextImpl$1();
|
|
1584
|
+
BufferIterationContextImpl = new BufferIterationContextImpl$1();
|
|
1585
|
+
}
|
|
1586
|
+
}
|
|
1587
|
+
function withCaughtException(block) {
|
|
1588
|
+
try {
|
|
1589
|
+
block();
|
|
1590
|
+
return null;
|
|
1591
|
+
} catch ($p) {
|
|
1592
|
+
if ($p instanceof Error) {
|
|
1593
|
+
var t = $p;
|
|
1594
|
+
return t;
|
|
1595
|
+
} else {
|
|
1596
|
+
throw $p;
|
|
1597
|
+
}
|
|
1598
|
+
}
|
|
1599
|
+
}
|
|
1600
|
+
function IOException_init_$Init$($this) {
|
|
1601
|
+
Exception_init_$Init$($this);
|
|
1602
|
+
IOException.call($this);
|
|
1603
|
+
return $this;
|
|
1604
|
+
}
|
|
1605
|
+
function IOException_init_$Create$() {
|
|
1606
|
+
var tmp = IOException_init_$Init$(objectCreate(protoOf(IOException)));
|
|
1607
|
+
captureStack(tmp, IOException_init_$Create$);
|
|
1608
|
+
return tmp;
|
|
1609
|
+
}
|
|
1610
|
+
function IOException_init_$Init$_0(message, $this) {
|
|
1611
|
+
Exception_init_$Init$_0(message, $this);
|
|
1612
|
+
IOException.call($this);
|
|
1613
|
+
return $this;
|
|
1614
|
+
}
|
|
1615
|
+
function IOException_init_$Create$_0(message) {
|
|
1616
|
+
var tmp = IOException_init_$Init$_0(message, objectCreate(protoOf(IOException)));
|
|
1617
|
+
captureStack(tmp, IOException_init_$Create$_0);
|
|
1618
|
+
return tmp;
|
|
1619
|
+
}
|
|
1620
|
+
function IOException_init_$Init$_1(message, cause, $this) {
|
|
1621
|
+
Exception_init_$Init$_1(message, cause, $this);
|
|
1622
|
+
IOException.call($this);
|
|
1623
|
+
return $this;
|
|
1624
|
+
}
|
|
1625
|
+
function IOException_init_$Create$_1(message, cause) {
|
|
1626
|
+
var tmp = IOException_init_$Init$_1(message, cause, objectCreate(protoOf(IOException)));
|
|
1627
|
+
captureStack(tmp, IOException_init_$Create$_1);
|
|
1628
|
+
return tmp;
|
|
1629
|
+
}
|
|
1630
|
+
function IOException() {
|
|
1631
|
+
captureStack(this, IOException);
|
|
1632
|
+
}
|
|
1633
|
+
function EOFException_init_$Init$($this) {
|
|
1634
|
+
IOException_init_$Init$($this);
|
|
1635
|
+
EOFException.call($this);
|
|
1636
|
+
return $this;
|
|
1637
|
+
}
|
|
1638
|
+
function EOFException_init_$Create$() {
|
|
1639
|
+
var tmp = EOFException_init_$Init$(objectCreate(protoOf(EOFException)));
|
|
1640
|
+
captureStack(tmp, EOFException_init_$Create$);
|
|
1641
|
+
return tmp;
|
|
1642
|
+
}
|
|
1643
|
+
function EOFException_init_$Init$_0(message, $this) {
|
|
1644
|
+
IOException_init_$Init$_0(message, $this);
|
|
1645
|
+
EOFException.call($this);
|
|
1646
|
+
return $this;
|
|
1647
|
+
}
|
|
1648
|
+
function EOFException_init_$Create$_0(message) {
|
|
1649
|
+
var tmp = EOFException_init_$Init$_0(message, objectCreate(protoOf(EOFException)));
|
|
1650
|
+
captureStack(tmp, EOFException_init_$Create$_0);
|
|
1651
|
+
return tmp;
|
|
1652
|
+
}
|
|
1653
|
+
function EOFException() {
|
|
1654
|
+
captureStack(this, EOFException);
|
|
1655
|
+
}
|
|
1656
|
+
function SegmentPool() {
|
|
1657
|
+
this.o45_1 = 0;
|
|
1658
|
+
this.p45_1 = 0;
|
|
1659
|
+
}
|
|
1660
|
+
protoOf(SegmentPool).q45 = function () {
|
|
1661
|
+
return Companion_instance.k46();
|
|
1662
|
+
};
|
|
1663
|
+
protoOf(SegmentPool).a46 = function (segment) {
|
|
1664
|
+
};
|
|
1665
|
+
protoOf(SegmentPool).n46 = function () {
|
|
1666
|
+
return AlwaysSharedCopyTracker_getInstance();
|
|
1667
|
+
};
|
|
1668
|
+
var SegmentPool_instance;
|
|
1669
|
+
function SegmentPool_getInstance() {
|
|
1670
|
+
return SegmentPool_instance;
|
|
1671
|
+
}
|
|
1672
|
+
function get_path() {
|
|
1673
|
+
_init_properties_nodeModulesJs_kt__ngjjzw();
|
|
1674
|
+
// Inline function 'kotlin.getValue' call
|
|
1675
|
+
var this_0 = path$delegate;
|
|
1676
|
+
path$factory();
|
|
1677
|
+
return this_0.b1();
|
|
1678
|
+
}
|
|
1679
|
+
var path$delegate;
|
|
1680
|
+
function get_fs() {
|
|
1681
|
+
_init_properties_nodeModulesJs_kt__ngjjzw();
|
|
1682
|
+
// Inline function 'kotlin.getValue' call
|
|
1683
|
+
var this_0 = fs$delegate;
|
|
1684
|
+
fs$factory();
|
|
1685
|
+
return this_0.b1();
|
|
1686
|
+
}
|
|
1687
|
+
var fs$delegate;
|
|
1688
|
+
function get_os() {
|
|
1689
|
+
_init_properties_nodeModulesJs_kt__ngjjzw();
|
|
1690
|
+
// Inline function 'kotlin.getValue' call
|
|
1691
|
+
var this_0 = os$delegate;
|
|
1692
|
+
os$factory();
|
|
1693
|
+
return this_0.b1();
|
|
1694
|
+
}
|
|
1695
|
+
var os$delegate;
|
|
1696
|
+
function get_buffer() {
|
|
1697
|
+
_init_properties_nodeModulesJs_kt__ngjjzw();
|
|
1698
|
+
// Inline function 'kotlin.getValue' call
|
|
1699
|
+
var this_0 = buffer$delegate;
|
|
1700
|
+
buffer$factory();
|
|
1701
|
+
return this_0.b1();
|
|
1702
|
+
}
|
|
1703
|
+
var buffer$delegate;
|
|
1704
|
+
function path$delegate$lambda() {
|
|
1705
|
+
_init_properties_nodeModulesJs_kt__ngjjzw();
|
|
1706
|
+
var tmp;
|
|
1707
|
+
try {
|
|
1708
|
+
tmp = eval('require')('path');
|
|
1709
|
+
} catch ($p) {
|
|
1710
|
+
var tmp_0;
|
|
1711
|
+
if ($p instanceof Error) {
|
|
1712
|
+
var e = $p;
|
|
1713
|
+
throw UnsupportedOperationException_init_$Create$("Module 'path' could not be imported", e);
|
|
1714
|
+
} else {
|
|
1715
|
+
throw $p;
|
|
1716
|
+
}
|
|
1717
|
+
}
|
|
1718
|
+
return tmp;
|
|
1719
|
+
}
|
|
1720
|
+
function fs$delegate$lambda() {
|
|
1721
|
+
_init_properties_nodeModulesJs_kt__ngjjzw();
|
|
1722
|
+
var tmp;
|
|
1723
|
+
try {
|
|
1724
|
+
tmp = eval('require')('fs');
|
|
1725
|
+
} catch ($p) {
|
|
1726
|
+
var tmp_0;
|
|
1727
|
+
if ($p instanceof Error) {
|
|
1728
|
+
var e = $p;
|
|
1729
|
+
throw UnsupportedOperationException_init_$Create$("Module 'fs' could not be imported", e);
|
|
1730
|
+
} else {
|
|
1731
|
+
throw $p;
|
|
1732
|
+
}
|
|
1733
|
+
}
|
|
1734
|
+
return tmp;
|
|
1735
|
+
}
|
|
1736
|
+
function os$delegate$lambda() {
|
|
1737
|
+
_init_properties_nodeModulesJs_kt__ngjjzw();
|
|
1738
|
+
var tmp;
|
|
1739
|
+
try {
|
|
1740
|
+
tmp = eval('require')('os');
|
|
1741
|
+
} catch ($p) {
|
|
1742
|
+
var tmp_0;
|
|
1743
|
+
if ($p instanceof Error) {
|
|
1744
|
+
var e = $p;
|
|
1745
|
+
throw UnsupportedOperationException_init_$Create$("Module 'os' could not be imported", e);
|
|
1746
|
+
} else {
|
|
1747
|
+
throw $p;
|
|
1748
|
+
}
|
|
1749
|
+
}
|
|
1750
|
+
return tmp;
|
|
1751
|
+
}
|
|
1752
|
+
function buffer$delegate$lambda() {
|
|
1753
|
+
_init_properties_nodeModulesJs_kt__ngjjzw();
|
|
1754
|
+
var tmp;
|
|
1755
|
+
try {
|
|
1756
|
+
tmp = eval('require')('buffer');
|
|
1757
|
+
} catch ($p) {
|
|
1758
|
+
var tmp_0;
|
|
1759
|
+
if ($p instanceof Error) {
|
|
1760
|
+
var e = $p;
|
|
1761
|
+
throw UnsupportedOperationException_init_$Create$("Module 'buffer' could not be imported", e);
|
|
1762
|
+
} else {
|
|
1763
|
+
throw $p;
|
|
1764
|
+
}
|
|
1765
|
+
}
|
|
1766
|
+
return tmp;
|
|
1767
|
+
}
|
|
1768
|
+
function path$factory() {
|
|
1769
|
+
return getPropertyCallableRef('path', 0, KProperty0, function () {
|
|
1770
|
+
return get_path();
|
|
1771
|
+
}, null);
|
|
1772
|
+
}
|
|
1773
|
+
function fs$factory() {
|
|
1774
|
+
return getPropertyCallableRef('fs', 0, KProperty0, function () {
|
|
1775
|
+
return get_fs();
|
|
1776
|
+
}, null);
|
|
1777
|
+
}
|
|
1778
|
+
function os$factory() {
|
|
1779
|
+
return getPropertyCallableRef('os', 0, KProperty0, function () {
|
|
1780
|
+
return get_os();
|
|
1781
|
+
}, null);
|
|
1782
|
+
}
|
|
1783
|
+
function buffer$factory() {
|
|
1784
|
+
return getPropertyCallableRef('buffer', 0, KProperty0, function () {
|
|
1785
|
+
return get_buffer();
|
|
1786
|
+
}, null);
|
|
1787
|
+
}
|
|
1788
|
+
var properties_initialized_nodeModulesJs_kt_oooz8e;
|
|
1789
|
+
function _init_properties_nodeModulesJs_kt__ngjjzw() {
|
|
1790
|
+
if (!properties_initialized_nodeModulesJs_kt_oooz8e) {
|
|
1791
|
+
properties_initialized_nodeModulesJs_kt_oooz8e = true;
|
|
1792
|
+
path$delegate = lazy(path$delegate$lambda);
|
|
1793
|
+
fs$delegate = lazy(fs$delegate$lambda);
|
|
1794
|
+
os$delegate = lazy(os$delegate$lambda);
|
|
1795
|
+
buffer$delegate = lazy(buffer$delegate$lambda);
|
|
1796
|
+
}
|
|
1797
|
+
}
|
|
1798
|
+
function get_SystemFileSystem() {
|
|
1799
|
+
_init_properties_FileSystemNodeJs_kt__m4c3u();
|
|
1800
|
+
return SystemFileSystem;
|
|
1801
|
+
}
|
|
1802
|
+
var SystemFileSystem;
|
|
1803
|
+
function get_isWindows() {
|
|
1804
|
+
_init_properties_FileSystemNodeJs_kt__m4c3u();
|
|
1805
|
+
return isWindows;
|
|
1806
|
+
}
|
|
1807
|
+
var isWindows;
|
|
1808
|
+
function FileNotFoundException(message) {
|
|
1809
|
+
IOException_init_$Init$_0(message, this);
|
|
1810
|
+
captureStack(this, FileNotFoundException);
|
|
1811
|
+
}
|
|
1812
|
+
function SystemFileSystem$o$metadataOrNull$lambda($path, $metadata) {
|
|
1813
|
+
return function () {
|
|
1814
|
+
var tmp0_elvis_lhs = get_fs().statSync($path.k47_1);
|
|
1815
|
+
var tmp;
|
|
1816
|
+
if (tmp0_elvis_lhs == null) {
|
|
1817
|
+
return Unit_instance;
|
|
1818
|
+
} else {
|
|
1819
|
+
tmp = tmp0_elvis_lhs;
|
|
1820
|
+
}
|
|
1821
|
+
var stat = tmp;
|
|
1822
|
+
var mode = stat.mode;
|
|
1823
|
+
var isFile = (mode & get_fs().constants.S_IFMT) === get_fs().constants.S_IFREG;
|
|
1824
|
+
$metadata._v = new FileMetadata(isFile, (mode & get_fs().constants.S_IFMT) === get_fs().constants.S_IFDIR, isFile ? toLong(stat.size) : new Long(-1, -1));
|
|
1825
|
+
return Unit_instance;
|
|
1826
|
+
};
|
|
1827
|
+
}
|
|
1828
|
+
function SystemFileSystem$1() {
|
|
1829
|
+
SystemFileSystemImpl.call(this);
|
|
1830
|
+
}
|
|
1831
|
+
protoOf(SystemFileSystem$1).a47 = function (path) {
|
|
1832
|
+
return get_fs().existsSync(path.k47_1);
|
|
1833
|
+
};
|
|
1834
|
+
protoOf(SystemFileSystem$1).b47 = function (path, mustCreate) {
|
|
1835
|
+
var metadata = this.f47(path);
|
|
1836
|
+
if (!(metadata == null)) {
|
|
1837
|
+
if (mustCreate) {
|
|
1838
|
+
throw IOException_init_$Create$_0('Path already exists: ' + path.toString());
|
|
1839
|
+
}
|
|
1840
|
+
if (metadata.h47_1) {
|
|
1841
|
+
throw IOException_init_$Create$_0("Path already exists and it's a file: " + path.toString());
|
|
1842
|
+
}
|
|
1843
|
+
return Unit_instance;
|
|
1844
|
+
}
|
|
1845
|
+
// Inline function 'kotlin.collections.arrayListOf' call
|
|
1846
|
+
var parts = ArrayList_init_$Create$();
|
|
1847
|
+
var p = path;
|
|
1848
|
+
while (!(p == null) && !this.a47(p)) {
|
|
1849
|
+
parts.e(p.toString());
|
|
1850
|
+
p = p.l47();
|
|
1851
|
+
}
|
|
1852
|
+
// Inline function 'kotlin.collections.forEach' call
|
|
1853
|
+
var tmp0_iterator = asReversed(parts).g();
|
|
1854
|
+
while (tmp0_iterator.h()) {
|
|
1855
|
+
var element = tmp0_iterator.i();
|
|
1856
|
+
// Inline function 'kotlinx.io.files.<no name provided>.createDirectories.<anonymous>' call
|
|
1857
|
+
get_fs().mkdirSync(element);
|
|
1858
|
+
}
|
|
1859
|
+
};
|
|
1860
|
+
protoOf(SystemFileSystem$1).f47 = function (path) {
|
|
1861
|
+
if (!this.a47(path))
|
|
1862
|
+
return null;
|
|
1863
|
+
var metadata = {_v: null};
|
|
1864
|
+
var tmp2_safe_receiver = withCaughtException(SystemFileSystem$o$metadataOrNull$lambda(path, metadata));
|
|
1865
|
+
if (tmp2_safe_receiver == null)
|
|
1866
|
+
null;
|
|
1867
|
+
else {
|
|
1868
|
+
// Inline function 'kotlin.also' call
|
|
1869
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1870
|
+
// Inline function 'kotlinx.io.files.<no name provided>.metadataOrNull.<anonymous>' call
|
|
1871
|
+
throw IOException_init_$Create$_1('Stat failed for ' + path.toString(), tmp2_safe_receiver);
|
|
1872
|
+
}
|
|
1873
|
+
return metadata._v;
|
|
1874
|
+
};
|
|
1875
|
+
protoOf(SystemFileSystem$1).c47 = function (path) {
|
|
1876
|
+
return new FileSource(path);
|
|
1877
|
+
};
|
|
1878
|
+
protoOf(SystemFileSystem$1).d47 = function (path, append) {
|
|
1879
|
+
return new FileSink(path, append);
|
|
1880
|
+
};
|
|
1881
|
+
protoOf(SystemFileSystem$1).g47 = function (directory) {
|
|
1882
|
+
var tmp0_elvis_lhs = this.f47(directory);
|
|
1883
|
+
var tmp;
|
|
1884
|
+
if (tmp0_elvis_lhs == null) {
|
|
1885
|
+
throw new FileNotFoundException(directory.k47_1);
|
|
1886
|
+
} else {
|
|
1887
|
+
tmp = tmp0_elvis_lhs;
|
|
1888
|
+
}
|
|
1889
|
+
var metadata = tmp;
|
|
1890
|
+
if (!metadata.i47_1)
|
|
1891
|
+
throw IOException_init_$Create$_0('Not a directory: ' + directory.k47_1);
|
|
1892
|
+
var tmp1_elvis_lhs = get_fs().opendirSync(directory.k47_1);
|
|
1893
|
+
var tmp_0;
|
|
1894
|
+
if (tmp1_elvis_lhs == null) {
|
|
1895
|
+
throw IOException_init_$Create$_0('Unable to read directory: ' + directory.k47_1);
|
|
1896
|
+
} else {
|
|
1897
|
+
tmp_0 = tmp1_elvis_lhs;
|
|
1898
|
+
}
|
|
1899
|
+
var dir = tmp_0;
|
|
1900
|
+
try {
|
|
1901
|
+
// Inline function 'kotlin.collections.buildList' call
|
|
1902
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1903
|
+
// Inline function 'kotlin.collections.buildListInternal' call
|
|
1904
|
+
// Inline function 'kotlin.apply' call
|
|
1905
|
+
var this_0 = ArrayList_init_$Create$();
|
|
1906
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1907
|
+
// Inline function 'kotlinx.io.files.<no name provided>.list.<anonymous>' call
|
|
1908
|
+
var child = dir.readSync();
|
|
1909
|
+
while (!(child == null)) {
|
|
1910
|
+
this_0.e(Path(directory, [child.name]));
|
|
1911
|
+
child = dir.readSync();
|
|
1912
|
+
}
|
|
1913
|
+
return this_0.p5();
|
|
1914
|
+
}finally {
|
|
1915
|
+
dir.closeSync();
|
|
1916
|
+
}
|
|
1917
|
+
};
|
|
1918
|
+
var properties_initialized_FileSystemNodeJs_kt_vmmd20;
|
|
1919
|
+
function _init_properties_FileSystemNodeJs_kt__m4c3u() {
|
|
1920
|
+
if (!properties_initialized_FileSystemNodeJs_kt_vmmd20) {
|
|
1921
|
+
properties_initialized_FileSystemNodeJs_kt_vmmd20 = true;
|
|
1922
|
+
SystemFileSystem = new SystemFileSystem$1();
|
|
1923
|
+
isWindows = get_os().platform() === 'win32';
|
|
1924
|
+
}
|
|
1925
|
+
}
|
|
1926
|
+
function get_SystemPathSeparator() {
|
|
1927
|
+
_init_properties_PathsNodeJs_kt__bvvvsp();
|
|
1928
|
+
// Inline function 'kotlin.getValue' call
|
|
1929
|
+
var this_0 = SystemPathSeparator$delegate;
|
|
1930
|
+
SystemPathSeparator$factory();
|
|
1931
|
+
return this_0.b1().x_1;
|
|
1932
|
+
}
|
|
1933
|
+
var SystemPathSeparator$delegate;
|
|
1934
|
+
function Path_1(rawPath, any) {
|
|
1935
|
+
this.k47_1 = removeTrailingSeparators(rawPath);
|
|
1936
|
+
}
|
|
1937
|
+
protoOf(Path_1).l47 = function () {
|
|
1938
|
+
// Inline function 'kotlin.text.isEmpty' call
|
|
1939
|
+
var this_0 = this.k47_1;
|
|
1940
|
+
if (charSequenceLength(this_0) === 0)
|
|
1941
|
+
return null;
|
|
1942
|
+
if (get_isWindows()) {
|
|
1943
|
+
if (!contains(this.k47_1, _Char___init__impl__6a9atx(47)) && !contains(this.k47_1, _Char___init__impl__6a9atx(92))) {
|
|
1944
|
+
return null;
|
|
1945
|
+
}
|
|
1946
|
+
} else if (!contains(this.k47_1, get_SystemPathSeparator())) {
|
|
1947
|
+
return null;
|
|
1948
|
+
}
|
|
1949
|
+
var p = get_path().dirname(this.k47_1);
|
|
1950
|
+
var tmp;
|
|
1951
|
+
// Inline function 'kotlin.text.isEmpty' call
|
|
1952
|
+
if (charSequenceLength(p) === 0) {
|
|
1953
|
+
tmp = null;
|
|
1954
|
+
} else {
|
|
1955
|
+
if (p === this.k47_1) {
|
|
1956
|
+
tmp = null;
|
|
1957
|
+
} else {
|
|
1958
|
+
tmp = Path_2(p);
|
|
1959
|
+
}
|
|
1960
|
+
}
|
|
1961
|
+
return tmp;
|
|
1962
|
+
};
|
|
1963
|
+
protoOf(Path_1).r2 = function () {
|
|
1964
|
+
// Inline function 'kotlin.text.isEmpty' call
|
|
1965
|
+
var this_0 = this.k47_1;
|
|
1966
|
+
if (charSequenceLength(this_0) === 0)
|
|
1967
|
+
return '';
|
|
1968
|
+
var p = get_path().basename(this.k47_1);
|
|
1969
|
+
var tmp;
|
|
1970
|
+
// Inline function 'kotlin.text.isEmpty' call
|
|
1971
|
+
if (charSequenceLength(p) === 0) {
|
|
1972
|
+
tmp = '';
|
|
1973
|
+
} else {
|
|
1974
|
+
tmp = p;
|
|
1975
|
+
}
|
|
1976
|
+
return tmp;
|
|
1977
|
+
};
|
|
1978
|
+
protoOf(Path_1).toString = function () {
|
|
1979
|
+
return this.k47_1;
|
|
1980
|
+
};
|
|
1981
|
+
protoOf(Path_1).equals = function (other) {
|
|
1982
|
+
if (this === other)
|
|
1983
|
+
return true;
|
|
1984
|
+
if (!(other instanceof Path_1))
|
|
1985
|
+
return false;
|
|
1986
|
+
return this.k47_1 === other.k47_1;
|
|
1987
|
+
};
|
|
1988
|
+
protoOf(Path_1).hashCode = function () {
|
|
1989
|
+
return getStringHashCode(this.k47_1);
|
|
1990
|
+
};
|
|
1991
|
+
function open($this, path) {
|
|
1992
|
+
if (!get_fs().existsSync(path.k47_1)) {
|
|
1993
|
+
throw new FileNotFoundException('File does not exist: ' + path.k47_1);
|
|
1994
|
+
}
|
|
1995
|
+
var fd = {_v: -1};
|
|
1996
|
+
var tmp3_safe_receiver = withCaughtException(FileSource$open$lambda(fd, path));
|
|
1997
|
+
if (tmp3_safe_receiver == null)
|
|
1998
|
+
null;
|
|
1999
|
+
else {
|
|
2000
|
+
// Inline function 'kotlin.also' call
|
|
2001
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
2002
|
+
// Inline function 'kotlinx.io.files.FileSource.open.<anonymous>' call
|
|
2003
|
+
throw IOException_init_$Create$_1('Failed to open a file ' + path.k47_1 + '.', tmp3_safe_receiver);
|
|
2004
|
+
}
|
|
2005
|
+
if (fd._v < 0)
|
|
2006
|
+
throw IOException_init_$Create$_0('Failed to open a file ' + path.k47_1 + '.');
|
|
2007
|
+
return fd._v;
|
|
2008
|
+
}
|
|
2009
|
+
function FileSource$open$lambda($fd, $path) {
|
|
2010
|
+
return function () {
|
|
2011
|
+
$fd._v = get_fs().openSync($path.k47_1, 'r');
|
|
2012
|
+
return Unit_instance;
|
|
2013
|
+
};
|
|
2014
|
+
}
|
|
2015
|
+
function FileSource$readAtMostTo$lambda(this$0) {
|
|
2016
|
+
return function () {
|
|
2017
|
+
this$0.n47_1 = get_fs().readFileSync(this$0.q47_1, null);
|
|
2018
|
+
return Unit_instance;
|
|
2019
|
+
};
|
|
2020
|
+
}
|
|
2021
|
+
function FileSource(path) {
|
|
2022
|
+
this.m47_1 = path;
|
|
2023
|
+
this.n47_1 = null;
|
|
2024
|
+
this.o47_1 = false;
|
|
2025
|
+
this.p47_1 = 0;
|
|
2026
|
+
this.q47_1 = open(this, this.m47_1);
|
|
2027
|
+
}
|
|
2028
|
+
protoOf(FileSource).l45 = function (sink, byteCount) {
|
|
2029
|
+
// Inline function 'kotlin.check' call
|
|
2030
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
2031
|
+
if (!!this.o47_1) {
|
|
2032
|
+
// Inline function 'kotlinx.io.files.FileSource.readAtMostTo.<anonymous>' call
|
|
2033
|
+
var message = 'Source is closed.';
|
|
2034
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
2035
|
+
}
|
|
2036
|
+
if (byteCount.equals(new Long(0, 0))) {
|
|
2037
|
+
return new Long(0, 0);
|
|
2038
|
+
}
|
|
2039
|
+
if (this.n47_1 === null) {
|
|
2040
|
+
var tmp4_safe_receiver = withCaughtException(FileSource$readAtMostTo$lambda(this));
|
|
2041
|
+
if (tmp4_safe_receiver == null)
|
|
2042
|
+
null;
|
|
2043
|
+
else {
|
|
2044
|
+
// Inline function 'kotlin.also' call
|
|
2045
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
2046
|
+
// Inline function 'kotlinx.io.files.FileSource.readAtMostTo.<anonymous>' call
|
|
2047
|
+
throw IOException_init_$Create$_1('Failed to read data from ' + this.m47_1.k47_1, tmp4_safe_receiver);
|
|
2048
|
+
}
|
|
2049
|
+
}
|
|
2050
|
+
var len = ensureNotNull(this.n47_1).length;
|
|
2051
|
+
if (this.p47_1 >= len) {
|
|
2052
|
+
return new Long(-1, -1);
|
|
2053
|
+
}
|
|
2054
|
+
// Inline function 'kotlinx.io.minOf' call
|
|
2055
|
+
var b = len - this.p47_1 | 0;
|
|
2056
|
+
// Inline function 'kotlin.comparisons.minOf' call
|
|
2057
|
+
var b_0 = toLong(b);
|
|
2058
|
+
var bytesToRead = byteCount.j1(b_0) <= 0 ? byteCount : b_0;
|
|
2059
|
+
var inductionVariable = new Long(0, 0);
|
|
2060
|
+
if (inductionVariable.j1(bytesToRead) < 0)
|
|
2061
|
+
do {
|
|
2062
|
+
var i = inductionVariable;
|
|
2063
|
+
inductionVariable = inductionVariable.y2(new Long(1, 0));
|
|
2064
|
+
var tmp = ensureNotNull(this.n47_1);
|
|
2065
|
+
var _unary__edvuaz = this.p47_1;
|
|
2066
|
+
this.p47_1 = _unary__edvuaz + 1 | 0;
|
|
2067
|
+
sink.x45(tmp.readInt8(_unary__edvuaz));
|
|
2068
|
+
}
|
|
2069
|
+
while (inductionVariable.j1(bytesToRead) < 0);
|
|
2070
|
+
return bytesToRead;
|
|
2071
|
+
};
|
|
2072
|
+
function open_0($this, path, append) {
|
|
2073
|
+
var flags = append ? 'a' : 'w';
|
|
2074
|
+
var fd = {_v: -1};
|
|
2075
|
+
var tmp5_safe_receiver = withCaughtException(FileSink$open$lambda(fd, path, flags));
|
|
2076
|
+
if (tmp5_safe_receiver == null)
|
|
2077
|
+
null;
|
|
2078
|
+
else {
|
|
2079
|
+
// Inline function 'kotlin.also' call
|
|
2080
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
2081
|
+
// Inline function 'kotlinx.io.files.FileSink.open.<anonymous>' call
|
|
2082
|
+
throw IOException_init_$Create$_1('Failed to open a file ' + path.k47_1 + '.', tmp5_safe_receiver);
|
|
2083
|
+
}
|
|
2084
|
+
if (fd._v < 0)
|
|
2085
|
+
throw IOException_init_$Create$_0('Failed to open a file ' + path.k47_1 + '.');
|
|
2086
|
+
return fd._v;
|
|
2087
|
+
}
|
|
2088
|
+
function FileSink$open$lambda($fd, $path, $flags) {
|
|
2089
|
+
return function () {
|
|
2090
|
+
$fd._v = get_fs().openSync($path.k47_1, $flags);
|
|
2091
|
+
return Unit_instance;
|
|
2092
|
+
};
|
|
2093
|
+
}
|
|
2094
|
+
function FileSink$write$lambda(this$0, $buf) {
|
|
2095
|
+
return function () {
|
|
2096
|
+
get_fs().writeFileSync(this$0.s47_1, $buf);
|
|
2097
|
+
return Unit_instance;
|
|
2098
|
+
};
|
|
2099
|
+
}
|
|
2100
|
+
function FileSink(path, append) {
|
|
2101
|
+
this.r47_1 = false;
|
|
2102
|
+
this.s47_1 = open_0(this, path, append);
|
|
2103
|
+
}
|
|
2104
|
+
protoOf(FileSink).m45 = function (source, byteCount) {
|
|
2105
|
+
// Inline function 'kotlin.check' call
|
|
2106
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
2107
|
+
if (!!this.r47_1) {
|
|
2108
|
+
// Inline function 'kotlinx.io.files.FileSink.write.<anonymous>' call
|
|
2109
|
+
var message = 'Sink is closed.';
|
|
2110
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
2111
|
+
}
|
|
2112
|
+
if (byteCount.equals(new Long(0, 0))) {
|
|
2113
|
+
return Unit_instance;
|
|
2114
|
+
}
|
|
2115
|
+
// Inline function 'kotlin.comparisons.minOf' call
|
|
2116
|
+
var b = source.j();
|
|
2117
|
+
var remainingBytes = byteCount.j1(b) <= 0 ? byteCount : b;
|
|
2118
|
+
while (remainingBytes.j1(new Long(0, 0)) > 0) {
|
|
2119
|
+
var segmentBytes = 0;
|
|
2120
|
+
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.readFromHead' call
|
|
2121
|
+
// Inline function 'kotlin.require' call
|
|
2122
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
2123
|
+
if (!!source.v44()) {
|
|
2124
|
+
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.readFromHead.<anonymous>' call
|
|
2125
|
+
var message_0 = 'Buffer is empty';
|
|
2126
|
+
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
2127
|
+
}
|
|
2128
|
+
var head = ensureNotNull(source.r44_1);
|
|
2129
|
+
// Inline function 'kotlinx.io.files.FileSink.write.<anonymous>' call
|
|
2130
|
+
var headData = head.q46(true);
|
|
2131
|
+
var headPos = head.b45_1;
|
|
2132
|
+
segmentBytes = head.c45_1 - headPos | 0;
|
|
2133
|
+
var buf = get_buffer().Buffer.allocUnsafe(segmentBytes);
|
|
2134
|
+
var inductionVariable = 0;
|
|
2135
|
+
var last = segmentBytes;
|
|
2136
|
+
if (inductionVariable < last)
|
|
2137
|
+
do {
|
|
2138
|
+
var offset = inductionVariable;
|
|
2139
|
+
inductionVariable = inductionVariable + 1 | 0;
|
|
2140
|
+
buf.writeInt8(headData[headPos + offset | 0], offset);
|
|
2141
|
+
}
|
|
2142
|
+
while (inductionVariable < last);
|
|
2143
|
+
var tmp6_safe_receiver = withCaughtException(FileSink$write$lambda(this, buf));
|
|
2144
|
+
if (tmp6_safe_receiver == null)
|
|
2145
|
+
null;
|
|
2146
|
+
else {
|
|
2147
|
+
// Inline function 'kotlin.also' call
|
|
2148
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
2149
|
+
// Inline function 'kotlinx.io.files.FileSink.write.<anonymous>.<anonymous>' call
|
|
2150
|
+
throw IOException_init_$Create$_1('Write failed', tmp6_safe_receiver);
|
|
2151
|
+
}
|
|
2152
|
+
var bytesRead = segmentBytes;
|
|
2153
|
+
if (!(bytesRead === 0)) {
|
|
2154
|
+
if (bytesRead < 0)
|
|
2155
|
+
throw IllegalStateException_init_$Create$('Returned negative read bytes count');
|
|
2156
|
+
if (bytesRead > head.j())
|
|
2157
|
+
throw IllegalStateException_init_$Create$('Returned too many bytes');
|
|
2158
|
+
source.h45(toLong(bytesRead));
|
|
2159
|
+
}
|
|
2160
|
+
// Inline function 'kotlin.Long.minus' call
|
|
2161
|
+
var this_0 = remainingBytes;
|
|
2162
|
+
var other = segmentBytes;
|
|
2163
|
+
remainingBytes = this_0.z2(toLong(other));
|
|
2164
|
+
}
|
|
2165
|
+
};
|
|
2166
|
+
protoOf(FileSink).o8 = function () {
|
|
2167
|
+
return Unit_instance;
|
|
2168
|
+
};
|
|
2169
|
+
function Path_2(path) {
|
|
2170
|
+
_init_properties_PathsNodeJs_kt__bvvvsp();
|
|
2171
|
+
return new Path_1(path, null);
|
|
2172
|
+
}
|
|
2173
|
+
function SystemPathSeparator$delegate$lambda() {
|
|
2174
|
+
_init_properties_PathsNodeJs_kt__bvvvsp();
|
|
2175
|
+
var sep = get_path().sep;
|
|
2176
|
+
// Inline function 'kotlin.check' call
|
|
2177
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
2178
|
+
// Inline function 'kotlin.check' call
|
|
2179
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
2180
|
+
if (!(sep.length === 1)) {
|
|
2181
|
+
// Inline function 'kotlin.check.<anonymous>' call
|
|
2182
|
+
var message = 'Check failed.';
|
|
2183
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
2184
|
+
}
|
|
2185
|
+
return new Char(charSequenceGet(sep, 0));
|
|
2186
|
+
}
|
|
2187
|
+
function SystemPathSeparator$factory() {
|
|
2188
|
+
return getPropertyCallableRef('SystemPathSeparator', 0, KProperty0, function () {
|
|
2189
|
+
return new Char(get_SystemPathSeparator());
|
|
2190
|
+
}, null);
|
|
2191
|
+
}
|
|
2192
|
+
var properties_initialized_PathsNodeJs_kt_2u5gc7;
|
|
2193
|
+
function _init_properties_PathsNodeJs_kt__bvvvsp() {
|
|
2194
|
+
if (!properties_initialized_PathsNodeJs_kt_2u5gc7) {
|
|
2195
|
+
properties_initialized_PathsNodeJs_kt_2u5gc7 = true;
|
|
2196
|
+
SystemPathSeparator$delegate = lazy(SystemPathSeparator$delegate$lambda);
|
|
2197
|
+
}
|
|
2198
|
+
}
|
|
2199
|
+
//region block: post-declaration
|
|
2200
|
+
protoOf(SystemFileSystemImpl).e47 = sink$default;
|
|
2201
|
+
//endregion
|
|
2202
|
+
//region block: init
|
|
2203
|
+
Companion_instance = new Companion();
|
|
2204
|
+
UnsafeBufferOperations_instance = new UnsafeBufferOperations();
|
|
2205
|
+
SegmentPool_instance = new SegmentPool();
|
|
2206
|
+
//endregion
|
|
2207
|
+
//region block: exports
|
|
2208
|
+
_.$_$ = _.$_$ || {};
|
|
2209
|
+
_.$_$.a = Path_2;
|
|
2210
|
+
_.$_$.b = get_SystemFileSystem;
|
|
2211
|
+
_.$_$.c = buffered_0;
|
|
2212
|
+
_.$_$.d = buffered;
|
|
2213
|
+
_.$_$.e = readString;
|
|
2214
|
+
_.$_$.f = writeString;
|
|
2215
|
+
//endregion
|
|
2216
|
+
return _;
|
|
2217
|
+
}));
|
|
2218
|
+
|
|
2219
|
+
//# sourceMappingURL=kotlinx-io-kotlinx-io-core.js.map
|