@nika-js/onlymap 0.1.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.
Files changed (77) hide show
  1. package/.vscode/onlymap.code-snippets +173 -0
  2. package/LICENSE.md +133 -0
  3. package/README.md +188 -0
  4. package/bin/onlymapjs.mjs +182 -0
  5. package/dist/Arrow.dom-7AXne1TU.js +5233 -0
  6. package/dist/actions.d.ts +30 -0
  7. package/dist/attribute-resolution.d.ts +73 -0
  8. package/dist/basemap-D95W0IIA.js +25203 -0
  9. package/dist/basemap.d.ts +72 -0
  10. package/dist/convert-arrow-schema-CvZ3cT5m.js +94 -0
  11. package/dist/csp-sandbox.d.ts +20 -0
  12. package/dist/ctx.d.ts +49 -0
  13. package/dist/d3-bundle.d.ts +218 -0
  14. package/dist/data-emit.d.ts +10 -0
  15. package/dist/data-layer.d.ts +150 -0
  16. package/dist/declarative-filter.d.ts +12 -0
  17. package/dist/dev-error-panel.d.ts +15 -0
  18. package/dist/draw-controller.d.ts +51 -0
  19. package/dist/draw.d.ts +102 -0
  20. package/dist/effects.d.ts +39 -0
  21. package/dist/elements/om-behavior.d.ts +13 -0
  22. package/dist/elements/om-layer.d.ts +11 -0
  23. package/dist/elements/om-map.d.ts +168 -0
  24. package/dist/elements/om-overlay.d.ts +82 -0
  25. package/dist/elements/om-step.d.ts +12 -0
  26. package/dist/elements/om-story.d.ts +67 -0
  27. package/dist/elements/om-widget.d.ts +29 -0
  28. package/dist/env.d.ts +41 -0
  29. package/dist/expr/cache.d.ts +28 -0
  30. package/dist/expr/compile.d.ts +27 -0
  31. package/dist/expr/errors.d.ts +10 -0
  32. package/dist/expr/full-js-block.d.ts +17 -0
  33. package/dist/expr/index.d.ts +12 -0
  34. package/dist/expr/output-type.d.ts +12 -0
  35. package/dist/expr/scale.d.ts +13 -0
  36. package/dist/expr/script-block.d.ts +16 -0
  37. package/dist/expr/whitelist.d.ts +28 -0
  38. package/dist/field-access.d.ts +24 -0
  39. package/dist/html-data.d.ts +25 -0
  40. package/dist/index-2v2NXF_n.js +435 -0
  41. package/dist/index-BFjXVHly.js +605 -0
  42. package/dist/index-C9w78NS9.js +4883 -0
  43. package/dist/index-CU-iOTdr.js +75292 -0
  44. package/dist/index-D74olQ9w.js +3907 -0
  45. package/dist/index-Do7hmHwi.js +1457 -0
  46. package/dist/index.d.ts +76 -0
  47. package/dist/ir-snapshot.d.ts +54 -0
  48. package/dist/ir.d.ts +66 -0
  49. package/dist/layer-registry.d.ts +27 -0
  50. package/dist/layers/popup-layer.d.ts +65 -0
  51. package/dist/onlymapjs.css +1 -0
  52. package/dist/onlymapjs.js +30 -0
  53. package/dist/onlymapjs.umd.cjs +8618 -0
  54. package/dist/parse-manifest.d.ts +19 -0
  55. package/dist/recordbatch-HRu0SMKp.js +4742 -0
  56. package/dist/runtime-core.d.ts +170 -0
  57. package/dist/selection.d.ts +31 -0
  58. package/dist/stats.d.ts +29 -0
  59. package/dist/table-accessors-DBjWgN0C.js +204 -0
  60. package/dist/template-interpolation.d.ts +6 -0
  61. package/dist/testing.d.ts +90 -0
  62. package/dist/timeline.d.ts +37 -0
  63. package/dist/validation.d.ts +22 -0
  64. package/dist/vega-loader.d.ts +22 -0
  65. package/dist/viewport-filter.d.ts +25 -0
  66. package/dist/widget-registry.d.ts +23 -0
  67. package/dist/widget-script.d.ts +1 -0
  68. package/dist/widgets/built-in.d.ts +1 -0
  69. package/dist/widgets/dom-utils.d.ts +4 -0
  70. package/llms.txt +43 -0
  71. package/onlymapjs.html-data.json +1688 -0
  72. package/package.json +111 -0
  73. package/skills/onlymapjs/SKILL.md +61 -0
  74. package/skills/onlymapjs/agents/openai.yaml +4 -0
  75. package/skills/onlymapjs/references/patterns.md +213 -0
  76. package/skills/onlymapjs/references/syntax.md +342 -0
  77. package/skills/onlymapjs/references/testing.md +126 -0
@@ -0,0 +1,4742 @@
1
+ function Zo(e, t) {
2
+ var n = {};
3
+ for (var i in e) Object.prototype.hasOwnProperty.call(e, i) && t.indexOf(i) < 0 && (n[i] = e[i]);
4
+ if (e != null && typeof Object.getOwnPropertySymbols == "function")
5
+ for (var r = 0, i = Object.getOwnPropertySymbols(e); r < i.length; r++)
6
+ t.indexOf(i[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, i[r]) && (n[i[r]] = e[i[r]]);
7
+ return n;
8
+ }
9
+ function ta(e, t, n, i) {
10
+ function r(s) {
11
+ return s instanceof n ? s : new n(function(o) {
12
+ o(s);
13
+ });
14
+ }
15
+ return new (n || (n = Promise))(function(s, o) {
16
+ function a(d) {
17
+ try {
18
+ u(i.next(d));
19
+ } catch (h) {
20
+ o(h);
21
+ }
22
+ }
23
+ function c(d) {
24
+ try {
25
+ u(i.throw(d));
26
+ } catch (h) {
27
+ o(h);
28
+ }
29
+ }
30
+ function u(d) {
31
+ d.done ? s(d.value) : r(d.value).then(a, c);
32
+ }
33
+ u((i = i.apply(e, t || [])).next());
34
+ });
35
+ }
36
+ function cn(e) {
37
+ var t = typeof Symbol == "function" && Symbol.iterator, n = t && e[t], i = 0;
38
+ if (n) return n.call(e);
39
+ if (e && typeof e.length == "number") return {
40
+ next: function() {
41
+ return e && i >= e.length && (e = void 0), { value: e && e[i++], done: !e };
42
+ }
43
+ };
44
+ throw new TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
45
+ }
46
+ function L(e) {
47
+ return this instanceof L ? (this.v = e, this) : new L(e);
48
+ }
49
+ function Nt(e, t, n) {
50
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
51
+ var i = n.apply(e, t || []), r, s = [];
52
+ return r = Object.create((typeof AsyncIterator == "function" ? AsyncIterator : Object).prototype), a("next"), a("throw"), a("return", o), r[Symbol.asyncIterator] = function() {
53
+ return this;
54
+ }, r;
55
+ function o(B) {
56
+ return function(E) {
57
+ return Promise.resolve(E).then(B, h);
58
+ };
59
+ }
60
+ function a(B, E) {
61
+ i[B] && (r[B] = function(Mt) {
62
+ return new Promise(function(Or, Mr) {
63
+ s.push([B, Mt, Or, Mr]) > 1 || c(B, Mt);
64
+ });
65
+ }, E && (r[B] = E(r[B])));
66
+ }
67
+ function c(B, E) {
68
+ try {
69
+ u(i[B](E));
70
+ } catch (Mt) {
71
+ U(s[0][3], Mt);
72
+ }
73
+ }
74
+ function u(B) {
75
+ B.value instanceof L ? Promise.resolve(B.value.v).then(d, h) : U(s[0][2], B);
76
+ }
77
+ function d(B) {
78
+ c("next", B);
79
+ }
80
+ function h(B) {
81
+ c("throw", B);
82
+ }
83
+ function U(B, E) {
84
+ B(E), s.shift(), s.length && c(s[0][0], s[0][1]);
85
+ }
86
+ }
87
+ function ye(e) {
88
+ var t, n;
89
+ return t = {}, i("next"), i("throw", function(r) {
90
+ throw r;
91
+ }), i("return"), t[Symbol.iterator] = function() {
92
+ return this;
93
+ }, t;
94
+ function i(r, s) {
95
+ t[r] = e[r] ? function(o) {
96
+ return (n = !n) ? { value: L(e[r](o)), done: !1 } : s ? s(o) : o;
97
+ } : s;
98
+ }
99
+ }
100
+ function Wt(e) {
101
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
102
+ var t = e[Symbol.asyncIterator], n;
103
+ return t ? t.call(e) : (e = typeof cn == "function" ? cn(e) : e[Symbol.iterator](), n = {}, i("next"), i("throw"), i("return"), n[Symbol.asyncIterator] = function() {
104
+ return this;
105
+ }, n);
106
+ function i(s) {
107
+ n[s] = e[s] && function(o) {
108
+ return new Promise(function(a, c) {
109
+ o = e[s](o), r(a, c, o.done, o.value);
110
+ });
111
+ };
112
+ }
113
+ function r(s, o, a, c) {
114
+ Promise.resolve(c).then(function(u) {
115
+ s({ value: u, done: a });
116
+ }, o);
117
+ }
118
+ }
119
+ const un = new TextDecoder("utf-8"), Nr = un.decode.bind(un), Ur = new TextEncoder(), ne = (e) => Ur.encode(e), Cr = (e) => typeof e == "number", An = (e) => typeof e == "boolean", F = (e) => typeof e == "function", H = (e) => e != null && Object(e) === e, Fr = (e) => H(e) && F(e.then), Dn = (e) => H(e) && F(e[Symbol.iterator]), Lr = (e) => H(e) && F(e[Symbol.asyncIterator]), ea = (e) => H(e) && H(e.schema), Er = (e) => H(e) && "done" in e && "value" in e, na = (e) => H(e) && F(e.stat) && Cr(e.fd), ia = (e) => H(e) && Vr(e.body), ie = (e) => "_getDOMStream" in e && "_getNodeStream" in e, ra = (e) => H(e) && F(e.abort) && F(e.getWriter) && !ie(e), Vr = (e) => H(e) && F(e.cancel) && F(e.getReader) && !ie(e), sa = (e) => H(e) && F(e.end) && F(e.write) && An(e.writable) && !ie(e), oa = (e) => H(e) && F(e.read) && F(e.pipe) && An(e.readable) && !ie(e), xr = (e) => H(e) && F(e.clear) && F(e.bytes) && F(e.position) && F(e.setPosition) && F(e.capacity) && F(e.getBufferIdentifier) && F(e.createLong), Te = typeof SharedArrayBuffer < "u" ? SharedArrayBuffer : ArrayBuffer;
120
+ function kr(e) {
121
+ const t = e[0] ? [e[0]] : [];
122
+ let n, i, r, s;
123
+ for (let o, a, c = 0, u = 0, d = e.length; ++c < d; ) {
124
+ if (o = t[u], a = e[c], !o || !a || o.buffer !== a.buffer || a.byteOffset < o.byteOffset) {
125
+ a && (t[++u] = a);
126
+ continue;
127
+ }
128
+ if ({ byteOffset: n, byteLength: r } = o, { byteOffset: i, byteLength: s } = a, n + r < i || i + s < n) {
129
+ a && (t[++u] = a);
130
+ continue;
131
+ }
132
+ t[u] = new Uint8Array(o.buffer, n, i - n + s);
133
+ }
134
+ return t;
135
+ }
136
+ function Gt(e, t, n = 0, i = t.byteLength) {
137
+ const r = e.byteLength, s = new Uint8Array(e.buffer, e.byteOffset, r), o = new Uint8Array(t.buffer, t.byteOffset, Math.min(i, r));
138
+ return s.set(o, n), e;
139
+ }
140
+ function jr(e, t) {
141
+ const n = kr(e), i = n.reduce((d, h) => d + h.byteLength, 0);
142
+ let r, s, o, a = 0, c = -1;
143
+ const u = Math.min(t || Number.POSITIVE_INFINITY, i);
144
+ for (const d = n.length; ++c < d; ) {
145
+ if (r = n[c], s = r.subarray(0, Math.min(r.length, u - a)), u <= a + s.length) {
146
+ s.length < r.length ? n[c] = r.subarray(s.length) : s.length === r.length && c++, o ? Gt(o, s, a) : o = s;
147
+ break;
148
+ }
149
+ Gt(o || (o = new Uint8Array(u)), s, a), a += s.length;
150
+ }
151
+ return [o || new Uint8Array(0), n.slice(c), i - (o ? o.byteLength : 0)];
152
+ }
153
+ function O(e, t) {
154
+ let n = Er(t) ? t.value : t;
155
+ return n instanceof e ? e === Uint8Array ? new e(n.buffer, n.byteOffset, n.byteLength) : n : n ? (typeof n == "string" && (n = ne(n)), n instanceof ArrayBuffer ? new e(n) : n instanceof Te ? new e(n) : xr(n) ? O(e, n.bytes()) : ArrayBuffer.isView(n) ? n.byteLength <= 0 ? new e(0) : new e(n.buffer, n.byteOffset, n.byteLength / e.BYTES_PER_ELEMENT) : e.from(n)) : new e(0);
156
+ }
157
+ const zr = (e) => O(Int8Array, e), $r = (e) => O(Int16Array, e), pt = (e) => O(Int32Array, e), me = (e) => O(BigInt64Array, e), N = (e) => O(Uint8Array, e), Pr = (e) => O(Uint16Array, e), Rr = (e) => O(Uint32Array, e), Yr = (e) => O(BigUint64Array, e), Wr = (e) => O(Float32Array, e), Hr = (e) => O(Float64Array, e), Kr = (e) => O(Uint8ClampedArray, e), ve = (e) => (e.next(), e);
158
+ function* nt(e, t) {
159
+ const n = function* (r) {
160
+ yield r;
161
+ }, i = typeof t == "string" || ArrayBuffer.isView(t) || t instanceof ArrayBuffer || t instanceof Te ? n(t) : Dn(t) ? t : n(t);
162
+ return yield* ve((function* (r) {
163
+ let s = null;
164
+ do
165
+ s = r.next(yield O(e, s));
166
+ while (!s.done);
167
+ })(i[Symbol.iterator]())), new e();
168
+ }
169
+ const Gr = (e) => nt(Int8Array, e), Jr = (e) => nt(Int16Array, e), qr = (e) => nt(Int32Array, e), Qr = (e) => nt(Uint8Array, e), Xr = (e) => nt(Uint16Array, e), Zr = (e) => nt(Uint32Array, e), ts = (e) => nt(Float32Array, e), es = (e) => nt(Float64Array, e), ns = (e) => nt(Uint8ClampedArray, e);
170
+ function q(e, t) {
171
+ return Nt(this, arguments, function* () {
172
+ if (Fr(t))
173
+ return yield L(yield L(yield* ye(Wt(q(e, yield L(t))))));
174
+ const i = function(o) {
175
+ return Nt(this, arguments, function* () {
176
+ yield yield L(yield L(o));
177
+ });
178
+ }, r = function(o) {
179
+ return Nt(this, arguments, function* () {
180
+ yield L(yield* ye(Wt(ve((function* (a) {
181
+ let c = null;
182
+ do
183
+ c = a.next(yield c == null ? void 0 : c.value);
184
+ while (!c.done);
185
+ })(o[Symbol.iterator]())))));
186
+ });
187
+ }, s = typeof t == "string" || ArrayBuffer.isView(t) || t instanceof ArrayBuffer || t instanceof Te ? i(t) : Dn(t) ? r(t) : Lr(t) ? t : i(t);
188
+ return yield L(
189
+ // otherwise if AsyncIterable, use it
190
+ yield* ye(Wt(ve((function(o) {
191
+ return Nt(this, arguments, function* () {
192
+ let a = null;
193
+ do
194
+ a = yield L(o.next(yield yield L(O(e, a))));
195
+ while (!a.done);
196
+ });
197
+ })(s[Symbol.asyncIterator]()))))
198
+ ), yield L(new e());
199
+ });
200
+ }
201
+ const is = (e) => q(Int8Array, e), rs = (e) => q(Int16Array, e), ss = (e) => q(Int32Array, e), os = (e) => q(Uint8Array, e), as = (e) => q(Uint16Array, e), ls = (e) => q(Uint32Array, e), cs = (e) => q(Float32Array, e), us = (e) => q(Float64Array, e), ds = (e) => q(Uint8ClampedArray, e);
202
+ function hs(e, t, n) {
203
+ if (e !== 0) {
204
+ n = n.slice(0, t);
205
+ for (let i = -1, r = n.length; ++i < r; )
206
+ n[i] += e;
207
+ }
208
+ return n.subarray(0, t);
209
+ }
210
+ function _n(e, t) {
211
+ let n = 0;
212
+ const i = e.length;
213
+ if (i !== t.length)
214
+ return !1;
215
+ if (i > 0)
216
+ do
217
+ if (e[n] !== t[n])
218
+ return !1;
219
+ while (++n < i);
220
+ return !0;
221
+ }
222
+ const aa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
223
+ __proto__: null,
224
+ compareArrayLike: _n,
225
+ joinUint8Arrays: jr,
226
+ memcpy: Gt,
227
+ rebaseValueOffsets: hs,
228
+ toArrayBufferView: O,
229
+ toArrayBufferViewAsyncIterator: q,
230
+ toArrayBufferViewIterator: nt,
231
+ toBigInt64Array: me,
232
+ toBigUint64Array: Yr,
233
+ toFloat32Array: Wr,
234
+ toFloat32ArrayAsyncIterator: cs,
235
+ toFloat32ArrayIterator: ts,
236
+ toFloat64Array: Hr,
237
+ toFloat64ArrayAsyncIterator: us,
238
+ toFloat64ArrayIterator: es,
239
+ toInt16Array: $r,
240
+ toInt16ArrayAsyncIterator: rs,
241
+ toInt16ArrayIterator: Jr,
242
+ toInt32Array: pt,
243
+ toInt32ArrayAsyncIterator: ss,
244
+ toInt32ArrayIterator: qr,
245
+ toInt8Array: zr,
246
+ toInt8ArrayAsyncIterator: is,
247
+ toInt8ArrayIterator: Gr,
248
+ toUint16Array: Pr,
249
+ toUint16ArrayAsyncIterator: as,
250
+ toUint16ArrayIterator: Xr,
251
+ toUint32Array: Rr,
252
+ toUint32ArrayAsyncIterator: ls,
253
+ toUint32ArrayIterator: Zr,
254
+ toUint8Array: N,
255
+ toUint8ArrayAsyncIterator: os,
256
+ toUint8ArrayIterator: Qr,
257
+ toUint8ClampedArray: Kr,
258
+ toUint8ClampedArrayAsyncIterator: ds,
259
+ toUint8ClampedArrayIterator: ns
260
+ }, Symbol.toStringTag, { value: "Module" }));
261
+ var be;
262
+ (function(e) {
263
+ e[e.V1 = 0] = "V1", e[e.V2 = 1] = "V2", e[e.V3 = 2] = "V3", e[e.V4 = 3] = "V4", e[e.V5 = 4] = "V5";
264
+ })(be || (be = {}));
265
+ var K;
266
+ (function(e) {
267
+ e[e.Sparse = 0] = "Sparse", e[e.Dense = 1] = "Dense";
268
+ })(K || (K = {}));
269
+ var x;
270
+ (function(e) {
271
+ e[e.HALF = 0] = "HALF", e[e.SINGLE = 1] = "SINGLE", e[e.DOUBLE = 2] = "DOUBLE";
272
+ })(x || (x = {}));
273
+ var Z;
274
+ (function(e) {
275
+ e[e.DAY = 0] = "DAY", e[e.MILLISECOND = 1] = "MILLISECOND";
276
+ })(Z || (Z = {}));
277
+ var y;
278
+ (function(e) {
279
+ e[e.SECOND = 0] = "SECOND", e[e.MILLISECOND = 1] = "MILLISECOND", e[e.MICROSECOND = 2] = "MICROSECOND", e[e.NANOSECOND = 3] = "NANOSECOND";
280
+ })(y || (y = {}));
281
+ var j;
282
+ (function(e) {
283
+ e[e.YEAR_MONTH = 0] = "YEAR_MONTH", e[e.DAY_TIME = 1] = "DAY_TIME", e[e.MONTH_DAY_NANO = 2] = "MONTH_DAY_NANO";
284
+ })(j || (j = {}));
285
+ var l;
286
+ (function(e) {
287
+ e[e.NONE = 0] = "NONE", e[e.Null = 1] = "Null", e[e.Int = 2] = "Int", e[e.Float = 3] = "Float", e[e.Binary = 4] = "Binary", e[e.Utf8 = 5] = "Utf8", e[e.Bool = 6] = "Bool", e[e.Decimal = 7] = "Decimal", e[e.Date = 8] = "Date", e[e.Time = 9] = "Time", e[e.Timestamp = 10] = "Timestamp", e[e.Interval = 11] = "Interval", e[e.List = 12] = "List", e[e.Struct = 13] = "Struct", e[e.Union = 14] = "Union", e[e.FixedSizeBinary = 15] = "FixedSizeBinary", e[e.FixedSizeList = 16] = "FixedSizeList", e[e.Map = 17] = "Map", e[e.Duration = 18] = "Duration", e[e.LargeBinary = 19] = "LargeBinary", e[e.LargeUtf8 = 20] = "LargeUtf8", e[e.Dictionary = -1] = "Dictionary", e[e.Int8 = -2] = "Int8", e[e.Int16 = -3] = "Int16", e[e.Int32 = -4] = "Int32", e[e.Int64 = -5] = "Int64", e[e.Uint8 = -6] = "Uint8", e[e.Uint16 = -7] = "Uint16", e[e.Uint32 = -8] = "Uint32", e[e.Uint64 = -9] = "Uint64", e[e.Float16 = -10] = "Float16", e[e.Float32 = -11] = "Float32", e[e.Float64 = -12] = "Float64", e[e.DateDay = -13] = "DateDay", e[e.DateMillisecond = -14] = "DateMillisecond", e[e.TimestampSecond = -15] = "TimestampSecond", e[e.TimestampMillisecond = -16] = "TimestampMillisecond", e[e.TimestampMicrosecond = -17] = "TimestampMicrosecond", e[e.TimestampNanosecond = -18] = "TimestampNanosecond", e[e.TimeSecond = -19] = "TimeSecond", e[e.TimeMillisecond = -20] = "TimeMillisecond", e[e.TimeMicrosecond = -21] = "TimeMicrosecond", e[e.TimeNanosecond = -22] = "TimeNanosecond", e[e.DenseUnion = -23] = "DenseUnion", e[e.SparseUnion = -24] = "SparseUnion", e[e.IntervalDayTime = -25] = "IntervalDayTime", e[e.IntervalYearMonth = -26] = "IntervalYearMonth", e[e.DurationSecond = -27] = "DurationSecond", e[e.DurationMillisecond = -28] = "DurationMillisecond", e[e.DurationMicrosecond = -29] = "DurationMicrosecond", e[e.DurationNanosecond = -30] = "DurationNanosecond", e[e.IntervalMonthDayNano = -31] = "IntervalMonthDayNano";
288
+ })(l || (l = {}));
289
+ var it;
290
+ (function(e) {
291
+ e[e.OFFSET = 0] = "OFFSET", e[e.DATA = 1] = "DATA", e[e.VALIDITY = 2] = "VALIDITY", e[e.TYPE = 3] = "TYPE";
292
+ })(it || (it = {}));
293
+ const ys = void 0;
294
+ function lt(e) {
295
+ if (e === null)
296
+ return "null";
297
+ if (e === ys)
298
+ return "undefined";
299
+ switch (typeof e) {
300
+ case "number":
301
+ return `${e}`;
302
+ case "bigint":
303
+ return `${e}`;
304
+ case "string":
305
+ return `"${e}"`;
306
+ }
307
+ return typeof e[Symbol.toPrimitive] == "function" ? e[Symbol.toPrimitive]("string") : ArrayBuffer.isView(e) ? e instanceof BigInt64Array || e instanceof BigUint64Array ? `[${[...e].map((t) => lt(t))}]` : `[${e}]` : ArrayBuffer.isView(e) ? `[${e}]` : JSON.stringify(e, (t, n) => typeof n == "bigint" ? `${n}` : n);
308
+ }
309
+ const la = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
310
+ __proto__: null,
311
+ valueToString: lt
312
+ }, Symbol.toStringTag, { value: "Module" }));
313
+ function W(e) {
314
+ if (typeof e == "bigint" && (e < Number.MIN_SAFE_INTEGER || e > Number.MAX_SAFE_INTEGER))
315
+ throw new TypeError(`${e} is not safe to convert to a number.`);
316
+ return Number(e);
317
+ }
318
+ function Bn(e, t) {
319
+ return W(e / t) + W(e % t) / W(t);
320
+ }
321
+ const Tn = Symbol.for("isArrowBigNum");
322
+ function Q(e, ...t) {
323
+ return t.length === 0 ? Object.setPrototypeOf(O(this.TypedArray, e), this.constructor.prototype) : Object.setPrototypeOf(new this.TypedArray(e, ...t), this.constructor.prototype);
324
+ }
325
+ Q.prototype[Tn] = !0;
326
+ Q.prototype.toJSON = function() {
327
+ return `"${St(this)}"`;
328
+ };
329
+ Q.prototype.valueOf = function(e) {
330
+ return Oe(this, e);
331
+ };
332
+ Q.prototype.toString = function() {
333
+ return St(this);
334
+ };
335
+ Q.prototype[Symbol.toPrimitive] = function(e = "default") {
336
+ switch (e) {
337
+ case "number":
338
+ return Oe(this);
339
+ case "string":
340
+ return St(this);
341
+ case "default":
342
+ return On(this);
343
+ }
344
+ return St(this);
345
+ };
346
+ function mt(...e) {
347
+ return Q.apply(this, e);
348
+ }
349
+ function vt(...e) {
350
+ return Q.apply(this, e);
351
+ }
352
+ function Ct(...e) {
353
+ return Q.apply(this, e);
354
+ }
355
+ Object.setPrototypeOf(mt.prototype, Object.create(Int32Array.prototype));
356
+ Object.setPrototypeOf(vt.prototype, Object.create(Uint32Array.prototype));
357
+ Object.setPrototypeOf(Ct.prototype, Object.create(Uint32Array.prototype));
358
+ Object.assign(mt.prototype, Q.prototype, { constructor: mt, signed: !0, TypedArray: Int32Array, BigIntArray: BigInt64Array });
359
+ Object.assign(vt.prototype, Q.prototype, { constructor: vt, signed: !1, TypedArray: Uint32Array, BigIntArray: BigUint64Array });
360
+ Object.assign(Ct.prototype, Q.prototype, { constructor: Ct, signed: !0, TypedArray: Uint32Array, BigIntArray: BigUint64Array });
361
+ const ps = BigInt(4294967296) * BigInt(4294967296), fs = ps - BigInt(1);
362
+ function Oe(e, t) {
363
+ const { buffer: n, byteOffset: i, byteLength: r, signed: s } = e, o = new BigUint64Array(n, i, r / 8), a = s && o.at(-1) & BigInt(1) << BigInt(63);
364
+ let c = BigInt(0), u = 0;
365
+ if (a) {
366
+ for (const d of o)
367
+ c |= (d ^ fs) * (BigInt(1) << BigInt(64 * u++));
368
+ c *= BigInt(-1), c -= BigInt(1);
369
+ } else
370
+ for (const d of o)
371
+ c |= d * (BigInt(1) << BigInt(64 * u++));
372
+ if (typeof t == "number" && t > 0) {
373
+ const d = BigInt("1".padEnd(t + 1, "0")), h = c / d, U = a ? -(c % d) : c % d, B = W(h), E = `${U}`.padStart(t, "0");
374
+ return +`${a && B === 0 ? "-" : ""}${B}.${E}`;
375
+ }
376
+ return W(c);
377
+ }
378
+ function St(e) {
379
+ if (e.byteLength === 8)
380
+ return `${new e.BigIntArray(e.buffer, e.byteOffset, 1)[0]}`;
381
+ if (!e.signed)
382
+ return pe(e);
383
+ let t = new Uint16Array(e.buffer, e.byteOffset, e.byteLength / 2);
384
+ if (new Int16Array([t.at(-1)])[0] >= 0)
385
+ return pe(e);
386
+ t = t.slice();
387
+ let i = 1;
388
+ for (let s = 0; s < t.length; s++) {
389
+ const o = t[s], a = ~o + i;
390
+ t[s] = a, i &= o === 0 ? 1 : 0;
391
+ }
392
+ return `-${pe(t)}`;
393
+ }
394
+ function On(e) {
395
+ return e.byteLength === 8 ? new e.BigIntArray(e.buffer, e.byteOffset, 1)[0] : St(e);
396
+ }
397
+ function pe(e) {
398
+ let t = "";
399
+ const n = new Uint32Array(2);
400
+ let i = new Uint16Array(e.buffer, e.byteOffset, e.byteLength / 2);
401
+ const r = new Uint32Array((i = new Uint16Array(i).reverse()).buffer);
402
+ let s = -1;
403
+ const o = i.length - 1;
404
+ do {
405
+ for (n[0] = i[s = 0]; s < o; )
406
+ i[s++] = n[1] = n[0] / 10, n[0] = (n[0] - n[1] * 10 << 16) + i[s];
407
+ i[s] = n[1] = n[0] / 10, n[0] = n[0] - n[1] * 10, t = `${n[0]}${t}`;
408
+ } while (r[0] || r[1] || r[2] || r[3]);
409
+ return t ?? "0";
410
+ }
411
+ class re {
412
+ /** @nocollapse */
413
+ static new(t, n) {
414
+ switch (n) {
415
+ case !0:
416
+ return new mt(t);
417
+ case !1:
418
+ return new vt(t);
419
+ }
420
+ switch (t.constructor) {
421
+ case Int8Array:
422
+ case Int16Array:
423
+ case Int32Array:
424
+ case BigInt64Array:
425
+ return new mt(t);
426
+ }
427
+ return t.byteLength === 16 ? new Ct(t) : new vt(t);
428
+ }
429
+ /** @nocollapse */
430
+ static signed(t) {
431
+ return new mt(t);
432
+ }
433
+ /** @nocollapse */
434
+ static unsigned(t) {
435
+ return new vt(t);
436
+ }
437
+ /** @nocollapse */
438
+ static decimal(t) {
439
+ return new Ct(t);
440
+ }
441
+ constructor(t, n) {
442
+ return re.new(t, n);
443
+ }
444
+ }
445
+ const ca = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
446
+ __proto__: null,
447
+ BN: re,
448
+ bigNumToBigInt: On,
449
+ bigNumToNumber: Oe,
450
+ bigNumToString: St,
451
+ isArrowBigNumSymbol: Tn
452
+ }, Symbol.toStringTag, { value: "Module" }));
453
+ var Mn, Nn, Un, Cn, Fn, Ln, En, Vn, xn, kn, jn, zn, $n, Pn, Rn, Yn, Wn, Hn, Kn, Gn, Jn, qn;
454
+ class A {
455
+ /** @nocollapse */
456
+ static isNull(t) {
457
+ return (t == null ? void 0 : t.typeId) === l.Null;
458
+ }
459
+ /** @nocollapse */
460
+ static isInt(t) {
461
+ return (t == null ? void 0 : t.typeId) === l.Int;
462
+ }
463
+ /** @nocollapse */
464
+ static isFloat(t) {
465
+ return (t == null ? void 0 : t.typeId) === l.Float;
466
+ }
467
+ /** @nocollapse */
468
+ static isBinary(t) {
469
+ return (t == null ? void 0 : t.typeId) === l.Binary;
470
+ }
471
+ /** @nocollapse */
472
+ static isLargeBinary(t) {
473
+ return (t == null ? void 0 : t.typeId) === l.LargeBinary;
474
+ }
475
+ /** @nocollapse */
476
+ static isUtf8(t) {
477
+ return (t == null ? void 0 : t.typeId) === l.Utf8;
478
+ }
479
+ /** @nocollapse */
480
+ static isLargeUtf8(t) {
481
+ return (t == null ? void 0 : t.typeId) === l.LargeUtf8;
482
+ }
483
+ /** @nocollapse */
484
+ static isBool(t) {
485
+ return (t == null ? void 0 : t.typeId) === l.Bool;
486
+ }
487
+ /** @nocollapse */
488
+ static isDecimal(t) {
489
+ return (t == null ? void 0 : t.typeId) === l.Decimal;
490
+ }
491
+ /** @nocollapse */
492
+ static isDate(t) {
493
+ return (t == null ? void 0 : t.typeId) === l.Date;
494
+ }
495
+ /** @nocollapse */
496
+ static isTime(t) {
497
+ return (t == null ? void 0 : t.typeId) === l.Time;
498
+ }
499
+ /** @nocollapse */
500
+ static isTimestamp(t) {
501
+ return (t == null ? void 0 : t.typeId) === l.Timestamp;
502
+ }
503
+ /** @nocollapse */
504
+ static isInterval(t) {
505
+ return (t == null ? void 0 : t.typeId) === l.Interval;
506
+ }
507
+ /** @nocollapse */
508
+ static isDuration(t) {
509
+ return (t == null ? void 0 : t.typeId) === l.Duration;
510
+ }
511
+ /** @nocollapse */
512
+ static isList(t) {
513
+ return (t == null ? void 0 : t.typeId) === l.List;
514
+ }
515
+ /** @nocollapse */
516
+ static isStruct(t) {
517
+ return (t == null ? void 0 : t.typeId) === l.Struct;
518
+ }
519
+ /** @nocollapse */
520
+ static isUnion(t) {
521
+ return (t == null ? void 0 : t.typeId) === l.Union;
522
+ }
523
+ /** @nocollapse */
524
+ static isFixedSizeBinary(t) {
525
+ return (t == null ? void 0 : t.typeId) === l.FixedSizeBinary;
526
+ }
527
+ /** @nocollapse */
528
+ static isFixedSizeList(t) {
529
+ return (t == null ? void 0 : t.typeId) === l.FixedSizeList;
530
+ }
531
+ /** @nocollapse */
532
+ static isMap(t) {
533
+ return (t == null ? void 0 : t.typeId) === l.Map;
534
+ }
535
+ /** @nocollapse */
536
+ static isDictionary(t) {
537
+ return (t == null ? void 0 : t.typeId) === l.Dictionary;
538
+ }
539
+ /** @nocollapse */
540
+ static isDenseUnion(t) {
541
+ return A.isUnion(t) && t.mode === K.Dense;
542
+ }
543
+ /** @nocollapse */
544
+ static isSparseUnion(t) {
545
+ return A.isUnion(t) && t.mode === K.Sparse;
546
+ }
547
+ constructor(t) {
548
+ this.typeId = t;
549
+ }
550
+ }
551
+ Mn = Symbol.toStringTag;
552
+ A[Mn] = ((e) => (e.children = null, e.ArrayType = Array, e.OffsetArrayType = Int32Array, e[Symbol.toStringTag] = "DataType"))(A.prototype);
553
+ class Ft extends A {
554
+ constructor() {
555
+ super(l.Null);
556
+ }
557
+ toString() {
558
+ return "Null";
559
+ }
560
+ }
561
+ Nn = Symbol.toStringTag;
562
+ Ft[Nn] = ((e) => e[Symbol.toStringTag] = "Null")(Ft.prototype);
563
+ class tt extends A {
564
+ constructor(t, n) {
565
+ super(l.Int), this.isSigned = t, this.bitWidth = n;
566
+ }
567
+ get ArrayType() {
568
+ switch (this.bitWidth) {
569
+ case 8:
570
+ return this.isSigned ? Int8Array : Uint8Array;
571
+ case 16:
572
+ return this.isSigned ? Int16Array : Uint16Array;
573
+ case 32:
574
+ return this.isSigned ? Int32Array : Uint32Array;
575
+ case 64:
576
+ return this.isSigned ? BigInt64Array : BigUint64Array;
577
+ }
578
+ throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`);
579
+ }
580
+ toString() {
581
+ return `${this.isSigned ? "I" : "Ui"}nt${this.bitWidth}`;
582
+ }
583
+ }
584
+ Un = Symbol.toStringTag;
585
+ tt[Un] = ((e) => (e.isSigned = null, e.bitWidth = null, e[Symbol.toStringTag] = "Int"))(tt.prototype);
586
+ class Qn extends tt {
587
+ constructor() {
588
+ super(!0, 8);
589
+ }
590
+ get ArrayType() {
591
+ return Int8Array;
592
+ }
593
+ }
594
+ class Xn extends tt {
595
+ constructor() {
596
+ super(!0, 16);
597
+ }
598
+ get ArrayType() {
599
+ return Int16Array;
600
+ }
601
+ }
602
+ class Me extends tt {
603
+ constructor() {
604
+ super(!0, 32);
605
+ }
606
+ get ArrayType() {
607
+ return Int32Array;
608
+ }
609
+ }
610
+ class Ne extends tt {
611
+ constructor() {
612
+ super(!0, 64);
613
+ }
614
+ get ArrayType() {
615
+ return BigInt64Array;
616
+ }
617
+ }
618
+ class Zn extends tt {
619
+ constructor() {
620
+ super(!1, 8);
621
+ }
622
+ get ArrayType() {
623
+ return Uint8Array;
624
+ }
625
+ }
626
+ class ti extends tt {
627
+ constructor() {
628
+ super(!1, 16);
629
+ }
630
+ get ArrayType() {
631
+ return Uint16Array;
632
+ }
633
+ }
634
+ class ei extends tt {
635
+ constructor() {
636
+ super(!1, 32);
637
+ }
638
+ get ArrayType() {
639
+ return Uint32Array;
640
+ }
641
+ }
642
+ class ni extends tt {
643
+ constructor() {
644
+ super(!1, 64);
645
+ }
646
+ get ArrayType() {
647
+ return BigUint64Array;
648
+ }
649
+ }
650
+ Object.defineProperty(Qn.prototype, "ArrayType", { value: Int8Array });
651
+ Object.defineProperty(Xn.prototype, "ArrayType", { value: Int16Array });
652
+ Object.defineProperty(Me.prototype, "ArrayType", { value: Int32Array });
653
+ Object.defineProperty(Ne.prototype, "ArrayType", { value: BigInt64Array });
654
+ Object.defineProperty(Zn.prototype, "ArrayType", { value: Uint8Array });
655
+ Object.defineProperty(ti.prototype, "ArrayType", { value: Uint16Array });
656
+ Object.defineProperty(ei.prototype, "ArrayType", { value: Uint32Array });
657
+ Object.defineProperty(ni.prototype, "ArrayType", { value: BigUint64Array });
658
+ class Lt extends A {
659
+ constructor(t) {
660
+ super(l.Float), this.precision = t;
661
+ }
662
+ get ArrayType() {
663
+ switch (this.precision) {
664
+ case x.HALF:
665
+ return Uint16Array;
666
+ case x.SINGLE:
667
+ return Float32Array;
668
+ case x.DOUBLE:
669
+ return Float64Array;
670
+ }
671
+ throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`);
672
+ }
673
+ toString() {
674
+ return `Float${this.precision << 5 || 16}`;
675
+ }
676
+ }
677
+ Cn = Symbol.toStringTag;
678
+ Lt[Cn] = ((e) => (e.precision = null, e[Symbol.toStringTag] = "Float"))(Lt.prototype);
679
+ class gs extends Lt {
680
+ constructor() {
681
+ super(x.HALF);
682
+ }
683
+ }
684
+ class ii extends Lt {
685
+ constructor() {
686
+ super(x.SINGLE);
687
+ }
688
+ }
689
+ class Ue extends Lt {
690
+ constructor() {
691
+ super(x.DOUBLE);
692
+ }
693
+ }
694
+ Object.defineProperty(gs.prototype, "ArrayType", { value: Uint16Array });
695
+ Object.defineProperty(ii.prototype, "ArrayType", { value: Float32Array });
696
+ Object.defineProperty(Ue.prototype, "ArrayType", { value: Float64Array });
697
+ class dn extends A {
698
+ constructor() {
699
+ super(l.Binary);
700
+ }
701
+ toString() {
702
+ return "Binary";
703
+ }
704
+ }
705
+ Fn = Symbol.toStringTag;
706
+ dn[Fn] = ((e) => (e.ArrayType = Uint8Array, e[Symbol.toStringTag] = "Binary"))(dn.prototype);
707
+ class hn extends A {
708
+ constructor() {
709
+ super(l.LargeBinary);
710
+ }
711
+ toString() {
712
+ return "LargeBinary";
713
+ }
714
+ }
715
+ Ln = Symbol.toStringTag;
716
+ hn[Ln] = ((e) => (e.ArrayType = Uint8Array, e.OffsetArrayType = BigInt64Array, e[Symbol.toStringTag] = "LargeBinary"))(hn.prototype);
717
+ class Ie extends A {
718
+ constructor() {
719
+ super(l.Utf8);
720
+ }
721
+ toString() {
722
+ return "Utf8";
723
+ }
724
+ }
725
+ En = Symbol.toStringTag;
726
+ Ie[En] = ((e) => (e.ArrayType = Uint8Array, e[Symbol.toStringTag] = "Utf8"))(Ie.prototype);
727
+ class yn extends A {
728
+ constructor() {
729
+ super(l.LargeUtf8);
730
+ }
731
+ toString() {
732
+ return "LargeUtf8";
733
+ }
734
+ }
735
+ Vn = Symbol.toStringTag;
736
+ yn[Vn] = ((e) => (e.ArrayType = Uint8Array, e.OffsetArrayType = BigInt64Array, e[Symbol.toStringTag] = "LargeUtf8"))(yn.prototype);
737
+ class Se extends A {
738
+ constructor() {
739
+ super(l.Bool);
740
+ }
741
+ toString() {
742
+ return "Bool";
743
+ }
744
+ }
745
+ xn = Symbol.toStringTag;
746
+ Se[xn] = ((e) => (e.ArrayType = Uint8Array, e[Symbol.toStringTag] = "Bool"))(Se.prototype);
747
+ class pn extends A {
748
+ constructor(t, n, i = 128) {
749
+ super(l.Decimal), this.scale = t, this.precision = n, this.bitWidth = i;
750
+ }
751
+ toString() {
752
+ return `Decimal[${this.precision}e${this.scale > 0 ? "+" : ""}${this.scale}]`;
753
+ }
754
+ }
755
+ kn = Symbol.toStringTag;
756
+ pn[kn] = ((e) => (e.scale = null, e.precision = null, e.ArrayType = Uint32Array, e[Symbol.toStringTag] = "Decimal"))(pn.prototype);
757
+ class Jt extends A {
758
+ constructor(t) {
759
+ super(l.Date), this.unit = t;
760
+ }
761
+ toString() {
762
+ return `Date${(this.unit + 1) * 32}<${Z[this.unit]}>`;
763
+ }
764
+ get ArrayType() {
765
+ return this.unit === Z.DAY ? Int32Array : BigInt64Array;
766
+ }
767
+ }
768
+ jn = Symbol.toStringTag;
769
+ Jt[jn] = ((e) => (e.unit = null, e[Symbol.toStringTag] = "Date"))(Jt.prototype);
770
+ class ua extends Jt {
771
+ constructor() {
772
+ super(Z.DAY);
773
+ }
774
+ }
775
+ class da extends Jt {
776
+ constructor() {
777
+ super(Z.MILLISECOND);
778
+ }
779
+ }
780
+ class wt extends A {
781
+ constructor(t, n) {
782
+ super(l.Time), this.unit = t, this.bitWidth = n;
783
+ }
784
+ toString() {
785
+ return `Time${this.bitWidth}<${y[this.unit]}>`;
786
+ }
787
+ get ArrayType() {
788
+ switch (this.bitWidth) {
789
+ case 32:
790
+ return Int32Array;
791
+ case 64:
792
+ return BigInt64Array;
793
+ }
794
+ throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`);
795
+ }
796
+ }
797
+ zn = Symbol.toStringTag;
798
+ wt[zn] = ((e) => (e.unit = null, e.bitWidth = null, e[Symbol.toStringTag] = "Time"))(wt.prototype);
799
+ class ha extends wt {
800
+ constructor() {
801
+ super(y.SECOND, 32);
802
+ }
803
+ }
804
+ class ya extends wt {
805
+ constructor() {
806
+ super(y.MILLISECOND, 32);
807
+ }
808
+ }
809
+ class pa extends wt {
810
+ constructor() {
811
+ super(y.MICROSECOND, 64);
812
+ }
813
+ }
814
+ class fa extends wt {
815
+ constructor() {
816
+ super(y.NANOSECOND, 64);
817
+ }
818
+ }
819
+ class At extends A {
820
+ constructor(t, n) {
821
+ super(l.Timestamp), this.unit = t, this.timezone = n;
822
+ }
823
+ toString() {
824
+ return `Timestamp<${y[this.unit]}${this.timezone ? `, ${this.timezone}` : ""}>`;
825
+ }
826
+ }
827
+ $n = Symbol.toStringTag;
828
+ At[$n] = ((e) => (e.unit = null, e.timezone = null, e.ArrayType = BigInt64Array, e[Symbol.toStringTag] = "Timestamp"))(At.prototype);
829
+ class ga extends At {
830
+ constructor(t) {
831
+ super(y.SECOND, t);
832
+ }
833
+ }
834
+ class ms extends At {
835
+ constructor(t) {
836
+ super(y.MILLISECOND, t);
837
+ }
838
+ }
839
+ class ma extends At {
840
+ constructor(t) {
841
+ super(y.MICROSECOND, t);
842
+ }
843
+ }
844
+ class va extends At {
845
+ constructor(t) {
846
+ super(y.NANOSECOND, t);
847
+ }
848
+ }
849
+ class Et extends A {
850
+ constructor(t) {
851
+ super(l.Interval), this.unit = t;
852
+ }
853
+ toString() {
854
+ return `Interval<${j[this.unit]}>`;
855
+ }
856
+ }
857
+ Pn = Symbol.toStringTag;
858
+ Et[Pn] = ((e) => (e.unit = null, e.ArrayType = Int32Array, e[Symbol.toStringTag] = "Interval"))(Et.prototype);
859
+ class ba extends Et {
860
+ constructor() {
861
+ super(j.DAY_TIME);
862
+ }
863
+ }
864
+ class Ia extends Et {
865
+ constructor() {
866
+ super(j.YEAR_MONTH);
867
+ }
868
+ }
869
+ class Sa extends Et {
870
+ constructor() {
871
+ super(j.MONTH_DAY_NANO);
872
+ }
873
+ }
874
+ class Dt extends A {
875
+ constructor(t) {
876
+ super(l.Duration), this.unit = t;
877
+ }
878
+ toString() {
879
+ return `Duration<${y[this.unit]}>`;
880
+ }
881
+ }
882
+ Rn = Symbol.toStringTag;
883
+ Dt[Rn] = ((e) => (e.unit = null, e.ArrayType = BigInt64Array, e[Symbol.toStringTag] = "Duration"))(Dt.prototype);
884
+ class wa extends Dt {
885
+ constructor() {
886
+ super(y.SECOND);
887
+ }
888
+ }
889
+ class Aa extends Dt {
890
+ constructor() {
891
+ super(y.MILLISECOND);
892
+ }
893
+ }
894
+ class Da extends Dt {
895
+ constructor() {
896
+ super(y.MICROSECOND);
897
+ }
898
+ }
899
+ class _a extends Dt {
900
+ constructor() {
901
+ super(y.NANOSECOND);
902
+ }
903
+ }
904
+ class qt extends A {
905
+ constructor(t) {
906
+ super(l.List), this.children = [t];
907
+ }
908
+ toString() {
909
+ return `List<${this.valueType}>`;
910
+ }
911
+ get valueType() {
912
+ return this.children[0].type;
913
+ }
914
+ get valueField() {
915
+ return this.children[0];
916
+ }
917
+ get ArrayType() {
918
+ return this.valueType.ArrayType;
919
+ }
920
+ }
921
+ Yn = Symbol.toStringTag;
922
+ qt[Yn] = ((e) => (e.children = null, e[Symbol.toStringTag] = "List"))(qt.prototype);
923
+ class Y extends A {
924
+ constructor(t) {
925
+ super(l.Struct), this.children = t;
926
+ }
927
+ toString() {
928
+ return `Struct<{${this.children.map((t) => `${t.name}:${t.type}`).join(", ")}}>`;
929
+ }
930
+ }
931
+ Wn = Symbol.toStringTag;
932
+ Y[Wn] = ((e) => (e.children = null, e[Symbol.toStringTag] = "Struct"))(Y.prototype);
933
+ class Vt extends A {
934
+ constructor(t, n, i) {
935
+ super(l.Union), this.mode = t, this.children = i, this.typeIds = n = Int32Array.from(n), this.typeIdToChildIndex = n.reduce((r, s, o) => (r[s] = o) && r || r, /* @__PURE__ */ Object.create(null));
936
+ }
937
+ toString() {
938
+ return `${this[Symbol.toStringTag]}<${this.children.map((t) => `${t.type}`).join(" | ")}>`;
939
+ }
940
+ }
941
+ Hn = Symbol.toStringTag;
942
+ Vt[Hn] = ((e) => (e.mode = null, e.typeIds = null, e.children = null, e.typeIdToChildIndex = null, e.ArrayType = Int8Array, e[Symbol.toStringTag] = "Union"))(Vt.prototype);
943
+ class Ba extends Vt {
944
+ constructor(t, n) {
945
+ super(K.Dense, t, n);
946
+ }
947
+ }
948
+ class Ta extends Vt {
949
+ constructor(t, n) {
950
+ super(K.Sparse, t, n);
951
+ }
952
+ }
953
+ class fn extends A {
954
+ constructor(t) {
955
+ super(l.FixedSizeBinary), this.byteWidth = t;
956
+ }
957
+ toString() {
958
+ return `FixedSizeBinary[${this.byteWidth}]`;
959
+ }
960
+ }
961
+ Kn = Symbol.toStringTag;
962
+ fn[Kn] = ((e) => (e.byteWidth = null, e.ArrayType = Uint8Array, e[Symbol.toStringTag] = "FixedSizeBinary"))(fn.prototype);
963
+ class we extends A {
964
+ constructor(t, n) {
965
+ super(l.FixedSizeList), this.listSize = t, this.children = [n];
966
+ }
967
+ get valueType() {
968
+ return this.children[0].type;
969
+ }
970
+ get valueField() {
971
+ return this.children[0];
972
+ }
973
+ get ArrayType() {
974
+ return this.valueType.ArrayType;
975
+ }
976
+ toString() {
977
+ return `FixedSizeList[${this.listSize}]<${this.valueType}>`;
978
+ }
979
+ }
980
+ Gn = Symbol.toStringTag;
981
+ we[Gn] = ((e) => (e.children = null, e.listSize = null, e[Symbol.toStringTag] = "FixedSizeList"))(we.prototype);
982
+ class Ae extends A {
983
+ constructor(t, n = !1) {
984
+ var i, r, s;
985
+ if (super(l.Map), this.children = [t], this.keysSorted = n, t && (t.name = "entries", !((i = t == null ? void 0 : t.type) === null || i === void 0) && i.children)) {
986
+ const o = (r = t == null ? void 0 : t.type) === null || r === void 0 ? void 0 : r.children[0];
987
+ o && (o.name = "key");
988
+ const a = (s = t == null ? void 0 : t.type) === null || s === void 0 ? void 0 : s.children[1];
989
+ a && (a.name = "value");
990
+ }
991
+ }
992
+ get keyType() {
993
+ return this.children[0].type.children[0].type;
994
+ }
995
+ get valueType() {
996
+ return this.children[0].type.children[1].type;
997
+ }
998
+ get childType() {
999
+ return this.children[0].type;
1000
+ }
1001
+ toString() {
1002
+ return `Map<{${this.children[0].type.children.map((t) => `${t.name}:${t.type}`).join(", ")}}>`;
1003
+ }
1004
+ }
1005
+ Jn = Symbol.toStringTag;
1006
+ Ae[Jn] = ((e) => (e.children = null, e.keysSorted = null, e[Symbol.toStringTag] = "Map_"))(Ae.prototype);
1007
+ const vs = /* @__PURE__ */ ((e) => () => ++e)(-1);
1008
+ class Qt extends A {
1009
+ constructor(t, n, i, r) {
1010
+ super(l.Dictionary), this.indices = n, this.dictionary = t, this.isOrdered = r || !1, this.id = i == null ? vs() : W(i);
1011
+ }
1012
+ get children() {
1013
+ return this.dictionary.children;
1014
+ }
1015
+ get valueType() {
1016
+ return this.dictionary;
1017
+ }
1018
+ get ArrayType() {
1019
+ return this.dictionary.ArrayType;
1020
+ }
1021
+ toString() {
1022
+ return `Dictionary<${this.indices}, ${this.dictionary}>`;
1023
+ }
1024
+ }
1025
+ qn = Symbol.toStringTag;
1026
+ Qt[qn] = ((e) => (e.id = null, e.indices = null, e.isOrdered = null, e.dictionary = null, e[Symbol.toStringTag] = "Dictionary"))(Qt.prototype);
1027
+ function X(e) {
1028
+ const t = e;
1029
+ switch (e.typeId) {
1030
+ case l.Decimal:
1031
+ return e.bitWidth / 32;
1032
+ case l.Interval:
1033
+ return t.unit === j.MONTH_DAY_NANO ? 4 : 1 + t.unit;
1034
+ // case Type.Int: return 1 + +((t as Int_).bitWidth > 32);
1035
+ // case Type.Time: return 1 + +((t as Time_).bitWidth > 32);
1036
+ case l.FixedSizeList:
1037
+ return t.listSize;
1038
+ case l.FixedSizeBinary:
1039
+ return t.byteWidth;
1040
+ default:
1041
+ return 1;
1042
+ }
1043
+ }
1044
+ class _ {
1045
+ visitMany(t, ...n) {
1046
+ return t.map((i, r) => this.visit(i, ...n.map((s) => s[r])));
1047
+ }
1048
+ visit(...t) {
1049
+ return this.getVisitFn(t[0], !1).apply(this, t);
1050
+ }
1051
+ getVisitFn(t, n = !0) {
1052
+ return bs(this, t, n);
1053
+ }
1054
+ getVisitFnByTypeId(t, n = !0) {
1055
+ return ft(this, t, n);
1056
+ }
1057
+ visitNull(t, ...n) {
1058
+ return null;
1059
+ }
1060
+ visitBool(t, ...n) {
1061
+ return null;
1062
+ }
1063
+ visitInt(t, ...n) {
1064
+ return null;
1065
+ }
1066
+ visitFloat(t, ...n) {
1067
+ return null;
1068
+ }
1069
+ visitUtf8(t, ...n) {
1070
+ return null;
1071
+ }
1072
+ visitLargeUtf8(t, ...n) {
1073
+ return null;
1074
+ }
1075
+ visitBinary(t, ...n) {
1076
+ return null;
1077
+ }
1078
+ visitLargeBinary(t, ...n) {
1079
+ return null;
1080
+ }
1081
+ visitFixedSizeBinary(t, ...n) {
1082
+ return null;
1083
+ }
1084
+ visitDate(t, ...n) {
1085
+ return null;
1086
+ }
1087
+ visitTimestamp(t, ...n) {
1088
+ return null;
1089
+ }
1090
+ visitTime(t, ...n) {
1091
+ return null;
1092
+ }
1093
+ visitDecimal(t, ...n) {
1094
+ return null;
1095
+ }
1096
+ visitList(t, ...n) {
1097
+ return null;
1098
+ }
1099
+ visitStruct(t, ...n) {
1100
+ return null;
1101
+ }
1102
+ visitUnion(t, ...n) {
1103
+ return null;
1104
+ }
1105
+ visitDictionary(t, ...n) {
1106
+ return null;
1107
+ }
1108
+ visitInterval(t, ...n) {
1109
+ return null;
1110
+ }
1111
+ visitDuration(t, ...n) {
1112
+ return null;
1113
+ }
1114
+ visitFixedSizeList(t, ...n) {
1115
+ return null;
1116
+ }
1117
+ visitMap(t, ...n) {
1118
+ return null;
1119
+ }
1120
+ }
1121
+ function bs(e, t, n = !0) {
1122
+ return typeof t == "number" ? ft(e, t, n) : typeof t == "string" && t in l ? ft(e, l[t], n) : t && t instanceof A ? ft(e, gn(t), n) : t != null && t.type && t.type instanceof A ? ft(e, gn(t.type), n) : ft(e, l.NONE, n);
1123
+ }
1124
+ function ft(e, t, n = !0) {
1125
+ let i = null;
1126
+ switch (t) {
1127
+ case l.Null:
1128
+ i = e.visitNull;
1129
+ break;
1130
+ case l.Bool:
1131
+ i = e.visitBool;
1132
+ break;
1133
+ case l.Int:
1134
+ i = e.visitInt;
1135
+ break;
1136
+ case l.Int8:
1137
+ i = e.visitInt8 || e.visitInt;
1138
+ break;
1139
+ case l.Int16:
1140
+ i = e.visitInt16 || e.visitInt;
1141
+ break;
1142
+ case l.Int32:
1143
+ i = e.visitInt32 || e.visitInt;
1144
+ break;
1145
+ case l.Int64:
1146
+ i = e.visitInt64 || e.visitInt;
1147
+ break;
1148
+ case l.Uint8:
1149
+ i = e.visitUint8 || e.visitInt;
1150
+ break;
1151
+ case l.Uint16:
1152
+ i = e.visitUint16 || e.visitInt;
1153
+ break;
1154
+ case l.Uint32:
1155
+ i = e.visitUint32 || e.visitInt;
1156
+ break;
1157
+ case l.Uint64:
1158
+ i = e.visitUint64 || e.visitInt;
1159
+ break;
1160
+ case l.Float:
1161
+ i = e.visitFloat;
1162
+ break;
1163
+ case l.Float16:
1164
+ i = e.visitFloat16 || e.visitFloat;
1165
+ break;
1166
+ case l.Float32:
1167
+ i = e.visitFloat32 || e.visitFloat;
1168
+ break;
1169
+ case l.Float64:
1170
+ i = e.visitFloat64 || e.visitFloat;
1171
+ break;
1172
+ case l.Utf8:
1173
+ i = e.visitUtf8;
1174
+ break;
1175
+ case l.LargeUtf8:
1176
+ i = e.visitLargeUtf8;
1177
+ break;
1178
+ case l.Binary:
1179
+ i = e.visitBinary;
1180
+ break;
1181
+ case l.LargeBinary:
1182
+ i = e.visitLargeBinary;
1183
+ break;
1184
+ case l.FixedSizeBinary:
1185
+ i = e.visitFixedSizeBinary;
1186
+ break;
1187
+ case l.Date:
1188
+ i = e.visitDate;
1189
+ break;
1190
+ case l.DateDay:
1191
+ i = e.visitDateDay || e.visitDate;
1192
+ break;
1193
+ case l.DateMillisecond:
1194
+ i = e.visitDateMillisecond || e.visitDate;
1195
+ break;
1196
+ case l.Timestamp:
1197
+ i = e.visitTimestamp;
1198
+ break;
1199
+ case l.TimestampSecond:
1200
+ i = e.visitTimestampSecond || e.visitTimestamp;
1201
+ break;
1202
+ case l.TimestampMillisecond:
1203
+ i = e.visitTimestampMillisecond || e.visitTimestamp;
1204
+ break;
1205
+ case l.TimestampMicrosecond:
1206
+ i = e.visitTimestampMicrosecond || e.visitTimestamp;
1207
+ break;
1208
+ case l.TimestampNanosecond:
1209
+ i = e.visitTimestampNanosecond || e.visitTimestamp;
1210
+ break;
1211
+ case l.Time:
1212
+ i = e.visitTime;
1213
+ break;
1214
+ case l.TimeSecond:
1215
+ i = e.visitTimeSecond || e.visitTime;
1216
+ break;
1217
+ case l.TimeMillisecond:
1218
+ i = e.visitTimeMillisecond || e.visitTime;
1219
+ break;
1220
+ case l.TimeMicrosecond:
1221
+ i = e.visitTimeMicrosecond || e.visitTime;
1222
+ break;
1223
+ case l.TimeNanosecond:
1224
+ i = e.visitTimeNanosecond || e.visitTime;
1225
+ break;
1226
+ case l.Decimal:
1227
+ i = e.visitDecimal;
1228
+ break;
1229
+ case l.List:
1230
+ i = e.visitList;
1231
+ break;
1232
+ case l.Struct:
1233
+ i = e.visitStruct;
1234
+ break;
1235
+ case l.Union:
1236
+ i = e.visitUnion;
1237
+ break;
1238
+ case l.DenseUnion:
1239
+ i = e.visitDenseUnion || e.visitUnion;
1240
+ break;
1241
+ case l.SparseUnion:
1242
+ i = e.visitSparseUnion || e.visitUnion;
1243
+ break;
1244
+ case l.Dictionary:
1245
+ i = e.visitDictionary;
1246
+ break;
1247
+ case l.Interval:
1248
+ i = e.visitInterval;
1249
+ break;
1250
+ case l.IntervalDayTime:
1251
+ i = e.visitIntervalDayTime || e.visitInterval;
1252
+ break;
1253
+ case l.IntervalYearMonth:
1254
+ i = e.visitIntervalYearMonth || e.visitInterval;
1255
+ break;
1256
+ case l.IntervalMonthDayNano:
1257
+ i = e.visitIntervalMonthDayNano || e.visitInterval;
1258
+ break;
1259
+ case l.Duration:
1260
+ i = e.visitDuration;
1261
+ break;
1262
+ case l.DurationSecond:
1263
+ i = e.visitDurationSecond || e.visitDuration;
1264
+ break;
1265
+ case l.DurationMillisecond:
1266
+ i = e.visitDurationMillisecond || e.visitDuration;
1267
+ break;
1268
+ case l.DurationMicrosecond:
1269
+ i = e.visitDurationMicrosecond || e.visitDuration;
1270
+ break;
1271
+ case l.DurationNanosecond:
1272
+ i = e.visitDurationNanosecond || e.visitDuration;
1273
+ break;
1274
+ case l.FixedSizeList:
1275
+ i = e.visitFixedSizeList;
1276
+ break;
1277
+ case l.Map:
1278
+ i = e.visitMap;
1279
+ break;
1280
+ }
1281
+ if (typeof i == "function")
1282
+ return i;
1283
+ if (!n)
1284
+ return () => null;
1285
+ throw new Error(`Unrecognized type '${l[t]}'`);
1286
+ }
1287
+ function gn(e) {
1288
+ switch (e.typeId) {
1289
+ case l.Null:
1290
+ return l.Null;
1291
+ case l.Int: {
1292
+ const { bitWidth: t, isSigned: n } = e;
1293
+ switch (t) {
1294
+ case 8:
1295
+ return n ? l.Int8 : l.Uint8;
1296
+ case 16:
1297
+ return n ? l.Int16 : l.Uint16;
1298
+ case 32:
1299
+ return n ? l.Int32 : l.Uint32;
1300
+ case 64:
1301
+ return n ? l.Int64 : l.Uint64;
1302
+ }
1303
+ return l.Int;
1304
+ }
1305
+ case l.Float:
1306
+ switch (e.precision) {
1307
+ case x.HALF:
1308
+ return l.Float16;
1309
+ case x.SINGLE:
1310
+ return l.Float32;
1311
+ case x.DOUBLE:
1312
+ return l.Float64;
1313
+ }
1314
+ return l.Float;
1315
+ case l.Binary:
1316
+ return l.Binary;
1317
+ case l.LargeBinary:
1318
+ return l.LargeBinary;
1319
+ case l.Utf8:
1320
+ return l.Utf8;
1321
+ case l.LargeUtf8:
1322
+ return l.LargeUtf8;
1323
+ case l.Bool:
1324
+ return l.Bool;
1325
+ case l.Decimal:
1326
+ return l.Decimal;
1327
+ case l.Time:
1328
+ switch (e.unit) {
1329
+ case y.SECOND:
1330
+ return l.TimeSecond;
1331
+ case y.MILLISECOND:
1332
+ return l.TimeMillisecond;
1333
+ case y.MICROSECOND:
1334
+ return l.TimeMicrosecond;
1335
+ case y.NANOSECOND:
1336
+ return l.TimeNanosecond;
1337
+ }
1338
+ return l.Time;
1339
+ case l.Timestamp:
1340
+ switch (e.unit) {
1341
+ case y.SECOND:
1342
+ return l.TimestampSecond;
1343
+ case y.MILLISECOND:
1344
+ return l.TimestampMillisecond;
1345
+ case y.MICROSECOND:
1346
+ return l.TimestampMicrosecond;
1347
+ case y.NANOSECOND:
1348
+ return l.TimestampNanosecond;
1349
+ }
1350
+ return l.Timestamp;
1351
+ case l.Date:
1352
+ switch (e.unit) {
1353
+ case Z.DAY:
1354
+ return l.DateDay;
1355
+ case Z.MILLISECOND:
1356
+ return l.DateMillisecond;
1357
+ }
1358
+ return l.Date;
1359
+ case l.Interval:
1360
+ switch (e.unit) {
1361
+ case j.DAY_TIME:
1362
+ return l.IntervalDayTime;
1363
+ case j.YEAR_MONTH:
1364
+ return l.IntervalYearMonth;
1365
+ case j.MONTH_DAY_NANO:
1366
+ return l.IntervalMonthDayNano;
1367
+ }
1368
+ return l.Interval;
1369
+ case l.Duration:
1370
+ switch (e.unit) {
1371
+ case y.SECOND:
1372
+ return l.DurationSecond;
1373
+ case y.MILLISECOND:
1374
+ return l.DurationMillisecond;
1375
+ case y.MICROSECOND:
1376
+ return l.DurationMicrosecond;
1377
+ case y.NANOSECOND:
1378
+ return l.DurationNanosecond;
1379
+ }
1380
+ return l.Duration;
1381
+ case l.Map:
1382
+ return l.Map;
1383
+ case l.List:
1384
+ return l.List;
1385
+ case l.Struct:
1386
+ return l.Struct;
1387
+ case l.Union:
1388
+ switch (e.mode) {
1389
+ case K.Dense:
1390
+ return l.DenseUnion;
1391
+ case K.Sparse:
1392
+ return l.SparseUnion;
1393
+ }
1394
+ return l.Union;
1395
+ case l.FixedSizeBinary:
1396
+ return l.FixedSizeBinary;
1397
+ case l.FixedSizeList:
1398
+ return l.FixedSizeList;
1399
+ case l.Dictionary:
1400
+ return l.Dictionary;
1401
+ }
1402
+ throw new Error(`Unrecognized type '${l[e.typeId]}'`);
1403
+ }
1404
+ _.prototype.visitInt8 = null;
1405
+ _.prototype.visitInt16 = null;
1406
+ _.prototype.visitInt32 = null;
1407
+ _.prototype.visitInt64 = null;
1408
+ _.prototype.visitUint8 = null;
1409
+ _.prototype.visitUint16 = null;
1410
+ _.prototype.visitUint32 = null;
1411
+ _.prototype.visitUint64 = null;
1412
+ _.prototype.visitFloat16 = null;
1413
+ _.prototype.visitFloat32 = null;
1414
+ _.prototype.visitFloat64 = null;
1415
+ _.prototype.visitDateDay = null;
1416
+ _.prototype.visitDateMillisecond = null;
1417
+ _.prototype.visitTimestampSecond = null;
1418
+ _.prototype.visitTimestampMillisecond = null;
1419
+ _.prototype.visitTimestampMicrosecond = null;
1420
+ _.prototype.visitTimestampNanosecond = null;
1421
+ _.prototype.visitTimeSecond = null;
1422
+ _.prototype.visitTimeMillisecond = null;
1423
+ _.prototype.visitTimeMicrosecond = null;
1424
+ _.prototype.visitTimeNanosecond = null;
1425
+ _.prototype.visitDenseUnion = null;
1426
+ _.prototype.visitSparseUnion = null;
1427
+ _.prototype.visitIntervalDayTime = null;
1428
+ _.prototype.visitIntervalYearMonth = null;
1429
+ _.prototype.visitIntervalMonthDayNano = null;
1430
+ _.prototype.visitDuration = null;
1431
+ _.prototype.visitDurationSecond = null;
1432
+ _.prototype.visitDurationMillisecond = null;
1433
+ _.prototype.visitDurationMicrosecond = null;
1434
+ _.prototype.visitDurationNanosecond = null;
1435
+ const ri = new Float64Array(1), yt = new Uint32Array(ri.buffer);
1436
+ function Ce(e) {
1437
+ const t = (e & 31744) >> 10, n = (e & 1023) / 1024, i = Math.pow(-1, (e & 32768) >> 15);
1438
+ switch (t) {
1439
+ case 31:
1440
+ return i * (n ? Number.NaN : 1 / 0);
1441
+ case 0:
1442
+ return i * (n ? 6103515625e-14 * n : 0);
1443
+ }
1444
+ return i * Math.pow(2, t - 15) * (1 + n);
1445
+ }
1446
+ function Fe(e) {
1447
+ if (e !== e)
1448
+ return 32256;
1449
+ ri[0] = e;
1450
+ const t = (yt[1] & 2147483648) >> 16 & 65535;
1451
+ let n = yt[1] & 2146435072, i = 0;
1452
+ return n >= 1089470464 ? yt[0] > 0 ? n = 31744 : (n = (n & 2080374784) >> 16, i = (yt[1] & 1048575) >> 10) : n <= 1056964608 ? (i = 1048576 + (yt[1] & 1048575), i = 1048576 + (i << (n >> 20) - 998) >> 21, n = 0) : (n = n - 1056964608 >> 10, i = (yt[1] & 1048575) + 512 >> 10), t | n | i & 65535;
1453
+ }
1454
+ const Oa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1455
+ __proto__: null,
1456
+ float64ToUint16: Fe,
1457
+ uint16ToFloat64: Ce
1458
+ }, Symbol.toStringTag, { value: "Module" }));
1459
+ class v extends _ {
1460
+ }
1461
+ function S(e) {
1462
+ return (t, n, i) => {
1463
+ if (t.setValid(n, i != null))
1464
+ return e(t, n, i);
1465
+ };
1466
+ }
1467
+ const Is = (e, t, n) => {
1468
+ e[t] = Math.floor(n / 864e5);
1469
+ }, si = (e, t, n, i) => {
1470
+ if (n + 1 < t.length) {
1471
+ const r = W(t[n]), s = W(t[n + 1]);
1472
+ e.set(i.subarray(0, s - r), r);
1473
+ }
1474
+ }, Ss = ({ offset: e, values: t }, n, i) => {
1475
+ const r = e + n;
1476
+ i ? t[r >> 3] |= 1 << r % 8 : t[r >> 3] &= ~(1 << r % 8);
1477
+ }, rt = ({ values: e }, t, n) => {
1478
+ e[t] = n;
1479
+ }, Le = ({ values: e }, t, n) => {
1480
+ e[t] = n;
1481
+ }, oi = ({ values: e }, t, n) => {
1482
+ e[t] = Fe(n);
1483
+ }, ws = (e, t, n) => {
1484
+ switch (e.type.precision) {
1485
+ case x.HALF:
1486
+ return oi(e, t, n);
1487
+ case x.SINGLE:
1488
+ case x.DOUBLE:
1489
+ return Le(e, t, n);
1490
+ }
1491
+ }, Ee = ({ values: e }, t, n) => {
1492
+ Is(e, t, n.valueOf());
1493
+ }, Ve = ({ values: e }, t, n) => {
1494
+ e[t] = BigInt(n);
1495
+ }, ai = ({ stride: e, values: t }, n, i) => {
1496
+ t.set(i.subarray(0, e), e * n);
1497
+ }, li = ({ values: e, valueOffsets: t }, n, i) => si(e, t, n, i), ci = ({ values: e, valueOffsets: t }, n, i) => si(e, t, n, ne(i)), ui = (e, t, n) => {
1498
+ e.type.unit === Z.DAY ? Ee(e, t, n) : Ve(e, t, n);
1499
+ }, xe = ({ values: e }, t, n) => {
1500
+ e[t] = BigInt(n / 1e3);
1501
+ }, ke = ({ values: e }, t, n) => {
1502
+ e[t] = BigInt(n);
1503
+ }, je = ({ values: e }, t, n) => {
1504
+ e[t] = BigInt(n * 1e3);
1505
+ }, ze = ({ values: e }, t, n) => {
1506
+ e[t] = BigInt(n * 1e6);
1507
+ }, di = (e, t, n) => {
1508
+ switch (e.type.unit) {
1509
+ case y.SECOND:
1510
+ return xe(e, t, n);
1511
+ case y.MILLISECOND:
1512
+ return ke(e, t, n);
1513
+ case y.MICROSECOND:
1514
+ return je(e, t, n);
1515
+ case y.NANOSECOND:
1516
+ return ze(e, t, n);
1517
+ }
1518
+ }, $e = ({ values: e }, t, n) => {
1519
+ e[t] = n;
1520
+ }, Pe = ({ values: e }, t, n) => {
1521
+ e[t] = n;
1522
+ }, Re = ({ values: e }, t, n) => {
1523
+ e[t] = n;
1524
+ }, Ye = ({ values: e }, t, n) => {
1525
+ e[t] = n;
1526
+ }, hi = (e, t, n) => {
1527
+ switch (e.type.unit) {
1528
+ case y.SECOND:
1529
+ return $e(e, t, n);
1530
+ case y.MILLISECOND:
1531
+ return Pe(e, t, n);
1532
+ case y.MICROSECOND:
1533
+ return Re(e, t, n);
1534
+ case y.NANOSECOND:
1535
+ return Ye(e, t, n);
1536
+ }
1537
+ }, yi = ({ values: e, stride: t }, n, i) => {
1538
+ e.set(i.subarray(0, t), t * n);
1539
+ }, As = (e, t, n) => {
1540
+ const i = e.children[0], r = e.valueOffsets, s = G.getVisitFn(i);
1541
+ if (Array.isArray(n))
1542
+ for (let o = -1, a = r[t], c = r[t + 1]; a < c; )
1543
+ s(i, a++, n[++o]);
1544
+ else
1545
+ for (let o = -1, a = r[t], c = r[t + 1]; a < c; )
1546
+ s(i, a++, n.get(++o));
1547
+ }, Ds = (e, t, n) => {
1548
+ const i = e.children[0], { valueOffsets: r } = e, s = G.getVisitFn(i);
1549
+ let { [t]: o, [t + 1]: a } = r;
1550
+ const c = n instanceof Map ? n.entries() : Object.entries(n);
1551
+ for (const u of c)
1552
+ if (s(i, o, u), ++o >= a)
1553
+ break;
1554
+ }, _s = (e, t) => (n, i, r, s) => i && n(i, e, t[s]), Bs = (e, t) => (n, i, r, s) => i && n(i, e, t.get(s)), Ts = (e, t) => (n, i, r, s) => i && n(i, e, t.get(r.name)), Os = (e, t) => (n, i, r, s) => i && n(i, e, t[r.name]), Ms = (e, t, n) => {
1555
+ const i = e.type.children.map((s) => G.getVisitFn(s.type)), r = n instanceof Map ? Ts(t, n) : n instanceof D ? Bs(t, n) : Array.isArray(n) ? _s(t, n) : Os(t, n);
1556
+ e.type.children.forEach((s, o) => r(i[o], e.children[o], s, o));
1557
+ }, Ns = (e, t, n) => {
1558
+ e.type.mode === K.Dense ? pi(e, t, n) : fi(e, t, n);
1559
+ }, pi = (e, t, n) => {
1560
+ const i = e.type.typeIdToChildIndex[e.typeIds[t]], r = e.children[i];
1561
+ G.visit(r, e.valueOffsets[t], n);
1562
+ }, fi = (e, t, n) => {
1563
+ const i = e.type.typeIdToChildIndex[e.typeIds[t]], r = e.children[i];
1564
+ G.visit(r, t, n);
1565
+ }, Us = (e, t, n) => {
1566
+ var i;
1567
+ (i = e.dictionary) === null || i === void 0 || i.set(e.values[t], n);
1568
+ }, gi = (e, t, n) => {
1569
+ switch (e.type.unit) {
1570
+ case j.YEAR_MONTH:
1571
+ return He(e, t, n);
1572
+ case j.DAY_TIME:
1573
+ return We(e, t, n);
1574
+ case j.MONTH_DAY_NANO:
1575
+ return Ke(e, t, n);
1576
+ }
1577
+ }, We = ({ values: e }, t, n) => {
1578
+ e.set(n.subarray(0, 2), 2 * t);
1579
+ }, He = ({ values: e }, t, n) => {
1580
+ e[t] = n[0] * 12 + n[1] % 12;
1581
+ }, Ke = ({ values: e, stride: t }, n, i) => {
1582
+ e.set(i.subarray(0, t), t * n);
1583
+ }, Ge = ({ values: e }, t, n) => {
1584
+ e[t] = n;
1585
+ }, Je = ({ values: e }, t, n) => {
1586
+ e[t] = n;
1587
+ }, qe = ({ values: e }, t, n) => {
1588
+ e[t] = n;
1589
+ }, Qe = ({ values: e }, t, n) => {
1590
+ e[t] = n;
1591
+ }, mi = (e, t, n) => {
1592
+ switch (e.type.unit) {
1593
+ case y.SECOND:
1594
+ return Ge(e, t, n);
1595
+ case y.MILLISECOND:
1596
+ return Je(e, t, n);
1597
+ case y.MICROSECOND:
1598
+ return qe(e, t, n);
1599
+ case y.NANOSECOND:
1600
+ return Qe(e, t, n);
1601
+ }
1602
+ }, Cs = (e, t, n) => {
1603
+ const { stride: i } = e, r = e.children[0], s = G.getVisitFn(r);
1604
+ if (Array.isArray(n))
1605
+ for (let o = -1, a = t * i; ++o < i; )
1606
+ s(r, a + o, n[o]);
1607
+ else
1608
+ for (let o = -1, a = t * i; ++o < i; )
1609
+ s(r, a + o, n.get(o));
1610
+ };
1611
+ v.prototype.visitBool = S(Ss);
1612
+ v.prototype.visitInt = S(rt);
1613
+ v.prototype.visitInt8 = S(rt);
1614
+ v.prototype.visitInt16 = S(rt);
1615
+ v.prototype.visitInt32 = S(rt);
1616
+ v.prototype.visitInt64 = S(rt);
1617
+ v.prototype.visitUint8 = S(rt);
1618
+ v.prototype.visitUint16 = S(rt);
1619
+ v.prototype.visitUint32 = S(rt);
1620
+ v.prototype.visitUint64 = S(rt);
1621
+ v.prototype.visitFloat = S(ws);
1622
+ v.prototype.visitFloat16 = S(oi);
1623
+ v.prototype.visitFloat32 = S(Le);
1624
+ v.prototype.visitFloat64 = S(Le);
1625
+ v.prototype.visitUtf8 = S(ci);
1626
+ v.prototype.visitLargeUtf8 = S(ci);
1627
+ v.prototype.visitBinary = S(li);
1628
+ v.prototype.visitLargeBinary = S(li);
1629
+ v.prototype.visitFixedSizeBinary = S(ai);
1630
+ v.prototype.visitDate = S(ui);
1631
+ v.prototype.visitDateDay = S(Ee);
1632
+ v.prototype.visitDateMillisecond = S(Ve);
1633
+ v.prototype.visitTimestamp = S(di);
1634
+ v.prototype.visitTimestampSecond = S(xe);
1635
+ v.prototype.visitTimestampMillisecond = S(ke);
1636
+ v.prototype.visitTimestampMicrosecond = S(je);
1637
+ v.prototype.visitTimestampNanosecond = S(ze);
1638
+ v.prototype.visitTime = S(hi);
1639
+ v.prototype.visitTimeSecond = S($e);
1640
+ v.prototype.visitTimeMillisecond = S(Pe);
1641
+ v.prototype.visitTimeMicrosecond = S(Re);
1642
+ v.prototype.visitTimeNanosecond = S(Ye);
1643
+ v.prototype.visitDecimal = S(yi);
1644
+ v.prototype.visitList = S(As);
1645
+ v.prototype.visitStruct = S(Ms);
1646
+ v.prototype.visitUnion = S(Ns);
1647
+ v.prototype.visitDenseUnion = S(pi);
1648
+ v.prototype.visitSparseUnion = S(fi);
1649
+ v.prototype.visitDictionary = S(Us);
1650
+ v.prototype.visitInterval = S(gi);
1651
+ v.prototype.visitIntervalDayTime = S(We);
1652
+ v.prototype.visitIntervalYearMonth = S(He);
1653
+ v.prototype.visitIntervalMonthDayNano = S(Ke);
1654
+ v.prototype.visitDuration = S(mi);
1655
+ v.prototype.visitDurationSecond = S(Ge);
1656
+ v.prototype.visitDurationMillisecond = S(Je);
1657
+ v.prototype.visitDurationMicrosecond = S(qe);
1658
+ v.prototype.visitDurationNanosecond = S(Qe);
1659
+ v.prototype.visitFixedSizeList = S(Cs);
1660
+ v.prototype.visitMap = S(Ds);
1661
+ const G = new v(), J = Symbol.for("parent"), bt = Symbol.for("rowIndex");
1662
+ class Xe {
1663
+ constructor(t, n) {
1664
+ return this[J] = t, this[bt] = n, new Proxy(this, Es);
1665
+ }
1666
+ toArray() {
1667
+ return Object.values(this.toJSON());
1668
+ }
1669
+ toJSON() {
1670
+ const t = this[bt], n = this[J], i = n.type.children, r = {};
1671
+ for (let s = -1, o = i.length; ++s < o; )
1672
+ r[i[s].name] = $.visit(n.children[s], t);
1673
+ return r;
1674
+ }
1675
+ toString() {
1676
+ return `{${[...this].map(([t, n]) => `${lt(t)}: ${lt(n)}`).join(", ")}}`;
1677
+ }
1678
+ [Symbol.for("nodejs.util.inspect.custom")]() {
1679
+ return this.toString();
1680
+ }
1681
+ [Symbol.iterator]() {
1682
+ return new Fs(this[J], this[bt]);
1683
+ }
1684
+ }
1685
+ class Fs {
1686
+ constructor(t, n) {
1687
+ this.childIndex = 0, this.children = t.children, this.rowIndex = n, this.childFields = t.type.children, this.numChildren = this.childFields.length;
1688
+ }
1689
+ [Symbol.iterator]() {
1690
+ return this;
1691
+ }
1692
+ next() {
1693
+ const t = this.childIndex;
1694
+ return t < this.numChildren ? (this.childIndex = t + 1, {
1695
+ done: !1,
1696
+ value: [
1697
+ this.childFields[t].name,
1698
+ $.visit(this.children[t], this.rowIndex)
1699
+ ]
1700
+ }) : { done: !0, value: null };
1701
+ }
1702
+ }
1703
+ Object.defineProperties(Xe.prototype, {
1704
+ [Symbol.toStringTag]: { enumerable: !1, configurable: !1, value: "Row" },
1705
+ [J]: { writable: !0, enumerable: !1, configurable: !1, value: null },
1706
+ [bt]: { writable: !0, enumerable: !1, configurable: !1, value: -1 }
1707
+ });
1708
+ class Ls {
1709
+ isExtensible() {
1710
+ return !1;
1711
+ }
1712
+ deleteProperty() {
1713
+ return !1;
1714
+ }
1715
+ preventExtensions() {
1716
+ return !0;
1717
+ }
1718
+ ownKeys(t) {
1719
+ return t[J].type.children.map((n) => n.name);
1720
+ }
1721
+ has(t, n) {
1722
+ return t[J].type.children.some((i) => i.name === n);
1723
+ }
1724
+ getOwnPropertyDescriptor(t, n) {
1725
+ if (t[J].type.children.some((i) => i.name === n))
1726
+ return { writable: !0, enumerable: !0, configurable: !0 };
1727
+ }
1728
+ get(t, n) {
1729
+ if (Reflect.has(t, n))
1730
+ return t[n];
1731
+ const i = t[J].type.children.findIndex((r) => r.name === n);
1732
+ if (i !== -1) {
1733
+ const r = $.visit(t[J].children[i], t[bt]);
1734
+ return Reflect.set(t, n, r), r;
1735
+ }
1736
+ }
1737
+ set(t, n, i) {
1738
+ const r = t[J].type.children.findIndex((s) => s.name === n);
1739
+ return r !== -1 ? (G.visit(t[J].children[r], t[bt], i), Reflect.set(t, n, i)) : Reflect.has(t, n) || typeof n == "symbol" ? Reflect.set(t, n, i) : !1;
1740
+ }
1741
+ }
1742
+ const Es = new Ls();
1743
+ class p extends _ {
1744
+ }
1745
+ function b(e) {
1746
+ return (t, n) => t.getValid(n) ? e(t, n) : null;
1747
+ }
1748
+ const Vs = (e, t) => 864e5 * e[t], xs = (e, t) => null, vi = (e, t, n) => {
1749
+ if (n + 1 >= t.length)
1750
+ return null;
1751
+ const i = W(t[n]), r = W(t[n + 1]);
1752
+ return e.subarray(i, r);
1753
+ }, ks = ({ offset: e, values: t }, n) => {
1754
+ const i = e + n;
1755
+ return (t[i >> 3] & 1 << i % 8) !== 0;
1756
+ }, bi = ({ values: e }, t) => Vs(e, t), Ii = ({ values: e }, t) => W(e[t]), ct = ({ stride: e, values: t }, n) => t[e * n], js = ({ stride: e, values: t }, n) => Ce(t[e * n]), Si = ({ values: e }, t) => e[t], zs = ({ stride: e, values: t }, n) => t.subarray(e * n, e * (n + 1)), wi = ({ values: e, valueOffsets: t }, n) => vi(e, t, n), Ai = ({ values: e, valueOffsets: t }, n) => {
1757
+ const i = vi(e, t, n);
1758
+ return i !== null ? Nr(i) : null;
1759
+ }, $s = ({ values: e }, t) => e[t], Ps = ({ type: e, values: t }, n) => e.precision !== x.HALF ? t[n] : Ce(t[n]), Rs = (e, t) => e.type.unit === Z.DAY ? bi(e, t) : Ii(e, t), Di = ({ values: e }, t) => 1e3 * W(e[t]), _i = ({ values: e }, t) => W(e[t]), Bi = ({ values: e }, t) => Bn(e[t], BigInt(1e3)), Ti = ({ values: e }, t) => Bn(e[t], BigInt(1e6)), Ys = (e, t) => {
1760
+ switch (e.type.unit) {
1761
+ case y.SECOND:
1762
+ return Di(e, t);
1763
+ case y.MILLISECOND:
1764
+ return _i(e, t);
1765
+ case y.MICROSECOND:
1766
+ return Bi(e, t);
1767
+ case y.NANOSECOND:
1768
+ return Ti(e, t);
1769
+ }
1770
+ }, Oi = ({ values: e }, t) => e[t], Mi = ({ values: e }, t) => e[t], Ni = ({ values: e }, t) => e[t], Ui = ({ values: e }, t) => e[t], Ws = (e, t) => {
1771
+ switch (e.type.unit) {
1772
+ case y.SECOND:
1773
+ return Oi(e, t);
1774
+ case y.MILLISECOND:
1775
+ return Mi(e, t);
1776
+ case y.MICROSECOND:
1777
+ return Ni(e, t);
1778
+ case y.NANOSECOND:
1779
+ return Ui(e, t);
1780
+ }
1781
+ }, Hs = ({ values: e, stride: t }, n) => re.decimal(e.subarray(t * n, t * (n + 1))), Ks = (e, t) => {
1782
+ const { valueOffsets: n, stride: i, children: r } = e, { [t * i]: s, [t * i + 1]: o } = n, c = r[0].slice(s, o - s);
1783
+ return new D([c]);
1784
+ }, Gs = (e, t) => {
1785
+ const { valueOffsets: n, children: i } = e, { [t]: r, [t + 1]: s } = n, o = i[0];
1786
+ return new se(o.slice(r, s - r));
1787
+ }, Js = (e, t) => new Xe(e, t), qs = (e, t) => e.type.mode === K.Dense ? Ci(e, t) : Fi(e, t), Ci = (e, t) => {
1788
+ const n = e.type.typeIdToChildIndex[e.typeIds[t]], i = e.children[n];
1789
+ return $.visit(i, e.valueOffsets[t]);
1790
+ }, Fi = (e, t) => {
1791
+ const n = e.type.typeIdToChildIndex[e.typeIds[t]], i = e.children[n];
1792
+ return $.visit(i, t);
1793
+ }, Qs = (e, t) => {
1794
+ var n;
1795
+ return (n = e.dictionary) === null || n === void 0 ? void 0 : n.get(e.values[t]);
1796
+ }, Xs = (e, t) => e.type.unit === j.MONTH_DAY_NANO ? Vi(e, t) : e.type.unit === j.DAY_TIME ? Li(e, t) : Ei(e, t), Li = ({ values: e }, t) => e.subarray(2 * t, 2 * (t + 1)), Ei = ({ values: e }, t) => {
1797
+ const n = e[t], i = new Int32Array(2);
1798
+ return i[0] = Math.trunc(n / 12), i[1] = Math.trunc(n % 12), i;
1799
+ }, Vi = ({ values: e }, t) => e.subarray(4 * t, 4 * (t + 1)), xi = ({ values: e }, t) => e[t], ki = ({ values: e }, t) => e[t], ji = ({ values: e }, t) => e[t], zi = ({ values: e }, t) => e[t], Zs = (e, t) => {
1800
+ switch (e.type.unit) {
1801
+ case y.SECOND:
1802
+ return xi(e, t);
1803
+ case y.MILLISECOND:
1804
+ return ki(e, t);
1805
+ case y.MICROSECOND:
1806
+ return ji(e, t);
1807
+ case y.NANOSECOND:
1808
+ return zi(e, t);
1809
+ }
1810
+ }, to = (e, t) => {
1811
+ const { stride: n, children: i } = e, s = i[0].slice(t * n, n);
1812
+ return new D([s]);
1813
+ };
1814
+ p.prototype.visitNull = b(xs);
1815
+ p.prototype.visitBool = b(ks);
1816
+ p.prototype.visitInt = b($s);
1817
+ p.prototype.visitInt8 = b(ct);
1818
+ p.prototype.visitInt16 = b(ct);
1819
+ p.prototype.visitInt32 = b(ct);
1820
+ p.prototype.visitInt64 = b(Si);
1821
+ p.prototype.visitUint8 = b(ct);
1822
+ p.prototype.visitUint16 = b(ct);
1823
+ p.prototype.visitUint32 = b(ct);
1824
+ p.prototype.visitUint64 = b(Si);
1825
+ p.prototype.visitFloat = b(Ps);
1826
+ p.prototype.visitFloat16 = b(js);
1827
+ p.prototype.visitFloat32 = b(ct);
1828
+ p.prototype.visitFloat64 = b(ct);
1829
+ p.prototype.visitUtf8 = b(Ai);
1830
+ p.prototype.visitLargeUtf8 = b(Ai);
1831
+ p.prototype.visitBinary = b(wi);
1832
+ p.prototype.visitLargeBinary = b(wi);
1833
+ p.prototype.visitFixedSizeBinary = b(zs);
1834
+ p.prototype.visitDate = b(Rs);
1835
+ p.prototype.visitDateDay = b(bi);
1836
+ p.prototype.visitDateMillisecond = b(Ii);
1837
+ p.prototype.visitTimestamp = b(Ys);
1838
+ p.prototype.visitTimestampSecond = b(Di);
1839
+ p.prototype.visitTimestampMillisecond = b(_i);
1840
+ p.prototype.visitTimestampMicrosecond = b(Bi);
1841
+ p.prototype.visitTimestampNanosecond = b(Ti);
1842
+ p.prototype.visitTime = b(Ws);
1843
+ p.prototype.visitTimeSecond = b(Oi);
1844
+ p.prototype.visitTimeMillisecond = b(Mi);
1845
+ p.prototype.visitTimeMicrosecond = b(Ni);
1846
+ p.prototype.visitTimeNanosecond = b(Ui);
1847
+ p.prototype.visitDecimal = b(Hs);
1848
+ p.prototype.visitList = b(Ks);
1849
+ p.prototype.visitStruct = b(Js);
1850
+ p.prototype.visitUnion = b(qs);
1851
+ p.prototype.visitDenseUnion = b(Ci);
1852
+ p.prototype.visitSparseUnion = b(Fi);
1853
+ p.prototype.visitDictionary = b(Qs);
1854
+ p.prototype.visitInterval = b(Xs);
1855
+ p.prototype.visitIntervalDayTime = b(Li);
1856
+ p.prototype.visitIntervalYearMonth = b(Ei);
1857
+ p.prototype.visitIntervalMonthDayNano = b(Vi);
1858
+ p.prototype.visitDuration = b(Zs);
1859
+ p.prototype.visitDurationSecond = b(xi);
1860
+ p.prototype.visitDurationMillisecond = b(ki);
1861
+ p.prototype.visitDurationMicrosecond = b(ji);
1862
+ p.prototype.visitDurationNanosecond = b(zi);
1863
+ p.prototype.visitFixedSizeList = b(to);
1864
+ p.prototype.visitMap = b(Gs);
1865
+ const $ = new p(), ut = Symbol.for("keys"), It = Symbol.for("vals"), gt = Symbol.for("kKeysAsStrings"), De = Symbol.for("_kKeysAsStrings");
1866
+ class se {
1867
+ constructor(t) {
1868
+ return this[ut] = new D([t.children[0]]).memoize(), this[It] = t.children[1], new Proxy(this, new no());
1869
+ }
1870
+ /** @ignore */
1871
+ get [gt]() {
1872
+ return this[De] || (this[De] = Array.from(this[ut].toArray(), String));
1873
+ }
1874
+ [Symbol.iterator]() {
1875
+ return new eo(this[ut], this[It]);
1876
+ }
1877
+ get size() {
1878
+ return this[ut].length;
1879
+ }
1880
+ toArray() {
1881
+ return Object.values(this.toJSON());
1882
+ }
1883
+ toJSON() {
1884
+ const t = this[ut], n = this[It], i = {};
1885
+ for (let r = -1, s = t.length; ++r < s; )
1886
+ i[t.get(r)] = $.visit(n, r);
1887
+ return i;
1888
+ }
1889
+ toString() {
1890
+ return `{${[...this].map(([t, n]) => `${lt(t)}: ${lt(n)}`).join(", ")}}`;
1891
+ }
1892
+ [Symbol.for("nodejs.util.inspect.custom")]() {
1893
+ return this.toString();
1894
+ }
1895
+ }
1896
+ class eo {
1897
+ constructor(t, n) {
1898
+ this.keys = t, this.vals = n, this.keyIndex = 0, this.numKeys = t.length;
1899
+ }
1900
+ [Symbol.iterator]() {
1901
+ return this;
1902
+ }
1903
+ next() {
1904
+ const t = this.keyIndex;
1905
+ return t === this.numKeys ? { done: !0, value: null } : (this.keyIndex++, {
1906
+ done: !1,
1907
+ value: [
1908
+ this.keys.get(t),
1909
+ $.visit(this.vals, t)
1910
+ ]
1911
+ });
1912
+ }
1913
+ }
1914
+ class no {
1915
+ isExtensible() {
1916
+ return !1;
1917
+ }
1918
+ deleteProperty() {
1919
+ return !1;
1920
+ }
1921
+ preventExtensions() {
1922
+ return !0;
1923
+ }
1924
+ ownKeys(t) {
1925
+ return t[gt];
1926
+ }
1927
+ has(t, n) {
1928
+ return t[gt].includes(n);
1929
+ }
1930
+ getOwnPropertyDescriptor(t, n) {
1931
+ if (t[gt].indexOf(n) !== -1)
1932
+ return { writable: !0, enumerable: !0, configurable: !0 };
1933
+ }
1934
+ get(t, n) {
1935
+ if (Reflect.has(t, n))
1936
+ return t[n];
1937
+ const i = t[gt].indexOf(n);
1938
+ if (i !== -1) {
1939
+ const r = $.visit(Reflect.get(t, It), i);
1940
+ return Reflect.set(t, n, r), r;
1941
+ }
1942
+ }
1943
+ set(t, n, i) {
1944
+ const r = t[gt].indexOf(n);
1945
+ return r !== -1 ? (G.visit(Reflect.get(t, It), r, i), Reflect.set(t, n, i)) : Reflect.has(t, n) ? Reflect.set(t, n, i) : !1;
1946
+ }
1947
+ }
1948
+ Object.defineProperties(se.prototype, {
1949
+ [Symbol.toStringTag]: { enumerable: !1, configurable: !1, value: "Row" },
1950
+ [ut]: { writable: !0, enumerable: !1, configurable: !1, value: null },
1951
+ [It]: { writable: !0, enumerable: !1, configurable: !1, value: null },
1952
+ [De]: { writable: !0, enumerable: !1, configurable: !1, value: null }
1953
+ });
1954
+ let mn;
1955
+ function Ze(e, t, n, i) {
1956
+ const { length: r = 0 } = e;
1957
+ let s = typeof t != "number" ? 0 : t, o = typeof n != "number" ? r : n;
1958
+ return s < 0 && (s = (s % r + r) % r), o < 0 && (o = (o % r + r) % r), o < s && (mn = s, s = o, o = mn), o > r && (o = r), i ? i(e, s, o) : [s, o];
1959
+ }
1960
+ const oe = (e, t) => e < 0 ? t + e : e, vn = (e) => e !== e;
1961
+ function dt(e) {
1962
+ if (typeof e !== "object" || e === null)
1963
+ return vn(e) ? vn : (n) => n === e;
1964
+ if (e instanceof Date) {
1965
+ const n = e.valueOf();
1966
+ return (i) => i instanceof Date ? i.valueOf() === n : !1;
1967
+ }
1968
+ return ArrayBuffer.isView(e) ? (n) => n ? _n(e, n) : !1 : e instanceof Map ? ro(e) : Array.isArray(e) ? io(e) : e instanceof D ? so(e) : oo(e, !0);
1969
+ }
1970
+ function io(e) {
1971
+ const t = [];
1972
+ for (let n = -1, i = e.length; ++n < i; )
1973
+ t[n] = dt(e[n]);
1974
+ return ae(t);
1975
+ }
1976
+ function ro(e) {
1977
+ let t = -1;
1978
+ const n = [];
1979
+ for (const i of e.values())
1980
+ n[++t] = dt(i);
1981
+ return ae(n);
1982
+ }
1983
+ function so(e) {
1984
+ const t = [];
1985
+ for (let n = -1, i = e.length; ++n < i; )
1986
+ t[n] = dt(e.get(n));
1987
+ return ae(t);
1988
+ }
1989
+ function oo(e, t = !1) {
1990
+ const n = Object.keys(e);
1991
+ if (!t && n.length === 0)
1992
+ return () => !1;
1993
+ const i = [];
1994
+ for (let r = -1, s = n.length; ++r < s; )
1995
+ i[r] = dt(e[n[r]]);
1996
+ return ae(i, n);
1997
+ }
1998
+ function ae(e, t) {
1999
+ return (n) => {
2000
+ if (!n || typeof n != "object")
2001
+ return !1;
2002
+ switch (n.constructor) {
2003
+ case Array:
2004
+ return ao(e, n);
2005
+ case Map:
2006
+ return bn(e, n, n.keys());
2007
+ case se:
2008
+ case Xe:
2009
+ case Object:
2010
+ case void 0:
2011
+ return bn(e, n, t || Object.keys(n));
2012
+ }
2013
+ return n instanceof D ? lo(e, n) : !1;
2014
+ };
2015
+ }
2016
+ function ao(e, t) {
2017
+ const n = e.length;
2018
+ if (t.length !== n)
2019
+ return !1;
2020
+ for (let i = -1; ++i < n; )
2021
+ if (!e[i](t[i]))
2022
+ return !1;
2023
+ return !0;
2024
+ }
2025
+ function lo(e, t) {
2026
+ const n = e.length;
2027
+ if (t.length !== n)
2028
+ return !1;
2029
+ for (let i = -1; ++i < n; )
2030
+ if (!e[i](t.get(i)))
2031
+ return !1;
2032
+ return !0;
2033
+ }
2034
+ function bn(e, t, n) {
2035
+ const i = n[Symbol.iterator](), r = t instanceof Map ? t.keys() : Object.keys(t)[Symbol.iterator](), s = t instanceof Map ? t.values() : Object.values(t)[Symbol.iterator]();
2036
+ let o = 0;
2037
+ const a = e.length;
2038
+ let c = s.next(), u = i.next(), d = r.next();
2039
+ for (; o < a && !u.done && !d.done && !c.done && !(u.value !== d.value || !e[o](c.value)); ++o, u = i.next(), d = r.next(), c = s.next())
2040
+ ;
2041
+ return o === a && u.done && d.done && c.done ? !0 : (i.return && i.return(), r.return && r.return(), s.return && s.return(), !1);
2042
+ }
2043
+ const Ma = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2044
+ __proto__: null,
2045
+ clampRange: Ze,
2046
+ createElementComparator: dt,
2047
+ wrapIndex: oe
2048
+ }, Symbol.toStringTag, { value: "Module" }));
2049
+ function tn(e, t, n, i) {
2050
+ return (n & 1 << i) !== 0;
2051
+ }
2052
+ function $i(e, t, n, i) {
2053
+ return (n & 1 << i) >> i;
2054
+ }
2055
+ function co(e, t, n) {
2056
+ return n ? !!(e[t >> 3] |= 1 << t % 8) || !0 : !(e[t >> 3] &= ~(1 << t % 8)) && !1;
2057
+ }
2058
+ function _e(e, t, n) {
2059
+ const i = n.byteLength + 7 & -8;
2060
+ if (e > 0 || n.byteLength < i) {
2061
+ const r = new Uint8Array(i);
2062
+ return r.set(e % 8 === 0 ? n.subarray(e >> 3) : (
2063
+ // Otherwise iterate each bit from the offset and return a new one
2064
+ Pi(new le(n, e, t, null, tn)).subarray(0, i)
2065
+ )), r;
2066
+ }
2067
+ return n;
2068
+ }
2069
+ function Pi(e) {
2070
+ const t = [];
2071
+ let n = 0, i = 0, r = 0;
2072
+ for (const o of e)
2073
+ o && (r |= 1 << i), ++i === 8 && (t[n++] = r, r = i = 0);
2074
+ (n === 0 || i > 0) && (t[n++] = r);
2075
+ const s = new Uint8Array(t.length + 7 & -8);
2076
+ return s.set(t), s;
2077
+ }
2078
+ class le {
2079
+ constructor(t, n, i, r, s) {
2080
+ this.bytes = t, this.length = i, this.context = r, this.get = s, this.bit = n % 8, this.byteIndex = n >> 3, this.byte = t[this.byteIndex++], this.index = 0;
2081
+ }
2082
+ next() {
2083
+ return this.index < this.length ? (this.bit === 8 && (this.bit = 0, this.byte = this.bytes[this.byteIndex++]), {
2084
+ value: this.get(this.context, this.index++, this.byte, this.bit++)
2085
+ }) : { done: !0, value: null };
2086
+ }
2087
+ [Symbol.iterator]() {
2088
+ return this;
2089
+ }
2090
+ }
2091
+ function Xt(e, t, n) {
2092
+ if (n - t <= 0)
2093
+ return 0;
2094
+ if (n - t < 8) {
2095
+ let s = 0;
2096
+ for (const o of new le(e, t, n - t, e, $i))
2097
+ s += o;
2098
+ return s;
2099
+ }
2100
+ const i = n >> 3 << 3, r = t + (t % 8 === 0 ? 0 : 8 - t % 8);
2101
+ return (
2102
+ // Get the popcnt of bits between the left hand side, and the next highest multiple of 8
2103
+ Xt(e, t, r) + // Get the popcnt of bits between the right hand side, and the next lowest multiple of 8
2104
+ Xt(e, i, n) + // Get the popcnt of all bits between the left and right hand sides' multiples of 8
2105
+ Ri(e, r >> 3, i - r >> 3)
2106
+ );
2107
+ }
2108
+ function Ri(e, t, n) {
2109
+ let i = 0, r = Math.trunc(t);
2110
+ const s = new DataView(e.buffer, e.byteOffset, e.byteLength), o = n === void 0 ? e.byteLength : r + n;
2111
+ for (; o - r >= 4; )
2112
+ i += Ht(s.getUint32(r)), r += 4;
2113
+ for (; o - r >= 2; )
2114
+ i += Ht(s.getUint16(r)), r += 2;
2115
+ for (; o - r >= 1; )
2116
+ i += Ht(s.getUint8(r)), r += 1;
2117
+ return i;
2118
+ }
2119
+ function Ht(e) {
2120
+ let t = Math.trunc(e);
2121
+ return t = t - (t >>> 1 & 1431655765), t = (t & 858993459) + (t >>> 2 & 858993459), (t + (t >>> 4) & 252645135) * 16843009 >>> 24;
2122
+ }
2123
+ const Na = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2124
+ __proto__: null,
2125
+ BitIterator: le,
2126
+ getBit: $i,
2127
+ getBool: tn,
2128
+ packBools: Pi,
2129
+ popcnt_array: Ri,
2130
+ popcnt_bit_range: Xt,
2131
+ popcnt_uint32: Ht,
2132
+ setBool: co,
2133
+ truncateBitmap: _e
2134
+ }, Symbol.toStringTag, { value: "Module" })), uo = -1;
2135
+ class T {
2136
+ get typeId() {
2137
+ return this.type.typeId;
2138
+ }
2139
+ get ArrayType() {
2140
+ return this.type.ArrayType;
2141
+ }
2142
+ get buffers() {
2143
+ return [this.valueOffsets, this.values, this.nullBitmap, this.typeIds];
2144
+ }
2145
+ get nullable() {
2146
+ if (this._nullCount !== 0) {
2147
+ const { type: t } = this;
2148
+ return A.isSparseUnion(t) ? this.children.some((n) => n.nullable) : A.isDenseUnion(t) ? this.children.some((n) => n.nullable) : this.nullBitmap && this.nullBitmap.byteLength > 0;
2149
+ }
2150
+ return !0;
2151
+ }
2152
+ get byteLength() {
2153
+ let t = 0;
2154
+ const { valueOffsets: n, values: i, nullBitmap: r, typeIds: s } = this;
2155
+ return n && (t += n.byteLength), i && (t += i.byteLength), r && (t += r.byteLength), s && (t += s.byteLength), this.children.reduce((o, a) => o + a.byteLength, t);
2156
+ }
2157
+ get nullCount() {
2158
+ if (A.isUnion(this.type))
2159
+ return this.children.reduce((i, r) => i + r.nullCount, 0);
2160
+ let t = this._nullCount, n;
2161
+ return t <= uo && (n = this.nullBitmap) && (this._nullCount = t = n.length === 0 ? (
2162
+ // no null bitmap, so all values are valid
2163
+ 0
2164
+ ) : this.length - Xt(n, this.offset, this.offset + this.length)), t;
2165
+ }
2166
+ constructor(t, n, i, r, s, o = [], a) {
2167
+ this.type = t, this.children = o, this.dictionary = a, this.offset = Math.floor(Math.max(n || 0, 0)), this.length = Math.floor(Math.max(i || 0, 0)), this._nullCount = Math.floor(Math.max(r || 0, -1));
2168
+ let c;
2169
+ s instanceof T ? (this.stride = s.stride, this.values = s.values, this.typeIds = s.typeIds, this.nullBitmap = s.nullBitmap, this.valueOffsets = s.valueOffsets) : (this.stride = X(t), s && ((c = s[0]) && (this.valueOffsets = c), (c = s[1]) && (this.values = c), (c = s[2]) && (this.nullBitmap = c), (c = s[3]) && (this.typeIds = c)));
2170
+ }
2171
+ getValid(t) {
2172
+ const { type: n } = this;
2173
+ if (A.isUnion(n)) {
2174
+ const i = n, r = this.children[i.typeIdToChildIndex[this.typeIds[t]]], s = i.mode === K.Dense ? this.valueOffsets[t] : t;
2175
+ return r.getValid(s);
2176
+ }
2177
+ if (this.nullable && this.nullCount > 0) {
2178
+ const i = this.offset + t;
2179
+ return (this.nullBitmap[i >> 3] & 1 << i % 8) !== 0;
2180
+ }
2181
+ return !0;
2182
+ }
2183
+ setValid(t, n) {
2184
+ let i;
2185
+ const { type: r } = this;
2186
+ if (A.isUnion(r)) {
2187
+ const s = r, o = this.children[s.typeIdToChildIndex[this.typeIds[t]]], a = s.mode === K.Dense ? this.valueOffsets[t] : t;
2188
+ i = o.getValid(a), o.setValid(a, n);
2189
+ } else {
2190
+ let { nullBitmap: s } = this;
2191
+ const { offset: o, length: a } = this, c = o + t, u = 1 << c % 8, d = c >> 3;
2192
+ (!s || s.byteLength <= d) && (s = new Uint8Array((o + a + 63 & -64) >> 3).fill(255), this.nullCount > 0 ? (s.set(_e(o, a, this.nullBitmap), 0), Object.assign(this, { nullBitmap: s })) : Object.assign(this, { nullBitmap: s, _nullCount: 0 }));
2193
+ const h = s[d];
2194
+ i = (h & u) !== 0, s[d] = n ? h | u : h & ~u;
2195
+ }
2196
+ return i !== !!n && (this._nullCount = this.nullCount + (n ? -1 : 1)), n;
2197
+ }
2198
+ clone(t = this.type, n = this.offset, i = this.length, r = this._nullCount, s = this, o = this.children) {
2199
+ return new T(t, n, i, r, s, o, this.dictionary);
2200
+ }
2201
+ slice(t, n) {
2202
+ const { stride: i, typeId: r, children: s } = this, o = +(this._nullCount === 0) - 1, a = r === 16 ? i : 1, c = this._sliceBuffers(t, n, i, r);
2203
+ return this.clone(
2204
+ this.type,
2205
+ this.offset + t,
2206
+ n,
2207
+ o,
2208
+ c,
2209
+ // Don't slice children if we have value offsets (the variable-width types)
2210
+ s.length === 0 || this.valueOffsets ? s : this._sliceChildren(s, a * t, a * n)
2211
+ );
2212
+ }
2213
+ _changeLengthAndBackfillNullBitmap(t) {
2214
+ if (this.typeId === l.Null)
2215
+ return this.clone(this.type, 0, t, 0);
2216
+ const { length: n, nullCount: i } = this, r = new Uint8Array((t + 63 & -64) >> 3).fill(255, 0, n >> 3);
2217
+ r[n >> 3] = (1 << n - (n & -8)) - 1, i > 0 && r.set(_e(this.offset, n, this.nullBitmap), 0);
2218
+ const s = this.buffers;
2219
+ return s[it.VALIDITY] = r, this.clone(this.type, 0, t, i + (t - n), s);
2220
+ }
2221
+ _sliceBuffers(t, n, i, r) {
2222
+ let s;
2223
+ const { buffers: o } = this;
2224
+ return (s = o[it.TYPE]) && (o[it.TYPE] = s.subarray(t, t + n)), (s = o[it.OFFSET]) && (o[it.OFFSET] = s.subarray(t, t + n + 1)) || // Otherwise if no offsets, slice the data buffer. Don't slice the data vector for Booleans, since the offset goes by bits not bytes
2225
+ (s = o[it.DATA]) && (o[it.DATA] = r === 6 ? s : s.subarray(i * t, i * (t + n))), o;
2226
+ }
2227
+ _sliceChildren(t, n, i) {
2228
+ return t.map((r) => r.slice(n, i));
2229
+ }
2230
+ }
2231
+ T.prototype.children = Object.freeze([]);
2232
+ class Ut extends _ {
2233
+ visit(t) {
2234
+ return this.getVisitFn(t.type).call(this, t);
2235
+ }
2236
+ visitNull(t) {
2237
+ const { ["type"]: n, ["offset"]: i = 0, ["length"]: r = 0 } = t;
2238
+ return new T(n, i, r, r);
2239
+ }
2240
+ visitBool(t) {
2241
+ const { ["type"]: n, ["offset"]: i = 0 } = t, r = N(t.nullBitmap), s = O(n.ArrayType, t.data), { ["length"]: o = s.length >> 3, ["nullCount"]: a = t.nullBitmap ? -1 : 0 } = t;
2242
+ return new T(n, i, o, a, [void 0, s, r]);
2243
+ }
2244
+ visitInt(t) {
2245
+ const { ["type"]: n, ["offset"]: i = 0 } = t, r = N(t.nullBitmap), s = O(n.ArrayType, t.data), { ["length"]: o = s.length, ["nullCount"]: a = t.nullBitmap ? -1 : 0 } = t;
2246
+ return new T(n, i, o, a, [void 0, s, r]);
2247
+ }
2248
+ visitFloat(t) {
2249
+ const { ["type"]: n, ["offset"]: i = 0 } = t, r = N(t.nullBitmap), s = O(n.ArrayType, t.data), { ["length"]: o = s.length, ["nullCount"]: a = t.nullBitmap ? -1 : 0 } = t;
2250
+ return new T(n, i, o, a, [void 0, s, r]);
2251
+ }
2252
+ visitUtf8(t) {
2253
+ const { ["type"]: n, ["offset"]: i = 0 } = t, r = N(t.data), s = N(t.nullBitmap), o = pt(t.valueOffsets), { ["length"]: a = o.length - 1, ["nullCount"]: c = t.nullBitmap ? -1 : 0 } = t;
2254
+ return new T(n, i, a, c, [o, r, s]);
2255
+ }
2256
+ visitLargeUtf8(t) {
2257
+ const { ["type"]: n, ["offset"]: i = 0 } = t, r = N(t.data), s = N(t.nullBitmap), o = me(t.valueOffsets), { ["length"]: a = o.length - 1, ["nullCount"]: c = t.nullBitmap ? -1 : 0 } = t;
2258
+ return new T(n, i, a, c, [o, r, s]);
2259
+ }
2260
+ visitBinary(t) {
2261
+ const { ["type"]: n, ["offset"]: i = 0 } = t, r = N(t.data), s = N(t.nullBitmap), o = pt(t.valueOffsets), { ["length"]: a = o.length - 1, ["nullCount"]: c = t.nullBitmap ? -1 : 0 } = t;
2262
+ return new T(n, i, a, c, [o, r, s]);
2263
+ }
2264
+ visitLargeBinary(t) {
2265
+ const { ["type"]: n, ["offset"]: i = 0 } = t, r = N(t.data), s = N(t.nullBitmap), o = me(t.valueOffsets), { ["length"]: a = o.length - 1, ["nullCount"]: c = t.nullBitmap ? -1 : 0 } = t;
2266
+ return new T(n, i, a, c, [o, r, s]);
2267
+ }
2268
+ visitFixedSizeBinary(t) {
2269
+ const { ["type"]: n, ["offset"]: i = 0 } = t, r = N(t.nullBitmap), s = O(n.ArrayType, t.data), { ["length"]: o = s.length / X(n), ["nullCount"]: a = t.nullBitmap ? -1 : 0 } = t;
2270
+ return new T(n, i, o, a, [void 0, s, r]);
2271
+ }
2272
+ visitDate(t) {
2273
+ const { ["type"]: n, ["offset"]: i = 0 } = t, r = N(t.nullBitmap), s = O(n.ArrayType, t.data), { ["length"]: o = s.length / X(n), ["nullCount"]: a = t.nullBitmap ? -1 : 0 } = t;
2274
+ return new T(n, i, o, a, [void 0, s, r]);
2275
+ }
2276
+ visitTimestamp(t) {
2277
+ const { ["type"]: n, ["offset"]: i = 0 } = t, r = N(t.nullBitmap), s = O(n.ArrayType, t.data), { ["length"]: o = s.length / X(n), ["nullCount"]: a = t.nullBitmap ? -1 : 0 } = t;
2278
+ return new T(n, i, o, a, [void 0, s, r]);
2279
+ }
2280
+ visitTime(t) {
2281
+ const { ["type"]: n, ["offset"]: i = 0 } = t, r = N(t.nullBitmap), s = O(n.ArrayType, t.data), { ["length"]: o = s.length / X(n), ["nullCount"]: a = t.nullBitmap ? -1 : 0 } = t;
2282
+ return new T(n, i, o, a, [void 0, s, r]);
2283
+ }
2284
+ visitDecimal(t) {
2285
+ const { ["type"]: n, ["offset"]: i = 0 } = t, r = N(t.nullBitmap), s = O(n.ArrayType, t.data), { ["length"]: o = s.length / X(n), ["nullCount"]: a = t.nullBitmap ? -1 : 0 } = t;
2286
+ return new T(n, i, o, a, [void 0, s, r]);
2287
+ }
2288
+ visitList(t) {
2289
+ const { ["type"]: n, ["offset"]: i = 0, ["child"]: r } = t, s = N(t.nullBitmap), o = pt(t.valueOffsets), { ["length"]: a = o.length - 1, ["nullCount"]: c = t.nullBitmap ? -1 : 0 } = t;
2290
+ return new T(n, i, a, c, [o, void 0, s], [r]);
2291
+ }
2292
+ visitStruct(t) {
2293
+ const { ["type"]: n, ["offset"]: i = 0, ["children"]: r = [] } = t, s = N(t.nullBitmap), { length: o = r.reduce((c, { length: u }) => Math.max(c, u), 0), nullCount: a = t.nullBitmap ? -1 : 0 } = t;
2294
+ return new T(n, i, o, a, [void 0, void 0, s], r);
2295
+ }
2296
+ visitUnion(t) {
2297
+ const { ["type"]: n, ["offset"]: i = 0, ["children"]: r = [] } = t, s = O(n.ArrayType, t.typeIds), { ["length"]: o = s.length, ["nullCount"]: a = -1 } = t;
2298
+ if (A.isSparseUnion(n))
2299
+ return new T(n, i, o, a, [void 0, void 0, void 0, s], r);
2300
+ const c = pt(t.valueOffsets);
2301
+ return new T(n, i, o, a, [c, void 0, void 0, s], r);
2302
+ }
2303
+ visitDictionary(t) {
2304
+ const { ["type"]: n, ["offset"]: i = 0 } = t, r = N(t.nullBitmap), s = O(n.indices.ArrayType, t.data), { ["dictionary"]: o = new D([new Ut().visit({ type: n.dictionary })]) } = t, { ["length"]: a = s.length, ["nullCount"]: c = t.nullBitmap ? -1 : 0 } = t;
2305
+ return new T(n, i, a, c, [void 0, s, r], [], o);
2306
+ }
2307
+ visitInterval(t) {
2308
+ const { ["type"]: n, ["offset"]: i = 0 } = t, r = N(t.nullBitmap), s = O(n.ArrayType, t.data), { ["length"]: o = s.length / X(n), ["nullCount"]: a = t.nullBitmap ? -1 : 0 } = t;
2309
+ return new T(n, i, o, a, [void 0, s, r]);
2310
+ }
2311
+ visitDuration(t) {
2312
+ const { ["type"]: n, ["offset"]: i = 0 } = t, r = N(t.nullBitmap), s = O(n.ArrayType, t.data), { ["length"]: o = s.length, ["nullCount"]: a = t.nullBitmap ? -1 : 0 } = t;
2313
+ return new T(n, i, o, a, [void 0, s, r]);
2314
+ }
2315
+ visitFixedSizeList(t) {
2316
+ const { ["type"]: n, ["offset"]: i = 0, ["child"]: r = new Ut().visit({ type: n.valueType }) } = t, s = N(t.nullBitmap), { ["length"]: o = r.length / X(n), ["nullCount"]: a = t.nullBitmap ? -1 : 0 } = t;
2317
+ return new T(n, i, o, a, [void 0, void 0, s], [r]);
2318
+ }
2319
+ visitMap(t) {
2320
+ const { ["type"]: n, ["offset"]: i = 0, ["child"]: r = new Ut().visit({ type: n.childType }) } = t, s = N(t.nullBitmap), o = pt(t.valueOffsets), { ["length"]: a = o.length - 1, ["nullCount"]: c = t.nullBitmap ? -1 : 0 } = t;
2321
+ return new T(n, i, a, c, [o, void 0, s], [r]);
2322
+ }
2323
+ }
2324
+ const ho = new Ut();
2325
+ function M(e) {
2326
+ return ho.visit(e);
2327
+ }
2328
+ class In {
2329
+ constructor(t = 0, n) {
2330
+ this.numChunks = t, this.getChunkIterator = n, this.chunkIndex = 0, this.chunkIterator = this.getChunkIterator(0);
2331
+ }
2332
+ next() {
2333
+ for (; this.chunkIndex < this.numChunks; ) {
2334
+ const t = this.chunkIterator.next();
2335
+ if (!t.done)
2336
+ return t;
2337
+ ++this.chunkIndex < this.numChunks && (this.chunkIterator = this.getChunkIterator(this.chunkIndex));
2338
+ }
2339
+ return { done: !0, value: null };
2340
+ }
2341
+ [Symbol.iterator]() {
2342
+ return this;
2343
+ }
2344
+ }
2345
+ function yo(e) {
2346
+ return e.some((t) => t.nullable);
2347
+ }
2348
+ function Yi(e) {
2349
+ return e.reduce((t, n) => t + n.nullCount, 0);
2350
+ }
2351
+ function Wi(e) {
2352
+ return e.reduce((t, n, i) => (t[i + 1] = t[i] + n.length, t), new Uint32Array(e.length + 1));
2353
+ }
2354
+ function Hi(e, t, n, i) {
2355
+ const r = [];
2356
+ for (let s = -1, o = e.length; ++s < o; ) {
2357
+ const a = e[s], c = t[s], { length: u } = a;
2358
+ if (c >= i)
2359
+ break;
2360
+ if (n >= c + u)
2361
+ continue;
2362
+ if (c >= n && c + u <= i) {
2363
+ r.push(a);
2364
+ continue;
2365
+ }
2366
+ const d = Math.max(0, n - c), h = Math.min(i - c, u);
2367
+ r.push(a.slice(d, h - d));
2368
+ }
2369
+ return r.length === 0 && r.push(e[0].slice(0, 0)), r;
2370
+ }
2371
+ function en(e, t, n, i) {
2372
+ let r = 0, s = 0, o = t.length - 1;
2373
+ do {
2374
+ if (r >= o - 1)
2375
+ return n < t[o] ? i(e, r, n - t[r]) : null;
2376
+ s = r + Math.trunc((o - r) * 0.5), n < t[s] ? o = s : r = s;
2377
+ } while (r < o);
2378
+ }
2379
+ function nn(e, t) {
2380
+ return e.getValid(t);
2381
+ }
2382
+ function Zt(e) {
2383
+ function t(n, i, r) {
2384
+ return e(n[i], r);
2385
+ }
2386
+ return function(n) {
2387
+ const i = this.data;
2388
+ return en(i, this._offsets, n, t);
2389
+ };
2390
+ }
2391
+ function Ki(e) {
2392
+ let t;
2393
+ function n(i, r, s) {
2394
+ return e(i[r], s, t);
2395
+ }
2396
+ return function(i, r) {
2397
+ const s = this.data;
2398
+ t = r;
2399
+ const o = en(s, this._offsets, i, n);
2400
+ return t = void 0, o;
2401
+ };
2402
+ }
2403
+ function Gi(e) {
2404
+ let t;
2405
+ function n(i, r, s) {
2406
+ let o = s, a = 0, c = 0;
2407
+ for (let u = r - 1, d = i.length; ++u < d; ) {
2408
+ const h = i[u];
2409
+ if (~(a = e(h, t, o)))
2410
+ return c + a;
2411
+ o = 0, c += h.length;
2412
+ }
2413
+ return -1;
2414
+ }
2415
+ return function(i, r) {
2416
+ t = i;
2417
+ const s = this.data, o = typeof r != "number" ? n(s, 0, 0) : en(s, this._offsets, r, n);
2418
+ return t = void 0, o;
2419
+ };
2420
+ }
2421
+ class f extends _ {
2422
+ }
2423
+ function po(e, t) {
2424
+ return t === null && e.length > 0 ? 0 : -1;
2425
+ }
2426
+ function fo(e, t) {
2427
+ const { nullBitmap: n } = e;
2428
+ if (!n || e.nullCount <= 0)
2429
+ return -1;
2430
+ let i = 0;
2431
+ for (const r of new le(n, e.offset + (t || 0), e.length, n, tn)) {
2432
+ if (!r)
2433
+ return i;
2434
+ ++i;
2435
+ }
2436
+ return -1;
2437
+ }
2438
+ function w(e, t, n) {
2439
+ if (t === void 0)
2440
+ return -1;
2441
+ if (t === null)
2442
+ switch (e.typeId) {
2443
+ // Unions don't have a nullBitmap of its own, so compare the `searchElement` to `get()`.
2444
+ case l.Union:
2445
+ break;
2446
+ // Dictionaries do have a nullBitmap, but their dictionary could also have null elements.
2447
+ case l.Dictionary:
2448
+ break;
2449
+ // All other types can iterate the null bitmap
2450
+ default:
2451
+ return fo(e, n);
2452
+ }
2453
+ const i = $.getVisitFn(e), r = dt(t);
2454
+ for (let s = (n || 0) - 1, o = e.length; ++s < o; )
2455
+ if (r(i(e, s)))
2456
+ return s;
2457
+ return -1;
2458
+ }
2459
+ function Ji(e, t, n) {
2460
+ const i = $.getVisitFn(e), r = dt(t);
2461
+ for (let s = (n || 0) - 1, o = e.length; ++s < o; )
2462
+ if (r(i(e, s)))
2463
+ return s;
2464
+ return -1;
2465
+ }
2466
+ f.prototype.visitNull = po;
2467
+ f.prototype.visitBool = w;
2468
+ f.prototype.visitInt = w;
2469
+ f.prototype.visitInt8 = w;
2470
+ f.prototype.visitInt16 = w;
2471
+ f.prototype.visitInt32 = w;
2472
+ f.prototype.visitInt64 = w;
2473
+ f.prototype.visitUint8 = w;
2474
+ f.prototype.visitUint16 = w;
2475
+ f.prototype.visitUint32 = w;
2476
+ f.prototype.visitUint64 = w;
2477
+ f.prototype.visitFloat = w;
2478
+ f.prototype.visitFloat16 = w;
2479
+ f.prototype.visitFloat32 = w;
2480
+ f.prototype.visitFloat64 = w;
2481
+ f.prototype.visitUtf8 = w;
2482
+ f.prototype.visitLargeUtf8 = w;
2483
+ f.prototype.visitBinary = w;
2484
+ f.prototype.visitLargeBinary = w;
2485
+ f.prototype.visitFixedSizeBinary = w;
2486
+ f.prototype.visitDate = w;
2487
+ f.prototype.visitDateDay = w;
2488
+ f.prototype.visitDateMillisecond = w;
2489
+ f.prototype.visitTimestamp = w;
2490
+ f.prototype.visitTimestampSecond = w;
2491
+ f.prototype.visitTimestampMillisecond = w;
2492
+ f.prototype.visitTimestampMicrosecond = w;
2493
+ f.prototype.visitTimestampNanosecond = w;
2494
+ f.prototype.visitTime = w;
2495
+ f.prototype.visitTimeSecond = w;
2496
+ f.prototype.visitTimeMillisecond = w;
2497
+ f.prototype.visitTimeMicrosecond = w;
2498
+ f.prototype.visitTimeNanosecond = w;
2499
+ f.prototype.visitDecimal = w;
2500
+ f.prototype.visitList = w;
2501
+ f.prototype.visitStruct = w;
2502
+ f.prototype.visitUnion = w;
2503
+ f.prototype.visitDenseUnion = Ji;
2504
+ f.prototype.visitSparseUnion = Ji;
2505
+ f.prototype.visitDictionary = w;
2506
+ f.prototype.visitInterval = w;
2507
+ f.prototype.visitIntervalDayTime = w;
2508
+ f.prototype.visitIntervalYearMonth = w;
2509
+ f.prototype.visitIntervalMonthDayNano = w;
2510
+ f.prototype.visitDuration = w;
2511
+ f.prototype.visitDurationSecond = w;
2512
+ f.prototype.visitDurationMillisecond = w;
2513
+ f.prototype.visitDurationMicrosecond = w;
2514
+ f.prototype.visitDurationNanosecond = w;
2515
+ f.prototype.visitFixedSizeList = w;
2516
+ f.prototype.visitMap = w;
2517
+ const te = new f();
2518
+ class g extends _ {
2519
+ }
2520
+ function I(e) {
2521
+ const { type: t } = e;
2522
+ if (e.nullCount === 0 && e.stride === 1 && // Don't defer to native iterator for timestamps since Numbers are expected
2523
+ // (DataType.isTimestamp(type)) && type.unit === TimeUnit.MILLISECOND ||
2524
+ (A.isInt(t) && t.bitWidth !== 64 || A.isTime(t) && t.bitWidth !== 64 || A.isFloat(t) && t.precision !== x.HALF))
2525
+ return new In(e.data.length, (i) => {
2526
+ const r = e.data[i];
2527
+ return r.values.subarray(0, r.length)[Symbol.iterator]();
2528
+ });
2529
+ let n = 0;
2530
+ return new In(e.data.length, (i) => {
2531
+ const s = e.data[i].length, o = e.slice(n, n + s);
2532
+ return n += s, new go(o);
2533
+ });
2534
+ }
2535
+ class go {
2536
+ constructor(t) {
2537
+ this.vector = t, this.index = 0;
2538
+ }
2539
+ next() {
2540
+ return this.index < this.vector.length ? {
2541
+ value: this.vector.get(this.index++)
2542
+ } : { done: !0, value: null };
2543
+ }
2544
+ [Symbol.iterator]() {
2545
+ return this;
2546
+ }
2547
+ }
2548
+ g.prototype.visitNull = I;
2549
+ g.prototype.visitBool = I;
2550
+ g.prototype.visitInt = I;
2551
+ g.prototype.visitInt8 = I;
2552
+ g.prototype.visitInt16 = I;
2553
+ g.prototype.visitInt32 = I;
2554
+ g.prototype.visitInt64 = I;
2555
+ g.prototype.visitUint8 = I;
2556
+ g.prototype.visitUint16 = I;
2557
+ g.prototype.visitUint32 = I;
2558
+ g.prototype.visitUint64 = I;
2559
+ g.prototype.visitFloat = I;
2560
+ g.prototype.visitFloat16 = I;
2561
+ g.prototype.visitFloat32 = I;
2562
+ g.prototype.visitFloat64 = I;
2563
+ g.prototype.visitUtf8 = I;
2564
+ g.prototype.visitLargeUtf8 = I;
2565
+ g.prototype.visitBinary = I;
2566
+ g.prototype.visitLargeBinary = I;
2567
+ g.prototype.visitFixedSizeBinary = I;
2568
+ g.prototype.visitDate = I;
2569
+ g.prototype.visitDateDay = I;
2570
+ g.prototype.visitDateMillisecond = I;
2571
+ g.prototype.visitTimestamp = I;
2572
+ g.prototype.visitTimestampSecond = I;
2573
+ g.prototype.visitTimestampMillisecond = I;
2574
+ g.prototype.visitTimestampMicrosecond = I;
2575
+ g.prototype.visitTimestampNanosecond = I;
2576
+ g.prototype.visitTime = I;
2577
+ g.prototype.visitTimeSecond = I;
2578
+ g.prototype.visitTimeMillisecond = I;
2579
+ g.prototype.visitTimeMicrosecond = I;
2580
+ g.prototype.visitTimeNanosecond = I;
2581
+ g.prototype.visitDecimal = I;
2582
+ g.prototype.visitList = I;
2583
+ g.prototype.visitStruct = I;
2584
+ g.prototype.visitUnion = I;
2585
+ g.prototype.visitDenseUnion = I;
2586
+ g.prototype.visitSparseUnion = I;
2587
+ g.prototype.visitDictionary = I;
2588
+ g.prototype.visitInterval = I;
2589
+ g.prototype.visitIntervalDayTime = I;
2590
+ g.prototype.visitIntervalYearMonth = I;
2591
+ g.prototype.visitIntervalMonthDayNano = I;
2592
+ g.prototype.visitDuration = I;
2593
+ g.prototype.visitDurationSecond = I;
2594
+ g.prototype.visitDurationMillisecond = I;
2595
+ g.prototype.visitDurationMicrosecond = I;
2596
+ g.prototype.visitDurationNanosecond = I;
2597
+ g.prototype.visitFixedSizeList = I;
2598
+ g.prototype.visitMap = I;
2599
+ const rn = new g();
2600
+ var qi;
2601
+ const Qi = {}, Xi = {};
2602
+ class D {
2603
+ constructor(t) {
2604
+ var n, i, r;
2605
+ const s = t[0] instanceof D ? t.flatMap((a) => a.data) : t;
2606
+ if (s.length === 0 || s.some((a) => !(a instanceof T)))
2607
+ throw new TypeError("Vector constructor expects an Array of Data instances.");
2608
+ const o = (n = s[0]) === null || n === void 0 ? void 0 : n.type;
2609
+ switch (s.length) {
2610
+ case 0:
2611
+ this._offsets = [0];
2612
+ break;
2613
+ case 1: {
2614
+ const { get: a, set: c, indexOf: u } = Qi[o.typeId], d = s[0];
2615
+ this.isValid = (h) => nn(d, h), this.get = (h) => a(d, h), this.set = (h, U) => c(d, h, U), this.indexOf = (h) => u(d, h), this._offsets = [0, d.length];
2616
+ break;
2617
+ }
2618
+ default:
2619
+ Object.setPrototypeOf(this, Xi[o.typeId]), this._offsets = Wi(s);
2620
+ break;
2621
+ }
2622
+ this.data = s, this.type = o, this.stride = X(o), this.numChildren = (r = (i = o.children) === null || i === void 0 ? void 0 : i.length) !== null && r !== void 0 ? r : 0, this.length = this._offsets.at(-1);
2623
+ }
2624
+ /**
2625
+ * The aggregate size (in bytes) of this Vector's buffers and/or child Vectors.
2626
+ */
2627
+ get byteLength() {
2628
+ return this.data.reduce((t, n) => t + n.byteLength, 0);
2629
+ }
2630
+ /**
2631
+ * Whether this Vector's elements can contain null values.
2632
+ */
2633
+ get nullable() {
2634
+ return yo(this.data);
2635
+ }
2636
+ /**
2637
+ * The number of null elements in this Vector.
2638
+ */
2639
+ get nullCount() {
2640
+ return Yi(this.data);
2641
+ }
2642
+ /**
2643
+ * The Array or TypedArray constructor used for the JS representation
2644
+ * of the element's values in {@link Vector.prototype.toArray `toArray()`}.
2645
+ */
2646
+ get ArrayType() {
2647
+ return this.type.ArrayType;
2648
+ }
2649
+ /**
2650
+ * The name that should be printed when the Vector is logged in a message.
2651
+ */
2652
+ get [Symbol.toStringTag]() {
2653
+ return `${this.VectorName}<${this.type[Symbol.toStringTag]}>`;
2654
+ }
2655
+ /**
2656
+ * The name of this Vector.
2657
+ */
2658
+ get VectorName() {
2659
+ return `${l[this.type.typeId]}Vector`;
2660
+ }
2661
+ /**
2662
+ * Check whether an element is null.
2663
+ * @param index The index at which to read the validity bitmap.
2664
+ */
2665
+ // @ts-ignore
2666
+ isValid(t) {
2667
+ return !1;
2668
+ }
2669
+ /**
2670
+ * Get an element value by position.
2671
+ * @param index The index of the element to read.
2672
+ */
2673
+ // @ts-ignore
2674
+ get(t) {
2675
+ return null;
2676
+ }
2677
+ /**
2678
+ * Get an element value by position.
2679
+ * @param index The index of the element to read. A negative index will count back from the last element.
2680
+ */
2681
+ at(t) {
2682
+ return this.get(oe(t, this.length));
2683
+ }
2684
+ /**
2685
+ * Set an element value by position.
2686
+ * @param index The index of the element to write.
2687
+ * @param value The value to set.
2688
+ */
2689
+ // @ts-ignore
2690
+ set(t, n) {
2691
+ }
2692
+ /**
2693
+ * Retrieve the index of the first occurrence of a value in an Vector.
2694
+ * @param element The value to locate in the Vector.
2695
+ * @param offset The index at which to begin the search. If offset is omitted, the search starts at index 0.
2696
+ */
2697
+ // @ts-ignore
2698
+ indexOf(t, n) {
2699
+ return -1;
2700
+ }
2701
+ includes(t, n) {
2702
+ return this.indexOf(t, n) > -1;
2703
+ }
2704
+ /**
2705
+ * Iterator for the Vector's elements.
2706
+ */
2707
+ [Symbol.iterator]() {
2708
+ return rn.visit(this);
2709
+ }
2710
+ /**
2711
+ * Combines two or more Vectors of the same type.
2712
+ * @param others Additional Vectors to add to the end of this Vector.
2713
+ */
2714
+ concat(...t) {
2715
+ return new D(this.data.concat(t.flatMap((n) => n.data).flat(Number.POSITIVE_INFINITY)));
2716
+ }
2717
+ /**
2718
+ * Return a zero-copy sub-section of this Vector.
2719
+ * @param start The beginning of the specified portion of the Vector.
2720
+ * @param end The end of the specified portion of the Vector. This is exclusive of the element at the index 'end'.
2721
+ */
2722
+ slice(t, n) {
2723
+ return new D(Ze(this, t, n, ({ data: i, _offsets: r }, s, o) => Hi(i, r, s, o)));
2724
+ }
2725
+ toJSON() {
2726
+ return [...this];
2727
+ }
2728
+ /**
2729
+ * Return a JavaScript Array or TypedArray of the Vector's elements.
2730
+ *
2731
+ * @note If this Vector contains a single Data chunk and the Vector's type is a
2732
+ * primitive numeric type corresponding to one of the JavaScript TypedArrays, this
2733
+ * method returns a zero-copy slice of the underlying TypedArray values. If there's
2734
+ * more than one chunk, the resulting TypedArray will be a copy of the data from each
2735
+ * chunk's underlying TypedArray values.
2736
+ *
2737
+ * @returns An Array or TypedArray of the Vector's elements, based on the Vector's DataType.
2738
+ */
2739
+ toArray() {
2740
+ const { type: t, data: n, length: i, stride: r, ArrayType: s } = this;
2741
+ switch (t.typeId) {
2742
+ case l.Int:
2743
+ case l.Float:
2744
+ case l.Decimal:
2745
+ case l.Time:
2746
+ case l.Timestamp:
2747
+ switch (n.length) {
2748
+ case 0:
2749
+ return new s();
2750
+ case 1:
2751
+ return n[0].values.subarray(0, i * r);
2752
+ default:
2753
+ return n.reduce((o, { values: a, length: c }) => (o.array.set(a.subarray(0, c * r), o.offset), o.offset += c * r, o), { array: new s(i * r), offset: 0 }).array;
2754
+ }
2755
+ }
2756
+ return [...this];
2757
+ }
2758
+ /**
2759
+ * Returns a string representation of the Vector.
2760
+ *
2761
+ * @returns A string representation of the Vector.
2762
+ */
2763
+ toString() {
2764
+ return `[${[...this].join(",")}]`;
2765
+ }
2766
+ /**
2767
+ * Returns a child Vector by name, or null if this Vector has no child with the given name.
2768
+ * @param name The name of the child to retrieve.
2769
+ */
2770
+ getChild(t) {
2771
+ var n;
2772
+ return this.getChildAt((n = this.type.children) === null || n === void 0 ? void 0 : n.findIndex((i) => i.name === t));
2773
+ }
2774
+ /**
2775
+ * Returns a child Vector by index, or null if this Vector has no child at the supplied index.
2776
+ * @param index The index of the child to retrieve.
2777
+ */
2778
+ getChildAt(t) {
2779
+ return t > -1 && t < this.numChildren ? new D(this.data.map(({ children: n }) => n[t])) : null;
2780
+ }
2781
+ get isMemoized() {
2782
+ return A.isDictionary(this.type) ? this.data[0].dictionary.isMemoized : !1;
2783
+ }
2784
+ /**
2785
+ * Adds memoization to the Vector's {@link get} method. For dictionary
2786
+ * vectors, this method return a vector that memoizes only the dictionary
2787
+ * values.
2788
+ *
2789
+ * Memoization is very useful when decoding a value is expensive such as
2790
+ * Utf8. The memoization creates a cache of the size of the Vector and
2791
+ * therefore increases memory usage.
2792
+ *
2793
+ * @returns A new vector that memoizes calls to {@link get}.
2794
+ */
2795
+ memoize() {
2796
+ if (A.isDictionary(this.type)) {
2797
+ const t = new ee(this.data[0].dictionary), n = this.data.map((i) => {
2798
+ const r = i.clone();
2799
+ return r.dictionary = t, r;
2800
+ });
2801
+ return new D(n);
2802
+ }
2803
+ return new ee(this);
2804
+ }
2805
+ /**
2806
+ * Returns a vector without memoization of the {@link get} method. If this
2807
+ * vector is not memoized, this method returns this vector.
2808
+ *
2809
+ * @returns A new vector without memoization.
2810
+ */
2811
+ unmemoize() {
2812
+ if (A.isDictionary(this.type) && this.isMemoized) {
2813
+ const t = this.data[0].dictionary.unmemoize(), n = this.data.map((i) => {
2814
+ const r = i.clone();
2815
+ return r.dictionary = t, r;
2816
+ });
2817
+ return new D(n);
2818
+ }
2819
+ return this;
2820
+ }
2821
+ }
2822
+ qi = Symbol.toStringTag;
2823
+ D[qi] = ((e) => {
2824
+ e.type = A.prototype, e.data = [], e.length = 0, e.stride = 1, e.numChildren = 0, e._offsets = new Uint32Array([0]), e[Symbol.isConcatSpreadable] = !0;
2825
+ const t = Object.keys(l).map((n) => l[n]).filter((n) => typeof n == "number" && n !== l.NONE);
2826
+ for (const n of t) {
2827
+ const i = $.getVisitFnByTypeId(n), r = G.getVisitFnByTypeId(n), s = te.getVisitFnByTypeId(n);
2828
+ Qi[n] = { get: i, set: r, indexOf: s }, Xi[n] = Object.create(e, {
2829
+ isValid: { value: Zt(nn) },
2830
+ get: { value: Zt($.getVisitFnByTypeId(n)) },
2831
+ set: { value: Ki(G.getVisitFnByTypeId(n)) },
2832
+ indexOf: { value: Gi(te.getVisitFnByTypeId(n)) }
2833
+ });
2834
+ }
2835
+ return "Vector";
2836
+ })(D.prototype);
2837
+ class ee extends D {
2838
+ constructor(t) {
2839
+ super(t.data);
2840
+ const n = this.get, i = this.set, r = this.slice, s = new Array(this.length);
2841
+ Object.defineProperty(this, "get", {
2842
+ value(o) {
2843
+ const a = s[o];
2844
+ if (a !== void 0)
2845
+ return a;
2846
+ const c = n.call(this, o);
2847
+ return s[o] = c, c;
2848
+ }
2849
+ }), Object.defineProperty(this, "set", {
2850
+ value(o, a) {
2851
+ i.call(this, o, a), s[o] = a;
2852
+ }
2853
+ }), Object.defineProperty(this, "slice", {
2854
+ value: (o, a) => new ee(r.call(this, o, a))
2855
+ }), Object.defineProperty(this, "isMemoized", { value: !0 }), Object.defineProperty(this, "unmemoize", {
2856
+ value: () => new D(this.data)
2857
+ }), Object.defineProperty(this, "memoize", {
2858
+ value: () => this
2859
+ });
2860
+ }
2861
+ }
2862
+ function sn(e) {
2863
+ if (e) {
2864
+ if (e instanceof T)
2865
+ return new D([e]);
2866
+ if (e instanceof D)
2867
+ return new D(e.data);
2868
+ if (e.type instanceof A)
2869
+ return new D([M(e)]);
2870
+ if (Array.isArray(e))
2871
+ return new D(e.flatMap((t) => mo(t)));
2872
+ if (ArrayBuffer.isView(e)) {
2873
+ e instanceof DataView && (e = new Uint8Array(e.buffer));
2874
+ const t = { offset: 0, length: e.length, nullCount: -1, data: e };
2875
+ if (e instanceof Int8Array)
2876
+ return new D([M(Object.assign(Object.assign({}, t), { type: new Qn() }))]);
2877
+ if (e instanceof Int16Array)
2878
+ return new D([M(Object.assign(Object.assign({}, t), { type: new Xn() }))]);
2879
+ if (e instanceof Int32Array)
2880
+ return new D([M(Object.assign(Object.assign({}, t), { type: new Me() }))]);
2881
+ if (e instanceof BigInt64Array)
2882
+ return new D([M(Object.assign(Object.assign({}, t), { type: new Ne() }))]);
2883
+ if (e instanceof Uint8Array || e instanceof Uint8ClampedArray)
2884
+ return new D([M(Object.assign(Object.assign({}, t), { type: new Zn() }))]);
2885
+ if (e instanceof Uint16Array)
2886
+ return new D([M(Object.assign(Object.assign({}, t), { type: new ti() }))]);
2887
+ if (e instanceof Uint32Array)
2888
+ return new D([M(Object.assign(Object.assign({}, t), { type: new ei() }))]);
2889
+ if (e instanceof BigUint64Array)
2890
+ return new D([M(Object.assign(Object.assign({}, t), { type: new ni() }))]);
2891
+ if (e instanceof Float32Array)
2892
+ return new D([M(Object.assign(Object.assign({}, t), { type: new ii() }))]);
2893
+ if (e instanceof Float64Array)
2894
+ return new D([M(Object.assign(Object.assign({}, t), { type: new Ue() }))]);
2895
+ throw new Error("Unrecognized input");
2896
+ }
2897
+ }
2898
+ throw new Error("Unrecognized input");
2899
+ }
2900
+ function mo(e) {
2901
+ return e instanceof T ? [e] : e instanceof D ? e.data : sn(e).data;
2902
+ }
2903
+ function vo(e) {
2904
+ if (!e || e.length <= 0)
2905
+ return function(r) {
2906
+ return !0;
2907
+ };
2908
+ let t = "";
2909
+ const n = e.filter((i) => i === i);
2910
+ return n.length > 0 && (t = `
2911
+ switch (x) {${n.map((i) => `
2912
+ case ${bo(i)}:`).join("")}
2913
+ return false;
2914
+ }`), e.length !== n.length && (t = `if (x !== x) return false;
2915
+ ${t}`), new Function("x", `${t}
2916
+ return true;`);
2917
+ }
2918
+ function bo(e) {
2919
+ return typeof e != "bigint" ? lt(e) : `${lt(e)}n`;
2920
+ }
2921
+ function fe(e, t) {
2922
+ const n = Math.ceil(e) * t - 1;
2923
+ return (n - n % 64 + 64 || 64) / t;
2924
+ }
2925
+ function Sn(e, t = 0) {
2926
+ return e.length >= t ? e.subarray(0, t) : Gt(new e.constructor(t), e, 0);
2927
+ }
2928
+ class kt {
2929
+ constructor(t, n = 0, i = 1) {
2930
+ this.length = Math.ceil(n / i), this.buffer = new t(this.length), this.stride = i, this.BYTES_PER_ELEMENT = t.BYTES_PER_ELEMENT, this.ArrayType = t;
2931
+ }
2932
+ get byteLength() {
2933
+ return Math.ceil(this.length * this.stride) * this.BYTES_PER_ELEMENT;
2934
+ }
2935
+ get reservedLength() {
2936
+ return this.buffer.length / this.stride;
2937
+ }
2938
+ get reservedByteLength() {
2939
+ return this.buffer.byteLength;
2940
+ }
2941
+ // @ts-ignore
2942
+ set(t, n) {
2943
+ return this;
2944
+ }
2945
+ append(t) {
2946
+ return this.set(this.length, t);
2947
+ }
2948
+ reserve(t) {
2949
+ if (t > 0) {
2950
+ this.length += t;
2951
+ const n = this.stride, i = this.length * n, r = this.buffer.length;
2952
+ i >= r && this._resize(r === 0 ? fe(i * 1, this.BYTES_PER_ELEMENT) : fe(i * 2, this.BYTES_PER_ELEMENT));
2953
+ }
2954
+ return this;
2955
+ }
2956
+ flush(t = this.length) {
2957
+ t = fe(t * this.stride, this.BYTES_PER_ELEMENT);
2958
+ const n = Sn(this.buffer, t);
2959
+ return this.clear(), n;
2960
+ }
2961
+ clear() {
2962
+ return this.length = 0, this.buffer = new this.ArrayType(), this;
2963
+ }
2964
+ _resize(t) {
2965
+ return this.buffer = Sn(this.buffer, t);
2966
+ }
2967
+ }
2968
+ class jt extends kt {
2969
+ last() {
2970
+ return this.get(this.length - 1);
2971
+ }
2972
+ get(t) {
2973
+ return this.buffer[t];
2974
+ }
2975
+ set(t, n) {
2976
+ return this.reserve(t - this.length + 1), this.buffer[t * this.stride] = n, this;
2977
+ }
2978
+ }
2979
+ class Zi extends jt {
2980
+ constructor() {
2981
+ super(Uint8Array, 0, 1 / 8), this.numValid = 0;
2982
+ }
2983
+ get numInvalid() {
2984
+ return this.length - this.numValid;
2985
+ }
2986
+ get(t) {
2987
+ return this.buffer[t >> 3] >> t % 8 & 1;
2988
+ }
2989
+ set(t, n) {
2990
+ const { buffer: i } = this.reserve(t - this.length + 1), r = t >> 3, s = t % 8, o = i[r] >> s & 1;
2991
+ return n ? o === 0 && (i[r] |= 1 << s, ++this.numValid) : o === 1 && (i[r] &= ~(1 << s), --this.numValid), this;
2992
+ }
2993
+ clear() {
2994
+ return this.numValid = 0, super.clear();
2995
+ }
2996
+ }
2997
+ class tr extends jt {
2998
+ constructor(t) {
2999
+ super(t.OffsetArrayType, 1, 1);
3000
+ }
3001
+ append(t) {
3002
+ return this.set(this.length - 1, t);
3003
+ }
3004
+ set(t, n) {
3005
+ const i = this.length - 1, r = this.reserve(t - i + 1).buffer;
3006
+ return i < t++ && i >= 0 && r.fill(r[i], i, t), r[t] = r[t - 1] + n, this;
3007
+ }
3008
+ flush(t = this.length - 1) {
3009
+ return t > this.length && this.set(t - 1, this.BYTES_PER_ELEMENT > 4 ? BigInt(0) : 0), super.flush(t + 1);
3010
+ }
3011
+ }
3012
+ class P {
3013
+ /** @nocollapse */
3014
+ // @ts-ignore
3015
+ static throughNode(t) {
3016
+ throw new Error('"throughNode" not available in this environment');
3017
+ }
3018
+ /** @nocollapse */
3019
+ // @ts-ignore
3020
+ static throughDOM(t) {
3021
+ throw new Error('"throughDOM" not available in this environment');
3022
+ }
3023
+ /**
3024
+ * Construct a builder with the given Arrow DataType with optional null values,
3025
+ * which will be interpreted as "null" when set or appended to the `Builder`.
3026
+ * @param {{ type: T, nullValues?: any[] }} options A `BuilderOptions` object used to create this `Builder`.
3027
+ */
3028
+ constructor({ type: t, nullValues: n }) {
3029
+ this.length = 0, this.finished = !1, this.type = t, this.children = [], this.nullValues = n, this.stride = X(t), this._nulls = new Zi(), n && n.length > 0 && (this._isValid = vo(n));
3030
+ }
3031
+ /**
3032
+ * Flush the `Builder` and return a `Vector<T>`.
3033
+ * @returns {Vector<T>} A `Vector<T>` of the flushed values.
3034
+ */
3035
+ toVector() {
3036
+ return new D([this.flush()]);
3037
+ }
3038
+ get ArrayType() {
3039
+ return this.type.ArrayType;
3040
+ }
3041
+ get nullCount() {
3042
+ return this._nulls.numInvalid;
3043
+ }
3044
+ get numChildren() {
3045
+ return this.children.length;
3046
+ }
3047
+ /**
3048
+ * @returns The aggregate length (in bytes) of the values that have been written.
3049
+ */
3050
+ get byteLength() {
3051
+ let t = 0;
3052
+ const { _offsets: n, _values: i, _nulls: r, _typeIds: s, children: o } = this;
3053
+ return n && (t += n.byteLength), i && (t += i.byteLength), r && (t += r.byteLength), s && (t += s.byteLength), o.reduce((a, c) => a + c.byteLength, t);
3054
+ }
3055
+ /**
3056
+ * @returns The aggregate number of rows that have been reserved to write new values.
3057
+ */
3058
+ get reservedLength() {
3059
+ return this._nulls.reservedLength;
3060
+ }
3061
+ /**
3062
+ * @returns The aggregate length (in bytes) that has been reserved to write new values.
3063
+ */
3064
+ get reservedByteLength() {
3065
+ let t = 0;
3066
+ return this._offsets && (t += this._offsets.reservedByteLength), this._values && (t += this._values.reservedByteLength), this._nulls && (t += this._nulls.reservedByteLength), this._typeIds && (t += this._typeIds.reservedByteLength), this.children.reduce((n, i) => n + i.reservedByteLength, t);
3067
+ }
3068
+ get valueOffsets() {
3069
+ return this._offsets ? this._offsets.buffer : null;
3070
+ }
3071
+ get values() {
3072
+ return this._values ? this._values.buffer : null;
3073
+ }
3074
+ get nullBitmap() {
3075
+ return this._nulls ? this._nulls.buffer : null;
3076
+ }
3077
+ get typeIds() {
3078
+ return this._typeIds ? this._typeIds.buffer : null;
3079
+ }
3080
+ /**
3081
+ * Appends a value (or null) to this `Builder`.
3082
+ * This is equivalent to `builder.set(builder.length, value)`.
3083
+ * @param {T['TValue'] | TNull } value The value to append.
3084
+ */
3085
+ append(t) {
3086
+ return this.set(this.length, t);
3087
+ }
3088
+ /**
3089
+ * Validates whether a value is valid (true), or null (false)
3090
+ * @param {T['TValue'] | TNull } value The value to compare against null the value representations
3091
+ */
3092
+ isValid(t) {
3093
+ return this._isValid(t);
3094
+ }
3095
+ /**
3096
+ * Write a value (or null-value sentinel) at the supplied index.
3097
+ * If the value matches one of the null-value representations, a 1-bit is
3098
+ * written to the null `BitmapBufferBuilder`. Otherwise, a 0 is written to
3099
+ * the null `BitmapBufferBuilder`, and the value is passed to
3100
+ * `Builder.prototype.setValue()`.
3101
+ * @param {number} index The index of the value to write.
3102
+ * @param {T['TValue'] | TNull } value The value to write at the supplied index.
3103
+ * @returns {this} The updated `Builder` instance.
3104
+ */
3105
+ set(t, n) {
3106
+ return this.setValid(t, this.isValid(n)) && this.setValue(t, n), this;
3107
+ }
3108
+ /**
3109
+ * Write a value to the underlying buffers at the supplied index, bypassing
3110
+ * the null-value check. This is a low-level method that
3111
+ * @param {number} index
3112
+ * @param {T['TValue'] | TNull } value
3113
+ */
3114
+ setValue(t, n) {
3115
+ this._setValue(this, t, n);
3116
+ }
3117
+ setValid(t, n) {
3118
+ return this.length = this._nulls.set(t, +n).length, n;
3119
+ }
3120
+ // @ts-ignore
3121
+ addChild(t, n = `${this.numChildren}`) {
3122
+ throw new Error(`Cannot append children to non-nested type "${this.type}"`);
3123
+ }
3124
+ /**
3125
+ * Retrieve the child `Builder` at the supplied `index`, or null if no child
3126
+ * exists at that index.
3127
+ * @param {number} index The index of the child `Builder` to retrieve.
3128
+ * @returns {Builder | null} The child Builder at the supplied index or null.
3129
+ */
3130
+ getChildAt(t) {
3131
+ return this.children[t] || null;
3132
+ }
3133
+ /**
3134
+ * Commit all the values that have been written to their underlying
3135
+ * ArrayBuffers, including any child Builders if applicable, and reset
3136
+ * the internal `Builder` state.
3137
+ * @returns A `Data<T>` of the buffers and children representing the values written.
3138
+ */
3139
+ flush() {
3140
+ let t, n, i, r;
3141
+ const { type: s, length: o, nullCount: a, _typeIds: c, _offsets: u, _values: d, _nulls: h } = this;
3142
+ (n = c == null ? void 0 : c.flush(o)) ? r = u == null ? void 0 : u.flush(o) : (r = u == null ? void 0 : u.flush(o)) ? t = d == null ? void 0 : d.flush(u.last()) : t = d == null ? void 0 : d.flush(o), a > 0 && (i = h == null ? void 0 : h.flush(o));
3143
+ const U = this.children.map((B) => B.flush());
3144
+ return this.clear(), M({
3145
+ type: s,
3146
+ length: o,
3147
+ nullCount: a,
3148
+ children: U,
3149
+ child: U[0],
3150
+ data: t,
3151
+ typeIds: n,
3152
+ nullBitmap: i,
3153
+ valueOffsets: r
3154
+ });
3155
+ }
3156
+ /**
3157
+ * Finalize this `Builder`, and child builders if applicable.
3158
+ * @returns {this} The finalized `Builder` instance.
3159
+ */
3160
+ finish() {
3161
+ this.finished = !0;
3162
+ for (const t of this.children)
3163
+ t.finish();
3164
+ return this;
3165
+ }
3166
+ /**
3167
+ * Clear this Builder's internal state, including child Builders if applicable, and reset the length to 0.
3168
+ * @returns {this} The cleared `Builder` instance.
3169
+ */
3170
+ clear() {
3171
+ var t, n, i, r;
3172
+ this.length = 0, (t = this._nulls) === null || t === void 0 || t.clear(), (n = this._values) === null || n === void 0 || n.clear(), (i = this._offsets) === null || i === void 0 || i.clear(), (r = this._typeIds) === null || r === void 0 || r.clear();
3173
+ for (const s of this.children)
3174
+ s.clear();
3175
+ return this;
3176
+ }
3177
+ }
3178
+ P.prototype.length = 1;
3179
+ P.prototype.stride = 1;
3180
+ P.prototype.children = null;
3181
+ P.prototype.finished = !1;
3182
+ P.prototype.nullValues = null;
3183
+ P.prototype._isValid = () => !0;
3184
+ class st extends P {
3185
+ constructor(t) {
3186
+ super(t), this._values = new jt(this.ArrayType, 0, this.stride);
3187
+ }
3188
+ setValue(t, n) {
3189
+ const i = this._values;
3190
+ return i.reserve(t - i.length + 1), super.setValue(t, n);
3191
+ }
3192
+ }
3193
+ class _t extends P {
3194
+ constructor(t) {
3195
+ super(t), this._pendingLength = 0, this._offsets = new tr(t.type);
3196
+ }
3197
+ setValue(t, n) {
3198
+ const i = this._pending || (this._pending = /* @__PURE__ */ new Map()), r = i.get(t);
3199
+ r && (this._pendingLength -= r.length), this._pendingLength += n instanceof se ? n[ut].length : n.length, i.set(t, n);
3200
+ }
3201
+ setValid(t, n) {
3202
+ return super.setValid(t, n) ? !0 : ((this._pending || (this._pending = /* @__PURE__ */ new Map())).set(t, void 0), !1);
3203
+ }
3204
+ clear() {
3205
+ return this._pendingLength = 0, this._pending = void 0, super.clear();
3206
+ }
3207
+ flush() {
3208
+ return this._flush(), super.flush();
3209
+ }
3210
+ finish() {
3211
+ return this._flush(), super.finish();
3212
+ }
3213
+ _flush() {
3214
+ const t = this._pending, n = this._pendingLength;
3215
+ return this._pendingLength = 0, this._pending = void 0, t && t.size > 0 && this._flushPending(t, n), this;
3216
+ }
3217
+ }
3218
+ class C {
3219
+ constructor(t = [], n, i, r = be.V5) {
3220
+ this.fields = t || [], this.metadata = n || /* @__PURE__ */ new Map(), i || (i = Be(this.fields)), this.dictionaries = i, this.metadataVersion = r;
3221
+ }
3222
+ get [Symbol.toStringTag]() {
3223
+ return "Schema";
3224
+ }
3225
+ get names() {
3226
+ return this.fields.map((t) => t.name);
3227
+ }
3228
+ toString() {
3229
+ return `Schema<{ ${this.fields.map((t, n) => `${n}: ${t}`).join(", ")} }>`;
3230
+ }
3231
+ /**
3232
+ * Construct a new Schema containing only specified fields.
3233
+ *
3234
+ * @param fieldNames Names of fields to keep.
3235
+ * @returns A new Schema of fields matching the specified names.
3236
+ */
3237
+ select(t) {
3238
+ const n = new Set(t), i = this.fields.filter((r) => n.has(r.name));
3239
+ return new C(i, this.metadata);
3240
+ }
3241
+ /**
3242
+ * Construct a new Schema containing only fields at the specified indices.
3243
+ *
3244
+ * @param fieldIndices Indices of fields to keep.
3245
+ * @returns A new Schema of fields at the specified indices.
3246
+ */
3247
+ selectAt(t) {
3248
+ const n = t.map((i) => this.fields[i]).filter(Boolean);
3249
+ return new C(n, this.metadata);
3250
+ }
3251
+ assign(...t) {
3252
+ const n = t[0] instanceof C ? t[0] : Array.isArray(t[0]) ? new C(t[0]) : new C(t), i = [...this.fields], r = Yt(Yt(/* @__PURE__ */ new Map(), this.metadata), n.metadata), s = n.fields.filter((a) => {
3253
+ const c = i.findIndex((u) => u.name === a.name);
3254
+ return ~c ? (i[c] = a.clone({
3255
+ metadata: Yt(Yt(/* @__PURE__ */ new Map(), i[c].metadata), a.metadata)
3256
+ })) && !1 : !0;
3257
+ }), o = Be(s, /* @__PURE__ */ new Map());
3258
+ return new C([...i, ...s], r, new Map([...this.dictionaries, ...o]));
3259
+ }
3260
+ }
3261
+ C.prototype.fields = null;
3262
+ C.prototype.metadata = null;
3263
+ C.prototype.dictionaries = null;
3264
+ class k {
3265
+ /** @nocollapse */
3266
+ static new(...t) {
3267
+ let [n, i, r, s] = t;
3268
+ return t[0] && typeof t[0] == "object" && ({ name: n } = t[0], i === void 0 && (i = t[0].type), r === void 0 && (r = t[0].nullable), s === void 0 && (s = t[0].metadata)), new k(`${n}`, i, r, s);
3269
+ }
3270
+ constructor(t, n, i = !1, r) {
3271
+ this.name = t, this.type = n, this.nullable = i, this.metadata = r || /* @__PURE__ */ new Map();
3272
+ }
3273
+ get typeId() {
3274
+ return this.type.typeId;
3275
+ }
3276
+ get [Symbol.toStringTag]() {
3277
+ return "Field";
3278
+ }
3279
+ toString() {
3280
+ return `${this.name}: ${this.type}`;
3281
+ }
3282
+ clone(...t) {
3283
+ let [n, i, r, s] = t;
3284
+ return !t[0] || typeof t[0] != "object" ? [n = this.name, i = this.type, r = this.nullable, s = this.metadata] = t : { name: n = this.name, type: i = this.type, nullable: r = this.nullable, metadata: s = this.metadata } = t[0], k.new(n, i, r, s);
3285
+ }
3286
+ }
3287
+ k.prototype.type = null;
3288
+ k.prototype.name = null;
3289
+ k.prototype.nullable = null;
3290
+ k.prototype.metadata = null;
3291
+ function Yt(e, t) {
3292
+ return new Map([...e || /* @__PURE__ */ new Map(), ...t || /* @__PURE__ */ new Map()]);
3293
+ }
3294
+ function Be(e, t = /* @__PURE__ */ new Map()) {
3295
+ for (let n = -1, i = e.length; ++n < i; ) {
3296
+ const s = e[n].type;
3297
+ if (A.isDictionary(s)) {
3298
+ if (!t.has(s.id))
3299
+ t.set(s.id, s.dictionary);
3300
+ else if (t.get(s.id) !== s.dictionary)
3301
+ throw new Error("Cannot create Schema containing two different dictionaries with the same Id");
3302
+ }
3303
+ s.children && s.children.length > 0 && Be(s.children, t);
3304
+ }
3305
+ return t;
3306
+ }
3307
+ class er extends _t {
3308
+ constructor(t) {
3309
+ super(t), this._values = new kt(Uint8Array);
3310
+ }
3311
+ get byteLength() {
3312
+ let t = this._pendingLength + this.length * 4;
3313
+ return this._offsets && (t += this._offsets.byteLength), this._values && (t += this._values.byteLength), this._nulls && (t += this._nulls.byteLength), t;
3314
+ }
3315
+ setValue(t, n) {
3316
+ return super.setValue(t, N(n));
3317
+ }
3318
+ _flushPending(t, n) {
3319
+ const i = this._offsets, r = this._values.reserve(n).buffer;
3320
+ let s = 0;
3321
+ for (const [o, a] of t)
3322
+ if (a === void 0)
3323
+ i.set(o, 0);
3324
+ else {
3325
+ const c = a.length;
3326
+ r.set(a, s), i.set(o, c), s += c;
3327
+ }
3328
+ }
3329
+ }
3330
+ class nr extends _t {
3331
+ constructor(t) {
3332
+ super(t), this._values = new kt(Uint8Array);
3333
+ }
3334
+ get byteLength() {
3335
+ let t = this._pendingLength + this.length * 4;
3336
+ return this._offsets && (t += this._offsets.byteLength), this._values && (t += this._values.byteLength), this._nulls && (t += this._nulls.byteLength), t;
3337
+ }
3338
+ setValue(t, n) {
3339
+ return super.setValue(t, N(n));
3340
+ }
3341
+ _flushPending(t, n) {
3342
+ const i = this._offsets, r = this._values.reserve(n).buffer;
3343
+ let s = 0;
3344
+ for (const [o, a] of t)
3345
+ if (a === void 0)
3346
+ i.set(o, BigInt(0));
3347
+ else {
3348
+ const c = a.length;
3349
+ r.set(a, s), i.set(o, BigInt(c)), s += c;
3350
+ }
3351
+ }
3352
+ }
3353
+ class Io extends P {
3354
+ constructor(t) {
3355
+ super(t), this._values = new Zi();
3356
+ }
3357
+ setValue(t, n) {
3358
+ this._values.set(t, +n);
3359
+ }
3360
+ }
3361
+ class ce extends st {
3362
+ }
3363
+ ce.prototype._setValue = ui;
3364
+ class ir extends ce {
3365
+ }
3366
+ ir.prototype._setValue = Ee;
3367
+ class rr extends ce {
3368
+ }
3369
+ rr.prototype._setValue = Ve;
3370
+ class sr extends st {
3371
+ }
3372
+ sr.prototype._setValue = yi;
3373
+ class So extends P {
3374
+ constructor({ type: t, nullValues: n, dictionaryHashFunction: i }) {
3375
+ super({ type: new Qt(t.dictionary, t.indices, t.id, t.isOrdered) }), this._nulls = null, this._dictionaryOffset = 0, this._keysToIndices = /* @__PURE__ */ Object.create(null), this.indices = xt({ type: this.type.indices, nullValues: n }), this.dictionary = xt({ type: this.type.dictionary, nullValues: null }), typeof i == "function" && (this.valueToKey = i);
3376
+ }
3377
+ get values() {
3378
+ return this.indices.values;
3379
+ }
3380
+ get nullCount() {
3381
+ return this.indices.nullCount;
3382
+ }
3383
+ get nullBitmap() {
3384
+ return this.indices.nullBitmap;
3385
+ }
3386
+ get byteLength() {
3387
+ return this.indices.byteLength + this.dictionary.byteLength;
3388
+ }
3389
+ get reservedLength() {
3390
+ return this.indices.reservedLength + this.dictionary.reservedLength;
3391
+ }
3392
+ get reservedByteLength() {
3393
+ return this.indices.reservedByteLength + this.dictionary.reservedByteLength;
3394
+ }
3395
+ isValid(t) {
3396
+ return this.indices.isValid(t);
3397
+ }
3398
+ setValid(t, n) {
3399
+ const i = this.indices;
3400
+ return n = i.setValid(t, n), this.length = i.length, n;
3401
+ }
3402
+ setValue(t, n) {
3403
+ const i = this._keysToIndices, r = this.valueToKey(n);
3404
+ let s = i[r];
3405
+ return s === void 0 && (i[r] = s = this._dictionaryOffset + this.dictionary.append(n).length - 1), this.indices.setValue(t, s);
3406
+ }
3407
+ flush() {
3408
+ const t = this.type, n = this._dictionary, i = this.dictionary.toVector(), r = this.indices.flush().clone(t);
3409
+ return r.dictionary = n ? n.concat(i) : i, this.finished || (this._dictionaryOffset += i.length), this._dictionary = r.dictionary, this.clear(), r;
3410
+ }
3411
+ finish() {
3412
+ return this.indices.finish(), this.dictionary.finish(), this._dictionaryOffset = 0, this._keysToIndices = /* @__PURE__ */ Object.create(null), super.finish();
3413
+ }
3414
+ clear() {
3415
+ return this.indices.clear(), this.dictionary.clear(), super.clear();
3416
+ }
3417
+ valueToKey(t) {
3418
+ return typeof t == "string" ? t : `${t}`;
3419
+ }
3420
+ }
3421
+ class or extends st {
3422
+ }
3423
+ or.prototype._setValue = ai;
3424
+ class wo extends P {
3425
+ setValue(t, n) {
3426
+ const [i] = this.children, r = t * this.stride;
3427
+ for (let s = -1, o = this.stride; ++s < o; )
3428
+ i.set(r + s, n[s]);
3429
+ }
3430
+ setValid(t, n) {
3431
+ return super.setValid(t, n) || this.children[0].setValid((t + 1) * this.stride - 1, !1), n;
3432
+ }
3433
+ addChild(t, n = "0") {
3434
+ if (this.numChildren > 0)
3435
+ throw new Error("FixedSizeListBuilder can only have one child.");
3436
+ const i = this.children.push(t);
3437
+ return this.type = new we(this.type.listSize, new k(n, t.type, !0)), i;
3438
+ }
3439
+ }
3440
+ class ue extends st {
3441
+ setValue(t, n) {
3442
+ this._values.set(t, n);
3443
+ }
3444
+ }
3445
+ class Ao extends ue {
3446
+ setValue(t, n) {
3447
+ super.setValue(t, Fe(n));
3448
+ }
3449
+ }
3450
+ class Do extends ue {
3451
+ }
3452
+ class _o extends ue {
3453
+ }
3454
+ class zt extends st {
3455
+ }
3456
+ zt.prototype._setValue = gi;
3457
+ class ar extends zt {
3458
+ }
3459
+ ar.prototype._setValue = We;
3460
+ class lr extends zt {
3461
+ }
3462
+ lr.prototype._setValue = He;
3463
+ class cr extends zt {
3464
+ }
3465
+ cr.prototype._setValue = Ke;
3466
+ class Bt extends st {
3467
+ }
3468
+ Bt.prototype._setValue = mi;
3469
+ class ur extends Bt {
3470
+ }
3471
+ ur.prototype._setValue = Ge;
3472
+ class dr extends Bt {
3473
+ }
3474
+ dr.prototype._setValue = Je;
3475
+ class hr extends Bt {
3476
+ }
3477
+ hr.prototype._setValue = qe;
3478
+ class yr extends Bt {
3479
+ }
3480
+ yr.prototype._setValue = Qe;
3481
+ class ot extends st {
3482
+ setValue(t, n) {
3483
+ this._values.set(t, n);
3484
+ }
3485
+ }
3486
+ class Bo extends ot {
3487
+ }
3488
+ class To extends ot {
3489
+ }
3490
+ class Oo extends ot {
3491
+ }
3492
+ class Mo extends ot {
3493
+ }
3494
+ class No extends ot {
3495
+ }
3496
+ class Uo extends ot {
3497
+ }
3498
+ class Co extends ot {
3499
+ }
3500
+ class Fo extends ot {
3501
+ }
3502
+ class Lo extends _t {
3503
+ constructor(t) {
3504
+ super(t), this._offsets = new tr(t.type);
3505
+ }
3506
+ addChild(t, n = "0") {
3507
+ if (this.numChildren > 0)
3508
+ throw new Error("ListBuilder can only have one child.");
3509
+ return this.children[this.numChildren] = t, this.type = new qt(new k(n, t.type, !0)), this.numChildren - 1;
3510
+ }
3511
+ _flushPending(t) {
3512
+ const n = this._offsets, [i] = this.children;
3513
+ for (const [r, s] of t)
3514
+ if (typeof s > "u")
3515
+ n.set(r, 0);
3516
+ else {
3517
+ const o = s, a = o.length, c = n.set(r, a).buffer[r];
3518
+ for (let u = -1; ++u < a; )
3519
+ i.set(c + u, o[u]);
3520
+ }
3521
+ }
3522
+ }
3523
+ class Eo extends _t {
3524
+ set(t, n) {
3525
+ return super.set(t, n);
3526
+ }
3527
+ setValue(t, n) {
3528
+ const i = n instanceof Map ? n : new Map(Object.entries(n)), r = this._pending || (this._pending = /* @__PURE__ */ new Map()), s = r.get(t);
3529
+ s && (this._pendingLength -= s.size), this._pendingLength += i.size, r.set(t, i);
3530
+ }
3531
+ addChild(t, n = `${this.numChildren}`) {
3532
+ if (this.numChildren > 0)
3533
+ throw new Error("ListBuilder can only have one child.");
3534
+ return this.children[this.numChildren] = t, this.type = new Ae(new k(n, t.type, !0), this.type.keysSorted), this.numChildren - 1;
3535
+ }
3536
+ _flushPending(t) {
3537
+ const n = this._offsets, [i] = this.children;
3538
+ for (const [r, s] of t)
3539
+ if (s === void 0)
3540
+ n.set(r, 0);
3541
+ else {
3542
+ let { [r]: o, [r + 1]: a } = n.set(r, s.size).buffer;
3543
+ for (const c of s.entries())
3544
+ if (i.set(o, c), ++o >= a)
3545
+ break;
3546
+ }
3547
+ }
3548
+ }
3549
+ class Vo extends P {
3550
+ // @ts-ignore
3551
+ setValue(t, n) {
3552
+ }
3553
+ setValid(t, n) {
3554
+ return this.length = Math.max(t + 1, this.length), n;
3555
+ }
3556
+ }
3557
+ class xo extends P {
3558
+ setValue(t, n) {
3559
+ const { children: i, type: r } = this;
3560
+ switch (Array.isArray(n) || n.constructor) {
3561
+ case !0:
3562
+ return r.children.forEach((s, o) => i[o].set(t, n[o]));
3563
+ case Map:
3564
+ return r.children.forEach((s, o) => i[o].set(t, n.get(s.name)));
3565
+ default:
3566
+ return r.children.forEach((s, o) => i[o].set(t, n[s.name]));
3567
+ }
3568
+ }
3569
+ /** @inheritdoc */
3570
+ setValid(t, n) {
3571
+ return super.setValid(t, n) || this.children.forEach((i) => i.setValid(t, n)), n;
3572
+ }
3573
+ addChild(t, n = `${this.numChildren}`) {
3574
+ const i = this.children.push(t);
3575
+ return this.type = new Y([...this.type.children, new k(n, t.type, !0)]), i;
3576
+ }
3577
+ }
3578
+ class Tt extends st {
3579
+ }
3580
+ Tt.prototype._setValue = di;
3581
+ class pr extends Tt {
3582
+ }
3583
+ pr.prototype._setValue = xe;
3584
+ class fr extends Tt {
3585
+ }
3586
+ fr.prototype._setValue = ke;
3587
+ class gr extends Tt {
3588
+ }
3589
+ gr.prototype._setValue = je;
3590
+ class mr extends Tt {
3591
+ }
3592
+ mr.prototype._setValue = ze;
3593
+ class Ot extends st {
3594
+ }
3595
+ Ot.prototype._setValue = hi;
3596
+ class vr extends Ot {
3597
+ }
3598
+ vr.prototype._setValue = $e;
3599
+ class br extends Ot {
3600
+ }
3601
+ br.prototype._setValue = Pe;
3602
+ class Ir extends Ot {
3603
+ }
3604
+ Ir.prototype._setValue = Re;
3605
+ class Sr extends Ot {
3606
+ }
3607
+ Sr.prototype._setValue = Ye;
3608
+ class on extends P {
3609
+ constructor(t) {
3610
+ super(t), this._typeIds = new jt(Int8Array, 0, 1), typeof t.valueToChildTypeId == "function" && (this._valueToChildTypeId = t.valueToChildTypeId);
3611
+ }
3612
+ get typeIdToChildIndex() {
3613
+ return this.type.typeIdToChildIndex;
3614
+ }
3615
+ append(t, n) {
3616
+ return this.set(this.length, t, n);
3617
+ }
3618
+ set(t, n, i) {
3619
+ return i === void 0 && (i = this._valueToChildTypeId(this, n, t)), this.setValue(t, n, i), this;
3620
+ }
3621
+ setValue(t, n, i) {
3622
+ this._typeIds.set(t, i);
3623
+ const r = this.type.typeIdToChildIndex[i], s = this.children[r];
3624
+ s == null || s.set(t, n), this.length = Math.max(t + 1, this.length);
3625
+ }
3626
+ addChild(t, n = `${this.children.length}`) {
3627
+ const i = this.children.push(t), { type: { children: r, mode: s, typeIds: o } } = this, a = [...r, new k(n, t.type)];
3628
+ return this.type = new Vt(s, [...o, i], a), i;
3629
+ }
3630
+ /** @ignore */
3631
+ // @ts-ignore
3632
+ _valueToChildTypeId(t, n, i) {
3633
+ throw new Error("Cannot map UnionBuilder value to child typeId. Pass the `childTypeId` as the second argument to unionBuilder.append(), or supply a `valueToChildTypeId` function as part of the UnionBuilder constructor options.");
3634
+ }
3635
+ }
3636
+ class ko extends on {
3637
+ }
3638
+ class jo extends on {
3639
+ constructor(t) {
3640
+ super(t), this._offsets = new jt(Int32Array);
3641
+ }
3642
+ /** @ignore */
3643
+ setValue(t, n, i) {
3644
+ const r = this._typeIds.set(t, i).buffer[t], s = this.getChildAt(this.type.typeIdToChildIndex[r]), o = this._offsets.set(t, s.length).buffer[t];
3645
+ s == null || s.set(o, n), this.length = Math.max(t + 1, this.length);
3646
+ }
3647
+ }
3648
+ class wr extends _t {
3649
+ constructor(t) {
3650
+ super(t), this._values = new kt(Uint8Array);
3651
+ }
3652
+ get byteLength() {
3653
+ let t = this._pendingLength + this.length * 4;
3654
+ return this._offsets && (t += this._offsets.byteLength), this._values && (t += this._values.byteLength), this._nulls && (t += this._nulls.byteLength), t;
3655
+ }
3656
+ setValue(t, n) {
3657
+ return super.setValue(t, ne(n));
3658
+ }
3659
+ // @ts-ignore
3660
+ _flushPending(t, n) {
3661
+ }
3662
+ }
3663
+ wr.prototype._flushPending = er.prototype._flushPending;
3664
+ class Ar extends _t {
3665
+ constructor(t) {
3666
+ super(t), this._values = new kt(Uint8Array);
3667
+ }
3668
+ get byteLength() {
3669
+ let t = this._pendingLength + this.length * 4;
3670
+ return this._offsets && (t += this._offsets.byteLength), this._values && (t += this._values.byteLength), this._nulls && (t += this._nulls.byteLength), t;
3671
+ }
3672
+ setValue(t, n) {
3673
+ return super.setValue(t, ne(n));
3674
+ }
3675
+ // @ts-ignore
3676
+ _flushPending(t, n) {
3677
+ }
3678
+ }
3679
+ Ar.prototype._flushPending = nr.prototype._flushPending;
3680
+ class zo extends _ {
3681
+ visitNull() {
3682
+ return Vo;
3683
+ }
3684
+ visitBool() {
3685
+ return Io;
3686
+ }
3687
+ visitInt() {
3688
+ return ot;
3689
+ }
3690
+ visitInt8() {
3691
+ return Bo;
3692
+ }
3693
+ visitInt16() {
3694
+ return To;
3695
+ }
3696
+ visitInt32() {
3697
+ return Oo;
3698
+ }
3699
+ visitInt64() {
3700
+ return Mo;
3701
+ }
3702
+ visitUint8() {
3703
+ return No;
3704
+ }
3705
+ visitUint16() {
3706
+ return Uo;
3707
+ }
3708
+ visitUint32() {
3709
+ return Co;
3710
+ }
3711
+ visitUint64() {
3712
+ return Fo;
3713
+ }
3714
+ visitFloat() {
3715
+ return ue;
3716
+ }
3717
+ visitFloat16() {
3718
+ return Ao;
3719
+ }
3720
+ visitFloat32() {
3721
+ return Do;
3722
+ }
3723
+ visitFloat64() {
3724
+ return _o;
3725
+ }
3726
+ visitUtf8() {
3727
+ return wr;
3728
+ }
3729
+ visitLargeUtf8() {
3730
+ return Ar;
3731
+ }
3732
+ visitBinary() {
3733
+ return er;
3734
+ }
3735
+ visitLargeBinary() {
3736
+ return nr;
3737
+ }
3738
+ visitFixedSizeBinary() {
3739
+ return or;
3740
+ }
3741
+ visitDate() {
3742
+ return ce;
3743
+ }
3744
+ visitDateDay() {
3745
+ return ir;
3746
+ }
3747
+ visitDateMillisecond() {
3748
+ return rr;
3749
+ }
3750
+ visitTimestamp() {
3751
+ return Tt;
3752
+ }
3753
+ visitTimestampSecond() {
3754
+ return pr;
3755
+ }
3756
+ visitTimestampMillisecond() {
3757
+ return fr;
3758
+ }
3759
+ visitTimestampMicrosecond() {
3760
+ return gr;
3761
+ }
3762
+ visitTimestampNanosecond() {
3763
+ return mr;
3764
+ }
3765
+ visitTime() {
3766
+ return Ot;
3767
+ }
3768
+ visitTimeSecond() {
3769
+ return vr;
3770
+ }
3771
+ visitTimeMillisecond() {
3772
+ return br;
3773
+ }
3774
+ visitTimeMicrosecond() {
3775
+ return Ir;
3776
+ }
3777
+ visitTimeNanosecond() {
3778
+ return Sr;
3779
+ }
3780
+ visitDecimal() {
3781
+ return sr;
3782
+ }
3783
+ visitList() {
3784
+ return Lo;
3785
+ }
3786
+ visitStruct() {
3787
+ return xo;
3788
+ }
3789
+ visitUnion() {
3790
+ return on;
3791
+ }
3792
+ visitDenseUnion() {
3793
+ return jo;
3794
+ }
3795
+ visitSparseUnion() {
3796
+ return ko;
3797
+ }
3798
+ visitDictionary() {
3799
+ return So;
3800
+ }
3801
+ visitInterval() {
3802
+ return zt;
3803
+ }
3804
+ visitIntervalDayTime() {
3805
+ return ar;
3806
+ }
3807
+ visitIntervalYearMonth() {
3808
+ return lr;
3809
+ }
3810
+ visitIntervalMonthDayNano() {
3811
+ return cr;
3812
+ }
3813
+ visitDuration() {
3814
+ return Bt;
3815
+ }
3816
+ visitDurationSecond() {
3817
+ return ur;
3818
+ }
3819
+ visitDurationMillisecond() {
3820
+ return dr;
3821
+ }
3822
+ visitDurationMicrosecond() {
3823
+ return hr;
3824
+ }
3825
+ visitDurationNanosecond() {
3826
+ return yr;
3827
+ }
3828
+ visitFixedSizeList() {
3829
+ return wo;
3830
+ }
3831
+ visitMap() {
3832
+ return Eo;
3833
+ }
3834
+ }
3835
+ const $o = new zo();
3836
+ class m extends _ {
3837
+ compareSchemas(t, n) {
3838
+ return t === n || n instanceof t.constructor && this.compareManyFields(t.fields, n.fields);
3839
+ }
3840
+ compareManyFields(t, n) {
3841
+ return t === n || Array.isArray(t) && Array.isArray(n) && t.length === n.length && t.every((i, r) => this.compareFields(i, n[r]));
3842
+ }
3843
+ compareFields(t, n) {
3844
+ return t === n || n instanceof t.constructor && t.name === n.name && t.nullable === n.nullable && this.visit(t.type, n.type);
3845
+ }
3846
+ }
3847
+ function z(e, t) {
3848
+ return t instanceof e.constructor;
3849
+ }
3850
+ function ht(e, t) {
3851
+ return e === t || z(e, t);
3852
+ }
3853
+ function at(e, t) {
3854
+ return e === t || z(e, t) && e.bitWidth === t.bitWidth && e.isSigned === t.isSigned;
3855
+ }
3856
+ function de(e, t) {
3857
+ return e === t || z(e, t) && e.precision === t.precision;
3858
+ }
3859
+ function Po(e, t) {
3860
+ return e === t || z(e, t) && e.byteWidth === t.byteWidth;
3861
+ }
3862
+ function an(e, t) {
3863
+ return e === t || z(e, t) && e.unit === t.unit;
3864
+ }
3865
+ function $t(e, t) {
3866
+ return e === t || z(e, t) && e.unit === t.unit && e.timezone === t.timezone;
3867
+ }
3868
+ function Pt(e, t) {
3869
+ return e === t || z(e, t) && e.unit === t.unit && e.bitWidth === t.bitWidth;
3870
+ }
3871
+ function Ro(e, t) {
3872
+ return e === t || z(e, t) && e.children.length === t.children.length && et.compareManyFields(e.children, t.children);
3873
+ }
3874
+ function Yo(e, t) {
3875
+ return e === t || z(e, t) && e.children.length === t.children.length && et.compareManyFields(e.children, t.children);
3876
+ }
3877
+ function ln(e, t) {
3878
+ return e === t || z(e, t) && e.mode === t.mode && e.typeIds.every((n, i) => n === t.typeIds[i]) && et.compareManyFields(e.children, t.children);
3879
+ }
3880
+ function Wo(e, t) {
3881
+ return e === t || z(e, t) && e.id === t.id && e.isOrdered === t.isOrdered && et.visit(e.indices, t.indices) && et.visit(e.dictionary, t.dictionary);
3882
+ }
3883
+ function he(e, t) {
3884
+ return e === t || z(e, t) && e.unit === t.unit;
3885
+ }
3886
+ function Rt(e, t) {
3887
+ return e === t || z(e, t) && e.unit === t.unit;
3888
+ }
3889
+ function Ho(e, t) {
3890
+ return e === t || z(e, t) && e.listSize === t.listSize && e.children.length === t.children.length && et.compareManyFields(e.children, t.children);
3891
+ }
3892
+ function Ko(e, t) {
3893
+ return e === t || z(e, t) && e.keysSorted === t.keysSorted && e.children.length === t.children.length && et.compareManyFields(e.children, t.children);
3894
+ }
3895
+ m.prototype.visitNull = ht;
3896
+ m.prototype.visitBool = ht;
3897
+ m.prototype.visitInt = at;
3898
+ m.prototype.visitInt8 = at;
3899
+ m.prototype.visitInt16 = at;
3900
+ m.prototype.visitInt32 = at;
3901
+ m.prototype.visitInt64 = at;
3902
+ m.prototype.visitUint8 = at;
3903
+ m.prototype.visitUint16 = at;
3904
+ m.prototype.visitUint32 = at;
3905
+ m.prototype.visitUint64 = at;
3906
+ m.prototype.visitFloat = de;
3907
+ m.prototype.visitFloat16 = de;
3908
+ m.prototype.visitFloat32 = de;
3909
+ m.prototype.visitFloat64 = de;
3910
+ m.prototype.visitUtf8 = ht;
3911
+ m.prototype.visitLargeUtf8 = ht;
3912
+ m.prototype.visitBinary = ht;
3913
+ m.prototype.visitLargeBinary = ht;
3914
+ m.prototype.visitFixedSizeBinary = Po;
3915
+ m.prototype.visitDate = an;
3916
+ m.prototype.visitDateDay = an;
3917
+ m.prototype.visitDateMillisecond = an;
3918
+ m.prototype.visitTimestamp = $t;
3919
+ m.prototype.visitTimestampSecond = $t;
3920
+ m.prototype.visitTimestampMillisecond = $t;
3921
+ m.prototype.visitTimestampMicrosecond = $t;
3922
+ m.prototype.visitTimestampNanosecond = $t;
3923
+ m.prototype.visitTime = Pt;
3924
+ m.prototype.visitTimeSecond = Pt;
3925
+ m.prototype.visitTimeMillisecond = Pt;
3926
+ m.prototype.visitTimeMicrosecond = Pt;
3927
+ m.prototype.visitTimeNanosecond = Pt;
3928
+ m.prototype.visitDecimal = ht;
3929
+ m.prototype.visitList = Ro;
3930
+ m.prototype.visitStruct = Yo;
3931
+ m.prototype.visitUnion = ln;
3932
+ m.prototype.visitDenseUnion = ln;
3933
+ m.prototype.visitSparseUnion = ln;
3934
+ m.prototype.visitDictionary = Wo;
3935
+ m.prototype.visitInterval = he;
3936
+ m.prototype.visitIntervalDayTime = he;
3937
+ m.prototype.visitIntervalYearMonth = he;
3938
+ m.prototype.visitIntervalMonthDayNano = he;
3939
+ m.prototype.visitDuration = Rt;
3940
+ m.prototype.visitDurationSecond = Rt;
3941
+ m.prototype.visitDurationMillisecond = Rt;
3942
+ m.prototype.visitDurationMicrosecond = Rt;
3943
+ m.prototype.visitDurationNanosecond = Rt;
3944
+ m.prototype.visitFixedSizeList = Ho;
3945
+ m.prototype.visitMap = Ko;
3946
+ const et = new m();
3947
+ function Go(e, t) {
3948
+ return et.compareSchemas(e, t);
3949
+ }
3950
+ function Ua(e, t) {
3951
+ return et.compareFields(e, t);
3952
+ }
3953
+ function Jo(e, t) {
3954
+ return et.visit(e, t);
3955
+ }
3956
+ function xt(e) {
3957
+ const t = e.type, n = new ($o.getVisitFn(t)())(e);
3958
+ if (t.children && t.children.length > 0) {
3959
+ const i = e.children || [], r = { nullValues: e.nullValues }, s = Array.isArray(i) ? ((o, a) => i[a] || r) : (({ name: o }) => i[o] || r);
3960
+ for (const [o, a] of t.children.entries()) {
3961
+ const { type: c } = a, u = s(a, o);
3962
+ n.children.push(xt(Object.assign(Object.assign({}, u), { type: c })));
3963
+ }
3964
+ }
3965
+ return n;
3966
+ }
3967
+ function Dr(e, t) {
3968
+ if (e instanceof T || e instanceof D || e.type instanceof A || ArrayBuffer.isView(e))
3969
+ return sn(e);
3970
+ const n = { type: t ?? Kt(e), nullValues: [null] }, i = [...qo(n)(e)], r = i.length === 1 ? i[0] : i.reduce((s, o) => s.concat(o));
3971
+ return A.isDictionary(r.type) ? r.memoize() : r;
3972
+ }
3973
+ function Ca(e) {
3974
+ const t = Dr(e), n = new V(new C(t.type.children), t.data[0]);
3975
+ return new R(n);
3976
+ }
3977
+ function Kt(e) {
3978
+ if (e.length === 0)
3979
+ return new Ft();
3980
+ let t = 0, n = 0, i = 0, r = 0, s = 0, o = 0, a = 0, c = 0;
3981
+ for (const u of e) {
3982
+ if (u == null) {
3983
+ ++t;
3984
+ continue;
3985
+ }
3986
+ switch (typeof u) {
3987
+ case "bigint":
3988
+ ++o;
3989
+ continue;
3990
+ case "boolean":
3991
+ ++a;
3992
+ continue;
3993
+ case "number":
3994
+ ++r;
3995
+ continue;
3996
+ case "string":
3997
+ ++s;
3998
+ continue;
3999
+ case "object":
4000
+ Array.isArray(u) ? ++n : Object.prototype.toString.call(u) === "[object Date]" ? ++c : ++i;
4001
+ continue;
4002
+ }
4003
+ throw new TypeError("Unable to infer Vector type from input values, explicit type declaration expected.");
4004
+ }
4005
+ if (r + t === e.length)
4006
+ return new Ue();
4007
+ if (s + t === e.length)
4008
+ return new Qt(new Ie(), new Me());
4009
+ if (o + t === e.length)
4010
+ return new Ne();
4011
+ if (a + t === e.length)
4012
+ return new Se();
4013
+ if (c + t === e.length)
4014
+ return new ms();
4015
+ if (n + t === e.length) {
4016
+ const u = e, d = Kt(u[u.findIndex((h) => h != null)]);
4017
+ if (u.every((h) => h == null || Jo(d, Kt(h))))
4018
+ return new qt(new k("", d, !0));
4019
+ } else if (i + t === e.length) {
4020
+ const u = /* @__PURE__ */ new Map();
4021
+ for (const d of e)
4022
+ for (const h of Object.keys(d))
4023
+ !u.has(h) && d[h] != null && u.set(h, new k(h, Kt([d[h]]), !0));
4024
+ return new Y([...u.values()]);
4025
+ }
4026
+ throw new TypeError("Unable to infer Vector type from input values, explicit type declaration expected.");
4027
+ }
4028
+ function qo(e) {
4029
+ const { ["queueingStrategy"]: t = "count" } = e, { ["highWaterMark"]: n = t !== "bytes" ? Number.POSITIVE_INFINITY : Math.pow(2, 14) } = e, i = t !== "bytes" ? "length" : "byteLength";
4030
+ return function* (r) {
4031
+ let s = 0;
4032
+ const o = xt(e);
4033
+ for (const a of r)
4034
+ o.append(a)[i] >= n && ++s && (yield o.toVector());
4035
+ (o.finish().length > 0 || s === 0) && (yield o.toVector());
4036
+ };
4037
+ }
4038
+ function Fa(e) {
4039
+ const { ["queueingStrategy"]: t = "count" } = e, { ["highWaterMark"]: n = t !== "bytes" ? Number.POSITIVE_INFINITY : Math.pow(2, 14) } = e, i = t !== "bytes" ? "length" : "byteLength";
4040
+ return function(r) {
4041
+ return Nt(this, arguments, function* () {
4042
+ var s, o, a, c;
4043
+ let u = 0;
4044
+ const d = xt(e);
4045
+ try {
4046
+ for (var h = !0, U = Wt(r), B; B = yield L(U.next()), s = B.done, !s; h = !0) {
4047
+ c = B.value, h = !1;
4048
+ const E = c;
4049
+ d.append(E)[i] >= n && ++u && (yield yield L(d.toVector()));
4050
+ }
4051
+ } catch (E) {
4052
+ o = { error: E };
4053
+ } finally {
4054
+ try {
4055
+ !h && !s && (a = U.return) && (yield L(a.call(U)));
4056
+ } finally {
4057
+ if (o) throw o.error;
4058
+ }
4059
+ }
4060
+ (d.finish().length > 0 || u === 0) && (yield yield L(d.toVector()));
4061
+ });
4062
+ };
4063
+ }
4064
+ function ge(e, t) {
4065
+ return Qo(e, t.map((n) => n.data.concat()));
4066
+ }
4067
+ function Qo(e, t) {
4068
+ const n = [...e.fields], i = [], r = { numBatches: t.reduce((h, U) => Math.max(h, U.length), 0) };
4069
+ let s = 0, o = 0, a = -1;
4070
+ const c = t.length;
4071
+ let u, d = [];
4072
+ for (; r.numBatches-- > 0; ) {
4073
+ for (o = Number.POSITIVE_INFINITY, a = -1; ++a < c; )
4074
+ d[a] = u = t[a].shift(), o = Math.min(o, u ? u.length : o);
4075
+ Number.isFinite(o) && (d = Xo(n, o, d, t, r), o > 0 && (i[s++] = M({
4076
+ type: new Y(n),
4077
+ length: o,
4078
+ nullCount: 0,
4079
+ children: d.slice()
4080
+ })));
4081
+ }
4082
+ return [
4083
+ e = e.assign(n),
4084
+ i.map((h) => new V(e, h))
4085
+ ];
4086
+ }
4087
+ function Xo(e, t, n, i, r) {
4088
+ var s;
4089
+ const o = (t + 63 & -64) >> 3;
4090
+ for (let a = -1, c = i.length; ++a < c; ) {
4091
+ const u = n[a], d = u == null ? void 0 : u.length;
4092
+ if (d >= t)
4093
+ d === t ? n[a] = u : (n[a] = u.slice(0, t), r.numBatches = Math.max(r.numBatches, i[a].unshift(u.slice(t, d - t))));
4094
+ else {
4095
+ const h = e[a];
4096
+ e[a] = h.clone({ nullable: !0 }), n[a] = (s = u == null ? void 0 : u._changeLengthAndBackfillNullBitmap(t)) !== null && s !== void 0 ? s : M({
4097
+ type: h.type,
4098
+ length: t,
4099
+ nullCount: t,
4100
+ nullBitmap: new Uint8Array(o)
4101
+ });
4102
+ }
4103
+ }
4104
+ return n;
4105
+ }
4106
+ var _r;
4107
+ class R {
4108
+ constructor(...t) {
4109
+ var n, i;
4110
+ if (t.length === 0)
4111
+ return this.batches = [], this.schema = new C([]), this._offsets = [0], this;
4112
+ let r, s;
4113
+ t[0] instanceof C && (r = t.shift()), t.at(-1) instanceof Uint32Array && (s = t.pop());
4114
+ const o = (c) => {
4115
+ if (c) {
4116
+ if (c instanceof V)
4117
+ return [c];
4118
+ if (c instanceof R)
4119
+ return c.batches;
4120
+ if (c instanceof T) {
4121
+ if (c.type instanceof Y)
4122
+ return [new V(new C(c.type.children), c)];
4123
+ } else {
4124
+ if (Array.isArray(c))
4125
+ return c.flatMap((u) => o(u));
4126
+ if (typeof c[Symbol.iterator] == "function")
4127
+ return [...c].flatMap((u) => o(u));
4128
+ if (typeof c == "object") {
4129
+ const u = Object.keys(c), d = u.map((B) => new D([c[B]])), h = r ?? new C(u.map((B, E) => new k(String(B), d[E].type, d[E].nullable))), [, U] = ge(h, d);
4130
+ return U.length === 0 ? [new V(c)] : U;
4131
+ }
4132
+ }
4133
+ }
4134
+ return [];
4135
+ }, a = t.flatMap((c) => o(c));
4136
+ if (r = (i = r ?? ((n = a[0]) === null || n === void 0 ? void 0 : n.schema)) !== null && i !== void 0 ? i : new C([]), !(r instanceof C))
4137
+ throw new TypeError("Table constructor expects a [Schema, RecordBatch[]] pair.");
4138
+ for (const c of a) {
4139
+ if (!(c instanceof V))
4140
+ throw new TypeError("Table constructor expects a [Schema, RecordBatch[]] pair.");
4141
+ if (!Go(r, c.schema))
4142
+ throw new TypeError("Table and inner RecordBatch schemas must be equivalent.");
4143
+ }
4144
+ this.schema = r, this.batches = a, this._offsets = s ?? Wi(this.data);
4145
+ }
4146
+ /**
4147
+ * The contiguous {@link RecordBatch `RecordBatch`} chunks of the Table rows.
4148
+ */
4149
+ get data() {
4150
+ return this.batches.map(({ data: t }) => t);
4151
+ }
4152
+ /**
4153
+ * The number of columns in this Table.
4154
+ */
4155
+ get numCols() {
4156
+ return this.schema.fields.length;
4157
+ }
4158
+ /**
4159
+ * The number of rows in this Table.
4160
+ */
4161
+ get numRows() {
4162
+ return this.data.reduce((t, n) => t + n.length, 0);
4163
+ }
4164
+ /**
4165
+ * The number of null rows in this Table.
4166
+ */
4167
+ get nullCount() {
4168
+ return this._nullCount === -1 && (this._nullCount = Yi(this.data)), this._nullCount;
4169
+ }
4170
+ /**
4171
+ * Check whether an element is null.
4172
+ *
4173
+ * @param index The index at which to read the validity bitmap.
4174
+ */
4175
+ // @ts-ignore
4176
+ isValid(t) {
4177
+ return !1;
4178
+ }
4179
+ /**
4180
+ * Get an element value by position.
4181
+ *
4182
+ * @param index The index of the element to read.
4183
+ */
4184
+ // @ts-ignore
4185
+ get(t) {
4186
+ return null;
4187
+ }
4188
+ /**
4189
+ * Get an element value by position.
4190
+ * @param index The index of the element to read. A negative index will count back from the last element.
4191
+ */
4192
+ // @ts-ignore
4193
+ at(t) {
4194
+ return this.get(oe(t, this.numRows));
4195
+ }
4196
+ /**
4197
+ * Set an element value by position.
4198
+ *
4199
+ * @param index The index of the element to write.
4200
+ * @param value The value to set.
4201
+ */
4202
+ // @ts-ignore
4203
+ set(t, n) {
4204
+ }
4205
+ /**
4206
+ * Retrieve the index of the first occurrence of a value in an Vector.
4207
+ *
4208
+ * @param element The value to locate in the Vector.
4209
+ * @param offset The index at which to begin the search. If offset is omitted, the search starts at index 0.
4210
+ */
4211
+ // @ts-ignore
4212
+ indexOf(t, n) {
4213
+ return -1;
4214
+ }
4215
+ /**
4216
+ * Iterator for rows in this Table.
4217
+ */
4218
+ [Symbol.iterator]() {
4219
+ return this.batches.length > 0 ? rn.visit(new D(this.data)) : new Array(0)[Symbol.iterator]();
4220
+ }
4221
+ /**
4222
+ * Return a JavaScript Array of the Table rows.
4223
+ *
4224
+ * @returns An Array of Table rows.
4225
+ */
4226
+ toArray() {
4227
+ return [...this];
4228
+ }
4229
+ /**
4230
+ * Returns a string representation of the Table rows.
4231
+ *
4232
+ * @returns A string representation of the Table rows.
4233
+ */
4234
+ toString() {
4235
+ return `[
4236
+ ${this.toArray().join(`,
4237
+ `)}
4238
+ ]`;
4239
+ }
4240
+ /**
4241
+ * Combines two or more Tables of the same schema.
4242
+ *
4243
+ * @param others Additional Tables to add to the end of this Tables.
4244
+ */
4245
+ concat(...t) {
4246
+ const n = this.schema, i = this.data.concat(t.flatMap(({ data: r }) => r));
4247
+ return new R(n, i.map((r) => new V(n, r)));
4248
+ }
4249
+ /**
4250
+ * Return a zero-copy sub-section of this Table.
4251
+ *
4252
+ * @param begin The beginning of the specified portion of the Table.
4253
+ * @param end The end of the specified portion of the Table. This is exclusive of the element at the index 'end'.
4254
+ */
4255
+ slice(t, n) {
4256
+ const i = this.schema;
4257
+ [t, n] = Ze({ length: this.numRows }, t, n);
4258
+ const r = Hi(this.data, this._offsets, t, n);
4259
+ return new R(i, r.map((s) => new V(i, s)));
4260
+ }
4261
+ /**
4262
+ * Returns a child Vector by name, or null if this Vector has no child with the given name.
4263
+ *
4264
+ * @param name The name of the child to retrieve.
4265
+ */
4266
+ getChild(t) {
4267
+ return this.getChildAt(this.schema.fields.findIndex((n) => n.name === t));
4268
+ }
4269
+ /**
4270
+ * Returns a child Vector by index, or null if this Vector has no child at the supplied index.
4271
+ *
4272
+ * @param index The index of the child to retrieve.
4273
+ */
4274
+ getChildAt(t) {
4275
+ if (t > -1 && t < this.schema.fields.length) {
4276
+ const n = this.data.map((i) => i.children[t]);
4277
+ if (n.length === 0) {
4278
+ const { type: i } = this.schema.fields[t], r = M({ type: i, length: 0, nullCount: 0 });
4279
+ n.push(r._changeLengthAndBackfillNullBitmap(this.numRows));
4280
+ }
4281
+ return new D(n);
4282
+ }
4283
+ return null;
4284
+ }
4285
+ /**
4286
+ * Sets a child Vector by name.
4287
+ *
4288
+ * @param name The name of the child to overwrite.
4289
+ * @returns A new Table with the supplied child for the specified name.
4290
+ */
4291
+ setChild(t, n) {
4292
+ var i;
4293
+ return this.setChildAt((i = this.schema.fields) === null || i === void 0 ? void 0 : i.findIndex((r) => r.name === t), n);
4294
+ }
4295
+ setChildAt(t, n) {
4296
+ let i = this.schema, r = [...this.batches];
4297
+ if (t > -1 && t < this.numCols) {
4298
+ n || (n = new D([M({ type: new Ft(), length: this.numRows })]));
4299
+ const s = i.fields.slice(), o = s[t].clone({ type: n.type }), a = this.schema.fields.map((c, u) => this.getChildAt(u));
4300
+ [s[t], a[t]] = [o, n], [i, r] = ge(i, a);
4301
+ }
4302
+ return new R(i, r);
4303
+ }
4304
+ /**
4305
+ * Construct a new Table containing only specified columns.
4306
+ *
4307
+ * @param columnNames Names of columns to keep.
4308
+ * @returns A new Table of columns matching the specified names.
4309
+ */
4310
+ select(t) {
4311
+ const n = this.schema.fields.reduce((i, r, s) => i.set(r.name, s), /* @__PURE__ */ new Map());
4312
+ return this.selectAt(t.map((i) => n.get(i)).filter((i) => i > -1));
4313
+ }
4314
+ /**
4315
+ * Construct a new Table containing only columns at the specified indices.
4316
+ *
4317
+ * @param columnIndices Indices of columns to keep.
4318
+ * @returns A new Table of columns at the specified indices.
4319
+ */
4320
+ selectAt(t) {
4321
+ const n = this.schema.selectAt(t), i = this.batches.map((r) => r.selectAt(t));
4322
+ return new R(n, i);
4323
+ }
4324
+ assign(t) {
4325
+ const n = this.schema.fields, [i, r] = t.schema.fields.reduce((a, c, u) => {
4326
+ const [d, h] = a, U = n.findIndex((B) => B.name === c.name);
4327
+ return ~U ? h[U] = u : d.push(u), a;
4328
+ }, [[], []]), s = this.schema.assign(t.schema), o = [
4329
+ ...n.map((a, c) => [c, r[c]]).map(([a, c]) => c === void 0 ? this.getChildAt(a) : t.getChildAt(c)),
4330
+ ...i.map((a) => t.getChildAt(a))
4331
+ ].filter(Boolean);
4332
+ return new R(...ge(s, o));
4333
+ }
4334
+ }
4335
+ _r = Symbol.toStringTag;
4336
+ R[_r] = ((e) => (e.schema = null, e.batches = [], e._offsets = new Uint32Array([0]), e._nullCount = -1, e[Symbol.isConcatSpreadable] = !0, e.isValid = Zt(nn), e.get = Zt($.getVisitFn(l.Struct)), e.set = Ki(G.getVisitFn(l.Struct)), e.indexOf = Gi(te.getVisitFn(l.Struct)), "Table"))(R.prototype);
4337
+ function La(e) {
4338
+ const t = {}, n = Object.entries(e);
4339
+ for (const [i, r] of n)
4340
+ t[i] = sn(r);
4341
+ return new R(t);
4342
+ }
4343
+ function Ea(e) {
4344
+ const t = {}, n = Object.entries(e);
4345
+ for (const [i, r] of n)
4346
+ t[i] = Dr(r);
4347
+ return new R(t);
4348
+ }
4349
+ var Br;
4350
+ class V {
4351
+ constructor(...t) {
4352
+ switch (t.length) {
4353
+ case 2: {
4354
+ if ([this.schema] = t, !(this.schema instanceof C))
4355
+ throw new TypeError("RecordBatch constructor expects a [Schema, Data] pair.");
4356
+ if ([
4357
+ ,
4358
+ this.data = M({
4359
+ nullCount: 0,
4360
+ type: new Y(this.schema.fields),
4361
+ children: this.schema.fields.map((n) => M({ type: n.type, nullCount: 0 }))
4362
+ })
4363
+ ] = t, !(this.data instanceof T))
4364
+ throw new TypeError("RecordBatch constructor expects a [Schema, Data] pair.");
4365
+ [this.schema, this.data] = wn(this.schema, this.data.children);
4366
+ break;
4367
+ }
4368
+ case 1: {
4369
+ const [n] = t, { fields: i, children: r, length: s } = Object.keys(n).reduce((c, u, d) => (c.children[d] = n[u], c.length = Math.max(c.length, n[u].length), c.fields[d] = k.new({ name: u, type: n[u].type, nullable: !0 }), c), {
4370
+ length: 0,
4371
+ fields: new Array(),
4372
+ children: new Array()
4373
+ }), o = new C(i), a = M({ type: new Y(i), length: s, children: r, nullCount: 0 });
4374
+ [this.schema, this.data] = wn(o, a.children, s);
4375
+ break;
4376
+ }
4377
+ default:
4378
+ throw new TypeError("RecordBatch constructor expects an Object mapping names to child Data, or a [Schema, Data] pair.");
4379
+ }
4380
+ }
4381
+ get dictionaries() {
4382
+ return this._dictionaries || (this._dictionaries = Tr(this.schema.fields, this.data.children));
4383
+ }
4384
+ /**
4385
+ * The number of columns in this RecordBatch.
4386
+ */
4387
+ get numCols() {
4388
+ return this.schema.fields.length;
4389
+ }
4390
+ /**
4391
+ * The number of rows in this RecordBatch.
4392
+ */
4393
+ get numRows() {
4394
+ return this.data.length;
4395
+ }
4396
+ /**
4397
+ * The number of null rows in this RecordBatch.
4398
+ */
4399
+ get nullCount() {
4400
+ return this.data.nullCount;
4401
+ }
4402
+ /**
4403
+ * Check whether an row is null.
4404
+ * @param index The index at which to read the validity bitmap.
4405
+ */
4406
+ isValid(t) {
4407
+ return this.data.getValid(t);
4408
+ }
4409
+ /**
4410
+ * Get a row by position.
4411
+ * @param index The index of the row to read.
4412
+ */
4413
+ get(t) {
4414
+ return $.visit(this.data, t);
4415
+ }
4416
+ /**
4417
+ * Get a row value by position.
4418
+ * @param index The index of the row to read. A negative index will count back from the last row.
4419
+ */
4420
+ at(t) {
4421
+ return this.get(oe(t, this.numRows));
4422
+ }
4423
+ /**
4424
+ * Set a row by position.
4425
+ * @param index The index of the row to write.
4426
+ * @param value The value to set.
4427
+ */
4428
+ set(t, n) {
4429
+ return G.visit(this.data, t, n);
4430
+ }
4431
+ /**
4432
+ * Retrieve the index of the first occurrence of a row in an RecordBatch.
4433
+ * @param element The row to locate in the RecordBatch.
4434
+ * @param offset The index at which to begin the search. If offset is omitted, the search starts at index 0.
4435
+ */
4436
+ indexOf(t, n) {
4437
+ return te.visit(this.data, t, n);
4438
+ }
4439
+ /**
4440
+ * Iterator for rows in this RecordBatch.
4441
+ */
4442
+ [Symbol.iterator]() {
4443
+ return rn.visit(new D([this.data]));
4444
+ }
4445
+ /**
4446
+ * Return a JavaScript Array of the RecordBatch rows.
4447
+ * @returns An Array of RecordBatch rows.
4448
+ */
4449
+ toArray() {
4450
+ return [...this];
4451
+ }
4452
+ /**
4453
+ * Combines two or more RecordBatch of the same schema.
4454
+ * @param others Additional RecordBatch to add to the end of this RecordBatch.
4455
+ */
4456
+ concat(...t) {
4457
+ return new R(this.schema, [this, ...t]);
4458
+ }
4459
+ /**
4460
+ * Return a zero-copy sub-section of this RecordBatch.
4461
+ * @param start The beginning of the specified portion of the RecordBatch.
4462
+ * @param end The end of the specified portion of the RecordBatch. This is exclusive of the row at the index 'end'.
4463
+ */
4464
+ slice(t, n) {
4465
+ const [i] = new D([this.data]).slice(t, n).data;
4466
+ return new V(this.schema, i);
4467
+ }
4468
+ /**
4469
+ * Returns a child Vector by name, or null if this Vector has no child with the given name.
4470
+ * @param name The name of the child to retrieve.
4471
+ */
4472
+ getChild(t) {
4473
+ var n;
4474
+ return this.getChildAt((n = this.schema.fields) === null || n === void 0 ? void 0 : n.findIndex((i) => i.name === t));
4475
+ }
4476
+ /**
4477
+ * Returns a child Vector by index, or null if this Vector has no child at the supplied index.
4478
+ * @param index The index of the child to retrieve.
4479
+ */
4480
+ getChildAt(t) {
4481
+ return t > -1 && t < this.schema.fields.length ? new D([this.data.children[t]]) : null;
4482
+ }
4483
+ /**
4484
+ * Sets a child Vector by name.
4485
+ * @param name The name of the child to overwrite.
4486
+ * @returns A new RecordBatch with the new child for the specified name.
4487
+ */
4488
+ setChild(t, n) {
4489
+ var i;
4490
+ return this.setChildAt((i = this.schema.fields) === null || i === void 0 ? void 0 : i.findIndex((r) => r.name === t), n);
4491
+ }
4492
+ setChildAt(t, n) {
4493
+ let i = this.schema, r = this.data;
4494
+ if (t > -1 && t < this.numCols) {
4495
+ n || (n = new D([M({ type: new Ft(), length: this.numRows })]));
4496
+ const s = i.fields.slice(), o = r.children.slice(), a = s[t].clone({ type: n.type });
4497
+ [s[t], o[t]] = [a, n.data[0]], i = new C(s, new Map(this.schema.metadata)), r = M({ type: new Y(s), children: o });
4498
+ }
4499
+ return new V(i, r);
4500
+ }
4501
+ /**
4502
+ * Construct a new RecordBatch containing only specified columns.
4503
+ *
4504
+ * @param columnNames Names of columns to keep.
4505
+ * @returns A new RecordBatch of columns matching the specified names.
4506
+ */
4507
+ select(t) {
4508
+ const n = this.schema.select(t), i = new Y(n.fields), r = [];
4509
+ for (const s of t) {
4510
+ const o = this.schema.fields.findIndex((a) => a.name === s);
4511
+ ~o && (r[o] = this.data.children[o]);
4512
+ }
4513
+ return new V(n, M({ type: i, length: this.numRows, children: r }));
4514
+ }
4515
+ /**
4516
+ * Construct a new RecordBatch containing only columns at the specified indices.
4517
+ *
4518
+ * @param columnIndices Indices of columns to keep.
4519
+ * @returns A new RecordBatch of columns matching at the specified indices.
4520
+ */
4521
+ selectAt(t) {
4522
+ const n = this.schema.selectAt(t), i = t.map((s) => this.data.children[s]).filter(Boolean), r = M({ type: new Y(n.fields), length: this.numRows, children: i });
4523
+ return new V(n, r);
4524
+ }
4525
+ }
4526
+ Br = Symbol.toStringTag;
4527
+ V[Br] = ((e) => (e._nullCount = -1, e[Symbol.isConcatSpreadable] = !0, "RecordBatch"))(V.prototype);
4528
+ function wn(e, t, n = t.reduce((i, r) => Math.max(i, r.length), 0)) {
4529
+ var i;
4530
+ const r = [...e.fields], s = [...t], o = (n + 63 & -64) >> 3;
4531
+ for (const [a, c] of e.fields.entries()) {
4532
+ const u = t[a];
4533
+ (!u || u.length !== n) && (r[a] = c.clone({ nullable: !0 }), s[a] = (i = u == null ? void 0 : u._changeLengthAndBackfillNullBitmap(n)) !== null && i !== void 0 ? i : M({
4534
+ type: c.type,
4535
+ length: n,
4536
+ nullCount: n,
4537
+ nullBitmap: new Uint8Array(o)
4538
+ }));
4539
+ }
4540
+ return [
4541
+ e.assign(r),
4542
+ M({ type: new Y(r), length: n, children: s })
4543
+ ];
4544
+ }
4545
+ function Tr(e, t, n = /* @__PURE__ */ new Map()) {
4546
+ var i, r;
4547
+ if (((i = e == null ? void 0 : e.length) !== null && i !== void 0 ? i : 0) > 0 && (e == null ? void 0 : e.length) === (t == null ? void 0 : t.length))
4548
+ for (let s = -1, o = e.length; ++s < o; ) {
4549
+ const { type: a } = e[s], c = t[s];
4550
+ for (const u of [c, ...((r = c == null ? void 0 : c.dictionary) === null || r === void 0 ? void 0 : r.data) || []])
4551
+ Tr(a.children, u == null ? void 0 : u.children, n);
4552
+ if (A.isDictionary(a)) {
4553
+ const { id: u } = a;
4554
+ if (!n.has(u))
4555
+ c != null && c.dictionary && n.set(u, c.dictionary);
4556
+ else if (n.get(u) !== c.dictionary)
4557
+ throw new Error("Cannot create Schema containing two different dictionaries with the same Id");
4558
+ }
4559
+ }
4560
+ return n;
4561
+ }
4562
+ class Va extends V {
4563
+ constructor(t) {
4564
+ const n = t.fields.map((r) => M({ type: r.type })), i = M({ type: new Y(t.fields), nullCount: 0, children: n });
4565
+ super(t, i);
4566
+ }
4567
+ }
4568
+ export {
4569
+ ea as $,
4570
+ A,
4571
+ Se as B,
4572
+ Nr as C,
4573
+ Z as D,
4574
+ oa as E,
4575
+ k as F,
4576
+ Vr as G,
4577
+ ia as H,
4578
+ j as I,
4579
+ Dn as J,
4580
+ Fr as K,
4581
+ qt as L,
4582
+ be as M,
4583
+ Ft as N,
4584
+ Lr as O,
4585
+ x as P,
4586
+ Wt as Q,
4587
+ Pi as R,
4588
+ C as S,
4589
+ y as T,
4590
+ K as U,
4591
+ _ as V,
4592
+ O as W,
4593
+ ne as X,
4594
+ M as Y,
4595
+ na as Z,
4596
+ Nt as _,
4597
+ L as a,
4598
+ Qn as a$,
4599
+ Er as a0,
4600
+ Va as a1,
4601
+ V as a2,
4602
+ D as a3,
4603
+ ye as a4,
4604
+ _e as a5,
4605
+ hs as a6,
4606
+ it as a7,
4607
+ le as a8,
4608
+ $i as a9,
4609
+ sr as aA,
4610
+ Ba as aB,
4611
+ jo as aC,
4612
+ So as aD,
4613
+ Bt as aE,
4614
+ Da as aF,
4615
+ hr as aG,
4616
+ Aa as aH,
4617
+ dr as aI,
4618
+ _a as aJ,
4619
+ yr as aK,
4620
+ wa as aL,
4621
+ ur as aM,
4622
+ or as aN,
4623
+ wo as aO,
4624
+ gs as aP,
4625
+ Ao as aQ,
4626
+ ii as aR,
4627
+ Do as aS,
4628
+ Ue as aT,
4629
+ _o as aU,
4630
+ ue as aV,
4631
+ Xn as aW,
4632
+ To as aX,
4633
+ Oo as aY,
4634
+ Ne as aZ,
4635
+ Mo as a_,
4636
+ tn as aa,
4637
+ re as ab,
4638
+ ra as ac,
4639
+ sa as ad,
4640
+ Go as ae,
4641
+ R as af,
4642
+ H as ag,
4643
+ Zo as ah,
4644
+ xt as ai,
4645
+ ca as aj,
4646
+ Na as ak,
4647
+ Oa as al,
4648
+ aa as am,
4649
+ Ma as an,
4650
+ la as ao,
4651
+ Jo as ap,
4652
+ Ua as aq,
4653
+ P as ar,
4654
+ er as as,
4655
+ Io as at,
4656
+ T as au,
4657
+ ce as av,
4658
+ ua as aw,
4659
+ ir as ax,
4660
+ da as ay,
4661
+ rr as az,
4662
+ os as b,
4663
+ Bo as b0,
4664
+ ot as b1,
4665
+ zt as b2,
4666
+ ba as b3,
4667
+ ar as b4,
4668
+ Sa as b5,
4669
+ cr as b6,
4670
+ Ia as b7,
4671
+ lr as b8,
4672
+ nr as b9,
4673
+ pr as bA,
4674
+ l as bB,
4675
+ ti as bC,
4676
+ Uo as bD,
4677
+ ei as bE,
4678
+ Co as bF,
4679
+ ni as bG,
4680
+ Fo as bH,
4681
+ Zn as bI,
4682
+ No as bJ,
4683
+ on as bK,
4684
+ wr as bL,
4685
+ Fa as bM,
4686
+ qo as bN,
4687
+ La as bO,
4688
+ sn as bP,
4689
+ Ea as bQ,
4690
+ Ca as bR,
4691
+ Dr as bS,
4692
+ Ar as ba,
4693
+ Lo as bb,
4694
+ Eo as bc,
4695
+ se as bd,
4696
+ Vo as be,
4697
+ Ta as bf,
4698
+ ko as bg,
4699
+ xo as bh,
4700
+ Xe as bi,
4701
+ Ot as bj,
4702
+ pa as bk,
4703
+ Ir as bl,
4704
+ ya as bm,
4705
+ br as bn,
4706
+ fa as bo,
4707
+ Sr as bp,
4708
+ ha as bq,
4709
+ vr as br,
4710
+ Tt as bs,
4711
+ ma as bt,
4712
+ gr as bu,
4713
+ ms as bv,
4714
+ fr as bw,
4715
+ va as bx,
4716
+ mr as by,
4717
+ ga as bz,
4718
+ Qr as c,
4719
+ ta as d,
4720
+ W as e,
4721
+ Me as f,
4722
+ Qt as g,
4723
+ Y as h,
4724
+ yn as i,
4725
+ jr as j,
4726
+ Ie as k,
4727
+ hn as l,
4728
+ dn as m,
4729
+ Ae as n,
4730
+ we as o,
4731
+ fn as p,
4732
+ Vt as q,
4733
+ Dt as r,
4734
+ Et as s,
4735
+ N as t,
4736
+ At as u,
4737
+ wt as v,
4738
+ Jt as w,
4739
+ pn as x,
4740
+ Lt as y,
4741
+ tt as z
4742
+ };