@uwdata/mosaic-inputs 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mosaic-inputs.js +789 -485
- package/dist/mosaic-inputs.min.js +4 -4
- package/package.json +4 -4
- package/src/Menu.js +5 -1
- package/src/Search.js +6 -2
- package/src/Slider.js +5 -1
- package/src/Table.js +20 -13
- package/src/index.js +4 -4
- package/src/input.js +7 -0
package/dist/mosaic-inputs.js
CHANGED
|
@@ -131,7 +131,7 @@ function __asyncValues(o) {
|
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
-
//
|
|
134
|
+
// ../../node_modules/apache-arrow/util/buffer.mjs
|
|
135
135
|
var buffer_exports = {};
|
|
136
136
|
__export(buffer_exports, {
|
|
137
137
|
compareArrayLike: () => compareArrayLike,
|
|
@@ -172,13 +172,28 @@ __export(buffer_exports, {
|
|
|
172
172
|
toUint8ClampedArrayIterator: () => toUint8ClampedArrayIterator
|
|
173
173
|
});
|
|
174
174
|
|
|
175
|
-
//
|
|
175
|
+
// ../../node_modules/apache-arrow/util/utf8.mjs
|
|
176
176
|
var decoder = new TextDecoder("utf-8");
|
|
177
177
|
var decodeUtf8 = (buffer) => decoder.decode(buffer);
|
|
178
178
|
var encoder = new TextEncoder();
|
|
179
179
|
var encodeUtf8 = (value) => encoder.encode(value);
|
|
180
180
|
|
|
181
|
-
//
|
|
181
|
+
// ../../node_modules/apache-arrow/util/compat.mjs
|
|
182
|
+
var [BigIntCtor, BigIntAvailable] = (() => {
|
|
183
|
+
const BigIntUnavailableError = () => {
|
|
184
|
+
throw new Error("BigInt is not available in this environment");
|
|
185
|
+
};
|
|
186
|
+
function BigIntUnavailable() {
|
|
187
|
+
throw BigIntUnavailableError();
|
|
188
|
+
}
|
|
189
|
+
BigIntUnavailable.asIntN = () => {
|
|
190
|
+
throw BigIntUnavailableError();
|
|
191
|
+
};
|
|
192
|
+
BigIntUnavailable.asUintN = () => {
|
|
193
|
+
throw BigIntUnavailableError();
|
|
194
|
+
};
|
|
195
|
+
return typeof BigInt !== "undefined" ? [BigInt, true] : [BigIntUnavailable, false];
|
|
196
|
+
})();
|
|
182
197
|
var [BigInt64ArrayCtor, BigInt64ArrayAvailable] = (() => {
|
|
183
198
|
const BigInt64ArrayUnavailableError = () => {
|
|
184
199
|
throw new Error("BigInt64Array is not available in this environment");
|
|
@@ -261,7 +276,7 @@ var isFlatbuffersByteBuffer = (x) => {
|
|
|
261
276
|
return isObject(x) && isFunction(x["clear"]) && isFunction(x["bytes"]) && isFunction(x["position"]) && isFunction(x["setPosition"]) && isFunction(x["capacity"]) && isFunction(x["getBufferIdentifier"]) && isFunction(x["createLong"]);
|
|
262
277
|
};
|
|
263
278
|
|
|
264
|
-
//
|
|
279
|
+
// ../../node_modules/apache-arrow/util/buffer.mjs
|
|
265
280
|
var SharedArrayBuf = typeof SharedArrayBuffer !== "undefined" ? SharedArrayBuffer : ArrayBuffer;
|
|
266
281
|
function collapseContiguousByteRanges(chunks) {
|
|
267
282
|
const result = chunks[0] ? [chunks[0]] : [];
|
|
@@ -313,8 +328,8 @@ function joinUint8Arrays(chunks, size) {
|
|
|
313
328
|
}
|
|
314
329
|
return [buffer || new Uint8Array(0), result.slice(index), byteLength - (buffer ? buffer.byteLength : 0)];
|
|
315
330
|
}
|
|
316
|
-
function toArrayBufferView(ArrayBufferViewCtor,
|
|
317
|
-
let value = isIteratorResult(
|
|
331
|
+
function toArrayBufferView(ArrayBufferViewCtor, input2) {
|
|
332
|
+
let value = isIteratorResult(input2) ? input2.value : input2;
|
|
318
333
|
if (value instanceof ArrayBufferViewCtor) {
|
|
319
334
|
if (ArrayBufferViewCtor === Uint8Array) {
|
|
320
335
|
return new ArrayBufferViewCtor(value.buffer, value.byteOffset, value.byteLength);
|
|
@@ -338,17 +353,17 @@ function toArrayBufferView(ArrayBufferViewCtor, input) {
|
|
|
338
353
|
}
|
|
339
354
|
return !ArrayBuffer.isView(value) ? ArrayBufferViewCtor.from(value) : value.byteLength <= 0 ? new ArrayBufferViewCtor(0) : new ArrayBufferViewCtor(value.buffer, value.byteOffset, value.byteLength / ArrayBufferViewCtor.BYTES_PER_ELEMENT);
|
|
340
355
|
}
|
|
341
|
-
var toInt8Array = (
|
|
342
|
-
var toInt16Array = (
|
|
343
|
-
var toInt32Array = (
|
|
344
|
-
var toBigInt64Array = (
|
|
345
|
-
var toUint8Array = (
|
|
346
|
-
var toUint16Array = (
|
|
347
|
-
var toUint32Array = (
|
|
348
|
-
var toBigUint64Array = (
|
|
349
|
-
var toFloat32Array = (
|
|
350
|
-
var toFloat64Array = (
|
|
351
|
-
var toUint8ClampedArray = (
|
|
356
|
+
var toInt8Array = (input2) => toArrayBufferView(Int8Array, input2);
|
|
357
|
+
var toInt16Array = (input2) => toArrayBufferView(Int16Array, input2);
|
|
358
|
+
var toInt32Array = (input2) => toArrayBufferView(Int32Array, input2);
|
|
359
|
+
var toBigInt64Array = (input2) => toArrayBufferView(BigInt64ArrayCtor, input2);
|
|
360
|
+
var toUint8Array = (input2) => toArrayBufferView(Uint8Array, input2);
|
|
361
|
+
var toUint16Array = (input2) => toArrayBufferView(Uint16Array, input2);
|
|
362
|
+
var toUint32Array = (input2) => toArrayBufferView(Uint32Array, input2);
|
|
363
|
+
var toBigUint64Array = (input2) => toArrayBufferView(BigUint64ArrayCtor, input2);
|
|
364
|
+
var toFloat32Array = (input2) => toArrayBufferView(Float32Array, input2);
|
|
365
|
+
var toFloat64Array = (input2) => toArrayBufferView(Float64Array, input2);
|
|
366
|
+
var toUint8ClampedArray = (input2) => toArrayBufferView(Uint8ClampedArray, input2);
|
|
352
367
|
var pump = (iterator) => {
|
|
353
368
|
iterator.next();
|
|
354
369
|
return iterator;
|
|
@@ -366,15 +381,15 @@ function* toArrayBufferViewIterator(ArrayCtor, source) {
|
|
|
366
381
|
}(buffers[Symbol.iterator]()));
|
|
367
382
|
return new ArrayCtor();
|
|
368
383
|
}
|
|
369
|
-
var toInt8ArrayIterator = (
|
|
370
|
-
var toInt16ArrayIterator = (
|
|
371
|
-
var toInt32ArrayIterator = (
|
|
372
|
-
var toUint8ArrayIterator = (
|
|
373
|
-
var toUint16ArrayIterator = (
|
|
374
|
-
var toUint32ArrayIterator = (
|
|
375
|
-
var toFloat32ArrayIterator = (
|
|
376
|
-
var toFloat64ArrayIterator = (
|
|
377
|
-
var toUint8ClampedArrayIterator = (
|
|
384
|
+
var toInt8ArrayIterator = (input2) => toArrayBufferViewIterator(Int8Array, input2);
|
|
385
|
+
var toInt16ArrayIterator = (input2) => toArrayBufferViewIterator(Int16Array, input2);
|
|
386
|
+
var toInt32ArrayIterator = (input2) => toArrayBufferViewIterator(Int32Array, input2);
|
|
387
|
+
var toUint8ArrayIterator = (input2) => toArrayBufferViewIterator(Uint8Array, input2);
|
|
388
|
+
var toUint16ArrayIterator = (input2) => toArrayBufferViewIterator(Uint16Array, input2);
|
|
389
|
+
var toUint32ArrayIterator = (input2) => toArrayBufferViewIterator(Uint32Array, input2);
|
|
390
|
+
var toFloat32ArrayIterator = (input2) => toArrayBufferViewIterator(Float32Array, input2);
|
|
391
|
+
var toFloat64ArrayIterator = (input2) => toArrayBufferViewIterator(Float64Array, input2);
|
|
392
|
+
var toUint8ClampedArrayIterator = (input2) => toArrayBufferViewIterator(Uint8ClampedArray, input2);
|
|
378
393
|
function toArrayBufferViewAsyncIterator(ArrayCtor, source) {
|
|
379
394
|
return __asyncGenerator(this, arguments, function* toArrayBufferViewAsyncIterator_1() {
|
|
380
395
|
if (isPromise(source)) {
|
|
@@ -410,15 +425,15 @@ function toArrayBufferViewAsyncIterator(ArrayCtor, source) {
|
|
|
410
425
|
return yield __await(new ArrayCtor());
|
|
411
426
|
});
|
|
412
427
|
}
|
|
413
|
-
var toInt8ArrayAsyncIterator = (
|
|
414
|
-
var toInt16ArrayAsyncIterator = (
|
|
415
|
-
var toInt32ArrayAsyncIterator = (
|
|
416
|
-
var toUint8ArrayAsyncIterator = (
|
|
417
|
-
var toUint16ArrayAsyncIterator = (
|
|
418
|
-
var toUint32ArrayAsyncIterator = (
|
|
419
|
-
var toFloat32ArrayAsyncIterator = (
|
|
420
|
-
var toFloat64ArrayAsyncIterator = (
|
|
421
|
-
var toUint8ClampedArrayAsyncIterator = (
|
|
428
|
+
var toInt8ArrayAsyncIterator = (input2) => toArrayBufferViewAsyncIterator(Int8Array, input2);
|
|
429
|
+
var toInt16ArrayAsyncIterator = (input2) => toArrayBufferViewAsyncIterator(Int16Array, input2);
|
|
430
|
+
var toInt32ArrayAsyncIterator = (input2) => toArrayBufferViewAsyncIterator(Int32Array, input2);
|
|
431
|
+
var toUint8ArrayAsyncIterator = (input2) => toArrayBufferViewAsyncIterator(Uint8Array, input2);
|
|
432
|
+
var toUint16ArrayAsyncIterator = (input2) => toArrayBufferViewAsyncIterator(Uint16Array, input2);
|
|
433
|
+
var toUint32ArrayAsyncIterator = (input2) => toArrayBufferViewAsyncIterator(Uint32Array, input2);
|
|
434
|
+
var toFloat32ArrayAsyncIterator = (input2) => toArrayBufferViewAsyncIterator(Float32Array, input2);
|
|
435
|
+
var toFloat64ArrayAsyncIterator = (input2) => toArrayBufferViewAsyncIterator(Float64Array, input2);
|
|
436
|
+
var toUint8ClampedArrayAsyncIterator = (input2) => toArrayBufferViewAsyncIterator(Uint8ClampedArray, input2);
|
|
422
437
|
function rebaseValueOffsets(offset, length2, valueOffsets) {
|
|
423
438
|
if (offset !== 0) {
|
|
424
439
|
valueOffsets = valueOffsets.slice(0, length2 + 1);
|
|
@@ -444,7 +459,7 @@ function compareArrayLike(a, b) {
|
|
|
444
459
|
return true;
|
|
445
460
|
}
|
|
446
461
|
|
|
447
|
-
//
|
|
462
|
+
// ../../node_modules/apache-arrow/io/adapters.mjs
|
|
448
463
|
var adapters_default = {
|
|
449
464
|
fromIterable(source) {
|
|
450
465
|
return pump2(fromIterable(source));
|
|
@@ -688,7 +703,7 @@ function fromNodeStream(stream) {
|
|
|
688
703
|
});
|
|
689
704
|
}
|
|
690
705
|
|
|
691
|
-
//
|
|
706
|
+
// ../../node_modules/apache-arrow/enum.mjs
|
|
692
707
|
var MetadataVersion;
|
|
693
708
|
(function(MetadataVersion3) {
|
|
694
709
|
MetadataVersion3[MetadataVersion3["V1"] = 0] = "V1";
|
|
@@ -790,7 +805,7 @@ var BufferType;
|
|
|
790
805
|
BufferType2[BufferType2["TYPE"] = 3] = "TYPE";
|
|
791
806
|
})(BufferType || (BufferType = {}));
|
|
792
807
|
|
|
793
|
-
//
|
|
808
|
+
// ../../node_modules/apache-arrow/util/vector.mjs
|
|
794
809
|
var vector_exports = {};
|
|
795
810
|
__export(vector_exports, {
|
|
796
811
|
clampIndex: () => clampIndex,
|
|
@@ -798,7 +813,7 @@ __export(vector_exports, {
|
|
|
798
813
|
createElementComparator: () => createElementComparator
|
|
799
814
|
});
|
|
800
815
|
|
|
801
|
-
//
|
|
816
|
+
// ../../node_modules/apache-arrow/util/pretty.mjs
|
|
802
817
|
var undf = void 0;
|
|
803
818
|
function valueToString(x) {
|
|
804
819
|
if (x === null) {
|
|
@@ -827,7 +842,7 @@ function valueToString(x) {
|
|
|
827
842
|
return ArrayBuffer.isView(x) ? `[${x}]` : JSON.stringify(x, (_, y) => typeof y === "bigint" ? `${y}` : y);
|
|
828
843
|
}
|
|
829
844
|
|
|
830
|
-
//
|
|
845
|
+
// ../../node_modules/apache-arrow/util/bn.mjs
|
|
831
846
|
var bn_exports = {};
|
|
832
847
|
__export(bn_exports, {
|
|
833
848
|
BN: () => BN,
|
|
@@ -896,8 +911,15 @@ function bignumToNumber(bn) {
|
|
|
896
911
|
}
|
|
897
912
|
return number;
|
|
898
913
|
}
|
|
899
|
-
var bignumToString
|
|
900
|
-
var bignumToBigInt
|
|
914
|
+
var bignumToString;
|
|
915
|
+
var bignumToBigInt;
|
|
916
|
+
if (!BigIntAvailable) {
|
|
917
|
+
bignumToString = decimalToString;
|
|
918
|
+
bignumToBigInt = bignumToString;
|
|
919
|
+
} else {
|
|
920
|
+
bignumToBigInt = (a) => a.byteLength === 8 ? new a["BigIntArray"](a.buffer, a.byteOffset, 1)[0] : decimalToString(a);
|
|
921
|
+
bignumToString = (a) => a.byteLength === 8 ? `${new a["BigIntArray"](a.buffer, a.byteOffset, 1)[0]}` : decimalToString(a);
|
|
922
|
+
}
|
|
901
923
|
function decimalToString(a) {
|
|
902
924
|
let digits = "";
|
|
903
925
|
const base64 = new Uint32Array(2);
|
|
@@ -954,15 +976,7 @@ var BN = class {
|
|
|
954
976
|
}
|
|
955
977
|
};
|
|
956
978
|
|
|
957
|
-
//
|
|
958
|
-
function bigIntToNumber(number) {
|
|
959
|
-
if (typeof number === "bigint" && (number < Number.MIN_SAFE_INTEGER || number > Number.MAX_SAFE_INTEGER)) {
|
|
960
|
-
throw new TypeError(`${number} is not safe to convert to a number.`);
|
|
961
|
-
}
|
|
962
|
-
return Number(number);
|
|
963
|
-
}
|
|
964
|
-
|
|
965
|
-
// ../core/node_modules/apache-arrow/type.mjs
|
|
979
|
+
// ../../node_modules/apache-arrow/type.mjs
|
|
966
980
|
var _a;
|
|
967
981
|
var _b;
|
|
968
982
|
var _c;
|
|
@@ -1534,7 +1548,7 @@ var Dictionary = class extends DataType {
|
|
|
1534
1548
|
this.indices = indices;
|
|
1535
1549
|
this.dictionary = dictionary;
|
|
1536
1550
|
this.isOrdered = isOrdered || false;
|
|
1537
|
-
this.id = id == null ? getId() :
|
|
1551
|
+
this.id = id == null ? getId() : typeof id === "number" ? id : id.low;
|
|
1538
1552
|
}
|
|
1539
1553
|
get typeId() {
|
|
1540
1554
|
return Type.Dictionary;
|
|
@@ -1580,7 +1594,7 @@ function strideForType(type) {
|
|
|
1580
1594
|
}
|
|
1581
1595
|
}
|
|
1582
1596
|
|
|
1583
|
-
//
|
|
1597
|
+
// ../../node_modules/apache-arrow/visitor.mjs
|
|
1584
1598
|
var Visitor = class {
|
|
1585
1599
|
visitMany(nodes, ...args) {
|
|
1586
1600
|
return nodes.map((node, i) => this.visit(node, ...args.map((x) => x[i])));
|
|
@@ -1928,7 +1942,7 @@ Visitor.prototype.visitSparseUnion = null;
|
|
|
1928
1942
|
Visitor.prototype.visitIntervalDayTime = null;
|
|
1929
1943
|
Visitor.prototype.visitIntervalYearMonth = null;
|
|
1930
1944
|
|
|
1931
|
-
//
|
|
1945
|
+
// ../../node_modules/apache-arrow/util/math.mjs
|
|
1932
1946
|
var math_exports = {};
|
|
1933
1947
|
__export(math_exports, {
|
|
1934
1948
|
float64ToUint16: () => float64ToUint16,
|
|
@@ -1973,7 +1987,7 @@ function float64ToUint16(d) {
|
|
|
1973
1987
|
return sign | expo | sigf & 65535;
|
|
1974
1988
|
}
|
|
1975
1989
|
|
|
1976
|
-
//
|
|
1990
|
+
// ../../node_modules/apache-arrow/visitor/set.mjs
|
|
1977
1991
|
var SetVisitor = class extends Visitor {
|
|
1978
1992
|
};
|
|
1979
1993
|
function wrapSet(fn) {
|
|
@@ -2204,7 +2218,7 @@ SetVisitor.prototype.visitFixedSizeList = wrapSet(setFixedSizeList);
|
|
|
2204
2218
|
SetVisitor.prototype.visitMap = wrapSet(setMap);
|
|
2205
2219
|
var instance = new SetVisitor();
|
|
2206
2220
|
|
|
2207
|
-
//
|
|
2221
|
+
// ../../node_modules/apache-arrow/row/struct.mjs
|
|
2208
2222
|
var kParent = Symbol.for("parent");
|
|
2209
2223
|
var kRowIndex = Symbol.for("rowIndex");
|
|
2210
2224
|
var StructRow = class {
|
|
@@ -2312,7 +2326,7 @@ var StructRowProxyHandler = class {
|
|
|
2312
2326
|
}
|
|
2313
2327
|
};
|
|
2314
2328
|
|
|
2315
|
-
//
|
|
2329
|
+
// ../../node_modules/apache-arrow/visitor/get.mjs
|
|
2316
2330
|
var GetVisitor = class extends Visitor {
|
|
2317
2331
|
};
|
|
2318
2332
|
function wrapGet(fn) {
|
|
@@ -2479,7 +2493,7 @@ GetVisitor.prototype.visitFixedSizeList = wrapGet(getFixedSizeList);
|
|
|
2479
2493
|
GetVisitor.prototype.visitMap = wrapGet(getMap);
|
|
2480
2494
|
var instance2 = new GetVisitor();
|
|
2481
2495
|
|
|
2482
|
-
//
|
|
2496
|
+
// ../../node_modules/apache-arrow/row/map.mjs
|
|
2483
2497
|
var kKeys = Symbol.for("keys");
|
|
2484
2498
|
var kVals = Symbol.for("vals");
|
|
2485
2499
|
var MapRow = class {
|
|
@@ -2589,7 +2603,7 @@ Object.defineProperties(MapRow.prototype, {
|
|
|
2589
2603
|
[kVals]: { writable: true, enumerable: false, configurable: false, value: null }
|
|
2590
2604
|
});
|
|
2591
2605
|
|
|
2592
|
-
//
|
|
2606
|
+
// ../../node_modules/apache-arrow/util/vector.mjs
|
|
2593
2607
|
function clampIndex(source, index, then) {
|
|
2594
2608
|
const length2 = source.length;
|
|
2595
2609
|
const adjust = index > -1 ? index : length2 + index % length2;
|
|
@@ -2607,31 +2621,31 @@ function clampRange(source, begin, end, then) {
|
|
|
2607
2621
|
return then ? then(source, lhs, rhs) : [lhs, rhs];
|
|
2608
2622
|
}
|
|
2609
2623
|
var isNaNFast = (value) => value !== value;
|
|
2610
|
-
function createElementComparator(
|
|
2611
|
-
const typeofSearch = typeof
|
|
2612
|
-
if (typeofSearch !== "object" ||
|
|
2613
|
-
if (isNaNFast(
|
|
2624
|
+
function createElementComparator(search2) {
|
|
2625
|
+
const typeofSearch = typeof search2;
|
|
2626
|
+
if (typeofSearch !== "object" || search2 === null) {
|
|
2627
|
+
if (isNaNFast(search2)) {
|
|
2614
2628
|
return isNaNFast;
|
|
2615
2629
|
}
|
|
2616
|
-
return (value) => value ===
|
|
2630
|
+
return (value) => value === search2;
|
|
2617
2631
|
}
|
|
2618
|
-
if (
|
|
2619
|
-
const valueOfSearch =
|
|
2632
|
+
if (search2 instanceof Date) {
|
|
2633
|
+
const valueOfSearch = search2.valueOf();
|
|
2620
2634
|
return (value) => value instanceof Date ? value.valueOf() === valueOfSearch : false;
|
|
2621
2635
|
}
|
|
2622
|
-
if (ArrayBuffer.isView(
|
|
2623
|
-
return (value) => value ? compareArrayLike(
|
|
2636
|
+
if (ArrayBuffer.isView(search2)) {
|
|
2637
|
+
return (value) => value ? compareArrayLike(search2, value) : false;
|
|
2624
2638
|
}
|
|
2625
|
-
if (
|
|
2626
|
-
return createMapComparator(
|
|
2639
|
+
if (search2 instanceof Map) {
|
|
2640
|
+
return createMapComparator(search2);
|
|
2627
2641
|
}
|
|
2628
|
-
if (Array.isArray(
|
|
2629
|
-
return createArrayLikeComparator(
|
|
2642
|
+
if (Array.isArray(search2)) {
|
|
2643
|
+
return createArrayLikeComparator(search2);
|
|
2630
2644
|
}
|
|
2631
|
-
if (
|
|
2632
|
-
return createVectorComparator(
|
|
2645
|
+
if (search2 instanceof Vector) {
|
|
2646
|
+
return createVectorComparator(search2);
|
|
2633
2647
|
}
|
|
2634
|
-
return createObjectComparator(
|
|
2648
|
+
return createObjectComparator(search2, true);
|
|
2635
2649
|
}
|
|
2636
2650
|
function createArrayLikeComparator(lhs) {
|
|
2637
2651
|
const comparators = [];
|
|
@@ -2731,7 +2745,7 @@ function compareObject(comparators, obj, keys) {
|
|
|
2731
2745
|
return false;
|
|
2732
2746
|
}
|
|
2733
2747
|
|
|
2734
|
-
//
|
|
2748
|
+
// ../../node_modules/apache-arrow/util/bit.mjs
|
|
2735
2749
|
var bit_exports = {};
|
|
2736
2750
|
__export(bit_exports, {
|
|
2737
2751
|
BitIterator: () => BitIterator,
|
|
@@ -2854,9 +2868,34 @@ function popcnt_uint32(uint32) {
|
|
|
2854
2868
|
return (i + (i >>> 4) & 252645135) * 16843009 >>> 24;
|
|
2855
2869
|
}
|
|
2856
2870
|
|
|
2857
|
-
//
|
|
2871
|
+
// ../../node_modules/apache-arrow/data.mjs
|
|
2858
2872
|
var kUnknownNullCount = -1;
|
|
2859
2873
|
var Data = class {
|
|
2874
|
+
constructor(type, offset, length2, nullCount, buffers, children = [], dictionary) {
|
|
2875
|
+
this.type = type;
|
|
2876
|
+
this.children = children;
|
|
2877
|
+
this.dictionary = dictionary;
|
|
2878
|
+
this.offset = Math.floor(Math.max(offset || 0, 0));
|
|
2879
|
+
this.length = Math.floor(Math.max(length2 || 0, 0));
|
|
2880
|
+
this._nullCount = Math.floor(Math.max(nullCount || 0, -1));
|
|
2881
|
+
let buffer;
|
|
2882
|
+
if (buffers instanceof Data) {
|
|
2883
|
+
this.stride = buffers.stride;
|
|
2884
|
+
this.values = buffers.values;
|
|
2885
|
+
this.typeIds = buffers.typeIds;
|
|
2886
|
+
this.nullBitmap = buffers.nullBitmap;
|
|
2887
|
+
this.valueOffsets = buffers.valueOffsets;
|
|
2888
|
+
} else {
|
|
2889
|
+
this.stride = strideForType(type);
|
|
2890
|
+
if (buffers) {
|
|
2891
|
+
(buffer = buffers[0]) && (this.valueOffsets = buffer);
|
|
2892
|
+
(buffer = buffers[1]) && (this.values = buffer);
|
|
2893
|
+
(buffer = buffers[2]) && (this.nullBitmap = buffer);
|
|
2894
|
+
(buffer = buffers[3]) && (this.typeIds = buffer);
|
|
2895
|
+
}
|
|
2896
|
+
}
|
|
2897
|
+
this.nullable = this._nullCount !== 0 && this.nullBitmap && this.nullBitmap.byteLength > 0;
|
|
2898
|
+
}
|
|
2860
2899
|
get typeId() {
|
|
2861
2900
|
return this.type.typeId;
|
|
2862
2901
|
}
|
|
@@ -2883,31 +2922,6 @@ var Data = class {
|
|
|
2883
2922
|
}
|
|
2884
2923
|
return nullCount;
|
|
2885
2924
|
}
|
|
2886
|
-
constructor(type, offset, length2, nullCount, buffers, children = [], dictionary) {
|
|
2887
|
-
this.type = type;
|
|
2888
|
-
this.children = children;
|
|
2889
|
-
this.dictionary = dictionary;
|
|
2890
|
-
this.offset = Math.floor(Math.max(offset || 0, 0));
|
|
2891
|
-
this.length = Math.floor(Math.max(length2 || 0, 0));
|
|
2892
|
-
this._nullCount = Math.floor(Math.max(nullCount || 0, -1));
|
|
2893
|
-
let buffer;
|
|
2894
|
-
if (buffers instanceof Data) {
|
|
2895
|
-
this.stride = buffers.stride;
|
|
2896
|
-
this.values = buffers.values;
|
|
2897
|
-
this.typeIds = buffers.typeIds;
|
|
2898
|
-
this.nullBitmap = buffers.nullBitmap;
|
|
2899
|
-
this.valueOffsets = buffers.valueOffsets;
|
|
2900
|
-
} else {
|
|
2901
|
-
this.stride = strideForType(type);
|
|
2902
|
-
if (buffers) {
|
|
2903
|
-
(buffer = buffers[0]) && (this.valueOffsets = buffer);
|
|
2904
|
-
(buffer = buffers[1]) && (this.values = buffer);
|
|
2905
|
-
(buffer = buffers[2]) && (this.nullBitmap = buffer);
|
|
2906
|
-
(buffer = buffers[3]) && (this.typeIds = buffer);
|
|
2907
|
-
}
|
|
2908
|
-
}
|
|
2909
|
-
this.nullable = this._nullCount !== 0 && this.nullBitmap && this.nullBitmap.byteLength > 0;
|
|
2910
|
-
}
|
|
2911
2925
|
getValid(index) {
|
|
2912
2926
|
if (this.nullable && this.nullCount > 0) {
|
|
2913
2927
|
const pos = this.offset + index;
|
|
@@ -3113,7 +3127,7 @@ function makeData(props) {
|
|
|
3113
3127
|
return new MakeDataVisitor().visit(props);
|
|
3114
3128
|
}
|
|
3115
3129
|
|
|
3116
|
-
//
|
|
3130
|
+
// ../../node_modules/apache-arrow/util/chunk.mjs
|
|
3117
3131
|
var ChunkedIterator = class {
|
|
3118
3132
|
constructor(numChunks = 0, getChunkIterator) {
|
|
3119
3133
|
this.numChunks = numChunks;
|
|
@@ -3229,7 +3243,7 @@ function wrapChunkedIndexOf(indexOf) {
|
|
|
3229
3243
|
};
|
|
3230
3244
|
}
|
|
3231
3245
|
|
|
3232
|
-
//
|
|
3246
|
+
// ../../node_modules/apache-arrow/visitor/indexof.mjs
|
|
3233
3247
|
var IndexOfVisitor = class extends Visitor {
|
|
3234
3248
|
};
|
|
3235
3249
|
function nullIndexOf(data, searchElement) {
|
|
@@ -3320,7 +3334,7 @@ IndexOfVisitor.prototype.visitFixedSizeList = indexOfValue;
|
|
|
3320
3334
|
IndexOfVisitor.prototype.visitMap = indexOfValue;
|
|
3321
3335
|
var instance3 = new IndexOfVisitor();
|
|
3322
3336
|
|
|
3323
|
-
//
|
|
3337
|
+
// ../../node_modules/apache-arrow/visitor/iterator.mjs
|
|
3324
3338
|
var IteratorVisitor = class extends Visitor {
|
|
3325
3339
|
};
|
|
3326
3340
|
function vectorIterator(vector) {
|
|
@@ -3402,7 +3416,7 @@ IteratorVisitor.prototype.visitFixedSizeList = vectorIterator;
|
|
|
3402
3416
|
IteratorVisitor.prototype.visitMap = vectorIterator;
|
|
3403
3417
|
var instance4 = new IteratorVisitor();
|
|
3404
3418
|
|
|
3405
|
-
//
|
|
3419
|
+
// ../../node_modules/apache-arrow/visitor/bytelength.mjs
|
|
3406
3420
|
var sum = (x, y) => x + y;
|
|
3407
3421
|
var GetByteLengthVisitor = class extends Visitor {
|
|
3408
3422
|
visitNull(____, _) {
|
|
@@ -3493,14 +3507,14 @@ GetByteLengthVisitor.prototype.visitDenseUnion = getDenseUnionByteLength;
|
|
|
3493
3507
|
GetByteLengthVisitor.prototype.visitSparseUnion = getSparseUnionByteLength;
|
|
3494
3508
|
var instance5 = new GetByteLengthVisitor();
|
|
3495
3509
|
|
|
3496
|
-
//
|
|
3510
|
+
// ../../node_modules/apache-arrow/vector.mjs
|
|
3497
3511
|
var _a2;
|
|
3498
3512
|
var visitorsByTypeId = {};
|
|
3499
3513
|
var vectorPrototypesByTypeId = {};
|
|
3500
3514
|
var Vector = class {
|
|
3501
|
-
constructor(
|
|
3515
|
+
constructor(input2) {
|
|
3502
3516
|
var _b2, _c2, _d2;
|
|
3503
|
-
const data =
|
|
3517
|
+
const data = input2[0] instanceof Vector ? input2.flatMap((x) => x.data) : input2;
|
|
3504
3518
|
if (data.length === 0 || data.some((x) => !(x instanceof Data))) {
|
|
3505
3519
|
throw new TypeError("Vector constructor expects an Array of Data instances.");
|
|
3506
3520
|
}
|
|
@@ -3810,7 +3824,7 @@ var MemoizedVector = class extends Vector {
|
|
|
3810
3824
|
}
|
|
3811
3825
|
};
|
|
3812
3826
|
|
|
3813
|
-
//
|
|
3827
|
+
// ../../node_modules/apache-arrow/builder/valid.mjs
|
|
3814
3828
|
function createIsValidFunction(nullValues) {
|
|
3815
3829
|
if (!nullValues || nullValues.length <= 0) {
|
|
3816
3830
|
return function isValid(value) {
|
|
@@ -3836,11 +3850,13 @@ return true;`);
|
|
|
3836
3850
|
function valueToCase(x) {
|
|
3837
3851
|
if (typeof x !== "bigint") {
|
|
3838
3852
|
return valueToString(x);
|
|
3853
|
+
} else if (BigIntAvailable) {
|
|
3854
|
+
return `${valueToString(x)}n`;
|
|
3839
3855
|
}
|
|
3840
|
-
return
|
|
3856
|
+
return `"${valueToString(x)}"`;
|
|
3841
3857
|
}
|
|
3842
3858
|
|
|
3843
|
-
//
|
|
3859
|
+
// ../../node_modules/apache-arrow/builder/buffer.mjs
|
|
3844
3860
|
var roundLengthUpToNearest64Bytes = (len, BPE) => (Math.ceil(len) * BPE + 63 & ~63 || 64) / BPE;
|
|
3845
3861
|
var sliceOrExtendArray = (arr, len = 0) => arr.length >= len ? arr.subarray(0, len) : memcpy(new arr.constructor(len), arr, 0);
|
|
3846
3862
|
var BufferBuilder = class {
|
|
@@ -3954,18 +3970,8 @@ var OffsetsBufferBuilder = class extends DataBufferBuilder {
|
|
|
3954
3970
|
}
|
|
3955
3971
|
};
|
|
3956
3972
|
|
|
3957
|
-
//
|
|
3973
|
+
// ../../node_modules/apache-arrow/builder.mjs
|
|
3958
3974
|
var Builder = class {
|
|
3959
|
-
/** @nocollapse */
|
|
3960
|
-
// @ts-ignore
|
|
3961
|
-
static throughNode(options) {
|
|
3962
|
-
throw new Error(`"throughNode" not available in this environment`);
|
|
3963
|
-
}
|
|
3964
|
-
/** @nocollapse */
|
|
3965
|
-
// @ts-ignore
|
|
3966
|
-
static throughDOM(options) {
|
|
3967
|
-
throw new Error(`"throughDOM" not available in this environment`);
|
|
3968
|
-
}
|
|
3969
3975
|
/**
|
|
3970
3976
|
* Construct a builder with the given Arrow DataType with optional null values,
|
|
3971
3977
|
* which will be interpreted as "null" when set or appended to the `Builder`.
|
|
@@ -3983,6 +3989,16 @@ var Builder = class {
|
|
|
3983
3989
|
this._isValid = createIsValidFunction(nulls);
|
|
3984
3990
|
}
|
|
3985
3991
|
}
|
|
3992
|
+
/** @nocollapse */
|
|
3993
|
+
// @ts-ignore
|
|
3994
|
+
static throughNode(options) {
|
|
3995
|
+
throw new Error(`"throughNode" not available in this environment`);
|
|
3996
|
+
}
|
|
3997
|
+
/** @nocollapse */
|
|
3998
|
+
// @ts-ignore
|
|
3999
|
+
static throughDOM(options) {
|
|
4000
|
+
throw new Error(`"throughDOM" not available in this environment`);
|
|
4001
|
+
}
|
|
3986
4002
|
/**
|
|
3987
4003
|
* Flush the `Builder` and return a `Vector<T>`.
|
|
3988
4004
|
* @returns {Vector<T>} A `Vector<T>` of the flushed values.
|
|
@@ -4221,7 +4237,7 @@ var VariableWidthBuilder = class extends Builder {
|
|
|
4221
4237
|
}
|
|
4222
4238
|
};
|
|
4223
4239
|
|
|
4224
|
-
//
|
|
4240
|
+
// ../../node_modules/apache-arrow/fb/block.mjs
|
|
4225
4241
|
var Block = class {
|
|
4226
4242
|
constructor() {
|
|
4227
4243
|
this.bb = null;
|
|
@@ -4256,34 +4272,52 @@ var Block = class {
|
|
|
4256
4272
|
}
|
|
4257
4273
|
static createBlock(builder, offset, metaDataLength, bodyLength) {
|
|
4258
4274
|
builder.prep(8, 24);
|
|
4259
|
-
builder.writeInt64(
|
|
4275
|
+
builder.writeInt64(bodyLength);
|
|
4260
4276
|
builder.pad(4);
|
|
4261
4277
|
builder.writeInt32(metaDataLength);
|
|
4262
|
-
builder.writeInt64(
|
|
4278
|
+
builder.writeInt64(offset);
|
|
4263
4279
|
return builder.offset();
|
|
4264
4280
|
}
|
|
4265
4281
|
};
|
|
4266
4282
|
|
|
4267
|
-
//
|
|
4283
|
+
// ../../node_modules/flatbuffers/mjs/constants.js
|
|
4268
4284
|
var SIZEOF_SHORT = 2;
|
|
4269
4285
|
var SIZEOF_INT = 4;
|
|
4270
4286
|
var FILE_IDENTIFIER_LENGTH = 4;
|
|
4271
4287
|
var SIZE_PREFIX_LENGTH = 4;
|
|
4272
4288
|
|
|
4273
|
-
//
|
|
4289
|
+
// ../../node_modules/flatbuffers/mjs/utils.js
|
|
4274
4290
|
var int32 = new Int32Array(2);
|
|
4275
4291
|
var float32 = new Float32Array(int32.buffer);
|
|
4276
4292
|
var float64 = new Float64Array(int32.buffer);
|
|
4277
4293
|
var isLittleEndian = new Uint16Array(new Uint8Array([1, 0]).buffer)[0] === 1;
|
|
4278
4294
|
|
|
4279
|
-
//
|
|
4295
|
+
// ../../node_modules/flatbuffers/mjs/long.js
|
|
4296
|
+
var Long = class {
|
|
4297
|
+
constructor(low, high) {
|
|
4298
|
+
this.low = low | 0;
|
|
4299
|
+
this.high = high | 0;
|
|
4300
|
+
}
|
|
4301
|
+
static create(low, high) {
|
|
4302
|
+
return low == 0 && high == 0 ? Long.ZERO : new Long(low, high);
|
|
4303
|
+
}
|
|
4304
|
+
toFloat64() {
|
|
4305
|
+
return (this.low >>> 0) + this.high * 4294967296;
|
|
4306
|
+
}
|
|
4307
|
+
equals(other) {
|
|
4308
|
+
return this.low == other.low && this.high == other.high;
|
|
4309
|
+
}
|
|
4310
|
+
};
|
|
4311
|
+
Long.ZERO = new Long(0, 0);
|
|
4312
|
+
|
|
4313
|
+
// ../../node_modules/flatbuffers/mjs/encoding.js
|
|
4280
4314
|
var Encoding;
|
|
4281
4315
|
(function(Encoding2) {
|
|
4282
4316
|
Encoding2[Encoding2["UTF8_BYTES"] = 1] = "UTF8_BYTES";
|
|
4283
4317
|
Encoding2[Encoding2["UTF16_STRING"] = 2] = "UTF16_STRING";
|
|
4284
4318
|
})(Encoding || (Encoding = {}));
|
|
4285
4319
|
|
|
4286
|
-
//
|
|
4320
|
+
// ../../node_modules/flatbuffers/mjs/byte-buffer.js
|
|
4287
4321
|
var ByteBuffer = class {
|
|
4288
4322
|
/**
|
|
4289
4323
|
* Create a new ByteBuffer with a given array of bytes (`Uint8Array`)
|
|
@@ -4291,7 +4325,6 @@ var ByteBuffer = class {
|
|
|
4291
4325
|
constructor(bytes_) {
|
|
4292
4326
|
this.bytes_ = bytes_;
|
|
4293
4327
|
this.position_ = 0;
|
|
4294
|
-
this.text_decoder_ = new TextDecoder();
|
|
4295
4328
|
}
|
|
4296
4329
|
/**
|
|
4297
4330
|
* Create and allocate a new ByteBuffer with a given size.
|
|
@@ -4345,10 +4378,10 @@ var ByteBuffer = class {
|
|
|
4345
4378
|
return this.readInt32(offset) >>> 0;
|
|
4346
4379
|
}
|
|
4347
4380
|
readInt64(offset) {
|
|
4348
|
-
return
|
|
4381
|
+
return new Long(this.readInt32(offset), this.readInt32(offset + 4));
|
|
4349
4382
|
}
|
|
4350
4383
|
readUint64(offset) {
|
|
4351
|
-
return
|
|
4384
|
+
return new Long(this.readUint32(offset), this.readUint32(offset + 4));
|
|
4352
4385
|
}
|
|
4353
4386
|
readFloat32(offset) {
|
|
4354
4387
|
int32[0] = this.readInt32(offset);
|
|
@@ -4386,12 +4419,12 @@ var ByteBuffer = class {
|
|
|
4386
4419
|
this.bytes_[offset + 3] = value >> 24;
|
|
4387
4420
|
}
|
|
4388
4421
|
writeInt64(offset, value) {
|
|
4389
|
-
this.writeInt32(offset,
|
|
4390
|
-
this.writeInt32(offset + 4,
|
|
4422
|
+
this.writeInt32(offset, value.low);
|
|
4423
|
+
this.writeInt32(offset + 4, value.high);
|
|
4391
4424
|
}
|
|
4392
4425
|
writeUint64(offset, value) {
|
|
4393
|
-
this.writeUint32(offset,
|
|
4394
|
-
this.writeUint32(offset + 4,
|
|
4426
|
+
this.writeUint32(offset, value.low);
|
|
4427
|
+
this.writeUint32(offset + 4, value.high);
|
|
4395
4428
|
}
|
|
4396
4429
|
writeFloat32(offset, value) {
|
|
4397
4430
|
float32[0] = value;
|
|
@@ -4437,9 +4470,10 @@ var ByteBuffer = class {
|
|
|
4437
4470
|
* Create a JavaScript string from UTF-8 data stored inside the FlatBuffer.
|
|
4438
4471
|
* This allocates a new string and converts to wide chars upon each access.
|
|
4439
4472
|
*
|
|
4440
|
-
* To avoid the conversion to
|
|
4441
|
-
* "optionalEncoding" argument. This is useful for avoiding conversion
|
|
4442
|
-
* the data will just be packaged back up in another
|
|
4473
|
+
* To avoid the conversion to UTF-16, pass Encoding.UTF8_BYTES as
|
|
4474
|
+
* the "optionalEncoding" argument. This is useful for avoiding conversion to
|
|
4475
|
+
* and from UTF-16 when the data will just be packaged back up in another
|
|
4476
|
+
* FlatBuffer later on.
|
|
4443
4477
|
*
|
|
4444
4478
|
* @param offset
|
|
4445
4479
|
* @param opt_encoding Defaults to UTF16_STRING
|
|
@@ -4447,12 +4481,39 @@ var ByteBuffer = class {
|
|
|
4447
4481
|
__string(offset, opt_encoding) {
|
|
4448
4482
|
offset += this.readInt32(offset);
|
|
4449
4483
|
const length2 = this.readInt32(offset);
|
|
4484
|
+
let result = "";
|
|
4485
|
+
let i = 0;
|
|
4450
4486
|
offset += SIZEOF_INT;
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
|
|
4487
|
+
if (opt_encoding === Encoding.UTF8_BYTES) {
|
|
4488
|
+
return this.bytes_.subarray(offset, offset + length2);
|
|
4489
|
+
}
|
|
4490
|
+
while (i < length2) {
|
|
4491
|
+
let codePoint;
|
|
4492
|
+
const a = this.readUint8(offset + i++);
|
|
4493
|
+
if (a < 192) {
|
|
4494
|
+
codePoint = a;
|
|
4495
|
+
} else {
|
|
4496
|
+
const b = this.readUint8(offset + i++);
|
|
4497
|
+
if (a < 224) {
|
|
4498
|
+
codePoint = (a & 31) << 6 | b & 63;
|
|
4499
|
+
} else {
|
|
4500
|
+
const c = this.readUint8(offset + i++);
|
|
4501
|
+
if (a < 240) {
|
|
4502
|
+
codePoint = (a & 15) << 12 | (b & 63) << 6 | c & 63;
|
|
4503
|
+
} else {
|
|
4504
|
+
const d = this.readUint8(offset + i++);
|
|
4505
|
+
codePoint = (a & 7) << 18 | (b & 63) << 12 | (c & 63) << 6 | d & 63;
|
|
4506
|
+
}
|
|
4507
|
+
}
|
|
4508
|
+
}
|
|
4509
|
+
if (codePoint < 65536) {
|
|
4510
|
+
result += String.fromCharCode(codePoint);
|
|
4511
|
+
} else {
|
|
4512
|
+
codePoint -= 65536;
|
|
4513
|
+
result += String.fromCharCode((codePoint >> 10) + 55296, (codePoint & (1 << 10) - 1) + 56320);
|
|
4514
|
+
}
|
|
4515
|
+
}
|
|
4516
|
+
return result;
|
|
4456
4517
|
}
|
|
4457
4518
|
/**
|
|
4458
4519
|
* Handle unions that can contain string as its member, if a Table-derived type then initialize it,
|
|
@@ -4496,15 +4557,20 @@ var ByteBuffer = class {
|
|
|
4496
4557
|
}
|
|
4497
4558
|
return true;
|
|
4498
4559
|
}
|
|
4560
|
+
/**
|
|
4561
|
+
* A helper function to avoid generated code depending on this file directly.
|
|
4562
|
+
*/
|
|
4563
|
+
createLong(low, high) {
|
|
4564
|
+
return Long.create(low, high);
|
|
4565
|
+
}
|
|
4499
4566
|
/**
|
|
4500
4567
|
* A helper function for generating list for obj api
|
|
4501
4568
|
*/
|
|
4502
4569
|
createScalarList(listAccessor, listLength) {
|
|
4503
4570
|
const ret = [];
|
|
4504
4571
|
for (let i = 0; i < listLength; ++i) {
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
ret.push(val);
|
|
4572
|
+
if (listAccessor(i) !== null) {
|
|
4573
|
+
ret.push(listAccessor(i));
|
|
4508
4574
|
}
|
|
4509
4575
|
}
|
|
4510
4576
|
return ret;
|
|
@@ -4527,7 +4593,7 @@ var ByteBuffer = class {
|
|
|
4527
4593
|
}
|
|
4528
4594
|
};
|
|
4529
4595
|
|
|
4530
|
-
//
|
|
4596
|
+
// ../../node_modules/flatbuffers/mjs/builder.js
|
|
4531
4597
|
var Builder2 = class {
|
|
4532
4598
|
/**
|
|
4533
4599
|
* Create a FlatBufferBuilder.
|
|
@@ -4542,7 +4608,6 @@ var Builder2 = class {
|
|
|
4542
4608
|
this.vector_num_elems = 0;
|
|
4543
4609
|
this.force_defaults = false;
|
|
4544
4610
|
this.string_maps = null;
|
|
4545
|
-
this.text_encoder = new TextEncoder();
|
|
4546
4611
|
let initial_size;
|
|
4547
4612
|
if (!opt_initial_size) {
|
|
4548
4613
|
initial_size = 1024;
|
|
@@ -4636,7 +4701,7 @@ var Builder2 = class {
|
|
|
4636
4701
|
}
|
|
4637
4702
|
/**
|
|
4638
4703
|
* Add an `int8` to the buffer, properly aligned, and grows the buffer (if necessary).
|
|
4639
|
-
* @param value The `int8` to add the buffer.
|
|
4704
|
+
* @param value The `int8` to add the the buffer.
|
|
4640
4705
|
*/
|
|
4641
4706
|
addInt8(value) {
|
|
4642
4707
|
this.prep(1, 0);
|
|
@@ -4644,7 +4709,7 @@ var Builder2 = class {
|
|
|
4644
4709
|
}
|
|
4645
4710
|
/**
|
|
4646
4711
|
* Add an `int16` to the buffer, properly aligned, and grows the buffer (if necessary).
|
|
4647
|
-
* @param value The `int16` to add the buffer.
|
|
4712
|
+
* @param value The `int16` to add the the buffer.
|
|
4648
4713
|
*/
|
|
4649
4714
|
addInt16(value) {
|
|
4650
4715
|
this.prep(2, 0);
|
|
@@ -4652,7 +4717,7 @@ var Builder2 = class {
|
|
|
4652
4717
|
}
|
|
4653
4718
|
/**
|
|
4654
4719
|
* Add an `int32` to the buffer, properly aligned, and grows the buffer (if necessary).
|
|
4655
|
-
* @param value The `int32` to add the buffer.
|
|
4720
|
+
* @param value The `int32` to add the the buffer.
|
|
4656
4721
|
*/
|
|
4657
4722
|
addInt32(value) {
|
|
4658
4723
|
this.prep(4, 0);
|
|
@@ -4660,7 +4725,7 @@ var Builder2 = class {
|
|
|
4660
4725
|
}
|
|
4661
4726
|
/**
|
|
4662
4727
|
* Add an `int64` to the buffer, properly aligned, and grows the buffer (if necessary).
|
|
4663
|
-
* @param value The `int64` to add the buffer.
|
|
4728
|
+
* @param value The `int64` to add the the buffer.
|
|
4664
4729
|
*/
|
|
4665
4730
|
addInt64(value) {
|
|
4666
4731
|
this.prep(8, 0);
|
|
@@ -4668,7 +4733,7 @@ var Builder2 = class {
|
|
|
4668
4733
|
}
|
|
4669
4734
|
/**
|
|
4670
4735
|
* Add a `float32` to the buffer, properly aligned, and grows the buffer (if necessary).
|
|
4671
|
-
* @param value The `float32` to add the buffer.
|
|
4736
|
+
* @param value The `float32` to add the the buffer.
|
|
4672
4737
|
*/
|
|
4673
4738
|
addFloat32(value) {
|
|
4674
4739
|
this.prep(4, 0);
|
|
@@ -4676,7 +4741,7 @@ var Builder2 = class {
|
|
|
4676
4741
|
}
|
|
4677
4742
|
/**
|
|
4678
4743
|
* Add a `float64` to the buffer, properly aligned, and grows the buffer (if necessary).
|
|
4679
|
-
* @param value The `float64` to add the buffer.
|
|
4744
|
+
* @param value The `float64` to add the the buffer.
|
|
4680
4745
|
*/
|
|
4681
4746
|
addFloat64(value) {
|
|
4682
4747
|
this.prep(8, 0);
|
|
@@ -4701,7 +4766,7 @@ var Builder2 = class {
|
|
|
4701
4766
|
}
|
|
4702
4767
|
}
|
|
4703
4768
|
addFieldInt64(voffset, value, defaultValue) {
|
|
4704
|
-
if (this.force_defaults || value
|
|
4769
|
+
if (this.force_defaults || !value.equals(defaultValue)) {
|
|
4705
4770
|
this.addInt64(value);
|
|
4706
4771
|
this.slot(voffset);
|
|
4707
4772
|
}
|
|
@@ -4893,10 +4958,10 @@ var Builder2 = class {
|
|
|
4893
4958
|
* This checks a required field has been set in a given table that has
|
|
4894
4959
|
* just been constructed.
|
|
4895
4960
|
*/
|
|
4896
|
-
requiredField(
|
|
4897
|
-
const table_start = this.bb.capacity() -
|
|
4961
|
+
requiredField(table2, field) {
|
|
4962
|
+
const table_start = this.bb.capacity() - table2;
|
|
4898
4963
|
const vtable_start = table_start - this.bb.readInt32(table_start);
|
|
4899
|
-
const ok =
|
|
4964
|
+
const ok = this.bb.readInt16(vtable_start + field) != 0;
|
|
4900
4965
|
if (!ok) {
|
|
4901
4966
|
throw new Error("FlatBuffers: field " + field + " must be set");
|
|
4902
4967
|
}
|
|
@@ -4956,14 +5021,40 @@ var Builder2 = class {
|
|
|
4956
5021
|
* @return The offset in the buffer where the encoded string starts
|
|
4957
5022
|
*/
|
|
4958
5023
|
createString(s) {
|
|
4959
|
-
if (s
|
|
5024
|
+
if (!s) {
|
|
4960
5025
|
return 0;
|
|
4961
5026
|
}
|
|
4962
5027
|
let utf8;
|
|
4963
5028
|
if (s instanceof Uint8Array) {
|
|
4964
5029
|
utf8 = s;
|
|
4965
5030
|
} else {
|
|
4966
|
-
utf8 =
|
|
5031
|
+
utf8 = [];
|
|
5032
|
+
let i = 0;
|
|
5033
|
+
while (i < s.length) {
|
|
5034
|
+
let codePoint;
|
|
5035
|
+
const a = s.charCodeAt(i++);
|
|
5036
|
+
if (a < 55296 || a >= 56320) {
|
|
5037
|
+
codePoint = a;
|
|
5038
|
+
} else {
|
|
5039
|
+
const b = s.charCodeAt(i++);
|
|
5040
|
+
codePoint = (a << 10) + b + (65536 - (55296 << 10) - 56320);
|
|
5041
|
+
}
|
|
5042
|
+
if (codePoint < 128) {
|
|
5043
|
+
utf8.push(codePoint);
|
|
5044
|
+
} else {
|
|
5045
|
+
if (codePoint < 2048) {
|
|
5046
|
+
utf8.push(codePoint >> 6 & 31 | 192);
|
|
5047
|
+
} else {
|
|
5048
|
+
if (codePoint < 65536) {
|
|
5049
|
+
utf8.push(codePoint >> 12 & 15 | 224);
|
|
5050
|
+
} else {
|
|
5051
|
+
utf8.push(codePoint >> 18 & 7 | 240, codePoint >> 12 & 63 | 128);
|
|
5052
|
+
}
|
|
5053
|
+
utf8.push(codePoint >> 6 & 63 | 128);
|
|
5054
|
+
}
|
|
5055
|
+
utf8.push(codePoint & 63 | 128);
|
|
5056
|
+
}
|
|
5057
|
+
}
|
|
4967
5058
|
}
|
|
4968
5059
|
this.addInt8(0);
|
|
4969
5060
|
this.startVector(1, utf8.length, 1);
|
|
@@ -4973,6 +5064,12 @@ var Builder2 = class {
|
|
|
4973
5064
|
}
|
|
4974
5065
|
return this.endVector();
|
|
4975
5066
|
}
|
|
5067
|
+
/**
|
|
5068
|
+
* A helper function to avoid generated code depending on this file directly.
|
|
5069
|
+
*/
|
|
5070
|
+
createLong(low, high) {
|
|
5071
|
+
return Long.create(low, high);
|
|
5072
|
+
}
|
|
4976
5073
|
/**
|
|
4977
5074
|
* A helper function to pack an object
|
|
4978
5075
|
*
|
|
@@ -5007,12 +5104,12 @@ var Builder2 = class {
|
|
|
5007
5104
|
}
|
|
5008
5105
|
createStructOffsetList(list, startFunc) {
|
|
5009
5106
|
startFunc(this, list.length);
|
|
5010
|
-
this.createObjectOffsetList(list
|
|
5107
|
+
this.createObjectOffsetList(list);
|
|
5011
5108
|
return this.endVector();
|
|
5012
5109
|
}
|
|
5013
5110
|
};
|
|
5014
5111
|
|
|
5015
|
-
//
|
|
5112
|
+
// ../../node_modules/apache-arrow/fb/key-value.mjs
|
|
5016
5113
|
var KeyValue = class {
|
|
5017
5114
|
constructor() {
|
|
5018
5115
|
this.bb = null;
|
|
@@ -5059,7 +5156,7 @@ var KeyValue = class {
|
|
|
5059
5156
|
}
|
|
5060
5157
|
};
|
|
5061
5158
|
|
|
5062
|
-
//
|
|
5159
|
+
// ../../node_modules/apache-arrow/fb/metadata-version.mjs
|
|
5063
5160
|
var MetadataVersion2;
|
|
5064
5161
|
(function(MetadataVersion3) {
|
|
5065
5162
|
MetadataVersion3[MetadataVersion3["V1"] = 0] = "V1";
|
|
@@ -5069,20 +5166,20 @@ var MetadataVersion2;
|
|
|
5069
5166
|
MetadataVersion3[MetadataVersion3["V5"] = 4] = "V5";
|
|
5070
5167
|
})(MetadataVersion2 || (MetadataVersion2 = {}));
|
|
5071
5168
|
|
|
5072
|
-
//
|
|
5169
|
+
// ../../node_modules/apache-arrow/fb/endianness.mjs
|
|
5073
5170
|
var Endianness;
|
|
5074
5171
|
(function(Endianness2) {
|
|
5075
5172
|
Endianness2[Endianness2["Little"] = 0] = "Little";
|
|
5076
5173
|
Endianness2[Endianness2["Big"] = 1] = "Big";
|
|
5077
5174
|
})(Endianness || (Endianness = {}));
|
|
5078
5175
|
|
|
5079
|
-
//
|
|
5176
|
+
// ../../node_modules/apache-arrow/fb/dictionary-kind.mjs
|
|
5080
5177
|
var DictionaryKind;
|
|
5081
5178
|
(function(DictionaryKind2) {
|
|
5082
5179
|
DictionaryKind2[DictionaryKind2["DenseArray"] = 0] = "DenseArray";
|
|
5083
5180
|
})(DictionaryKind || (DictionaryKind = {}));
|
|
5084
5181
|
|
|
5085
|
-
//
|
|
5182
|
+
// ../../node_modules/apache-arrow/fb/int.mjs
|
|
5086
5183
|
var Int = class {
|
|
5087
5184
|
constructor() {
|
|
5088
5185
|
this.bb = null;
|
|
@@ -5129,7 +5226,7 @@ var Int = class {
|
|
|
5129
5226
|
}
|
|
5130
5227
|
};
|
|
5131
5228
|
|
|
5132
|
-
//
|
|
5229
|
+
// ../../node_modules/apache-arrow/fb/dictionary-encoding.mjs
|
|
5133
5230
|
var DictionaryEncoding = class {
|
|
5134
5231
|
constructor() {
|
|
5135
5232
|
this.bb = null;
|
|
@@ -5154,7 +5251,7 @@ var DictionaryEncoding = class {
|
|
|
5154
5251
|
*/
|
|
5155
5252
|
id() {
|
|
5156
5253
|
const offset = this.bb.__offset(this.bb_pos, 4);
|
|
5157
|
-
return offset ? this.bb.readInt64(this.bb_pos + offset) :
|
|
5254
|
+
return offset ? this.bb.readInt64(this.bb_pos + offset) : this.bb.createLong(0, 0);
|
|
5158
5255
|
}
|
|
5159
5256
|
/**
|
|
5160
5257
|
* The dictionary indices are constrained to be non-negative integers. If
|
|
@@ -5185,7 +5282,7 @@ var DictionaryEncoding = class {
|
|
|
5185
5282
|
builder.startObject(4);
|
|
5186
5283
|
}
|
|
5187
5284
|
static addId(builder, id) {
|
|
5188
|
-
builder.addFieldInt64(0, id,
|
|
5285
|
+
builder.addFieldInt64(0, id, builder.createLong(0, 0));
|
|
5189
5286
|
}
|
|
5190
5287
|
static addIndexType(builder, indexTypeOffset) {
|
|
5191
5288
|
builder.addFieldOffset(1, indexTypeOffset, 0);
|
|
@@ -5202,7 +5299,7 @@ var DictionaryEncoding = class {
|
|
|
5202
5299
|
}
|
|
5203
5300
|
};
|
|
5204
5301
|
|
|
5205
|
-
//
|
|
5302
|
+
// ../../node_modules/apache-arrow/fb/binary.mjs
|
|
5206
5303
|
var Binary2 = class {
|
|
5207
5304
|
constructor() {
|
|
5208
5305
|
this.bb = null;
|
|
@@ -5233,7 +5330,7 @@ var Binary2 = class {
|
|
|
5233
5330
|
}
|
|
5234
5331
|
};
|
|
5235
5332
|
|
|
5236
|
-
//
|
|
5333
|
+
// ../../node_modules/apache-arrow/fb/bool.mjs
|
|
5237
5334
|
var Bool2 = class {
|
|
5238
5335
|
constructor() {
|
|
5239
5336
|
this.bb = null;
|
|
@@ -5264,14 +5361,14 @@ var Bool2 = class {
|
|
|
5264
5361
|
}
|
|
5265
5362
|
};
|
|
5266
5363
|
|
|
5267
|
-
//
|
|
5364
|
+
// ../../node_modules/apache-arrow/fb/date-unit.mjs
|
|
5268
5365
|
var DateUnit2;
|
|
5269
5366
|
(function(DateUnit3) {
|
|
5270
5367
|
DateUnit3[DateUnit3["DAY"] = 0] = "DAY";
|
|
5271
5368
|
DateUnit3[DateUnit3["MILLISECOND"] = 1] = "MILLISECOND";
|
|
5272
5369
|
})(DateUnit2 || (DateUnit2 = {}));
|
|
5273
5370
|
|
|
5274
|
-
//
|
|
5371
|
+
// ../../node_modules/apache-arrow/fb/date.mjs
|
|
5275
5372
|
var Date2 = class {
|
|
5276
5373
|
constructor() {
|
|
5277
5374
|
this.bb = null;
|
|
@@ -5310,7 +5407,7 @@ var Date2 = class {
|
|
|
5310
5407
|
}
|
|
5311
5408
|
};
|
|
5312
5409
|
|
|
5313
|
-
//
|
|
5410
|
+
// ../../node_modules/apache-arrow/fb/decimal.mjs
|
|
5314
5411
|
var Decimal2 = class {
|
|
5315
5412
|
constructor() {
|
|
5316
5413
|
this.bb = null;
|
|
@@ -5375,7 +5472,7 @@ var Decimal2 = class {
|
|
|
5375
5472
|
}
|
|
5376
5473
|
};
|
|
5377
5474
|
|
|
5378
|
-
//
|
|
5475
|
+
// ../../node_modules/apache-arrow/fb/time-unit.mjs
|
|
5379
5476
|
var TimeUnit2;
|
|
5380
5477
|
(function(TimeUnit3) {
|
|
5381
5478
|
TimeUnit3[TimeUnit3["SECOND"] = 0] = "SECOND";
|
|
@@ -5384,7 +5481,7 @@ var TimeUnit2;
|
|
|
5384
5481
|
TimeUnit3[TimeUnit3["NANOSECOND"] = 3] = "NANOSECOND";
|
|
5385
5482
|
})(TimeUnit2 || (TimeUnit2 = {}));
|
|
5386
5483
|
|
|
5387
|
-
//
|
|
5484
|
+
// ../../node_modules/apache-arrow/fb/fixed-size-binary.mjs
|
|
5388
5485
|
var FixedSizeBinary2 = class {
|
|
5389
5486
|
constructor() {
|
|
5390
5487
|
this.bb = null;
|
|
@@ -5426,7 +5523,7 @@ var FixedSizeBinary2 = class {
|
|
|
5426
5523
|
}
|
|
5427
5524
|
};
|
|
5428
5525
|
|
|
5429
|
-
//
|
|
5526
|
+
// ../../node_modules/apache-arrow/fb/fixed-size-list.mjs
|
|
5430
5527
|
var FixedSizeList2 = class {
|
|
5431
5528
|
constructor() {
|
|
5432
5529
|
this.bb = null;
|
|
@@ -5468,7 +5565,7 @@ var FixedSizeList2 = class {
|
|
|
5468
5565
|
}
|
|
5469
5566
|
};
|
|
5470
5567
|
|
|
5471
|
-
//
|
|
5568
|
+
// ../../node_modules/apache-arrow/fb/precision.mjs
|
|
5472
5569
|
var Precision2;
|
|
5473
5570
|
(function(Precision3) {
|
|
5474
5571
|
Precision3[Precision3["HALF"] = 0] = "HALF";
|
|
@@ -5476,7 +5573,7 @@ var Precision2;
|
|
|
5476
5573
|
Precision3[Precision3["DOUBLE"] = 2] = "DOUBLE";
|
|
5477
5574
|
})(Precision2 || (Precision2 = {}));
|
|
5478
5575
|
|
|
5479
|
-
//
|
|
5576
|
+
// ../../node_modules/apache-arrow/fb/floating-point.mjs
|
|
5480
5577
|
var FloatingPoint = class {
|
|
5481
5578
|
constructor() {
|
|
5482
5579
|
this.bb = null;
|
|
@@ -5515,7 +5612,7 @@ var FloatingPoint = class {
|
|
|
5515
5612
|
}
|
|
5516
5613
|
};
|
|
5517
5614
|
|
|
5518
|
-
//
|
|
5615
|
+
// ../../node_modules/apache-arrow/fb/interval-unit.mjs
|
|
5519
5616
|
var IntervalUnit2;
|
|
5520
5617
|
(function(IntervalUnit3) {
|
|
5521
5618
|
IntervalUnit3[IntervalUnit3["YEAR_MONTH"] = 0] = "YEAR_MONTH";
|
|
@@ -5523,7 +5620,7 @@ var IntervalUnit2;
|
|
|
5523
5620
|
IntervalUnit3[IntervalUnit3["MONTH_DAY_NANO"] = 2] = "MONTH_DAY_NANO";
|
|
5524
5621
|
})(IntervalUnit2 || (IntervalUnit2 = {}));
|
|
5525
5622
|
|
|
5526
|
-
//
|
|
5623
|
+
// ../../node_modules/apache-arrow/fb/interval.mjs
|
|
5527
5624
|
var Interval = class {
|
|
5528
5625
|
constructor() {
|
|
5529
5626
|
this.bb = null;
|
|
@@ -5562,7 +5659,7 @@ var Interval = class {
|
|
|
5562
5659
|
}
|
|
5563
5660
|
};
|
|
5564
5661
|
|
|
5565
|
-
//
|
|
5662
|
+
// ../../node_modules/apache-arrow/fb/list.mjs
|
|
5566
5663
|
var List2 = class {
|
|
5567
5664
|
constructor() {
|
|
5568
5665
|
this.bb = null;
|
|
@@ -5593,7 +5690,7 @@ var List2 = class {
|
|
|
5593
5690
|
}
|
|
5594
5691
|
};
|
|
5595
5692
|
|
|
5596
|
-
//
|
|
5693
|
+
// ../../node_modules/apache-arrow/fb/map.mjs
|
|
5597
5694
|
var Map2 = class {
|
|
5598
5695
|
constructor() {
|
|
5599
5696
|
this.bb = null;
|
|
@@ -5635,7 +5732,7 @@ var Map2 = class {
|
|
|
5635
5732
|
}
|
|
5636
5733
|
};
|
|
5637
5734
|
|
|
5638
|
-
//
|
|
5735
|
+
// ../../node_modules/apache-arrow/fb/null.mjs
|
|
5639
5736
|
var Null2 = class {
|
|
5640
5737
|
constructor() {
|
|
5641
5738
|
this.bb = null;
|
|
@@ -5666,7 +5763,7 @@ var Null2 = class {
|
|
|
5666
5763
|
}
|
|
5667
5764
|
};
|
|
5668
5765
|
|
|
5669
|
-
//
|
|
5766
|
+
// ../../node_modules/apache-arrow/fb/struct_.mjs
|
|
5670
5767
|
var Struct_ = class {
|
|
5671
5768
|
constructor() {
|
|
5672
5769
|
this.bb = null;
|
|
@@ -5697,7 +5794,7 @@ var Struct_ = class {
|
|
|
5697
5794
|
}
|
|
5698
5795
|
};
|
|
5699
5796
|
|
|
5700
|
-
//
|
|
5797
|
+
// ../../node_modules/apache-arrow/fb/time.mjs
|
|
5701
5798
|
var Time = class {
|
|
5702
5799
|
constructor() {
|
|
5703
5800
|
this.bb = null;
|
|
@@ -5744,7 +5841,7 @@ var Time = class {
|
|
|
5744
5841
|
}
|
|
5745
5842
|
};
|
|
5746
5843
|
|
|
5747
|
-
//
|
|
5844
|
+
// ../../node_modules/apache-arrow/fb/timestamp.mjs
|
|
5748
5845
|
var Timestamp = class {
|
|
5749
5846
|
constructor() {
|
|
5750
5847
|
this.bb = null;
|
|
@@ -5791,14 +5888,14 @@ var Timestamp = class {
|
|
|
5791
5888
|
}
|
|
5792
5889
|
};
|
|
5793
5890
|
|
|
5794
|
-
//
|
|
5891
|
+
// ../../node_modules/apache-arrow/fb/union-mode.mjs
|
|
5795
5892
|
var UnionMode2;
|
|
5796
5893
|
(function(UnionMode3) {
|
|
5797
5894
|
UnionMode3[UnionMode3["Sparse"] = 0] = "Sparse";
|
|
5798
5895
|
UnionMode3[UnionMode3["Dense"] = 1] = "Dense";
|
|
5799
5896
|
})(UnionMode2 || (UnionMode2 = {}));
|
|
5800
5897
|
|
|
5801
|
-
//
|
|
5898
|
+
// ../../node_modules/apache-arrow/fb/union.mjs
|
|
5802
5899
|
var Union = class {
|
|
5803
5900
|
constructor() {
|
|
5804
5901
|
this.bb = null;
|
|
@@ -5863,7 +5960,7 @@ var Union = class {
|
|
|
5863
5960
|
}
|
|
5864
5961
|
};
|
|
5865
5962
|
|
|
5866
|
-
//
|
|
5963
|
+
// ../../node_modules/apache-arrow/fb/utf8.mjs
|
|
5867
5964
|
var Utf82 = class {
|
|
5868
5965
|
constructor() {
|
|
5869
5966
|
this.bb = null;
|
|
@@ -5894,7 +5991,7 @@ var Utf82 = class {
|
|
|
5894
5991
|
}
|
|
5895
5992
|
};
|
|
5896
5993
|
|
|
5897
|
-
//
|
|
5994
|
+
// ../../node_modules/apache-arrow/fb/type.mjs
|
|
5898
5995
|
var Type2;
|
|
5899
5996
|
(function(Type3) {
|
|
5900
5997
|
Type3[Type3["NONE"] = 0] = "NONE";
|
|
@@ -5919,10 +6016,9 @@ var Type2;
|
|
|
5919
6016
|
Type3[Type3["LargeBinary"] = 19] = "LargeBinary";
|
|
5920
6017
|
Type3[Type3["LargeUtf8"] = 20] = "LargeUtf8";
|
|
5921
6018
|
Type3[Type3["LargeList"] = 21] = "LargeList";
|
|
5922
|
-
Type3[Type3["RunEndEncoded"] = 22] = "RunEndEncoded";
|
|
5923
6019
|
})(Type2 || (Type2 = {}));
|
|
5924
6020
|
|
|
5925
|
-
//
|
|
6021
|
+
// ../../node_modules/apache-arrow/fb/field.mjs
|
|
5926
6022
|
var Field = class {
|
|
5927
6023
|
constructor() {
|
|
5928
6024
|
this.bb = null;
|
|
@@ -5958,6 +6054,7 @@ var Field = class {
|
|
|
5958
6054
|
/**
|
|
5959
6055
|
* This is the type of the decoded value if the field is dictionary encoded.
|
|
5960
6056
|
*/
|
|
6057
|
+
// @ts-ignore
|
|
5961
6058
|
type(obj) {
|
|
5962
6059
|
const offset = this.bb.__offset(this.bb_pos, 10);
|
|
5963
6060
|
return offset ? this.bb.__union(obj, this.bb_pos + offset) : null;
|
|
@@ -6042,7 +6139,7 @@ var Field = class {
|
|
|
6042
6139
|
}
|
|
6043
6140
|
};
|
|
6044
6141
|
|
|
6045
|
-
//
|
|
6142
|
+
// ../../node_modules/apache-arrow/fb/schema.mjs
|
|
6046
6143
|
var Schema = class {
|
|
6047
6144
|
constructor() {
|
|
6048
6145
|
this.bb = null;
|
|
@@ -6090,7 +6187,7 @@ var Schema = class {
|
|
|
6090
6187
|
*/
|
|
6091
6188
|
features(index) {
|
|
6092
6189
|
const offset = this.bb.__offset(this.bb_pos, 10);
|
|
6093
|
-
return offset ? this.bb.readInt64(this.bb.__vector(this.bb_pos + offset) + index * 8) :
|
|
6190
|
+
return offset ? this.bb.readInt64(this.bb.__vector(this.bb_pos + offset) + index * 8) : this.bb.createLong(0, 0);
|
|
6094
6191
|
}
|
|
6095
6192
|
featuresLength() {
|
|
6096
6193
|
const offset = this.bb.__offset(this.bb_pos, 10);
|
|
@@ -6161,7 +6258,7 @@ var Schema = class {
|
|
|
6161
6258
|
}
|
|
6162
6259
|
};
|
|
6163
6260
|
|
|
6164
|
-
//
|
|
6261
|
+
// ../../node_modules/apache-arrow/fb/footer.mjs
|
|
6165
6262
|
var Footer = class {
|
|
6166
6263
|
constructor() {
|
|
6167
6264
|
this.bb = null;
|
|
@@ -6260,7 +6357,7 @@ var Footer = class {
|
|
|
6260
6357
|
}
|
|
6261
6358
|
};
|
|
6262
6359
|
|
|
6263
|
-
//
|
|
6360
|
+
// ../../node_modules/apache-arrow/schema.mjs
|
|
6264
6361
|
var Schema2 = class {
|
|
6265
6362
|
constructor(fields = [], metadata, dictionaries) {
|
|
6266
6363
|
this.fields = fields || [];
|
|
@@ -6318,6 +6415,12 @@ Schema2.prototype.fields = null;
|
|
|
6318
6415
|
Schema2.prototype.metadata = null;
|
|
6319
6416
|
Schema2.prototype.dictionaries = null;
|
|
6320
6417
|
var Field2 = class {
|
|
6418
|
+
constructor(name, type, nullable = false, metadata) {
|
|
6419
|
+
this.name = name;
|
|
6420
|
+
this.type = type;
|
|
6421
|
+
this.nullable = nullable;
|
|
6422
|
+
this.metadata = metadata || /* @__PURE__ */ new Map();
|
|
6423
|
+
}
|
|
6321
6424
|
/** @nocollapse */
|
|
6322
6425
|
static new(...args) {
|
|
6323
6426
|
let [name, type, nullable, metadata] = args;
|
|
@@ -6329,12 +6432,6 @@ var Field2 = class {
|
|
|
6329
6432
|
}
|
|
6330
6433
|
return new Field2(`${name}`, type, nullable, metadata);
|
|
6331
6434
|
}
|
|
6332
|
-
constructor(name, type, nullable = false, metadata) {
|
|
6333
|
-
this.name = name;
|
|
6334
|
-
this.type = type;
|
|
6335
|
-
this.nullable = nullable;
|
|
6336
|
-
this.metadata = metadata || /* @__PURE__ */ new Map();
|
|
6337
|
-
}
|
|
6338
6435
|
get typeId() {
|
|
6339
6436
|
return this.type.typeId;
|
|
6340
6437
|
}
|
|
@@ -6375,10 +6472,17 @@ function generateDictionaryMap(fields, dictionaries = /* @__PURE__ */ new Map())
|
|
|
6375
6472
|
return dictionaries;
|
|
6376
6473
|
}
|
|
6377
6474
|
|
|
6378
|
-
//
|
|
6475
|
+
// ../../node_modules/apache-arrow/ipc/metadata/file.mjs
|
|
6476
|
+
var Long2 = Long;
|
|
6379
6477
|
var Builder3 = Builder2;
|
|
6380
6478
|
var ByteBuffer2 = ByteBuffer;
|
|
6381
6479
|
var Footer_ = class {
|
|
6480
|
+
constructor(schema, version = MetadataVersion.V4, recordBatches, dictionaryBatches) {
|
|
6481
|
+
this.schema = schema;
|
|
6482
|
+
this.version = version;
|
|
6483
|
+
recordBatches && (this._recordBatches = recordBatches);
|
|
6484
|
+
dictionaryBatches && (this._dictionaryBatches = dictionaryBatches);
|
|
6485
|
+
}
|
|
6382
6486
|
/** @nocollapse */
|
|
6383
6487
|
static decode(buf) {
|
|
6384
6488
|
buf = new ByteBuffer2(toUint8Array(buf));
|
|
@@ -6414,12 +6518,6 @@ var Footer_ = class {
|
|
|
6414
6518
|
get numDictionaries() {
|
|
6415
6519
|
return this._dictionaryBatches.length;
|
|
6416
6520
|
}
|
|
6417
|
-
constructor(schema, version = MetadataVersion.V4, recordBatches, dictionaryBatches) {
|
|
6418
|
-
this.schema = schema;
|
|
6419
|
-
this.version = version;
|
|
6420
|
-
recordBatches && (this._recordBatches = recordBatches);
|
|
6421
|
-
dictionaryBatches && (this._dictionaryBatches = dictionaryBatches);
|
|
6422
|
-
}
|
|
6423
6521
|
*recordBatches() {
|
|
6424
6522
|
for (let block, i = -1, n = this.numRecordBatches; ++i < n; ) {
|
|
6425
6523
|
if (block = this.getRecordBatch(i)) {
|
|
@@ -6442,16 +6540,16 @@ var Footer_ = class {
|
|
|
6442
6540
|
}
|
|
6443
6541
|
};
|
|
6444
6542
|
var OffHeapFooter = class extends Footer_ {
|
|
6543
|
+
constructor(schema, _footer) {
|
|
6544
|
+
super(schema, _footer.version());
|
|
6545
|
+
this._footer = _footer;
|
|
6546
|
+
}
|
|
6445
6547
|
get numRecordBatches() {
|
|
6446
6548
|
return this._footer.recordBatchesLength();
|
|
6447
6549
|
}
|
|
6448
6550
|
get numDictionaries() {
|
|
6449
6551
|
return this._footer.dictionariesLength();
|
|
6450
6552
|
}
|
|
6451
|
-
constructor(schema, _footer) {
|
|
6452
|
-
super(schema, _footer.version());
|
|
6453
|
-
this._footer = _footer;
|
|
6454
|
-
}
|
|
6455
6553
|
getRecordBatch(index) {
|
|
6456
6554
|
if (index >= 0 && index < this.numRecordBatches) {
|
|
6457
6555
|
const fileBlock = this._footer.recordBatches(index);
|
|
@@ -6472,6 +6570,11 @@ var OffHeapFooter = class extends Footer_ {
|
|
|
6472
6570
|
}
|
|
6473
6571
|
};
|
|
6474
6572
|
var FileBlock = class {
|
|
6573
|
+
constructor(metaDataLength, bodyLength, offset) {
|
|
6574
|
+
this.metaDataLength = metaDataLength;
|
|
6575
|
+
this.offset = typeof offset === "number" ? offset : offset.low;
|
|
6576
|
+
this.bodyLength = typeof bodyLength === "number" ? bodyLength : bodyLength.low;
|
|
6577
|
+
}
|
|
6475
6578
|
/** @nocollapse */
|
|
6476
6579
|
static decode(block) {
|
|
6477
6580
|
return new FileBlock(block.metaDataLength(), block.bodyLength(), block.offset());
|
|
@@ -6479,18 +6582,13 @@ var FileBlock = class {
|
|
|
6479
6582
|
/** @nocollapse */
|
|
6480
6583
|
static encode(b, fileBlock) {
|
|
6481
6584
|
const { metaDataLength } = fileBlock;
|
|
6482
|
-
const offset =
|
|
6483
|
-
const bodyLength =
|
|
6585
|
+
const offset = new Long2(fileBlock.offset, 0);
|
|
6586
|
+
const bodyLength = new Long2(fileBlock.bodyLength, 0);
|
|
6484
6587
|
return Block.createBlock(b, offset, metaDataLength, bodyLength);
|
|
6485
6588
|
}
|
|
6486
|
-
constructor(metaDataLength, bodyLength, offset) {
|
|
6487
|
-
this.metaDataLength = metaDataLength;
|
|
6488
|
-
this.offset = bigIntToNumber(offset);
|
|
6489
|
-
this.bodyLength = bigIntToNumber(bodyLength);
|
|
6490
|
-
}
|
|
6491
6589
|
};
|
|
6492
6590
|
|
|
6493
|
-
//
|
|
6591
|
+
// ../../node_modules/apache-arrow/io/interfaces.mjs
|
|
6494
6592
|
var ITERATOR_DONE = Object.freeze({ done: true, value: void 0 });
|
|
6495
6593
|
var ArrowJSON = class {
|
|
6496
6594
|
constructor(_json) {
|
|
@@ -6613,7 +6711,7 @@ var AsyncQueue = class extends ReadableInterop {
|
|
|
6613
6711
|
}
|
|
6614
6712
|
};
|
|
6615
6713
|
|
|
6616
|
-
//
|
|
6714
|
+
// ../../node_modules/apache-arrow/io/stream.mjs
|
|
6617
6715
|
var AsyncByteQueue = class extends AsyncQueue {
|
|
6618
6716
|
write(value) {
|
|
6619
6717
|
if ((value = toUint8Array(value)).byteLength > 0) {
|
|
@@ -6625,27 +6723,21 @@ var AsyncByteQueue = class extends AsyncQueue {
|
|
|
6625
6723
|
}
|
|
6626
6724
|
toUint8Array(sync = false) {
|
|
6627
6725
|
return sync ? joinUint8Arrays(this._values)[0] : (() => __awaiter(this, void 0, void 0, function* () {
|
|
6628
|
-
var
|
|
6726
|
+
var e_1, _a5;
|
|
6629
6727
|
const buffers = [];
|
|
6630
6728
|
let byteLength = 0;
|
|
6631
6729
|
try {
|
|
6632
|
-
for (var
|
|
6633
|
-
|
|
6634
|
-
|
|
6635
|
-
|
|
6636
|
-
const chunk = _c2;
|
|
6637
|
-
buffers.push(chunk);
|
|
6638
|
-
byteLength += chunk.byteLength;
|
|
6639
|
-
} finally {
|
|
6640
|
-
_d2 = true;
|
|
6641
|
-
}
|
|
6730
|
+
for (var _b2 = __asyncValues(this), _c2; _c2 = yield _b2.next(), !_c2.done; ) {
|
|
6731
|
+
const chunk = _c2.value;
|
|
6732
|
+
buffers.push(chunk);
|
|
6733
|
+
byteLength += chunk.byteLength;
|
|
6642
6734
|
}
|
|
6643
6735
|
} catch (e_1_1) {
|
|
6644
6736
|
e_1 = { error: e_1_1 };
|
|
6645
6737
|
} finally {
|
|
6646
6738
|
try {
|
|
6647
|
-
if (
|
|
6648
|
-
yield
|
|
6739
|
+
if (_c2 && !_c2.done && (_a5 = _b2.return))
|
|
6740
|
+
yield _a5.call(_b2);
|
|
6649
6741
|
} finally {
|
|
6650
6742
|
if (e_1)
|
|
6651
6743
|
throw e_1.error;
|
|
@@ -6794,13 +6886,13 @@ var AsyncByteStreamSource = class {
|
|
|
6794
6886
|
}
|
|
6795
6887
|
};
|
|
6796
6888
|
|
|
6797
|
-
//
|
|
6889
|
+
// ../../node_modules/apache-arrow/io/file.mjs
|
|
6798
6890
|
var RandomAccessFile = class extends ByteStream {
|
|
6799
6891
|
constructor(buffer, byteLength) {
|
|
6800
6892
|
super();
|
|
6801
6893
|
this.position = 0;
|
|
6802
6894
|
this.buffer = toUint8Array(buffer);
|
|
6803
|
-
this.size = byteLength ===
|
|
6895
|
+
this.size = typeof byteLength === "undefined" ? this.buffer.byteLength : byteLength;
|
|
6804
6896
|
}
|
|
6805
6897
|
readInt32(position) {
|
|
6806
6898
|
const { buffer, byteOffset } = this.readAt(position, 4);
|
|
@@ -6917,7 +7009,7 @@ var AsyncRandomAccessFile = class extends AsyncByteStream {
|
|
|
6917
7009
|
}
|
|
6918
7010
|
};
|
|
6919
7011
|
|
|
6920
|
-
//
|
|
7012
|
+
// ../../node_modules/apache-arrow/util/int.mjs
|
|
6921
7013
|
var int_exports = {};
|
|
6922
7014
|
__export(int_exports, {
|
|
6923
7015
|
BaseInt64: () => BaseInt64,
|
|
@@ -7233,7 +7325,7 @@ var Int128 = class {
|
|
|
7233
7325
|
}
|
|
7234
7326
|
};
|
|
7235
7327
|
|
|
7236
|
-
//
|
|
7328
|
+
// ../../node_modules/apache-arrow/visitor/vectorloader.mjs
|
|
7237
7329
|
var VectorLoader = class extends Visitor {
|
|
7238
7330
|
constructor(bytes, nodes, buffers, dictionaries) {
|
|
7239
7331
|
super();
|
|
@@ -7372,7 +7464,7 @@ function binaryDataFromJSON(values) {
|
|
|
7372
7464
|
return data;
|
|
7373
7465
|
}
|
|
7374
7466
|
|
|
7375
|
-
//
|
|
7467
|
+
// ../../node_modules/apache-arrow/builder/binary.mjs
|
|
7376
7468
|
var BinaryBuilder = class extends VariableWidthBuilder {
|
|
7377
7469
|
constructor(opts) {
|
|
7378
7470
|
super(opts);
|
|
@@ -7405,7 +7497,7 @@ var BinaryBuilder = class extends VariableWidthBuilder {
|
|
|
7405
7497
|
}
|
|
7406
7498
|
};
|
|
7407
7499
|
|
|
7408
|
-
//
|
|
7500
|
+
// ../../node_modules/apache-arrow/builder/bool.mjs
|
|
7409
7501
|
var BoolBuilder = class extends Builder {
|
|
7410
7502
|
constructor(options) {
|
|
7411
7503
|
super(options);
|
|
@@ -7416,7 +7508,7 @@ var BoolBuilder = class extends Builder {
|
|
|
7416
7508
|
}
|
|
7417
7509
|
};
|
|
7418
7510
|
|
|
7419
|
-
//
|
|
7511
|
+
// ../../node_modules/apache-arrow/builder/date.mjs
|
|
7420
7512
|
var DateBuilder = class extends FixedWidthBuilder {
|
|
7421
7513
|
};
|
|
7422
7514
|
DateBuilder.prototype._setValue = setDate;
|
|
@@ -7427,12 +7519,12 @@ var DateMillisecondBuilder = class extends DateBuilder {
|
|
|
7427
7519
|
};
|
|
7428
7520
|
DateMillisecondBuilder.prototype._setValue = setDateMillisecond;
|
|
7429
7521
|
|
|
7430
|
-
//
|
|
7522
|
+
// ../../node_modules/apache-arrow/builder/decimal.mjs
|
|
7431
7523
|
var DecimalBuilder = class extends FixedWidthBuilder {
|
|
7432
7524
|
};
|
|
7433
7525
|
DecimalBuilder.prototype._setValue = setDecimal;
|
|
7434
7526
|
|
|
7435
|
-
//
|
|
7527
|
+
// ../../node_modules/apache-arrow/builder/dictionary.mjs
|
|
7436
7528
|
var DictionaryBuilder = class extends Builder {
|
|
7437
7529
|
constructor({ "type": type, "nullValues": nulls, "dictionaryHashFunction": hashFn }) {
|
|
7438
7530
|
super({ type: new Dictionary(type.dictionary, type.indices, type.id, type.isOrdered) });
|
|
@@ -7509,12 +7601,12 @@ var DictionaryBuilder = class extends Builder {
|
|
|
7509
7601
|
}
|
|
7510
7602
|
};
|
|
7511
7603
|
|
|
7512
|
-
//
|
|
7604
|
+
// ../../node_modules/apache-arrow/builder/fixedsizebinary.mjs
|
|
7513
7605
|
var FixedSizeBinaryBuilder = class extends FixedWidthBuilder {
|
|
7514
7606
|
};
|
|
7515
7607
|
FixedSizeBinaryBuilder.prototype._setValue = setFixedSizeBinary;
|
|
7516
7608
|
|
|
7517
|
-
//
|
|
7609
|
+
// ../../node_modules/apache-arrow/builder/fixedsizelist.mjs
|
|
7518
7610
|
var FixedSizeListBuilder = class extends Builder {
|
|
7519
7611
|
setValue(index, value) {
|
|
7520
7612
|
const [child] = this.children;
|
|
@@ -7533,7 +7625,7 @@ var FixedSizeListBuilder = class extends Builder {
|
|
|
7533
7625
|
}
|
|
7534
7626
|
};
|
|
7535
7627
|
|
|
7536
|
-
//
|
|
7628
|
+
// ../../node_modules/apache-arrow/builder/float.mjs
|
|
7537
7629
|
var FloatBuilder = class extends FixedWidthBuilder {
|
|
7538
7630
|
setValue(index, value) {
|
|
7539
7631
|
this._values.set(index, value);
|
|
@@ -7549,7 +7641,7 @@ var Float32Builder = class extends FloatBuilder {
|
|
|
7549
7641
|
var Float64Builder = class extends FloatBuilder {
|
|
7550
7642
|
};
|
|
7551
7643
|
|
|
7552
|
-
//
|
|
7644
|
+
// ../../node_modules/apache-arrow/builder/interval.mjs
|
|
7553
7645
|
var IntervalBuilder = class extends FixedWidthBuilder {
|
|
7554
7646
|
};
|
|
7555
7647
|
IntervalBuilder.prototype._setValue = setIntervalValue;
|
|
@@ -7560,7 +7652,7 @@ var IntervalYearMonthBuilder = class extends IntervalBuilder {
|
|
|
7560
7652
|
};
|
|
7561
7653
|
IntervalYearMonthBuilder.prototype._setValue = setIntervalYearMonth;
|
|
7562
7654
|
|
|
7563
|
-
//
|
|
7655
|
+
// ../../node_modules/apache-arrow/builder/int.mjs
|
|
7564
7656
|
var IntBuilder = class extends FixedWidthBuilder {
|
|
7565
7657
|
setValue(index, value) {
|
|
7566
7658
|
this._values.set(index, value);
|
|
@@ -7583,7 +7675,7 @@ var Uint32Builder = class extends IntBuilder {
|
|
|
7583
7675
|
var Uint64Builder = class extends IntBuilder {
|
|
7584
7676
|
};
|
|
7585
7677
|
|
|
7586
|
-
//
|
|
7678
|
+
// ../../node_modules/apache-arrow/builder/list.mjs
|
|
7587
7679
|
var ListBuilder = class extends VariableWidthBuilder {
|
|
7588
7680
|
constructor(opts) {
|
|
7589
7681
|
super(opts);
|
|
@@ -7614,7 +7706,7 @@ var ListBuilder = class extends VariableWidthBuilder {
|
|
|
7614
7706
|
}
|
|
7615
7707
|
};
|
|
7616
7708
|
|
|
7617
|
-
//
|
|
7709
|
+
// ../../node_modules/apache-arrow/builder/map.mjs
|
|
7618
7710
|
var MapBuilder = class extends VariableWidthBuilder {
|
|
7619
7711
|
set(index, value) {
|
|
7620
7712
|
return super.set(index, value);
|
|
@@ -7653,7 +7745,7 @@ var MapBuilder = class extends VariableWidthBuilder {
|
|
|
7653
7745
|
}
|
|
7654
7746
|
};
|
|
7655
7747
|
|
|
7656
|
-
//
|
|
7748
|
+
// ../../node_modules/apache-arrow/builder/null.mjs
|
|
7657
7749
|
var NullBuilder = class extends Builder {
|
|
7658
7750
|
// @ts-ignore
|
|
7659
7751
|
setValue(index, value) {
|
|
@@ -7664,7 +7756,7 @@ var NullBuilder = class extends Builder {
|
|
|
7664
7756
|
}
|
|
7665
7757
|
};
|
|
7666
7758
|
|
|
7667
|
-
//
|
|
7759
|
+
// ../../node_modules/apache-arrow/builder/struct.mjs
|
|
7668
7760
|
var StructBuilder = class extends Builder {
|
|
7669
7761
|
setValue(index, value) {
|
|
7670
7762
|
const { children, type } = this;
|
|
@@ -7691,7 +7783,7 @@ var StructBuilder = class extends Builder {
|
|
|
7691
7783
|
}
|
|
7692
7784
|
};
|
|
7693
7785
|
|
|
7694
|
-
//
|
|
7786
|
+
// ../../node_modules/apache-arrow/builder/timestamp.mjs
|
|
7695
7787
|
var TimestampBuilder = class extends FixedWidthBuilder {
|
|
7696
7788
|
};
|
|
7697
7789
|
TimestampBuilder.prototype._setValue = setTimestamp;
|
|
@@ -7708,7 +7800,7 @@ var TimestampNanosecondBuilder = class extends TimestampBuilder {
|
|
|
7708
7800
|
};
|
|
7709
7801
|
TimestampNanosecondBuilder.prototype._setValue = setTimestampNanosecond;
|
|
7710
7802
|
|
|
7711
|
-
//
|
|
7803
|
+
// ../../node_modules/apache-arrow/builder/time.mjs
|
|
7712
7804
|
var TimeBuilder = class extends FixedWidthBuilder {
|
|
7713
7805
|
};
|
|
7714
7806
|
TimeBuilder.prototype._setValue = setTime;
|
|
@@ -7725,7 +7817,7 @@ var TimeNanosecondBuilder = class extends TimeBuilder {
|
|
|
7725
7817
|
};
|
|
7726
7818
|
TimeNanosecondBuilder.prototype._setValue = setTimeNanosecond;
|
|
7727
7819
|
|
|
7728
|
-
//
|
|
7820
|
+
// ../../node_modules/apache-arrow/builder/union.mjs
|
|
7729
7821
|
var UnionBuilder = class extends Builder {
|
|
7730
7822
|
constructor(options) {
|
|
7731
7823
|
super(options);
|
|
@@ -7784,7 +7876,7 @@ var DenseUnionBuilder = class extends UnionBuilder {
|
|
|
7784
7876
|
}
|
|
7785
7877
|
};
|
|
7786
7878
|
|
|
7787
|
-
//
|
|
7879
|
+
// ../../node_modules/apache-arrow/builder/utf8.mjs
|
|
7788
7880
|
var Utf8Builder = class extends VariableWidthBuilder {
|
|
7789
7881
|
constructor(opts) {
|
|
7790
7882
|
super(opts);
|
|
@@ -7806,7 +7898,7 @@ var Utf8Builder = class extends VariableWidthBuilder {
|
|
|
7806
7898
|
};
|
|
7807
7899
|
Utf8Builder.prototype._flushPending = BinaryBuilder.prototype._flushPending;
|
|
7808
7900
|
|
|
7809
|
-
//
|
|
7901
|
+
// ../../node_modules/apache-arrow/visitor/builderctor.mjs
|
|
7810
7902
|
var GetBuilderCtor = class extends Visitor {
|
|
7811
7903
|
visitNull() {
|
|
7812
7904
|
return NullBuilder;
|
|
@@ -7940,7 +8032,7 @@ var GetBuilderCtor = class extends Visitor {
|
|
|
7940
8032
|
};
|
|
7941
8033
|
var instance6 = new GetBuilderCtor();
|
|
7942
8034
|
|
|
7943
|
-
//
|
|
8035
|
+
// ../../node_modules/apache-arrow/visitor/typecomparator.mjs
|
|
7944
8036
|
var TypeComparator = class extends Visitor {
|
|
7945
8037
|
compareSchemas(schema, other) {
|
|
7946
8038
|
return schema === other || other instanceof schema.constructor && this.compareManyFields(schema.fields, other.fields);
|
|
@@ -8051,7 +8143,7 @@ function compareTypes(type, other) {
|
|
|
8051
8143
|
return instance7.visit(type, other);
|
|
8052
8144
|
}
|
|
8053
8145
|
|
|
8054
|
-
//
|
|
8146
|
+
// ../../node_modules/apache-arrow/factories.mjs
|
|
8055
8147
|
function makeBuilder(options) {
|
|
8056
8148
|
const type = options.type;
|
|
8057
8149
|
const builder = new (instance6.getVisitFn(type)())(options);
|
|
@@ -8068,7 +8160,7 @@ function makeBuilder(options) {
|
|
|
8068
8160
|
return builder;
|
|
8069
8161
|
}
|
|
8070
8162
|
|
|
8071
|
-
//
|
|
8163
|
+
// ../../node_modules/apache-arrow/util/recordbatch.mjs
|
|
8072
8164
|
function distributeVectorsIntoRecordBatches(schema, vecs) {
|
|
8073
8165
|
return uniformlyDistributeChunksAcrossRecordBatches(schema, vecs.map((v) => v.data.concat()));
|
|
8074
8166
|
}
|
|
@@ -8129,7 +8221,7 @@ function distributeChildren(fields, batchLength, children, columns, memo) {
|
|
|
8129
8221
|
return children;
|
|
8130
8222
|
}
|
|
8131
8223
|
|
|
8132
|
-
//
|
|
8224
|
+
// ../../node_modules/apache-arrow/table.mjs
|
|
8133
8225
|
var _a3;
|
|
8134
8226
|
var Table = class {
|
|
8135
8227
|
constructor(...args) {
|
|
@@ -8413,7 +8505,7 @@ Table[_a3] = ((proto) => {
|
|
|
8413
8505
|
return "Table";
|
|
8414
8506
|
})(Table.prototype);
|
|
8415
8507
|
|
|
8416
|
-
//
|
|
8508
|
+
// ../../node_modules/apache-arrow/recordbatch.mjs
|
|
8417
8509
|
var _a4;
|
|
8418
8510
|
var RecordBatch = class {
|
|
8419
8511
|
constructor(...args) {
|
|
@@ -8675,20 +8767,20 @@ var _InternalEmptyPlaceholderRecordBatch = class extends RecordBatch {
|
|
|
8675
8767
|
}
|
|
8676
8768
|
};
|
|
8677
8769
|
|
|
8678
|
-
//
|
|
8770
|
+
// ../../node_modules/apache-arrow/fb/body-compression-method.mjs
|
|
8679
8771
|
var BodyCompressionMethod;
|
|
8680
8772
|
(function(BodyCompressionMethod2) {
|
|
8681
8773
|
BodyCompressionMethod2[BodyCompressionMethod2["BUFFER"] = 0] = "BUFFER";
|
|
8682
8774
|
})(BodyCompressionMethod || (BodyCompressionMethod = {}));
|
|
8683
8775
|
|
|
8684
|
-
//
|
|
8776
|
+
// ../../node_modules/apache-arrow/fb/compression-type.mjs
|
|
8685
8777
|
var CompressionType;
|
|
8686
8778
|
(function(CompressionType2) {
|
|
8687
8779
|
CompressionType2[CompressionType2["LZ4_FRAME"] = 0] = "LZ4_FRAME";
|
|
8688
8780
|
CompressionType2[CompressionType2["ZSTD"] = 1] = "ZSTD";
|
|
8689
8781
|
})(CompressionType || (CompressionType = {}));
|
|
8690
8782
|
|
|
8691
|
-
//
|
|
8783
|
+
// ../../node_modules/apache-arrow/fb/body-compression.mjs
|
|
8692
8784
|
var BodyCompression = class {
|
|
8693
8785
|
constructor() {
|
|
8694
8786
|
this.bb = null;
|
|
@@ -8742,7 +8834,7 @@ var BodyCompression = class {
|
|
|
8742
8834
|
}
|
|
8743
8835
|
};
|
|
8744
8836
|
|
|
8745
|
-
//
|
|
8837
|
+
// ../../node_modules/apache-arrow/fb/buffer.mjs
|
|
8746
8838
|
var Buffer2 = class {
|
|
8747
8839
|
constructor() {
|
|
8748
8840
|
this.bb = null;
|
|
@@ -8775,13 +8867,13 @@ var Buffer2 = class {
|
|
|
8775
8867
|
}
|
|
8776
8868
|
static createBuffer(builder, offset, length2) {
|
|
8777
8869
|
builder.prep(8, 16);
|
|
8778
|
-
builder.writeInt64(
|
|
8779
|
-
builder.writeInt64(
|
|
8870
|
+
builder.writeInt64(length2);
|
|
8871
|
+
builder.writeInt64(offset);
|
|
8780
8872
|
return builder.offset();
|
|
8781
8873
|
}
|
|
8782
8874
|
};
|
|
8783
8875
|
|
|
8784
|
-
//
|
|
8876
|
+
// ../../node_modules/apache-arrow/fb/field-node.mjs
|
|
8785
8877
|
var FieldNode = class {
|
|
8786
8878
|
constructor() {
|
|
8787
8879
|
this.bb = null;
|
|
@@ -8812,13 +8904,13 @@ var FieldNode = class {
|
|
|
8812
8904
|
}
|
|
8813
8905
|
static createFieldNode(builder, length2, null_count) {
|
|
8814
8906
|
builder.prep(8, 16);
|
|
8815
|
-
builder.writeInt64(
|
|
8816
|
-
builder.writeInt64(
|
|
8907
|
+
builder.writeInt64(null_count);
|
|
8908
|
+
builder.writeInt64(length2);
|
|
8817
8909
|
return builder.offset();
|
|
8818
8910
|
}
|
|
8819
8911
|
};
|
|
8820
8912
|
|
|
8821
|
-
//
|
|
8913
|
+
// ../../node_modules/apache-arrow/fb/record-batch.mjs
|
|
8822
8914
|
var RecordBatch2 = class {
|
|
8823
8915
|
constructor() {
|
|
8824
8916
|
this.bb = null;
|
|
@@ -8842,7 +8934,7 @@ var RecordBatch2 = class {
|
|
|
8842
8934
|
*/
|
|
8843
8935
|
length() {
|
|
8844
8936
|
const offset = this.bb.__offset(this.bb_pos, 4);
|
|
8845
|
-
return offset ? this.bb.readInt64(this.bb_pos + offset) :
|
|
8937
|
+
return offset ? this.bb.readInt64(this.bb_pos + offset) : this.bb.createLong(0, 0);
|
|
8846
8938
|
}
|
|
8847
8939
|
/**
|
|
8848
8940
|
* Nodes correspond to the pre-ordered flattened logical schema
|
|
@@ -8882,7 +8974,7 @@ var RecordBatch2 = class {
|
|
|
8882
8974
|
builder.startObject(4);
|
|
8883
8975
|
}
|
|
8884
8976
|
static addLength(builder, length2) {
|
|
8885
|
-
builder.addFieldInt64(0, length2,
|
|
8977
|
+
builder.addFieldInt64(0, length2, builder.createLong(0, 0));
|
|
8886
8978
|
}
|
|
8887
8979
|
static addNodes(builder, nodesOffset) {
|
|
8888
8980
|
builder.addFieldOffset(1, nodesOffset, 0);
|
|
@@ -8905,7 +8997,7 @@ var RecordBatch2 = class {
|
|
|
8905
8997
|
}
|
|
8906
8998
|
};
|
|
8907
8999
|
|
|
8908
|
-
//
|
|
9000
|
+
// ../../node_modules/apache-arrow/fb/dictionary-batch.mjs
|
|
8909
9001
|
var DictionaryBatch = class {
|
|
8910
9002
|
constructor() {
|
|
8911
9003
|
this.bb = null;
|
|
@@ -8925,7 +9017,7 @@ var DictionaryBatch = class {
|
|
|
8925
9017
|
}
|
|
8926
9018
|
id() {
|
|
8927
9019
|
const offset = this.bb.__offset(this.bb_pos, 4);
|
|
8928
|
-
return offset ? this.bb.readInt64(this.bb_pos + offset) :
|
|
9020
|
+
return offset ? this.bb.readInt64(this.bb_pos + offset) : this.bb.createLong(0, 0);
|
|
8929
9021
|
}
|
|
8930
9022
|
data(obj) {
|
|
8931
9023
|
const offset = this.bb.__offset(this.bb_pos, 6);
|
|
@@ -8944,7 +9036,7 @@ var DictionaryBatch = class {
|
|
|
8944
9036
|
builder.startObject(3);
|
|
8945
9037
|
}
|
|
8946
9038
|
static addId(builder, id) {
|
|
8947
|
-
builder.addFieldInt64(0, id,
|
|
9039
|
+
builder.addFieldInt64(0, id, builder.createLong(0, 0));
|
|
8948
9040
|
}
|
|
8949
9041
|
static addData(builder, dataOffset) {
|
|
8950
9042
|
builder.addFieldOffset(1, dataOffset, 0);
|
|
@@ -8958,7 +9050,7 @@ var DictionaryBatch = class {
|
|
|
8958
9050
|
}
|
|
8959
9051
|
};
|
|
8960
9052
|
|
|
8961
|
-
//
|
|
9053
|
+
// ../../node_modules/apache-arrow/fb/message-header.mjs
|
|
8962
9054
|
var MessageHeader2;
|
|
8963
9055
|
(function(MessageHeader3) {
|
|
8964
9056
|
MessageHeader3[MessageHeader3["NONE"] = 0] = "NONE";
|
|
@@ -8969,7 +9061,7 @@ var MessageHeader2;
|
|
|
8969
9061
|
MessageHeader3[MessageHeader3["SparseTensor"] = 5] = "SparseTensor";
|
|
8970
9062
|
})(MessageHeader2 || (MessageHeader2 = {}));
|
|
8971
9063
|
|
|
8972
|
-
//
|
|
9064
|
+
// ../../node_modules/apache-arrow/fb/message.mjs
|
|
8973
9065
|
var Message = class {
|
|
8974
9066
|
constructor() {
|
|
8975
9067
|
this.bb = null;
|
|
@@ -8995,13 +9087,14 @@ var Message = class {
|
|
|
8995
9087
|
const offset = this.bb.__offset(this.bb_pos, 6);
|
|
8996
9088
|
return offset ? this.bb.readUint8(this.bb_pos + offset) : MessageHeader2.NONE;
|
|
8997
9089
|
}
|
|
9090
|
+
// @ts-ignore
|
|
8998
9091
|
header(obj) {
|
|
8999
9092
|
const offset = this.bb.__offset(this.bb_pos, 8);
|
|
9000
9093
|
return offset ? this.bb.__union(obj, this.bb_pos + offset) : null;
|
|
9001
9094
|
}
|
|
9002
9095
|
bodyLength() {
|
|
9003
9096
|
const offset = this.bb.__offset(this.bb_pos, 10);
|
|
9004
|
-
return offset ? this.bb.readInt64(this.bb_pos + offset) :
|
|
9097
|
+
return offset ? this.bb.readInt64(this.bb_pos + offset) : this.bb.createLong(0, 0);
|
|
9005
9098
|
}
|
|
9006
9099
|
customMetadata(index, obj) {
|
|
9007
9100
|
const offset = this.bb.__offset(this.bb_pos, 12);
|
|
@@ -9024,7 +9117,7 @@ var Message = class {
|
|
|
9024
9117
|
builder.addFieldOffset(2, headerOffset, 0);
|
|
9025
9118
|
}
|
|
9026
9119
|
static addBodyLength(builder, bodyLength) {
|
|
9027
|
-
builder.addFieldInt64(3, bodyLength,
|
|
9120
|
+
builder.addFieldInt64(3, bodyLength, builder.createLong(0, 0));
|
|
9028
9121
|
}
|
|
9029
9122
|
static addCustomMetadata(builder, customMetadataOffset) {
|
|
9030
9123
|
builder.addFieldOffset(4, customMetadataOffset, 0);
|
|
@@ -9060,7 +9153,8 @@ var Message = class {
|
|
|
9060
9153
|
}
|
|
9061
9154
|
};
|
|
9062
9155
|
|
|
9063
|
-
//
|
|
9156
|
+
// ../../node_modules/apache-arrow/visitor/typeassembler.mjs
|
|
9157
|
+
var Long3 = Long;
|
|
9064
9158
|
var TypeAssembler = class extends Visitor {
|
|
9065
9159
|
visit(node, builder) {
|
|
9066
9160
|
return node == null || builder == null ? void 0 : super.visit(node, builder);
|
|
@@ -9143,7 +9237,7 @@ var TypeAssembler = class extends Visitor {
|
|
|
9143
9237
|
visitDictionary(node, b) {
|
|
9144
9238
|
const indexType = this.visit(node.indices, b);
|
|
9145
9239
|
DictionaryEncoding.startDictionaryEncoding(b);
|
|
9146
|
-
DictionaryEncoding.addId(b,
|
|
9240
|
+
DictionaryEncoding.addId(b, new Long3(node.id, 0));
|
|
9147
9241
|
DictionaryEncoding.addIsOrdered(b, node.isOrdered);
|
|
9148
9242
|
if (indexType !== void 0) {
|
|
9149
9243
|
DictionaryEncoding.addIndexType(b, indexType);
|
|
@@ -9168,7 +9262,7 @@ var TypeAssembler = class extends Visitor {
|
|
|
9168
9262
|
};
|
|
9169
9263
|
var instance8 = new TypeAssembler();
|
|
9170
9264
|
|
|
9171
|
-
//
|
|
9265
|
+
// ../../node_modules/apache-arrow/ipc/metadata/json.mjs
|
|
9172
9266
|
function schemaFromJSON(_schema, dictionaries = /* @__PURE__ */ new Map()) {
|
|
9173
9267
|
return new Schema2(schemaFieldsFromJSON(_schema, dictionaries), customMetadataFromJSON(_schema["customMetadata"]), dictionaries);
|
|
9174
9268
|
}
|
|
@@ -9302,10 +9396,18 @@ function typeFromJSON(f, children) {
|
|
|
9302
9396
|
throw new Error(`Unrecognized type: "${typeId}"`);
|
|
9303
9397
|
}
|
|
9304
9398
|
|
|
9305
|
-
//
|
|
9399
|
+
// ../../node_modules/apache-arrow/ipc/metadata/message.mjs
|
|
9400
|
+
var Long4 = Long;
|
|
9306
9401
|
var Builder4 = Builder2;
|
|
9307
9402
|
var ByteBuffer3 = ByteBuffer;
|
|
9308
9403
|
var Message2 = class {
|
|
9404
|
+
constructor(bodyLength, version, headerType, header) {
|
|
9405
|
+
this._version = version;
|
|
9406
|
+
this._headerType = headerType;
|
|
9407
|
+
this.body = new Uint8Array(0);
|
|
9408
|
+
header && (this._createHeader = () => header);
|
|
9409
|
+
this._bodyLength = typeof bodyLength === "number" ? bodyLength : bodyLength.low;
|
|
9410
|
+
}
|
|
9309
9411
|
/** @nocollapse */
|
|
9310
9412
|
static fromJSON(msg, headerType) {
|
|
9311
9413
|
const message = new Message2(0, MetadataVersion.V4, headerType);
|
|
@@ -9338,7 +9440,7 @@ var Message2 = class {
|
|
|
9338
9440
|
Message.addVersion(b, MetadataVersion.V4);
|
|
9339
9441
|
Message.addHeader(b, headerOffset);
|
|
9340
9442
|
Message.addHeaderType(b, message.headerType);
|
|
9341
|
-
Message.addBodyLength(b,
|
|
9443
|
+
Message.addBodyLength(b, new Long4(message.bodyLength, 0));
|
|
9342
9444
|
Message.finishMessageBuffer(b, Message.endMessage(b));
|
|
9343
9445
|
return b.asUint8Array();
|
|
9344
9446
|
}
|
|
@@ -9379,15 +9481,13 @@ var Message2 = class {
|
|
|
9379
9481
|
isDictionaryBatch() {
|
|
9380
9482
|
return this.headerType === MessageHeader.DictionaryBatch;
|
|
9381
9483
|
}
|
|
9382
|
-
constructor(bodyLength, version, headerType, header) {
|
|
9383
|
-
this._version = version;
|
|
9384
|
-
this._headerType = headerType;
|
|
9385
|
-
this.body = new Uint8Array(0);
|
|
9386
|
-
header && (this._createHeader = () => header);
|
|
9387
|
-
this._bodyLength = bigIntToNumber(bodyLength);
|
|
9388
|
-
}
|
|
9389
9484
|
};
|
|
9390
9485
|
var RecordBatch3 = class {
|
|
9486
|
+
constructor(length2, nodes, buffers) {
|
|
9487
|
+
this._nodes = nodes;
|
|
9488
|
+
this._buffers = buffers;
|
|
9489
|
+
this._length = typeof length2 === "number" ? length2 : length2.low;
|
|
9490
|
+
}
|
|
9391
9491
|
get nodes() {
|
|
9392
9492
|
return this._nodes;
|
|
9393
9493
|
}
|
|
@@ -9397,13 +9497,13 @@ var RecordBatch3 = class {
|
|
|
9397
9497
|
get buffers() {
|
|
9398
9498
|
return this._buffers;
|
|
9399
9499
|
}
|
|
9400
|
-
constructor(length2, nodes, buffers) {
|
|
9401
|
-
this._nodes = nodes;
|
|
9402
|
-
this._buffers = buffers;
|
|
9403
|
-
this._length = bigIntToNumber(length2);
|
|
9404
|
-
}
|
|
9405
9500
|
};
|
|
9406
9501
|
var DictionaryBatch2 = class {
|
|
9502
|
+
constructor(data, id, isDelta = false) {
|
|
9503
|
+
this._data = data;
|
|
9504
|
+
this._isDelta = isDelta;
|
|
9505
|
+
this._id = typeof id === "number" ? id : id.low;
|
|
9506
|
+
}
|
|
9407
9507
|
get id() {
|
|
9408
9508
|
return this._id;
|
|
9409
9509
|
}
|
|
@@ -9422,22 +9522,17 @@ var DictionaryBatch2 = class {
|
|
|
9422
9522
|
get buffers() {
|
|
9423
9523
|
return this.data.buffers;
|
|
9424
9524
|
}
|
|
9425
|
-
constructor(data, id, isDelta = false) {
|
|
9426
|
-
this._data = data;
|
|
9427
|
-
this._isDelta = isDelta;
|
|
9428
|
-
this._id = bigIntToNumber(id);
|
|
9429
|
-
}
|
|
9430
9525
|
};
|
|
9431
9526
|
var BufferRegion = class {
|
|
9432
9527
|
constructor(offset, length2) {
|
|
9433
|
-
this.offset =
|
|
9434
|
-
this.length =
|
|
9528
|
+
this.offset = typeof offset === "number" ? offset : offset.low;
|
|
9529
|
+
this.length = typeof length2 === "number" ? length2 : length2.low;
|
|
9435
9530
|
}
|
|
9436
9531
|
};
|
|
9437
9532
|
var FieldNode2 = class {
|
|
9438
9533
|
constructor(length2, nullCount) {
|
|
9439
|
-
this.length =
|
|
9440
|
-
this.nullCount =
|
|
9534
|
+
this.length = typeof length2 === "number" ? length2 : length2.low;
|
|
9535
|
+
this.nullCount = typeof nullCount === "number" ? nullCount : nullCount.low;
|
|
9441
9536
|
}
|
|
9442
9537
|
};
|
|
9443
9538
|
function messageHeaderFromJSON(message, type) {
|
|
@@ -9550,7 +9645,7 @@ function decodeField(f, dictionaries) {
|
|
|
9550
9645
|
if (!dictionaries || !(dictMeta = f.dictionary())) {
|
|
9551
9646
|
type = decodeFieldType(f, decodeFieldChildren(f, dictionaries));
|
|
9552
9647
|
field = new Field2(f.name(), type, f.nullable(), decodeCustomMetadata(f));
|
|
9553
|
-
} else if (!dictionaries.has(id =
|
|
9648
|
+
} else if (!dictionaries.has(id = dictMeta.id().low)) {
|
|
9554
9649
|
keys = (keys = dictMeta.indexType()) ? decodeIndexType(keys) : new Int32();
|
|
9555
9650
|
dictionaries.set(id, type = decodeFieldType(f, decodeFieldChildren(f, dictionaries)));
|
|
9556
9651
|
dictType = new Dictionary(type, keys, id, dictMeta.isOrdered());
|
|
@@ -9716,7 +9811,7 @@ function encodeRecordBatch(b, recordBatch) {
|
|
|
9716
9811
|
BufferRegion.encode(b, b_);
|
|
9717
9812
|
const buffersVectorOffset = b.endVector();
|
|
9718
9813
|
RecordBatch2.startRecordBatch(b);
|
|
9719
|
-
RecordBatch2.addLength(b,
|
|
9814
|
+
RecordBatch2.addLength(b, new Long4(recordBatch.length, 0));
|
|
9720
9815
|
RecordBatch2.addNodes(b, nodesVectorOffset);
|
|
9721
9816
|
RecordBatch2.addBuffers(b, buffersVectorOffset);
|
|
9722
9817
|
return RecordBatch2.endRecordBatch(b);
|
|
@@ -9724,16 +9819,16 @@ function encodeRecordBatch(b, recordBatch) {
|
|
|
9724
9819
|
function encodeDictionaryBatch(b, dictionaryBatch) {
|
|
9725
9820
|
const dataOffset = RecordBatch3.encode(b, dictionaryBatch.data);
|
|
9726
9821
|
DictionaryBatch.startDictionaryBatch(b);
|
|
9727
|
-
DictionaryBatch.addId(b,
|
|
9822
|
+
DictionaryBatch.addId(b, new Long4(dictionaryBatch.id, 0));
|
|
9728
9823
|
DictionaryBatch.addIsDelta(b, dictionaryBatch.isDelta);
|
|
9729
9824
|
DictionaryBatch.addData(b, dataOffset);
|
|
9730
9825
|
return DictionaryBatch.endDictionaryBatch(b);
|
|
9731
9826
|
}
|
|
9732
9827
|
function encodeFieldNode(b, node) {
|
|
9733
|
-
return FieldNode.createFieldNode(b,
|
|
9828
|
+
return FieldNode.createFieldNode(b, new Long4(node.length, 0), new Long4(node.nullCount, 0));
|
|
9734
9829
|
}
|
|
9735
9830
|
function encodeBufferRegion(b, node) {
|
|
9736
|
-
return Buffer2.createBuffer(b,
|
|
9831
|
+
return Buffer2.createBuffer(b, new Long4(node.offset, 0), new Long4(node.length, 0));
|
|
9737
9832
|
}
|
|
9738
9833
|
var platformIsLittleEndian = (() => {
|
|
9739
9834
|
const buffer = new ArrayBuffer(2);
|
|
@@ -9746,7 +9841,7 @@ var platformIsLittleEndian = (() => {
|
|
|
9746
9841
|
return new Int16Array(buffer)[0] === 256;
|
|
9747
9842
|
})();
|
|
9748
9843
|
|
|
9749
|
-
//
|
|
9844
|
+
// ../../node_modules/apache-arrow/ipc/message.mjs
|
|
9750
9845
|
var invalidMessageType = (type) => `Expected ${MessageHeader[type]} Message in stream, but was null or length 0.`;
|
|
9751
9846
|
var nullMessage = (type) => `Header pointer of flatbuffer-encoded ${MessageHeader[type]} Message is null or length 0.`;
|
|
9752
9847
|
var invalidMessageMetadata = (expected, actual) => `Expected to read ${expected} metadata bytes, but only read ${actual}.`;
|
|
@@ -10001,7 +10096,7 @@ var magicLength = MAGIC.length;
|
|
|
10001
10096
|
var magicAndPadding = magicLength + PADDING;
|
|
10002
10097
|
var magicX2AndPadding = magicLength * 2 + PADDING;
|
|
10003
10098
|
|
|
10004
|
-
//
|
|
10099
|
+
// ../../node_modules/apache-arrow/ipc/reader.mjs
|
|
10005
10100
|
var RecordBatchReader = class extends ReadableInterop {
|
|
10006
10101
|
constructor(impl) {
|
|
10007
10102
|
super();
|
|
@@ -10136,26 +10231,20 @@ var AsyncRecordBatchStreamReader = class extends RecordBatchReader {
|
|
|
10136
10231
|
this._impl = _impl;
|
|
10137
10232
|
}
|
|
10138
10233
|
readAll() {
|
|
10139
|
-
var
|
|
10234
|
+
var e_1, _a5;
|
|
10140
10235
|
return __awaiter(this, void 0, void 0, function* () {
|
|
10141
10236
|
const batches = new Array();
|
|
10142
10237
|
try {
|
|
10143
|
-
for (var
|
|
10144
|
-
|
|
10145
|
-
|
|
10146
|
-
try {
|
|
10147
|
-
const batch = _c2;
|
|
10148
|
-
batches.push(batch);
|
|
10149
|
-
} finally {
|
|
10150
|
-
_d2 = true;
|
|
10151
|
-
}
|
|
10238
|
+
for (var _b2 = __asyncValues(this), _c2; _c2 = yield _b2.next(), !_c2.done; ) {
|
|
10239
|
+
const batch = _c2.value;
|
|
10240
|
+
batches.push(batch);
|
|
10152
10241
|
}
|
|
10153
10242
|
} catch (e_1_1) {
|
|
10154
10243
|
e_1 = { error: e_1_1 };
|
|
10155
10244
|
} finally {
|
|
10156
10245
|
try {
|
|
10157
|
-
if (
|
|
10158
|
-
yield
|
|
10246
|
+
if (_c2 && !_c2.done && (_a5 = _b2.return))
|
|
10247
|
+
yield _a5.call(_b2);
|
|
10159
10248
|
} finally {
|
|
10160
10249
|
if (e_1)
|
|
10161
10250
|
throw e_1.error;
|
|
@@ -10184,12 +10273,6 @@ var AsyncRecordBatchFileReader = class extends AsyncRecordBatchStreamReader {
|
|
|
10184
10273
|
}
|
|
10185
10274
|
};
|
|
10186
10275
|
var RecordBatchReaderImpl = class {
|
|
10187
|
-
get numDictionaries() {
|
|
10188
|
-
return this._dictionaryIndex;
|
|
10189
|
-
}
|
|
10190
|
-
get numRecordBatches() {
|
|
10191
|
-
return this._recordBatchIndex;
|
|
10192
|
-
}
|
|
10193
10276
|
constructor(dictionaries = /* @__PURE__ */ new Map()) {
|
|
10194
10277
|
this.closed = false;
|
|
10195
10278
|
this.autoDestroy = true;
|
|
@@ -10197,6 +10280,12 @@ var RecordBatchReaderImpl = class {
|
|
|
10197
10280
|
this._recordBatchIndex = 0;
|
|
10198
10281
|
this.dictionaries = dictionaries;
|
|
10199
10282
|
}
|
|
10283
|
+
get numDictionaries() {
|
|
10284
|
+
return this._dictionaryIndex;
|
|
10285
|
+
}
|
|
10286
|
+
get numRecordBatches() {
|
|
10287
|
+
return this._recordBatchIndex;
|
|
10288
|
+
}
|
|
10200
10289
|
isSync() {
|
|
10201
10290
|
return false;
|
|
10202
10291
|
}
|
|
@@ -10399,6 +10488,9 @@ var AsyncRecordBatchStreamReaderImpl = class extends RecordBatchReaderImpl {
|
|
|
10399
10488
|
}
|
|
10400
10489
|
};
|
|
10401
10490
|
var RecordBatchFileReaderImpl = class extends RecordBatchStreamReaderImpl {
|
|
10491
|
+
constructor(source, dictionaries) {
|
|
10492
|
+
super(source instanceof RandomAccessFile ? source : new RandomAccessFile(source), dictionaries);
|
|
10493
|
+
}
|
|
10402
10494
|
get footer() {
|
|
10403
10495
|
return this._footer;
|
|
10404
10496
|
}
|
|
@@ -10408,9 +10500,6 @@ var RecordBatchFileReaderImpl = class extends RecordBatchStreamReaderImpl {
|
|
|
10408
10500
|
get numRecordBatches() {
|
|
10409
10501
|
return this._footer ? this._footer.numRecordBatches : 0;
|
|
10410
10502
|
}
|
|
10411
|
-
constructor(source, dictionaries) {
|
|
10412
|
-
super(source instanceof RandomAccessFile ? source : new RandomAccessFile(source), dictionaries);
|
|
10413
|
-
}
|
|
10414
10503
|
isSync() {
|
|
10415
10504
|
return true;
|
|
10416
10505
|
}
|
|
@@ -10481,6 +10570,11 @@ var RecordBatchFileReaderImpl = class extends RecordBatchStreamReaderImpl {
|
|
|
10481
10570
|
}
|
|
10482
10571
|
};
|
|
10483
10572
|
var AsyncRecordBatchFileReaderImpl = class extends AsyncRecordBatchStreamReaderImpl {
|
|
10573
|
+
constructor(source, ...rest) {
|
|
10574
|
+
const byteLength = typeof rest[0] !== "number" ? rest.shift() : void 0;
|
|
10575
|
+
const dictionaries = rest[0] instanceof Map ? rest.shift() : void 0;
|
|
10576
|
+
super(source instanceof AsyncRandomAccessFile ? source : new AsyncRandomAccessFile(source, byteLength), dictionaries);
|
|
10577
|
+
}
|
|
10484
10578
|
get footer() {
|
|
10485
10579
|
return this._footer;
|
|
10486
10580
|
}
|
|
@@ -10490,11 +10584,6 @@ var AsyncRecordBatchFileReaderImpl = class extends AsyncRecordBatchStreamReaderI
|
|
|
10490
10584
|
get numRecordBatches() {
|
|
10491
10585
|
return this._footer ? this._footer.numRecordBatches : 0;
|
|
10492
10586
|
}
|
|
10493
|
-
constructor(source, ...rest) {
|
|
10494
|
-
const byteLength = typeof rest[0] !== "number" ? rest.shift() : void 0;
|
|
10495
|
-
const dictionaries = rest[0] instanceof Map ? rest.shift() : void 0;
|
|
10496
|
-
super(source instanceof AsyncRandomAccessFile ? source : new AsyncRandomAccessFile(source, byteLength), dictionaries);
|
|
10497
|
-
}
|
|
10498
10587
|
isFile() {
|
|
10499
10588
|
return true;
|
|
10500
10589
|
}
|
|
@@ -10642,15 +10731,8 @@ function fromFileHandle(source) {
|
|
|
10642
10731
|
});
|
|
10643
10732
|
}
|
|
10644
10733
|
|
|
10645
|
-
//
|
|
10734
|
+
// ../../node_modules/apache-arrow/visitor/vectorassembler.mjs
|
|
10646
10735
|
var VectorAssembler = class extends Visitor {
|
|
10647
|
-
/** @nocollapse */
|
|
10648
|
-
static assemble(...args) {
|
|
10649
|
-
const unwrap = (nodes) => nodes.flatMap((node) => Array.isArray(node) ? unwrap(node) : node instanceof RecordBatch ? node.data.children : node.data);
|
|
10650
|
-
const assembler = new VectorAssembler();
|
|
10651
|
-
assembler.visitMany(unwrap(args));
|
|
10652
|
-
return assembler;
|
|
10653
|
-
}
|
|
10654
10736
|
constructor() {
|
|
10655
10737
|
super();
|
|
10656
10738
|
this._byteLength = 0;
|
|
@@ -10658,6 +10740,13 @@ var VectorAssembler = class extends Visitor {
|
|
|
10658
10740
|
this._buffers = [];
|
|
10659
10741
|
this._bufferRegions = [];
|
|
10660
10742
|
}
|
|
10743
|
+
/** @nocollapse */
|
|
10744
|
+
static assemble(...args) {
|
|
10745
|
+
const unwrap = (nodes) => nodes.flatMap((node) => Array.isArray(node) ? unwrap(node) : node instanceof RecordBatch ? node.data.children : node.data);
|
|
10746
|
+
const assembler = new VectorAssembler();
|
|
10747
|
+
assembler.visitMany(unwrap(args));
|
|
10748
|
+
return assembler;
|
|
10749
|
+
}
|
|
10661
10750
|
visit(data) {
|
|
10662
10751
|
if (data instanceof Vector) {
|
|
10663
10752
|
this.visitMany(data.data);
|
|
@@ -10784,17 +10873,8 @@ VectorAssembler.prototype.visitInterval = assembleFlatVector;
|
|
|
10784
10873
|
VectorAssembler.prototype.visitFixedSizeList = assembleListVector;
|
|
10785
10874
|
VectorAssembler.prototype.visitMap = assembleListVector;
|
|
10786
10875
|
|
|
10787
|
-
//
|
|
10876
|
+
// ../../node_modules/apache-arrow/ipc/writer.mjs
|
|
10788
10877
|
var RecordBatchWriter = class extends ReadableInterop {
|
|
10789
|
-
/** @nocollapse */
|
|
10790
|
-
// @ts-ignore
|
|
10791
|
-
static throughNode(options) {
|
|
10792
|
-
throw new Error(`"throughNode" not available in this environment`);
|
|
10793
|
-
}
|
|
10794
|
-
/** @nocollapse */
|
|
10795
|
-
static throughDOM(writableStrategy, readableStrategy) {
|
|
10796
|
-
throw new Error(`"throughDOM" not available in this environment`);
|
|
10797
|
-
}
|
|
10798
10878
|
constructor(options) {
|
|
10799
10879
|
super();
|
|
10800
10880
|
this._position = 0;
|
|
@@ -10808,19 +10888,28 @@ var RecordBatchWriter = class extends ReadableInterop {
|
|
|
10808
10888
|
this._autoDestroy = typeof options.autoDestroy === "boolean" ? options.autoDestroy : true;
|
|
10809
10889
|
this._writeLegacyIpcFormat = typeof options.writeLegacyIpcFormat === "boolean" ? options.writeLegacyIpcFormat : false;
|
|
10810
10890
|
}
|
|
10891
|
+
/** @nocollapse */
|
|
10892
|
+
// @ts-ignore
|
|
10893
|
+
static throughNode(options) {
|
|
10894
|
+
throw new Error(`"throughNode" not available in this environment`);
|
|
10895
|
+
}
|
|
10896
|
+
/** @nocollapse */
|
|
10897
|
+
static throughDOM(writableStrategy, readableStrategy) {
|
|
10898
|
+
throw new Error(`"throughDOM" not available in this environment`);
|
|
10899
|
+
}
|
|
10811
10900
|
toString(sync = false) {
|
|
10812
10901
|
return this._sink.toString(sync);
|
|
10813
10902
|
}
|
|
10814
10903
|
toUint8Array(sync = false) {
|
|
10815
10904
|
return this._sink.toUint8Array(sync);
|
|
10816
10905
|
}
|
|
10817
|
-
writeAll(
|
|
10818
|
-
if (isPromise(
|
|
10819
|
-
return
|
|
10820
|
-
} else if (isAsyncIterable(
|
|
10821
|
-
return writeAllAsync(this,
|
|
10906
|
+
writeAll(input2) {
|
|
10907
|
+
if (isPromise(input2)) {
|
|
10908
|
+
return input2.then((x) => this.writeAll(x));
|
|
10909
|
+
} else if (isAsyncIterable(input2)) {
|
|
10910
|
+
return writeAllAsync(this, input2);
|
|
10822
10911
|
}
|
|
10823
|
-
return writeAll(this,
|
|
10912
|
+
return writeAll(this, input2);
|
|
10824
10913
|
}
|
|
10825
10914
|
get closed() {
|
|
10826
10915
|
return this._sink.closed;
|
|
@@ -10987,26 +11076,26 @@ var RecordBatchWriter = class extends ReadableInterop {
|
|
|
10987
11076
|
};
|
|
10988
11077
|
var RecordBatchStreamWriter = class extends RecordBatchWriter {
|
|
10989
11078
|
/** @nocollapse */
|
|
10990
|
-
static writeAll(
|
|
11079
|
+
static writeAll(input2, options) {
|
|
10991
11080
|
const writer = new RecordBatchStreamWriter(options);
|
|
10992
|
-
if (isPromise(
|
|
10993
|
-
return
|
|
10994
|
-
} else if (isAsyncIterable(
|
|
10995
|
-
return writeAllAsync(writer,
|
|
11081
|
+
if (isPromise(input2)) {
|
|
11082
|
+
return input2.then((x) => writer.writeAll(x));
|
|
11083
|
+
} else if (isAsyncIterable(input2)) {
|
|
11084
|
+
return writeAllAsync(writer, input2);
|
|
10996
11085
|
}
|
|
10997
|
-
return writeAll(writer,
|
|
11086
|
+
return writeAll(writer, input2);
|
|
10998
11087
|
}
|
|
10999
11088
|
};
|
|
11000
11089
|
var RecordBatchFileWriter = class extends RecordBatchWriter {
|
|
11001
11090
|
/** @nocollapse */
|
|
11002
|
-
static writeAll(
|
|
11091
|
+
static writeAll(input2) {
|
|
11003
11092
|
const writer = new RecordBatchFileWriter();
|
|
11004
|
-
if (isPromise(
|
|
11005
|
-
return
|
|
11006
|
-
} else if (isAsyncIterable(
|
|
11007
|
-
return writeAllAsync(writer,
|
|
11093
|
+
if (isPromise(input2)) {
|
|
11094
|
+
return input2.then((x) => writer.writeAll(x));
|
|
11095
|
+
} else if (isAsyncIterable(input2)) {
|
|
11096
|
+
return writeAllAsync(writer, input2);
|
|
11008
11097
|
}
|
|
11009
|
-
return writeAll(writer,
|
|
11098
|
+
return writeAll(writer, input2);
|
|
11010
11099
|
}
|
|
11011
11100
|
constructor() {
|
|
11012
11101
|
super();
|
|
@@ -11021,11 +11110,11 @@ var RecordBatchFileWriter = class extends RecordBatchWriter {
|
|
|
11021
11110
|
return super._writeFooter(schema)._write(buffer)._write(Int32Array.of(buffer.byteLength))._writeMagic();
|
|
11022
11111
|
}
|
|
11023
11112
|
};
|
|
11024
|
-
function writeAll(writer,
|
|
11025
|
-
let chunks =
|
|
11026
|
-
if (
|
|
11027
|
-
chunks =
|
|
11028
|
-
writer.reset(void 0,
|
|
11113
|
+
function writeAll(writer, input2) {
|
|
11114
|
+
let chunks = input2;
|
|
11115
|
+
if (input2 instanceof Table) {
|
|
11116
|
+
chunks = input2.batches;
|
|
11117
|
+
writer.reset(void 0, input2.schema);
|
|
11029
11118
|
}
|
|
11030
11119
|
for (const batch of chunks) {
|
|
11031
11120
|
writer.write(batch);
|
|
@@ -11033,26 +11122,20 @@ function writeAll(writer, input) {
|
|
|
11033
11122
|
return writer.finish();
|
|
11034
11123
|
}
|
|
11035
11124
|
function writeAllAsync(writer, batches) {
|
|
11036
|
-
var
|
|
11037
|
-
var
|
|
11125
|
+
var batches_1, batches_1_1;
|
|
11126
|
+
var e_1, _a5;
|
|
11038
11127
|
return __awaiter(this, void 0, void 0, function* () {
|
|
11039
11128
|
try {
|
|
11040
|
-
for (
|
|
11041
|
-
|
|
11042
|
-
|
|
11043
|
-
try {
|
|
11044
|
-
const batch = _d2;
|
|
11045
|
-
writer.write(batch);
|
|
11046
|
-
} finally {
|
|
11047
|
-
_a5 = true;
|
|
11048
|
-
}
|
|
11129
|
+
for (batches_1 = __asyncValues(batches); batches_1_1 = yield batches_1.next(), !batches_1_1.done; ) {
|
|
11130
|
+
const batch = batches_1_1.value;
|
|
11131
|
+
writer.write(batch);
|
|
11049
11132
|
}
|
|
11050
11133
|
} catch (e_1_1) {
|
|
11051
11134
|
e_1 = { error: e_1_1 };
|
|
11052
11135
|
} finally {
|
|
11053
11136
|
try {
|
|
11054
|
-
if (
|
|
11055
|
-
yield
|
|
11137
|
+
if (batches_1_1 && !batches_1_1.done && (_a5 = batches_1.return))
|
|
11138
|
+
yield _a5.call(batches_1);
|
|
11056
11139
|
} finally {
|
|
11057
11140
|
if (e_1)
|
|
11058
11141
|
throw e_1.error;
|
|
@@ -11062,7 +11145,7 @@ function writeAllAsync(writer, batches) {
|
|
|
11062
11145
|
});
|
|
11063
11146
|
}
|
|
11064
11147
|
|
|
11065
|
-
//
|
|
11148
|
+
// ../../node_modules/apache-arrow/io/whatwg/iterable.mjs
|
|
11066
11149
|
function toDOMStream(source, options) {
|
|
11067
11150
|
if (isAsyncIterable(source)) {
|
|
11068
11151
|
return asyncIterableAsReadableDOMStream(source, options);
|
|
@@ -11145,7 +11228,7 @@ function asyncIterableAsReadableDOMStream(source, options) {
|
|
|
11145
11228
|
}
|
|
11146
11229
|
}
|
|
11147
11230
|
|
|
11148
|
-
//
|
|
11231
|
+
// ../../node_modules/apache-arrow/io/whatwg/builder.mjs
|
|
11149
11232
|
function builderThroughDOMStream(options) {
|
|
11150
11233
|
return new BuilderTransform(options);
|
|
11151
11234
|
}
|
|
@@ -11225,7 +11308,7 @@ var chunkByteLength = (chunk) => {
|
|
|
11225
11308
|
return (_a5 = chunk === null || chunk === void 0 ? void 0 : chunk.byteLength) !== null && _a5 !== void 0 ? _a5 : 0;
|
|
11226
11309
|
};
|
|
11227
11310
|
|
|
11228
|
-
//
|
|
11311
|
+
// ../../node_modules/apache-arrow/io/whatwg/reader.mjs
|
|
11229
11312
|
function recordBatchReaderThroughDOMStream(writableStrategy, readableStrategy) {
|
|
11230
11313
|
const queue = new AsyncByteQueue();
|
|
11231
11314
|
let reader = null;
|
|
@@ -11267,7 +11350,7 @@ function recordBatchReaderThroughDOMStream(writableStrategy, readableStrategy) {
|
|
|
11267
11350
|
}
|
|
11268
11351
|
}
|
|
11269
11352
|
|
|
11270
|
-
//
|
|
11353
|
+
// ../../node_modules/apache-arrow/io/whatwg/writer.mjs
|
|
11271
11354
|
function recordBatchWriterThroughDOMStream(writableStrategy, readableStrategy) {
|
|
11272
11355
|
const writer = new this(writableStrategy);
|
|
11273
11356
|
const reader = new AsyncByteStream(writer);
|
|
@@ -11305,9 +11388,9 @@ function recordBatchWriterThroughDOMStream(writableStrategy, readableStrategy) {
|
|
|
11305
11388
|
}
|
|
11306
11389
|
}
|
|
11307
11390
|
|
|
11308
|
-
//
|
|
11309
|
-
function tableFromIPC(
|
|
11310
|
-
const reader = RecordBatchReader.from(
|
|
11391
|
+
// ../../node_modules/apache-arrow/ipc/serialization.mjs
|
|
11392
|
+
function tableFromIPC(input2) {
|
|
11393
|
+
const reader = RecordBatchReader.from(input2);
|
|
11311
11394
|
if (isPromise(reader)) {
|
|
11312
11395
|
return reader.then((reader2) => tableFromIPC(reader2));
|
|
11313
11396
|
}
|
|
@@ -11317,14 +11400,14 @@ function tableFromIPC(input) {
|
|
|
11317
11400
|
return new Table(reader.readAll());
|
|
11318
11401
|
}
|
|
11319
11402
|
|
|
11320
|
-
//
|
|
11403
|
+
// ../../node_modules/apache-arrow/Arrow.mjs
|
|
11321
11404
|
var util = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, bn_exports), int_exports), bit_exports), math_exports), buffer_exports), vector_exports), {
|
|
11322
11405
|
compareSchemas,
|
|
11323
11406
|
compareFields,
|
|
11324
11407
|
compareTypes
|
|
11325
11408
|
});
|
|
11326
11409
|
|
|
11327
|
-
//
|
|
11410
|
+
// ../../node_modules/apache-arrow/Arrow.dom.mjs
|
|
11328
11411
|
adapters_default.toDOMStream = toDOMStream;
|
|
11329
11412
|
Builder["throughDOM"] = builderThroughDOMStream;
|
|
11330
11413
|
RecordBatchReader["throughDOM"] = recordBatchReaderThroughDOMStream;
|
|
@@ -11459,9 +11542,9 @@ var Ref = class {
|
|
|
11459
11542
|
* @param {string|Ref|null} table The table name.
|
|
11460
11543
|
* @param {string|null} column The column name.
|
|
11461
11544
|
*/
|
|
11462
|
-
constructor(
|
|
11463
|
-
if (
|
|
11464
|
-
this.table = String(
|
|
11545
|
+
constructor(table2, column2) {
|
|
11546
|
+
if (table2)
|
|
11547
|
+
this.table = String(table2);
|
|
11465
11548
|
if (column2)
|
|
11466
11549
|
this.column = column2;
|
|
11467
11550
|
}
|
|
@@ -11477,12 +11560,12 @@ var Ref = class {
|
|
|
11477
11560
|
* @returns {string} The SQL string.
|
|
11478
11561
|
*/
|
|
11479
11562
|
toString() {
|
|
11480
|
-
const { table, column: column2 } = this;
|
|
11563
|
+
const { table: table2, column: column2 } = this;
|
|
11481
11564
|
if (column2) {
|
|
11482
11565
|
const col = column2.startsWith("*") ? column2 : `"${column2}"`;
|
|
11483
|
-
return `${
|
|
11566
|
+
return `${table2 ? `"${table2}".` : ""}${col}`;
|
|
11484
11567
|
} else {
|
|
11485
|
-
return
|
|
11568
|
+
return table2 ? `"${table2}"` : "NULL";
|
|
11486
11569
|
}
|
|
11487
11570
|
}
|
|
11488
11571
|
};
|
|
@@ -11498,12 +11581,12 @@ function asRelation(value) {
|
|
|
11498
11581
|
function relation(name) {
|
|
11499
11582
|
return new Ref(name);
|
|
11500
11583
|
}
|
|
11501
|
-
function column(
|
|
11584
|
+
function column(table2, column2) {
|
|
11502
11585
|
if (arguments.length === 1) {
|
|
11503
|
-
column2 =
|
|
11504
|
-
|
|
11586
|
+
column2 = table2;
|
|
11587
|
+
table2 = null;
|
|
11505
11588
|
}
|
|
11506
|
-
return new Ref(
|
|
11589
|
+
return new Ref(table2, column2);
|
|
11507
11590
|
}
|
|
11508
11591
|
|
|
11509
11592
|
// ../sql/src/to-sql.js
|
|
@@ -12060,7 +12143,7 @@ var Query = class {
|
|
|
12060
12143
|
} else {
|
|
12061
12144
|
let spec = value;
|
|
12062
12145
|
if (typeof value === "number") {
|
|
12063
|
-
spec = value > 0 && value < 1 ? { perc: 100 * value, method } : { rows: Math.round(value, method
|
|
12146
|
+
spec = value > 0 && value < 1 ? { perc: 100 * value, method } : { rows: Math.round(value), method };
|
|
12064
12147
|
}
|
|
12065
12148
|
query.sample = spec;
|
|
12066
12149
|
return this;
|
|
@@ -12092,6 +12175,10 @@ var Query = class {
|
|
|
12092
12175
|
return this;
|
|
12093
12176
|
}
|
|
12094
12177
|
}
|
|
12178
|
+
$groupby(...expr) {
|
|
12179
|
+
this.query.groupby = [];
|
|
12180
|
+
return this.groupby(...expr);
|
|
12181
|
+
}
|
|
12095
12182
|
having(...expr) {
|
|
12096
12183
|
const { query } = this;
|
|
12097
12184
|
if (expr.length === 0) {
|
|
@@ -12332,8 +12419,8 @@ var statMap = {
|
|
|
12332
12419
|
[Min]: min,
|
|
12333
12420
|
[Nulls]: (column2) => count().where(isNull(column2))
|
|
12334
12421
|
};
|
|
12335
|
-
function summarize({ table, column: column2 }, stats) {
|
|
12336
|
-
return Query.from(
|
|
12422
|
+
function summarize({ table: table2, column: column2 }, stats) {
|
|
12423
|
+
return Query.from(table2).select(stats.map((s) => [s, statMap[s](column2)]));
|
|
12337
12424
|
}
|
|
12338
12425
|
|
|
12339
12426
|
// ../core/src/Catalog.js
|
|
@@ -12346,31 +12433,19 @@ var Catalog = class {
|
|
|
12346
12433
|
clear() {
|
|
12347
12434
|
this.tables = object();
|
|
12348
12435
|
}
|
|
12349
|
-
|
|
12436
|
+
tableInfo(table2) {
|
|
12350
12437
|
const cache = this.tables;
|
|
12351
|
-
if (cache[
|
|
12352
|
-
return cache[
|
|
12438
|
+
if (cache[table2]) {
|
|
12439
|
+
return cache[table2];
|
|
12353
12440
|
}
|
|
12354
|
-
const
|
|
12355
|
-
|
|
12356
|
-
|
|
12357
|
-
);
|
|
12358
|
-
return cache[table] = q.then((result) => {
|
|
12359
|
-
const columns = object();
|
|
12360
|
-
for (const entry of result) {
|
|
12361
|
-
columns[entry.column_name] = {
|
|
12362
|
-
table,
|
|
12363
|
-
column: entry.column_name,
|
|
12364
|
-
sqlType: entry.column_type,
|
|
12365
|
-
type: jsType(entry.column_type),
|
|
12366
|
-
nullable: entry.null === "YES"
|
|
12367
|
-
};
|
|
12368
|
-
}
|
|
12369
|
-
return columns;
|
|
12441
|
+
const infoPromise = getTableInfo(this.mc, table2).catch((err) => {
|
|
12442
|
+
cache[table2] = null;
|
|
12443
|
+
throw err;
|
|
12370
12444
|
});
|
|
12445
|
+
return cache[table2] = infoPromise;
|
|
12371
12446
|
}
|
|
12372
|
-
async fieldInfo({ table, column: column2, stats }) {
|
|
12373
|
-
const tableInfo = await this.tableInfo(
|
|
12447
|
+
async fieldInfo({ table: table2, column: column2, stats }) {
|
|
12448
|
+
const tableInfo = await this.tableInfo(table2);
|
|
12374
12449
|
const colInfo = tableInfo[column2];
|
|
12375
12450
|
if (colInfo == null)
|
|
12376
12451
|
return;
|
|
@@ -12395,6 +12470,23 @@ var Catalog = class {
|
|
|
12395
12470
|
return data.filter((x) => x);
|
|
12396
12471
|
}
|
|
12397
12472
|
};
|
|
12473
|
+
async function getTableInfo(mc, table2) {
|
|
12474
|
+
const result = await mc.query(
|
|
12475
|
+
`DESCRIBE "${table2}"`,
|
|
12476
|
+
{ type: "json", cache: false }
|
|
12477
|
+
);
|
|
12478
|
+
const columns = object();
|
|
12479
|
+
for (const entry of result) {
|
|
12480
|
+
columns[entry.column_name] = {
|
|
12481
|
+
table: table2,
|
|
12482
|
+
column: entry.column_name,
|
|
12483
|
+
sqlType: entry.column_type,
|
|
12484
|
+
type: jsType(entry.column_type),
|
|
12485
|
+
nullable: entry.null === "YES"
|
|
12486
|
+
};
|
|
12487
|
+
}
|
|
12488
|
+
return columns;
|
|
12489
|
+
}
|
|
12398
12490
|
async function resolveFields(catalog, list) {
|
|
12399
12491
|
return list.length === 1 && list[0].column === "*" ? Object.values(await catalog.tableInfo(list[0].table)) : list;
|
|
12400
12492
|
}
|
|
@@ -12479,9 +12571,9 @@ var DataTileIndexer = class {
|
|
|
12479
12571
|
}
|
|
12480
12572
|
const sql2 = query.toString();
|
|
12481
12573
|
const id = (fnv_hash(sql2) >>> 0).toString(16);
|
|
12482
|
-
const
|
|
12483
|
-
const result = createIndex(this.mc,
|
|
12484
|
-
indices.set(client, { table, result, ...index });
|
|
12574
|
+
const table2 = `tile_index_${id}`;
|
|
12575
|
+
const result = createIndex(this.mc, table2, sql2);
|
|
12576
|
+
indices.set(client, { table: table2, result, ...index });
|
|
12485
12577
|
}
|
|
12486
12578
|
}
|
|
12487
12579
|
async update() {
|
|
@@ -12498,8 +12590,8 @@ var DataTileIndexer = class {
|
|
|
12498
12590
|
if (!filter) {
|
|
12499
12591
|
filter = this.activeView.predicate(this.selection.active.predicate);
|
|
12500
12592
|
}
|
|
12501
|
-
const { table, dims, aggr } = index;
|
|
12502
|
-
const query = Query.select(dims, aggr).from(
|
|
12593
|
+
const { table: table2, dims, aggr } = index;
|
|
12594
|
+
const query = Query.select(dims, aggr).from(table2).groupby(dims).where(filter);
|
|
12503
12595
|
return this.mc.updateClient(client, query);
|
|
12504
12596
|
}
|
|
12505
12597
|
};
|
|
@@ -12566,8 +12658,8 @@ function binFunction(domain, range, pixelSize, lift, toSql) {
|
|
|
12566
12658
|
const s = pixelSize === 1 ? "" : `${pixelSize}::INTEGER * `;
|
|
12567
12659
|
return (value) => sql`${s}FLOOR(${a}::DOUBLE * (${toSql(value)} - ${lo}::DOUBLE))::INTEGER`;
|
|
12568
12660
|
}
|
|
12569
|
-
function createIndex(mc,
|
|
12570
|
-
return mc.exec(`CREATE TEMP TABLE IF NOT EXISTS ${
|
|
12661
|
+
function createIndex(mc, table2, query) {
|
|
12662
|
+
return mc.exec(`CREATE TEMP TABLE IF NOT EXISTS ${table2} AS ${query}`);
|
|
12571
12663
|
}
|
|
12572
12664
|
var NO_INDEX = { from: NaN };
|
|
12573
12665
|
function getIndexColumns(client) {
|
|
@@ -12690,6 +12782,164 @@ function defaultUpdate(mc, clients, selection) {
|
|
|
12690
12782
|
}));
|
|
12691
12783
|
}
|
|
12692
12784
|
|
|
12785
|
+
// ../core/src/util/query-result.js
|
|
12786
|
+
function queryResult() {
|
|
12787
|
+
let resolve;
|
|
12788
|
+
let reject;
|
|
12789
|
+
const p = new Promise((r, e) => {
|
|
12790
|
+
resolve = r;
|
|
12791
|
+
reject = e;
|
|
12792
|
+
});
|
|
12793
|
+
p.fulfill = (value) => (resolve(value), p);
|
|
12794
|
+
p.reject = (err) => (reject(err), p);
|
|
12795
|
+
return p;
|
|
12796
|
+
}
|
|
12797
|
+
|
|
12798
|
+
// ../core/src/QueryConsolidator.js
|
|
12799
|
+
function consolidator(enqueue, cache, record) {
|
|
12800
|
+
let pending = [];
|
|
12801
|
+
let id = 0;
|
|
12802
|
+
function run() {
|
|
12803
|
+
const groups = entryGroups(pending, cache);
|
|
12804
|
+
pending = [];
|
|
12805
|
+
id = 0;
|
|
12806
|
+
for (const group of groups) {
|
|
12807
|
+
consolidate(group, enqueue, record);
|
|
12808
|
+
processResults(group, cache);
|
|
12809
|
+
}
|
|
12810
|
+
}
|
|
12811
|
+
return {
|
|
12812
|
+
add(entry, priority) {
|
|
12813
|
+
if (entry.request.type === "arrow") {
|
|
12814
|
+
id = id || requestAnimationFrame(() => run());
|
|
12815
|
+
pending.push({ entry, priority, index: pending.length });
|
|
12816
|
+
} else {
|
|
12817
|
+
enqueue(entry, priority);
|
|
12818
|
+
}
|
|
12819
|
+
}
|
|
12820
|
+
};
|
|
12821
|
+
}
|
|
12822
|
+
function entryGroups(entries, cache) {
|
|
12823
|
+
const groups = [];
|
|
12824
|
+
const groupMap = /* @__PURE__ */ new Map();
|
|
12825
|
+
for (const query of entries) {
|
|
12826
|
+
const { entry: { request } } = query;
|
|
12827
|
+
const key = consolidationKey(request.query, cache);
|
|
12828
|
+
if (!groupMap.has(key)) {
|
|
12829
|
+
const list = [];
|
|
12830
|
+
groups.push(list);
|
|
12831
|
+
groupMap.set(key, list);
|
|
12832
|
+
}
|
|
12833
|
+
groupMap.get(key).push(query);
|
|
12834
|
+
}
|
|
12835
|
+
return groups;
|
|
12836
|
+
}
|
|
12837
|
+
function consolidationKey(query, cache) {
|
|
12838
|
+
const sql2 = `${query}`;
|
|
12839
|
+
if (query instanceof Query && !cache.get(sql2)) {
|
|
12840
|
+
if (query.orderby().length || query.where().length || query.qualify().length || query.having().length) {
|
|
12841
|
+
return sql2;
|
|
12842
|
+
}
|
|
12843
|
+
const q = query.clone().$select("*");
|
|
12844
|
+
const groupby = query.groupby();
|
|
12845
|
+
if (groupby.length) {
|
|
12846
|
+
const map = {};
|
|
12847
|
+
query.select().forEach(({ as, expr }) => map[as] = expr);
|
|
12848
|
+
q.$groupby(groupby.map((e) => e instanceof Ref && map[e.column] || e));
|
|
12849
|
+
}
|
|
12850
|
+
return `${q}`;
|
|
12851
|
+
} else {
|
|
12852
|
+
return sql2;
|
|
12853
|
+
}
|
|
12854
|
+
}
|
|
12855
|
+
function consolidate(group, enqueue, record) {
|
|
12856
|
+
if (shouldConsolidate(group)) {
|
|
12857
|
+
enqueue({
|
|
12858
|
+
request: {
|
|
12859
|
+
type: "arrow",
|
|
12860
|
+
cache: false,
|
|
12861
|
+
record: false,
|
|
12862
|
+
query: consolidatedQuery(group, record)
|
|
12863
|
+
},
|
|
12864
|
+
result: group.result = queryResult()
|
|
12865
|
+
});
|
|
12866
|
+
} else {
|
|
12867
|
+
for (const { entry, priority } of group) {
|
|
12868
|
+
enqueue(entry, priority);
|
|
12869
|
+
}
|
|
12870
|
+
}
|
|
12871
|
+
}
|
|
12872
|
+
function shouldConsolidate(group) {
|
|
12873
|
+
if (group.length > 1) {
|
|
12874
|
+
const sql2 = `${group[0].entry.request.query}`;
|
|
12875
|
+
for (let i = 1; i < group.length; ++i) {
|
|
12876
|
+
if (sql2 !== `${group[i].entry.request.query}`) {
|
|
12877
|
+
return true;
|
|
12878
|
+
}
|
|
12879
|
+
}
|
|
12880
|
+
}
|
|
12881
|
+
return false;
|
|
12882
|
+
}
|
|
12883
|
+
function consolidatedQuery(group, record) {
|
|
12884
|
+
const maps = group.maps = [];
|
|
12885
|
+
const fields = /* @__PURE__ */ new Map();
|
|
12886
|
+
for (const item of group) {
|
|
12887
|
+
const { query: query2 } = item.entry.request;
|
|
12888
|
+
const fieldMap = [];
|
|
12889
|
+
maps.push(fieldMap);
|
|
12890
|
+
for (const { as, expr } of query2.select()) {
|
|
12891
|
+
const e = `${expr}`;
|
|
12892
|
+
if (!fields.has(e)) {
|
|
12893
|
+
fields.set(e, [`col${fields.size}`, expr]);
|
|
12894
|
+
}
|
|
12895
|
+
const [name] = fields.get(e);
|
|
12896
|
+
fieldMap.push([name, as]);
|
|
12897
|
+
}
|
|
12898
|
+
record(`${query2}`);
|
|
12899
|
+
}
|
|
12900
|
+
const query = group[0].entry.request.query.clone();
|
|
12901
|
+
const groupby = query.groupby();
|
|
12902
|
+
if (groupby.length) {
|
|
12903
|
+
const map = {};
|
|
12904
|
+
group.maps[0].forEach(([name, as]) => map[as] = name);
|
|
12905
|
+
query.$groupby(groupby.map((e) => e instanceof Ref && map[e.column] || e));
|
|
12906
|
+
}
|
|
12907
|
+
return query.$select(Array.from(fields.values()));
|
|
12908
|
+
}
|
|
12909
|
+
async function processResults(group, cache) {
|
|
12910
|
+
const { maps, result } = group;
|
|
12911
|
+
if (!maps)
|
|
12912
|
+
return;
|
|
12913
|
+
let data;
|
|
12914
|
+
try {
|
|
12915
|
+
data = await result;
|
|
12916
|
+
} catch (err) {
|
|
12917
|
+
for (const { entry } of group) {
|
|
12918
|
+
entry.result.reject(err);
|
|
12919
|
+
}
|
|
12920
|
+
return;
|
|
12921
|
+
}
|
|
12922
|
+
group.forEach(({ entry }, index) => {
|
|
12923
|
+
const { request, result: result2 } = entry;
|
|
12924
|
+
const projected = projectResult(data, maps[index]);
|
|
12925
|
+
if (request.cache) {
|
|
12926
|
+
cache.set(String(request.query), projected);
|
|
12927
|
+
}
|
|
12928
|
+
result2.fulfill(projected);
|
|
12929
|
+
});
|
|
12930
|
+
}
|
|
12931
|
+
function projectResult(data, map) {
|
|
12932
|
+
if (map) {
|
|
12933
|
+
const cols = {};
|
|
12934
|
+
for (const [name, as] of map) {
|
|
12935
|
+
cols[as] = data.getChild(name);
|
|
12936
|
+
}
|
|
12937
|
+
return new data.constructor(cols);
|
|
12938
|
+
} else {
|
|
12939
|
+
return data;
|
|
12940
|
+
}
|
|
12941
|
+
}
|
|
12942
|
+
|
|
12693
12943
|
// ../core/src/util/cache.js
|
|
12694
12944
|
var requestIdle = typeof requestIdleCallback !== "undefined" ? requestIdleCallback : setTimeout;
|
|
12695
12945
|
var voidCache = () => ({
|
|
@@ -12829,6 +13079,7 @@ function QueryManager() {
|
|
|
12829
13079
|
let logger;
|
|
12830
13080
|
let recorders = [];
|
|
12831
13081
|
let pending = null;
|
|
13082
|
+
let consolidate2;
|
|
12832
13083
|
function next() {
|
|
12833
13084
|
if (pending || queue.isEmpty())
|
|
12834
13085
|
return;
|
|
@@ -12839,12 +13090,21 @@ function QueryManager() {
|
|
|
12839
13090
|
next();
|
|
12840
13091
|
});
|
|
12841
13092
|
}
|
|
13093
|
+
function enqueue(entry, priority = Priority.Normal) {
|
|
13094
|
+
queue.insert(entry, priority);
|
|
13095
|
+
next();
|
|
13096
|
+
}
|
|
13097
|
+
function recordQuery(sql2) {
|
|
13098
|
+
if (recorders.length && sql2) {
|
|
13099
|
+
recorders.forEach((rec) => rec.add(sql2));
|
|
13100
|
+
}
|
|
13101
|
+
}
|
|
12842
13102
|
async function submit(request, result) {
|
|
12843
13103
|
try {
|
|
12844
|
-
const { query, type, cache = false, options } = request;
|
|
12845
|
-
const sql2 = query ?
|
|
12846
|
-
if (
|
|
12847
|
-
|
|
13104
|
+
const { query, type, cache = false, record = true, options } = request;
|
|
13105
|
+
const sql2 = query ? `${query}` : null;
|
|
13106
|
+
if (record) {
|
|
13107
|
+
recordQuery(sql2);
|
|
12848
13108
|
}
|
|
12849
13109
|
if (cache) {
|
|
12850
13110
|
const cached = clientCache.get(sql2);
|
|
@@ -12874,16 +13134,33 @@ function QueryManager() {
|
|
|
12874
13134
|
connector(connector) {
|
|
12875
13135
|
return connector ? db = connector : db;
|
|
12876
13136
|
},
|
|
13137
|
+
consolidate(flag) {
|
|
13138
|
+
if (flag && !consolidate2) {
|
|
13139
|
+
consolidate2 = consolidator(enqueue, clientCache, recordQuery);
|
|
13140
|
+
} else if (!flag && consolidate2) {
|
|
13141
|
+
consolidate2 = null;
|
|
13142
|
+
}
|
|
13143
|
+
},
|
|
12877
13144
|
request(request, priority = Priority.Normal) {
|
|
12878
13145
|
const result = queryResult();
|
|
12879
|
-
|
|
12880
|
-
|
|
13146
|
+
const entry = { request, result };
|
|
13147
|
+
if (consolidate2) {
|
|
13148
|
+
consolidate2.add(entry, priority);
|
|
13149
|
+
} else {
|
|
13150
|
+
enqueue(entry, priority);
|
|
13151
|
+
}
|
|
12881
13152
|
return result;
|
|
12882
13153
|
},
|
|
12883
13154
|
cancel(requests) {
|
|
12884
13155
|
const set = new Set(requests);
|
|
12885
13156
|
queue.remove(({ result }) => set.has(result));
|
|
12886
13157
|
},
|
|
13158
|
+
clear() {
|
|
13159
|
+
queue.remove(({ result }) => {
|
|
13160
|
+
result.reject("Cleared");
|
|
13161
|
+
return true;
|
|
13162
|
+
});
|
|
13163
|
+
},
|
|
12887
13164
|
record() {
|
|
12888
13165
|
let state = [];
|
|
12889
13166
|
const recorder = {
|
|
@@ -12906,17 +13183,6 @@ function QueryManager() {
|
|
|
12906
13183
|
}
|
|
12907
13184
|
};
|
|
12908
13185
|
}
|
|
12909
|
-
function queryResult() {
|
|
12910
|
-
let resolve;
|
|
12911
|
-
let reject;
|
|
12912
|
-
const p = new Promise((r, e) => {
|
|
12913
|
-
resolve = r;
|
|
12914
|
-
reject = e;
|
|
12915
|
-
});
|
|
12916
|
-
p.fulfill = (value) => (resolve(value), p);
|
|
12917
|
-
p.reject = (err) => (reject(err), p);
|
|
12918
|
-
return p;
|
|
12919
|
-
}
|
|
12920
13186
|
|
|
12921
13187
|
// ../core/src/util/void-logger.js
|
|
12922
13188
|
function voidLogger() {
|
|
@@ -12952,7 +13218,6 @@ var Coordinator = class {
|
|
|
12952
13218
|
this.configure(options);
|
|
12953
13219
|
this.databaseConnector(db);
|
|
12954
13220
|
this.clear();
|
|
12955
|
-
this._recorders = [];
|
|
12956
13221
|
}
|
|
12957
13222
|
logger(logger) {
|
|
12958
13223
|
if (arguments.length) {
|
|
@@ -12961,11 +13226,13 @@ var Coordinator = class {
|
|
|
12961
13226
|
}
|
|
12962
13227
|
return this._logger;
|
|
12963
13228
|
}
|
|
12964
|
-
configure({ cache = true, indexes = true }) {
|
|
13229
|
+
configure({ cache = true, consolidate: consolidate2 = true, indexes = true }) {
|
|
12965
13230
|
this.manager.cache(cache);
|
|
13231
|
+
this.manager.consolidate(consolidate2);
|
|
12966
13232
|
this.indexes = indexes;
|
|
12967
13233
|
}
|
|
12968
13234
|
clear({ clients = true, cache = true, catalog = false } = {}) {
|
|
13235
|
+
this.manager.clear();
|
|
12969
13236
|
if (clients) {
|
|
12970
13237
|
this.clients?.forEach((client) => this.disconnect(client));
|
|
12971
13238
|
this.filterGroups?.forEach((group) => group.finalize());
|
|
@@ -13021,6 +13288,11 @@ var Coordinator = class {
|
|
|
13021
13288
|
this.filterGroups.get(client.filterBy)?.reset();
|
|
13022
13289
|
return query ? this.updateClient(client, query) : client.update();
|
|
13023
13290
|
}
|
|
13291
|
+
/**
|
|
13292
|
+
* Connect a client to the coordinator.
|
|
13293
|
+
*
|
|
13294
|
+
* @param {import('./MosaicClient.js').MosaicClient} client the client to disconnect
|
|
13295
|
+
*/
|
|
13024
13296
|
async connect(client) {
|
|
13025
13297
|
const { catalog, clients, filterGroups, indexes } = this;
|
|
13026
13298
|
if (clients.has(client)) {
|
|
@@ -13042,6 +13314,11 @@ var Coordinator = class {
|
|
|
13042
13314
|
}
|
|
13043
13315
|
client.requestQuery();
|
|
13044
13316
|
}
|
|
13317
|
+
/**
|
|
13318
|
+
* Disconnect a client from the coordinator.
|
|
13319
|
+
*
|
|
13320
|
+
* @param {import('./MosaicClient.js').MosaicClient} client the client to disconnect
|
|
13321
|
+
*/
|
|
13045
13322
|
disconnect(client) {
|
|
13046
13323
|
const { clients, filterGroups } = this;
|
|
13047
13324
|
if (!clients.has(client))
|
|
@@ -13120,10 +13397,10 @@ var MosaicClient = class {
|
|
|
13120
13397
|
return null;
|
|
13121
13398
|
}
|
|
13122
13399
|
/**
|
|
13123
|
-
* Called by the coordinator to set the field
|
|
13400
|
+
* Called by the coordinator to set the field info for this client.
|
|
13124
13401
|
* @returns {this}
|
|
13125
13402
|
*/
|
|
13126
|
-
|
|
13403
|
+
fieldInfo() {
|
|
13127
13404
|
return this;
|
|
13128
13405
|
}
|
|
13129
13406
|
/**
|
|
@@ -13140,6 +13417,9 @@ var MosaicClient = class {
|
|
|
13140
13417
|
}
|
|
13141
13418
|
/**
|
|
13142
13419
|
* Called by the coordinator to return a query result.
|
|
13420
|
+
*
|
|
13421
|
+
* @param {*} data the query result
|
|
13422
|
+
* @returns {this}
|
|
13143
13423
|
*/
|
|
13144
13424
|
queryResult() {
|
|
13145
13425
|
return this;
|
|
@@ -13523,6 +13803,12 @@ var Selection = class extends Param {
|
|
|
13523
13803
|
get clauses() {
|
|
13524
13804
|
return super.value;
|
|
13525
13805
|
}
|
|
13806
|
+
/**
|
|
13807
|
+
* Indicate if this selection has a single resolution strategy.
|
|
13808
|
+
*/
|
|
13809
|
+
get single() {
|
|
13810
|
+
return this._resolver.single;
|
|
13811
|
+
}
|
|
13526
13812
|
/**
|
|
13527
13813
|
* Emit an activate event with the given selection clause.
|
|
13528
13814
|
* @param {*} clause The clause repesenting the potential activation.
|
|
@@ -13656,12 +13942,21 @@ var SelectionResolver = class {
|
|
|
13656
13942
|
}
|
|
13657
13943
|
};
|
|
13658
13944
|
|
|
13945
|
+
// src/input.js
|
|
13946
|
+
function input(InputClass, options) {
|
|
13947
|
+
const input2 = new InputClass(options);
|
|
13948
|
+
coordinator().connect(input2);
|
|
13949
|
+
return input2.element;
|
|
13950
|
+
}
|
|
13951
|
+
|
|
13659
13952
|
// src/Menu.js
|
|
13660
13953
|
var isObject2 = (v) => {
|
|
13661
13954
|
return v && typeof v === "object" && !Array.isArray(v);
|
|
13662
13955
|
};
|
|
13956
|
+
var menu = (options) => input(Menu, options);
|
|
13663
13957
|
var Menu = class extends MosaicClient {
|
|
13664
13958
|
constructor({
|
|
13959
|
+
element,
|
|
13665
13960
|
filterBy,
|
|
13666
13961
|
from,
|
|
13667
13962
|
column: column2,
|
|
@@ -13677,7 +13972,7 @@ var Menu = class extends MosaicClient {
|
|
|
13677
13972
|
this.column = column2;
|
|
13678
13973
|
this.selection = as;
|
|
13679
13974
|
this.format = format2;
|
|
13680
|
-
this.element = document.createElement("div");
|
|
13975
|
+
this.element = element ?? document.createElement("div");
|
|
13681
13976
|
this.element.setAttribute("class", "input");
|
|
13682
13977
|
this.element.value = this;
|
|
13683
13978
|
const lab = document.createElement("label");
|
|
@@ -13763,13 +14058,15 @@ var Menu = class extends MosaicClient {
|
|
|
13763
14058
|
// src/Search.js
|
|
13764
14059
|
var FUNCTIONS = { contains, prefix, suffix, regexp: regexp_matches };
|
|
13765
14060
|
var _id = 0;
|
|
14061
|
+
var search = (options) => input(Search, options);
|
|
13766
14062
|
var Search = class extends MosaicClient {
|
|
13767
14063
|
constructor({
|
|
14064
|
+
element,
|
|
13768
14065
|
filterBy,
|
|
13769
14066
|
from,
|
|
13770
14067
|
column: column2,
|
|
13771
14068
|
label,
|
|
13772
|
-
type,
|
|
14069
|
+
type = "contains",
|
|
13773
14070
|
as
|
|
13774
14071
|
} = {}) {
|
|
13775
14072
|
super(filterBy);
|
|
@@ -13778,7 +14075,7 @@ var Search = class extends MosaicClient {
|
|
|
13778
14075
|
this.from = from;
|
|
13779
14076
|
this.column = column2;
|
|
13780
14077
|
this.selection = as;
|
|
13781
|
-
this.element = document.createElement("div");
|
|
14078
|
+
this.element = element ?? document.createElement("div");
|
|
13782
14079
|
this.element.setAttribute("class", "input");
|
|
13783
14080
|
this.element.value = this;
|
|
13784
14081
|
if (label) {
|
|
@@ -13850,8 +14147,10 @@ var Search = class extends MosaicClient {
|
|
|
13850
14147
|
|
|
13851
14148
|
// src/Slider.js
|
|
13852
14149
|
var _id2 = 0;
|
|
14150
|
+
var slider = (options) => input(Slider, options);
|
|
13853
14151
|
var Slider = class extends MosaicClient {
|
|
13854
14152
|
constructor({
|
|
14153
|
+
element,
|
|
13855
14154
|
filterBy,
|
|
13856
14155
|
as,
|
|
13857
14156
|
min: min2,
|
|
@@ -13871,7 +14170,7 @@ var Slider = class extends MosaicClient {
|
|
|
13871
14170
|
this.min = min2;
|
|
13872
14171
|
this.max = max2;
|
|
13873
14172
|
this.step = step;
|
|
13874
|
-
this.element = document.createElement("div");
|
|
14173
|
+
this.element = element || document.createElement("div");
|
|
13875
14174
|
this.element.setAttribute("class", "input");
|
|
13876
14175
|
this.element.value = this;
|
|
13877
14176
|
if (label) {
|
|
@@ -13980,8 +14279,10 @@ function localize(f) {
|
|
|
13980
14279
|
|
|
13981
14280
|
// src/Table.js
|
|
13982
14281
|
var _id3 = -1;
|
|
14282
|
+
var table = (options) => input(Table2, options);
|
|
13983
14283
|
var Table2 = class extends MosaicClient {
|
|
13984
14284
|
constructor({
|
|
14285
|
+
element,
|
|
13985
14286
|
filterBy,
|
|
13986
14287
|
from,
|
|
13987
14288
|
columns = ["*"],
|
|
@@ -14005,7 +14306,7 @@ var Table2 = class extends MosaicClient {
|
|
|
14005
14306
|
this.sortHeader = null;
|
|
14006
14307
|
this.sortColumn = null;
|
|
14007
14308
|
this.sortDesc = false;
|
|
14008
|
-
this.element = document.createElement("div");
|
|
14309
|
+
this.element = element || document.createElement("div");
|
|
14009
14310
|
this.element.setAttribute("id", this.id);
|
|
14010
14311
|
this.element.value = this;
|
|
14011
14312
|
if (typeof width === "number")
|
|
@@ -14024,9 +14325,7 @@ var Table2 = class extends MosaicClient {
|
|
|
14024
14325
|
return;
|
|
14025
14326
|
if (scrollHeight - scrollTop < 2 * clientHeight) {
|
|
14026
14327
|
this.pending = true;
|
|
14027
|
-
this.offset
|
|
14028
|
-
const query = this.queryInternal(this.filterBy?.predicate(this));
|
|
14029
|
-
this.requestQuery(query);
|
|
14328
|
+
this.requestData(this.offset + this.limit);
|
|
14030
14329
|
}
|
|
14031
14330
|
});
|
|
14032
14331
|
this.tbl = document.createElement("table");
|
|
@@ -14038,6 +14337,12 @@ var Table2 = class extends MosaicClient {
|
|
|
14038
14337
|
this.style = document.createElement("style");
|
|
14039
14338
|
this.element.appendChild(this.style);
|
|
14040
14339
|
}
|
|
14340
|
+
requestData(offset = 0) {
|
|
14341
|
+
this.offset = offset;
|
|
14342
|
+
const query = this.query(this.filterBy?.predicate(this));
|
|
14343
|
+
this.requestQuery(query);
|
|
14344
|
+
coordinator().prefetch(query.clone().offset(offset + this.limit));
|
|
14345
|
+
}
|
|
14041
14346
|
fields() {
|
|
14042
14347
|
return this.columns.map((name) => column(this.from, name));
|
|
14043
14348
|
}
|
|
@@ -14062,11 +14367,7 @@ var Table2 = class extends MosaicClient {
|
|
|
14062
14367
|
);
|
|
14063
14368
|
return this;
|
|
14064
14369
|
}
|
|
14065
|
-
query(filter) {
|
|
14066
|
-
this.offset = 0;
|
|
14067
|
-
return this.queryInternal(filter);
|
|
14068
|
-
}
|
|
14069
|
-
queryInternal(filter = []) {
|
|
14370
|
+
query(filter = []) {
|
|
14070
14371
|
const { from, limit, offset, schema, sortColumn, sortDesc } = this;
|
|
14071
14372
|
return Query.from(from).select(schema.map((s) => s.column)).where(filter).orderby(sortColumn ? sortDesc ? desc(sortColumn) : sortColumn : []).limit(limit).offset(offset);
|
|
14072
14373
|
}
|
|
@@ -14118,8 +14419,7 @@ var Table2 = class extends MosaicClient {
|
|
|
14118
14419
|
this.sortHeader = th;
|
|
14119
14420
|
th.firstChild.textContent = this.sortDesc ? "\u25BE" : "\u25B4";
|
|
14120
14421
|
}
|
|
14121
|
-
|
|
14122
|
-
this.requestQuery(query);
|
|
14422
|
+
this.requestData();
|
|
14123
14423
|
}
|
|
14124
14424
|
};
|
|
14125
14425
|
function formatof(base = {}, schema, locale) {
|
|
@@ -14168,5 +14468,9 @@ export {
|
|
|
14168
14468
|
Menu,
|
|
14169
14469
|
Search,
|
|
14170
14470
|
Slider,
|
|
14171
|
-
Table2 as Table
|
|
14471
|
+
Table2 as Table,
|
|
14472
|
+
menu,
|
|
14473
|
+
search,
|
|
14474
|
+
slider,
|
|
14475
|
+
table
|
|
14172
14476
|
};
|