@duckdb/duckdb-wasm 1.10.0 → 1.11.1-dev.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +94 -47
- package/dist/duckdb-browser-blocking.cjs +25 -0
- package/dist/duckdb-browser-blocking.cjs.map +7 -0
- package/dist/duckdb-browser-blocking.d.ts +1 -0
- package/dist/duckdb-browser-blocking.mjs +25 -0
- package/dist/duckdb-browser-blocking.mjs.map +7 -0
- package/dist/duckdb-browser-coi.pthread.worker.js +27 -0
- package/dist/duckdb-browser-coi.pthread.worker.js.map +7 -0
- package/dist/duckdb-browser-coi.worker.js +35 -0
- package/dist/duckdb-browser-coi.worker.js.map +7 -0
- package/dist/duckdb-browser-eh.worker.js +33 -0
- package/dist/duckdb-browser-eh.worker.js.map +7 -0
- package/dist/duckdb-browser-mvp.worker.js +33 -0
- package/dist/duckdb-browser-mvp.worker.js.map +7 -0
- package/dist/duckdb-browser.cjs +2 -0
- package/dist/duckdb-browser.cjs.map +7 -0
- package/dist/duckdb-browser.d.ts +1 -0
- package/dist/duckdb-browser.mjs +2 -0
- package/dist/duckdb-browser.mjs.map +7 -0
- package/dist/{duckdb-next-coi.wasm → duckdb-coi.wasm} +0 -0
- package/dist/{duckdb.wasm → duckdb-eh.wasm} +0 -0
- package/dist/duckdb-mvp.wasm +0 -0
- package/dist/duckdb-node-blocking.cjs +37 -0
- package/dist/duckdb-node-blocking.cjs.map +7 -0
- package/dist/duckdb-node-blocking.d.ts +1 -0
- package/dist/duckdb-node-eh.worker.cjs +37 -0
- package/dist/duckdb-node-eh.worker.cjs.map +7 -0
- package/dist/duckdb-node-mvp.worker.cjs +36 -0
- package/dist/duckdb-node-mvp.worker.cjs.map +7 -0
- package/dist/duckdb-node.cjs +2 -0
- package/dist/duckdb-node.cjs.map +7 -0
- package/dist/duckdb-node.d.ts +1 -0
- package/dist/img/duckdb.svg +6 -0
- package/dist/img/duckdb_version_badge.svg +1 -0
- package/dist/img/duckdb_wasm.svg +14 -0
- package/dist/tests-browser.js +20661 -19449
- package/dist/tests-browser.js.map +4 -4
- package/dist/tests-node.cjs +17258 -0
- package/dist/tests-node.cjs.map +7 -0
- package/dist/types/src/bindings/bindings_base.d.ts +30 -8
- package/dist/types/src/bindings/{bindings_browser_next.d.ts → bindings_browser_coi.d.ts} +0 -0
- package/dist/types/src/bindings/{bindings_browser_next_coi.d.ts → bindings_browser_eh.d.ts} +0 -0
- package/dist/types/src/bindings/{bindings_browser.d.ts → bindings_browser_mvp.d.ts} +0 -0
- package/dist/types/src/bindings/bindings_interface.d.ts +13 -5
- package/dist/types/src/bindings/{bindings_node_next.d.ts → bindings_node_eh.d.ts} +0 -0
- package/dist/types/src/bindings/{bindings_node.d.ts → bindings_node_mvp.d.ts} +0 -0
- package/dist/types/src/bindings/config.d.ts +43 -2
- package/dist/types/src/bindings/connection.d.ts +7 -7
- package/dist/types/src/bindings/index.d.ts +1 -1
- package/dist/types/src/bindings/insert_options.d.ts +3 -3
- package/dist/types/src/bindings/progress.d.ts +9 -0
- package/dist/types/src/bindings/runtime.d.ts +41 -10
- package/dist/types/src/bindings/runtime_browser.d.ts +5 -3
- package/dist/types/src/bindings/runtime_node.d.ts +2 -1
- package/dist/types/src/bindings/udf_function.d.ts +14 -0
- package/dist/types/src/bindings/udf_runtime.d.ts +3 -0
- package/dist/types/src/bindings/web_file.d.ts +11 -0
- package/dist/types/src/index.d.ts +1 -0
- package/dist/types/src/json_typedef.d.ts +17 -0
- package/dist/types/src/log.d.ts +5 -2
- package/dist/types/src/parallel/async_bindings.d.ts +19 -6
- package/dist/types/src/parallel/async_bindings_interface.d.ts +6 -3
- package/dist/types/src/parallel/async_connection.d.ts +4 -6
- package/dist/types/src/parallel/worker_dispatcher.d.ts +2 -1
- package/dist/types/src/parallel/worker_request.d.ts +18 -7
- package/dist/types/src/platform.d.ts +6 -3
- package/dist/types/src/targets/duckdb-browser-blocking.d.ts +12 -0
- package/dist/types/src/targets/{duckdb-browser-async-next-coi.pthread.worker.d.ts → duckdb-browser-coi.pthread.worker.d.ts} +0 -0
- package/dist/types/src/targets/{duckdb-browser-async-next-coi.worker.d.ts → duckdb-browser-coi.worker.d.ts} +0 -0
- package/dist/types/src/targets/{duckdb-browser-async-next.worker.d.ts → duckdb-browser-eh.worker.d.ts} +0 -0
- package/dist/types/src/targets/{duckdb-browser-async.worker.d.ts → duckdb-browser-mvp.worker.d.ts} +0 -0
- package/dist/types/src/targets/duckdb-node-blocking.d.ts +13 -0
- package/dist/types/src/targets/{duckdb-node-async-next.worker.d.ts → duckdb-node-eh.worker.d.ts} +0 -0
- package/dist/types/src/targets/{duckdb-node-async.worker.d.ts → duckdb-node-mvp.worker.d.ts} +0 -0
- package/dist/types/src/targets/duckdb.d.ts +8 -0
- package/dist/types/src/utils/index.d.ts +1 -1
- package/dist/types/src/utils/s3_helper.d.ts +27 -0
- package/dist/types/src/worker.d.ts +1 -0
- package/package.json +108 -44
- package/dist/duckdb-browser-async-next-coi.d.ts +0 -1
- package/dist/duckdb-browser-async-next-coi.pthread.worker.js +0 -4
- package/dist/duckdb-browser-async-next-coi.pthread.worker.js.map +0 -7
- package/dist/duckdb-browser-async-next-coi.worker.js +0 -19
- package/dist/duckdb-browser-async-next-coi.worker.js.map +0 -7
- package/dist/duckdb-browser-async-next.d.ts +0 -1
- package/dist/duckdb-browser-async-next.worker.js +0 -19
- package/dist/duckdb-browser-async-next.worker.js.map +0 -7
- package/dist/duckdb-browser-async.d.ts +0 -1
- package/dist/duckdb-browser-async.js +0 -18
- package/dist/duckdb-browser-async.js.map +0 -7
- package/dist/duckdb-browser-async.worker.js +0 -19
- package/dist/duckdb-browser-async.worker.js.map +0 -7
- package/dist/duckdb-browser-sync-next.d.ts +0 -1
- package/dist/duckdb-browser-sync-next.js +0 -19
- package/dist/duckdb-browser-sync-next.js.map +0 -7
- package/dist/duckdb-browser-sync.d.ts +0 -1
- package/dist/duckdb-browser-sync.js +0 -19
- package/dist/duckdb-browser-sync.js.map +0 -7
- package/dist/duckdb-esm.d.ts +0 -1
- package/dist/duckdb-esm.js +0 -2
- package/dist/duckdb-esm.js.map +0 -7
- package/dist/duckdb-next.wasm +0 -0
- package/dist/duckdb-node-async-next.worker.js +0 -4
- package/dist/duckdb-node-async-next.worker.js.map +0 -7
- package/dist/duckdb-node-async.d.ts +0 -1
- package/dist/duckdb-node-async.js +0 -2
- package/dist/duckdb-node-async.js.map +0 -7
- package/dist/duckdb-node-async.worker.js +0 -3
- package/dist/duckdb-node-async.worker.js.map +0 -7
- package/dist/duckdb-node-sync-next.d.ts +0 -1
- package/dist/duckdb-node-sync-next.js +0 -4
- package/dist/duckdb-node-sync-next.js.map +0 -7
- package/dist/duckdb-node-sync.d.ts +0 -1
- package/dist/duckdb-node-sync.js +0 -3
- package/dist/duckdb-node-sync.js.map +0 -7
- package/dist/tests-node.js +0 -152
- package/dist/tests-node.js.map +0 -7
- package/dist/types/src/bindings/insert.d.ts +0 -7
- package/dist/types/src/flat_arrow.d.ts +0 -14
- package/dist/types/src/targets/duckdb-browser-async.d.ts +0 -4
- package/dist/types/src/targets/duckdb-browser-sync-next.d.ts +0 -6
- package/dist/types/src/targets/duckdb-browser-sync.d.ts +0 -6
- package/dist/types/src/targets/duckdb-esm.d.ts +0 -1
- package/dist/types/src/targets/duckdb-node-async.d.ts +0 -4
- package/dist/types/src/targets/duckdb-node-sync-next.d.ts +0 -6
- package/dist/types/src/targets/duckdb-node-sync.d.ts +0 -6
- package/dist/types/src/utils/ipc_buffer.d.ts +0 -4
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
var duckdb=(()=>{var l1=Object.create;var Rs=Object.defineProperty;var d1=Object.getOwnPropertyDescriptor;var f1=Object.getOwnPropertyNames;var h1=Object.getPrototypeOf,p1=Object.prototype.hasOwnProperty;var ny=r=>Rs(r,"__esModule",{value:!0});var V=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),y1=(r,e)=>{ny(r);for(var t in e)Rs(r,t,{get:e[t],enumerable:!0})},m1=(r,e,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of f1(e))!p1.call(r,i)&&i!=="default"&&Rs(r,i,{get:()=>e[i],enumerable:!(t=d1(e,i))||t.enumerable});return r},eu=r=>m1(ny(Rs(r!=null?l1(h1(r)):{},"default",r&&r.__esModule&&"default"in r?{get:()=>r.default,enumerable:!0}:{value:r,enumerable:!0})),r);var Mi=V(oy=>{var F={};F.Offset;F.Table;F.SIZEOF_SHORT=2;F.SIZEOF_INT=4;F.FILE_IDENTIFIER_LENGTH=4;F.Encoding={UTF8_BYTES:1,UTF16_STRING:2};F.int32=new Int32Array(2);F.float32=new Float32Array(F.int32.buffer);F.float64=new Float64Array(F.int32.buffer);F.isLittleEndian=new Uint16Array(new Uint8Array([1,0]).buffer)[0]===1;F.Long=function(r,e){this.low=r|0,this.high=e|0};F.Long.create=function(r,e){return r==0&&e==0?F.Long.ZERO:new F.Long(r,e)};F.Long.prototype.toFloat64=function(){return(this.low>>>0)+this.high*4294967296};F.Long.prototype.equals=function(r){return this.low==r.low&&this.high==r.high};F.Long.ZERO=new F.Long(0,0);F.Builder=function(r){if(r)var e=r;else var e=1024;this.bb=F.ByteBuffer.allocate(e),this.space=e,this.minalign=1,this.vtable=null,this.vtable_in_use=0,this.isNested=!1,this.object_start=0,this.vtables=[],this.vector_num_elems=0,this.force_defaults=!1};F.Builder.prototype.clear=function(){this.bb.clear(),this.space=this.bb.capacity(),this.minalign=1,this.vtable=null,this.vtable_in_use=0,this.isNested=!1,this.object_start=0,this.vtables=[],this.vector_num_elems=0,this.force_defaults=!1};F.Builder.prototype.forceDefaults=function(r){this.force_defaults=r};F.Builder.prototype.dataBuffer=function(){return this.bb};F.Builder.prototype.asUint8Array=function(){return this.bb.bytes().subarray(this.bb.position(),this.bb.position()+this.offset())};F.Builder.prototype.prep=function(r,e){r>this.minalign&&(this.minalign=r);for(var t=~(this.bb.capacity()-this.space+e)+1&r-1;this.space<t+r+e;){var i=this.bb.capacity();this.bb=F.Builder.growByteBuffer(this.bb),this.space+=this.bb.capacity()-i}this.pad(t)};F.Builder.prototype.pad=function(r){for(var e=0;e<r;e++)this.bb.writeInt8(--this.space,0)};F.Builder.prototype.writeInt8=function(r){this.bb.writeInt8(this.space-=1,r)};F.Builder.prototype.writeInt16=function(r){this.bb.writeInt16(this.space-=2,r)};F.Builder.prototype.writeInt32=function(r){this.bb.writeInt32(this.space-=4,r)};F.Builder.prototype.writeInt64=function(r){this.bb.writeInt64(this.space-=8,r)};F.Builder.prototype.writeFloat32=function(r){this.bb.writeFloat32(this.space-=4,r)};F.Builder.prototype.writeFloat64=function(r){this.bb.writeFloat64(this.space-=8,r)};F.Builder.prototype.addInt8=function(r){this.prep(1,0),this.writeInt8(r)};F.Builder.prototype.addInt16=function(r){this.prep(2,0),this.writeInt16(r)};F.Builder.prototype.addInt32=function(r){this.prep(4,0),this.writeInt32(r)};F.Builder.prototype.addInt64=function(r){this.prep(8,0),this.writeInt64(r)};F.Builder.prototype.addFloat32=function(r){this.prep(4,0),this.writeFloat32(r)};F.Builder.prototype.addFloat64=function(r){this.prep(8,0),this.writeFloat64(r)};F.Builder.prototype.addFieldInt8=function(r,e,t){(this.force_defaults||e!=t)&&(this.addInt8(e),this.slot(r))};F.Builder.prototype.addFieldInt16=function(r,e,t){(this.force_defaults||e!=t)&&(this.addInt16(e),this.slot(r))};F.Builder.prototype.addFieldInt32=function(r,e,t){(this.force_defaults||e!=t)&&(this.addInt32(e),this.slot(r))};F.Builder.prototype.addFieldInt64=function(r,e,t){(this.force_defaults||!e.equals(t))&&(this.addInt64(e),this.slot(r))};F.Builder.prototype.addFieldFloat32=function(r,e,t){(this.force_defaults||e!=t)&&(this.addFloat32(e),this.slot(r))};F.Builder.prototype.addFieldFloat64=function(r,e,t){(this.force_defaults||e!=t)&&(this.addFloat64(e),this.slot(r))};F.Builder.prototype.addFieldOffset=function(r,e,t){(this.force_defaults||e!=t)&&(this.addOffset(e),this.slot(r))};F.Builder.prototype.addFieldStruct=function(r,e,t){e!=t&&(this.nested(e),this.slot(r))};F.Builder.prototype.nested=function(r){if(r!=this.offset())throw new Error("FlatBuffers: struct must be serialized inline.")};F.Builder.prototype.notNested=function(){if(this.isNested)throw new Error("FlatBuffers: object serialization must not be nested.")};F.Builder.prototype.slot=function(r){this.vtable[r]=this.offset()};F.Builder.prototype.offset=function(){return this.bb.capacity()-this.space};F.Builder.growByteBuffer=function(r){var e=r.capacity();if(e&3221225472)throw new Error("FlatBuffers: cannot grow buffer beyond 2 gigabytes.");var t=e<<1,i=F.ByteBuffer.allocate(t);return i.setPosition(t-e),i.bytes().set(r.bytes(),t-e),i};F.Builder.prototype.addOffset=function(r){this.prep(F.SIZEOF_INT,0),this.writeInt32(this.offset()-r+F.SIZEOF_INT)};F.Builder.prototype.startObject=function(r){this.notNested(),this.vtable==null&&(this.vtable=[]),this.vtable_in_use=r;for(var e=0;e<r;e++)this.vtable[e]=0;this.isNested=!0,this.object_start=this.offset()};F.Builder.prototype.endObject=function(){if(this.vtable==null||!this.isNested)throw new Error("FlatBuffers: endObject called without startObject");this.addInt32(0);for(var r=this.offset(),e=this.vtable_in_use-1;e>=0&&this.vtable[e]==0;e--);for(var t=e+1;e>=0;e--)this.addInt16(this.vtable[e]!=0?r-this.vtable[e]:0);var i=2;this.addInt16(r-this.object_start);var n=(t+i)*F.SIZEOF_SHORT;this.addInt16(n);var a=0,c=this.space;e:for(e=0;e<this.vtables.length;e++){var f=this.bb.capacity()-this.vtables[e];if(n==this.bb.readInt16(f)){for(var w=F.SIZEOF_SHORT;w<n;w+=F.SIZEOF_SHORT)if(this.bb.readInt16(c+w)!=this.bb.readInt16(f+w))continue e;a=this.vtables[e];break}}return a?(this.space=this.bb.capacity()-r,this.bb.writeInt32(this.space,a-r)):(this.vtables.push(this.offset()),this.bb.writeInt32(this.bb.capacity()-r,this.offset()-r)),this.isNested=!1,r};F.Builder.prototype.finish=function(r,e){if(e){var t=e;if(this.prep(this.minalign,F.SIZEOF_INT+F.FILE_IDENTIFIER_LENGTH),t.length!=F.FILE_IDENTIFIER_LENGTH)throw new Error("FlatBuffers: file identifier must be length "+F.FILE_IDENTIFIER_LENGTH);for(var i=F.FILE_IDENTIFIER_LENGTH-1;i>=0;i--)this.writeInt8(t.charCodeAt(i))}this.prep(this.minalign,F.SIZEOF_INT),this.addOffset(r),this.bb.setPosition(this.space)};F.Builder.prototype.requiredField=function(r,e){var t=this.bb.capacity()-r,i=t-this.bb.readInt32(t),n=this.bb.readInt16(i+e)!=0;if(!n)throw new Error("FlatBuffers: field "+e+" must be set")};F.Builder.prototype.startVector=function(r,e,t){this.notNested(),this.vector_num_elems=e,this.prep(F.SIZEOF_INT,r*e),this.prep(t,r*e)};F.Builder.prototype.endVector=function(){return this.writeInt32(this.vector_num_elems),this.offset()};F.Builder.prototype.createString=function(r){if(r instanceof Uint8Array)var e=r;else for(var e=[],t=0;t<r.length;){var i,n=r.charCodeAt(t++);if(n<55296||n>=56320)i=n;else{var a=r.charCodeAt(t++);i=(n<<10)+a+(65536-(55296<<10)-56320)}i<128?e.push(i):(i<2048?e.push(i>>6&31|192):(i<65536?e.push(i>>12&15|224):e.push(i>>18&7|240,i>>12&63|128),e.push(i>>6&63|128)),e.push(i&63|128))}this.addInt8(0),this.startVector(1,e.length,1),this.bb.setPosition(this.space-=e.length);for(var t=0,c=this.space,f=this.bb.bytes();t<e.length;t++)f[c++]=e[t];return this.endVector()};F.Builder.prototype.createLong=function(r,e){return F.Long.create(r,e)};F.ByteBuffer=function(r){this.bytes_=r,this.position_=0};F.ByteBuffer.allocate=function(r){return new F.ByteBuffer(new Uint8Array(r))};F.ByteBuffer.prototype.clear=function(){this.position_=0};F.ByteBuffer.prototype.bytes=function(){return this.bytes_};F.ByteBuffer.prototype.position=function(){return this.position_};F.ByteBuffer.prototype.setPosition=function(r){this.position_=r};F.ByteBuffer.prototype.capacity=function(){return this.bytes_.length};F.ByteBuffer.prototype.readInt8=function(r){return this.readUint8(r)<<24>>24};F.ByteBuffer.prototype.readUint8=function(r){return this.bytes_[r]};F.ByteBuffer.prototype.readInt16=function(r){return this.readUint16(r)<<16>>16};F.ByteBuffer.prototype.readUint16=function(r){return this.bytes_[r]|this.bytes_[r+1]<<8};F.ByteBuffer.prototype.readInt32=function(r){return this.bytes_[r]|this.bytes_[r+1]<<8|this.bytes_[r+2]<<16|this.bytes_[r+3]<<24};F.ByteBuffer.prototype.readUint32=function(r){return this.readInt32(r)>>>0};F.ByteBuffer.prototype.readInt64=function(r){return new F.Long(this.readInt32(r),this.readInt32(r+4))};F.ByteBuffer.prototype.readUint64=function(r){return new F.Long(this.readUint32(r),this.readUint32(r+4))};F.ByteBuffer.prototype.readFloat32=function(r){return F.int32[0]=this.readInt32(r),F.float32[0]};F.ByteBuffer.prototype.readFloat64=function(r){return F.int32[F.isLittleEndian?0:1]=this.readInt32(r),F.int32[F.isLittleEndian?1:0]=this.readInt32(r+4),F.float64[0]};F.ByteBuffer.prototype.writeInt8=function(r,e){this.bytes_[r]=e};F.ByteBuffer.prototype.writeUint8=function(r,e){this.bytes_[r]=e};F.ByteBuffer.prototype.writeInt16=function(r,e){this.bytes_[r]=e,this.bytes_[r+1]=e>>8};F.ByteBuffer.prototype.writeUint16=function(r,e){this.bytes_[r]=e,this.bytes_[r+1]=e>>8};F.ByteBuffer.prototype.writeInt32=function(r,e){this.bytes_[r]=e,this.bytes_[r+1]=e>>8,this.bytes_[r+2]=e>>16,this.bytes_[r+3]=e>>24};F.ByteBuffer.prototype.writeUint32=function(r,e){this.bytes_[r]=e,this.bytes_[r+1]=e>>8,this.bytes_[r+2]=e>>16,this.bytes_[r+3]=e>>24};F.ByteBuffer.prototype.writeInt64=function(r,e){this.writeInt32(r,e.low),this.writeInt32(r+4,e.high)};F.ByteBuffer.prototype.writeUint64=function(r,e){this.writeUint32(r,e.low),this.writeUint32(r+4,e.high)};F.ByteBuffer.prototype.writeFloat32=function(r,e){F.float32[0]=e,this.writeInt32(r,F.int32[0])};F.ByteBuffer.prototype.writeFloat64=function(r,e){F.float64[0]=e,this.writeInt32(r,F.int32[F.isLittleEndian?0:1]),this.writeInt32(r+4,F.int32[F.isLittleEndian?1:0])};F.ByteBuffer.prototype.getBufferIdentifier=function(){if(this.bytes_.length<this.position_+F.SIZEOF_INT+F.FILE_IDENTIFIER_LENGTH)throw new Error("FlatBuffers: ByteBuffer is too short to contain an identifier.");for(var r="",e=0;e<F.FILE_IDENTIFIER_LENGTH;e++)r+=String.fromCharCode(this.readInt8(this.position_+F.SIZEOF_INT+e));return r};F.ByteBuffer.prototype.__offset=function(r,e){var t=r-this.readInt32(r);return e<this.readInt16(t)?this.readInt16(t+e):0};F.ByteBuffer.prototype.__union=function(r,e){return r.bb_pos=e+this.readInt32(e),r.bb=this,r};F.ByteBuffer.prototype.__string=function(r,e){r+=this.readInt32(r);var t=this.readInt32(r),i="",n=0;if(r+=F.SIZEOF_INT,e===F.Encoding.UTF8_BYTES)return this.bytes_.subarray(r,r+t);for(;n<t;){var a,c=this.readUint8(r+n++);if(c<192)a=c;else{var f=this.readUint8(r+n++);if(c<224)a=(c&31)<<6|f&63;else{var w=this.readUint8(r+n++);if(c<240)a=(c&15)<<12|(f&63)<<6|w&63;else{var s=this.readUint8(r+n++);a=(c&7)<<18|(f&63)<<12|(w&63)<<6|s&63}}}a<65536?i+=String.fromCharCode(a):(a-=65536,i+=String.fromCharCode((a>>10)+55296,(a&(1<<10)-1)+56320))}return i};F.ByteBuffer.prototype.__indirect=function(r){return r+this.readInt32(r)};F.ByteBuffer.prototype.__vector=function(r){return r+this.readInt32(r)+F.SIZEOF_INT};F.ByteBuffer.prototype.__vector_len=function(r){return this.readInt32(r+this.readInt32(r))};F.ByteBuffer.prototype.__has_identifier=function(r){if(r.length!=F.FILE_IDENTIFIER_LENGTH)throw new Error("FlatBuffers: file identifier must be length "+F.FILE_IDENTIFIER_LENGTH);for(var e=0;e<F.FILE_IDENTIFIER_LENGTH;e++)if(r.charCodeAt(e)!=this.readInt8(this.position_+F.SIZEOF_INT+e))return!1;return!0};F.ByteBuffer.prototype.createLong=function(r,e){return F.Long.create(r,e)};oy.flatbuffers=F});var uy=V(iu=>{"use strict";function hr(r,e,t){return e<=r&&r<=t}function Ns(r){if(r===void 0)return{};if(r===Object(r))return r;throw TypeError("Could not convert argument to dictionary")}function j1(r){for(var e=String(r),t=e.length,i=0,n=[];i<t;){var a=e.charCodeAt(i);if(a<55296||a>57343)n.push(a);else if(56320<=a&&a<=57343)n.push(65533);else if(55296<=a&&a<=56319)if(i===t-1)n.push(65533);else{var c=r.charCodeAt(i+1);if(56320<=c&&c<=57343){var f=a&1023,w=c&1023;n.push(65536+(f<<10)+w),i+=1}else n.push(65533)}i+=1}return n}function w1(r){for(var e="",t=0;t<r.length;++t){var i=r[t];i<=65535?e+=String.fromCharCode(i):(i-=65536,e+=String.fromCharCode((i>>10)+55296,(i&1023)+56320))}return e}var xs=-1;function tu(r){this.tokens=[].slice.call(r)}tu.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():xs},prepend:function(r){if(Array.isArray(r))for(var e=r;e.length;)this.tokens.unshift(e.pop());else this.tokens.unshift(r)},push:function(r){if(Array.isArray(r))for(var e=r;e.length;)this.tokens.push(e.shift());else this.tokens.push(r)}};var Ui=-1;function ru(r,e){if(r)throw TypeError("Decoder error");return e||65533}var Es="utf-8";function Ls(r,e){if(!(this instanceof Ls))return new Ls(r,e);if(r=r!==void 0?String(r).toLowerCase():Es,r!==Es)throw new Error("Encoding not supported. Only utf-8 is supported");e=Ns(e),this._streaming=!1,this._BOMseen=!1,this._decoder=null,this._fatal=Boolean(e.fatal),this._ignoreBOM=Boolean(e.ignoreBOM),Object.defineProperty(this,"encoding",{value:"utf-8"}),Object.defineProperty(this,"fatal",{value:this._fatal}),Object.defineProperty(this,"ignoreBOM",{value:this._ignoreBOM})}Ls.prototype={decode:function(e,t){var i;typeof e=="object"&&e instanceof ArrayBuffer?i=new Uint8Array(e):typeof e=="object"&&"buffer"in e&&e.buffer instanceof ArrayBuffer?i=new Uint8Array(e.buffer,e.byteOffset,e.byteLength):i=new Uint8Array(0),t=Ns(t),this._streaming||(this._decoder=new B1({fatal:this._fatal}),this._BOMseen=!1),this._streaming=Boolean(t.stream);for(var n=new tu(i),a=[],c;!n.endOfStream()&&(c=this._decoder.handler(n,n.read()),c!==Ui);)c!==null&&(Array.isArray(c)?a.push.apply(a,c):a.push(c));if(!this._streaming){do{if(c=this._decoder.handler(n,n.read()),c===Ui)break;c!==null&&(Array.isArray(c)?a.push.apply(a,c):a.push(c))}while(!n.endOfStream());this._decoder=null}return a.length&&["utf-8"].indexOf(this.encoding)!==-1&&!this._ignoreBOM&&!this._BOMseen&&(a[0]===65279?(this._BOMseen=!0,a.shift()):this._BOMseen=!0),w1(a)}};function qs(r,e){if(!(this instanceof qs))return new qs(r,e);if(r=r!==void 0?String(r).toLowerCase():Es,r!==Es)throw new Error("Encoding not supported. Only utf-8 is supported");e=Ns(e),this._streaming=!1,this._encoder=null,this._options={fatal:Boolean(e.fatal)},Object.defineProperty(this,"encoding",{value:"utf-8"})}qs.prototype={encode:function(e,t){e=e?String(e):"",t=Ns(t),this._streaming||(this._encoder=new T1(this._options)),this._streaming=Boolean(t.stream);for(var i=[],n=new tu(j1(e)),a;!n.endOfStream()&&(a=this._encoder.handler(n,n.read()),a!==Ui);)Array.isArray(a)?i.push.apply(i,a):i.push(a);if(!this._streaming){for(;a=this._encoder.handler(n,n.read()),a!==Ui;)Array.isArray(a)?i.push.apply(i,a):i.push(a);this._encoder=null}return new Uint8Array(i)}};function B1(r){var e=r.fatal,t=0,i=0,n=0,a=128,c=191;this.handler=function(f,w){if(w===xs&&n!==0)return n=0,ru(e);if(w===xs)return Ui;if(n===0){if(hr(w,0,127))return w;if(hr(w,194,223))n=1,t=w-192;else if(hr(w,224,239))w===224&&(a=160),w===237&&(c=159),n=2,t=w-224;else if(hr(w,240,244))w===240&&(a=144),w===244&&(c=143),n=3,t=w-240;else return ru(e);return t=t<<6*n,null}if(!hr(w,a,c))return t=n=i=0,a=128,c=191,f.prepend(w),ru(e);if(a=128,c=191,i+=1,t+=w-128<<6*(n-i),i!==n)return null;var s=t;return t=n=i=0,s}}function T1(r){var e=r.fatal;this.handler=function(t,i){if(i===xs)return Ui;if(hr(i,0,127))return i;var n,a;hr(i,128,2047)?(n=1,a=192):hr(i,2048,65535)?(n=2,a=224):hr(i,65536,1114111)&&(n=3,a=240);for(var c=[(i>>6*n)+a];n>0;){var f=i>>6*(n-1);c.push(128|f&63),n-=1}return c}}iu.TextEncoder=qs;iu.TextDecoder=Ls});var ci=V(Ci=>{"use strict";Object.defineProperty(Ci,"__esModule",{value:!0});Ci.encodeUtf8=Ci.decodeUtf8=void 0;var cy=Pe(),ly=uy(),zs=typeof Buffer=="function"?Buffer:null,dy=typeof TextDecoder=="function"&&typeof TextEncoder=="function";Ci.decodeUtf8=(r=>{if(dy||!zs){let e=new r("utf-8");return t=>e.decode(t)}return e=>{let{buffer:t,byteOffset:i,length:n}=cy.toUint8Array(e);return zs.from(t,i,n).toString()}})(typeof TextDecoder!="undefined"?TextDecoder:ly.TextDecoder);Ci.encodeUtf8=(r=>{if(dy||!zs){let e=new r;return t=>e.encode(t)}return(e="")=>cy.toUint8Array(zs.from(e,"utf8"))})(typeof TextEncoder!="undefined"?TextEncoder:ly.TextEncoder)});var Vi=V(dt=>{"use strict";Object.defineProperty(dt,"__esModule",{value:!0});dt.AsyncQueue=dt.ReadableInterop=dt.ArrowJSON=dt.ITERATOR_DONE=void 0;var fy=kn();dt.ITERATOR_DONE=Object.freeze({done:!0,value:void 0});var hy=class{constructor(e){this._json=e}get schema(){return this._json.schema}get batches(){return this._json.batches||[]}get dictionaries(){return this._json.dictionaries||[]}};dt.ArrowJSON=hy;var nu=class{tee(){return this._getDOMStream().tee()}pipe(e,t){return this._getNodeStream().pipe(e,t)}pipeTo(e,t){return this._getDOMStream().pipeTo(e,t)}pipeThrough(e,t){return this._getDOMStream().pipeThrough(e,t)}_getDOMStream(){return this._DOMStream||(this._DOMStream=this.toDOMStream())}_getNodeStream(){return this._nodeStream||(this._nodeStream=this.toNodeStream())}};dt.ReadableInterop=nu;var py=class extends nu{constructor(){super();this._values=[],this.resolvers=[],this._closedPromise=new Promise(e=>this._closedPromiseResolve=e)}get closed(){return this._closedPromise}async cancel(e){await this.return(e)}write(e){this._ensureOpen()&&(this.resolvers.length<=0?this._values.push(e):this.resolvers.shift().resolve({done:!1,value:e}))}abort(e){this._closedPromiseResolve&&(this.resolvers.length<=0?this._error={error:e}:this.resolvers.shift().reject({done:!0,value:e}))}close(){if(this._closedPromiseResolve){let{resolvers:e}=this;for(;e.length>0;)e.shift().resolve(dt.ITERATOR_DONE);this._closedPromiseResolve(),this._closedPromiseResolve=void 0}}[Symbol.asyncIterator](){return this}toDOMStream(e){return fy.default.toDOMStream(this._closedPromiseResolve||this._error?this:this._values,e)}toNodeStream(e){return fy.default.toNodeStream(this._closedPromiseResolve||this._error?this:this._values,e)}async throw(e){return await this.abort(e),dt.ITERATOR_DONE}async return(e){return await this.close(),dt.ITERATOR_DONE}async read(e){return(await this.next(e,"read")).value}async peek(e){return(await this.next(e,"peek")).value}next(...e){return this._values.length>0?Promise.resolve({done:!1,value:this._values.shift()}):this._error?Promise.reject({done:!0,value:this._error.error}):this._closedPromiseResolve?new Promise((t,i)=>{this.resolvers.push({resolve:t,reject:i})}):Promise.resolve(dt.ITERATOR_DONE)}_ensureOpen(){if(this._closedPromiseResolve)return!0;throw new Error(`${this} is closed`)}};dt.AsyncQueue=py});var nt=V(z=>{"use strict";Object.defineProperty(z,"__esModule",{value:!0});z.isReadableNodeStream=z.isWritableNodeStream=z.isReadableDOMStream=z.isWritableDOMStream=z.isFetchResponse=z.isFSReadStream=z.isFileHandle=z.isUnderlyingSink=z.isIteratorResult=z.isArrayLike=z.isArrowJSON=z.isAsyncIterable=z.isIterable=z.isObservable=z.isPromise=z.isObject=z.BigUint64ArrayAvailable=z.BigUint64Array=z.BigInt64ArrayAvailable=z.BigInt64Array=z.BigIntAvailable=z.BigInt=void 0;var Ws=Vi(),[I1,S1]=(()=>{let r=()=>{throw new Error("BigInt is not available in this environment")};function e(){throw r()}return e.asIntN=()=>{throw r()},e.asUintN=()=>{throw r()},typeof BigInt!="undefined"?[BigInt,!0]:[e,!1]})();z.BigInt=I1;z.BigIntAvailable=S1;var[D1,O1]=(()=>{let r=()=>{throw new Error("BigInt64Array is not available in this environment")};class e{static get BYTES_PER_ELEMENT(){return 8}static of(){throw r()}static from(){throw r()}constructor(){throw r()}}return typeof BigInt64Array!="undefined"?[BigInt64Array,!0]:[e,!1]})();z.BigInt64Array=D1;z.BigInt64ArrayAvailable=O1;var[A1,F1]=(()=>{let r=()=>{throw new Error("BigUint64Array is not available in this environment")};class e{static get BYTES_PER_ELEMENT(){return 8}static of(){throw r()}static from(){throw r()}constructor(){throw r()}}return typeof BigUint64Array!="undefined"?[BigUint64Array,!0]:[e,!1]})();z.BigUint64Array=A1;z.BigUint64ArrayAvailable=F1;var su=r=>typeof r=="number",yy=r=>typeof r=="boolean",Ze=r=>typeof r=="function";z.isObject=r=>r!=null&&Object(r)===r;z.isPromise=r=>z.isObject(r)&&Ze(r.then);z.isObservable=r=>z.isObject(r)&&Ze(r.subscribe);z.isIterable=r=>z.isObject(r)&&Ze(r[Symbol.iterator]);z.isAsyncIterable=r=>z.isObject(r)&&Ze(r[Symbol.asyncIterator]);z.isArrowJSON=r=>z.isObject(r)&&z.isObject(r.schema);z.isArrayLike=r=>z.isObject(r)&&su(r.length);z.isIteratorResult=r=>z.isObject(r)&&"done"in r&&"value"in r;z.isUnderlyingSink=r=>z.isObject(r)&&Ze(r.abort)&&Ze(r.close)&&Ze(r.start)&&Ze(r.write);z.isFileHandle=r=>z.isObject(r)&&Ze(r.stat)&&su(r.fd);z.isFSReadStream=r=>z.isReadableNodeStream(r)&&su(r.bytesRead);z.isFetchResponse=r=>z.isObject(r)&&z.isReadableDOMStream(r.body);z.isWritableDOMStream=r=>z.isObject(r)&&Ze(r.abort)&&Ze(r.getWriter)&&!(r instanceof Ws.ReadableInterop);z.isReadableDOMStream=r=>z.isObject(r)&&Ze(r.cancel)&&Ze(r.getReader)&&!(r instanceof Ws.ReadableInterop);z.isWritableNodeStream=r=>z.isObject(r)&&Ze(r.end)&&Ze(r.write)&&yy(r.writable)&&!(r instanceof Ws.ReadableInterop);z.isReadableNodeStream=r=>z.isObject(r)&&Ze(r.read)&&Ze(r.pipe)&&yy(r.readable)&&!(r instanceof Ws.ReadableInterop)});var Pe=V(E=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0});E.compareArrayLike=E.rebaseValueOffsets=E.toUint8ClampedArrayAsyncIterator=E.toFloat64ArrayAsyncIterator=E.toFloat32ArrayAsyncIterator=E.toUint32ArrayAsyncIterator=E.toUint16ArrayAsyncIterator=E.toUint8ArrayAsyncIterator=E.toInt32ArrayAsyncIterator=E.toInt16ArrayAsyncIterator=E.toInt8ArrayAsyncIterator=E.toArrayBufferViewAsyncIterator=E.toUint8ClampedArrayIterator=E.toFloat64ArrayIterator=E.toFloat32ArrayIterator=E.toUint32ArrayIterator=E.toUint16ArrayIterator=E.toUint8ArrayIterator=E.toInt32ArrayIterator=E.toInt16ArrayIterator=E.toInt8ArrayIterator=E.toArrayBufferViewIterator=E.toUint8ClampedArray=E.toFloat64Array=E.toFloat32Array=E.toBigUint64Array=E.toUint32Array=E.toUint16Array=E.toUint8Array=E.toBigInt64Array=E.toInt32Array=E.toInt16Array=E.toInt8Array=E.toArrayBufferView=E.joinUint8Arrays=E.memcpy=void 0;var M1=Mi(),U1=ci(),C1=M1.flatbuffers.ByteBuffer,li=nt(),au=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:ArrayBuffer;function V1(r){let e=r[0]?[r[0]]:[],t,i,n,a;for(let c,f,w=0,s=0,m=r.length;++w<m;){if(c=e[s],f=r[w],!c||!f||c.buffer!==f.buffer||f.byteOffset<c.byteOffset){f&&(e[++s]=f);continue}if({byteOffset:t,byteLength:n}=c,{byteOffset:i,byteLength:a}=f,t+n<i||i+a<t){f&&(e[++s]=f);continue}e[s]=new Uint8Array(c.buffer,t,i-t+a)}return e}function ou(r,e,t=0,i=e.byteLength){let n=r.byteLength,a=new Uint8Array(r.buffer,r.byteOffset,n),c=new Uint8Array(e.buffer,e.byteOffset,Math.min(i,n));return a.set(c,t),r}E.memcpy=ou;function k1(r,e){let t=V1(r),i=t.reduce((m,M)=>m+M.byteLength,0),n,a,c,f=0,w=-1,s=Math.min(e||1/0,i);for(let m=t.length;++w<m;){if(n=t[w],a=n.subarray(0,Math.min(n.length,s-f)),s<=f+a.length){a.length<n.length?t[w]=n.subarray(a.length):a.length===n.length&&w++,c?ou(c,a,f):c=a;break}ou(c||(c=new Uint8Array(s)),a,f),f+=a.length}return[c||new Uint8Array(0),t.slice(w),i-(c?c.byteLength:0)]}E.joinUint8Arrays=k1;function ot(r,e){let t=li.isIteratorResult(e)?e.value:e;return t instanceof r?r===Uint8Array?new r(t.buffer,t.byteOffset,t.byteLength):t:t?(typeof t=="string"&&(t=U1.encodeUtf8(t)),t instanceof ArrayBuffer?new r(t):t instanceof au?new r(t):t instanceof C1?ot(r,t.bytes()):ArrayBuffer.isView(t)?t.byteLength<=0?new r(0):new r(t.buffer,t.byteOffset,t.byteLength/r.BYTES_PER_ELEMENT):r.from(t)):new r(0)}E.toArrayBufferView=ot;E.toInt8Array=r=>ot(Int8Array,r);E.toInt16Array=r=>ot(Int16Array,r);E.toInt32Array=r=>ot(Int32Array,r);E.toBigInt64Array=r=>ot(li.BigInt64Array,r);E.toUint8Array=r=>ot(Uint8Array,r);E.toUint16Array=r=>ot(Uint16Array,r);E.toUint32Array=r=>ot(Uint32Array,r);E.toBigUint64Array=r=>ot(li.BigUint64Array,r);E.toFloat32Array=r=>ot(Float32Array,r);E.toFloat64Array=r=>ot(Float64Array,r);E.toUint8ClampedArray=r=>ot(Uint8ClampedArray,r);var uu=r=>(r.next(),r);function*Yt(r,e){let t=function*(n){yield n},i=typeof e=="string"||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof au?t(e):li.isIterable(e)?e:t(e);return yield*uu(function*(n){let a=null;do a=n.next(yield ot(r,a));while(!a.done)}(i[Symbol.iterator]())),new r}E.toArrayBufferViewIterator=Yt;E.toInt8ArrayIterator=r=>Yt(Int8Array,r);E.toInt16ArrayIterator=r=>Yt(Int16Array,r);E.toInt32ArrayIterator=r=>Yt(Int32Array,r);E.toUint8ArrayIterator=r=>Yt(Uint8Array,r);E.toUint16ArrayIterator=r=>Yt(Uint16Array,r);E.toUint32ArrayIterator=r=>Yt(Uint32Array,r);E.toFloat32ArrayIterator=r=>Yt(Float32Array,r);E.toFloat64ArrayIterator=r=>Yt(Float64Array,r);E.toUint8ClampedArrayIterator=r=>Yt(Uint8ClampedArray,r);async function*Vt(r,e){if(li.isPromise(e))return yield*Vt(r,await e);let t=async function*(a){yield await a},i=async function*(a){yield*uu(function*(c){let f=null;do f=c.next(yield f&&f.value);while(!f.done)}(a[Symbol.iterator]()))},n=typeof e=="string"||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof au?t(e):li.isIterable(e)?i(e):li.isAsyncIterable(e)?e:t(e);return yield*uu(async function*(a){let c=null;do c=await a.next(yield ot(r,c));while(!c.done)}(n[Symbol.asyncIterator]())),new r}E.toArrayBufferViewAsyncIterator=Vt;E.toInt8ArrayAsyncIterator=r=>Vt(Int8Array,r);E.toInt16ArrayAsyncIterator=r=>Vt(Int16Array,r);E.toInt32ArrayAsyncIterator=r=>Vt(Int32Array,r);E.toUint8ArrayAsyncIterator=r=>Vt(Uint8Array,r);E.toUint16ArrayAsyncIterator=r=>Vt(Uint16Array,r);E.toUint32ArrayAsyncIterator=r=>Vt(Uint32Array,r);E.toFloat32ArrayAsyncIterator=r=>Vt(Float32Array,r);E.toFloat64ArrayAsyncIterator=r=>Vt(Float64Array,r);E.toUint8ClampedArrayAsyncIterator=r=>Vt(Uint8ClampedArray,r);function P1(r,e,t){if(r!==0){t=t.slice(0,e+1);for(let i=-1;++i<=e;)t[i]+=r}return t}E.rebaseValueOffsets=P1;function R1(r,e){let t=0,i=r.length;if(i!==e.length)return!1;if(i>0)do if(r[t]!==e[t])return!1;while(++t<i);return!0}E.compareArrayLike=R1});var kn=V(lu=>{"use strict";Object.defineProperty(lu,"__esModule",{value:!0});var ut=Pe();lu.default={fromIterable(r){return Ys(N1(r))},fromAsyncIterable(r){return Ys(x1(r))},fromDOMStream(r){return Ys(E1(r))},fromNodeStream(r){return Ys(L1(r))},toDOMStream(r,e){throw new Error('"toDOMStream" not available in this environment')},toNodeStream(r,e){throw new Error('"toNodeStream" not available in this environment')}};var Ys=r=>(r.next(),r);function*N1(r){let e,t=!1,i=[],n,a,c,f=0;function w(){return a==="peek"?ut.joinUint8Arrays(i,c)[0]:([n,i,f]=ut.joinUint8Arrays(i,c),n)}({cmd:a,size:c}=yield null);let s=ut.toUint8ArrayIterator(r)[Symbol.iterator]();try{do if({done:e,value:n}=isNaN(c-f)?s.next(void 0):s.next(c-f),!e&&n.byteLength>0&&(i.push(n),f+=n.byteLength),e||c<=f)do({cmd:a,size:c}=yield w());while(c<f);while(!e)}catch(m){(t=!0)&&typeof s.throw=="function"&&s.throw(m)}finally{t===!1&&typeof s.return=="function"&&s.return(null)}return null}async function*x1(r){let e,t=!1,i=[],n,a,c,f=0;function w(){return a==="peek"?ut.joinUint8Arrays(i,c)[0]:([n,i,f]=ut.joinUint8Arrays(i,c),n)}({cmd:a,size:c}=yield null);let s=ut.toUint8ArrayAsyncIterator(r)[Symbol.asyncIterator]();try{do if({done:e,value:n}=isNaN(c-f)?await s.next(void 0):await s.next(c-f),!e&&n.byteLength>0&&(i.push(n),f+=n.byteLength),e||c<=f)do({cmd:a,size:c}=yield w());while(c<f);while(!e)}catch(m){(t=!0)&&typeof s.throw=="function"&&await s.throw(m)}finally{t===!1&&typeof s.return=="function"&&await s.return(new Uint8Array(0))}return null}async function*E1(r){let e=!1,t=!1,i=[],n,a,c,f=0;function w(){return a==="peek"?ut.joinUint8Arrays(i,c)[0]:([n,i,f]=ut.joinUint8Arrays(i,c),n)}({cmd:a,size:c}=yield null);let s=new my(r);try{do if({done:e,value:n}=isNaN(c-f)?await s.read(void 0):await s.read(c-f),!e&&n.byteLength>0&&(i.push(ut.toUint8Array(n)),f+=n.byteLength),e||c<=f)do({cmd:a,size:c}=yield w());while(c<f);while(!e)}catch(m){(t=!0)&&await s.cancel(m)}finally{t===!1?await s.cancel():r.locked&&s.releaseLock()}return null}var my=class{constructor(e){this.source=e,this.byobReader=null,this.defaultReader=null;try{this.supportsBYOB=!!(this.reader=this.getBYOBReader())}catch{this.supportsBYOB=!(this.reader=this.getDefaultReader())}}get closed(){return this.reader?this.reader.closed.catch(()=>{}):Promise.resolve()}releaseLock(){this.reader&&this.reader.releaseLock(),this.reader=this.byobReader=this.defaultReader=null}async cancel(e){let{reader:t,source:i}=this;t&&await t.cancel(e).catch(()=>{}),i&&i.locked&&this.releaseLock()}async read(e){if(e===0)return{done:this.reader==null,value:new Uint8Array(0)};let t=!this.supportsBYOB||typeof e!="number"?await this.getDefaultReader().read():await this.readFromBYOBReader(e);return!t.done&&(t.value=ut.toUint8Array(t)),t}getDefaultReader(){return this.byobReader&&this.releaseLock(),this.defaultReader||(this.defaultReader=this.source.getReader(),this.defaultReader.closed.catch(()=>{})),this.reader=this.defaultReader}getBYOBReader(){return this.defaultReader&&this.releaseLock(),this.byobReader||(this.byobReader=this.source.getReader({mode:"byob"}),this.byobReader.closed.catch(()=>{})),this.reader=this.byobReader}async readFromBYOBReader(e){return await _y(this.getBYOBReader(),new ArrayBuffer(e),0,e)}};async function _y(r,e,t,i){if(t>=i)return{done:!1,value:new Uint8Array(e,0,i)};let{done:n,value:a}=await r.read(new Uint8Array(e,t,i-t));return(t+=a.byteLength)<i&&!n?await _y(r,a.buffer,t,i):{done:n,value:new Uint8Array(a.buffer,0,t)}}var cu=(r,e)=>{let t=n=>i([e,n]),i;return[e,t,new Promise(n=>(i=n)&&r.once(e,t))]};async function*L1(r){let e=[],t="error",i=!1,n=null,a,c,f=0,w=[],s;function m(){return a==="peek"?ut.joinUint8Arrays(w,c)[0]:([s,w,f]=ut.joinUint8Arrays(w,c),s)}if({cmd:a,size:c}=yield null,r.isTTY)return yield new Uint8Array(0),null;try{e[0]=cu(r,"end"),e[1]=cu(r,"error");do{if(e[2]=cu(r,"readable"),[t,n]=await Promise.race(e.map($=>$[2])),t==="error")break;if((i=t==="end")||(isFinite(c-f)?(s=ut.toUint8Array(r.read(c-f)),s.byteLength<c-f&&(s=ut.toUint8Array(r.read(void 0)))):s=ut.toUint8Array(r.read(void 0)),s.byteLength>0&&(w.push(s),f+=s.byteLength)),i||c<=f)do({cmd:a,size:c}=yield m());while(c<f)}while(!i)}finally{await M(e,t==="error"?n:null)}return null;function M($,oe){return s=w=null,new Promise(async(lt,qt)=>{for(let[Ct,Si]of $)r.off(Ct,Si);try{let Ct=r.destroy;Ct&&Ct.call(r,oe),oe=void 0}catch(Ct){oe=Ct||oe}finally{oe!=null?qt(oe):lt()}})}}});var Ve=V(ki=>{"use strict";Object.defineProperty(ki,"__esModule",{value:!0});ki.Vector=ki.AbstractVector=void 0;var Hs=class{};ki.AbstractVector=Hs;ki.Vector=Hs;Hs.prototype.data=null});var Pi=V(L=>{"use strict";Object.defineProperty(L,"__esModule",{value:!0});L.org=void 0;var ye;(function(r){var e;(function(t){var i;(function(n){var a;(function(c){let f;(function(w){w[w.V1=0]="V1",w[w.V2=1]="V2",w[w.V3=2]="V3",w[w.V4=3]="V4"})(f=c.MetadataVersion||(c.MetadataVersion={}))})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(ye=L.org||(L.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){let f;(function(w){w[w.Sparse=0]="Sparse",w[w.Dense=1]="Dense"})(f=c.UnionMode||(c.UnionMode={}))})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(ye=L.org||(L.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){let f;(function(w){w[w.HALF=0]="HALF",w[w.SINGLE=1]="SINGLE",w[w.DOUBLE=2]="DOUBLE"})(f=c.Precision||(c.Precision={}))})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(ye=L.org||(L.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){let f;(function(w){w[w.DAY=0]="DAY",w[w.MILLISECOND=1]="MILLISECOND"})(f=c.DateUnit||(c.DateUnit={}))})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(ye=L.org||(L.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){let f;(function(w){w[w.SECOND=0]="SECOND",w[w.MILLISECOND=1]="MILLISECOND",w[w.MICROSECOND=2]="MICROSECOND",w[w.NANOSECOND=3]="NANOSECOND"})(f=c.TimeUnit||(c.TimeUnit={}))})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(ye=L.org||(L.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){let f;(function(w){w[w.YEAR_MONTH=0]="YEAR_MONTH",w[w.DAY_TIME=1]="DAY_TIME"})(f=c.IntervalUnit||(c.IntervalUnit={}))})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(ye=L.org||(L.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){let f;(function(w){w[w.NONE=0]="NONE",w[w.Null=1]="Null",w[w.Int=2]="Int",w[w.FloatingPoint=3]="FloatingPoint",w[w.Binary=4]="Binary",w[w.Utf8=5]="Utf8",w[w.Bool=6]="Bool",w[w.Decimal=7]="Decimal",w[w.Date=8]="Date",w[w.Time=9]="Time",w[w.Timestamp=10]="Timestamp",w[w.Interval=11]="Interval",w[w.List=12]="List",w[w.Struct_=13]="Struct_",w[w.Union=14]="Union",w[w.FixedSizeBinary=15]="FixedSizeBinary",w[w.FixedSizeList=16]="FixedSizeList",w[w.Map=17]="Map",w[w.Duration=18]="Duration",w[w.LargeBinary=19]="LargeBinary",w[w.LargeUtf8=20]="LargeUtf8",w[w.LargeList=21]="LargeList"})(f=c.Type||(c.Type={}))})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(ye=L.org||(L.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){let f;(function(w){w[w.Little=0]="Little",w[w.Big=1]="Big"})(f=c.Endianness||(c.Endianness={}))})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(ye=L.org||(L.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsNull(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}static startNull(s){s.startObject(0)}static endNull(s){return s.endObject()}static createNull(s){return f.startNull(s),f.endNull(s)}}c.Null=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(ye=L.org||(L.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsStruct_(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}static startStruct_(s){s.startObject(0)}static endStruct_(s){return s.endObject()}static createStruct_(s){return f.startStruct_(s),f.endStruct_(s)}}c.Struct_=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(ye=L.org||(L.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsList(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}static startList(s){s.startObject(0)}static endList(s){return s.endObject()}static createList(s){return f.startList(s),f.endList(s)}}c.List=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(ye=L.org||(L.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsLargeList(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}static startLargeList(s){s.startObject(0)}static endLargeList(s){return s.endObject()}static createLargeList(s){return f.startLargeList(s),f.endLargeList(s)}}c.LargeList=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(ye=L.org||(L.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsFixedSizeList(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}listSize(){let s=this.bb.__offset(this.bb_pos,4);return s?this.bb.readInt32(this.bb_pos+s):0}static startFixedSizeList(s){s.startObject(1)}static addListSize(s,m){s.addFieldInt32(0,m,0)}static endFixedSizeList(s){return s.endObject()}static createFixedSizeList(s,m){return f.startFixedSizeList(s),f.addListSize(s,m),f.endFixedSizeList(s)}}c.FixedSizeList=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(ye=L.org||(L.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsMap(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}keysSorted(){let s=this.bb.__offset(this.bb_pos,4);return s?!!this.bb.readInt8(this.bb_pos+s):!1}static startMap(s){s.startObject(1)}static addKeysSorted(s,m){s.addFieldInt8(0,+m,0)}static endMap(s){return s.endObject()}static createMap(s,m){return f.startMap(s),f.addKeysSorted(s,m),f.endMap(s)}}c.Map=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(ye=L.org||(L.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsUnion(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}mode(){let s=this.bb.__offset(this.bb_pos,4);return s?this.bb.readInt16(this.bb_pos+s):r.apache.arrow.flatbuf.UnionMode.Sparse}typeIds(s){let m=this.bb.__offset(this.bb_pos,6);return m?this.bb.readInt32(this.bb.__vector(this.bb_pos+m)+s*4):0}typeIdsLength(){let s=this.bb.__offset(this.bb_pos,6);return s?this.bb.__vector_len(this.bb_pos+s):0}typeIdsArray(){let s=this.bb.__offset(this.bb_pos,6);return s?new Int32Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+s),this.bb.__vector_len(this.bb_pos+s)):null}static startUnion(s){s.startObject(2)}static addMode(s,m){s.addFieldInt16(0,m,r.apache.arrow.flatbuf.UnionMode.Sparse)}static addTypeIds(s,m){s.addFieldOffset(1,m,0)}static createTypeIdsVector(s,m){s.startVector(4,m.length,4);for(let M=m.length-1;M>=0;M--)s.addInt32(m[M]);return s.endVector()}static startTypeIdsVector(s,m){s.startVector(4,m,4)}static endUnion(s){return s.endObject()}static createUnion(s,m,M){return f.startUnion(s),f.addMode(s,m),f.addTypeIds(s,M),f.endUnion(s)}}c.Union=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(ye=L.org||(L.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsInt(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}bitWidth(){let s=this.bb.__offset(this.bb_pos,4);return s?this.bb.readInt32(this.bb_pos+s):0}isSigned(){let s=this.bb.__offset(this.bb_pos,6);return s?!!this.bb.readInt8(this.bb_pos+s):!1}static startInt(s){s.startObject(2)}static addBitWidth(s,m){s.addFieldInt32(0,m,0)}static addIsSigned(s,m){s.addFieldInt8(1,+m,0)}static endInt(s){return s.endObject()}static createInt(s,m,M){return f.startInt(s),f.addBitWidth(s,m),f.addIsSigned(s,M),f.endInt(s)}}c.Int=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(ye=L.org||(L.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsFloatingPoint(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}precision(){let s=this.bb.__offset(this.bb_pos,4);return s?this.bb.readInt16(this.bb_pos+s):r.apache.arrow.flatbuf.Precision.HALF}static startFloatingPoint(s){s.startObject(1)}static addPrecision(s,m){s.addFieldInt16(0,m,r.apache.arrow.flatbuf.Precision.HALF)}static endFloatingPoint(s){return s.endObject()}static createFloatingPoint(s,m){return f.startFloatingPoint(s),f.addPrecision(s,m),f.endFloatingPoint(s)}}c.FloatingPoint=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(ye=L.org||(L.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsUtf8(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}static startUtf8(s){s.startObject(0)}static endUtf8(s){return s.endObject()}static createUtf8(s){return f.startUtf8(s),f.endUtf8(s)}}c.Utf8=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(ye=L.org||(L.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsBinary(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}static startBinary(s){s.startObject(0)}static endBinary(s){return s.endObject()}static createBinary(s){return f.startBinary(s),f.endBinary(s)}}c.Binary=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(ye=L.org||(L.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsLargeUtf8(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}static startLargeUtf8(s){s.startObject(0)}static endLargeUtf8(s){return s.endObject()}static createLargeUtf8(s){return f.startLargeUtf8(s),f.endLargeUtf8(s)}}c.LargeUtf8=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(ye=L.org||(L.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsLargeBinary(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}static startLargeBinary(s){s.startObject(0)}static endLargeBinary(s){return s.endObject()}static createLargeBinary(s){return f.startLargeBinary(s),f.endLargeBinary(s)}}c.LargeBinary=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(ye=L.org||(L.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsFixedSizeBinary(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}byteWidth(){let s=this.bb.__offset(this.bb_pos,4);return s?this.bb.readInt32(this.bb_pos+s):0}static startFixedSizeBinary(s){s.startObject(1)}static addByteWidth(s,m){s.addFieldInt32(0,m,0)}static endFixedSizeBinary(s){return s.endObject()}static createFixedSizeBinary(s,m){return f.startFixedSizeBinary(s),f.addByteWidth(s,m),f.endFixedSizeBinary(s)}}c.FixedSizeBinary=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(ye=L.org||(L.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsBool(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}static startBool(s){s.startObject(0)}static endBool(s){return s.endObject()}static createBool(s){return f.startBool(s),f.endBool(s)}}c.Bool=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(ye=L.org||(L.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsDecimal(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}precision(){let s=this.bb.__offset(this.bb_pos,4);return s?this.bb.readInt32(this.bb_pos+s):0}scale(){let s=this.bb.__offset(this.bb_pos,6);return s?this.bb.readInt32(this.bb_pos+s):0}static startDecimal(s){s.startObject(2)}static addPrecision(s,m){s.addFieldInt32(0,m,0)}static addScale(s,m){s.addFieldInt32(1,m,0)}static endDecimal(s){return s.endObject()}static createDecimal(s,m,M){return f.startDecimal(s),f.addPrecision(s,m),f.addScale(s,M),f.endDecimal(s)}}c.Decimal=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(ye=L.org||(L.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsDate(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}unit(){let s=this.bb.__offset(this.bb_pos,4);return s?this.bb.readInt16(this.bb_pos+s):r.apache.arrow.flatbuf.DateUnit.MILLISECOND}static startDate(s){s.startObject(1)}static addUnit(s,m){s.addFieldInt16(0,m,r.apache.arrow.flatbuf.DateUnit.MILLISECOND)}static endDate(s){return s.endObject()}static createDate(s,m){return f.startDate(s),f.addUnit(s,m),f.endDate(s)}}c.Date=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(ye=L.org||(L.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsTime(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}unit(){let s=this.bb.__offset(this.bb_pos,4);return s?this.bb.readInt16(this.bb_pos+s):r.apache.arrow.flatbuf.TimeUnit.MILLISECOND}bitWidth(){let s=this.bb.__offset(this.bb_pos,6);return s?this.bb.readInt32(this.bb_pos+s):32}static startTime(s){s.startObject(2)}static addUnit(s,m){s.addFieldInt16(0,m,r.apache.arrow.flatbuf.TimeUnit.MILLISECOND)}static addBitWidth(s,m){s.addFieldInt32(1,m,32)}static endTime(s){return s.endObject()}static createTime(s,m,M){return f.startTime(s),f.addUnit(s,m),f.addBitWidth(s,M),f.endTime(s)}}c.Time=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(ye=L.org||(L.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsTimestamp(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}unit(){let s=this.bb.__offset(this.bb_pos,4);return s?this.bb.readInt16(this.bb_pos+s):r.apache.arrow.flatbuf.TimeUnit.SECOND}timezone(s){let m=this.bb.__offset(this.bb_pos,6);return m?this.bb.__string(this.bb_pos+m,s):null}static startTimestamp(s){s.startObject(2)}static addUnit(s,m){s.addFieldInt16(0,m,r.apache.arrow.flatbuf.TimeUnit.SECOND)}static addTimezone(s,m){s.addFieldOffset(1,m,0)}static endTimestamp(s){return s.endObject()}static createTimestamp(s,m,M){return f.startTimestamp(s),f.addUnit(s,m),f.addTimezone(s,M),f.endTimestamp(s)}}c.Timestamp=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(ye=L.org||(L.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsInterval(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}unit(){let s=this.bb.__offset(this.bb_pos,4);return s?this.bb.readInt16(this.bb_pos+s):r.apache.arrow.flatbuf.IntervalUnit.YEAR_MONTH}static startInterval(s){s.startObject(1)}static addUnit(s,m){s.addFieldInt16(0,m,r.apache.arrow.flatbuf.IntervalUnit.YEAR_MONTH)}static endInterval(s){return s.endObject()}static createInterval(s,m){return f.startInterval(s),f.addUnit(s,m),f.endInterval(s)}}c.Interval=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(ye=L.org||(L.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsDuration(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}unit(){let s=this.bb.__offset(this.bb_pos,4);return s?this.bb.readInt16(this.bb_pos+s):r.apache.arrow.flatbuf.TimeUnit.MILLISECOND}static startDuration(s){s.startObject(1)}static addUnit(s,m){s.addFieldInt16(0,m,r.apache.arrow.flatbuf.TimeUnit.MILLISECOND)}static endDuration(s){return s.endObject()}static createDuration(s,m){return f.startDuration(s),f.addUnit(s,m),f.endDuration(s)}}c.Duration=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(ye=L.org||(L.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsKeyValue(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}key(s){let m=this.bb.__offset(this.bb_pos,4);return m?this.bb.__string(this.bb_pos+m,s):null}value(s){let m=this.bb.__offset(this.bb_pos,6);return m?this.bb.__string(this.bb_pos+m,s):null}static startKeyValue(s){s.startObject(2)}static addKey(s,m){s.addFieldOffset(0,m,0)}static addValue(s,m){s.addFieldOffset(1,m,0)}static endKeyValue(s){return s.endObject()}static createKeyValue(s,m,M){return f.startKeyValue(s),f.addKey(s,m),f.addValue(s,M),f.endKeyValue(s)}}c.KeyValue=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(ye=L.org||(L.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsDictionaryEncoding(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}id(){let s=this.bb.__offset(this.bb_pos,4);return s?this.bb.readInt64(this.bb_pos+s):this.bb.createLong(0,0)}indexType(s){let m=this.bb.__offset(this.bb_pos,6);return m?(s||new r.apache.arrow.flatbuf.Int).__init(this.bb.__indirect(this.bb_pos+m),this.bb):null}isOrdered(){let s=this.bb.__offset(this.bb_pos,8);return s?!!this.bb.readInt8(this.bb_pos+s):!1}static startDictionaryEncoding(s){s.startObject(3)}static addId(s,m){s.addFieldInt64(0,m,s.createLong(0,0))}static addIndexType(s,m){s.addFieldOffset(1,m,0)}static addIsOrdered(s,m){s.addFieldInt8(2,+m,0)}static endDictionaryEncoding(s){return s.endObject()}static createDictionaryEncoding(s,m,M,$){return f.startDictionaryEncoding(s),f.addId(s,m),f.addIndexType(s,M),f.addIsOrdered(s,$),f.endDictionaryEncoding(s)}}c.DictionaryEncoding=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(ye=L.org||(L.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsField(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}name(s){let m=this.bb.__offset(this.bb_pos,4);return m?this.bb.__string(this.bb_pos+m,s):null}nullable(){let s=this.bb.__offset(this.bb_pos,6);return s?!!this.bb.readInt8(this.bb_pos+s):!1}typeType(){let s=this.bb.__offset(this.bb_pos,8);return s?this.bb.readUint8(this.bb_pos+s):r.apache.arrow.flatbuf.Type.NONE}type(s){let m=this.bb.__offset(this.bb_pos,10);return m?this.bb.__union(s,this.bb_pos+m):null}dictionary(s){let m=this.bb.__offset(this.bb_pos,12);return m?(s||new r.apache.arrow.flatbuf.DictionaryEncoding).__init(this.bb.__indirect(this.bb_pos+m),this.bb):null}children(s,m){let M=this.bb.__offset(this.bb_pos,14);return M?(m||new r.apache.arrow.flatbuf.Field).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+M)+s*4),this.bb):null}childrenLength(){let s=this.bb.__offset(this.bb_pos,14);return s?this.bb.__vector_len(this.bb_pos+s):0}customMetadata(s,m){let M=this.bb.__offset(this.bb_pos,16);return M?(m||new r.apache.arrow.flatbuf.KeyValue).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+M)+s*4),this.bb):null}customMetadataLength(){let s=this.bb.__offset(this.bb_pos,16);return s?this.bb.__vector_len(this.bb_pos+s):0}static startField(s){s.startObject(7)}static addName(s,m){s.addFieldOffset(0,m,0)}static addNullable(s,m){s.addFieldInt8(1,+m,0)}static addTypeType(s,m){s.addFieldInt8(2,m,r.apache.arrow.flatbuf.Type.NONE)}static addType(s,m){s.addFieldOffset(3,m,0)}static addDictionary(s,m){s.addFieldOffset(4,m,0)}static addChildren(s,m){s.addFieldOffset(5,m,0)}static createChildrenVector(s,m){s.startVector(4,m.length,4);for(let M=m.length-1;M>=0;M--)s.addOffset(m[M]);return s.endVector()}static startChildrenVector(s,m){s.startVector(4,m,4)}static addCustomMetadata(s,m){s.addFieldOffset(6,m,0)}static createCustomMetadataVector(s,m){s.startVector(4,m.length,4);for(let M=m.length-1;M>=0;M--)s.addOffset(m[M]);return s.endVector()}static startCustomMetadataVector(s,m){s.startVector(4,m,4)}static endField(s){return s.endObject()}static createField(s,m,M,$,oe,lt,qt,Ct){return f.startField(s),f.addName(s,m),f.addNullable(s,M),f.addTypeType(s,$),f.addType(s,oe),f.addDictionary(s,lt),f.addChildren(s,qt),f.addCustomMetadata(s,Ct),f.endField(s)}}c.Field=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(ye=L.org||(L.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}offset(){return this.bb.readInt64(this.bb_pos)}length(){return this.bb.readInt64(this.bb_pos+8)}static createBuffer(s,m,M){return s.prep(8,16),s.writeInt64(M),s.writeInt64(m),s.offset()}}c.Buffer=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(ye=L.org||(L.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsSchema(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}endianness(){let s=this.bb.__offset(this.bb_pos,4);return s?this.bb.readInt16(this.bb_pos+s):r.apache.arrow.flatbuf.Endianness.Little}fields(s,m){let M=this.bb.__offset(this.bb_pos,6);return M?(m||new r.apache.arrow.flatbuf.Field).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+M)+s*4),this.bb):null}fieldsLength(){let s=this.bb.__offset(this.bb_pos,6);return s?this.bb.__vector_len(this.bb_pos+s):0}customMetadata(s,m){let M=this.bb.__offset(this.bb_pos,8);return M?(m||new r.apache.arrow.flatbuf.KeyValue).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+M)+s*4),this.bb):null}customMetadataLength(){let s=this.bb.__offset(this.bb_pos,8);return s?this.bb.__vector_len(this.bb_pos+s):0}static startSchema(s){s.startObject(3)}static addEndianness(s,m){s.addFieldInt16(0,m,r.apache.arrow.flatbuf.Endianness.Little)}static addFields(s,m){s.addFieldOffset(1,m,0)}static createFieldsVector(s,m){s.startVector(4,m.length,4);for(let M=m.length-1;M>=0;M--)s.addOffset(m[M]);return s.endVector()}static startFieldsVector(s,m){s.startVector(4,m,4)}static addCustomMetadata(s,m){s.addFieldOffset(2,m,0)}static createCustomMetadataVector(s,m){s.startVector(4,m.length,4);for(let M=m.length-1;M>=0;M--)s.addOffset(m[M]);return s.endVector()}static startCustomMetadataVector(s,m){s.startVector(4,m,4)}static endSchema(s){return s.endObject()}static finishSchemaBuffer(s,m){s.finish(m)}static createSchema(s,m,M,$){return f.startSchema(s),f.addEndianness(s,m),f.addFields(s,M),f.addCustomMetadata(s,$),f.endSchema(s)}}c.Schema=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(ye=L.org||(L.org={}))});var du=V(ct=>{"use strict";Object.defineProperty(ct,"__esModule",{value:!0});ct.org=void 0;var Pn=Pi(),Ri;(function(r){var e;(function(t){var i;(function(n){var a;(function(c){c.Schema=Pn.org.apache.arrow.flatbuf.Schema})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(Ri=ct.org||(ct.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){let f;(function(w){w[w.NONE=0]="NONE",w[w.Schema=1]="Schema",w[w.DictionaryBatch=2]="DictionaryBatch",w[w.RecordBatch=3]="RecordBatch",w[w.Tensor=4]="Tensor",w[w.SparseTensor=5]="SparseTensor"})(f=c.MessageHeader||(c.MessageHeader={}))})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(Ri=ct.org||(ct.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}length(){return this.bb.readInt64(this.bb_pos)}nullCount(){return this.bb.readInt64(this.bb_pos+8)}static createFieldNode(s,m,M){return s.prep(8,16),s.writeInt64(M),s.writeInt64(m),s.offset()}}c.FieldNode=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(Ri=ct.org||(ct.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsRecordBatch(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}length(){let s=this.bb.__offset(this.bb_pos,4);return s?this.bb.readInt64(this.bb_pos+s):this.bb.createLong(0,0)}nodes(s,m){let M=this.bb.__offset(this.bb_pos,6);return M?(m||new r.apache.arrow.flatbuf.FieldNode).__init(this.bb.__vector(this.bb_pos+M)+s*16,this.bb):null}nodesLength(){let s=this.bb.__offset(this.bb_pos,6);return s?this.bb.__vector_len(this.bb_pos+s):0}buffers(s,m){let M=this.bb.__offset(this.bb_pos,8);return M?(m||new Pn.org.apache.arrow.flatbuf.Buffer).__init(this.bb.__vector(this.bb_pos+M)+s*16,this.bb):null}buffersLength(){let s=this.bb.__offset(this.bb_pos,8);return s?this.bb.__vector_len(this.bb_pos+s):0}static startRecordBatch(s){s.startObject(3)}static addLength(s,m){s.addFieldInt64(0,m,s.createLong(0,0))}static addNodes(s,m){s.addFieldOffset(1,m,0)}static startNodesVector(s,m){s.startVector(16,m,8)}static addBuffers(s,m){s.addFieldOffset(2,m,0)}static startBuffersVector(s,m){s.startVector(16,m,8)}static endRecordBatch(s){return s.endObject()}static createRecordBatch(s,m,M,$){return f.startRecordBatch(s),f.addLength(s,m),f.addNodes(s,M),f.addBuffers(s,$),f.endRecordBatch(s)}}c.RecordBatch=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(Ri=ct.org||(ct.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsDictionaryBatch(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}id(){let s=this.bb.__offset(this.bb_pos,4);return s?this.bb.readInt64(this.bb_pos+s):this.bb.createLong(0,0)}data(s){let m=this.bb.__offset(this.bb_pos,6);return m?(s||new r.apache.arrow.flatbuf.RecordBatch).__init(this.bb.__indirect(this.bb_pos+m),this.bb):null}isDelta(){let s=this.bb.__offset(this.bb_pos,8);return s?!!this.bb.readInt8(this.bb_pos+s):!1}static startDictionaryBatch(s){s.startObject(3)}static addId(s,m){s.addFieldInt64(0,m,s.createLong(0,0))}static addData(s,m){s.addFieldOffset(1,m,0)}static addIsDelta(s,m){s.addFieldInt8(2,+m,0)}static endDictionaryBatch(s){return s.endObject()}static createDictionaryBatch(s,m,M,$){return f.startDictionaryBatch(s),f.addId(s,m),f.addData(s,M),f.addIsDelta(s,$),f.endDictionaryBatch(s)}}c.DictionaryBatch=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(Ri=ct.org||(ct.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsMessage(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}version(){let s=this.bb.__offset(this.bb_pos,4);return s?this.bb.readInt16(this.bb_pos+s):Pn.org.apache.arrow.flatbuf.MetadataVersion.V1}headerType(){let s=this.bb.__offset(this.bb_pos,6);return s?this.bb.readUint8(this.bb_pos+s):r.apache.arrow.flatbuf.MessageHeader.NONE}header(s){let m=this.bb.__offset(this.bb_pos,8);return m?this.bb.__union(s,this.bb_pos+m):null}bodyLength(){let s=this.bb.__offset(this.bb_pos,10);return s?this.bb.readInt64(this.bb_pos+s):this.bb.createLong(0,0)}customMetadata(s,m){let M=this.bb.__offset(this.bb_pos,12);return M?(m||new Pn.org.apache.arrow.flatbuf.KeyValue).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+M)+s*4),this.bb):null}customMetadataLength(){let s=this.bb.__offset(this.bb_pos,12);return s?this.bb.__vector_len(this.bb_pos+s):0}static startMessage(s){s.startObject(5)}static addVersion(s,m){s.addFieldInt16(0,m,Pn.org.apache.arrow.flatbuf.MetadataVersion.V1)}static addHeaderType(s,m){s.addFieldInt8(1,m,r.apache.arrow.flatbuf.MessageHeader.NONE)}static addHeader(s,m){s.addFieldOffset(2,m,0)}static addBodyLength(s,m){s.addFieldInt64(3,m,s.createLong(0,0))}static addCustomMetadata(s,m){s.addFieldOffset(4,m,0)}static createCustomMetadataVector(s,m){s.startVector(4,m.length,4);for(let M=m.length-1;M>=0;M--)s.addOffset(m[M]);return s.endVector()}static startCustomMetadataVector(s,m){s.startVector(4,m,4)}static endMessage(s){return s.endObject()}static finishMessageBuffer(s,m){s.finish(m)}static createMessage(s,m,M,$,oe,lt){return f.startMessage(s),f.addVersion(s,m),f.addHeaderType(s,M),f.addHeader(s,$),f.addBodyLength(s,oe),f.addCustomMetadata(s,lt),f.endMessage(s)}}c.Message=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(Ri=ct.org||(ct.org={}))});var Be=V(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.BufferType=Ie.Type=Ie.MetadataVersion=Ie.MessageHeader=Ie.IntervalUnit=Ie.UnionMode=Ie.Precision=Ie.TimeUnit=Ie.DateUnit=Ie.ArrowType=void 0;var di=Pi(),q1=du();Ie.ArrowType=di.org.apache.arrow.flatbuf.Type;Ie.DateUnit=di.org.apache.arrow.flatbuf.DateUnit;Ie.TimeUnit=di.org.apache.arrow.flatbuf.TimeUnit;Ie.Precision=di.org.apache.arrow.flatbuf.Precision;Ie.UnionMode=di.org.apache.arrow.flatbuf.UnionMode;Ie.IntervalUnit=di.org.apache.arrow.flatbuf.IntervalUnit;Ie.MessageHeader=q1.org.apache.arrow.flatbuf.MessageHeader;Ie.MetadataVersion=di.org.apache.arrow.flatbuf.MetadataVersion;var z1;(function(r){r[r.NONE=0]="NONE",r[r.Null=1]="Null",r[r.Int=2]="Int",r[r.Float=3]="Float",r[r.Binary=4]="Binary",r[r.Utf8=5]="Utf8",r[r.Bool=6]="Bool",r[r.Decimal=7]="Decimal",r[r.Date=8]="Date",r[r.Time=9]="Time",r[r.Timestamp=10]="Timestamp",r[r.Interval=11]="Interval",r[r.List=12]="List",r[r.Struct=13]="Struct",r[r.Union=14]="Union",r[r.FixedSizeBinary=15]="FixedSizeBinary",r[r.FixedSizeList=16]="FixedSizeList",r[r.Map=17]="Map",r[r.Dictionary=-1]="Dictionary",r[r.Int8=-2]="Int8",r[r.Int16=-3]="Int16",r[r.Int32=-4]="Int32",r[r.Int64=-5]="Int64",r[r.Uint8=-6]="Uint8",r[r.Uint16=-7]="Uint16",r[r.Uint32=-8]="Uint32",r[r.Uint64=-9]="Uint64",r[r.Float16=-10]="Float16",r[r.Float32=-11]="Float32",r[r.Float64=-12]="Float64",r[r.DateDay=-13]="DateDay",r[r.DateMillisecond=-14]="DateMillisecond",r[r.TimestampSecond=-15]="TimestampSecond",r[r.TimestampMillisecond=-16]="TimestampMillisecond",r[r.TimestampMicrosecond=-17]="TimestampMicrosecond",r[r.TimestampNanosecond=-18]="TimestampNanosecond",r[r.TimeSecond=-19]="TimeSecond",r[r.TimeMillisecond=-20]="TimeMillisecond",r[r.TimeMicrosecond=-21]="TimeMicrosecond",r[r.TimeNanosecond=-22]="TimeNanosecond",r[r.DenseUnion=-23]="DenseUnion",r[r.SparseUnion=-24]="SparseUnion",r[r.IntervalDayTime=-25]="IntervalDayTime",r[r.IntervalYearMonth=-26]="IntervalYearMonth"})(z1=Ie.Type||(Ie.Type={}));var W1;(function(r){r[r.OFFSET=0]="OFFSET",r[r.DATA=1]="DATA",r[r.VALIDITY=2]="VALIDITY",r[r.TYPE=3]="TYPE"})(W1=Ie.BufferType||(Ie.BufferType={}))});var Ht=V(Re=>{"use strict";Object.defineProperty(Re,"__esModule",{value:!0});Re.popcnt_uint32=Re.popcnt_array=Re.popcnt_bit_range=Re.iterateBits=Re.packBools=Re.truncateBitmap=Re.setBool=Re.getBit=Re.getBool=void 0;function by(r,e,t,i){return(t&1<<i)!=0}Re.getBool=by;function gy(r,e,t,i){return(t&1<<i)>>i}Re.getBit=gy;function Y1(r,e,t){return t?!!(r[e>>3]|=1<<e%8)||!0:!(r[e>>3]&=~(1<<e%8))&&!1}Re.setBool=Y1;function H1(r,e,t){let i=t.byteLength+7&~7;if(r>0||t.byteLength<i){let n=new Uint8Array(i);return n.set(r%8==0?t.subarray(r>>3):vy(fu(t,r,e,null,by)).subarray(0,i)),n}return t}Re.truncateBitmap=H1;function vy(r){let e=[],t=0,i=0,n=0;for(let c of r)c&&(n|=1<<i),++i==8&&(e[t++]=n,n=i=0);(t===0||i>0)&&(e[t++]=n);let a=new Uint8Array(e.length+7&~7);return a.set(e),a}Re.packBools=vy;function*fu(r,e,t,i,n){let a=e%8,c=e>>3,f=0,w=t;for(;w>0;a=0){let s=r[c++];do yield n(i,f++,s,a);while(--w>0&&++a<8)}}Re.iterateBits=fu;function hu(r,e,t){if(t-e<=0)return 0;if(t-e<8){let a=0;for(let c of fu(r,e,t-e,r,gy))a+=c;return a}let i=t>>3<<3,n=e+(e%8==0?0:8-e%8);return hu(r,e,n)+hu(r,i,t)+jy(r,n>>3,i-n>>3)}Re.popcnt_bit_range=hu;function jy(r,e,t){let i=0,n=e|0,a=new DataView(r.buffer,r.byteOffset,r.byteLength),c=t===void 0?r.byteLength:n+t;for(;c-n>=4;)i+=$s(a.getUint32(n)),n+=4;for(;c-n>=2;)i+=$s(a.getUint16(n)),n+=2;for(;c-n>=1;)i+=$s(a.getUint8(n)),n+=1;return i}Re.popcnt_array=jy;function $s(r){let e=r|0;return e=e-(e>>>1&1431655765),e=(e&858993459)+(e>>>2&858993459),(e+(e>>>4)&252645135)*16843009>>>24}Re.popcnt_uint32=$s});var et=V(Js=>{"use strict";Object.defineProperty(Js,"__esModule",{value:!0});Js.Visitor=void 0;var $1=kt(),J1=Ve(),U=Be(),K1=_e(),je=class{visitMany(e,...t){return e.map((i,n)=>this.visit(i,...t.map(a=>a[n])))}visit(...e){return this.getVisitFn(e[0],!1).apply(this,e)}getVisitFn(e,t=!0){return G1(this,e,t)}visitNull(e,...t){return null}visitBool(e,...t){return null}visitInt(e,...t){return null}visitFloat(e,...t){return null}visitUtf8(e,...t){return null}visitBinary(e,...t){return null}visitFixedSizeBinary(e,...t){return null}visitDate(e,...t){return null}visitTimestamp(e,...t){return null}visitTime(e,...t){return null}visitDecimal(e,...t){return null}visitList(e,...t){return null}visitStruct(e,...t){return null}visitUnion(e,...t){return null}visitDictionary(e,...t){return null}visitInterval(e,...t){return null}visitFixedSizeList(e,...t){return null}visitMap(e,...t){return null}};Js.Visitor=je;function G1(r,e,t=!0){let i=null,n=U.Type.NONE;switch(e instanceof $1.Data||e instanceof J1.Vector?n=pu(e.type):e instanceof K1.DataType?n=pu(e):typeof(n=e)!="number"&&(n=U.Type[e]),n){case U.Type.Null:i=r.visitNull;break;case U.Type.Bool:i=r.visitBool;break;case U.Type.Int:i=r.visitInt;break;case U.Type.Int8:i=r.visitInt8||r.visitInt;break;case U.Type.Int16:i=r.visitInt16||r.visitInt;break;case U.Type.Int32:i=r.visitInt32||r.visitInt;break;case U.Type.Int64:i=r.visitInt64||r.visitInt;break;case U.Type.Uint8:i=r.visitUint8||r.visitInt;break;case U.Type.Uint16:i=r.visitUint16||r.visitInt;break;case U.Type.Uint32:i=r.visitUint32||r.visitInt;break;case U.Type.Uint64:i=r.visitUint64||r.visitInt;break;case U.Type.Float:i=r.visitFloat;break;case U.Type.Float16:i=r.visitFloat16||r.visitFloat;break;case U.Type.Float32:i=r.visitFloat32||r.visitFloat;break;case U.Type.Float64:i=r.visitFloat64||r.visitFloat;break;case U.Type.Utf8:i=r.visitUtf8;break;case U.Type.Binary:i=r.visitBinary;break;case U.Type.FixedSizeBinary:i=r.visitFixedSizeBinary;break;case U.Type.Date:i=r.visitDate;break;case U.Type.DateDay:i=r.visitDateDay||r.visitDate;break;case U.Type.DateMillisecond:i=r.visitDateMillisecond||r.visitDate;break;case U.Type.Timestamp:i=r.visitTimestamp;break;case U.Type.TimestampSecond:i=r.visitTimestampSecond||r.visitTimestamp;break;case U.Type.TimestampMillisecond:i=r.visitTimestampMillisecond||r.visitTimestamp;break;case U.Type.TimestampMicrosecond:i=r.visitTimestampMicrosecond||r.visitTimestamp;break;case U.Type.TimestampNanosecond:i=r.visitTimestampNanosecond||r.visitTimestamp;break;case U.Type.Time:i=r.visitTime;break;case U.Type.TimeSecond:i=r.visitTimeSecond||r.visitTime;break;case U.Type.TimeMillisecond:i=r.visitTimeMillisecond||r.visitTime;break;case U.Type.TimeMicrosecond:i=r.visitTimeMicrosecond||r.visitTime;break;case U.Type.TimeNanosecond:i=r.visitTimeNanosecond||r.visitTime;break;case U.Type.Decimal:i=r.visitDecimal;break;case U.Type.List:i=r.visitList;break;case U.Type.Struct:i=r.visitStruct;break;case U.Type.Union:i=r.visitUnion;break;case U.Type.DenseUnion:i=r.visitDenseUnion||r.visitUnion;break;case U.Type.SparseUnion:i=r.visitSparseUnion||r.visitUnion;break;case U.Type.Dictionary:i=r.visitDictionary;break;case U.Type.Interval:i=r.visitInterval;break;case U.Type.IntervalDayTime:i=r.visitIntervalDayTime||r.visitInterval;break;case U.Type.IntervalYearMonth:i=r.visitIntervalYearMonth||r.visitInterval;break;case U.Type.FixedSizeList:i=r.visitFixedSizeList;break;case U.Type.Map:i=r.visitMap;break}if(typeof i=="function")return i;if(!t)return()=>null;throw new Error(`Unrecognized type '${U.Type[n]}'`)}function pu(r){switch(r.typeId){case U.Type.Null:return U.Type.Null;case U.Type.Int:let{bitWidth:e,isSigned:t}=r;switch(e){case 8:return t?U.Type.Int8:U.Type.Uint8;case 16:return t?U.Type.Int16:U.Type.Uint16;case 32:return t?U.Type.Int32:U.Type.Uint32;case 64:return t?U.Type.Int64:U.Type.Uint64}return U.Type.Int;case U.Type.Float:switch(r.precision){case U.Precision.HALF:return U.Type.Float16;case U.Precision.SINGLE:return U.Type.Float32;case U.Precision.DOUBLE:return U.Type.Float64}return U.Type.Float;case U.Type.Binary:return U.Type.Binary;case U.Type.Utf8:return U.Type.Utf8;case U.Type.Bool:return U.Type.Bool;case U.Type.Decimal:return U.Type.Decimal;case U.Type.Time:switch(r.unit){case U.TimeUnit.SECOND:return U.Type.TimeSecond;case U.TimeUnit.MILLISECOND:return U.Type.TimeMillisecond;case U.TimeUnit.MICROSECOND:return U.Type.TimeMicrosecond;case U.TimeUnit.NANOSECOND:return U.Type.TimeNanosecond}return U.Type.Time;case U.Type.Timestamp:switch(r.unit){case U.TimeUnit.SECOND:return U.Type.TimestampSecond;case U.TimeUnit.MILLISECOND:return U.Type.TimestampMillisecond;case U.TimeUnit.MICROSECOND:return U.Type.TimestampMicrosecond;case U.TimeUnit.NANOSECOND:return U.Type.TimestampNanosecond}return U.Type.Timestamp;case U.Type.Date:switch(r.unit){case U.DateUnit.DAY:return U.Type.DateDay;case U.DateUnit.MILLISECOND:return U.Type.DateMillisecond}return U.Type.Date;case U.Type.Interval:switch(r.unit){case U.IntervalUnit.DAY_TIME:return U.Type.IntervalDayTime;case U.IntervalUnit.YEAR_MONTH:return U.Type.IntervalYearMonth}return U.Type.Interval;case U.Type.Map:return U.Type.Map;case U.Type.List:return U.Type.List;case U.Type.Struct:return U.Type.Struct;case U.Type.Union:switch(r.mode){case U.UnionMode.Dense:return U.Type.DenseUnion;case U.UnionMode.Sparse:return U.Type.SparseUnion}return U.Type.Union;case U.Type.FixedSizeBinary:return U.Type.FixedSizeBinary;case U.Type.FixedSizeList:return U.Type.FixedSizeList;case U.Type.Dictionary:return U.Type.Dictionary}throw new Error(`Unrecognized type '${U.Type[r.typeId]}'`)}je.prototype.visitInt8=null;je.prototype.visitInt16=null;je.prototype.visitInt32=null;je.prototype.visitInt64=null;je.prototype.visitUint8=null;je.prototype.visitUint16=null;je.prototype.visitUint32=null;je.prototype.visitUint64=null;je.prototype.visitFloat16=null;je.prototype.visitFloat32=null;je.prototype.visitFloat64=null;je.prototype.visitDateDay=null;je.prototype.visitDateMillisecond=null;je.prototype.visitTimestampSecond=null;je.prototype.visitTimestampMillisecond=null;je.prototype.visitTimestampMicrosecond=null;je.prototype.visitTimestampNanosecond=null;je.prototype.visitTimeSecond=null;je.prototype.visitTimeMillisecond=null;je.prototype.visitTimeMicrosecond=null;je.prototype.visitTimeNanosecond=null;je.prototype.visitDenseUnion=null;je.prototype.visitSparseUnion=null;je.prototype.visitIntervalDayTime=null;je.prototype.visitIntervalYearMonth=null});var bu=V(st=>{"use strict";Object.defineProperty(st,"__esModule",{value:!0});st.instance=st.TypeComparator=void 0;var Q1=et(),J=class extends Q1.Visitor{compareSchemas(e,t){return e===t||t instanceof e.constructor&&st.instance.compareFields(e.fields,t.fields)}compareFields(e,t){return e===t||Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&e.every((i,n)=>st.instance.compareField(i,t[n]))}compareField(e,t){return e===t||t instanceof e.constructor&&e.name===t.name&&e.nullable===t.nullable&&st.instance.visit(e.type,t.type)}};st.TypeComparator=J;function ft(r,e){return e instanceof r.constructor}function Rn(r,e){return r===e||ft(r,e)}function pr(r,e){return r===e||ft(r,e)&&r.bitWidth===e.bitWidth&&r.isSigned===e.isSigned}function Ks(r,e){return r===e||ft(r,e)&&r.precision===e.precision}function X1(r,e){return r===e||ft(r,e)&&r.byteWidth===e.byteWidth}function yu(r,e){return r===e||ft(r,e)&&r.unit===e.unit}function Nn(r,e){return r===e||ft(r,e)&&r.unit===e.unit&&r.timezone===e.timezone}function xn(r,e){return r===e||ft(r,e)&&r.unit===e.unit&&r.bitWidth===e.bitWidth}function Z1(r,e){return r===e||ft(r,e)&&r.children.length===e.children.length&&st.instance.compareFields(r.children,e.children)}function eS(r,e){return r===e||ft(r,e)&&r.children.length===e.children.length&&st.instance.compareFields(r.children,e.children)}function mu(r,e){return r===e||ft(r,e)&&r.mode===e.mode&&r.typeIds.every((t,i)=>t===e.typeIds[i])&&st.instance.compareFields(r.children,e.children)}function tS(r,e){return r===e||ft(r,e)&&r.id===e.id&&r.isOrdered===e.isOrdered&&st.instance.visit(r.indices,e.indices)&&st.instance.visit(r.dictionary,e.dictionary)}function _u(r,e){return r===e||ft(r,e)&&r.unit===e.unit}function rS(r,e){return r===e||ft(r,e)&&r.listSize===e.listSize&&r.children.length===e.children.length&&st.instance.compareFields(r.children,e.children)}function iS(r,e){return r===e||ft(r,e)&&r.keysSorted===e.keysSorted&&r.children.length===e.children.length&&st.instance.compareFields(r.children,e.children)}J.prototype.visitNull=Rn;J.prototype.visitBool=Rn;J.prototype.visitInt=pr;J.prototype.visitInt8=pr;J.prototype.visitInt16=pr;J.prototype.visitInt32=pr;J.prototype.visitInt64=pr;J.prototype.visitUint8=pr;J.prototype.visitUint16=pr;J.prototype.visitUint32=pr;J.prototype.visitUint64=pr;J.prototype.visitFloat=Ks;J.prototype.visitFloat16=Ks;J.prototype.visitFloat32=Ks;J.prototype.visitFloat64=Ks;J.prototype.visitUtf8=Rn;J.prototype.visitBinary=Rn;J.prototype.visitFixedSizeBinary=X1;J.prototype.visitDate=yu;J.prototype.visitDateDay=yu;J.prototype.visitDateMillisecond=yu;J.prototype.visitTimestamp=Nn;J.prototype.visitTimestampSecond=Nn;J.prototype.visitTimestampMillisecond=Nn;J.prototype.visitTimestampMicrosecond=Nn;J.prototype.visitTimestampNanosecond=Nn;J.prototype.visitTime=xn;J.prototype.visitTimeSecond=xn;J.prototype.visitTimeMillisecond=xn;J.prototype.visitTimeMicrosecond=xn;J.prototype.visitTimeNanosecond=xn;J.prototype.visitDecimal=Rn;J.prototype.visitList=Z1;J.prototype.visitStruct=eS;J.prototype.visitUnion=mu;J.prototype.visitDenseUnion=mu;J.prototype.visitSparseUnion=mu;J.prototype.visitDictionary=tS;J.prototype.visitInterval=_u;J.prototype.visitIntervalDayTime=_u;J.prototype.visitIntervalYearMonth=_u;J.prototype.visitFixedSizeList=rS;J.prototype.visitMap=iS;st.instance=new J});var _e=V(R=>{"use strict";Object.defineProperty(R,"__esModule",{value:!0});R.strideForType=R.Dictionary=R.Map_=R.FixedSizeList=R.FixedSizeBinary=R.SparseUnion=R.DenseUnion=R.Union=R.Struct=R.List=R.IntervalYearMonth=R.IntervalDayTime=R.Interval=R.TimestampNanosecond=R.TimestampMicrosecond=R.TimestampMillisecond=R.TimestampSecond=R.Timestamp=R.TimeNanosecond=R.TimeMicrosecond=R.TimeMillisecond=R.TimeSecond=R.Time=R.DateMillisecond=R.DateDay=R.Date_=R.Decimal=R.Bool=R.Utf8=R.Binary=R.Float64=R.Float32=R.Float16=R.Float=R.Uint64=R.Uint32=R.Uint16=R.Uint8=R.Int64=R.Int32=R.Int16=R.Int8=R.Int=R.Null=R.DataType=void 0;var nS=bu(),q=Be(),Fe=class{static isNull(e){return e&&e.typeId===q.Type.Null}static isInt(e){return e&&e.typeId===q.Type.Int}static isFloat(e){return e&&e.typeId===q.Type.Float}static isBinary(e){return e&&e.typeId===q.Type.Binary}static isUtf8(e){return e&&e.typeId===q.Type.Utf8}static isBool(e){return e&&e.typeId===q.Type.Bool}static isDecimal(e){return e&&e.typeId===q.Type.Decimal}static isDate(e){return e&&e.typeId===q.Type.Date}static isTime(e){return e&&e.typeId===q.Type.Time}static isTimestamp(e){return e&&e.typeId===q.Type.Timestamp}static isInterval(e){return e&&e.typeId===q.Type.Interval}static isList(e){return e&&e.typeId===q.Type.List}static isStruct(e){return e&&e.typeId===q.Type.Struct}static isUnion(e){return e&&e.typeId===q.Type.Union}static isFixedSizeBinary(e){return e&&e.typeId===q.Type.FixedSizeBinary}static isFixedSizeList(e){return e&&e.typeId===q.Type.FixedSizeList}static isMap(e){return e&&e.typeId===q.Type.Map}static isDictionary(e){return e&&e.typeId===q.Type.Dictionary}get typeId(){return q.Type.NONE}compareTo(e){return nS.instance.visit(this,e)}};R.DataType=Fe;Fe[Symbol.toStringTag]=(r=>(r.children=null,r.ArrayType=Array,r[Symbol.toStringTag]="DataType"))(Fe.prototype);var Gs=class extends Fe{toString(){return"Null"}get typeId(){return q.Type.Null}};R.Null=Gs;Gs[Symbol.toStringTag]=(r=>r[Symbol.toStringTag]="Null")(Gs.prototype);var gt=class extends Fe{constructor(e,t){super();this.isSigned=e,this.bitWidth=t}get typeId(){return q.Type.Int}get ArrayType(){switch(this.bitWidth){case 8:return this.isSigned?Int8Array:Uint8Array;case 16:return this.isSigned?Int16Array:Uint16Array;case 32:return this.isSigned?Int32Array:Uint32Array;case 64:return this.isSigned?Int32Array:Uint32Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}};R.Int=gt;gt[Symbol.toStringTag]=(r=>(r.isSigned=null,r.bitWidth=null,r[Symbol.toStringTag]="Int"))(gt.prototype);var gu=class extends gt{constructor(){super(!0,8)}};R.Int8=gu;var vu=class extends gt{constructor(){super(!0,16)}};R.Int16=vu;var ju=class extends gt{constructor(){super(!0,32)}};R.Int32=ju;var wu=class extends gt{constructor(){super(!0,64)}};R.Int64=wu;var Bu=class extends gt{constructor(){super(!1,8)}};R.Uint8=Bu;var Tu=class extends gt{constructor(){super(!1,16)}};R.Uint16=Tu;var Iu=class extends gt{constructor(){super(!1,32)}};R.Uint32=Iu;var Su=class extends gt{constructor(){super(!1,64)}};R.Uint64=Su;Object.defineProperty(gu.prototype,"ArrayType",{value:Int8Array});Object.defineProperty(vu.prototype,"ArrayType",{value:Int16Array});Object.defineProperty(ju.prototype,"ArrayType",{value:Int32Array});Object.defineProperty(wu.prototype,"ArrayType",{value:Int32Array});Object.defineProperty(Bu.prototype,"ArrayType",{value:Uint8Array});Object.defineProperty(Tu.prototype,"ArrayType",{value:Uint16Array});Object.defineProperty(Iu.prototype,"ArrayType",{value:Uint32Array});Object.defineProperty(Su.prototype,"ArrayType",{value:Uint32Array});var fi=class extends Fe{constructor(e){super();this.precision=e}get typeId(){return q.Type.Float}get ArrayType(){switch(this.precision){case q.Precision.HALF:return Uint16Array;case q.Precision.SINGLE:return Float32Array;case q.Precision.DOUBLE:return Float64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}};R.Float=fi;fi[Symbol.toStringTag]=(r=>(r.precision=null,r[Symbol.toStringTag]="Float"))(fi.prototype);var Du=class extends fi{constructor(){super(q.Precision.HALF)}};R.Float16=Du;var Ou=class extends fi{constructor(){super(q.Precision.SINGLE)}};R.Float32=Ou;var Au=class extends fi{constructor(){super(q.Precision.DOUBLE)}};R.Float64=Au;Object.defineProperty(Du.prototype,"ArrayType",{value:Uint16Array});Object.defineProperty(Ou.prototype,"ArrayType",{value:Float32Array});Object.defineProperty(Au.prototype,"ArrayType",{value:Float64Array});var Qs=class extends Fe{constructor(){super()}get typeId(){return q.Type.Binary}toString(){return"Binary"}};R.Binary=Qs;Qs[Symbol.toStringTag]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Binary"))(Qs.prototype);var Xs=class extends Fe{constructor(){super()}get typeId(){return q.Type.Utf8}toString(){return"Utf8"}};R.Utf8=Xs;Xs[Symbol.toStringTag]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Utf8"))(Xs.prototype);var Zs=class extends Fe{constructor(){super()}get typeId(){return q.Type.Bool}toString(){return"Bool"}};R.Bool=Zs;Zs[Symbol.toStringTag]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Bool"))(Zs.prototype);var ea=class extends Fe{constructor(e,t){super();this.scale=e,this.precision=t}get typeId(){return q.Type.Decimal}toString(){return`Decimal[${this.precision}e${this.scale>0?"+":""}${this.scale}]`}};R.Decimal=ea;ea[Symbol.toStringTag]=(r=>(r.scale=null,r.precision=null,r.ArrayType=Uint32Array,r[Symbol.toStringTag]="Decimal"))(ea.prototype);var Ni=class extends Fe{constructor(e){super();this.unit=e}get typeId(){return q.Type.Date}toString(){return`Date${(this.unit+1)*32}<${q.DateUnit[this.unit]}>`}};R.Date_=Ni;Ni[Symbol.toStringTag]=(r=>(r.unit=null,r.ArrayType=Int32Array,r[Symbol.toStringTag]="Date"))(Ni.prototype);var wy=class extends Ni{constructor(){super(q.DateUnit.DAY)}};R.DateDay=wy;var By=class extends Ni{constructor(){super(q.DateUnit.MILLISECOND)}};R.DateMillisecond=By;var Dr=class extends Fe{constructor(e,t){super();this.unit=e,this.bitWidth=t}get typeId(){return q.Type.Time}toString(){return`Time${this.bitWidth}<${q.TimeUnit[this.unit]}>`}};R.Time=Dr;Dr[Symbol.toStringTag]=(r=>(r.unit=null,r.bitWidth=null,r.ArrayType=Int32Array,r[Symbol.toStringTag]="Time"))(Dr.prototype);var Ty=class extends Dr{constructor(){super(q.TimeUnit.SECOND,32)}};R.TimeSecond=Ty;var Iy=class extends Dr{constructor(){super(q.TimeUnit.MILLISECOND,32)}};R.TimeMillisecond=Iy;var Sy=class extends Dr{constructor(){super(q.TimeUnit.MICROSECOND,64)}};R.TimeMicrosecond=Sy;var Dy=class extends Dr{constructor(){super(q.TimeUnit.NANOSECOND,64)}};R.TimeNanosecond=Dy;var Or=class extends Fe{constructor(e,t){super();this.unit=e,this.timezone=t}get typeId(){return q.Type.Timestamp}toString(){return`Timestamp<${q.TimeUnit[this.unit]}${this.timezone?`, ${this.timezone}`:""}>`}};R.Timestamp=Or;Or[Symbol.toStringTag]=(r=>(r.unit=null,r.timezone=null,r.ArrayType=Int32Array,r[Symbol.toStringTag]="Timestamp"))(Or.prototype);var Oy=class extends Or{constructor(e){super(q.TimeUnit.SECOND,e)}};R.TimestampSecond=Oy;var Ay=class extends Or{constructor(e){super(q.TimeUnit.MILLISECOND,e)}};R.TimestampMillisecond=Ay;var Fy=class extends Or{constructor(e){super(q.TimeUnit.MICROSECOND,e)}};R.TimestampMicrosecond=Fy;var My=class extends Or{constructor(e){super(q.TimeUnit.NANOSECOND,e)}};R.TimestampNanosecond=My;var xi=class extends Fe{constructor(e){super();this.unit=e}get typeId(){return q.Type.Interval}toString(){return`Interval<${q.IntervalUnit[this.unit]}>`}};R.Interval=xi;xi[Symbol.toStringTag]=(r=>(r.unit=null,r.ArrayType=Int32Array,r[Symbol.toStringTag]="Interval"))(xi.prototype);var Uy=class extends xi{constructor(){super(q.IntervalUnit.DAY_TIME)}};R.IntervalDayTime=Uy;var Cy=class extends xi{constructor(){super(q.IntervalUnit.YEAR_MONTH)}};R.IntervalYearMonth=Cy;var ta=class extends Fe{constructor(e){super();this.children=[e]}get typeId(){return q.Type.List}toString(){return`List<${this.valueType}>`}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}};R.List=ta;ta[Symbol.toStringTag]=(r=>(r.children=null,r[Symbol.toStringTag]="List"))(ta.prototype);var ra=class extends Fe{constructor(e){super();this.children=e}get typeId(){return q.Type.Struct}toString(){return`Struct<{${this.children.map(e=>`${e.name}:${e.type}`).join(", ")}}>`}};R.Struct=ra;ra[Symbol.toStringTag]=(r=>(r.children=null,r[Symbol.toStringTag]="Struct"))(ra.prototype);var Ei=class extends Fe{constructor(e,t,i){super();this.mode=e,this.children=i,this.typeIds=t=Int32Array.from(t),this.typeIdToChildIndex=t.reduce((n,a,c)=>(n[a]=c)&&n||n,Object.create(null))}get typeId(){return q.Type.Union}toString(){return`${this[Symbol.toStringTag]}<${this.children.map(e=>`${e.type}`).join(" | ")}>`}};R.Union=Ei;Ei[Symbol.toStringTag]=(r=>(r.mode=null,r.typeIds=null,r.children=null,r.typeIdToChildIndex=null,r.ArrayType=Int8Array,r[Symbol.toStringTag]="Union"))(Ei.prototype);var Vy=class extends Ei{constructor(e,t){super(q.UnionMode.Dense,e,t)}};R.DenseUnion=Vy;var ky=class extends Ei{constructor(e,t){super(q.UnionMode.Sparse,e,t)}};R.SparseUnion=ky;var ia=class extends Fe{constructor(e){super();this.byteWidth=e}get typeId(){return q.Type.FixedSizeBinary}toString(){return`FixedSizeBinary[${this.byteWidth}]`}};R.FixedSizeBinary=ia;ia[Symbol.toStringTag]=(r=>(r.byteWidth=null,r.ArrayType=Uint8Array,r[Symbol.toStringTag]="FixedSizeBinary"))(ia.prototype);var na=class extends Fe{constructor(e,t){super();this.listSize=e,this.children=[t]}get typeId(){return q.Type.FixedSizeList}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}toString(){return`FixedSizeList[${this.listSize}]<${this.valueType}>`}};R.FixedSizeList=na;na[Symbol.toStringTag]=(r=>(r.children=null,r.listSize=null,r[Symbol.toStringTag]="FixedSizeList"))(na.prototype);var sa=class extends Fe{constructor(e,t=!1){super();this.children=[e],this.keysSorted=t}get typeId(){return q.Type.Map}get keyType(){return this.children[0].type.children[0].type}get valueType(){return this.children[0].type.children[1].type}toString(){return`Map<{${this.children[0].type.children.map(e=>`${e.name}:${e.type}`).join(", ")}}>`}};R.Map_=sa;sa[Symbol.toStringTag]=(r=>(r.children=null,r.keysSorted=null,r[Symbol.toStringTag]="Map_"))(sa.prototype);var sS=(r=>()=>++r)(-1),aa=class extends Fe{constructor(e,t,i,n){super();this.indices=t,this.dictionary=e,this.isOrdered=n||!1,this.id=i==null?sS():typeof i=="number"?i:i.low}get typeId(){return q.Type.Dictionary}get children(){return this.dictionary.children}get valueType(){return this.dictionary}get ArrayType(){return this.dictionary.ArrayType}toString(){return`Dictionary<${this.indices}, ${this.dictionary}>`}};R.Dictionary=aa;aa[Symbol.toStringTag]=(r=>(r.id=null,r.indices=null,r.isOrdered=null,r.dictionary=null,r[Symbol.toStringTag]="Dictionary"))(aa.prototype);function aS(r){let e=r;switch(r.typeId){case q.Type.Decimal:return 4;case q.Type.Timestamp:return 2;case q.Type.Date:return 1+e.unit;case q.Type.Interval:return 1+e.unit;case q.Type.Int:return 1+ +(e.bitWidth>32);case q.Type.Time:return 1+ +(e.bitWidth>32);case q.Type.FixedSizeList:return e.listSize;case q.Type.FixedSizeBinary:return e.byteWidth;default:return 1}}R.strideForType=aS});var kt=V(hi=>{"use strict";Object.defineProperty(hi,"__esModule",{value:!0});hi.Data=hi.kUnknownNullCount=void 0;var oS=Ht(),uS=Ht(),W=Be(),cS=_e(),fe=Pe();hi.kUnknownNullCount=-1;var ee=class{constructor(e,t,i,n,a,c,f){this.type=e,this.dictionary=f,this.offset=Math.floor(Math.max(t||0,0)),this.length=Math.floor(Math.max(i||0,0)),this._nullCount=Math.floor(Math.max(n||0,-1)),this.childData=(c||[]).map(s=>s instanceof ee?s:s.data);let w;a instanceof ee?(this.stride=a.stride,this.values=a.values,this.typeIds=a.typeIds,this.nullBitmap=a.nullBitmap,this.valueOffsets=a.valueOffsets):(this.stride=cS.strideForType(e),a&&((w=a[0])&&(this.valueOffsets=w),(w=a[1])&&(this.values=w),(w=a[2])&&(this.nullBitmap=w),(w=a[3])&&(this.typeIds=w)))}get typeId(){return this.type.typeId}get ArrayType(){return this.type.ArrayType}get buffers(){return[this.valueOffsets,this.values,this.nullBitmap,this.typeIds]}get byteLength(){let e=0,{valueOffsets:t,values:i,nullBitmap:n,typeIds:a}=this;return t&&(e+=t.byteLength),i&&(e+=i.byteLength),n&&(e+=n.byteLength),a&&(e+=a.byteLength),this.childData.reduce((c,f)=>c+f.byteLength,e)}get nullCount(){let e=this._nullCount,t;return e<=hi.kUnknownNullCount&&(t=this.nullBitmap)&&(this._nullCount=e=this.length-uS.popcnt_bit_range(t,this.offset,this.offset+this.length)),e}clone(e,t=this.offset,i=this.length,n=this._nullCount,a=this,c=this.childData){return new ee(e,t,i,n,a,c,this.dictionary)}slice(e,t){let{stride:i,typeId:n,childData:a}=this,c=+(this._nullCount===0)-1,f=n===16?i:1,w=this._sliceBuffers(e,t,i,n);return this.clone(this.type,this.offset+e,t,c,w,!a.length||this.valueOffsets?a:this._sliceChildren(a,f*e,f*t))}_changeLengthAndBackfillNullBitmap(e){if(this.typeId===W.Type.Null)return this.clone(this.type,0,e,0);let{length:t,nullCount:i}=this,n=new Uint8Array((e+63&~63)>>3).fill(255,0,t>>3);n[t>>3]=(1<<t-(t&~7))-1,i>0&&n.set(oS.truncateBitmap(this.offset,t,this.nullBitmap),0);let a=this.buffers;return a[W.BufferType.VALIDITY]=n,this.clone(this.type,0,e,i+(e-t),a)}_sliceBuffers(e,t,i,n){let a,{buffers:c}=this;return(a=c[W.BufferType.TYPE])&&(c[W.BufferType.TYPE]=a.subarray(e,e+t)),(a=c[W.BufferType.OFFSET])&&(c[W.BufferType.OFFSET]=a.subarray(e,e+t+1))||(a=c[W.BufferType.DATA])&&(c[W.BufferType.DATA]=n===6?a:a.subarray(i*e,i*(e+t))),c}_sliceChildren(e,t,i){return e.map(n=>n.slice(t,i))}static new(e,t,i,n,a,c,f){switch(a instanceof ee?a=a.buffers:a||(a=[]),e.typeId){case W.Type.Null:return ee.Null(e,t,i);case W.Type.Int:return ee.Int(e,t,i,n||0,a[W.BufferType.VALIDITY],a[W.BufferType.DATA]||[]);case W.Type.Dictionary:return ee.Dictionary(e,t,i,n||0,a[W.BufferType.VALIDITY],a[W.BufferType.DATA]||[],f);case W.Type.Float:return ee.Float(e,t,i,n||0,a[W.BufferType.VALIDITY],a[W.BufferType.DATA]||[]);case W.Type.Bool:return ee.Bool(e,t,i,n||0,a[W.BufferType.VALIDITY],a[W.BufferType.DATA]||[]);case W.Type.Decimal:return ee.Decimal(e,t,i,n||0,a[W.BufferType.VALIDITY],a[W.BufferType.DATA]||[]);case W.Type.Date:return ee.Date(e,t,i,n||0,a[W.BufferType.VALIDITY],a[W.BufferType.DATA]||[]);case W.Type.Time:return ee.Time(e,t,i,n||0,a[W.BufferType.VALIDITY],a[W.BufferType.DATA]||[]);case W.Type.Timestamp:return ee.Timestamp(e,t,i,n||0,a[W.BufferType.VALIDITY],a[W.BufferType.DATA]||[]);case W.Type.Interval:return ee.Interval(e,t,i,n||0,a[W.BufferType.VALIDITY],a[W.BufferType.DATA]||[]);case W.Type.FixedSizeBinary:return ee.FixedSizeBinary(e,t,i,n||0,a[W.BufferType.VALIDITY],a[W.BufferType.DATA]||[]);case W.Type.Binary:return ee.Binary(e,t,i,n||0,a[W.BufferType.VALIDITY],a[W.BufferType.OFFSET]||[],a[W.BufferType.DATA]||[]);case W.Type.Utf8:return ee.Utf8(e,t,i,n||0,a[W.BufferType.VALIDITY],a[W.BufferType.OFFSET]||[],a[W.BufferType.DATA]||[]);case W.Type.List:return ee.List(e,t,i,n||0,a[W.BufferType.VALIDITY],a[W.BufferType.OFFSET]||[],(c||[])[0]);case W.Type.FixedSizeList:return ee.FixedSizeList(e,t,i,n||0,a[W.BufferType.VALIDITY],(c||[])[0]);case W.Type.Struct:return ee.Struct(e,t,i,n||0,a[W.BufferType.VALIDITY],c||[]);case W.Type.Map:return ee.Map(e,t,i,n||0,a[W.BufferType.VALIDITY],a[W.BufferType.OFFSET]||[],(c||[])[0]);case W.Type.Union:return ee.Union(e,t,i,n||0,a[W.BufferType.VALIDITY],a[W.BufferType.TYPE]||[],a[W.BufferType.OFFSET]||c,c)}throw new Error(`Unrecognized typeId ${e.typeId}`)}static Null(e,t,i){return new ee(e,t,i,0)}static Int(e,t,i,n,a,c){return new ee(e,t,i,n,[void 0,fe.toArrayBufferView(e.ArrayType,c),fe.toUint8Array(a)])}static Dictionary(e,t,i,n,a,c,f){return new ee(e,t,i,n,[void 0,fe.toArrayBufferView(e.indices.ArrayType,c),fe.toUint8Array(a)],[],f)}static Float(e,t,i,n,a,c){return new ee(e,t,i,n,[void 0,fe.toArrayBufferView(e.ArrayType,c),fe.toUint8Array(a)])}static Bool(e,t,i,n,a,c){return new ee(e,t,i,n,[void 0,fe.toArrayBufferView(e.ArrayType,c),fe.toUint8Array(a)])}static Decimal(e,t,i,n,a,c){return new ee(e,t,i,n,[void 0,fe.toArrayBufferView(e.ArrayType,c),fe.toUint8Array(a)])}static Date(e,t,i,n,a,c){return new ee(e,t,i,n,[void 0,fe.toArrayBufferView(e.ArrayType,c),fe.toUint8Array(a)])}static Time(e,t,i,n,a,c){return new ee(e,t,i,n,[void 0,fe.toArrayBufferView(e.ArrayType,c),fe.toUint8Array(a)])}static Timestamp(e,t,i,n,a,c){return new ee(e,t,i,n,[void 0,fe.toArrayBufferView(e.ArrayType,c),fe.toUint8Array(a)])}static Interval(e,t,i,n,a,c){return new ee(e,t,i,n,[void 0,fe.toArrayBufferView(e.ArrayType,c),fe.toUint8Array(a)])}static FixedSizeBinary(e,t,i,n,a,c){return new ee(e,t,i,n,[void 0,fe.toArrayBufferView(e.ArrayType,c),fe.toUint8Array(a)])}static Binary(e,t,i,n,a,c,f){return new ee(e,t,i,n,[fe.toInt32Array(c),fe.toUint8Array(f),fe.toUint8Array(a)])}static Utf8(e,t,i,n,a,c,f){return new ee(e,t,i,n,[fe.toInt32Array(c),fe.toUint8Array(f),fe.toUint8Array(a)])}static List(e,t,i,n,a,c,f){return new ee(e,t,i,n,[fe.toInt32Array(c),void 0,fe.toUint8Array(a)],f?[f]:[])}static FixedSizeList(e,t,i,n,a,c){return new ee(e,t,i,n,[void 0,void 0,fe.toUint8Array(a)],c?[c]:[])}static Struct(e,t,i,n,a,c){return new ee(e,t,i,n,[void 0,void 0,fe.toUint8Array(a)],c)}static Map(e,t,i,n,a,c,f){return new ee(e,t,i,n,[fe.toInt32Array(c),void 0,fe.toUint8Array(a)],f?[f]:[])}static Union(e,t,i,n,a,c,f,w){let s=[void 0,void 0,fe.toUint8Array(a),fe.toArrayBufferView(e.ArrayType,c)];return e.mode===W.UnionMode.Sparse?new ee(e,t,i,n,s,f):(s[W.BufferType.OFFSET]=fe.toInt32Array(f),new ee(e,t,i,n,s,w))}};hi.Data=ee;ee.prototype.childData=Object.freeze([])});var Fu=V(oa=>{"use strict";Object.defineProperty(oa,"__esModule",{value:!0});oa.valueToString=void 0;var lS=void 0;function dS(r){if(r===null)return"null";if(r===lS)return"undefined";switch(typeof r){case"number":return`${r}`;case"bigint":return`${r}`;case"string":return`"${r}"`}return typeof r[Symbol.toPrimitive]=="function"?r[Symbol.toPrimitive]("string"):ArrayBuffer.isView(r)?`[${r}]`:JSON.stringify(r)}oa.valueToString=dS});var Py=V(ua=>{"use strict";Object.defineProperty(ua,"__esModule",{value:!0});ua.createIsValidFunction=void 0;var Mu=Fu(),fS=nt();function hS(r){if(!r||r.length<=0)return function(n){return!0};let e="",t=r.filter(i=>i===i);return t.length>0&&(e=`
|
|
2
|
-
switch (x) {${t.map(i=>`
|
|
3
|
-
case ${pS(i)}:`).join("")}
|
|
4
|
-
return false;
|
|
5
|
-
}`),r.length!==t.length&&(e=`if (x !== x) return false;
|
|
6
|
-
${e}`),new Function("x",`${e}
|
|
7
|
-
return true;`)}ua.createIsValidFunction=hS;function pS(r){return typeof r!="bigint"?Mu.valueToString(r):fS.BigIntAvailable?`${Mu.valueToString(r)}n`:`"${Mu.valueToString(r)}"`}});var Ar=V(vt=>{"use strict";Object.defineProperty(vt,"__esModule",{value:!0});vt.WideBufferBuilder=vt.OffsetsBufferBuilder=vt.BitmapBufferBuilder=vt.DataBufferBuilder=vt.BufferBuilder=void 0;var Ry=Pe(),Uu=nt(),Cu=(r,e)=>(r*e+63&~63||64)/e,yS=(r,e=0)=>r.length>=e?r.subarray(0,e):Ry.memcpy(new r.constructor(e),r,0),En=class{constructor(e,t=1){this.buffer=e,this.stride=t,this.BYTES_PER_ELEMENT=e.BYTES_PER_ELEMENT,this.ArrayType=e.constructor,this._resize(this.length=e.length/t|0)}get byteLength(){return this.length*this.stride*this.BYTES_PER_ELEMENT|0}get reservedLength(){return this.buffer.length/this.stride}get reservedByteLength(){return this.buffer.byteLength}set(e,t){return this}append(e){return this.set(this.length,e)}reserve(e){if(e>0){this.length+=e;let t=this.stride,i=this.length*t,n=this.buffer.length;i>=n&&this._resize(n===0?Cu(i*1,this.BYTES_PER_ELEMENT):Cu(i*2,this.BYTES_PER_ELEMENT))}return this}flush(e=this.length){e=Cu(e*this.stride,this.BYTES_PER_ELEMENT);let t=yS(this.buffer,e);return this.clear(),t}clear(){return this.length=0,this._resize(0),this}_resize(e){return this.buffer=Ry.memcpy(new this.ArrayType(e),this.buffer)}};vt.BufferBuilder=En;En.prototype.offset=0;var ca=class extends En{last(){return this.get(this.length-1)}get(e){return this.buffer[e]}set(e,t){return this.reserve(e-this.length+1),this.buffer[e*this.stride]=t,this}};vt.DataBufferBuilder=ca;var Ny=class extends ca{constructor(e=new Uint8Array(0)){super(e,1/8);this.numValid=0}get numInvalid(){return this.length-this.numValid}get(e){return this.buffer[e>>3]>>e%8&1}set(e,t){let{buffer:i}=this.reserve(e-this.length+1),n=e>>3,a=e%8,c=i[n]>>a&1;return t?c===0&&(i[n]|=1<<a,++this.numValid):c===1&&(i[n]&=~(1<<a),--this.numValid),this}clear(){return this.numValid=0,super.clear()}};vt.BitmapBufferBuilder=Ny;var xy=class extends ca{constructor(e=new Int32Array(1)){super(e,1)}append(e){return this.set(this.length-1,e)}set(e,t){let i=this.length-1,n=this.reserve(e-i+1).buffer;return i<e++&&n.fill(n[i],i,e),n[e]=n[e-1]+t,this}flush(e=this.length-1){return e>this.length&&this.set(e-1,0),super.flush(e+1)}};vt.OffsetsBufferBuilder=xy;var Ey=class extends En{get ArrayType64(){return this._ArrayType64||(this._ArrayType64=this.buffer instanceof Int32Array?Uu.BigInt64Array:Uu.BigUint64Array)}set(e,t){switch(this.reserve(e-this.length+1),typeof t){case"bigint":this.buffer64[e]=t;break;case"number":this.buffer[e*this.stride]=t;break;default:this.buffer.set(t,e*this.stride)}return this}_resize(e){let t=super._resize(e),i=t.byteLength/(this.BYTES_PER_ELEMENT*this.stride);return Uu.BigIntAvailable&&(this.buffer64=new this.ArrayType64(t.buffer,t.byteOffset,i)),t}};vt.WideBufferBuilder=Ey});var Me=V(Fr=>{"use strict";Object.defineProperty(Fr,"__esModule",{value:!0});Fr.VariableWidthBuilder=Fr.FixedWidthBuilder=Fr.Builder=void 0;var mS=Ve(),Li=Be(),_S=kt(),bS=Py(),Vu=Ar(),gS=_e(),jt=class{constructor({type:e,nullValues:t}){this.length=0,this.finished=!1,this.type=e,this.children=[],this.nullValues=t,this.stride=gS.strideForType(e),this._nulls=new Vu.BitmapBufferBuilder,t&&t.length>0&&(this._isValid=bS.createIsValidFunction(t))}static new(e){}static throughNode(e){throw new Error('"throughNode" not available in this environment')}static throughDOM(e){throw new Error('"throughDOM" not available in this environment')}static throughIterable(e){return vS(e)}static throughAsyncIterable(e){return jS(e)}toVector(){return mS.Vector.new(this.flush())}get ArrayType(){return this.type.ArrayType}get nullCount(){return this._nulls.numInvalid}get numChildren(){return this.children.length}get byteLength(){let e=0;return this._offsets&&(e+=this._offsets.byteLength),this._values&&(e+=this._values.byteLength),this._nulls&&(e+=this._nulls.byteLength),this._typeIds&&(e+=this._typeIds.byteLength),this.children.reduce((t,i)=>t+i.byteLength,e)}get reservedLength(){return this._nulls.reservedLength}get reservedByteLength(){let e=0;return this._offsets&&(e+=this._offsets.reservedByteLength),this._values&&(e+=this._values.reservedByteLength),this._nulls&&(e+=this._nulls.reservedByteLength),this._typeIds&&(e+=this._typeIds.reservedByteLength),this.children.reduce((t,i)=>t+i.reservedByteLength,e)}get valueOffsets(){return this._offsets?this._offsets.buffer:null}get values(){return this._values?this._values.buffer:null}get nullBitmap(){return this._nulls?this._nulls.buffer:null}get typeIds(){return this._typeIds?this._typeIds.buffer:null}append(e){return this.set(this.length,e)}isValid(e){return this._isValid(e)}set(e,t){return this.setValid(e,this.isValid(t))&&this.setValue(e,t),this}setValue(e,t){this._setValue(this,e,t)}setValid(e,t){return this.length=this._nulls.set(e,+t).length,t}addChild(e,t=`${this.numChildren}`){throw new Error(`Cannot append children to non-nested type "${this.type}"`)}getChildAt(e){return this.children[e]||null}flush(){let e=[],t=this._values,i=this._offsets,n=this._typeIds,{length:a,nullCount:c}=this;n?(e[Li.BufferType.TYPE]=n.flush(a),i&&(e[Li.BufferType.OFFSET]=i.flush(a))):i?(t&&(e[Li.BufferType.DATA]=t.flush(i.last())),e[Li.BufferType.OFFSET]=i.flush(a)):t&&(e[Li.BufferType.DATA]=t.flush(a)),c>0&&(e[Li.BufferType.VALIDITY]=this._nulls.flush(a));let f=_S.Data.new(this.type,0,a,c,e,this.children.map(w=>w.flush()));return this.clear(),f}finish(){return this.finished=!0,this.children.forEach(e=>e.finish()),this}clear(){return this.length=0,this._offsets&&this._offsets.clear(),this._values&&this._values.clear(),this._nulls&&this._nulls.clear(),this._typeIds&&this._typeIds.clear(),this.children.forEach(e=>e.clear()),this}};Fr.Builder=jt;jt.prototype.length=1;jt.prototype.stride=1;jt.prototype.children=null;jt.prototype.finished=!1;jt.prototype.nullValues=null;jt.prototype._isValid=()=>!0;var Ly=class extends jt{constructor(e){super(e);this._values=new Vu.DataBufferBuilder(new this.ArrayType(0),this.stride)}setValue(e,t){let i=this._values;return i.reserve(e-i.length+1),super.setValue(e,t)}};Fr.FixedWidthBuilder=Ly;var qy=class extends jt{constructor(e){super(e);this._pendingLength=0,this._offsets=new Vu.OffsetsBufferBuilder}setValue(e,t){let i=this._pending||(this._pending=new Map),n=i.get(e);n&&(this._pendingLength-=n.length),this._pendingLength+=t.length,i.set(e,t)}setValid(e,t){return super.setValid(e,t)?!0:((this._pending||(this._pending=new Map)).set(e,void 0),!1)}clear(){return this._pendingLength=0,this._pending=void 0,super.clear()}flush(){return this._flush(),super.flush()}finish(){return this._flush(),super.finish()}_flush(){let e=this._pending,t=this._pendingLength;return this._pendingLength=0,this._pending=void 0,e&&e.size>0&&this._flushPending(e,t),this}};Fr.VariableWidthBuilder=qy;function vS(r){let{["queueingStrategy"]:e="count"}=r,{["highWaterMark"]:t=e!=="bytes"?1e3:2**14}=r,i=e!=="bytes"?"length":"byteLength";return function*(n){let a=0,c=jt.new(r);for(let f of n)c.append(f)[i]>=t&&++a&&(yield c.toVector());(c.finish().length>0||a===0)&&(yield c.toVector())}}function jS(r){let{["queueingStrategy"]:e="count"}=r,{["highWaterMark"]:t=e!=="bytes"?1e3:2**14}=r,i=e!=="bytes"?"length":"byteLength";return async function*(n){let a=0,c=jt.new(r);for await(let f of n)c.append(f)[i]>=t&&++a&&(yield c.toVector());(c.finish().length>0||a===0)&&(yield c.toVector())}}});var ku=V(la=>{"use strict";Object.defineProperty(la,"__esModule",{value:!0});la.BoolBuilder=void 0;var wS=Ar(),BS=Me(),zy=class extends BS.Builder{constructor(e){super(e);this._values=new wS.BitmapBufferBuilder}setValue(e,t){this._values.set(e,+t)}};la.BoolBuilder=zy});var Pu=V(da=>{"use strict";Object.defineProperty(da,"__esModule",{value:!0});da.NullBuilder=void 0;var TS=Me(),Wy=class extends TS.Builder{setValue(e,t){}setValid(e,t){return this.length=Math.max(e+1,this.length),t}};da.NullBuilder=Wy});var Ru=V(Mr=>{"use strict";Object.defineProperty(Mr,"__esModule",{value:!0});Mr.DateMillisecondBuilder=Mr.DateDayBuilder=Mr.DateBuilder=void 0;var IS=Me(),fa=class extends IS.FixedWidthBuilder{};Mr.DateBuilder=fa;var Yy=class extends fa{};Mr.DateDayBuilder=Yy;var Hy=class extends fa{};Mr.DateMillisecondBuilder=Hy});var Nu=V(ha=>{"use strict";Object.defineProperty(ha,"__esModule",{value:!0});ha.DecimalBuilder=void 0;var SS=Me(),$y=class extends SS.FixedWidthBuilder{};ha.DecimalBuilder=$y});var Eu=V(pa=>{"use strict";Object.defineProperty(pa,"__esModule",{value:!0});pa.DictionaryBuilder=void 0;var DS=_e(),xu=Me(),Jy=class extends xu.Builder{constructor({type:e,nullValues:t,dictionaryHashFunction:i}){super({type:new DS.Dictionary(e.dictionary,e.indices,e.id,e.isOrdered)});this._nulls=null,this._dictionaryOffset=0,this._keysToIndices=Object.create(null),this.indices=xu.Builder.new({type:this.type.indices,nullValues:t}),this.dictionary=xu.Builder.new({type:this.type.dictionary,nullValues:null}),typeof i=="function"&&(this.valueToKey=i)}get values(){return this.indices.values}get nullCount(){return this.indices.nullCount}get nullBitmap(){return this.indices.nullBitmap}get byteLength(){return this.indices.byteLength+this.dictionary.byteLength}get reservedLength(){return this.indices.reservedLength+this.dictionary.reservedLength}get reservedByteLength(){return this.indices.reservedByteLength+this.dictionary.reservedByteLength}isValid(e){return this.indices.isValid(e)}setValid(e,t){let i=this.indices;return t=i.setValid(e,t),this.length=i.length,t}setValue(e,t){let i=this._keysToIndices,n=this.valueToKey(t),a=i[n];return a===void 0&&(i[n]=a=this._dictionaryOffset+this.dictionary.append(t).length-1),this.indices.setValue(e,a)}flush(){let e=this.type,t=this._dictionary,i=this.dictionary.toVector(),n=this.indices.flush().clone(e);return n.dictionary=t?t.concat(i):i,this.finished||(this._dictionaryOffset+=i.length),this._dictionary=n.dictionary,this.clear(),n}finish(){return this.indices.finish(),this.dictionary.finish(),this._dictionaryOffset=0,this._keysToIndices=Object.create(null),super.finish()}clear(){return this.indices.clear(),this.dictionary.clear(),super.clear()}valueToKey(e){return typeof e=="string"?e:`${e}`}};pa.DictionaryBuilder=Jy});var Lu=V(ya=>{"use strict";Object.defineProperty(ya,"__esModule",{value:!0});ya.FixedSizeBinaryBuilder=void 0;var OS=Me(),Ky=class extends OS.FixedWidthBuilder{};ya.FixedSizeBinaryBuilder=Ky});var Ln=V(zi=>{"use strict";Object.defineProperty(zi,"__esModule",{value:!0});zi.float64ToUint16=zi.uint16ToFloat64=void 0;var Gy=new Float64Array(1),qi=new Uint32Array(Gy.buffer);function AS(r){let e=(r&31744)>>10,t=(r&1023)/1024,i=(-1)**((r&32768)>>15);switch(e){case 31:return i*(t?NaN:1/0);case 0:return i*(t?6103515625e-14*t:0)}return i*2**(e-15)*(1+t)}zi.uint16ToFloat64=AS;function FS(r){if(r!==r)return 32256;Gy[0]=r;let e=(qi[1]&2147483648)>>16&65535,t=qi[1]&2146435072,i=0;return t>=1089470464?qi[0]>0?t=31744:(t=(t&2080374784)>>16,i=(qi[1]&1048575)>>10):t<=1056964608?(i=1048576+(qi[1]&1048575),i=1048576+(i<<(t>>20)-998)>>21,t=0):(t=t-1056964608>>10,i=(qi[1]&1048575)+512>>10),e|t|i&65535}zi.float64ToUint16=FS});var qu=V($t=>{"use strict";Object.defineProperty($t,"__esModule",{value:!0});$t.Float64Builder=$t.Float32Builder=$t.Float16Builder=$t.FloatBuilder=void 0;var MS=Ln(),US=Me(),qn=class extends US.FixedWidthBuilder{};$t.FloatBuilder=qn;var Qy=class extends qn{setValue(e,t){this._values.set(e,MS.float64ToUint16(t))}};$t.Float16Builder=Qy;var Xy=class extends qn{setValue(e,t){this._values.set(e,t)}};$t.Float32Builder=Xy;var Zy=class extends qn{setValue(e,t){this._values.set(e,t)}};$t.Float64Builder=Zy});var Yn=V(ze=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});ze.BN=ze.bignumToBigInt=ze.bignumToString=ze.isArrowBigNumSymbol=void 0;var CS=Pe(),zn=nt();ze.isArrowBigNumSymbol=Symbol.for("isArrowBigNum");function Pt(r,...e){return e.length===0?Object.setPrototypeOf(CS.toArrayBufferView(this.TypedArray,r),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(r,...e),this.constructor.prototype)}Pt.prototype[ze.isArrowBigNumSymbol]=!0;Pt.prototype.toJSON=function(){return`"${ze.bignumToString(this)}"`};Pt.prototype.valueOf=function(){return em(this)};Pt.prototype.toString=function(){return ze.bignumToString(this)};Pt.prototype[Symbol.toPrimitive]=function(r="default"){switch(r){case"number":return em(this);case"string":return ze.bignumToString(this);case"default":return ze.bignumToBigInt(this)}return ze.bignumToString(this)};function Wi(...r){return Pt.apply(this,r)}function Yi(...r){return Pt.apply(this,r)}function Wn(...r){return Pt.apply(this,r)}Object.setPrototypeOf(Wi.prototype,Object.create(Int32Array.prototype));Object.setPrototypeOf(Yi.prototype,Object.create(Uint32Array.prototype));Object.setPrototypeOf(Wn.prototype,Object.create(Uint32Array.prototype));Object.assign(Wi.prototype,Pt.prototype,{constructor:Wi,signed:!0,TypedArray:Int32Array,BigIntArray:zn.BigInt64Array});Object.assign(Yi.prototype,Pt.prototype,{constructor:Yi,signed:!1,TypedArray:Uint32Array,BigIntArray:zn.BigUint64Array});Object.assign(Wn.prototype,Pt.prototype,{constructor:Wn,signed:!0,TypedArray:Uint32Array,BigIntArray:zn.BigUint64Array});function em(r){let{buffer:e,byteOffset:t,length:i,signed:n}=r,a=new Int32Array(e,t,i),c=0,f=0,w=a.length,s,m;for(;f<w;)m=a[f++],s=a[f++],n||(s=s>>>0),c+=(m>>>0)+s*f**32;return c}zn.BigIntAvailable?(ze.bignumToBigInt=r=>r.byteLength===8?new r.BigIntArray(r.buffer,r.byteOffset,1)[0]:zu(r),ze.bignumToString=r=>r.byteLength===8?`${new r.BigIntArray(r.buffer,r.byteOffset,1)[0]}`:zu(r)):(ze.bignumToString=zu,ze.bignumToBigInt=ze.bignumToString);function zu(r){let e="",t=new Uint32Array(2),i=new Uint16Array(r.buffer,r.byteOffset,r.byteLength/2),n=new Uint32Array((i=new Uint16Array(i).reverse()).buffer),a=-1,c=i.length-1;do{for(t[0]=i[a=0];a<c;)i[a++]=t[1]=t[0]/10,t[0]=(t[0]-t[1]*10<<16)+i[a];i[a]=t[1]=t[0]/10,t[0]=t[0]-t[1]*10,e=`${t[0]}${e}`}while(n[0]||n[1]||n[2]||n[3]);return e||"0"}var ma=class{static new(e,t){switch(t){case!0:return new Wi(e);case!1:return new Yi(e)}switch(e.constructor){case Int8Array:case Int16Array:case Int32Array:case zn.BigInt64Array:return new Wi(e)}return e.byteLength===16?new Wn(e):new Yi(e)}static signed(e){return new Wi(e)}static unsigned(e){return new Yi(e)}static decimal(e){return new Wn(e)}constructor(e,t){return ma.new(e,t)}};ze.BN=ma});var Wu=V(Ne=>{"use strict";Object.defineProperty(Ne,"__esModule",{value:!0});Ne.Uint64Builder=Ne.Uint32Builder=Ne.Uint16Builder=Ne.Uint8Builder=Ne.Int64Builder=Ne.Int32Builder=Ne.Int16Builder=Ne.Int8Builder=Ne.IntBuilder=void 0;var VS=Yn(),tm=Ar(),kS=nt(),PS=Me(),Jt=class extends PS.FixedWidthBuilder{setValue(e,t){this._values.set(e,t)}};Ne.IntBuilder=Jt;var rm=class extends Jt{};Ne.Int8Builder=rm;var im=class extends Jt{};Ne.Int16Builder=im;var nm=class extends Jt{};Ne.Int32Builder=nm;var sm=class extends Jt{constructor(e){e.nullValues&&(e.nullValues=e.nullValues.map(_a));super(e);this._values=new tm.WideBufferBuilder(new Int32Array(0),2)}get values64(){return this._values.buffer64}isValid(e){return super.isValid(_a(e))}};Ne.Int64Builder=sm;var am=class extends Jt{};Ne.Uint8Builder=am;var om=class extends Jt{};Ne.Uint16Builder=om;var um=class extends Jt{};Ne.Uint32Builder=um;var cm=class extends Jt{constructor(e){e.nullValues&&(e.nullValues=e.nullValues.map(_a));super(e);this._values=new tm.WideBufferBuilder(new Uint32Array(0),2)}get values64(){return this._values.buffer64}isValid(e){return super.isValid(_a(e))}};Ne.Uint64Builder=cm;var _a=(r=>e=>(ArrayBuffer.isView(e)&&(r.buffer=e.buffer,r.byteOffset=e.byteOffset,r.byteLength=e.byteLength,e=VS.bignumToBigInt(r),r.buffer=null),e))({BigIntArray:kS.BigInt64Array})});var Yu=V(wt=>{"use strict";Object.defineProperty(wt,"__esModule",{value:!0});wt.TimeNanosecondBuilder=wt.TimeMicrosecondBuilder=wt.TimeMillisecondBuilder=wt.TimeSecondBuilder=wt.TimeBuilder=void 0;var RS=Me(),Hi=class extends RS.FixedWidthBuilder{};wt.TimeBuilder=Hi;var lm=class extends Hi{};wt.TimeSecondBuilder=lm;var dm=class extends Hi{};wt.TimeMillisecondBuilder=dm;var fm=class extends Hi{};wt.TimeMicrosecondBuilder=fm;var hm=class extends Hi{};wt.TimeNanosecondBuilder=hm});var Hu=V(Bt=>{"use strict";Object.defineProperty(Bt,"__esModule",{value:!0});Bt.TimestampNanosecondBuilder=Bt.TimestampMicrosecondBuilder=Bt.TimestampMillisecondBuilder=Bt.TimestampSecondBuilder=Bt.TimestampBuilder=void 0;var NS=Me(),$i=class extends NS.FixedWidthBuilder{};Bt.TimestampBuilder=$i;var pm=class extends $i{};Bt.TimestampSecondBuilder=pm;var ym=class extends $i{};Bt.TimestampMillisecondBuilder=ym;var mm=class extends $i{};Bt.TimestampMicrosecondBuilder=mm;var _m=class extends $i{};Bt.TimestampNanosecondBuilder=_m});var $u=V(Ur=>{"use strict";Object.defineProperty(Ur,"__esModule",{value:!0});Ur.IntervalYearMonthBuilder=Ur.IntervalDayTimeBuilder=Ur.IntervalBuilder=void 0;var xS=Me(),ba=class extends xS.FixedWidthBuilder{};Ur.IntervalBuilder=ba;var bm=class extends ba{};Ur.IntervalDayTimeBuilder=bm;var gm=class extends ba{};Ur.IntervalYearMonthBuilder=gm});var va=V(ga=>{"use strict";Object.defineProperty(ga,"__esModule",{value:!0});ga.BinaryBuilder=void 0;var ES=Pe(),LS=Ar(),qS=Me(),vm=class extends qS.VariableWidthBuilder{constructor(e){super(e);this._values=new LS.BufferBuilder(new Uint8Array(0))}get byteLength(){let e=this._pendingLength+this.length*4;return this._offsets&&(e+=this._offsets.byteLength),this._values&&(e+=this._values.byteLength),this._nulls&&(e+=this._nulls.byteLength),e}setValue(e,t){return super.setValue(e,ES.toUint8Array(t))}_flushPending(e,t){let i=this._offsets,n=this._values.reserve(t).buffer,a=0,c=0,f=0,w;for([a,w]of e)w===void 0?i.set(a,0):(c=w.length,n.set(w,f),i.set(a,c),f+=c)}};ga.BinaryBuilder=vm});var wa=V(ja=>{"use strict";Object.defineProperty(ja,"__esModule",{value:!0});ja.Utf8Builder=void 0;var zS=ci(),WS=va(),YS=Ar(),HS=Me(),Ju=class extends HS.VariableWidthBuilder{constructor(e){super(e);this._values=new YS.BufferBuilder(new Uint8Array(0))}get byteLength(){let e=this._pendingLength+this.length*4;return this._offsets&&(e+=this._offsets.byteLength),this._values&&(e+=this._values.byteLength),this._nulls&&(e+=this._nulls.byteLength),e}setValue(e,t){return super.setValue(e,zS.encodeUtf8(t))}_flushPending(e,t){}};ja.Utf8Builder=Ju;Ju.prototype._flushPending=WS.BinaryBuilder.prototype._flushPending});var Ku=V(Ba=>{"use strict";Object.defineProperty(Ba,"__esModule",{value:!0});Ba.Run=void 0;var $S=Ve(),jm=class{get length(){return this._values.length}get(e){return this._values[e]}clear(){return this._values=null,this}bind(e){return e instanceof $S.Vector?e:(this._values=e,this)}};Ba.Run=jm});var Hn=V(Ki=>{"use strict";Object.defineProperty(Ki,"__esModule",{value:!0});Ki.StructRow=Ki.MapRow=void 0;var wm=Fu(),tt=Symbol.for("parent"),Ji=Symbol.for("rowIndex"),pt=Symbol.for("keyToIdx"),yt=Symbol.for("idxToVal"),Gu=Symbol.for("nodejs.util.inspect.custom"),Kt=class{constructor(e,t){this[tt]=e,this.size=t}entries(){return this[Symbol.iterator]()}has(e){return this.get(e)!==void 0}get(e){let t;if(e!=null){let i=this[pt]||(this[pt]=new Map),n=i.get(e);if(n!==void 0){let a=this[yt]||(this[yt]=new Array(this.size));(t=a[n])!==void 0||(a[n]=t=this.getValue(n))}else if((n=this.getIndex(e))>-1){i.set(e,n);let a=this[yt]||(this[yt]=new Array(this.size));(t=a[n])!==void 0||(a[n]=t=this.getValue(n))}}return t}set(e,t){if(e!=null){let i=this[pt]||(this[pt]=new Map),n=i.get(e);if(n===void 0&&i.set(e,n=this.getIndex(e)),n>-1){let a=this[yt]||(this[yt]=new Array(this.size));a[n]=this.setValue(n,t)}}return this}clear(){throw new Error(`Clearing ${this[Symbol.toStringTag]} not supported.`)}delete(e){throw new Error(`Deleting ${this[Symbol.toStringTag]} values not supported.`)}*[Symbol.iterator](){let e=this.keys(),t=this.values(),i=this[pt]||(this[pt]=new Map),n=this[yt]||(this[yt]=new Array(this.size));for(let a,c,f=0,w,s;!((w=e.next()).done||(s=t.next()).done);++f)a=w.value,c=s.value,n[f]=c,i.has(a)||i.set(a,f),yield[a,c]}forEach(e,t){let i=this.keys(),n=this.values(),a=t===void 0?e:(w,s,m)=>e.call(t,w,s,m),c=this[pt]||(this[pt]=new Map),f=this[yt]||(this[yt]=new Array(this.size));for(let w,s,m=0,M,$;!((M=i.next()).done||($=n.next()).done);++m)w=M.value,s=$.value,f[m]=s,c.has(w)||c.set(w,m),a(s,w,this)}toArray(){return[...this.values()]}toJSON(){let e={};return this.forEach((t,i)=>e[i]=t),e}inspect(){return this.toString()}[Gu](){return this.toString()}toString(){let e=[];return this.forEach((t,i)=>{i=wm.valueToString(i),t=wm.valueToString(t),e.push(`${i}: ${t}`)}),`{ ${e.join(", ")} }`}};Kt[Symbol.toStringTag]=(r=>(Object.defineProperties(r,{size:{writable:!0,enumerable:!1,configurable:!1,value:0},[tt]:{writable:!0,enumerable:!1,configurable:!1,value:null},[Ji]:{writable:!0,enumerable:!1,configurable:!1,value:-1}}),r[Symbol.toStringTag]="Row"))(Kt.prototype);var Bm=class extends Kt{constructor(e){super(e,e.length);return JS(this)}keys(){return this[tt].getChildAt(0)[Symbol.iterator]()}values(){return this[tt].getChildAt(1)[Symbol.iterator]()}getKey(e){return this[tt].getChildAt(0).get(e)}getIndex(e){return this[tt].getChildAt(0).indexOf(e)}getValue(e){return this[tt].getChildAt(1).get(e)}setValue(e,t){this[tt].getChildAt(1).set(e,t)}};Ki.MapRow=Bm;var Tm=class extends Kt{constructor(e){super(e,e.type.children.length);return Im(this)}*keys(){for(let e of this[tt].type.children)yield e.name}*values(){for(let e of this[tt].type.children)yield this[e.name]}getKey(e){return this[tt].type.children[e].name}getIndex(e){return this[tt].type.children.findIndex(t=>t.name===e)}getValue(e){return this[tt].getChildAt(e).get(this[Ji])}setValue(e,t){return this[tt].getChildAt(e).set(this[Ji],t)}};Ki.StructRow=Tm;Object.setPrototypeOf(Kt.prototype,Map.prototype);var Im=(()=>{let r={enumerable:!0,configurable:!1,get:null,set:null};return e=>{let t=-1,i=e[pt]||(e[pt]=new Map),n=c=>function(){return this.get(c)},a=c=>function(f){return this.set(c,f)};for(let c of e.keys())i.set(c,++t),r.get=n(c),r.set=a(c),e.hasOwnProperty(c)||(r.enumerable=!0,Object.defineProperty(e,c,r)),e.hasOwnProperty(t)||(r.enumerable=!1,Object.defineProperty(e,t,r));return r.get=r.set=null,e}})(),JS=(()=>{if(typeof Proxy=="undefined")return Im;let r=Kt.prototype.has,e=Kt.prototype.get,t=Kt.prototype.set,i=Kt.prototype.getKey,n={isExtensible(){return!1},deleteProperty(){return!1},preventExtensions(){return!0},ownKeys(a){return[...a.keys()].map(c=>`${c}`)},has(a,c){switch(c){case"getKey":case"getIndex":case"getValue":case"setValue":case"toArray":case"toJSON":case"inspect":case"constructor":case"isPrototypeOf":case"propertyIsEnumerable":case"toString":case"toLocaleString":case"valueOf":case"size":case"has":case"get":case"set":case"clear":case"delete":case"keys":case"values":case"entries":case"forEach":case"__proto__":case"__defineGetter__":case"__defineSetter__":case"hasOwnProperty":case"__lookupGetter__":case"__lookupSetter__":case Symbol.iterator:case Symbol.toStringTag:case tt:case Ji:case yt:case pt:case Gu:return!0}return typeof c=="number"&&!a.has(c)&&(c=a.getKey(c)),a.has(c)},get(a,c,f){switch(c){case"getKey":case"getIndex":case"getValue":case"setValue":case"toArray":case"toJSON":case"inspect":case"constructor":case"isPrototypeOf":case"propertyIsEnumerable":case"toString":case"toLocaleString":case"valueOf":case"size":case"has":case"get":case"set":case"clear":case"delete":case"keys":case"values":case"entries":case"forEach":case"__proto__":case"__defineGetter__":case"__defineSetter__":case"hasOwnProperty":case"__lookupGetter__":case"__lookupSetter__":case Symbol.iterator:case Symbol.toStringTag:case tt:case Ji:case yt:case pt:case Gu:return Reflect.get(a,c,f)}return typeof c=="number"&&!r.call(f,c)&&(c=i.call(f,c)),e.call(f,c)},set(a,c,f,w){switch(c){case tt:case Ji:case yt:case pt:return Reflect.set(a,c,f,w);case"getKey":case"getIndex":case"getValue":case"setValue":case"toArray":case"toJSON":case"inspect":case"constructor":case"isPrototypeOf":case"propertyIsEnumerable":case"toString":case"toLocaleString":case"valueOf":case"size":case"has":case"get":case"set":case"clear":case"delete":case"keys":case"values":case"entries":case"forEach":case"__proto__":case"__defineGetter__":case"__defineSetter__":case"hasOwnProperty":case"__lookupGetter__":case"__lookupSetter__":case Symbol.iterator:case Symbol.toStringTag:return!1}return typeof c=="number"&&!r.call(w,c)&&(c=i.call(w,c)),r.call(w,c)?!!t.call(w,c,f):!1}};return a=>new Proxy(a,n)})()});var Jn=V(Cr=>{"use strict";Object.defineProperty(Cr,"__esModule",{value:!0});Cr.createElementComparator=Cr.clampRange=Cr.clampIndex=void 0;var Sm=Ve(),Dm=Hn(),KS=Pe(),Om=nt();function GS(r,e,t){let i=r.length,n=e>-1?e:i+e%i;return t?t(r,n):n}Cr.clampIndex=GS;var Am;function QS(r,e,t,i){let{length:n=0}=r,a=typeof e!="number"?0:e,c=typeof t!="number"?n:t;return a<0&&(a=(a%n+n)%n),c<0&&(c=(c%n+n)%n),c<a&&(Am=a,a=c,c=Am),c>n&&(c=n),i?i(r,a,c):[a,c]}Cr.clampRange=QS;var XS=Om.BigIntAvailable?Om.BigInt(0):0,Fm=r=>r!==r;function $n(r){let e=typeof r;if(e!=="object"||r===null)return Fm(r)?Fm:e!=="bigint"?t=>t===r:t=>XS+t===r;if(r instanceof Date){let t=r.valueOf();return i=>i instanceof Date?i.valueOf()===t:!1}return ArrayBuffer.isView(r)?t=>t?KS.compareArrayLike(r,t):!1:r instanceof Map?eD(r):Array.isArray(r)?ZS(r):r instanceof Sm.Vector?tD(r):rD(r)}Cr.createElementComparator=$n;function ZS(r){let e=[];for(let t=-1,i=r.length;++t<i;)e[t]=$n(r[t]);return Ta(e)}function eD(r){let e=-1,t=[];return r.forEach(i=>t[++e]=$n(i)),Ta(t)}function tD(r){let e=[];for(let t=-1,i=r.length;++t<i;)e[t]=$n(r.get(t));return Ta(e)}function rD(r){let e=Object.keys(r);if(e.length===0)return()=>!1;let t=[];for(let i=-1,n=e.length;++i<n;)t[i]=$n(r[e[i]]);return Ta(t,e)}function Ta(r,e){return t=>{if(!t||typeof t!="object")return!1;switch(t.constructor){case Array:return iD(r,t);case Map:case Dm.MapRow:case Dm.StructRow:return Mm(r,t,t.keys());case Object:case void 0:return Mm(r,t,e||Object.keys(t))}return t instanceof Sm.Vector?nD(r,t):!1}}function iD(r,e){let t=r.length;if(e.length!==t)return!1;for(let i=-1;++i<t;)if(!r[i](e[i]))return!1;return!0}function nD(r,e){let t=r.length;if(e.length!==t)return!1;for(let i=-1;++i<t;)if(!r[i](e.get(i)))return!1;return!0}function Mm(r,e,t){let i=t[Symbol.iterator](),n=e instanceof Map?e.keys():Object.keys(e)[Symbol.iterator](),a=e instanceof Map?e.values():Object.values(e)[Symbol.iterator](),c=0,f=r.length,w=a.next(),s=i.next(),m=n.next();for(;c<f&&!s.done&&!m.done&&!w.done&&!(s.value!==m.value||!r[c](w.value));++c,s=i.next(),m=n.next(),w=a.next());return c===f&&s.done&&m.done&&w.done?!0:(i.return&&i.return(),n.return&&n.return(),a.return&&a.return(),!1)}});var Vr=V(Ia=>{"use strict";Object.defineProperty(Ia,"__esModule",{value:!0});Ia.Chunked=void 0;var sD=Jn(),Um=_e(),aD=kr(),Cm=Ve(),yr=class extends Cm.AbstractVector{constructor(e,t=[],i=oD(t)){super();this._nullCount=-1,this._type=e,this._chunks=t,this._chunkOffsets=i,this._length=i[i.length-1],this._numChildren=(this._type.children||[]).length}static flatten(...e){return aD.selectChunkArgs(Cm.Vector,e)}static concat(...e){let t=yr.flatten(...e);return new yr(t[0].type,t)}get type(){return this._type}get length(){return this._length}get chunks(){return this._chunks}get typeId(){return this._type.typeId}get VectorName(){return`Chunked<${this._type}>`}get data(){return this._chunks[0]?this._chunks[0].data:null}get ArrayType(){return this._type.ArrayType}get numChildren(){return this._numChildren}get stride(){return this._chunks[0]?this._chunks[0].stride:1}get byteLength(){return this._chunks.reduce((e,t)=>e+t.byteLength,0)}get nullCount(){let e=this._nullCount;return e<0&&(this._nullCount=e=this._chunks.reduce((t,{nullCount:i})=>t+i,0)),e}get indices(){if(Um.DataType.isDictionary(this._type)){if(!this._indices){let e=this._chunks;this._indices=e.length===1?e[0].indices:yr.concat(...e.map(t=>t.indices))}return this._indices}return null}get dictionary(){return Um.DataType.isDictionary(this._type)?this._chunks[this._chunks.length-1].data.dictionary:null}*[Symbol.iterator](){for(let e of this._chunks)yield*e}clone(e=this._chunks){return new yr(this._type,e)}concat(...e){return this.clone(yr.flatten(this,...e))}slice(e,t){return sD.clampRange(this,e,t,this._sliceInternal)}getChildAt(e){if(e<0||e>=this._numChildren)return null;let t=this._children||(this._children=[]),i,n,a;return(i=t[e])?i:(n=(this._type.children||[])[e])&&(a=this._chunks.map(c=>c.getChildAt(e)).filter(c=>c!=null),a.length>0)?t[e]=new yr(n.type,a):null}search(e,t){let i=e,n=this._chunkOffsets,a=n.length-1;if(i<0||i>=n[a])return null;if(a<=1)return t?t(this,0,i):[0,i];let c=0,f=0,w=0;do{if(c+1===a)return t?t(this,c,i-f):[c,i-f];w=c+(a-c)/2|0,i>=n[w]?c=w:a=w}while(i<n[a]&&i>=(f=n[c]));return null}isValid(e){return!!this.search(e,this.isValidInternal)}get(e){return this.search(e,this.getInternal)}set(e,t){this.search(e,({chunks:i},n,a)=>i[n].set(a,t))}indexOf(e,t){return t&&typeof t=="number"?this.search(t,(i,n,a)=>this.indexOfInternal(i,n,a,e)):this.indexOfInternal(this,0,Math.max(0,t||0),e)}toArray(){let{chunks:e}=this,t=e.length,i=this._type.ArrayType;if(t<=0)return new i(0);if(t<=1)return e[0].toArray();let n=0,a=new Array(t);for(let w=-1;++w<t;)n+=(a[w]=e[w].toArray()).length;i!==a[0].constructor&&(i=a[0].constructor);let c=new i(n),f=i===Array?cD:uD;for(let w=-1,s=0;++w<t;)s=f(a[w],c,s);return c}getInternal({_chunks:e},t,i){return e[t].get(i)}isValidInternal({_chunks:e},t,i){return e[t].isValid(i)}indexOfInternal({_chunks:e},t,i,n){let a=t-1,c=e.length,f=i,w=0,s=-1;for(;++a<c;){if(~(s=e[a].indexOf(n,f)))return w+s;f=0,w+=e[a].length}return-1}_sliceInternal(e,t,i){let n=[],{chunks:a,_chunkOffsets:c}=e;for(let f=-1,w=a.length;++f<w;){let s=a[f],m=s.length,M=c[f];if(M>=i)break;if(t>=M+m)continue;if(M>=t&&M+m<=i){n.push(s);continue}let $=Math.max(0,t-M),oe=Math.min(i-M,m);n.push(s.slice($,oe))}return e.clone(n)}};Ia.Chunked=yr;function oD(r){let e=new Uint32Array((r||[]).length+1),t=e[0]=0,i=e.length;for(let n=0;++n<i;)e[n]=t+=r[n-1].length;return e}var uD=(r,e,t)=>(e.set(r,t),t+r.length),cD=(r,e,t)=>{let i=t;for(let n=-1,a=r.length;++n<a;)e[i++]=r[n];return i}});var Gi=V(Sa=>{"use strict";Object.defineProperty(Sa,"__esModule",{value:!0});Sa.Column=void 0;var Vm=$e(),km=Ve(),Qu=Vr(),pi=class extends Qu.Chunked{constructor(e,t=[],i){t=Qu.Chunked.flatten(...t);super(e.type,t,i);if(this._field=e,t.length===1&&!(this instanceof Xu))return new Xu(e,t[0],this._chunkOffsets)}static new(...e){let[t,i,...n]=e;typeof t!="string"&&!(t instanceof Vm.Field)&&(i=t,t="");let a=Qu.Chunked.flatten(Array.isArray(i)?[...i,...n]:i instanceof km.Vector?[i,...n]:[km.Vector.new(i,...n)]);if(typeof t=="string"){let c=a[0].data.type;t=new Vm.Field(t,c,!0)}else!t.nullable&&a.some(({nullCount:c})=>c>0)&&(t=t.clone({nullable:!0}));return new pi(t,a)}get field(){return this._field}get name(){return this._field.name}get nullable(){return this._field.nullable}get metadata(){return this._field.metadata}clone(e=this._chunks){return new pi(this._field,e)}getChildAt(e){if(e<0||e>=this.numChildren)return null;let t=this._children||(this._children=[]),i,n,a;return(i=t[e])?i:(n=(this.type.children||[])[e])&&(a=this._chunks.map(c=>c.getChildAt(e)).filter(c=>c!=null),a.length>0)?t[e]=new pi(n,a):null}};Sa.Column=pi;var Xu=class extends pi{constructor(e,t,i){super(e,[t],i);this._chunk=t}search(e,t){return t?t(this,0,e):[0,e]}isValid(e){return this._chunk.isValid(e)}get(e){return this._chunk.get(e)}set(e,t){this._chunk.set(e,t)}indexOf(e,t){return this._chunk.indexOf(e,t)}}});var kr=V(ht=>{"use strict";Object.defineProperty(ht,"__esModule",{value:!0});ht.selectColumnChildrenArgs=ht.selectVectorChildrenArgs=ht.selectChunkArgs=ht.selectFieldArgs=ht.selectColumnArgs=ht.selectArgs=void 0;var Pm=kt(),Rm=$e(),Pr=Gi(),Kn=Ve(),Nm=_e(),lD=Vr(),Rr=Array.isArray;ht.selectArgs=(r,e)=>Da(r,e,[],0);ht.selectColumnArgs=r=>{let[e,t]=ec(r,[[],[]]);return t.map((i,n)=>i instanceof Pr.Column?Pr.Column.new(i.field.clone(e[n]),i):i instanceof Kn.Vector?Pr.Column.new(e[n],i):Pr.Column.new(e[n],[]))};ht.selectFieldArgs=r=>ec(r,[[],[]]);ht.selectChunkArgs=(r,e)=>Zu(r,e,[],0);ht.selectVectorChildrenArgs=(r,e)=>xm(r,e,[],0);ht.selectColumnChildrenArgs=(r,e)=>Em(r,e,[],0);function Da(r,e,t,i){let n,a=i,c=-1,f=e.length;for(;++c<f;)Rr(n=e[c])?a=Da(r,n,t,a).length:n instanceof r&&(t[a++]=n);return t}function Zu(r,e,t,i){let n,a=i,c=-1,f=e.length;for(;++c<f;)Rr(n=e[c])?a=Zu(r,n,t,a).length:n instanceof lD.Chunked?a=Zu(r,n.chunks,t,a).length:n instanceof r&&(t[a++]=n);return t}function xm(r,e,t,i){let n,a=i,c=-1,f=e.length;for(;++c<f;)Rr(n=e[c])?a=xm(r,n,t,a).length:n instanceof r?a=Da(Kn.Vector,n.schema.fields.map((w,s)=>n.getChildAt(s)),t,a).length:n instanceof Kn.Vector&&(t[a++]=n);return t}function Em(r,e,t,i){let n,a=i,c=-1,f=e.length;for(;++c<f;)Rr(n=e[c])?a=Em(r,n,t,a).length:n instanceof r?a=Da(Pr.Column,n.schema.fields.map((w,s)=>Pr.Column.new(w,n.getChildAt(s))),t,a).length:n instanceof Pr.Column&&(t[a++]=n);return t}var dD=(r,[e,t],i)=>(r[0][i]=e,r[1][i]=t,r);function ec(r,e){let t,i;switch(i=r.length){case 0:return e;case 1:if(t=e[0],!r[0])return e;if(Rr(r[0]))return ec(r[0],e);r[0]instanceof Pm.Data||r[0]instanceof Kn.Vector||r[0]instanceof Nm.DataType||([t,r]=Object.entries(r[0]).reduce(dD,e));break;default:Rr(t=r[i-1])?r=Rr(r[0])?r[0]:r.slice(0,i-1):(r=Rr(r[0])?r[0]:r,t=[])}let n=-1,a=-1,c=-1,f=r.length,w,s,[m,M]=e;for(;++c<f;)s=r[c],s instanceof Pr.Column&&(M[++a]=s)?m[++n]=s.field.clone(t[c],s.type,!0):({[c]:w=c}=t,s instanceof Nm.DataType&&(M[++a]=s)?m[++n]=Rm.Field.new(w,s,!0):s&&s.type&&(M[++a]=s)&&(s instanceof Pm.Data&&(M[a]=s=Kn.Vector.new(s)),m[++n]=Rm.Field.new(w,s.type,!0)));return e}});var $e=V(Qi=>{"use strict";Object.defineProperty(Qi,"__esModule",{value:!0});Qi.Field=Qi.Schema=void 0;var fD=_e(),hD=kr(),pD=kr(),Lm=bu(),mt=class{constructor(e=[],t,i){this.fields=e||[],this.metadata=t||new Map,i||(i=tc(e)),this.dictionaries=i}static from(...e){return mt.new(e[0],e[1])}static new(...e){return new mt(pD.selectFieldArgs(e)[0])}get[Symbol.toStringTag](){return"Schema"}toString(){return`Schema<{ ${this.fields.map((e,t)=>`${t}: ${e}`).join(", ")} }>`}compareTo(e){return Lm.instance.compareSchemas(this,e)}select(...e){let t=e.reduce((i,n)=>(i[n]=!0)&&i,Object.create(null));return new mt(this.fields.filter(i=>t[i.name]),this.metadata)}selectAt(...e){return new mt(e.map(t=>this.fields[t]).filter(Boolean),this.metadata)}assign(...e){let t=e[0]instanceof mt?e[0]:new mt(hD.selectArgs(Gt,e)),i=[...this.fields],n=Oa(Oa(new Map,this.metadata),t.metadata),a=t.fields.filter(f=>{let w=i.findIndex(s=>s.name===f.name);return~w?(i[w]=f.clone({metadata:Oa(Oa(new Map,i[w].metadata),f.metadata)}))&&!1:!0}),c=tc(a,new Map);return new mt([...i,...a],n,new Map([...this.dictionaries,...c]))}};Qi.Schema=mt;var Gt=class{constructor(e,t,i=!1,n){this.name=e,this.type=t,this.nullable=i,this.metadata=n||new Map}static new(...e){let[t,i,n,a]=e;return e[0]&&typeof e[0]=="object"&&({name:t}=e[0],i===void 0&&(i=e[0].type),n===void 0&&(n=e[0].nullable),a===void 0&&(a=e[0].metadata)),new Gt(`${t}`,i,n,a)}get typeId(){return this.type.typeId}get[Symbol.toStringTag](){return"Field"}toString(){return`${this.name}: ${this.type}`}compareTo(e){return Lm.instance.compareField(this,e)}clone(...e){let[t,i,n,a]=e;return!e[0]||typeof e[0]!="object"?[t=this.name,i=this.type,n=this.nullable,a=this.metadata]=e:{name:t=this.name,type:i=this.type,nullable:n=this.nullable,metadata:a=this.metadata}=e[0],Gt.new(t,i,n,a)}};Qi.Field=Gt;function Oa(r,e){return new Map([...r||new Map,...e||new Map])}function tc(r,e=new Map){for(let t=-1,i=r.length;++t<i;){let a=r[t].type;if(fD.DataType.isDictionary(a)){if(!e.has(a.id))e.set(a.id,a.dictionary);else if(e.get(a.id)!==a.dictionary)throw new Error("Cannot create Schema containing two different dictionaries with the same Id")}a.children&&a.children.length>0&&tc(a.children,e)}return e}mt.prototype.fields=null;mt.prototype.metadata=null;mt.prototype.dictionaries=null;Gt.prototype.type=null;Gt.prototype.name=null;Gt.prototype.nullable=null;Gt.prototype.metadata=null});var rc=V(Aa=>{"use strict";Object.defineProperty(Aa,"__esModule",{value:!0});Aa.ListBuilder=void 0;var yD=Ku(),mD=$e(),_D=_e(),bD=Ar(),gD=Me(),qm=class extends gD.VariableWidthBuilder{constructor(e){super(e);this._run=new yD.Run,this._offsets=new bD.OffsetsBufferBuilder}addChild(e,t="0"){if(this.numChildren>0)throw new Error("ListBuilder can only have one child.");return this.children[this.numChildren]=e,this.type=new _D.List(new mD.Field(t,e.type,!0)),this.numChildren-1}clear(){return this._run.clear(),super.clear()}_flushPending(e){let t=this._run,i=this._offsets,n=this._setValue,a=0,c;for([a,c]of e)c===void 0?i.set(a,0):(i.set(a,c.length),n(this,a,t.bind(c)))}};Aa.ListBuilder=qm});var ic=V(Fa=>{"use strict";Object.defineProperty(Fa,"__esModule",{value:!0});Fa.FixedSizeListBuilder=void 0;var vD=Ku(),jD=$e(),wD=Me(),BD=_e(),zm=class extends wD.Builder{constructor(){super(...arguments);this._run=new vD.Run}setValue(e,t){super.setValue(e,this._run.bind(t))}addChild(e,t="0"){if(this.numChildren>0)throw new Error("FixedSizeListBuilder can only have one child.");let i=this.children.push(e);return this.type=new BD.FixedSizeList(this.type.listSize,new jD.Field(t,e.type,!0)),i}clear(){return this._run.clear(),super.clear()}};Fa.FixedSizeListBuilder=zm});var nc=V(Ma=>{"use strict";Object.defineProperty(Ma,"__esModule",{value:!0});Ma.MapBuilder=void 0;var TD=$e(),ID=_e(),SD=Me(),Wm=class extends SD.VariableWidthBuilder{set(e,t){return super.set(e,t)}setValue(e,t){t=t instanceof Map?t:new Map(Object.entries(t));let i=this._pending||(this._pending=new Map),n=i.get(e);n&&(this._pendingLength-=n.size),this._pendingLength+=t.size,i.set(e,t)}addChild(e,t=`${this.numChildren}`){if(this.numChildren>0)throw new Error("ListBuilder can only have one child.");return this.children[this.numChildren]=e,this.type=new ID.Map_(new TD.Field(t,e.type,!0),this.type.keysSorted),this.numChildren-1}_flushPending(e){let t=this._offsets,i=this._setValue;e.forEach((n,a)=>{n===void 0?t.set(a,0):(t.set(a,n.size),i(this,a,n))})}};Ma.MapBuilder=Wm});var sc=V(Ua=>{"use strict";Object.defineProperty(Ua,"__esModule",{value:!0});Ua.StructBuilder=void 0;var DD=$e(),OD=Me(),AD=_e(),Ym=class extends OD.Builder{addChild(e,t=`${this.numChildren}`){let i=this.children.push(e);return this.type=new AD.Struct([...this.type.children,new DD.Field(t,e.type,!0)]),i}};Ua.StructBuilder=Ym});var ac=V(Nr=>{"use strict";Object.defineProperty(Nr,"__esModule",{value:!0});Nr.DenseUnionBuilder=Nr.SparseUnionBuilder=Nr.UnionBuilder=void 0;var FD=$e(),Hm=Ar(),MD=Me(),UD=_e(),Ca=class extends MD.Builder{constructor(e){super(e);this._typeIds=new Hm.DataBufferBuilder(new Int8Array(0),1),typeof e.valueToChildTypeId=="function"&&(this._valueToChildTypeId=e.valueToChildTypeId)}get typeIdToChildIndex(){return this.type.typeIdToChildIndex}append(e,t){return this.set(this.length,e,t)}set(e,t,i){return i===void 0&&(i=this._valueToChildTypeId(this,t,e)),this.setValid(e,this.isValid(t))&&this.setValue(e,t,i),this}setValue(e,t,i){this._typeIds.set(e,i),super.setValue(e,t)}addChild(e,t=`${this.children.length}`){let i=this.children.push(e),{type:{children:n,mode:a,typeIds:c}}=this,f=[...n,new FD.Field(t,e.type)];return this.type=new UD.Union(a,[...c,i],f),i}_valueToChildTypeId(e,t,i){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.")}};Nr.UnionBuilder=Ca;var $m=class extends Ca{};Nr.SparseUnionBuilder=$m;var Jm=class extends Ca{constructor(e){super(e);this._offsets=new Hm.DataBufferBuilder(new Int32Array(0))}setValue(e,t,i){let n=this.type.typeIdToChildIndex[i];return this._offsets.set(e,this.getChildAt(n).length),super.setValue(e,t,i)}};Nr.DenseUnionBuilder=Jm});var cc=V(Xi=>{"use strict";Object.defineProperty(Xi,"__esModule",{value:!0});Xi.instance=Xi.SetVisitor=void 0;var CD=Ve(),VD=et(),kD=ci(),PD=Ln(),RD=Pe(),Tt=Be(),te=class extends VD.Visitor{};Xi.SetVisitor=te;var ND=(r,e,t)=>{r[e]=t/864e5|0},oc=(r,e,t)=>{r[e]=t%4294967296|0,r[e+1]=t/4294967296|0},xD=(r,e,t)=>{r[e]=t*1e3%4294967296|0,r[e+1]=t*1e3/4294967296|0},ED=(r,e,t)=>{r[e]=t*1e6%4294967296|0,r[e+1]=t*1e6/4294967296|0},Km=(r,e,t,i)=>{let{[t]:n,[t+1]:a}=e;n!=null&&a!=null&&r.set(i.subarray(0,a-n),n)},LD=({offset:r,values:e},t,i)=>{let n=r+t;i?e[n>>3]|=1<<n%8:e[n>>3]&=~(1<<n%8)},Gm=({values:r},e,t)=>{ND(r,e,t.valueOf())},Qm=({values:r},e,t)=>{oc(r,e*2,t.valueOf())},Qt=({stride:r,values:e},t,i)=>{e[r*t]=i},Xm=({stride:r,values:e},t,i)=>{e[r*t]=PD.float64ToUint16(i)},uc=(r,e,t)=>{switch(typeof t){case"bigint":r.values64[e]=t;break;case"number":r.values[e*r.stride]=t;break;default:let i=t,{stride:n,ArrayType:a}=r,c=RD.toArrayBufferView(a,i);r.values.set(c.subarray(0,n),n*e)}},qD=({stride:r,values:e},t,i)=>{e.set(i.subarray(0,r),r*t)},zD=({values:r,valueOffsets:e},t,i)=>Km(r,e,t,i),WD=({values:r,valueOffsets:e},t,i)=>{Km(r,e,t,kD.encodeUtf8(i))},YD=(r,e,t)=>{r.type.bitWidth<64?Qt(r,e,t):uc(r,e,t)},HD=(r,e,t)=>{r.type.precision!==Tt.Precision.HALF?Qt(r,e,t):Xm(r,e,t)},$D=(r,e,t)=>{r.type.unit===Tt.DateUnit.DAY?Gm(r,e,t):Qm(r,e,t)},Zm=({values:r},e,t)=>oc(r,e*2,t/1e3),e_=({values:r},e,t)=>oc(r,e*2,t),t_=({values:r},e,t)=>xD(r,e*2,t),r_=({values:r},e,t)=>ED(r,e*2,t),JD=(r,e,t)=>{switch(r.type.unit){case Tt.TimeUnit.SECOND:return Zm(r,e,t);case Tt.TimeUnit.MILLISECOND:return e_(r,e,t);case Tt.TimeUnit.MICROSECOND:return t_(r,e,t);case Tt.TimeUnit.NANOSECOND:return r_(r,e,t)}},i_=({values:r,stride:e},t,i)=>{r[e*t]=i},n_=({values:r,stride:e},t,i)=>{r[e*t]=i},s_=({values:r},e,t)=>{r.set(t.subarray(0,2),2*e)},a_=({values:r},e,t)=>{r.set(t.subarray(0,2),2*e)},KD=(r,e,t)=>{switch(r.type.unit){case Tt.TimeUnit.SECOND:return i_(r,e,t);case Tt.TimeUnit.MILLISECOND:return n_(r,e,t);case Tt.TimeUnit.MICROSECOND:return s_(r,e,t);case Tt.TimeUnit.NANOSECOND:return a_(r,e,t)}},GD=({values:r},e,t)=>{r.set(t.subarray(0,4),4*e)},QD=(r,e,t)=>{let i=r.getChildAt(0),n=r.valueOffsets;for(let a=-1,c=n[e],f=n[e+1];c<f;)i.set(c++,t.get(++a))},XD=(r,e,t)=>{let i=r.getChildAt(0),n=r.valueOffsets,a=t instanceof Map?[...t]:Object.entries(t);for(let c=-1,f=n[e],w=n[e+1];f<w;)i.set(f++,a[++c])},ZD=(r,e)=>(t,i,n)=>t&&t.set(r,e[n]),eO=(r,e)=>(t,i,n)=>t&&t.set(r,e.get(n)),tO=(r,e)=>(t,i,n)=>t&&t.set(r,e.get(i.name)),rO=(r,e)=>(t,i,n)=>t&&t.set(r,e[i.name]),iO=(r,e,t)=>{let i=t instanceof Map?tO(e,t):t instanceof CD.Vector?eO(e,t):Array.isArray(t)?ZD(e,t):rO(e,t);r.type.children.forEach((n,a)=>i(r.getChildAt(a),n,a))},nO=(r,e,t)=>{r.type.mode===Tt.UnionMode.Dense?o_(r,e,t):u_(r,e,t)},o_=(r,e,t)=>{let i=r.typeIdToChildIndex[r.typeIds[e]],n=r.getChildAt(i);n&&n.set(r.valueOffsets[e],t)},u_=(r,e,t)=>{let i=r.typeIdToChildIndex[r.typeIds[e]],n=r.getChildAt(i);n&&n.set(e,t)},sO=(r,e,t)=>{let i=r.getKey(e);i!==null&&r.setValue(i,t)},aO=(r,e,t)=>{r.type.unit===Tt.IntervalUnit.DAY_TIME?c_(r,e,t):l_(r,e,t)},c_=({values:r},e,t)=>{r.set(t.subarray(0,2),2*e)},l_=({values:r},e,t)=>{r[e]=t[0]*12+t[1]%12},oO=(r,e,t)=>{let i=r.getChildAt(0),{stride:n}=r;for(let a=-1,c=e*n;++a<n;)i.set(c+a,t.get(a))};te.prototype.visitBool=LD;te.prototype.visitInt=YD;te.prototype.visitInt8=Qt;te.prototype.visitInt16=Qt;te.prototype.visitInt32=Qt;te.prototype.visitInt64=uc;te.prototype.visitUint8=Qt;te.prototype.visitUint16=Qt;te.prototype.visitUint32=Qt;te.prototype.visitUint64=uc;te.prototype.visitFloat=HD;te.prototype.visitFloat16=Xm;te.prototype.visitFloat32=Qt;te.prototype.visitFloat64=Qt;te.prototype.visitUtf8=WD;te.prototype.visitBinary=zD;te.prototype.visitFixedSizeBinary=qD;te.prototype.visitDate=$D;te.prototype.visitDateDay=Gm;te.prototype.visitDateMillisecond=Qm;te.prototype.visitTimestamp=JD;te.prototype.visitTimestampSecond=Zm;te.prototype.visitTimestampMillisecond=e_;te.prototype.visitTimestampMicrosecond=t_;te.prototype.visitTimestampNanosecond=r_;te.prototype.visitTime=KD;te.prototype.visitTimeSecond=i_;te.prototype.visitTimeMillisecond=n_;te.prototype.visitTimeMicrosecond=s_;te.prototype.visitTimeNanosecond=a_;te.prototype.visitDecimal=GD;te.prototype.visitList=QD;te.prototype.visitStruct=iO;te.prototype.visitUnion=nO;te.prototype.visitDenseUnion=o_;te.prototype.visitSparseUnion=u_;te.prototype.visitDictionary=sO;te.prototype.visitInterval=aO;te.prototype.visitIntervalDayTime=c_;te.prototype.visitIntervalYearMonth=l_;te.prototype.visitFixedSizeList=oO;te.prototype.visitMap=XD;Xi.instance=new te});var d_=V(Zi=>{"use strict";Object.defineProperty(Zi,"__esModule",{value:!0});Zi.instance=Zi.GetBuilderCtor=void 0;var uO=et(),cO=va(),lO=ku(),lc=Ru(),dO=Nu(),fO=Eu(),hO=Lu(),pO=ic(),Va=qu(),dc=$u(),mr=Wu(),yO=rc(),mO=nc(),_O=Pu(),bO=sc(),Gn=Hu(),Qn=Yu(),fc=ac(),gO=wa(),hc=class extends uO.Visitor{visitNull(){return _O.NullBuilder}visitBool(){return lO.BoolBuilder}visitInt(){return mr.IntBuilder}visitInt8(){return mr.Int8Builder}visitInt16(){return mr.Int16Builder}visitInt32(){return mr.Int32Builder}visitInt64(){return mr.Int64Builder}visitUint8(){return mr.Uint8Builder}visitUint16(){return mr.Uint16Builder}visitUint32(){return mr.Uint32Builder}visitUint64(){return mr.Uint64Builder}visitFloat(){return Va.FloatBuilder}visitFloat16(){return Va.Float16Builder}visitFloat32(){return Va.Float32Builder}visitFloat64(){return Va.Float64Builder}visitUtf8(){return gO.Utf8Builder}visitBinary(){return cO.BinaryBuilder}visitFixedSizeBinary(){return hO.FixedSizeBinaryBuilder}visitDate(){return lc.DateBuilder}visitDateDay(){return lc.DateDayBuilder}visitDateMillisecond(){return lc.DateMillisecondBuilder}visitTimestamp(){return Gn.TimestampBuilder}visitTimestampSecond(){return Gn.TimestampSecondBuilder}visitTimestampMillisecond(){return Gn.TimestampMillisecondBuilder}visitTimestampMicrosecond(){return Gn.TimestampMicrosecondBuilder}visitTimestampNanosecond(){return Gn.TimestampNanosecondBuilder}visitTime(){return Qn.TimeBuilder}visitTimeSecond(){return Qn.TimeSecondBuilder}visitTimeMillisecond(){return Qn.TimeMillisecondBuilder}visitTimeMicrosecond(){return Qn.TimeMicrosecondBuilder}visitTimeNanosecond(){return Qn.TimeNanosecondBuilder}visitDecimal(){return dO.DecimalBuilder}visitList(){return yO.ListBuilder}visitStruct(){return bO.StructBuilder}visitUnion(){return fc.UnionBuilder}visitDenseUnion(){return fc.DenseUnionBuilder}visitSparseUnion(){return fc.SparseUnionBuilder}visitDictionary(){return fO.DictionaryBuilder}visitInterval(){return dc.IntervalBuilder}visitIntervalDayTime(){return dc.IntervalDayTimeBuilder}visitIntervalYearMonth(){return dc.IntervalYearMonthBuilder}visitFixedSizeList(){return pO.FixedSizeListBuilder}visitMap(){return mO.MapBuilder}};Zi.GetBuilderCtor=hc;Zi.instance=new hc});var Pa=V(N=>{"use strict";Object.defineProperty(N,"__esModule",{value:!0});N.DenseUnionBuilder=N.SparseUnionBuilder=N.UnionBuilder=N.StructBuilder=N.MapBuilder=N.FixedSizeListBuilder=N.ListBuilder=N.BinaryBuilder=N.Utf8Builder=N.IntervalYearMonthBuilder=N.IntervalDayTimeBuilder=N.IntervalBuilder=N.TimestampNanosecondBuilder=N.TimestampMicrosecondBuilder=N.TimestampMillisecondBuilder=N.TimestampSecondBuilder=N.TimestampBuilder=N.TimeNanosecondBuilder=N.TimeMicrosecondBuilder=N.TimeMillisecondBuilder=N.TimeSecondBuilder=N.TimeBuilder=N.Uint64Builder=N.Uint32Builder=N.Uint16Builder=N.Uint8Builder=N.Int64Builder=N.Int32Builder=N.Int16Builder=N.Int8Builder=N.IntBuilder=N.Float64Builder=N.Float32Builder=N.Float16Builder=N.FloatBuilder=N.FixedSizeBinaryBuilder=N.DictionaryBuilder=N.DecimalBuilder=N.DateMillisecondBuilder=N.DateDayBuilder=N.DateBuilder=N.NullBuilder=N.BoolBuilder=N.Builder=void 0;var vO=Me();Object.defineProperty(N,"Builder",{enumerable:!0,get:function(){return vO.Builder}});var jO=ku();Object.defineProperty(N,"BoolBuilder",{enumerable:!0,get:function(){return jO.BoolBuilder}});var wO=Pu();Object.defineProperty(N,"NullBuilder",{enumerable:!0,get:function(){return wO.NullBuilder}});var pc=Ru();Object.defineProperty(N,"DateBuilder",{enumerable:!0,get:function(){return pc.DateBuilder}});Object.defineProperty(N,"DateDayBuilder",{enumerable:!0,get:function(){return pc.DateDayBuilder}});Object.defineProperty(N,"DateMillisecondBuilder",{enumerable:!0,get:function(){return pc.DateMillisecondBuilder}});var BO=Nu();Object.defineProperty(N,"DecimalBuilder",{enumerable:!0,get:function(){return BO.DecimalBuilder}});var TO=Eu();Object.defineProperty(N,"DictionaryBuilder",{enumerable:!0,get:function(){return TO.DictionaryBuilder}});var IO=Lu();Object.defineProperty(N,"FixedSizeBinaryBuilder",{enumerable:!0,get:function(){return IO.FixedSizeBinaryBuilder}});var ka=qu();Object.defineProperty(N,"FloatBuilder",{enumerable:!0,get:function(){return ka.FloatBuilder}});Object.defineProperty(N,"Float16Builder",{enumerable:!0,get:function(){return ka.Float16Builder}});Object.defineProperty(N,"Float32Builder",{enumerable:!0,get:function(){return ka.Float32Builder}});Object.defineProperty(N,"Float64Builder",{enumerable:!0,get:function(){return ka.Float64Builder}});var _r=Wu();Object.defineProperty(N,"IntBuilder",{enumerable:!0,get:function(){return _r.IntBuilder}});Object.defineProperty(N,"Int8Builder",{enumerable:!0,get:function(){return _r.Int8Builder}});Object.defineProperty(N,"Int16Builder",{enumerable:!0,get:function(){return _r.Int16Builder}});Object.defineProperty(N,"Int32Builder",{enumerable:!0,get:function(){return _r.Int32Builder}});Object.defineProperty(N,"Int64Builder",{enumerable:!0,get:function(){return _r.Int64Builder}});Object.defineProperty(N,"Uint8Builder",{enumerable:!0,get:function(){return _r.Uint8Builder}});Object.defineProperty(N,"Uint16Builder",{enumerable:!0,get:function(){return _r.Uint16Builder}});Object.defineProperty(N,"Uint32Builder",{enumerable:!0,get:function(){return _r.Uint32Builder}});Object.defineProperty(N,"Uint64Builder",{enumerable:!0,get:function(){return _r.Uint64Builder}});var Xn=Yu();Object.defineProperty(N,"TimeBuilder",{enumerable:!0,get:function(){return Xn.TimeBuilder}});Object.defineProperty(N,"TimeSecondBuilder",{enumerable:!0,get:function(){return Xn.TimeSecondBuilder}});Object.defineProperty(N,"TimeMillisecondBuilder",{enumerable:!0,get:function(){return Xn.TimeMillisecondBuilder}});Object.defineProperty(N,"TimeMicrosecondBuilder",{enumerable:!0,get:function(){return Xn.TimeMicrosecondBuilder}});Object.defineProperty(N,"TimeNanosecondBuilder",{enumerable:!0,get:function(){return Xn.TimeNanosecondBuilder}});var Zn=Hu();Object.defineProperty(N,"TimestampBuilder",{enumerable:!0,get:function(){return Zn.TimestampBuilder}});Object.defineProperty(N,"TimestampSecondBuilder",{enumerable:!0,get:function(){return Zn.TimestampSecondBuilder}});Object.defineProperty(N,"TimestampMillisecondBuilder",{enumerable:!0,get:function(){return Zn.TimestampMillisecondBuilder}});Object.defineProperty(N,"TimestampMicrosecondBuilder",{enumerable:!0,get:function(){return Zn.TimestampMicrosecondBuilder}});Object.defineProperty(N,"TimestampNanosecondBuilder",{enumerable:!0,get:function(){return Zn.TimestampNanosecondBuilder}});var yc=$u();Object.defineProperty(N,"IntervalBuilder",{enumerable:!0,get:function(){return yc.IntervalBuilder}});Object.defineProperty(N,"IntervalDayTimeBuilder",{enumerable:!0,get:function(){return yc.IntervalDayTimeBuilder}});Object.defineProperty(N,"IntervalYearMonthBuilder",{enumerable:!0,get:function(){return yc.IntervalYearMonthBuilder}});var SO=wa();Object.defineProperty(N,"Utf8Builder",{enumerable:!0,get:function(){return SO.Utf8Builder}});var DO=va();Object.defineProperty(N,"BinaryBuilder",{enumerable:!0,get:function(){return DO.BinaryBuilder}});var OO=rc();Object.defineProperty(N,"ListBuilder",{enumerable:!0,get:function(){return OO.ListBuilder}});var AO=ic();Object.defineProperty(N,"FixedSizeListBuilder",{enumerable:!0,get:function(){return AO.FixedSizeListBuilder}});var FO=nc();Object.defineProperty(N,"MapBuilder",{enumerable:!0,get:function(){return FO.MapBuilder}});var MO=sc();Object.defineProperty(N,"StructBuilder",{enumerable:!0,get:function(){return MO.StructBuilder}});var mc=ac();Object.defineProperty(N,"UnionBuilder",{enumerable:!0,get:function(){return mc.UnionBuilder}});Object.defineProperty(N,"SparseUnionBuilder",{enumerable:!0,get:function(){return mc.SparseUnionBuilder}});Object.defineProperty(N,"DenseUnionBuilder",{enumerable:!0,get:function(){return mc.DenseUnionBuilder}});var _c=Be(),UO=wa(),CO=Me(),f_=cc(),h_=d_();CO.Builder.new=p_;function p_(r){let e=r.type,t=new(h_.instance.getVisitFn(e)())(r);if(e.children&&e.children.length>0){let i=r.children||[],n={nullValues:r.nullValues},a=Array.isArray(i)?(c,f)=>i[f]||n:({name:c})=>i[c]||n;e.children.forEach((c,f)=>{let{type:w}=c,s=a(c,f);t.children.push(p_({...s,type:w}))})}return t}Object.keys(_c.Type).map(r=>_c.Type[r]).filter(r=>typeof r=="number"&&r!==_c.Type.NONE).forEach(r=>{let e=h_.instance.visit(r);e.prototype._setValue=f_.instance.getVisitFn(r)});UO.Utf8Builder.prototype._setValue=f_.instance.visitBinary});var m_=V(yi=>{"use strict";Object.defineProperty(yi,"__esModule",{value:!0});yi.org=void 0;var bc=Pi(),y_;(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}static getRootAsFooter(s,m){return(m||new f).__init(s.readInt32(s.position())+s.position(),s)}version(){let s=this.bb.__offset(this.bb_pos,4);return s?this.bb.readInt16(this.bb_pos+s):bc.org.apache.arrow.flatbuf.MetadataVersion.V1}schema(s){let m=this.bb.__offset(this.bb_pos,6);return m?(s||new bc.org.apache.arrow.flatbuf.Schema).__init(this.bb.__indirect(this.bb_pos+m),this.bb):null}dictionaries(s,m){let M=this.bb.__offset(this.bb_pos,8);return M?(m||new r.apache.arrow.flatbuf.Block).__init(this.bb.__vector(this.bb_pos+M)+s*24,this.bb):null}dictionariesLength(){let s=this.bb.__offset(this.bb_pos,8);return s?this.bb.__vector_len(this.bb_pos+s):0}recordBatches(s,m){let M=this.bb.__offset(this.bb_pos,10);return M?(m||new r.apache.arrow.flatbuf.Block).__init(this.bb.__vector(this.bb_pos+M)+s*24,this.bb):null}recordBatchesLength(){let s=this.bb.__offset(this.bb_pos,10);return s?this.bb.__vector_len(this.bb_pos+s):0}static startFooter(s){s.startObject(4)}static addVersion(s,m){s.addFieldInt16(0,m,bc.org.apache.arrow.flatbuf.MetadataVersion.V1)}static addSchema(s,m){s.addFieldOffset(1,m,0)}static addDictionaries(s,m){s.addFieldOffset(2,m,0)}static startDictionariesVector(s,m){s.startVector(24,m,8)}static addRecordBatches(s,m){s.addFieldOffset(3,m,0)}static startRecordBatchesVector(s,m){s.startVector(24,m,8)}static endFooter(s){return s.endObject()}static finishFooterBuffer(s,m){s.finish(m)}static createFooter(s,m,M,$,oe){return f.startFooter(s),f.addVersion(s,m),f.addSchema(s,M),f.addDictionaries(s,$),f.addRecordBatches(s,oe),f.endFooter(s)}}c.Footer=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(y_=yi.org||(yi.org={}));(function(r){var e;(function(t){var i;(function(n){var a;(function(c){class f{constructor(){this.bb=null,this.bb_pos=0}__init(s,m){return this.bb_pos=s,this.bb=m,this}offset(){return this.bb.readInt64(this.bb_pos)}metaDataLength(){return this.bb.readInt32(this.bb_pos+8)}bodyLength(){return this.bb.readInt64(this.bb_pos+16)}static createBlock(s,m,M,$){return s.prep(8,24),s.writeInt64($),s.pad(4),s.writeInt32(M),s.writeInt64(m),s.offset()}}c.Block=f})(a=n.flatbuf||(n.flatbuf={}))})(i=t.arrow||(t.arrow={}))})(e=r.apache||(r.apache={}))})(y_=yi.org||(yi.org={}))});var jc=V(en=>{"use strict";Object.defineProperty(en,"__esModule",{value:!0});en.FileBlock=en.Footer=void 0;var __=m_(),gc=Mi(),b_=gc.flatbuffers.Long,VO=gc.flatbuffers.Builder,kO=gc.flatbuffers.ByteBuffer,PO=__.org.apache.arrow.flatbuf.Block,Xt=__.org.apache.arrow.flatbuf.Footer,g_=$e(),v_=Be(),RO=Pe(),vc=class{constructor(e,t=v_.MetadataVersion.V4,i,n){this.schema=e,this.version=t,i&&(this._recordBatches=i),n&&(this._dictionaryBatches=n)}static decode(e){e=new kO(RO.toUint8Array(e));let t=Xt.getRootAsFooter(e),i=g_.Schema.decode(t.schema());return new j_(i,t)}static encode(e){let t=new VO,i=g_.Schema.encode(t,e.schema);Xt.startRecordBatchesVector(t,e.numRecordBatches),[...e.recordBatches()].slice().reverse().forEach(c=>xr.encode(t,c));let n=t.endVector();Xt.startDictionariesVector(t,e.numDictionaries),[...e.dictionaryBatches()].slice().reverse().forEach(c=>xr.encode(t,c));let a=t.endVector();return Xt.startFooter(t),Xt.addSchema(t,i),Xt.addVersion(t,v_.MetadataVersion.V4),Xt.addRecordBatches(t,n),Xt.addDictionaries(t,a),Xt.finishFooterBuffer(t,Xt.endFooter(t)),t.asUint8Array()}get numRecordBatches(){return this._recordBatches.length}get numDictionaries(){return this._dictionaryBatches.length}*recordBatches(){for(let e,t=-1,i=this.numRecordBatches;++t<i;)(e=this.getRecordBatch(t))&&(yield e)}*dictionaryBatches(){for(let e,t=-1,i=this.numDictionaries;++t<i;)(e=this.getDictionaryBatch(t))&&(yield e)}getRecordBatch(e){return e>=0&&e<this.numRecordBatches&&this._recordBatches[e]||null}getDictionaryBatch(e){return e>=0&&e<this.numDictionaries&&this._dictionaryBatches[e]||null}};en.Footer=vc;var j_=class extends vc{constructor(e,t){super(e,t.version());this._footer=t}get numRecordBatches(){return this._footer.recordBatchesLength()}get numDictionaries(){return this._footer.dictionariesLength()}getRecordBatch(e){if(e>=0&&e<this.numRecordBatches){let t=this._footer.recordBatches(e);if(t)return xr.decode(t)}return null}getDictionaryBatch(e){if(e>=0&&e<this.numDictionaries){let t=this._footer.dictionaries(e);if(t)return xr.decode(t)}return null}},xr=class{constructor(e,t,i){this.metaDataLength=e,this.offset=typeof i=="number"?i:i.low,this.bodyLength=typeof t=="number"?t:t.low}static decode(e){return new xr(e.metaDataLength(),e.bodyLength(),e.offset())}static encode(e,t){let{metaDataLength:i}=t,n=new b_(t.offset,0),a=new b_(t.bodyLength,0);return PO.createBlock(e,n,i,a)}};en.FileBlock=xr});var zr=V(qr=>{"use strict";Object.defineProperty(qr,"__esModule",{value:!0});qr.AsyncByteStream=qr.ByteStream=qr.AsyncByteQueue=void 0;var Er=kn(),w_=ci(),es=Vi(),wc=Pe(),tn=nt(),Bc=class extends es.AsyncQueue{write(e){if((e=wc.toUint8Array(e)).byteLength>0)return super.write(e)}toString(e=!1){return e?w_.decodeUtf8(this.toUint8Array(!0)):this.toUint8Array(!1).then(w_.decodeUtf8)}toUint8Array(e=!1){return e?wc.joinUint8Arrays(this._values)[0]:(async()=>{let t=[],i=0;for await(let n of this)t.push(n),i+=n.byteLength;return wc.joinUint8Arrays(t,i)[0]})()}};qr.AsyncByteQueue=Bc;var B_=class{constructor(e){e&&(this.source=new T_(Er.default.fromIterable(e)))}[Symbol.iterator](){return this}next(e){return this.source.next(e)}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}peek(e){return this.source.peek(e)}read(e){return this.source.read(e)}};qr.ByteStream=B_;var Ra=class{constructor(e){e instanceof Ra?this.source=e.source:e instanceof Bc?this.source=new Lr(Er.default.fromAsyncIterable(e)):tn.isReadableNodeStream(e)?this.source=new Lr(Er.default.fromNodeStream(e)):tn.isReadableDOMStream(e)?this.source=new Lr(Er.default.fromDOMStream(e)):tn.isFetchResponse(e)?this.source=new Lr(Er.default.fromDOMStream(e.body)):tn.isIterable(e)?this.source=new Lr(Er.default.fromIterable(e)):tn.isPromise(e)?this.source=new Lr(Er.default.fromAsyncIterable(e)):tn.isAsyncIterable(e)&&(this.source=new Lr(Er.default.fromAsyncIterable(e)))}[Symbol.asyncIterator](){return this}next(e){return this.source.next(e)}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}get closed(){return this.source.closed}cancel(e){return this.source.cancel(e)}peek(e){return this.source.peek(e)}read(e){return this.source.read(e)}};qr.AsyncByteStream=Ra;var T_=class{constructor(e){this.source=e}cancel(e){this.return(e)}peek(e){return this.next(e,"peek").value}read(e){return this.next(e,"read").value}next(e,t="read"){return this.source.next({cmd:t,size:e})}throw(e){return Object.create(this.source.throw&&this.source.throw(e)||es.ITERATOR_DONE)}return(e){return Object.create(this.source.return&&this.source.return(e)||es.ITERATOR_DONE)}},Lr=class{constructor(e){this.source=e,this._closedPromise=new Promise(t=>this._closedPromiseResolve=t)}async cancel(e){await this.return(e)}get closed(){return this._closedPromise}async read(e){return(await this.next(e,"read")).value}async peek(e){return(await this.next(e,"peek")).value}async next(e,t="read"){return await this.source.next({cmd:t,size:e})}async throw(e){let t=this.source.throw&&await this.source.throw(e)||es.ITERATOR_DONE;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(t)}async return(e){let t=this.source.return&&await this.source.return(e)||es.ITERATOR_DONE;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(t)}}});var Tc=V(rn=>{"use strict";Object.defineProperty(rn,"__esModule",{value:!0});rn.AsyncRandomAccessFile=rn.RandomAccessFile=void 0;var I_=zr(),NO=Pe(),S_=class extends I_.ByteStream{constructor(e,t){super();this.position=0,this.buffer=NO.toUint8Array(e),this.size=typeof t=="undefined"?this.buffer.byteLength:t}readInt32(e){let{buffer:t,byteOffset:i}=this.readAt(e,4);return new DataView(t,i).getInt32(0,!0)}seek(e){return this.position=Math.min(e,this.size),e<this.size}read(e){let{buffer:t,size:i,position:n}=this;return t&&n<i?(typeof e!="number"&&(e=1/0),this.position=Math.min(i,n+Math.min(i-n,e)),t.subarray(n,this.position)):null}readAt(e,t){let i=this.buffer,n=Math.min(this.size,e+t);return i?i.subarray(e,n):new Uint8Array(t)}close(){this.buffer&&(this.buffer=null)}throw(e){return this.close(),{done:!0,value:e}}return(e){return this.close(),{done:!0,value:e}}};rn.RandomAccessFile=S_;var D_=class extends I_.AsyncByteStream{constructor(e,t){super();this.position=0,this._handle=e,typeof t=="number"?this.size=t:this._pending=(async()=>{this.size=(await e.stat()).size,delete this._pending})()}async readInt32(e){let{buffer:t,byteOffset:i}=await this.readAt(e,4);return new DataView(t,i).getInt32(0,!0)}async seek(e){return this._pending&&await this._pending,this.position=Math.min(e,this.size),e<this.size}async read(e){this._pending&&await this._pending;let{_handle:t,size:i,position:n}=this;if(t&&n<i){typeof e!="number"&&(e=1/0);let a=n,c=0,f=0,w=Math.min(i,a+Math.min(i-a,e)),s=new Uint8Array(Math.max(0,(this.position=w)-a));for(;(a+=f)<w&&(c+=f)<s.byteLength;)({bytesRead:f}=await t.read(s,c,s.byteLength-c,a));return s}return null}async readAt(e,t){this._pending&&await this._pending;let{_handle:i,size:n}=this;if(i&&e+t<n){let a=Math.min(n,e+t),c=new Uint8Array(a-e);return(await i.read(c,0,t,e)).buffer}return new Uint8Array(t)}async close(){let e=this._handle;this._handle=null,e&&await e.close()}async throw(e){return await this.close(),{done:!0,value:e}}async return(e){return await this.close(),{done:!0,value:e}}};rn.AsyncRandomAccessFile=D_});var Sc=V(Zt=>{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});Zt.Int128=Zt.Int64=Zt.Uint64=Zt.BaseInt64=void 0;var xO=1<<16;function nn(r){return r<0&&(r=4294967295+r+1),`0x${r.toString(16)}`}var sn=8,Ic=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8],Na=class{constructor(e){this.buffer=e}high(){return this.buffer[1]}low(){return this.buffer[0]}_times(e){let t=new Uint32Array([this.buffer[1]>>>16,this.buffer[1]&65535,this.buffer[0]>>>16,this.buffer[0]&65535]),i=new Uint32Array([e.buffer[1]>>>16,e.buffer[1]&65535,e.buffer[0]>>>16,e.buffer[0]&65535]),n=t[3]*i[3];this.buffer[0]=n&65535;let a=n>>>16;return n=t[2]*i[3],a+=n,n=t[3]*i[2]>>>0,a+=n,this.buffer[0]+=a<<16,this.buffer[1]=a>>>0<n?xO:0,this.buffer[1]+=a>>>16,this.buffer[1]+=t[1]*i[3]+t[2]*i[2]+t[3]*i[1],this.buffer[1]+=t[0]*i[3]+t[1]*i[2]+t[2]*i[1]+t[3]*i[0]<<16,this}_plus(e){let t=this.buffer[0]+e.buffer[0]>>>0;this.buffer[1]+=e.buffer[1],t<this.buffer[0]>>>0&&++this.buffer[1],this.buffer[0]=t}lessThan(e){return this.buffer[1]<e.buffer[1]||this.buffer[1]===e.buffer[1]&&this.buffer[0]<e.buffer[0]}equals(e){return this.buffer[1]===e.buffer[1]&&this.buffer[0]==e.buffer[0]}greaterThan(e){return e.lessThan(this)}hex(){return`${nn(this.buffer[1])} ${nn(this.buffer[0])}`}};Zt.BaseInt64=Na;var be=class extends Na{times(e){return this._times(e),this}plus(e){return this._plus(e),this}static from(e,t=new Uint32Array(2)){return be.fromString(typeof e=="string"?e:e.toString(),t)}static fromNumber(e,t=new Uint32Array(2)){return be.fromString(e.toString(),t)}static fromString(e,t=new Uint32Array(2)){let i=e.length,n=new be(t);for(let a=0;a<i;){let c=sn<i-a?sn:i-a,f=new be(new Uint32Array([parseInt(e.substr(a,c),10),0])),w=new be(new Uint32Array([Ic[c],0]));n.times(w),n.plus(f),a+=c}return n}static convertArray(e){let t=new Uint32Array(e.length*2);for(let i=-1,n=e.length;++i<n;)be.from(e[i],new Uint32Array(t.buffer,t.byteOffset+2*i*4,2));return t}static multiply(e,t){return new be(new Uint32Array(e.buffer)).times(t)}static add(e,t){return new be(new Uint32Array(e.buffer)).plus(t)}};Zt.Uint64=be;var _t=class extends Na{negate(){return this.buffer[0]=~this.buffer[0]+1,this.buffer[1]=~this.buffer[1],this.buffer[0]==0&&++this.buffer[1],this}times(e){return this._times(e),this}plus(e){return this._plus(e),this}lessThan(e){let t=this.buffer[1]<<0,i=e.buffer[1]<<0;return t<i||t===i&&this.buffer[0]<e.buffer[0]}static from(e,t=new Uint32Array(2)){return _t.fromString(typeof e=="string"?e:e.toString(),t)}static fromNumber(e,t=new Uint32Array(2)){return _t.fromString(e.toString(),t)}static fromString(e,t=new Uint32Array(2)){let i=e.startsWith("-"),n=e.length,a=new _t(t);for(let c=i?1:0;c<n;){let f=sn<n-c?sn:n-c,w=new _t(new Uint32Array([parseInt(e.substr(c,f),10),0])),s=new _t(new Uint32Array([Ic[f],0]));a.times(s),a.plus(w),c+=f}return i?a.negate():a}static convertArray(e){let t=new Uint32Array(e.length*2);for(let i=-1,n=e.length;++i<n;)_t.from(e[i],new Uint32Array(t.buffer,t.byteOffset+2*i*4,2));return t}static multiply(e,t){return new _t(new Uint32Array(e.buffer)).times(t)}static add(e,t){return new _t(new Uint32Array(e.buffer)).plus(t)}};Zt.Int64=_t;var Rt=class{constructor(e){this.buffer=e}high(){return new _t(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset+8,2))}low(){return new _t(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset,2))}negate(){return this.buffer[0]=~this.buffer[0]+1,this.buffer[1]=~this.buffer[1],this.buffer[2]=~this.buffer[2],this.buffer[3]=~this.buffer[3],this.buffer[0]==0&&++this.buffer[1],this.buffer[1]==0&&++this.buffer[2],this.buffer[2]==0&&++this.buffer[3],this}times(e){let t=new be(new Uint32Array([this.buffer[3],0])),i=new be(new Uint32Array([this.buffer[2],0])),n=new be(new Uint32Array([this.buffer[1],0])),a=new be(new Uint32Array([this.buffer[0],0])),c=new be(new Uint32Array([e.buffer[3],0])),f=new be(new Uint32Array([e.buffer[2],0])),w=new be(new Uint32Array([e.buffer[1],0])),s=new be(new Uint32Array([e.buffer[0],0])),m=be.multiply(a,s);this.buffer[0]=m.low();let M=new be(new Uint32Array([m.high(),0]));return m=be.multiply(n,s),M.plus(m),m=be.multiply(a,w),M.plus(m),this.buffer[1]=M.low(),this.buffer[3]=M.lessThan(m)?1:0,this.buffer[2]=M.high(),new be(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset+8,2)).plus(be.multiply(i,s)).plus(be.multiply(n,w)).plus(be.multiply(a,f)),this.buffer[3]+=be.multiply(t,s).plus(be.multiply(i,w)).plus(be.multiply(n,f)).plus(be.multiply(a,c)).low(),this}plus(e){let t=new Uint32Array(4);return t[3]=this.buffer[3]+e.buffer[3]>>>0,t[2]=this.buffer[2]+e.buffer[2]>>>0,t[1]=this.buffer[1]+e.buffer[1]>>>0,t[0]=this.buffer[0]+e.buffer[0]>>>0,t[0]<this.buffer[0]>>>0&&++t[1],t[1]<this.buffer[1]>>>0&&++t[2],t[2]<this.buffer[2]>>>0&&++t[3],this.buffer[3]=t[3],this.buffer[2]=t[2],this.buffer[1]=t[1],this.buffer[0]=t[0],this}hex(){return`${nn(this.buffer[3])} ${nn(this.buffer[2])} ${nn(this.buffer[1])} ${nn(this.buffer[0])}`}static multiply(e,t){return new Rt(new Uint32Array(e.buffer)).times(t)}static add(e,t){return new Rt(new Uint32Array(e.buffer)).plus(t)}static from(e,t=new Uint32Array(4)){return Rt.fromString(typeof e=="string"?e:e.toString(),t)}static fromNumber(e,t=new Uint32Array(4)){return Rt.fromString(e.toString(),t)}static fromString(e,t=new Uint32Array(4)){let i=e.startsWith("-"),n=e.length,a=new Rt(t);for(let c=i?1:0;c<n;){let f=sn<n-c?sn:n-c,w=new Rt(new Uint32Array([parseInt(e.substr(c,f),10),0,0,0])),s=new Rt(new Uint32Array([Ic[f],0,0,0]));a.times(s),a.plus(w),c+=f}return i?a.negate():a}static convertArray(e){let t=new Uint32Array(e.length*4);for(let i=-1,n=e.length;++i<n;)Rt.from(e[i],new Uint32Array(t.buffer,t.byteOffset+4*4*i,4));return t}};Zt.Int128=Rt});var M_=V(an=>{"use strict";Object.defineProperty(an,"__esModule",{value:!0});an.JSONVectorLoader=an.VectorLoader=void 0;var We=kt(),EO=$e(),br=_e(),LO=et(),O_=Ht(),qO=ci(),xa=Sc(),A_=Be(),er=Pe(),Dc=class extends LO.Visitor{constructor(e,t,i,n){super();this.nodesIndex=-1,this.buffersIndex=-1,this.bytes=e,this.nodes=t,this.buffers=i,this.dictionaries=n}visit(e){return super.visit(e instanceof EO.Field?e.type:e)}visitNull(e,{length:t}=this.nextFieldNode()){return We.Data.Null(e,0,t)}visitBool(e,{length:t,nullCount:i}=this.nextFieldNode()){return We.Data.Bool(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitInt(e,{length:t,nullCount:i}=this.nextFieldNode()){return We.Data.Int(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitFloat(e,{length:t,nullCount:i}=this.nextFieldNode()){return We.Data.Float(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitUtf8(e,{length:t,nullCount:i}=this.nextFieldNode()){return We.Data.Utf8(e,0,t,i,this.readNullBitmap(e,i),this.readOffsets(e),this.readData(e))}visitBinary(e,{length:t,nullCount:i}=this.nextFieldNode()){return We.Data.Binary(e,0,t,i,this.readNullBitmap(e,i),this.readOffsets(e),this.readData(e))}visitFixedSizeBinary(e,{length:t,nullCount:i}=this.nextFieldNode()){return We.Data.FixedSizeBinary(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitDate(e,{length:t,nullCount:i}=this.nextFieldNode()){return We.Data.Date(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitTimestamp(e,{length:t,nullCount:i}=this.nextFieldNode()){return We.Data.Timestamp(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitTime(e,{length:t,nullCount:i}=this.nextFieldNode()){return We.Data.Time(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitDecimal(e,{length:t,nullCount:i}=this.nextFieldNode()){return We.Data.Decimal(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitList(e,{length:t,nullCount:i}=this.nextFieldNode()){return We.Data.List(e,0,t,i,this.readNullBitmap(e,i),this.readOffsets(e),this.visit(e.children[0]))}visitStruct(e,{length:t,nullCount:i}=this.nextFieldNode()){return We.Data.Struct(e,0,t,i,this.readNullBitmap(e,i),this.visitMany(e.children))}visitUnion(e){return e.mode===A_.UnionMode.Sparse?this.visitSparseUnion(e):this.visitDenseUnion(e)}visitDenseUnion(e,{length:t,nullCount:i}=this.nextFieldNode()){return We.Data.Union(e,0,t,i,this.readNullBitmap(e,i),this.readTypeIds(e),this.readOffsets(e),this.visitMany(e.children))}visitSparseUnion(e,{length:t,nullCount:i}=this.nextFieldNode()){return We.Data.Union(e,0,t,i,this.readNullBitmap(e,i),this.readTypeIds(e),this.visitMany(e.children))}visitDictionary(e,{length:t,nullCount:i}=this.nextFieldNode()){return We.Data.Dictionary(e,0,t,i,this.readNullBitmap(e,i),this.readData(e.indices),this.readDictionary(e))}visitInterval(e,{length:t,nullCount:i}=this.nextFieldNode()){return We.Data.Interval(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitFixedSizeList(e,{length:t,nullCount:i}=this.nextFieldNode()){return We.Data.FixedSizeList(e,0,t,i,this.readNullBitmap(e,i),this.visit(e.children[0]))}visitMap(e,{length:t,nullCount:i}=this.nextFieldNode()){return We.Data.Map(e,0,t,i,this.readNullBitmap(e,i),this.readOffsets(e),this.visit(e.children[0]))}nextFieldNode(){return this.nodes[++this.nodesIndex]}nextBufferRange(){return this.buffers[++this.buffersIndex]}readNullBitmap(e,t,i=this.nextBufferRange()){return t>0&&this.readData(e,i)||new Uint8Array(0)}readOffsets(e,t){return this.readData(e,t)}readTypeIds(e,t){return this.readData(e,t)}readData(e,{length:t,offset:i}=this.nextBufferRange()){return this.bytes.subarray(i,i+t)}readDictionary(e){return this.dictionaries.get(e.id)}};an.VectorLoader=Dc;var F_=class extends Dc{constructor(e,t,i,n){super(new Uint8Array(0),t,i,n);this.sources=e}readNullBitmap(e,t,{offset:i}=this.nextBufferRange()){return t<=0?new Uint8Array(0):O_.packBools(this.sources[i])}readOffsets(e,{offset:t}=this.nextBufferRange()){return er.toArrayBufferView(Uint8Array,er.toArrayBufferView(Int32Array,this.sources[t]))}readTypeIds(e,{offset:t}=this.nextBufferRange()){return er.toArrayBufferView(Uint8Array,er.toArrayBufferView(e.ArrayType,this.sources[t]))}readData(e,{offset:t}=this.nextBufferRange()){let{sources:i}=this;return br.DataType.isTimestamp(e)||(br.DataType.isInt(e)||br.DataType.isTime(e))&&e.bitWidth===64||br.DataType.isDate(e)&&e.unit===A_.DateUnit.MILLISECOND?er.toArrayBufferView(Uint8Array,xa.Int64.convertArray(i[t])):br.DataType.isDecimal(e)?er.toArrayBufferView(Uint8Array,xa.Int128.convertArray(i[t])):br.DataType.isBinary(e)||br.DataType.isFixedSizeBinary(e)?zO(i[t]):br.DataType.isBool(e)?O_.packBools(i[t]):br.DataType.isUtf8(e)?qO.encodeUtf8(i[t].join("")):er.toArrayBufferView(Uint8Array,er.toArrayBufferView(e.ArrayType,i[t].map(n=>+n)))}};an.JSONVectorLoader=F_;function zO(r){let e=r.join(""),t=new Uint8Array(e.length/2);for(let i=0;i<e.length;i+=2)t[i>>1]=parseInt(e.substr(i,2),16);return t}});var N_=V(un=>{"use strict";Object.defineProperty(un,"__esModule",{value:!0});un.instance=un.TypeAssembler=void 0;var WO=Mi(),YO=WO.flatbuffers.Long,Je=Pi(),HO=et(),U_=Je.org.apache.arrow.flatbuf.Null,Ea=Je.org.apache.arrow.flatbuf.Int,Oc=Je.org.apache.arrow.flatbuf.FloatingPoint,C_=Je.org.apache.arrow.flatbuf.Binary,V_=Je.org.apache.arrow.flatbuf.Bool,k_=Je.org.apache.arrow.flatbuf.Utf8,La=Je.org.apache.arrow.flatbuf.Decimal,Ac=Je.org.apache.arrow.flatbuf.Date,qa=Je.org.apache.arrow.flatbuf.Time,za=Je.org.apache.arrow.flatbuf.Timestamp,Fc=Je.org.apache.arrow.flatbuf.Interval,P_=Je.org.apache.arrow.flatbuf.List,R_=Je.org.apache.arrow.flatbuf.Struct_,on=Je.org.apache.arrow.flatbuf.Union,ts=Je.org.apache.arrow.flatbuf.DictionaryEncoding,Mc=Je.org.apache.arrow.flatbuf.FixedSizeBinary,Uc=Je.org.apache.arrow.flatbuf.FixedSizeList,Cc=Je.org.apache.arrow.flatbuf.Map,Vc=class extends HO.Visitor{visit(e,t){return e==null||t==null?void 0:super.visit(e,t)}visitNull(e,t){return U_.startNull(t),U_.endNull(t)}visitInt(e,t){return Ea.startInt(t),Ea.addBitWidth(t,e.bitWidth),Ea.addIsSigned(t,e.isSigned),Ea.endInt(t)}visitFloat(e,t){return Oc.startFloatingPoint(t),Oc.addPrecision(t,e.precision),Oc.endFloatingPoint(t)}visitBinary(e,t){return C_.startBinary(t),C_.endBinary(t)}visitBool(e,t){return V_.startBool(t),V_.endBool(t)}visitUtf8(e,t){return k_.startUtf8(t),k_.endUtf8(t)}visitDecimal(e,t){return La.startDecimal(t),La.addScale(t,e.scale),La.addPrecision(t,e.precision),La.endDecimal(t)}visitDate(e,t){return Ac.startDate(t),Ac.addUnit(t,e.unit),Ac.endDate(t)}visitTime(e,t){return qa.startTime(t),qa.addUnit(t,e.unit),qa.addBitWidth(t,e.bitWidth),qa.endTime(t)}visitTimestamp(e,t){let i=e.timezone&&t.createString(e.timezone)||void 0;return za.startTimestamp(t),za.addUnit(t,e.unit),i!==void 0&&za.addTimezone(t,i),za.endTimestamp(t)}visitInterval(e,t){return Fc.startInterval(t),Fc.addUnit(t,e.unit),Fc.endInterval(t)}visitList(e,t){return P_.startList(t),P_.endList(t)}visitStruct(e,t){return R_.startStruct_(t),R_.endStruct_(t)}visitUnion(e,t){on.startTypeIdsVector(t,e.typeIds.length);let i=on.createTypeIdsVector(t,e.typeIds);return on.startUnion(t),on.addMode(t,e.mode),on.addTypeIds(t,i),on.endUnion(t)}visitDictionary(e,t){let i=this.visit(e.indices,t);return ts.startDictionaryEncoding(t),ts.addId(t,new YO(e.id,0)),ts.addIsOrdered(t,e.isOrdered),i!==void 0&&ts.addIndexType(t,i),ts.endDictionaryEncoding(t)}visitFixedSizeBinary(e,t){return Mc.startFixedSizeBinary(t),Mc.addByteWidth(t,e.byteWidth),Mc.endFixedSizeBinary(t)}visitFixedSizeList(e,t){return Uc.startFixedSizeList(t),Uc.addListSize(t,e.listSize),Uc.endFixedSizeList(t)}visitMap(e,t){return Cc.startMap(t),Cc.addKeysSorted(t,e.keysSorted),Cc.endMap(t)}};un.TypeAssembler=Vc;un.instance=new Vc});var Y_=V(tr=>{"use strict";Object.defineProperty(tr,"__esModule",{value:!0});tr.fieldFromJSON=tr.dictionaryBatchFromJSON=tr.recordBatchFromJSON=tr.schemaFromJSON=void 0;var cn=$e(),Se=_e(),mi=_i(),ln=Be();function $O(r,e=new Map){return new cn.Schema(KO(r,e),Wa(r.customMetadata),e)}tr.schemaFromJSON=$O;function x_(r){return new mi.RecordBatch(r.count,L_(r.columns),q_(r.columns))}tr.recordBatchFromJSON=x_;function JO(r){return new mi.DictionaryBatch(x_(r.data),r.id,r.isDelta)}tr.dictionaryBatchFromJSON=JO;function KO(r,e){return(r.fields||[]).filter(Boolean).map(t=>cn.Field.fromJSON(t,e))}function E_(r,e){return(r.children||[]).filter(Boolean).map(t=>cn.Field.fromJSON(t,e))}function L_(r){return(r||[]).reduce((e,t)=>[...e,new mi.FieldNode(t.count,GO(t.VALIDITY)),...L_(t.children)],[])}function q_(r,e=[]){for(let t=-1,i=(r||[]).length;++t<i;){let n=r[t];n.VALIDITY&&e.push(new mi.BufferRegion(e.length,n.VALIDITY.length)),n.TYPE&&e.push(new mi.BufferRegion(e.length,n.TYPE.length)),n.OFFSET&&e.push(new mi.BufferRegion(e.length,n.OFFSET.length)),n.DATA&&e.push(new mi.BufferRegion(e.length,n.DATA.length)),e=q_(n.children,e)}return e}function GO(r){return(r||[]).reduce((e,t)=>e+ +(t===0),0)}function QO(r,e){let t,i,n,a,c,f;return!e||!(a=r.dictionary)?(c=W_(r,E_(r,e)),n=new cn.Field(r.name,c,r.nullable,Wa(r.customMetadata))):e.has(t=a.id)?(i=(i=a.indexType)?z_(i):new Se.Int32,f=new Se.Dictionary(e.get(t),i,t,a.isOrdered),n=new cn.Field(r.name,f,r.nullable,Wa(r.customMetadata))):(i=(i=a.indexType)?z_(i):new Se.Int32,e.set(t,c=W_(r,E_(r,e))),f=new Se.Dictionary(c,i,t,a.isOrdered),n=new cn.Field(r.name,f,r.nullable,Wa(r.customMetadata))),n||null}tr.fieldFromJSON=QO;function Wa(r){return new Map(Object.entries(r||{}))}function z_(r){return new Se.Int(r.isSigned,r.bitWidth)}function W_(r,e){let t=r.type.name;switch(t){case"NONE":return new Se.Null;case"null":return new Se.Null;case"binary":return new Se.Binary;case"utf8":return new Se.Utf8;case"bool":return new Se.Bool;case"list":return new Se.List((e||[])[0]);case"struct":return new Se.Struct(e||[]);case"struct_":return new Se.Struct(e||[])}switch(t){case"int":{let i=r.type;return new Se.Int(i.isSigned,i.bitWidth)}case"floatingpoint":{let i=r.type;return new Se.Float(ln.Precision[i.precision])}case"decimal":{let i=r.type;return new Se.Decimal(i.scale,i.precision)}case"date":{let i=r.type;return new Se.Date_(ln.DateUnit[i.unit])}case"time":{let i=r.type;return new Se.Time(ln.TimeUnit[i.unit],i.bitWidth)}case"timestamp":{let i=r.type;return new Se.Timestamp(ln.TimeUnit[i.unit],i.timezone)}case"interval":{let i=r.type;return new Se.Interval(ln.IntervalUnit[i.unit])}case"union":{let i=r.type;return new Se.Union(ln.UnionMode[i.mode],i.typeIds||[],e||[])}case"fixedsizebinary":{let i=r.type;return new Se.FixedSizeBinary(i.byteWidth)}case"fixedsizelist":{let i=r.type;return new Se.FixedSizeList(i.listSize,(e||[])[0])}case"map":{let i=r.type;return new Se.Map_((e||[])[0],i.keysSorted)}}throw new Error(`Unrecognized type: "${t}"`)}});var _i=V(St=>{"use strict";Object.defineProperty(St,"__esModule",{value:!0});St.FieldNode=St.BufferRegion=St.DictionaryBatch=St.RecordBatch=St.Message=void 0;var kc=Mi(),rt=Pi(),Ya=du(),Ke=$e(),XO=Pe(),Ue=Be(),Pc=N_(),Ha=Y_(),bi=kc.flatbuffers.Long,ZO=kc.flatbuffers.Builder,eA=kc.flatbuffers.ByteBuffer,Ye=rt.org.apache.arrow.flatbuf.Type,Nt=rt.org.apache.arrow.flatbuf.Field,gr=rt.org.apache.arrow.flatbuf.Schema,tA=rt.org.apache.arrow.flatbuf.Buffer,Wr=Ya.org.apache.arrow.flatbuf.Message,Yr=rt.org.apache.arrow.flatbuf.KeyValue,rA=Ya.org.apache.arrow.flatbuf.FieldNode,H_=rt.org.apache.arrow.flatbuf.Endianness,Hr=Ya.org.apache.arrow.flatbuf.RecordBatch,dn=Ya.org.apache.arrow.flatbuf.DictionaryBatch,De=_e(),$r=class{constructor(e,t,i,n){this._version=t,this._headerType=i,this.body=new Uint8Array(0),n&&(this._createHeader=()=>n),this._bodyLength=typeof e=="number"?e:e.low}static fromJSON(e,t){let i=new $r(0,Ue.MetadataVersion.V4,t);return i._createHeader=iA(e,t),i}static decode(e){e=new eA(XO.toUint8Array(e));let t=Wr.getRootAsMessage(e),i=t.bodyLength(),n=t.version(),a=t.headerType(),c=new $r(i,n,a);return c._createHeader=nA(t,a),c}static encode(e){let t=new ZO,i=-1;return e.isSchema()?i=Ke.Schema.encode(t,e.header()):e.isRecordBatch()?i=It.encode(t,e.header()):e.isDictionaryBatch()&&(i=rr.encode(t,e.header())),Wr.startMessage(t),Wr.addVersion(t,Ue.MetadataVersion.V4),Wr.addHeader(t,i),Wr.addHeaderType(t,e.headerType),Wr.addBodyLength(t,new bi(e.bodyLength,0)),Wr.finishMessageBuffer(t,Wr.endMessage(t)),t.asUint8Array()}static from(e,t=0){if(e instanceof Ke.Schema)return new $r(0,Ue.MetadataVersion.V4,Ue.MessageHeader.Schema,e);if(e instanceof It)return new $r(t,Ue.MetadataVersion.V4,Ue.MessageHeader.RecordBatch,e);if(e instanceof rr)return new $r(t,Ue.MetadataVersion.V4,Ue.MessageHeader.DictionaryBatch,e);throw new Error(`Unrecognized Message header: ${e}`)}get type(){return this.headerType}get version(){return this._version}get headerType(){return this._headerType}get bodyLength(){return this._bodyLength}header(){return this._createHeader()}isSchema(){return this.headerType===Ue.MessageHeader.Schema}isRecordBatch(){return this.headerType===Ue.MessageHeader.RecordBatch}isDictionaryBatch(){return this.headerType===Ue.MessageHeader.DictionaryBatch}};St.Message=$r;var It=class{constructor(e,t,i){this._nodes=t,this._buffers=i,this._length=typeof e=="number"?e:e.low}get nodes(){return this._nodes}get length(){return this._length}get buffers(){return this._buffers}};St.RecordBatch=It;var rr=class{constructor(e,t,i=!1){this._data=e,this._isDelta=i,this._id=typeof t=="number"?t:t.low}get id(){return this._id}get data(){return this._data}get isDelta(){return this._isDelta}get length(){return this.data.length}get nodes(){return this.data.nodes}get buffers(){return this.data.buffers}};St.DictionaryBatch=rr;var gi=class{constructor(e,t){this.offset=typeof e=="number"?e:e.low,this.length=typeof t=="number"?t:t.low}};St.BufferRegion=gi;var vi=class{constructor(e,t){this.length=typeof e=="number"?e:e.low,this.nullCount=typeof t=="number"?t:t.low}};St.FieldNode=vi;function iA(r,e){return()=>{switch(e){case Ue.MessageHeader.Schema:return Ke.Schema.fromJSON(r);case Ue.MessageHeader.RecordBatch:return It.fromJSON(r);case Ue.MessageHeader.DictionaryBatch:return rr.fromJSON(r)}throw new Error(`Unrecognized Message type: { name: ${Ue.MessageHeader[e]}, type: ${e} }`)}}function nA(r,e){return()=>{switch(e){case Ue.MessageHeader.Schema:return Ke.Schema.decode(r.header(new gr));case Ue.MessageHeader.RecordBatch:return It.decode(r.header(new Hr),r.version());case Ue.MessageHeader.DictionaryBatch:return rr.decode(r.header(new dn),r.version())}throw new Error(`Unrecognized Message type: { name: ${Ue.MessageHeader[e]}, type: ${e} }`)}}Ke.Field.encode=yA;Ke.Field.decode=hA;Ke.Field.fromJSON=Ha.fieldFromJSON;Ke.Schema.encode=pA;Ke.Schema.decode=sA;Ke.Schema.fromJSON=Ha.schemaFromJSON;It.encode=mA;It.decode=aA;It.fromJSON=Ha.recordBatchFromJSON;rr.encode=_A;rr.decode=oA;rr.fromJSON=Ha.dictionaryBatchFromJSON;vi.encode=bA;vi.decode=cA;gi.encode=gA;gi.decode=uA;function sA(r,e=new Map){let t=fA(r,e);return new Ke.Schema(t,$a(r),e)}function aA(r,e=Ue.MetadataVersion.V4){return new It(r.length(),lA(r),dA(r,e))}function oA(r,e=Ue.MetadataVersion.V4){return new rr(It.decode(r.data(),e),r.id(),r.isDelta())}function uA(r){return new gi(r.offset(),r.length())}function cA(r){return new vi(r.length(),r.nullCount())}function lA(r){let e=[];for(let t,i=-1,n=-1,a=r.nodesLength();++i<a;)(t=r.nodes(i))&&(e[++n]=vi.decode(t));return e}function dA(r,e){let t=[];for(let i,n=-1,a=-1,c=r.buffersLength();++n<c;)(i=r.buffers(n))&&(e<Ue.MetadataVersion.V4&&(i.bb_pos+=8*(n+1)),t[++a]=gi.decode(i));return t}function fA(r,e){let t=[];for(let i,n=-1,a=-1,c=r.fieldsLength();++n<c;)(i=r.fields(n))&&(t[++a]=Ke.Field.decode(i,e));return t}function $_(r,e){let t=[];for(let i,n=-1,a=-1,c=r.childrenLength();++n<c;)(i=r.children(n))&&(t[++a]=Ke.Field.decode(i,e));return t}function hA(r,e){let t,i,n,a,c,f;return!e||!(f=r.dictionary())?(n=K_(r,$_(r,e)),i=new Ke.Field(r.name(),n,r.nullable(),$a(r))):e.has(t=f.id().low)?(a=(a=f.indexType())?J_(a):new De.Int32,c=new De.Dictionary(e.get(t),a,t,f.isOrdered()),i=new Ke.Field(r.name(),c,r.nullable(),$a(r))):(a=(a=f.indexType())?J_(a):new De.Int32,e.set(t,n=K_(r,$_(r,e))),c=new De.Dictionary(n,a,t,f.isOrdered()),i=new Ke.Field(r.name(),c,r.nullable(),$a(r))),i||null}function $a(r){let e=new Map;if(r)for(let t,i,n=-1,a=r.customMetadataLength()|0;++n<a;)(t=r.customMetadata(n))&&(i=t.key())!=null&&e.set(i,t.value());return e}function J_(r){return new De.Int(r.isSigned(),r.bitWidth())}function K_(r,e){let t=r.typeType();switch(t){case Ye.NONE:return new De.Null;case Ye.Null:return new De.Null;case Ye.Binary:return new De.Binary;case Ye.Utf8:return new De.Utf8;case Ye.Bool:return new De.Bool;case Ye.List:return new De.List((e||[])[0]);case Ye.Struct_:return new De.Struct(e||[])}switch(t){case Ye.Int:{let i=r.type(new rt.org.apache.arrow.flatbuf.Int);return new De.Int(i.isSigned(),i.bitWidth())}case Ye.FloatingPoint:{let i=r.type(new rt.org.apache.arrow.flatbuf.FloatingPoint);return new De.Float(i.precision())}case Ye.Decimal:{let i=r.type(new rt.org.apache.arrow.flatbuf.Decimal);return new De.Decimal(i.scale(),i.precision())}case Ye.Date:{let i=r.type(new rt.org.apache.arrow.flatbuf.Date);return new De.Date_(i.unit())}case Ye.Time:{let i=r.type(new rt.org.apache.arrow.flatbuf.Time);return new De.Time(i.unit(),i.bitWidth())}case Ye.Timestamp:{let i=r.type(new rt.org.apache.arrow.flatbuf.Timestamp);return new De.Timestamp(i.unit(),i.timezone())}case Ye.Interval:{let i=r.type(new rt.org.apache.arrow.flatbuf.Interval);return new De.Interval(i.unit())}case Ye.Union:{let i=r.type(new rt.org.apache.arrow.flatbuf.Union);return new De.Union(i.mode(),i.typeIdsArray()||[],e||[])}case Ye.FixedSizeBinary:{let i=r.type(new rt.org.apache.arrow.flatbuf.FixedSizeBinary);return new De.FixedSizeBinary(i.byteWidth())}case Ye.FixedSizeList:{let i=r.type(new rt.org.apache.arrow.flatbuf.FixedSizeList);return new De.FixedSizeList(i.listSize(),(e||[])[0])}case Ye.Map:{let i=r.type(new rt.org.apache.arrow.flatbuf.Map);return new De.Map_((e||[])[0],i.keysSorted())}}throw new Error(`Unrecognized type: "${Ye[t]}" (${t})`)}function pA(r,e){let t=e.fields.map(a=>Ke.Field.encode(r,a));gr.startFieldsVector(r,t.length);let i=gr.createFieldsVector(r,t),n=e.metadata&&e.metadata.size>0?gr.createCustomMetadataVector(r,[...e.metadata].map(([a,c])=>{let f=r.createString(`${a}`),w=r.createString(`${c}`);return Yr.startKeyValue(r),Yr.addKey(r,f),Yr.addValue(r,w),Yr.endKeyValue(r)})):-1;return gr.startSchema(r),gr.addFields(r,i),gr.addEndianness(r,vA?H_.Little:H_.Big),n!==-1&&gr.addCustomMetadata(r,n),gr.endSchema(r)}function yA(r,e){let t=-1,i=-1,n=-1,a=e.type,c=e.typeId;De.DataType.isDictionary(a)?(c=a.dictionary.typeId,n=Pc.instance.visit(a,r),i=Pc.instance.visit(a.dictionary,r)):i=Pc.instance.visit(a,r);let f=(a.children||[]).map(m=>Ke.Field.encode(r,m)),w=Nt.createChildrenVector(r,f),s=e.metadata&&e.metadata.size>0?Nt.createCustomMetadataVector(r,[...e.metadata].map(([m,M])=>{let $=r.createString(`${m}`),oe=r.createString(`${M}`);return Yr.startKeyValue(r),Yr.addKey(r,$),Yr.addValue(r,oe),Yr.endKeyValue(r)})):-1;return e.name&&(t=r.createString(e.name)),Nt.startField(r),Nt.addType(r,i),Nt.addTypeType(r,c),Nt.addChildren(r,w),Nt.addNullable(r,!!e.nullable),t!==-1&&Nt.addName(r,t),n!==-1&&Nt.addDictionary(r,n),s!==-1&&Nt.addCustomMetadata(r,s),Nt.endField(r)}function mA(r,e){let t=e.nodes||[],i=e.buffers||[];Hr.startNodesVector(r,t.length),t.slice().reverse().forEach(c=>vi.encode(r,c));let n=r.endVector();Hr.startBuffersVector(r,i.length),i.slice().reverse().forEach(c=>gi.encode(r,c));let a=r.endVector();return Hr.startRecordBatch(r),Hr.addLength(r,new bi(e.length,0)),Hr.addNodes(r,n),Hr.addBuffers(r,a),Hr.endRecordBatch(r)}function _A(r,e){let t=It.encode(r,e.data);return dn.startDictionaryBatch(r),dn.addId(r,new bi(e.id,0)),dn.addIsDelta(r,e.isDelta),dn.addData(r,t),dn.endDictionaryBatch(r)}function bA(r,e){return rA.createFieldNode(r,new bi(e.length,0),new bi(e.nullCount,0))}function gA(r,e){return tA.createBuffer(r,new bi(e.offset,0),new bi(e.length,0))}var vA=function(){let r=new ArrayBuffer(2);return new DataView(r).setInt16(0,256,!0),new Int16Array(r)[0]===256}()});var Ka=V(he=>{"use strict";Object.defineProperty(he,"__esModule",{value:!0});he.magicX2AndPadding=he.magicAndPadding=he.magicLength=he.checkForMagicArrowString=he.MAGIC=he.MAGIC_STR=he.PADDING=he.JSONMessageReader=he.AsyncMessageReader=he.MessageReader=void 0;var Jr=Be(),jA=Mi(),G_=jA.flatbuffers.ByteBuffer,rs=_i(),wA=nt(),BA=Tc(),Q_=Pe(),Ja=zr(),xt=Vi(),Rc=r=>`Expected ${Jr.MessageHeader[r]} Message in stream, but was null or length 0.`,Nc=r=>`Header pointer of flatbuffer-encoded ${Jr.MessageHeader[r]} Message is null or length 0.`,X_=(r,e)=>`Expected to read ${r} metadata bytes, but only read ${e}.`,Z_=(r,e)=>`Expected to read ${r} bytes for message body, but only read ${e}.`,xc=class{constructor(e){this.source=e instanceof Ja.ByteStream?e:new Ja.ByteStream(e)}[Symbol.iterator](){return this}next(){let e;return(e=this.readMetadataLength()).done||e.value===-1&&(e=this.readMetadataLength()).done||(e=this.readMetadata(e.value)).done?xt.ITERATOR_DONE:e}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}readMessage(e){let t;if((t=this.next()).done)return null;if(e!=null&&t.value.headerType!==e)throw new Error(Rc(e));return t.value}readMessageBody(e){if(e<=0)return new Uint8Array(0);let t=Q_.toUint8Array(this.source.read(e));if(t.byteLength<e)throw new Error(Z_(e,t.byteLength));return t.byteOffset%8==0&&t.byteOffset+t.byteLength<=t.buffer.byteLength?t:t.slice()}readSchema(e=!1){let t=Jr.MessageHeader.Schema,i=this.readMessage(t),n=i&&i.header();if(e&&!n)throw new Error(Nc(t));return n}readMetadataLength(){let e=this.source.read(he.PADDING),t=e&&new G_(e),i=t&&t.readInt32(0)||0;return{done:i===0,value:i}}readMetadata(e){let t=this.source.read(e);if(!t)return xt.ITERATOR_DONE;if(t.byteLength<e)throw new Error(X_(e,t.byteLength));return{done:!1,value:rs.Message.decode(t)}}};he.MessageReader=xc;var eb=class{constructor(e,t){this.source=e instanceof Ja.AsyncByteStream?e:wA.isFileHandle(e)?new BA.AsyncRandomAccessFile(e,t):new Ja.AsyncByteStream(e)}[Symbol.asyncIterator](){return this}async next(){let e;return(e=await this.readMetadataLength()).done||e.value===-1&&(e=await this.readMetadataLength()).done||(e=await this.readMetadata(e.value)).done?xt.ITERATOR_DONE:e}async throw(e){return await this.source.throw(e)}async return(e){return await this.source.return(e)}async readMessage(e){let t;if((t=await this.next()).done)return null;if(e!=null&&t.value.headerType!==e)throw new Error(Rc(e));return t.value}async readMessageBody(e){if(e<=0)return new Uint8Array(0);let t=Q_.toUint8Array(await this.source.read(e));if(t.byteLength<e)throw new Error(Z_(e,t.byteLength));return t.byteOffset%8==0&&t.byteOffset+t.byteLength<=t.buffer.byteLength?t:t.slice()}async readSchema(e=!1){let t=Jr.MessageHeader.Schema,i=await this.readMessage(t),n=i&&i.header();if(e&&!n)throw new Error(Nc(t));return n}async readMetadataLength(){let e=await this.source.read(he.PADDING),t=e&&new G_(e),i=t&&t.readInt32(0)||0;return{done:i===0,value:i}}async readMetadata(e){let t=await this.source.read(e);if(!t)return xt.ITERATOR_DONE;if(t.byteLength<e)throw new Error(X_(e,t.byteLength));return{done:!1,value:rs.Message.decode(t)}}};he.AsyncMessageReader=eb;var tb=class extends xc{constructor(e){super(new Uint8Array(0));this._schema=!1,this._body=[],this._batchIndex=0,this._dictionaryIndex=0,this._json=e instanceof xt.ArrowJSON?e:new xt.ArrowJSON(e)}next(){let{_json:e}=this;if(!this._schema){this._schema=!0;let t=rs.Message.fromJSON(e.schema,Jr.MessageHeader.Schema);return{done:!1,value:t}}if(this._dictionaryIndex<e.dictionaries.length){let t=e.dictionaries[this._dictionaryIndex++];this._body=t.data.columns;let i=rs.Message.fromJSON(t,Jr.MessageHeader.DictionaryBatch);return{done:!1,value:i}}if(this._batchIndex<e.batches.length){let t=e.batches[this._batchIndex++];this._body=t.columns;let i=rs.Message.fromJSON(t,Jr.MessageHeader.RecordBatch);return{done:!1,value:i}}return this._body=[],xt.ITERATOR_DONE}readMessageBody(e){return t(this._body);function t(i){return(i||[]).reduce((n,a)=>[...n,...a.VALIDITY&&[a.VALIDITY]||[],...a.TYPE&&[a.TYPE]||[],...a.OFFSET&&[a.OFFSET]||[],...a.DATA&&[a.DATA]||[],...t(a.children)],[])}}readMessage(e){let t;if((t=this.next()).done)return null;if(e!=null&&t.value.headerType!==e)throw new Error(Rc(e));return t.value}readSchema(){let e=Jr.MessageHeader.Schema,t=this.readMessage(e),i=t&&t.header();if(!t||!i)throw new Error(Nc(e));return i}};he.JSONMessageReader=tb;he.PADDING=4;he.MAGIC_STR="ARROW1";he.MAGIC=new Uint8Array(he.MAGIC_STR.length);for(let r=0;r<he.MAGIC_STR.length;r+=1|0)he.MAGIC[r]=he.MAGIC_STR.charCodeAt(r);function TA(r,e=0){for(let t=-1,i=he.MAGIC.length;++t<i;)if(he.MAGIC[t]!==r[e+t])return!1;return!0}he.checkForMagicArrowString=TA;he.magicLength=he.MAGIC.length;he.magicAndPadding=he.magicLength+he.PADDING;he.magicX2AndPadding=he.magicLength*2+he.PADDING});var ab=V(Ga=>{"use strict";Object.defineProperty(Ga,"__esModule",{value:!0});Ga.VectorAssembler=void 0;var IA=et(),rb=Be(),SA=vr(),Ec=Pe(),Lc=Ht(),DA=kr(),ib=_i(),nb=_e(),xe=class extends IA.Visitor{constructor(){super();this._byteLength=0,this._nodes=[],this._buffers=[],this._bufferRegions=[]}static assemble(...e){let t=new xe,i=DA.selectVectorChildrenArgs(SA.RecordBatch,e),[n=t]=t.visitMany(i);return n}visit(e){if(!nb.DataType.isDictionary(e.type)){let{data:t,length:i,nullCount:n}=e;if(i>2147483647)throw new RangeError("Cannot write arrays larger than 2^31 - 1 in length");nb.DataType.isNull(e.type)||Et.call(this,n<=0?new Uint8Array(0):Lc.truncateBitmap(t.offset,i,t.nullBitmap)),this.nodes.push(new ib.FieldNode(i,n))}return super.visit(e)}visitNull(e){return this}visitDictionary(e){return this.visit(e.indices)}get nodes(){return this._nodes}get buffers(){return this._buffers}get byteLength(){return this._byteLength}get bufferRegions(){return this._bufferRegions}};Ga.VectorAssembler=xe;function Et(r){let e=r.byteLength+7&~7;return this.buffers.push(r),this.bufferRegions.push(new ib.BufferRegion(this._byteLength,e)),this._byteLength+=e,this}function OA(r){let{type:e,length:t,typeIds:i,valueOffsets:n}=r;if(Et.call(this,i),e.mode===rb.UnionMode.Sparse)return zc.call(this,r);if(e.mode===rb.UnionMode.Dense){if(r.offset<=0)return Et.call(this,n),zc.call(this,r);{let a=i.reduce((m,M)=>Math.max(m,M),i[0]),c=new Int32Array(a+1),f=new Int32Array(a+1).fill(-1),w=new Int32Array(t),s=Ec.rebaseValueOffsets(-n[0],t,n);for(let m,M,$=-1;++$<t;)(M=f[m=i[$]])===-1&&(M=f[m]=s[m]),w[$]=s[$]-M,++c[m];Et.call(this,w);for(let m,M=-1,$=e.children.length;++M<$;)if(m=r.getChildAt(M)){let oe=e.typeIds[M],lt=Math.min(t,c[oe]);this.visit(m.slice(f[oe],lt))}}}return this}function AA(r){let e;return r.nullCount>=r.length?Et.call(this,new Uint8Array(0)):(e=r.values)instanceof Uint8Array?Et.call(this,Lc.truncateBitmap(r.offset,r.length,e)):Et.call(this,Lc.packBools(r))}function Kr(r){return Et.call(this,r.values.subarray(0,r.length*r.stride))}function sb(r){let{length:e,values:t,valueOffsets:i}=r,n=i[0],a=i[e],c=Math.min(a-n,t.byteLength-n);return Et.call(this,Ec.rebaseValueOffsets(-i[0],e,i)),Et.call(this,t.subarray(n,n+c)),this}function qc(r){let{length:e,valueOffsets:t}=r;return t&&Et.call(this,Ec.rebaseValueOffsets(t[0],e,t)),this.visit(r.getChildAt(0))}function zc(r){return this.visitMany(r.type.children.map((e,t)=>r.getChildAt(t)).filter(Boolean))[0]}xe.prototype.visitBool=AA;xe.prototype.visitInt=Kr;xe.prototype.visitFloat=Kr;xe.prototype.visitUtf8=sb;xe.prototype.visitBinary=sb;xe.prototype.visitFixedSizeBinary=Kr;xe.prototype.visitDate=Kr;xe.prototype.visitTimestamp=Kr;xe.prototype.visitTime=Kr;xe.prototype.visitDecimal=Kr;xe.prototype.visitList=qc;xe.prototype.visitStruct=zc;xe.prototype.visitUnion=OA;xe.prototype.visitInterval=Kr;xe.prototype.visitFixedSizeList=qc;xe.prototype.visitMap=qc});var ub=V(Qa=>{"use strict";Object.defineProperty(Qa,"__esModule",{value:!0});Qa.JSONTypeAssembler=void 0;var FA=et(),Ae=Be(),ob=class extends FA.Visitor{visit(e){return e==null?void 0:super.visit(e)}visitNull({typeId:e}){return{name:Ae.ArrowType[e].toLowerCase()}}visitInt({typeId:e,bitWidth:t,isSigned:i}){return{name:Ae.ArrowType[e].toLowerCase(),bitWidth:t,isSigned:i}}visitFloat({typeId:e,precision:t}){return{name:Ae.ArrowType[e].toLowerCase(),precision:Ae.Precision[t]}}visitBinary({typeId:e}){return{name:Ae.ArrowType[e].toLowerCase()}}visitBool({typeId:e}){return{name:Ae.ArrowType[e].toLowerCase()}}visitUtf8({typeId:e}){return{name:Ae.ArrowType[e].toLowerCase()}}visitDecimal({typeId:e,scale:t,precision:i}){return{name:Ae.ArrowType[e].toLowerCase(),scale:t,precision:i}}visitDate({typeId:e,unit:t}){return{name:Ae.ArrowType[e].toLowerCase(),unit:Ae.DateUnit[t]}}visitTime({typeId:e,unit:t,bitWidth:i}){return{name:Ae.ArrowType[e].toLowerCase(),unit:Ae.TimeUnit[t],bitWidth:i}}visitTimestamp({typeId:e,timezone:t,unit:i}){return{name:Ae.ArrowType[e].toLowerCase(),unit:Ae.TimeUnit[i],timezone:t}}visitInterval({typeId:e,unit:t}){return{name:Ae.ArrowType[e].toLowerCase(),unit:Ae.IntervalUnit[t]}}visitList({typeId:e}){return{name:Ae.ArrowType[e].toLowerCase()}}visitStruct({typeId:e}){return{name:Ae.ArrowType[e].toLowerCase()}}visitUnion({typeId:e,mode:t,typeIds:i}){return{name:Ae.ArrowType[e].toLowerCase(),mode:Ae.UnionMode[t],typeIds:[...i]}}visitDictionary(e){return this.visit(e.dictionary)}visitFixedSizeBinary({typeId:e,byteWidth:t}){return{name:Ae.ArrowType[e].toLowerCase(),byteWidth:t}}visitFixedSizeList({typeId:e,listSize:t}){return{name:Ae.ArrowType[e].toLowerCase(),listSize:t}}visitMap({typeId:e,keysSorted:t}){return{name:Ae.ArrowType[e].toLowerCase(),keysSorted:t}}};Qa.JSONTypeAssembler=ob});var db=V(eo=>{"use strict";Object.defineProperty(eo,"__esModule",{value:!0});eo.JSONVectorAssembler=void 0;var MA=Yn(),is=Gi(),UA=Ve(),CA=et(),VA=Be(),kA=vr(),Wc=Be(),Xa=Ht(),PA=kr(),cb=_e(),Za=class extends CA.Visitor{static assemble(...e){return new Za().visitMany(PA.selectColumnChildrenArgs(kA.RecordBatch,e))}visit(e){let{data:t,name:i,length:n}=e,{offset:a,nullCount:c,nullBitmap:f}=t,w=cb.DataType.isDictionary(e.type)?e.type.indices:e.type,s=Object.assign([],t.buffers,{[VA.BufferType.VALIDITY]:void 0});return{name:i,count:n,VALIDITY:cb.DataType.isNull(w)?void 0:c<=0?Array.from({length:n},()=>1):[...Xa.iterateBits(f,a,n,null,Xa.getBit)],...super.visit(UA.Vector.new(t.clone(w,a,n,0,s)))}}visitNull(){return{}}visitBool({values:e,offset:t,length:i}){return{DATA:[...Xa.iterateBits(e,t,i,null,Xa.getBool)]}}visitInt(e){return{DATA:e.type.bitWidth<64?[...e.values]:[...ns(e.values,2)]}}visitFloat(e){return{DATA:[...e.values]}}visitUtf8(e){return{DATA:[...e],OFFSET:[...e.valueOffsets]}}visitBinary(e){return{DATA:[...lb(e)],OFFSET:[...e.valueOffsets]}}visitFixedSizeBinary(e){return{DATA:[...lb(e)]}}visitDate(e){return{DATA:e.type.unit===Wc.DateUnit.DAY?[...e.values]:[...ns(e.values,2)]}}visitTimestamp(e){return{DATA:[...ns(e.values,2)]}}visitTime(e){return{DATA:e.type.unit<Wc.TimeUnit.MICROSECOND?[...e.values]:[...ns(e.values,2)]}}visitDecimal(e){return{DATA:[...ns(e.values,4)]}}visitList(e){return{OFFSET:[...e.valueOffsets],children:e.type.children.map((t,i)=>this.visit(new is.Column(t,[e.getChildAt(i)])))}}visitStruct(e){return{children:e.type.children.map((t,i)=>this.visit(new is.Column(t,[e.getChildAt(i)])))}}visitUnion(e){return{TYPE:[...e.typeIds],OFFSET:e.type.mode===Wc.UnionMode.Dense?[...e.valueOffsets]:void 0,children:e.type.children.map((t,i)=>this.visit(new is.Column(t,[e.getChildAt(i)])))}}visitInterval(e){return{DATA:[...e.values]}}visitFixedSizeList(e){return{children:e.type.children.map((t,i)=>this.visit(new is.Column(t,[e.getChildAt(i)])))}}visitMap(e){return{OFFSET:[...e.valueOffsets],children:e.type.children.map((t,i)=>this.visit(new is.Column(t,[e.getChildAt(i)])))}}};eo.JSONVectorAssembler=Za;function*lb(r){for(let e of r)yield e.reduce((t,i)=>`${t}${("0"+(i&255).toString(16)).slice(-2)}`,"").toUpperCase()}function*ns(r,e){for(let t=-1,i=r.length/e;++t<i;)yield`${MA.BN.new(r.subarray((t+0)*e,(t+1)*e),!1)}`}});var so=V(nr=>{"use strict";Object.defineProperty(nr,"__esModule",{value:!0});nr.RecordBatchJSONWriter=nr.RecordBatchFileWriter=nr.RecordBatchStreamWriter=nr.RecordBatchWriter=void 0;var Yc=as(),RA=Ka(),NA=Gi(),xA=_e(),EA=$e(),to=_i(),Hc=_i(),fn=jc(),$c=Be(),Jc=zr(),fb=ab(),LA=ub(),hb=db(),qA=Pe(),Kc=vr(),zA=Vi(),ir=nt(),ss=class extends zA.ReadableInterop{constructor(e){super();this._position=0,this._started=!1,this._sink=new Jc.AsyncByteQueue,this._schema=null,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._dictionaryDeltaOffsets=new Map,ir.isObject(e)||(e={autoDestroy:!0,writeLegacyIpcFormat:!1}),this._autoDestroy=typeof e.autoDestroy=="boolean"?e.autoDestroy:!0,this._writeLegacyIpcFormat=typeof e.writeLegacyIpcFormat=="boolean"?e.writeLegacyIpcFormat:!1}static throughNode(e){throw new Error('"throughNode" not available in this environment')}static throughDOM(e,t){throw new Error('"throughDOM" not available in this environment')}toString(e=!1){return this._sink.toString(e)}toUint8Array(e=!1){return this._sink.toUint8Array(e)}writeAll(e){return ir.isPromise(e)?e.then(t=>this.writeAll(t)):ir.isAsyncIterable(e)?Qc(this,e):Gc(this,e)}get closed(){return this._sink.closed}[Symbol.asyncIterator](){return this._sink[Symbol.asyncIterator]()}toDOMStream(e){return this._sink.toDOMStream(e)}toNodeStream(e){return this._sink.toNodeStream(e)}close(){return this.reset()._sink.close()}abort(e){return this.reset()._sink.abort(e)}finish(){return this._autoDestroy?this.close():this.reset(this._sink,this._schema),this}reset(e=this._sink,t=null){return e===this._sink||e instanceof Jc.AsyncByteQueue?this._sink=e:(this._sink=new Jc.AsyncByteQueue,e&&ir.isWritableDOMStream(e)?this.toDOMStream({type:"bytes"}).pipeTo(e):e&&ir.isWritableNodeStream(e)&&this.toNodeStream({objectMode:!1}).pipe(e)),this._started&&this._schema&&this._writeFooter(this._schema),this._started=!1,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._dictionaryDeltaOffsets=new Map,(!t||!t.compareTo(this._schema))&&(t===null?(this._position=0,this._schema=null):(this._started=!0,this._schema=t,this._writeSchema(t))),this}write(e){let t=null;if(this._sink){if(e==null)return this.finish()&&void 0;if(e instanceof Yc.Table&&!(t=e.schema))return this.finish()&&void 0;if(e instanceof Kc.RecordBatch&&!(t=e.schema))return this.finish()&&void 0}else throw new Error("RecordBatchWriter is closed");if(t&&!t.compareTo(this._schema)){if(this._started&&this._autoDestroy)return this.close();this.reset(this._sink,t)}e instanceof Kc.RecordBatch?e instanceof Kc._InternalEmptyPlaceholderRecordBatch||this._writeRecordBatch(e):e instanceof Yc.Table?this.writeAll(e.chunks):ir.isIterable(e)&&this.writeAll(e)}_writeMessage(e,t=8){let i=t-1,n=to.Message.encode(e),a=n.byteLength,c=this._writeLegacyIpcFormat?4:8,f=a+c+i&~i,w=f-a-c;return e.headerType===$c.MessageHeader.RecordBatch?this._recordBatchBlocks.push(new fn.FileBlock(f,e.bodyLength,this._position)):e.headerType===$c.MessageHeader.DictionaryBatch&&this._dictionaryBlocks.push(new fn.FileBlock(f,e.bodyLength,this._position)),this._writeLegacyIpcFormat||this._write(Int32Array.of(-1)),this._write(Int32Array.of(f-c)),a>0&&this._write(n),this._writePadding(w)}_write(e){if(this._started){let t=qA.toUint8Array(e);t&&t.byteLength>0&&(this._sink.write(t),this._position+=t.byteLength)}return this}_writeSchema(e){return this._writeMessage(to.Message.from(e))}_writeFooter(e){return this._writeLegacyIpcFormat?this._write(Int32Array.of(0)):this._write(Int32Array.of(-1,0))}_writeMagic(){return this._write(RA.MAGIC)}_writePadding(e){return e>0?this._write(new Uint8Array(e)):this}_writeRecordBatch(e){let{byteLength:t,nodes:i,bufferRegions:n,buffers:a}=fb.VectorAssembler.assemble(e),c=new Hc.RecordBatch(e.length,i,n),f=to.Message.from(c,t);return this._writeDictionaries(e)._writeMessage(f)._writeBodyBuffers(a)}_writeDictionaryBatch(e,t,i=!1){this._dictionaryDeltaOffsets.set(t,e.length+(this._dictionaryDeltaOffsets.get(t)||0));let{byteLength:n,nodes:a,bufferRegions:c,buffers:f}=fb.VectorAssembler.assemble(e),w=new Hc.RecordBatch(e.length,a,c),s=new Hc.DictionaryBatch(w,t,i),m=to.Message.from(s,n);return this._writeMessage(m)._writeBodyBuffers(f)}_writeBodyBuffers(e){let t,i,n;for(let a=-1,c=e.length;++a<c;)(t=e[a])&&(i=t.byteLength)>0&&(this._write(t),(n=(i+7&~7)-i)>0&&this._writePadding(n));return this}_writeDictionaries(e){for(let[t,i]of e.dictionaries){let n=this._dictionaryDeltaOffsets.get(t)||0;if(n===0||(i=i.slice(n)).length>0){let a="chunks"in i?i.chunks:[i];for(let c of a)this._writeDictionaryBatch(c,t,n>0),n+=c.length}}return this}};nr.RecordBatchWriter=ss;var ro=class extends ss{static writeAll(e,t){let i=new ro(t);return ir.isPromise(e)?e.then(n=>i.writeAll(n)):ir.isAsyncIterable(e)?Qc(i,e):Gc(i,e)}};nr.RecordBatchStreamWriter=ro;var io=class extends ss{static writeAll(e){let t=new io;return ir.isPromise(e)?e.then(i=>t.writeAll(i)):ir.isAsyncIterable(e)?Qc(t,e):Gc(t,e)}constructor(){super();this._autoDestroy=!0}_writeSchema(e){return this._writeMagic()._writePadding(2)}_writeFooter(e){let t=fn.Footer.encode(new fn.Footer(e,$c.MetadataVersion.V4,this._recordBatchBlocks,this._dictionaryBlocks));return super._writeFooter(e)._write(t)._write(Int32Array.of(t.byteLength))._writeMagic()}};nr.RecordBatchFileWriter=io;var no=class extends ss{constructor(){super();this._autoDestroy=!0,this._recordBatches=[],this._dictionaries=[]}static writeAll(e){return new no().writeAll(e)}_writeMessage(){return this}_writeFooter(e){return this}_writeSchema(e){return this._write(`{
|
|
8
|
-
"schema": ${JSON.stringify({fields:e.fields.map(pb)},null,2)}`)}_writeDictionaries(e){return e.dictionaries.size>0&&this._dictionaries.push(e),this}_writeDictionaryBatch(e,t,i=!1){return this._dictionaryDeltaOffsets.set(t,e.length+(this._dictionaryDeltaOffsets.get(t)||0)),this._write(this._dictionaryBlocks.length===0?" ":`,
|
|
9
|
-
`),this._write(`${WA(e,t,i)}`),this._dictionaryBlocks.push(new fn.FileBlock(0,0,0)),this}_writeRecordBatch(e){return this._writeDictionaries(e),this._recordBatches.push(e),this}close(){if(this._dictionaries.length>0){this._write(`,
|
|
10
|
-
"dictionaries": [
|
|
11
|
-
`);for(let e of this._dictionaries)super._writeDictionaries(e);this._write(`
|
|
12
|
-
]`)}if(this._recordBatches.length>0){for(let e=-1,t=this._recordBatches.length;++e<t;)this._write(e===0?`,
|
|
13
|
-
"batches": [
|
|
14
|
-
`:`,
|
|
15
|
-
`),this._write(`${YA(this._recordBatches[e])}`),this._recordBatchBlocks.push(new fn.FileBlock(0,0,0));this._write(`
|
|
16
|
-
]`)}return this._schema&&this._write(`
|
|
17
|
-
}`),this._dictionaries=[],this._recordBatches=[],super.close()}};nr.RecordBatchJSONWriter=no;function Gc(r,e){let t=e;e instanceof Yc.Table&&(t=e.chunks,r.reset(void 0,e.schema));for(let i of t)r.write(i);return r.finish()}async function Qc(r,e){for await(let t of e)r.write(t);return r.finish()}function pb({name:r,type:e,nullable:t}){let i=new LA.JSONTypeAssembler;return{name:r,nullable:t,type:i.visit(e),children:(e.children||[]).map(pb),dictionary:xA.DataType.isDictionary(e)?{id:e.id,isOrdered:e.isOrdered,indexType:i.visit(e.indices)}:void 0}}function WA(r,e,t=!1){let i=new EA.Field(`${e}`,r.type,r.nullCount>0),n=hb.JSONVectorAssembler.assemble(new NA.Column(i,[r]));return JSON.stringify({id:e,isDelta:t,data:{count:r.length,columns:n}},null,2)}function YA(r){return JSON.stringify({count:r.length,columns:hb.JSONVectorAssembler.assemble(r)},null,2)}});var el=V(Gr=>{"use strict";Object.defineProperty(Gr,"__esModule",{value:!0});Gr.distributeVectorsIntoRecordBatches=Gr.distributeColumnsIntoRecordBatches=Gr.ensureSameLengthData=void 0;var yb=kt(),Xc=$e(),HA=Vr(),$A=vr(),Zc=new Uint8Array(0),mb=r=>[Zc,Zc,new Uint8Array(r),Zc];function JA(r,e,t=e.reduce((i,n)=>Math.max(i,n.length),0)){let i,n,a=-1,c=e.length,f=[...r.fields],w=[],s=(t+63&~63)>>3;for(;++a<c;)(i=e[a])&&i.length===t?w[a]=i:((n=f[a]).nullable||(f[a]=f[a].clone({nullable:!0})),w[a]=i?i._changeLengthAndBackfillNullBitmap(t):yb.Data.new(n.type,0,t,t,mb(s)));return[new Xc.Schema(f),t,w]}Gr.ensureSameLengthData=JA;function KA(r){return _b(new Xc.Schema(r.map(({field:e})=>e)),r)}Gr.distributeColumnsIntoRecordBatches=KA;function _b(r,e){return GA(r,e.map(t=>t instanceof HA.Chunked?t.chunks.map(i=>i.data):[t.data]))}Gr.distributeVectorsIntoRecordBatches=_b;function GA(r,e){let t=[...r.fields],i=[],n={numBatches:e.reduce((M,$)=>Math.max(M,$.length),0)},a=0,c=0,f=-1,w=e.length,s,m=[];for(;n.numBatches-- >0;){for(c=Number.POSITIVE_INFINITY,f=-1;++f<w;)m[f]=s=e[f].shift(),c=Math.min(c,s?s.length:c);isFinite(c)&&(m=QA(t,c,m,e,n),c>0&&(i[a++]=[c,m.slice()]))}return[r=new Xc.Schema(t,r.metadata),i.map(M=>new $A.RecordBatch(r,...M))]}function QA(r,e,t,i,n){let a,c,f=0,w=-1,s=i.length,m=(e+63&~63)>>3;for(;++w<s;)(a=t[w])&&(f=a.length)>=e?f===e?t[w]=a:(t[w]=a.slice(0,e),a=a.slice(e,f-e),n.numBatches=Math.max(n.numBatches,i[w].unshift(a))):((c=r[w]).nullable||(r[w]=c.clone({nullable:!0})),t[w]=a?a._changeLengthAndBackfillNullBitmap(e):yb.Data.new(c.type,0,e,e,mb(m)));return t}});var ke=V(ao=>{"use strict";Object.defineProperty(ao,"__esModule",{value:!0});ao.BaseVector=void 0;var XA=Be(),ZA=Vr(),eF=Jn(),tl=Ve(),rl=class extends tl.AbstractVector{constructor(e,t){super();this._children=t,this.numChildren=e.childData.length,this._bindDataAccessors(this.data=e)}get type(){return this.data.type}get typeId(){return this.data.typeId}get length(){return this.data.length}get offset(){return this.data.offset}get stride(){return this.data.stride}get nullCount(){return this.data.nullCount}get byteLength(){return this.data.byteLength}get VectorName(){return`${XA.Type[this.typeId]}Vector`}get ArrayType(){return this.type.ArrayType}get values(){return this.data.values}get typeIds(){return this.data.typeIds}get nullBitmap(){return this.data.nullBitmap}get valueOffsets(){return this.data.valueOffsets}get[Symbol.toStringTag](){return`${this.VectorName}<${this.type[Symbol.toStringTag]}>`}clone(e,t=this._children){return tl.Vector.new(e,t)}concat(...e){return ZA.Chunked.concat(this,...e)}slice(e,t){return eF.clampRange(this,e,t,this._sliceInternal)}isValid(e){if(this.nullCount>0){let t=this.offset+e;return(this.nullBitmap[t>>3]&1<<t%8)!==0}return!0}getChildAt(e){return e<0||e>=this.numChildren?null:(this._children||(this._children=[]))[e]||(this._children[e]=tl.Vector.new(this.data.childData[e]))}toJSON(){return[...this]}_sliceInternal(e,t,i){return e.clone(e.data.slice(t,i-t),null)}_bindDataAccessors(e){}};ao.BaseVector=rl;rl.prototype[Symbol.isConcatSpreadable]=!0});var il=V(oo=>{"use strict";Object.defineProperty(oo,"__esModule",{value:!0});oo.BinaryVector=void 0;var tF=Ve(),rF=ke(),iF=_e(),bb=class extends rF.BaseVector{asUtf8(){return tF.Vector.new(this.data.clone(new iF.Utf8))}};oo.BinaryVector=bb});var nl=V(uo=>{"use strict";Object.defineProperty(uo,"__esModule",{value:!0});uo.BoolVector=void 0;var nF=_e(),sF=ke(),aF=sr(),gb=class extends sF.BaseVector{static from(e){return aF.vectorFromValuesWithType(()=>new nF.Bool,e)}};uo.BoolVector=gb});var al=V(Qr=>{"use strict";Object.defineProperty(Qr,"__esModule",{value:!0});Qr.DateMillisecondVector=Qr.DateDayVector=Qr.DateVector=void 0;var oF=Be(),uF=ke(),vb=sr(),sl=_e(),co=class extends uF.BaseVector{static from(...e){return e.length===2?vb.vectorFromValuesWithType(()=>e[1]===oF.DateUnit.DAY?new sl.DateDay:new sl.DateMillisecond,e[0]):vb.vectorFromValuesWithType(()=>new sl.DateMillisecond,e[0])}};Qr.DateVector=co;var jb=class extends co{};Qr.DateDayVector=jb;var wb=class extends co{};Qr.DateMillisecondVector=wb});var ol=V(lo=>{"use strict";Object.defineProperty(lo,"__esModule",{value:!0});lo.DecimalVector=void 0;var cF=ke(),Bb=class extends cF.BaseVector{};lo.DecimalVector=Bb});var ho=V(fo=>{"use strict";Object.defineProperty(fo,"__esModule",{value:!0});fo.DictionaryVector=void 0;var lF=kt(),Tb=Ve(),dF=ke(),fF=sr(),hF=_e(),ul=class extends dF.BaseVector{constructor(e){super(e);this.indices=Tb.Vector.new(e.clone(this.type.indices))}static from(...e){if(e.length===3){let[t,i,n]=e,a=new hF.Dictionary(t.type,i,null,null);return Tb.Vector.new(lF.Data.Dictionary(a,0,n.length,0,null,n,t))}return fF.vectorFromValuesWithType(()=>e[0].type,e[0])}get dictionary(){return this.data.dictionary}reverseLookup(e){return this.dictionary.indexOf(e)}getKey(e){return this.indices.get(e)}getValue(e){return this.dictionary.get(e)}setKey(e,t){return this.indices.set(e,t)}setValue(e,t){return this.dictionary.set(e,t)}};fo.DictionaryVector=ul;ul.prototype.indices=null});var cl=V(po=>{"use strict";Object.defineProperty(po,"__esModule",{value:!0});po.FixedSizeBinaryVector=void 0;var pF=ke(),Ib=class extends pF.BaseVector{};po.FixedSizeBinaryVector=Ib});var ll=V(yo=>{"use strict";Object.defineProperty(yo,"__esModule",{value:!0});yo.FixedSizeListVector=void 0;var yF=ke(),Sb=class extends yF.BaseVector{};yo.FixedSizeListVector=Sb});var pl=V(ar=>{"use strict";Object.defineProperty(ar,"__esModule",{value:!0});ar.Float64Vector=ar.Float32Vector=ar.Float16Vector=ar.FloatVector=void 0;var mF=kt(),_F=Ve(),bF=ke(),gF=sr(),ji=_e(),os=class extends bF.BaseVector{static from(e){let t=wF(this);if(e instanceof ArrayBuffer||ArrayBuffer.isView(e)){let i=jF(e.constructor)||t;if(t===null&&(t=i),t&&t===i){let n=new t,a=e.byteLength/n.ArrayType.BYTES_PER_ELEMENT;if(!vF(t,e.constructor))return _F.Vector.new(mF.Data.Float(n,0,a,0,null,e))}}if(t)return gF.vectorFromValuesWithType(()=>new t,e);throw e instanceof DataView||e instanceof ArrayBuffer?new TypeError(`Cannot infer float type from instance of ${e.constructor.name}`):new TypeError("Unrecognized FloatVector input")}};ar.FloatVector=os;var dl=class extends os{toFloat32Array(){return new Float32Array(this)}toFloat64Array(){return new Float64Array(this)}};ar.Float16Vector=dl;var fl=class extends os{};ar.Float32Vector=fl;var hl=class extends os{};ar.Float64Vector=hl;var vF=(r,e)=>r===ji.Float16&&e!==Uint16Array,jF=r=>{switch(r){case Uint16Array:return ji.Float16;case Float32Array:return ji.Float32;case Float64Array:return ji.Float64;default:return null}},wF=r=>{switch(r){case dl:return ji.Float16;case fl:return ji.Float32;case hl:return ji.Float64;default:return null}}});var yl=V(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr.IntervalYearMonthVector=Xr.IntervalDayTimeVector=Xr.IntervalVector=void 0;var BF=ke(),mo=class extends BF.BaseVector{};Xr.IntervalVector=mo;var Db=class extends mo{};Xr.IntervalDayTimeVector=Db;var Ob=class extends mo{};Xr.IntervalYearMonthVector=Ob});var _o=V(Ee=>{"use strict";Object.defineProperty(Ee,"__esModule",{value:!0});Ee.Uint64Vector=Ee.Uint32Vector=Ee.Uint16Vector=Ee.Uint8Vector=Ee.Int64Vector=Ee.Int32Vector=Ee.Int16Vector=Ee.Int8Vector=Ee.IntVector=void 0;var TF=kt(),IF=Ve(),SF=ke(),DF=sr(),Ab=nt(),Fb=Pe(),Ce=_e(),or=class extends SF.BaseVector{static from(...e){let[t,i=!1]=e,n=FF(this,i);if(t instanceof ArrayBuffer||ArrayBuffer.isView(t)){let a=AF(t.constructor,i)||n;if(n===null&&(n=a),n&&n===a){let c=new n,f=t.byteLength/c.ArrayType.BYTES_PER_ELEMENT;return OF(n,t.constructor)&&(f*=.5),IF.Vector.new(TF.Data.Int(c,0,f,0,null,t))}}if(n)return DF.vectorFromValuesWithType(()=>new n,t);throw t instanceof DataView||t instanceof ArrayBuffer?new TypeError(`Cannot infer integer type from instance of ${t.constructor.name}`):new TypeError("Unrecognized IntVector input")}};Ee.IntVector=or;var ml=class extends or{};Ee.Int8Vector=ml;var _l=class extends or{};Ee.Int16Vector=_l;var bl=class extends or{};Ee.Int32Vector=bl;var gl=class extends or{toBigInt64Array(){return Fb.toBigInt64Array(this.values)}get values64(){return this._values64||(this._values64=this.toBigInt64Array())}};Ee.Int64Vector=gl;var vl=class extends or{};Ee.Uint8Vector=vl;var jl=class extends or{};Ee.Uint16Vector=jl;var wl=class extends or{};Ee.Uint32Vector=wl;var Bl=class extends or{toBigUint64Array(){return Fb.toBigUint64Array(this.values)}get values64(){return this._values64||(this._values64=this.toBigUint64Array())}};Ee.Uint64Vector=Bl;var OF=(r,e)=>(r===Ce.Int64||r===Ce.Uint64)&&(e===Int32Array||e===Uint32Array),AF=(r,e)=>{switch(r){case Int8Array:return Ce.Int8;case Int16Array:return Ce.Int16;case Int32Array:return e?Ce.Int64:Ce.Int32;case Ab.BigInt64Array:return Ce.Int64;case Uint8Array:return Ce.Uint8;case Uint16Array:return Ce.Uint16;case Uint32Array:return e?Ce.Uint64:Ce.Uint32;case Ab.BigUint64Array:return Ce.Uint64;default:return null}},FF=(r,e)=>{switch(r){case ml:return Ce.Int8;case _l:return Ce.Int16;case bl:return e?Ce.Int64:Ce.Int32;case gl:return Ce.Int64;case vl:return Ce.Uint8;case jl:return Ce.Uint16;case wl:return e?Ce.Uint64:Ce.Uint32;case Bl:return Ce.Uint64;default:return null}}});var Tl=V(bo=>{"use strict";Object.defineProperty(bo,"__esModule",{value:!0});bo.ListVector=void 0;var MF=ke(),Mb=class extends MF.BaseVector{};bo.ListVector=Mb});var Il=V(go=>{"use strict";Object.defineProperty(go,"__esModule",{value:!0});go.MapVector=void 0;var UF=Hn(),CF=Ve(),VF=ke(),kF=_e(),Ub=class extends VF.BaseVector{asList(){let e=this.type.children[0];return CF.Vector.new(this.data.clone(new kF.List(e)))}bind(e){let t=this.getChildAt(0),{[e]:i,[e+1]:n}=this.valueOffsets;return new UF.MapRow(t.slice(i,n))}};go.MapVector=Ub});var Sl=V(vo=>{"use strict";Object.defineProperty(vo,"__esModule",{value:!0});vo.NullVector=void 0;var PF=ke(),Cb=class extends PF.BaseVector{};vo.NullVector=Cb});var Dl=V(jo=>{"use strict";Object.defineProperty(jo,"__esModule",{value:!0});jo.StructVector=void 0;var RF=Hn(),NF=ke(),xF=Symbol.for("rowIndex"),Vb=class extends NF.BaseVector{bind(e){let t=this._row||(this._row=new RF.StructRow(this)),i=Object.create(t);return i[xF]=e,i}};jo.StructVector=Vb});var Ol=V(Dt=>{"use strict";Object.defineProperty(Dt,"__esModule",{value:!0});Dt.TimestampNanosecondVector=Dt.TimestampMicrosecondVector=Dt.TimestampMillisecondVector=Dt.TimestampSecondVector=Dt.TimestampVector=void 0;var EF=ke(),hn=class extends EF.BaseVector{};Dt.TimestampVector=hn;var kb=class extends hn{};Dt.TimestampSecondVector=kb;var Pb=class extends hn{};Dt.TimestampMillisecondVector=Pb;var Rb=class extends hn{};Dt.TimestampMicrosecondVector=Rb;var Nb=class extends hn{};Dt.TimestampNanosecondVector=Nb});var Al=V(Ot=>{"use strict";Object.defineProperty(Ot,"__esModule",{value:!0});Ot.TimeNanosecondVector=Ot.TimeMicrosecondVector=Ot.TimeMillisecondVector=Ot.TimeSecondVector=Ot.TimeVector=void 0;var LF=ke(),pn=class extends LF.BaseVector{};Ot.TimeVector=pn;var xb=class extends pn{};Ot.TimeSecondVector=xb;var Eb=class extends pn{};Ot.TimeMillisecondVector=Eb;var Lb=class extends pn{};Ot.TimeMicrosecondVector=Lb;var qb=class extends pn{};Ot.TimeNanosecondVector=qb});var Fl=V(Zr=>{"use strict";Object.defineProperty(Zr,"__esModule",{value:!0});Zr.SparseUnionVector=Zr.DenseUnionVector=Zr.UnionVector=void 0;var qF=ke(),wo=class extends qF.BaseVector{get typeIdToChildIndex(){return this.data.type.typeIdToChildIndex}};Zr.UnionVector=wo;var zb=class extends wo{get valueOffsets(){return this.data.valueOffsets}};Zr.DenseUnionVector=zb;var Wb=class extends wo{};Zr.SparseUnionVector=Wb});var Ml=V(Bo=>{"use strict";Object.defineProperty(Bo,"__esModule",{value:!0});Bo.Utf8Vector=void 0;var zF=Ve(),WF=ke(),Yb=_e(),YF=sr(),Hb=class extends WF.BaseVector{static from(e){return YF.vectorFromValuesWithType(()=>new Yb.Utf8,e)}asBinary(){return zF.Vector.new(this.data.clone(new Yb.Binary))}};Bo.Utf8Vector=Hb});var $b=V(ei=>{"use strict";Object.defineProperty(ei,"__esModule",{value:!0});ei.partial2=ei.partial1=ei.partial0=void 0;function HF(r){return function(){return r(this)}}ei.partial0=HF;function $F(r){return function(e){return r(this,e)}}ei.partial1=$F;function JF(r){return function(e,t){return r(this,e,t)}}ei.partial2=JF});var Vl=V(yn=>{"use strict";Object.defineProperty(yn,"__esModule",{value:!0});yn.instance=yn.GetVisitor=void 0;var To=Yn(),KF=et(),GF=ci(),QF=Ln(),At=Be(),K=class extends KF.Visitor{};yn.GetVisitor=K;var XF=(r,e)=>864e5*r[e],Ul=(r,e)=>4294967296*r[e+1]+(r[e]>>>0),ZF=(r,e)=>4294967296*(r[e+1]/1e3)+(r[e]>>>0)/1e3,eM=(r,e)=>4294967296*(r[e+1]/1e6)+(r[e]>>>0)/1e6,Jb=r=>new Date(r),tM=(r,e)=>Jb(XF(r,e)),rM=(r,e)=>Jb(Ul(r,e)),iM=(r,e)=>null,Kb=(r,e,t)=>{let{[t]:i,[t+1]:n}=e;return i!=null&&n!=null?r.subarray(i,n):null},nM=({offset:r,values:e},t)=>{let i=r+t;return(e[i>>3]&1<<i%8)!=0},Gb=({values:r},e)=>tM(r,e),Qb=({values:r},e)=>rM(r,e*2),ur=({stride:r,values:e},t)=>e[r*t],Xb=({stride:r,values:e},t)=>QF.uint16ToFloat64(e[r*t]),Cl=({stride:r,values:e,type:t},i)=>To.BN.new(e.subarray(r*i,r*(i+1)),t.isSigned),sM=({stride:r,values:e},t)=>e.subarray(r*t,r*(t+1)),aM=({values:r,valueOffsets:e},t)=>Kb(r,e,t),oM=({values:r,valueOffsets:e},t)=>{let i=Kb(r,e,t);return i!==null?GF.decodeUtf8(i):null},uM=(r,e)=>r.type.bitWidth<64?ur(r,e):Cl(r,e),cM=(r,e)=>r.type.precision!==At.Precision.HALF?ur(r,e):Xb(r,e),lM=(r,e)=>r.type.unit===At.DateUnit.DAY?Gb(r,e):Qb(r,e),Zb=({values:r},e)=>1e3*Ul(r,e*2),eg=({values:r},e)=>Ul(r,e*2),tg=({values:r},e)=>ZF(r,e*2),rg=({values:r},e)=>eM(r,e*2),dM=(r,e)=>{switch(r.type.unit){case At.TimeUnit.SECOND:return Zb(r,e);case At.TimeUnit.MILLISECOND:return eg(r,e);case At.TimeUnit.MICROSECOND:return tg(r,e);case At.TimeUnit.NANOSECOND:return rg(r,e)}},ig=({values:r,stride:e},t)=>r[e*t],ng=({values:r,stride:e},t)=>r[e*t],sg=({values:r},e)=>To.BN.signed(r.subarray(2*e,2*(e+1))),ag=({values:r},e)=>To.BN.signed(r.subarray(2*e,2*(e+1))),fM=(r,e)=>{switch(r.type.unit){case At.TimeUnit.SECOND:return ig(r,e);case At.TimeUnit.MILLISECOND:return ng(r,e);case At.TimeUnit.MICROSECOND:return sg(r,e);case At.TimeUnit.NANOSECOND:return ag(r,e)}},hM=({values:r},e)=>To.BN.decimal(r.subarray(4*e,4*(e+1))),pM=(r,e)=>{let t=r.getChildAt(0),{valueOffsets:i,stride:n}=r;return t.slice(i[e*n],i[e*n+1])},yM=(r,e)=>r.bind(e),mM=(r,e)=>r.bind(e),_M=(r,e)=>r.type.mode===At.UnionMode.Dense?og(r,e):ug(r,e),og=(r,e)=>{let t=r.typeIdToChildIndex[r.typeIds[e]],i=r.getChildAt(t);return i?i.get(r.valueOffsets[e]):null},ug=(r,e)=>{let t=r.typeIdToChildIndex[r.typeIds[e]],i=r.getChildAt(t);return i?i.get(e):null},bM=(r,e)=>r.getValue(r.getKey(e)),gM=(r,e)=>r.type.unit===At.IntervalUnit.DAY_TIME?cg(r,e):lg(r,e),cg=({values:r},e)=>r.subarray(2*e,2*(e+1)),lg=({values:r},e)=>{let t=r[e],i=new Int32Array(2);return i[0]=t/12|0,i[1]=t%12|0,i},vM=(r,e)=>{let t=r.getChildAt(0),{stride:i}=r;return t.slice(e*i,(e+1)*i)};K.prototype.visitNull=iM;K.prototype.visitBool=nM;K.prototype.visitInt=uM;K.prototype.visitInt8=ur;K.prototype.visitInt16=ur;K.prototype.visitInt32=ur;K.prototype.visitInt64=Cl;K.prototype.visitUint8=ur;K.prototype.visitUint16=ur;K.prototype.visitUint32=ur;K.prototype.visitUint64=Cl;K.prototype.visitFloat=cM;K.prototype.visitFloat16=Xb;K.prototype.visitFloat32=ur;K.prototype.visitFloat64=ur;K.prototype.visitUtf8=oM;K.prototype.visitBinary=aM;K.prototype.visitFixedSizeBinary=sM;K.prototype.visitDate=lM;K.prototype.visitDateDay=Gb;K.prototype.visitDateMillisecond=Qb;K.prototype.visitTimestamp=dM;K.prototype.visitTimestampSecond=Zb;K.prototype.visitTimestampMillisecond=eg;K.prototype.visitTimestampMicrosecond=tg;K.prototype.visitTimestampNanosecond=rg;K.prototype.visitTime=fM;K.prototype.visitTimeSecond=ig;K.prototype.visitTimeMillisecond=ng;K.prototype.visitTimeMicrosecond=sg;K.prototype.visitTimeNanosecond=ag;K.prototype.visitDecimal=hM;K.prototype.visitList=pM;K.prototype.visitStruct=mM;K.prototype.visitUnion=_M;K.prototype.visitDenseUnion=og;K.prototype.visitSparseUnion=ug;K.prototype.visitDictionary=bM;K.prototype.visitInterval=gM;K.prototype.visitIntervalDayTime=cg;K.prototype.visitIntervalYearMonth=lg;K.prototype.visitFixedSizeList=vM;K.prototype.visitMap=yM;yn.instance=new K});var pg=V(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});mn.instance=mn.IndexOfVisitor=void 0;var jM=et(),dg=Ht(),fg=Jn(),G=class extends jM.Visitor{};mn.IndexOfVisitor=G;function wM(r,e){return e===null&&r.length>0?0:-1}function BM(r,e){let{nullBitmap:t}=r.data;if(!t||r.nullCount<=0)return-1;let i=0;for(let n of dg.iterateBits(t,r.data.offset+(e||0),r.length,t,dg.getBool)){if(!n)return i;++i}return-1}function ue(r,e,t){if(e===void 0)return-1;if(e===null)return BM(r,t);let i=fg.createElementComparator(e);for(let n=(t||0)-1,a=r.length;++n<a;)if(i(r.get(n)))return n;return-1}function hg(r,e,t){let i=fg.createElementComparator(e);for(let n=(t||0)-1,a=r.length;++n<a;)if(i(r.get(n)))return n;return-1}G.prototype.visitNull=wM;G.prototype.visitBool=ue;G.prototype.visitInt=ue;G.prototype.visitInt8=ue;G.prototype.visitInt16=ue;G.prototype.visitInt32=ue;G.prototype.visitInt64=ue;G.prototype.visitUint8=ue;G.prototype.visitUint16=ue;G.prototype.visitUint32=ue;G.prototype.visitUint64=ue;G.prototype.visitFloat=ue;G.prototype.visitFloat16=ue;G.prototype.visitFloat32=ue;G.prototype.visitFloat64=ue;G.prototype.visitUtf8=ue;G.prototype.visitBinary=ue;G.prototype.visitFixedSizeBinary=ue;G.prototype.visitDate=ue;G.prototype.visitDateDay=ue;G.prototype.visitDateMillisecond=ue;G.prototype.visitTimestamp=ue;G.prototype.visitTimestampSecond=ue;G.prototype.visitTimestampMillisecond=ue;G.prototype.visitTimestampMicrosecond=ue;G.prototype.visitTimestampNanosecond=ue;G.prototype.visitTime=ue;G.prototype.visitTimeSecond=ue;G.prototype.visitTimeMillisecond=ue;G.prototype.visitTimeMicrosecond=ue;G.prototype.visitTimeNanosecond=ue;G.prototype.visitDecimal=ue;G.prototype.visitList=ue;G.prototype.visitStruct=ue;G.prototype.visitUnion=ue;G.prototype.visitDenseUnion=hg;G.prototype.visitSparseUnion=hg;G.prototype.visitDictionary=ue;G.prototype.visitInterval=ue;G.prototype.visitIntervalDayTime=ue;G.prototype.visitIntervalYearMonth=ue;G.prototype.visitFixedSizeList=ue;G.prototype.visitMap=ue;mn.instance=new G});var kl=V(_n=>{"use strict";Object.defineProperty(_n,"__esModule",{value:!0});_n.instance=_n.IteratorVisitor=void 0;var Io=Be(),TM=et(),IM=Ht(),yg=Vl(),Q=class extends TM.Visitor{};_n.IteratorVisitor=Q;function SM(r){let e=yg.instance.getVisitFn(r);return IM.iterateBits(r.data.nullBitmap,r.data.offset,r.length,r,(t,i,n,a)=>(n&1<<a)!=0?e(t,i):null)}function se(r){if(r.nullCount>0)return SM(r);let{type:e,typeId:t,length:i}=r;return r.stride===1&&(t===Io.Type.Timestamp||t===Io.Type.Int&&e.bitWidth!==64||t===Io.Type.Time&&e.bitWidth!==64||t===Io.Type.Float&&e.precision>0)?r.data.values.subarray(0,i)[Symbol.iterator]():function*(n){for(let a=-1;++a<i;)yield n(r,a)}(yg.instance.getVisitFn(r))}Q.prototype.visitNull=se;Q.prototype.visitBool=se;Q.prototype.visitInt=se;Q.prototype.visitInt8=se;Q.prototype.visitInt16=se;Q.prototype.visitInt32=se;Q.prototype.visitInt64=se;Q.prototype.visitUint8=se;Q.prototype.visitUint16=se;Q.prototype.visitUint32=se;Q.prototype.visitUint64=se;Q.prototype.visitFloat=se;Q.prototype.visitFloat16=se;Q.prototype.visitFloat32=se;Q.prototype.visitFloat64=se;Q.prototype.visitUtf8=se;Q.prototype.visitBinary=se;Q.prototype.visitFixedSizeBinary=se;Q.prototype.visitDate=se;Q.prototype.visitDateDay=se;Q.prototype.visitDateMillisecond=se;Q.prototype.visitTimestamp=se;Q.prototype.visitTimestampSecond=se;Q.prototype.visitTimestampMillisecond=se;Q.prototype.visitTimestampMicrosecond=se;Q.prototype.visitTimestampNanosecond=se;Q.prototype.visitTime=se;Q.prototype.visitTimeSecond=se;Q.prototype.visitTimeMillisecond=se;Q.prototype.visitTimeMicrosecond=se;Q.prototype.visitTimeNanosecond=se;Q.prototype.visitDecimal=se;Q.prototype.visitList=se;Q.prototype.visitStruct=se;Q.prototype.visitUnion=se;Q.prototype.visitDenseUnion=se;Q.prototype.visitSparseUnion=se;Q.prototype.visitDictionary=se;Q.prototype.visitInterval=se;Q.prototype.visitIntervalDayTime=se;Q.prototype.visitIntervalYearMonth=se;Q.prototype.visitFixedSizeList=se;Q.prototype.visitMap=se;_n.instance=new Q});var mg=V(bn=>{"use strict";Object.defineProperty(bn,"__esModule",{value:!0});bn.instance=bn.ToArrayVisitor=void 0;var us=Be(),DM=et(),OM=kl(),X=class extends DM.Visitor{};bn.ToArrayVisitor=X;function ae(r){let{type:e,length:t,stride:i}=r;switch(e.typeId){case us.Type.Int:case us.Type.Float:case us.Type.Decimal:case us.Type.Time:case us.Type.Timestamp:return r.data.values.subarray(0,t*i)}return[...OM.instance.visit(r)]}X.prototype.visitNull=ae;X.prototype.visitBool=ae;X.prototype.visitInt=ae;X.prototype.visitInt8=ae;X.prototype.visitInt16=ae;X.prototype.visitInt32=ae;X.prototype.visitInt64=ae;X.prototype.visitUint8=ae;X.prototype.visitUint16=ae;X.prototype.visitUint32=ae;X.prototype.visitUint64=ae;X.prototype.visitFloat=ae;X.prototype.visitFloat16=ae;X.prototype.visitFloat32=ae;X.prototype.visitFloat64=ae;X.prototype.visitUtf8=ae;X.prototype.visitBinary=ae;X.prototype.visitFixedSizeBinary=ae;X.prototype.visitDate=ae;X.prototype.visitDateDay=ae;X.prototype.visitDateMillisecond=ae;X.prototype.visitTimestamp=ae;X.prototype.visitTimestampSecond=ae;X.prototype.visitTimestampMillisecond=ae;X.prototype.visitTimestampMicrosecond=ae;X.prototype.visitTimestampNanosecond=ae;X.prototype.visitTime=ae;X.prototype.visitTimeSecond=ae;X.prototype.visitTimeMillisecond=ae;X.prototype.visitTimeMicrosecond=ae;X.prototype.visitTimeNanosecond=ae;X.prototype.visitDecimal=ae;X.prototype.visitList=ae;X.prototype.visitStruct=ae;X.prototype.visitUnion=ae;X.prototype.visitDenseUnion=ae;X.prototype.visitSparseUnion=ae;X.prototype.visitDictionary=ae;X.prototype.visitInterval=ae;X.prototype.visitIntervalDayTime=ae;X.prototype.visitIntervalYearMonth=ae;X.prototype.visitFixedSizeList=ae;X.prototype.visitMap=ae;bn.instance=new X});var _g=V(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.instance=gn.ByteWidthVisitor=void 0;var AM=et(),FM=Be(),cs=(r,e)=>r+e,Pl=r=>`Cannot compute the byte width of variable-width column ${r}`,Rl=class extends AM.Visitor{visitNull(e){return 0}visitInt(e){return e.bitWidth/8}visitFloat(e){return e.ArrayType.BYTES_PER_ELEMENT}visitBinary(e){throw new Error(Pl(e))}visitUtf8(e){throw new Error(Pl(e))}visitBool(e){return 1/8}visitDecimal(e){return 16}visitDate(e){return(e.unit+1)*4}visitTime(e){return e.bitWidth/8}visitTimestamp(e){return e.unit===FM.TimeUnit.SECOND?4:8}visitInterval(e){return(e.unit+1)*4}visitList(e){throw new Error(Pl(e))}visitStruct(e){return this.visitFields(e.children).reduce(cs,0)}visitUnion(e){return this.visitFields(e.children).reduce(cs,0)}visitFixedSizeBinary(e){return e.byteWidth}visitFixedSizeList(e){return e.listSize*this.visitFields(e.children).reduce(cs,0)}visitMap(e){return this.visitFields(e.children).reduce(cs,0)}visitDictionary(e){return this.visit(e.indices)}visitFields(e){return(e||[]).map(t=>this.visit(t.type))}visitSchema(e){return this.visitFields(e.fields).reduce(cs,0)}};gn.ByteWidthVisitor=Rl;gn.instance=new Rl});var bg=V(vn=>{"use strict";Object.defineProperty(vn,"__esModule",{value:!0});vn.instance=vn.GetVectorConstructor=void 0;var MM=et(),UM=il(),CM=nl(),Nl=al(),VM=ol(),kM=ho(),PM=cl(),RM=ll(),So=pl(),xl=yl(),jr=_o(),NM=Tl(),xM=Il(),EM=Sl(),LM=Dl(),ls=Ol(),ds=Al(),El=Fl(),qM=Ml(),Ll=class extends MM.Visitor{visitNull(){return EM.NullVector}visitBool(){return CM.BoolVector}visitInt(){return jr.IntVector}visitInt8(){return jr.Int8Vector}visitInt16(){return jr.Int16Vector}visitInt32(){return jr.Int32Vector}visitInt64(){return jr.Int64Vector}visitUint8(){return jr.Uint8Vector}visitUint16(){return jr.Uint16Vector}visitUint32(){return jr.Uint32Vector}visitUint64(){return jr.Uint64Vector}visitFloat(){return So.FloatVector}visitFloat16(){return So.Float16Vector}visitFloat32(){return So.Float32Vector}visitFloat64(){return So.Float64Vector}visitUtf8(){return qM.Utf8Vector}visitBinary(){return UM.BinaryVector}visitFixedSizeBinary(){return PM.FixedSizeBinaryVector}visitDate(){return Nl.DateVector}visitDateDay(){return Nl.DateDayVector}visitDateMillisecond(){return Nl.DateMillisecondVector}visitTimestamp(){return ls.TimestampVector}visitTimestampSecond(){return ls.TimestampSecondVector}visitTimestampMillisecond(){return ls.TimestampMillisecondVector}visitTimestampMicrosecond(){return ls.TimestampMicrosecondVector}visitTimestampNanosecond(){return ls.TimestampNanosecondVector}visitTime(){return ds.TimeVector}visitTimeSecond(){return ds.TimeSecondVector}visitTimeMillisecond(){return ds.TimeMillisecondVector}visitTimeMicrosecond(){return ds.TimeMicrosecondVector}visitTimeNanosecond(){return ds.TimeNanosecondVector}visitDecimal(){return VM.DecimalVector}visitList(){return NM.ListVector}visitStruct(){return LM.StructVector}visitUnion(){return El.UnionVector}visitDenseUnion(){return El.DenseUnionVector}visitSparseUnion(){return El.SparseUnionVector}visitDictionary(){return kM.DictionaryVector}visitInterval(){return xl.IntervalVector}visitIntervalDayTime(){return xl.IntervalDayTimeVector}visitIntervalYearMonth(){return xl.IntervalYearMonthVector}visitFixedSizeList(){return RM.FixedSizeListVector}visitMap(){return xM.MapVector}};vn.GetVectorConstructor=Ll;vn.instance=new Ll});var sr=V(k=>{"use strict";Object.defineProperty(k,"__esModule",{value:!0});k.vectorFromValuesWithType=k.StructRow=k.MapRow=k.Utf8Vector=k.SparseUnionVector=k.DenseUnionVector=k.UnionVector=k.TimeNanosecondVector=k.TimeMicrosecondVector=k.TimeMillisecondVector=k.TimeSecondVector=k.TimeVector=k.TimestampNanosecondVector=k.TimestampMicrosecondVector=k.TimestampMillisecondVector=k.TimestampSecondVector=k.TimestampVector=k.StructVector=k.NullVector=k.MapVector=k.ListVector=k.Uint64Vector=k.Uint32Vector=k.Uint16Vector=k.Uint8Vector=k.Int64Vector=k.Int32Vector=k.Int16Vector=k.Int8Vector=k.IntVector=k.IntervalYearMonthVector=k.IntervalDayTimeVector=k.IntervalVector=k.Float64Vector=k.Float32Vector=k.Float16Vector=k.FloatVector=k.FixedSizeListVector=k.FixedSizeBinaryVector=k.DictionaryVector=k.DecimalVector=k.DateMillisecondVector=k.DateDayVector=k.DateVector=k.Chunked=k.BoolVector=k.BinaryVector=k.BaseVector=k.Vector=void 0;var zM=Ve();Object.defineProperty(k,"Vector",{enumerable:!0,get:function(){return zM.Vector}});var WM=ke();Object.defineProperty(k,"BaseVector",{enumerable:!0,get:function(){return WM.BaseVector}});var YM=il();Object.defineProperty(k,"BinaryVector",{enumerable:!0,get:function(){return YM.BinaryVector}});var HM=nl();Object.defineProperty(k,"BoolVector",{enumerable:!0,get:function(){return HM.BoolVector}});var $M=Vr();Object.defineProperty(k,"Chunked",{enumerable:!0,get:function(){return $M.Chunked}});var ql=al();Object.defineProperty(k,"DateVector",{enumerable:!0,get:function(){return ql.DateVector}});Object.defineProperty(k,"DateDayVector",{enumerable:!0,get:function(){return ql.DateDayVector}});Object.defineProperty(k,"DateMillisecondVector",{enumerable:!0,get:function(){return ql.DateMillisecondVector}});var JM=ol();Object.defineProperty(k,"DecimalVector",{enumerable:!0,get:function(){return JM.DecimalVector}});var KM=ho();Object.defineProperty(k,"DictionaryVector",{enumerable:!0,get:function(){return KM.DictionaryVector}});var GM=cl();Object.defineProperty(k,"FixedSizeBinaryVector",{enumerable:!0,get:function(){return GM.FixedSizeBinaryVector}});var QM=ll();Object.defineProperty(k,"FixedSizeListVector",{enumerable:!0,get:function(){return QM.FixedSizeListVector}});var Do=pl();Object.defineProperty(k,"FloatVector",{enumerable:!0,get:function(){return Do.FloatVector}});Object.defineProperty(k,"Float16Vector",{enumerable:!0,get:function(){return Do.Float16Vector}});Object.defineProperty(k,"Float32Vector",{enumerable:!0,get:function(){return Do.Float32Vector}});Object.defineProperty(k,"Float64Vector",{enumerable:!0,get:function(){return Do.Float64Vector}});var zl=yl();Object.defineProperty(k,"IntervalVector",{enumerable:!0,get:function(){return zl.IntervalVector}});Object.defineProperty(k,"IntervalDayTimeVector",{enumerable:!0,get:function(){return zl.IntervalDayTimeVector}});Object.defineProperty(k,"IntervalYearMonthVector",{enumerable:!0,get:function(){return zl.IntervalYearMonthVector}});var wr=_o();Object.defineProperty(k,"IntVector",{enumerable:!0,get:function(){return wr.IntVector}});Object.defineProperty(k,"Int8Vector",{enumerable:!0,get:function(){return wr.Int8Vector}});Object.defineProperty(k,"Int16Vector",{enumerable:!0,get:function(){return wr.Int16Vector}});Object.defineProperty(k,"Int32Vector",{enumerable:!0,get:function(){return wr.Int32Vector}});Object.defineProperty(k,"Int64Vector",{enumerable:!0,get:function(){return wr.Int64Vector}});Object.defineProperty(k,"Uint8Vector",{enumerable:!0,get:function(){return wr.Uint8Vector}});Object.defineProperty(k,"Uint16Vector",{enumerable:!0,get:function(){return wr.Uint16Vector}});Object.defineProperty(k,"Uint32Vector",{enumerable:!0,get:function(){return wr.Uint32Vector}});Object.defineProperty(k,"Uint64Vector",{enumerable:!0,get:function(){return wr.Uint64Vector}});var XM=Tl();Object.defineProperty(k,"ListVector",{enumerable:!0,get:function(){return XM.ListVector}});var ZM=Il();Object.defineProperty(k,"MapVector",{enumerable:!0,get:function(){return ZM.MapVector}});var eU=Sl();Object.defineProperty(k,"NullVector",{enumerable:!0,get:function(){return eU.NullVector}});var tU=Dl();Object.defineProperty(k,"StructVector",{enumerable:!0,get:function(){return tU.StructVector}});var fs=Ol();Object.defineProperty(k,"TimestampVector",{enumerable:!0,get:function(){return fs.TimestampVector}});Object.defineProperty(k,"TimestampSecondVector",{enumerable:!0,get:function(){return fs.TimestampSecondVector}});Object.defineProperty(k,"TimestampMillisecondVector",{enumerable:!0,get:function(){return fs.TimestampMillisecondVector}});Object.defineProperty(k,"TimestampMicrosecondVector",{enumerable:!0,get:function(){return fs.TimestampMicrosecondVector}});Object.defineProperty(k,"TimestampNanosecondVector",{enumerable:!0,get:function(){return fs.TimestampNanosecondVector}});var hs=Al();Object.defineProperty(k,"TimeVector",{enumerable:!0,get:function(){return hs.TimeVector}});Object.defineProperty(k,"TimeSecondVector",{enumerable:!0,get:function(){return hs.TimeSecondVector}});Object.defineProperty(k,"TimeMillisecondVector",{enumerable:!0,get:function(){return hs.TimeMillisecondVector}});Object.defineProperty(k,"TimeMicrosecondVector",{enumerable:!0,get:function(){return hs.TimeMicrosecondVector}});Object.defineProperty(k,"TimeNanosecondVector",{enumerable:!0,get:function(){return hs.TimeNanosecondVector}});var Wl=Fl();Object.defineProperty(k,"UnionVector",{enumerable:!0,get:function(){return Wl.UnionVector}});Object.defineProperty(k,"DenseUnionVector",{enumerable:!0,get:function(){return Wl.DenseUnionVector}});Object.defineProperty(k,"SparseUnionVector",{enumerable:!0,get:function(){return Wl.SparseUnionVector}});var rU=Ml();Object.defineProperty(k,"Utf8Vector",{enumerable:!0,get:function(){return rU.Utf8Vector}});var gg=Hn();Object.defineProperty(k,"MapRow",{enumerable:!0,get:function(){return gg.MapRow}});Object.defineProperty(k,"StructRow",{enumerable:!0,get:function(){return gg.StructRow}});var ps=$b(),Yl=Be(),jn=Ve(),vg=Vr(),wi=ke(),iU=Ht(),Oo=nt(),jg=Me(),wg=Vl(),Bg=cc(),Tg=pg(),Ig=mg(),Sg=kl(),Dg=_g(),Og=bg();jn.Vector.new=nU;jn.Vector.from=aU;function nU(r,...e){return new(Og.instance.getVisitFn(r)())(r,...e)}function sU(r,e){if(Oo.isIterable(e))return jn.Vector.from({nullValues:[null,void 0],type:r(),values:e});if(Oo.isAsyncIterable(e))return jn.Vector.from({nullValues:[null,void 0],type:r(),values:e});let{values:t=[],type:i=r(),nullValues:n=[null,void 0]}={...e};return Oo.isIterable(t)?jn.Vector.from({nullValues:n,...e,type:i}):jn.Vector.from({nullValues:n,...e,type:i})}k.vectorFromValuesWithType=sU;function aU(r){let{values:e=[],...t}={nullValues:[null,void 0],...r};if(Oo.isIterable(e)){let i=[...jg.Builder.throughIterable(t)(e)];return i.length===1?i[0]:vg.Chunked.concat(i)}return(async i=>{let n=jg.Builder.throughAsyncIterable(t);for await(let a of n(e))i.push(a);return i.length===1?i[0]:vg.Chunked.concat(i)})([])}wi.BaseVector.prototype.get=function(e){return wg.instance.visit(this,e)};wi.BaseVector.prototype.set=function(e,t){return Bg.instance.visit(this,e,t)};wi.BaseVector.prototype.indexOf=function(e,t){return Tg.instance.visit(this,e,t)};wi.BaseVector.prototype.toArray=function(){return Ig.instance.visit(this)};wi.BaseVector.prototype.getByteWidth=function(){return Dg.instance.visit(this.type)};wi.BaseVector.prototype[Symbol.iterator]=function(){return Sg.instance.visit(this)};wi.BaseVector.prototype._bindDataAccessors=lU;Object.keys(Yl.Type).map(r=>Yl.Type[r]).filter(r=>typeof r=="number").filter(r=>r!==Yl.Type.NONE).forEach(r=>{let e=Og.instance.visit(r);e.prototype.get=ps.partial1(wg.instance.getVisitFn(r)),e.prototype.set=ps.partial2(Bg.instance.getVisitFn(r)),e.prototype.indexOf=ps.partial2(Tg.instance.getVisitFn(r)),e.prototype.toArray=ps.partial0(Ig.instance.getVisitFn(r)),e.prototype.getByteWidth=oU(Dg.instance.getVisitFn(r)),e.prototype[Symbol.iterator]=ps.partial0(Sg.instance.getVisitFn(r))});function oU(r){return function(){return r(this.type)}}function uU(r){return function(e){return this.isValid(e)?r.call(this,e):null}}function cU(r){return function(e,t){iU.setBool(this.nullBitmap,this.offset+e,t!=null)&&r.call(this,e,t)}}function lU(){let r=this.nullBitmap;r&&r.byteLength>0&&(this.get=uU(this.get),this.set=cU(this.set))}});var as=V(Ao=>{"use strict";Object.defineProperty(Ao,"__esModule",{value:!0});Ao.Table=void 0;var dU=Gi(),Ag=$e(),Hl=vr(),fU=ys(),$l=_e(),Fg=kr(),Jl=nt(),Mg=so(),Ug=el(),Kl=sr(),Ge=class extends Kl.Chunked{constructor(...e){let t=null;e[0]instanceof Ag.Schema&&(t=e.shift());let i=Fg.selectArgs(Hl.RecordBatch,e);if(!t&&!(t=i[0]&&i[0].schema))throw new TypeError("Table must be initialized with a Schema or at least one RecordBatch");i[0]||(i[0]=new Hl._InternalEmptyPlaceholderRecordBatch(t));super(new $l.Struct(t.fields),i);this._schema=t,this._chunks=i}static empty(e=new Ag.Schema([])){return new Ge(e,[])}static from(e){if(!e)return Ge.empty();if(typeof e=="object"){let i=Jl.isIterable(e.values)?hU(e):Jl.isAsyncIterable(e.values)?pU(e):null;if(i!==null)return i}let t=fU.RecordBatchReader.from(e);return Jl.isPromise(t)?(async()=>await Ge.from(await t))():t.isSync()&&(t=t.open())?t.schema?new Ge(t.schema,[...t]):Ge.empty():(async i=>{let n=await i,a=n.schema,c=[];if(a){for await(let f of n)c.push(f);return new Ge(a,c)}return Ge.empty()})(t.open())}static async fromAsync(e){return await Ge.from(e)}static fromStruct(e){return Ge.new(e.data.childData,e.type.children)}static new(...e){return new Ge(...Ug.distributeColumnsIntoRecordBatches(Fg.selectColumnArgs(e)))}get schema(){return this._schema}get length(){return this._length}get chunks(){return this._chunks}get numCols(){return this._numChildren}clone(e=this._chunks){return new Ge(this._schema,e)}getColumn(e){return this.getColumnAt(this.getColumnIndex(e))}getColumnAt(e){return this.getChildAt(e)}getColumnIndex(e){return this._schema.fields.findIndex(t=>t.name===e)}getChildAt(e){if(e<0||e>=this.numChildren)return null;let t,i,n=this._schema.fields,a=this._children||(this._children=[]);if(i=a[e])return i;if(t=n[e]){let c=this._chunks.map(f=>f.getChildAt(e)).filter(f=>f!=null);if(c.length>0)return a[e]=new dU.Column(t,c)}return null}serialize(e="binary",t=!0){return(t?Mg.RecordBatchStreamWriter:Mg.RecordBatchFileWriter).writeAll(this).toUint8Array(!0)}count(){return this._length}select(...e){let t=this._schema.fields.reduce((i,n,a)=>i.set(n.name,a),new Map);return this.selectAt(...e.map(i=>t.get(i)).filter(i=>i>-1))}selectAt(...e){let t=this._schema.selectAt(...e);return new Ge(t,this._chunks.map(({length:i,data:{childData:n}})=>new Hl.RecordBatch(t,i,e.map(a=>n[a]).filter(Boolean))))}assign(e){let t=this._schema.fields,[i,n]=e.schema.fields.reduce((f,w,s)=>{let[m,M]=f,$=t.findIndex(oe=>oe.name===w.name);return~$?M[$]=s:m.push(s),f},[[],[]]),a=this._schema.assign(e.schema),c=[...t.map((f,w,s,m=n[w])=>m===void 0?this.getColumnAt(w):e.getColumnAt(m)),...i.map(f=>e.getColumnAt(f))].filter(Boolean);return new Ge(...Ug.distributeVectorsIntoRecordBatches(a,c))}};Ao.Table=Ge;function hU(r){let{type:e}=r;return e instanceof $l.Struct?Ge.fromStruct(Kl.StructVector.from(r)):null}function pU(r){let{type:e}=r;return e instanceof $l.Struct?Kl.StructVector.from(r).then(t=>Ge.fromStruct(t)):null}});var vr=V(wn=>{"use strict";Object.defineProperty(wn,"__esModule",{value:!0});wn._InternalEmptyPlaceholderRecordBatch=wn.RecordBatch=void 0;var Gl=kt(),Ql=as(),yU=Ve(),mU=et(),_U=$e(),bU=nt(),gU=Vr(),vU=kr(),Xl=_e(),jU=el(),wU=sr(),ti=class extends wU.StructVector{constructor(...e){let t,i=e[0],n;if(e[1]instanceof Gl.Data)[,t,n]=e;else{let a=i.fields,[,c,f]=e;t=Gl.Data.Struct(new Xl.Struct(a),0,c,0,null,f)}super(t,n);this._schema=i}static from(e){return bU.isIterable(e.values),Ql.Table.from(e)}static new(...e){let[t,i]=vU.selectFieldArgs(e),n=i.filter(a=>a instanceof yU.Vector);return new ti(...jU.ensureSameLengthData(new _U.Schema(t),n.map(a=>a.data)))}clone(e,t=this._children){return new ti(this._schema,e,t)}concat(...e){let t=this._schema,i=gU.Chunked.flatten(this,...e);return new Ql.Table(t,i.map(({data:n})=>new ti(t,n)))}get schema(){return this._schema}get numCols(){return this._schema.fields.length}get dictionaries(){return this._dictionaries||(this._dictionaries=Fo.collect(this))}select(...e){let t=this._schema.fields.reduce((i,n,a)=>i.set(n.name,a),new Map);return this.selectAt(...e.map(i=>t.get(i)).filter(i=>i>-1))}selectAt(...e){let t=this._schema.selectAt(...e),i=e.map(n=>this.data.childData[n]).filter(Boolean);return new ti(t,this.length,i)}};wn.RecordBatch=ti;var Cg=class extends ti{constructor(e){super(e,0,e.fields.map(t=>Gl.Data.new(t.type,0,0,0)))}};wn._InternalEmptyPlaceholderRecordBatch=Cg;var Fo=class extends mU.Visitor{constructor(){super(...arguments);this.dictionaries=new Map}static collect(e){return new Fo().visit(e.data,new Xl.Struct(e.schema.fields)).dictionaries}visit(e,t){return Xl.DataType.isDictionary(t)?this.visitDictionary(e,t):(e.childData.forEach((i,n)=>this.visit(i,t.children[n].type)),this)}visitDictionary(e,t){let i=e.dictionary;return i&&i.length>0&&this.dictionaries.set(t.id,i),this}}});var ys=V(Ut=>{"use strict";Object.defineProperty(Ut,"__esModule",{value:!0});Ut.AsyncRecordBatchFileReader=Ut.RecordBatchFileReader=Ut.AsyncRecordBatchStreamReader=Ut.RecordBatchStreamReader=Ut.RecordBatchReader=void 0;var Vg=Ve(),Mo=Be(),kg=jc(),Pg=kn(),Rg=zr(),ms=Tc(),Ng=M_(),Zl=vr(),Bi=Vi(),Ft=Ka(),Mt=nt(),cr=class extends Bi.ReadableInterop{constructor(e){super();this._impl=e}get closed(){return this._impl.closed}get schema(){return this._impl.schema}get autoDestroy(){return this._impl.autoDestroy}get dictionaries(){return this._impl.dictionaries}get numDictionaries(){return this._impl.numDictionaries}get numRecordBatches(){return this._impl.numRecordBatches}get footer(){return this._impl.isFile()?this._impl.footer:null}isSync(){return this._impl.isSync()}isAsync(){return this._impl.isAsync()}isFile(){return this._impl.isFile()}isStream(){return this._impl.isStream()}next(){return this._impl.next()}throw(e){return this._impl.throw(e)}return(e){return this._impl.return(e)}cancel(){return this._impl.cancel()}reset(e){return this._impl.reset(e),this._DOMStream=void 0,this._nodeStream=void 0,this}open(e){let t=this._impl.open(e);return Mt.isPromise(t)?t.then(()=>this):this}readRecordBatch(e){return this._impl.isFile()?this._impl.readRecordBatch(e):null}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}toDOMStream(){return Pg.default.toDOMStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this})}toNodeStream(){return Pg.default.toNodeStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this},{objectMode:!0})}static throughNode(e){throw new Error('"throughNode" not available in this environment')}static throughDOM(e,t){throw new Error('"throughDOM" not available in this environment')}static from(e){return e instanceof cr?e:Mt.isArrowJSON(e)?BU(e):Mt.isFileHandle(e)?SU(e):Mt.isPromise(e)?(async()=>await cr.from(await e))():Mt.isFetchResponse(e)||Mt.isReadableDOMStream(e)||Mt.isReadableNodeStream(e)||Mt.isAsyncIterable(e)?IU(new Rg.AsyncByteStream(e)):TU(new Rg.ByteStream(e))}static readAll(e){return e instanceof cr?e.isSync()?qg(e):zg(e):Mt.isArrowJSON(e)||ArrayBuffer.isView(e)||Mt.isIterable(e)||Mt.isIteratorResult(e)?qg(e):zg(e)}};Ut.RecordBatchReader=cr;var Bn=class extends cr{constructor(e){super(e);this._impl=e}[Symbol.iterator](){return this._impl[Symbol.iterator]()}async*[Symbol.asyncIterator](){yield*this[Symbol.iterator]()}};Ut.RecordBatchStreamReader=Bn;var Tn=class extends cr{constructor(e){super(e);this._impl=e}[Symbol.iterator](){throw new Error("AsyncRecordBatchStreamReader is not Iterable")}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}};Ut.AsyncRecordBatchStreamReader=Tn;var Uo=class extends Bn{constructor(e){super(e);this._impl=e}};Ut.RecordBatchFileReader=Uo;var ed=class extends Tn{constructor(e){super(e);this._impl=e}};Ut.AsyncRecordBatchFileReader=ed;var td=class{constructor(e=new Map){this.closed=!1,this.autoDestroy=!0,this._dictionaryIndex=0,this._recordBatchIndex=0,this.dictionaries=e}get numDictionaries(){return this._dictionaryIndex}get numRecordBatches(){return this._recordBatchIndex}isSync(){return!1}isAsync(){return!1}isFile(){return!1}isStream(){return!1}reset(e){return this._dictionaryIndex=0,this._recordBatchIndex=0,this.schema=e,this.dictionaries=new Map,this}_loadRecordBatch(e,t){return new Zl.RecordBatch(this.schema,e.length,this._loadVectors(e,t,this.schema.fields))}_loadDictionaryBatch(e,t){let{id:i,isDelta:n,data:a}=e,{dictionaries:c,schema:f}=this,w=c.get(i);if(n||!w){let s=f.dictionaries.get(i);return w&&n?w.concat(Vg.Vector.new(this._loadVectors(a,t,[s])[0])):Vg.Vector.new(this._loadVectors(a,t,[s])[0])}return w}_loadVectors(e,t,i){return new Ng.VectorLoader(t,e.nodes,e.buffers,this.dictionaries).visitMany(i)}},_s=class extends td{constructor(e,t){super(t);this._reader=Mt.isArrowJSON(e)?new Ft.JSONMessageReader(this._handle=e):new Ft.MessageReader(this._handle=e)}isSync(){return!0}isStream(){return!0}[Symbol.iterator](){return this}cancel(){!this.closed&&(this.closed=!0)&&(this.reset()._reader.return(),this._reader=null,this.dictionaries=null)}open(e){return this.closed||(this.autoDestroy=Lg(this,e),this.schema||(this.schema=this._reader.readSchema())||this.cancel()),this}throw(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.throw(e):Bi.ITERATOR_DONE}return(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(e):Bi.ITERATOR_DONE}next(){if(this.closed)return Bi.ITERATOR_DONE;let e,{_reader:t}=this;for(;e=this._readNextMessageAndValidate();)if(e.isSchema())this.reset(e.header());else if(e.isRecordBatch()){this._recordBatchIndex++;let i=e.header(),n=t.readMessageBody(e.bodyLength),a=this._loadRecordBatch(i,n);return{done:!1,value:a}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;let i=e.header(),n=t.readMessageBody(e.bodyLength),a=this._loadDictionaryBatch(i,n);this.dictionaries.set(i.id,a)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new Zl._InternalEmptyPlaceholderRecordBatch(this.schema)}):this.return()}_readNextMessageAndValidate(e){return this._reader.readMessage(e)}},bs=class extends td{constructor(e,t){super(t);this._reader=new Ft.AsyncMessageReader(this._handle=e)}isAsync(){return!0}isStream(){return!0}[Symbol.asyncIterator](){return this}async cancel(){!this.closed&&(this.closed=!0)&&(await this.reset()._reader.return(),this._reader=null,this.dictionaries=null)}async open(e){return this.closed||(this.autoDestroy=Lg(this,e),this.schema||(this.schema=await this._reader.readSchema())||await this.cancel()),this}async throw(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?await this.reset()._reader.throw(e):Bi.ITERATOR_DONE}async return(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?await this.reset()._reader.return(e):Bi.ITERATOR_DONE}async next(){if(this.closed)return Bi.ITERATOR_DONE;let e,{_reader:t}=this;for(;e=await this._readNextMessageAndValidate();)if(e.isSchema())await this.reset(e.header());else if(e.isRecordBatch()){this._recordBatchIndex++;let i=e.header(),n=await t.readMessageBody(e.bodyLength),a=this._loadRecordBatch(i,n);return{done:!1,value:a}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;let i=e.header(),n=await t.readMessageBody(e.bodyLength),a=this._loadDictionaryBatch(i,n);this.dictionaries.set(i.id,a)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new Zl._InternalEmptyPlaceholderRecordBatch(this.schema)}):await this.return()}async _readNextMessageAndValidate(e){return await this._reader.readMessage(e)}},rd=class extends _s{constructor(e,t){super(e instanceof ms.RandomAccessFile?e:new ms.RandomAccessFile(e),t)}get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}isSync(){return!0}isFile(){return!0}open(e){if(!this.closed&&!this._footer){this.schema=(this._footer=this._readFooter()).schema;for(let t of this._footer.dictionaryBatches())t&&this._readDictionaryBatch(this._dictionaryIndex++)}return super.open(e)}readRecordBatch(e){if(this.closed)return null;this._footer||this.open();let t=this._footer&&this._footer.getRecordBatch(e);if(t&&this._handle.seek(t.offset)){let i=this._reader.readMessage(Mo.MessageHeader.RecordBatch);if(i&&i.isRecordBatch()){let n=i.header(),a=this._reader.readMessageBody(i.bodyLength);return this._loadRecordBatch(n,a)}}return null}_readDictionaryBatch(e){let t=this._footer&&this._footer.getDictionaryBatch(e);if(t&&this._handle.seek(t.offset)){let i=this._reader.readMessage(Mo.MessageHeader.DictionaryBatch);if(i&&i.isDictionaryBatch()){let n=i.header(),a=this._reader.readMessageBody(i.bodyLength),c=this._loadDictionaryBatch(n,a);this.dictionaries.set(n.id,c)}}}_readFooter(){let{_handle:e}=this,t=e.size-Ft.magicAndPadding,i=e.readInt32(t),n=e.readAt(t-i,i);return kg.Footer.decode(n)}_readNextMessageAndValidate(e){if(this._footer||this.open(),this._footer&&this._recordBatchIndex<this.numRecordBatches){let t=this._footer&&this._footer.getRecordBatch(this._recordBatchIndex);if(t&&this._handle.seek(t.offset))return this._reader.readMessage(e)}return null}},xg=class extends bs{constructor(e,...t){let i=typeof t[0]!="number"?t.shift():void 0,n=t[0]instanceof Map?t.shift():void 0;super(e instanceof ms.AsyncRandomAccessFile?e:new ms.AsyncRandomAccessFile(e,i),n)}get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}isFile(){return!0}isAsync(){return!0}async open(e){if(!this.closed&&!this._footer){this.schema=(this._footer=await this._readFooter()).schema;for(let t of this._footer.dictionaryBatches())t&&await this._readDictionaryBatch(this._dictionaryIndex++)}return await super.open(e)}async readRecordBatch(e){if(this.closed)return null;this._footer||await this.open();let t=this._footer&&this._footer.getRecordBatch(e);if(t&&await this._handle.seek(t.offset)){let i=await this._reader.readMessage(Mo.MessageHeader.RecordBatch);if(i&&i.isRecordBatch()){let n=i.header(),a=await this._reader.readMessageBody(i.bodyLength);return this._loadRecordBatch(n,a)}}return null}async _readDictionaryBatch(e){let t=this._footer&&this._footer.getDictionaryBatch(e);if(t&&await this._handle.seek(t.offset)){let i=await this._reader.readMessage(Mo.MessageHeader.DictionaryBatch);if(i&&i.isDictionaryBatch()){let n=i.header(),a=await this._reader.readMessageBody(i.bodyLength),c=this._loadDictionaryBatch(n,a);this.dictionaries.set(n.id,c)}}}async _readFooter(){let{_handle:e}=this;e._pending&&await e._pending;let t=e.size-Ft.magicAndPadding,i=await e.readInt32(t),n=await e.readAt(t-i,i);return kg.Footer.decode(n)}async _readNextMessageAndValidate(e){if(this._footer||await this.open(),this._footer&&this._recordBatchIndex<this.numRecordBatches){let t=this._footer.getRecordBatch(this._recordBatchIndex);if(t&&await this._handle.seek(t.offset))return await this._reader.readMessage(e)}return null}},Eg=class extends _s{constructor(e,t){super(e,t)}_loadVectors(e,t,i){return new Ng.JSONVectorLoader(t,e.nodes,e.buffers,this.dictionaries).visitMany(i)}};function Lg(r,e){return e&&typeof e.autoDestroy=="boolean"?e.autoDestroy:r.autoDestroy}function*qg(r){let e=cr.from(r);try{if(!e.open({autoDestroy:!1}).closed)do yield e;while(!e.reset().open().closed)}finally{e.cancel()}}async function*zg(r){let e=await cr.from(r);try{if(!(await e.open({autoDestroy:!1})).closed)do yield e;while(!(await e.reset().open()).closed)}finally{await e.cancel()}}function BU(r){return new Bn(new Eg(r))}function TU(r){let e=r.peek(Ft.magicLength+7&~7);return e&&e.byteLength>=4?Ft.checkForMagicArrowString(e)?new Uo(new rd(r.read())):new Bn(new _s(r)):new Bn(new _s(function*(){}()))}async function IU(r){let e=await r.peek(Ft.magicLength+7&~7);return e&&e.byteLength>=4?Ft.checkForMagicArrowString(e)?new Uo(new rd(await r.read())):new Tn(new bs(r)):new Tn(new bs(async function*(){}()))}async function SU(r){let{size:e}=await r.stat(),t=new ms.AsyncRandomAccessFile(r,e);return e>=Ft.magicX2AndPadding&&Ft.checkForMagicArrowString(await t.readAt(0,Ft.magicLength+7&~7))?new ed(new xg(t)):new Tn(new bs(t))}});var Hg=V(Co=>{"use strict";Object.defineProperty(Co,"__esModule",{value:!0});Co.toDOMStream=void 0;var Wg=Pe(),Yg=nt();function DU(r,e){if(Yg.isAsyncIterable(r))return AU(r,e);if(Yg.isIterable(r))return OU(r,e);throw new Error("toDOMStream() must be called with an Iterable or AsyncIterable")}Co.toDOMStream=DU;function OU(r,e){let t=null,i=e&&e.type==="bytes"||!1,n=e&&e.highWaterMark||2**24;return new ReadableStream({...e,start(c){a(c,t||(t=r[Symbol.iterator]()))},pull(c){t?a(c,t):c.close()},cancel(){(t&&t.return&&t.return()||!0)&&(t=null)}},{highWaterMark:i?n:void 0,...e});function a(c,f){let w,s=null,m=c.desiredSize||null;for(;!(s=f.next(i?m:null)).done;)if(ArrayBuffer.isView(s.value)&&(w=Wg.toUint8Array(s.value))&&(m!=null&&i&&(m=m-w.byteLength+1),s.value=w),c.enqueue(s.value),m!=null&&--m<=0)return;c.close()}}function AU(r,e){let t=null,i=e&&e.type==="bytes"||!1,n=e&&e.highWaterMark||2**24;return new ReadableStream({...e,async start(c){await a(c,t||(t=r[Symbol.asyncIterator]()))},async pull(c){t?await a(c,t):c.close()},async cancel(){(t&&t.return&&await t.return()||!0)&&(t=null)}},{highWaterMark:i?n:void 0,...e});async function a(c,f){let w,s=null,m=c.desiredSize||null;for(;!(s=await f.next(i?m:null)).done;)if(ArrayBuffer.isView(s.value)&&(w=Wg.toUint8Array(s.value))&&(m!=null&&i&&(m=m-w.byteLength+1),s.value=w),c.enqueue(s.value),m!=null&&--m<=0)return;c.close()}}});var Kg=V(In=>{"use strict";Object.defineProperty(In,"__esModule",{value:!0});In.BuilderTransform=In.builderThroughDOMStream=void 0;var FU=Pa();function MU(r){return new id(r)}In.builderThroughDOMStream=MU;var id=class{constructor(e){this._numChunks=0,this._finished=!1,this._bufferedSize=0;let{["readableStrategy"]:t,["writableStrategy"]:i,["queueingStrategy"]:n="count",...a}=e;this._controller=null,this._builder=FU.Builder.new(a),this._getSize=n!=="bytes"?$g:Jg;let{["highWaterMark"]:c=n==="bytes"?2**14:1e3}={...t},{["highWaterMark"]:f=n==="bytes"?2**14:1e3}={...i};this.readable=new ReadableStream({cancel:()=>{this._builder.clear()},pull:w=>{this._maybeFlush(this._builder,this._controller=w)},start:w=>{this._maybeFlush(this._builder,this._controller=w)}},{highWaterMark:c,size:n!=="bytes"?$g:Jg}),this.writable=new WritableStream({abort:()=>{this._builder.clear()},write:()=>{this._maybeFlush(this._builder,this._controller)},close:()=>{this._maybeFlush(this._builder.finish(),this._controller)}},{highWaterMark:f,size:w=>this._writeValueAndReturnChunkSize(w)})}_writeValueAndReturnChunkSize(e){let t=this._bufferedSize;return this._bufferedSize=this._getSize(this._builder.append(e)),this._bufferedSize-t}_maybeFlush(e,t){t!==null&&(this._bufferedSize>=t.desiredSize&&++this._numChunks&&this._enqueue(t,e.toVector()),e.finished&&((e.length>0||this._numChunks===0)&&++this._numChunks&&this._enqueue(t,e.toVector()),!this._finished&&(this._finished=!0)&&this._enqueue(t,null)))}_enqueue(e,t){this._bufferedSize=0,this._controller=null,t===null?e.close():e.enqueue(t)}};In.BuilderTransform=id;var $g=r=>r.length,Jg=r=>r.byteLength});var Gg=V(Vo=>{"use strict";Object.defineProperty(Vo,"__esModule",{value:!0});Vo.recordBatchReaderThroughDOMStream=void 0;var UU=zr(),CU=ys();function VU(r,e){let t=new UU.AsyncByteQueue,i=null,n=new ReadableStream({async cancel(){await t.close()},async start(f){await c(f,i||(i=await a()))},async pull(f){i?await c(f,i):f.close()}});return{writable:new WritableStream(t,{highWaterMark:2**14,...r}),readable:n};async function a(){return await(await CU.RecordBatchReader.from(t)).open(e)}async function c(f,w){let s=f.desiredSize,m=null;for(;!(m=await w.next()).done;)if(f.enqueue(m.value),s!=null&&--s<=0)return;f.close()}}Vo.recordBatchReaderThroughDOMStream=VU});var Qg=V(ko=>{"use strict";Object.defineProperty(ko,"__esModule",{value:!0});ko.recordBatchWriterThroughDOMStream=void 0;var kU=zr();function PU(r,e){let t=new this(r),i=new kU.AsyncByteStream(t),n=new ReadableStream({type:"bytes",async cancel(){await i.cancel()},async pull(c){await a(c)},async start(c){await a(c)}},{highWaterMark:2**14,...e});return{writable:new WritableStream(t,r),readable:n};async function a(c){let f=null,w=c.desiredSize;for(;f=await i.read(w||null);)if(c.enqueue(f),w!=null&&(w-=f.byteLength)<=0)return;c.close()}}ko.recordBatchWriterThroughDOMStream=PU});var cd=V(le=>{"use strict";Object.defineProperty(le,"__esModule",{value:!0});le.custom=le.or=le.and=le.col=le.lit=le.CustomPredicate=le.Not=le.GTeq=le.LTeq=le.Equals=le.Or=le.And=le.CombinationPredicate=le.ComparisonPredicate=le.Predicate=le.Col=le.Literal=le.Value=void 0;var RU=ho(),ri=class{eq(e){return e instanceof ri||(e=new Br(e)),new sd(this,e)}le(e){return e instanceof ri||(e=new Br(e)),new ad(this,e)}ge(e){return e instanceof ri||(e=new Br(e)),new od(this,e)}lt(e){return new An(this.ge(e))}gt(e){return new An(this.le(e))}ne(e){return new An(this.eq(e))}};le.Value=ri;var Br=class extends ri{constructor(e){super();this.v=e}};le.Literal=Br;var nd=class extends ri{constructor(e){super();this.name=e}bind(e){if(!this.colidx){this.colidx=-1;let i=e.schema.fields;for(let n=-1;++n<i.length;)if(i[n].name===this.name){this.colidx=n;break}if(this.colidx<0)throw new Error(`Failed to bind Col "${this.name}"`)}let t=this.vector=e.getChildAt(this.colidx);return i=>t.get(i)}};le.Col=nd;var Sn=class{and(...e){return new Dn(this,...e)}or(...e){return new On(this,...e)}not(){return new An(this)}};le.Predicate=Sn;var gs=class extends Sn{constructor(e,t){super();this.left=e,this.right=t}bind(e){return this.left instanceof Br?this.right instanceof Br?this._bindLitLit(e,this.left,this.right):this._bindLitCol(e,this.left,this.right):this.right instanceof Br?this._bindColLit(e,this.left,this.right):this._bindColCol(e,this.left,this.right)}};le.ComparisonPredicate=gs;var vs=class extends Sn{constructor(...e){super();this.children=e}};le.CombinationPredicate=vs;vs.prototype.children=Object.freeze([]);var Dn=class extends vs{constructor(...e){e=e.reduce((t,i)=>t.concat(i instanceof Dn?i.children:i),[]);super(...e)}bind(e){let t=this.children.map(i=>i.bind(e));return(i,n)=>t.every(a=>a(i,n))}};le.And=Dn;var On=class extends vs{constructor(...e){e=e.reduce((t,i)=>t.concat(i instanceof On?i.children:i),[]);super(...e)}bind(e){let t=this.children.map(i=>i.bind(e));return(i,n)=>t.some(a=>a(i,n))}};le.Or=On;var sd=class extends gs{_bindLitLit(e,t,i){let n=t.v==i.v;return()=>n}_bindColCol(e,t,i){let n=t.bind(e),a=i.bind(e);return(c,f)=>n(c,f)==a(c,f)}_bindColLit(e,t,i){let n=t.bind(e);if(t.vector instanceof RU.DictionaryVector){let a,c=t.vector;return c.dictionary!==this.lastDictionary?(a=c.reverseLookup(i.v),this.lastDictionary=c.dictionary,this.lastKey=a):a=this.lastKey,a===-1?()=>!1:f=>c.getKey(f)===a}else return(a,c)=>n(a,c)==i.v}_bindLitCol(e,t,i){return this._bindColLit(e,i,t)}};le.Equals=sd;var ad=class extends gs{_bindLitLit(e,t,i){let n=t.v<=i.v;return()=>n}_bindColCol(e,t,i){let n=t.bind(e),a=i.bind(e);return(c,f)=>n(c,f)<=a(c,f)}_bindColLit(e,t,i){let n=t.bind(e);return(a,c)=>n(a,c)<=i.v}_bindLitCol(e,t,i){let n=i.bind(e);return(a,c)=>t.v<=n(a,c)}};le.LTeq=ad;var od=class extends gs{_bindLitLit(e,t,i){let n=t.v>=i.v;return()=>n}_bindColCol(e,t,i){let n=t.bind(e),a=i.bind(e);return(c,f)=>n(c,f)>=a(c,f)}_bindColLit(e,t,i){let n=t.bind(e);return(a,c)=>n(a,c)>=i.v}_bindLitCol(e,t,i){let n=i.bind(e);return(a,c)=>t.v>=n(a,c)}};le.GTeq=od;var An=class extends Sn{constructor(e){super();this.child=e}bind(e){let t=this.child.bind(e);return(i,n)=>!t(i,n)}};le.Not=An;var ud=class extends Sn{constructor(e,t){super();this.next=e,this.bind_=t}bind(e){return this.bind_(e),this.next}};le.CustomPredicate=ud;function NU(r){return new Br(r)}le.lit=NU;function xU(r){return new nd(r)}le.col=xU;function EU(...r){return new Dn(...r)}le.and=EU;function LU(...r){return new On(...r)}le.or=LU;function qU(r,e){return new ud(r,e)}le.custom=qU});var tv=V(ii=>{"use strict";Object.defineProperty(ii,"__esModule",{value:!0});ii.FilteredDataFrame=ii.CountByResult=ii.DataFrame=void 0;var Fn=as(),Xg=_o(),ld=$e(),Zg=cd(),zU=vr(),ev=_e();Fn.Table.prototype.countBy=function(r){return new Ti(this.chunks).countBy(r)};Fn.Table.prototype.scan=function(r,e){return new Ti(this.chunks).scan(r,e)};Fn.Table.prototype.scanReverse=function(r,e){return new Ti(this.chunks).scanReverse(r,e)};Fn.Table.prototype.filter=function(r){return new Ti(this.chunks).filter(r)};var Ti=class extends Fn.Table{filter(e){return new js(this.chunks,e)}scan(e,t){let i=this.chunks,n=i.length;for(let a=-1;++a<n;){let c=i[a];t&&t(c);for(let f=-1,w=c.length;++f<w;)e(f,c)}}scanReverse(e,t){let i=this.chunks,n=i.length;for(let a=n;--a>=0;){let c=i[a];t&&t(c);for(let f=c.length;--f>=0;)e(f,c)}}countBy(e){let t=this.chunks,i=t.length,n=typeof e=="string"?new Zg.Col(e):e;n.bind(t[i-1]);let a=n.vector;if(!ev.DataType.isDictionary(a.type))throw new Error("countBy currently only supports dictionary-encoded columns");let c=Math.ceil(Math.log(a.length)/Math.log(256)),f=c==4?Uint32Array:c>=2?Uint16Array:Uint8Array,w=new f(a.dictionary.length);for(let s=-1;++s<i;){let m=t[s];n.bind(m);let M=n.vector.indices;for(let $=-1,oe=m.length;++$<oe;){let lt=M.get($);lt!==null&&w[lt]++}}return new Po(a.dictionary,Xg.IntVector.from(w))}};ii.DataFrame=Ti;var Po=class extends Fn.Table{constructor(e,t){let i=new ld.Schema([new ld.Field("values",e.type),new ld.Field("counts",t.type)]);super(new zU.RecordBatch(i,t.length,[e,t]))}toJSON(){let e=this.getColumnAt(0),t=this.getColumnAt(1),i={};for(let n=-1;++n<this.length;)i[e.get(n)]=t.get(n);return i}};ii.CountByResult=Po;var js=class extends Ti{constructor(e,t){super(e);this._predicate=t}scan(e,t){let i=this._chunks,n=i.length;for(let a=-1;++a<n;){let c=i[a],f=this._predicate.bind(c),w=!1;for(let s=-1,m=c.length;++s<m;)f(s,c)&&(t&&!w&&(t(c),w=!0),e(s,c))}}scanReverse(e,t){let i=this._chunks,n=i.length;for(let a=n;--a>=0;){let c=i[a],f=this._predicate.bind(c),w=!1;for(let s=c.length;--s>=0;)f(s,c)&&(t&&!w&&(t(c),w=!0),e(s,c))}}count(){let e=0,t=this._chunks,i=t.length;for(let n=-1;++n<i;){let a=t[n],c=this._predicate.bind(a);for(let f=-1,w=a.length;++f<w;)c(f,a)&&++e}return e}*[Symbol.iterator](){let e=this._chunks,t=e.length;for(let i=-1;++i<t;){let n=e[i],a=this._predicate.bind(n);for(let c=-1,f=n.length;++c<f;)a(c,n)&&(yield n.get(c))}}filter(e){return new js(this._chunks,this._predicate.and(e))}countBy(e){let t=this._chunks,i=t.length,n=typeof e=="string"?new Zg.Col(e):e;n.bind(t[i-1]);let a=n.vector;if(!ev.DataType.isDictionary(a.type))throw new Error("countBy currently only supports dictionary-encoded columns");let c=Math.ceil(Math.log(a.length)/Math.log(256)),f=c==4?Uint32Array:c>=2?Uint16Array:Uint8Array,w=new f(a.dictionary.length);for(let s=-1;++s<i;){let m=t[s],M=this._predicate.bind(m);n.bind(m);let $=n.vector.indices;for(let oe=-1,lt=m.length;++oe<lt;){let qt=$.get(oe);qt!==null&&M(oe,m)&&w[qt]++}}return new Po(a.dictionary,Xg.IntVector.from(w))}};ii.FilteredDataFrame=js});var iv=V(v=>{"use strict";Object.defineProperty(v,"__esModule",{value:!0});v.util=v.predicate=v.CountByResult=v.FilteredDataFrame=v.DataFrame=v.RecordBatch=v.Message=v.JSONMessageReader=v.AsyncMessageReader=v.MessageReader=v.RecordBatchJSONWriter=v.RecordBatchStreamWriter=v.RecordBatchFileWriter=v.RecordBatchWriter=v.AsyncRecordBatchStreamReader=v.AsyncRecordBatchFileReader=v.RecordBatchStreamReader=v.RecordBatchFileReader=v.RecordBatchReader=v.AsyncByteQueue=v.AsyncByteStream=v.ByteStream=v.Utf8Builder=v.SparseUnionBuilder=v.DenseUnionBuilder=v.UnionBuilder=v.TimeNanosecondBuilder=v.TimeMicrosecondBuilder=v.TimeMillisecondBuilder=v.TimeSecondBuilder=v.TimeBuilder=v.TimestampNanosecondBuilder=v.TimestampMicrosecondBuilder=v.TimestampMillisecondBuilder=v.TimestampSecondBuilder=v.TimestampBuilder=v.StructBuilder=v.NullBuilder=v.MapBuilder=v.ListBuilder=v.Uint64Builder=v.Uint32Builder=v.Uint16Builder=v.Uint8Builder=v.Int64Builder=v.Int32Builder=v.Int16Builder=v.Int8Builder=v.IntBuilder=v.IntervalYearMonthBuilder=v.IntervalDayTimeBuilder=v.IntervalBuilder=v.Float64Builder=v.Float32Builder=v.Float16Builder=v.FloatBuilder=v.FixedSizeListBuilder=v.FixedSizeBinaryBuilder=v.DictionaryBuilder=v.DecimalBuilder=v.DateMillisecondBuilder=v.DateDayBuilder=v.DateBuilder=v.BoolBuilder=v.BinaryBuilder=v.Builder=v.Utf8Vector=v.SparseUnionVector=v.DenseUnionVector=v.UnionVector=v.TimeNanosecondVector=v.TimeMicrosecondVector=v.TimeMillisecondVector=v.TimeSecondVector=v.TimeVector=v.TimestampNanosecondVector=v.TimestampMicrosecondVector=v.TimestampMillisecondVector=v.TimestampSecondVector=v.TimestampVector=v.StructVector=v.NullVector=v.MapVector=v.ListVector=v.Uint64Vector=v.Uint32Vector=v.Uint16Vector=v.Uint8Vector=v.Int64Vector=v.Int32Vector=v.Int16Vector=v.Int8Vector=v.IntVector=v.IntervalYearMonthVector=v.IntervalDayTimeVector=v.IntervalVector=v.Float64Vector=v.Float32Vector=v.Float16Vector=v.FloatVector=v.FixedSizeListVector=v.FixedSizeBinaryVector=v.DictionaryVector=v.DecimalVector=v.DateMillisecondVector=v.DateDayVector=v.DateVector=v.Chunked=v.BoolVector=v.BinaryVector=v.BaseVector=v.Vector=v.Field=v.Schema=v.Visitor=v.Column=v.Table=v.Map_=v.FixedSizeList=v.IntervalYearMonth=v.IntervalDayTime=v.Interval=v.Dictionary=v.SparseUnion=v.DenseUnion=v.Union=v.Struct=v.List=v.Decimal=v.TimeNanosecond=v.TimeMicrosecond=v.TimeMillisecond=v.TimeSecond=v.Time=v.TimestampNanosecond=v.TimestampMicrosecond=v.TimestampMillisecond=v.TimestampSecond=v.Timestamp=v.DateMillisecond=v.DateDay=v.Date_=v.FixedSizeBinary=v.Binary=v.Utf8=v.Float64=v.Float32=v.Float16=v.Float=v.Uint64=v.Uint32=v.Uint16=v.Uint8=v.Int64=v.Int32=v.Int16=v.Int8=v.Int=v.Bool=v.Null=v.DataType=v.Data=v.BufferType=v.UnionMode=v.Type=v.TimeUnit=v.Precision=v.MetadataVersion=v.MessageHeader=v.IntervalUnit=v.DateUnit=v.ArrowType=void 0;var lr=Be();Object.defineProperty(v,"ArrowType",{enumerable:!0,get:function(){return lr.ArrowType}});Object.defineProperty(v,"DateUnit",{enumerable:!0,get:function(){return lr.DateUnit}});Object.defineProperty(v,"IntervalUnit",{enumerable:!0,get:function(){return lr.IntervalUnit}});Object.defineProperty(v,"MessageHeader",{enumerable:!0,get:function(){return lr.MessageHeader}});Object.defineProperty(v,"MetadataVersion",{enumerable:!0,get:function(){return lr.MetadataVersion}});Object.defineProperty(v,"Precision",{enumerable:!0,get:function(){return lr.Precision}});Object.defineProperty(v,"TimeUnit",{enumerable:!0,get:function(){return lr.TimeUnit}});Object.defineProperty(v,"Type",{enumerable:!0,get:function(){return lr.Type}});Object.defineProperty(v,"UnionMode",{enumerable:!0,get:function(){return lr.UnionMode}});Object.defineProperty(v,"BufferType",{enumerable:!0,get:function(){return lr.BufferType}});var WU=kt();Object.defineProperty(v,"Data",{enumerable:!0,get:function(){return WU.Data}});var ie=_e();Object.defineProperty(v,"DataType",{enumerable:!0,get:function(){return ie.DataType}});Object.defineProperty(v,"Null",{enumerable:!0,get:function(){return ie.Null}});Object.defineProperty(v,"Bool",{enumerable:!0,get:function(){return ie.Bool}});Object.defineProperty(v,"Int",{enumerable:!0,get:function(){return ie.Int}});Object.defineProperty(v,"Int8",{enumerable:!0,get:function(){return ie.Int8}});Object.defineProperty(v,"Int16",{enumerable:!0,get:function(){return ie.Int16}});Object.defineProperty(v,"Int32",{enumerable:!0,get:function(){return ie.Int32}});Object.defineProperty(v,"Int64",{enumerable:!0,get:function(){return ie.Int64}});Object.defineProperty(v,"Uint8",{enumerable:!0,get:function(){return ie.Uint8}});Object.defineProperty(v,"Uint16",{enumerable:!0,get:function(){return ie.Uint16}});Object.defineProperty(v,"Uint32",{enumerable:!0,get:function(){return ie.Uint32}});Object.defineProperty(v,"Uint64",{enumerable:!0,get:function(){return ie.Uint64}});Object.defineProperty(v,"Float",{enumerable:!0,get:function(){return ie.Float}});Object.defineProperty(v,"Float16",{enumerable:!0,get:function(){return ie.Float16}});Object.defineProperty(v,"Float32",{enumerable:!0,get:function(){return ie.Float32}});Object.defineProperty(v,"Float64",{enumerable:!0,get:function(){return ie.Float64}});Object.defineProperty(v,"Utf8",{enumerable:!0,get:function(){return ie.Utf8}});Object.defineProperty(v,"Binary",{enumerable:!0,get:function(){return ie.Binary}});Object.defineProperty(v,"FixedSizeBinary",{enumerable:!0,get:function(){return ie.FixedSizeBinary}});Object.defineProperty(v,"Date_",{enumerable:!0,get:function(){return ie.Date_}});Object.defineProperty(v,"DateDay",{enumerable:!0,get:function(){return ie.DateDay}});Object.defineProperty(v,"DateMillisecond",{enumerable:!0,get:function(){return ie.DateMillisecond}});Object.defineProperty(v,"Timestamp",{enumerable:!0,get:function(){return ie.Timestamp}});Object.defineProperty(v,"TimestampSecond",{enumerable:!0,get:function(){return ie.TimestampSecond}});Object.defineProperty(v,"TimestampMillisecond",{enumerable:!0,get:function(){return ie.TimestampMillisecond}});Object.defineProperty(v,"TimestampMicrosecond",{enumerable:!0,get:function(){return ie.TimestampMicrosecond}});Object.defineProperty(v,"TimestampNanosecond",{enumerable:!0,get:function(){return ie.TimestampNanosecond}});Object.defineProperty(v,"Time",{enumerable:!0,get:function(){return ie.Time}});Object.defineProperty(v,"TimeSecond",{enumerable:!0,get:function(){return ie.TimeSecond}});Object.defineProperty(v,"TimeMillisecond",{enumerable:!0,get:function(){return ie.TimeMillisecond}});Object.defineProperty(v,"TimeMicrosecond",{enumerable:!0,get:function(){return ie.TimeMicrosecond}});Object.defineProperty(v,"TimeNanosecond",{enumerable:!0,get:function(){return ie.TimeNanosecond}});Object.defineProperty(v,"Decimal",{enumerable:!0,get:function(){return ie.Decimal}});Object.defineProperty(v,"List",{enumerable:!0,get:function(){return ie.List}});Object.defineProperty(v,"Struct",{enumerable:!0,get:function(){return ie.Struct}});Object.defineProperty(v,"Union",{enumerable:!0,get:function(){return ie.Union}});Object.defineProperty(v,"DenseUnion",{enumerable:!0,get:function(){return ie.DenseUnion}});Object.defineProperty(v,"SparseUnion",{enumerable:!0,get:function(){return ie.SparseUnion}});Object.defineProperty(v,"Dictionary",{enumerable:!0,get:function(){return ie.Dictionary}});Object.defineProperty(v,"Interval",{enumerable:!0,get:function(){return ie.Interval}});Object.defineProperty(v,"IntervalDayTime",{enumerable:!0,get:function(){return ie.IntervalDayTime}});Object.defineProperty(v,"IntervalYearMonth",{enumerable:!0,get:function(){return ie.IntervalYearMonth}});Object.defineProperty(v,"FixedSizeList",{enumerable:!0,get:function(){return ie.FixedSizeList}});Object.defineProperty(v,"Map_",{enumerable:!0,get:function(){return ie.Map_}});var YU=as();Object.defineProperty(v,"Table",{enumerable:!0,get:function(){return YU.Table}});var HU=Gi();Object.defineProperty(v,"Column",{enumerable:!0,get:function(){return HU.Column}});var $U=et();Object.defineProperty(v,"Visitor",{enumerable:!0,get:function(){return $U.Visitor}});var rv=$e();Object.defineProperty(v,"Schema",{enumerable:!0,get:function(){return rv.Schema}});Object.defineProperty(v,"Field",{enumerable:!0,get:function(){return rv.Field}});var Z=sr();Object.defineProperty(v,"Vector",{enumerable:!0,get:function(){return Z.Vector}});Object.defineProperty(v,"BaseVector",{enumerable:!0,get:function(){return Z.BaseVector}});Object.defineProperty(v,"BinaryVector",{enumerable:!0,get:function(){return Z.BinaryVector}});Object.defineProperty(v,"BoolVector",{enumerable:!0,get:function(){return Z.BoolVector}});Object.defineProperty(v,"Chunked",{enumerable:!0,get:function(){return Z.Chunked}});Object.defineProperty(v,"DateVector",{enumerable:!0,get:function(){return Z.DateVector}});Object.defineProperty(v,"DateDayVector",{enumerable:!0,get:function(){return Z.DateDayVector}});Object.defineProperty(v,"DateMillisecondVector",{enumerable:!0,get:function(){return Z.DateMillisecondVector}});Object.defineProperty(v,"DecimalVector",{enumerable:!0,get:function(){return Z.DecimalVector}});Object.defineProperty(v,"DictionaryVector",{enumerable:!0,get:function(){return Z.DictionaryVector}});Object.defineProperty(v,"FixedSizeBinaryVector",{enumerable:!0,get:function(){return Z.FixedSizeBinaryVector}});Object.defineProperty(v,"FixedSizeListVector",{enumerable:!0,get:function(){return Z.FixedSizeListVector}});Object.defineProperty(v,"FloatVector",{enumerable:!0,get:function(){return Z.FloatVector}});Object.defineProperty(v,"Float16Vector",{enumerable:!0,get:function(){return Z.Float16Vector}});Object.defineProperty(v,"Float32Vector",{enumerable:!0,get:function(){return Z.Float32Vector}});Object.defineProperty(v,"Float64Vector",{enumerable:!0,get:function(){return Z.Float64Vector}});Object.defineProperty(v,"IntervalVector",{enumerable:!0,get:function(){return Z.IntervalVector}});Object.defineProperty(v,"IntervalDayTimeVector",{enumerable:!0,get:function(){return Z.IntervalDayTimeVector}});Object.defineProperty(v,"IntervalYearMonthVector",{enumerable:!0,get:function(){return Z.IntervalYearMonthVector}});Object.defineProperty(v,"IntVector",{enumerable:!0,get:function(){return Z.IntVector}});Object.defineProperty(v,"Int8Vector",{enumerable:!0,get:function(){return Z.Int8Vector}});Object.defineProperty(v,"Int16Vector",{enumerable:!0,get:function(){return Z.Int16Vector}});Object.defineProperty(v,"Int32Vector",{enumerable:!0,get:function(){return Z.Int32Vector}});Object.defineProperty(v,"Int64Vector",{enumerable:!0,get:function(){return Z.Int64Vector}});Object.defineProperty(v,"Uint8Vector",{enumerable:!0,get:function(){return Z.Uint8Vector}});Object.defineProperty(v,"Uint16Vector",{enumerable:!0,get:function(){return Z.Uint16Vector}});Object.defineProperty(v,"Uint32Vector",{enumerable:!0,get:function(){return Z.Uint32Vector}});Object.defineProperty(v,"Uint64Vector",{enumerable:!0,get:function(){return Z.Uint64Vector}});Object.defineProperty(v,"ListVector",{enumerable:!0,get:function(){return Z.ListVector}});Object.defineProperty(v,"MapVector",{enumerable:!0,get:function(){return Z.MapVector}});Object.defineProperty(v,"NullVector",{enumerable:!0,get:function(){return Z.NullVector}});Object.defineProperty(v,"StructVector",{enumerable:!0,get:function(){return Z.StructVector}});Object.defineProperty(v,"TimestampVector",{enumerable:!0,get:function(){return Z.TimestampVector}});Object.defineProperty(v,"TimestampSecondVector",{enumerable:!0,get:function(){return Z.TimestampSecondVector}});Object.defineProperty(v,"TimestampMillisecondVector",{enumerable:!0,get:function(){return Z.TimestampMillisecondVector}});Object.defineProperty(v,"TimestampMicrosecondVector",{enumerable:!0,get:function(){return Z.TimestampMicrosecondVector}});Object.defineProperty(v,"TimestampNanosecondVector",{enumerable:!0,get:function(){return Z.TimestampNanosecondVector}});Object.defineProperty(v,"TimeVector",{enumerable:!0,get:function(){return Z.TimeVector}});Object.defineProperty(v,"TimeSecondVector",{enumerable:!0,get:function(){return Z.TimeSecondVector}});Object.defineProperty(v,"TimeMillisecondVector",{enumerable:!0,get:function(){return Z.TimeMillisecondVector}});Object.defineProperty(v,"TimeMicrosecondVector",{enumerable:!0,get:function(){return Z.TimeMicrosecondVector}});Object.defineProperty(v,"TimeNanosecondVector",{enumerable:!0,get:function(){return Z.TimeNanosecondVector}});Object.defineProperty(v,"UnionVector",{enumerable:!0,get:function(){return Z.UnionVector}});Object.defineProperty(v,"DenseUnionVector",{enumerable:!0,get:function(){return Z.DenseUnionVector}});Object.defineProperty(v,"SparseUnionVector",{enumerable:!0,get:function(){return Z.SparseUnionVector}});Object.defineProperty(v,"Utf8Vector",{enumerable:!0,get:function(){return Z.Utf8Vector}});var ne=Pa();Object.defineProperty(v,"Builder",{enumerable:!0,get:function(){return ne.Builder}});Object.defineProperty(v,"BinaryBuilder",{enumerable:!0,get:function(){return ne.BinaryBuilder}});Object.defineProperty(v,"BoolBuilder",{enumerable:!0,get:function(){return ne.BoolBuilder}});Object.defineProperty(v,"DateBuilder",{enumerable:!0,get:function(){return ne.DateBuilder}});Object.defineProperty(v,"DateDayBuilder",{enumerable:!0,get:function(){return ne.DateDayBuilder}});Object.defineProperty(v,"DateMillisecondBuilder",{enumerable:!0,get:function(){return ne.DateMillisecondBuilder}});Object.defineProperty(v,"DecimalBuilder",{enumerable:!0,get:function(){return ne.DecimalBuilder}});Object.defineProperty(v,"DictionaryBuilder",{enumerable:!0,get:function(){return ne.DictionaryBuilder}});Object.defineProperty(v,"FixedSizeBinaryBuilder",{enumerable:!0,get:function(){return ne.FixedSizeBinaryBuilder}});Object.defineProperty(v,"FixedSizeListBuilder",{enumerable:!0,get:function(){return ne.FixedSizeListBuilder}});Object.defineProperty(v,"FloatBuilder",{enumerable:!0,get:function(){return ne.FloatBuilder}});Object.defineProperty(v,"Float16Builder",{enumerable:!0,get:function(){return ne.Float16Builder}});Object.defineProperty(v,"Float32Builder",{enumerable:!0,get:function(){return ne.Float32Builder}});Object.defineProperty(v,"Float64Builder",{enumerable:!0,get:function(){return ne.Float64Builder}});Object.defineProperty(v,"IntervalBuilder",{enumerable:!0,get:function(){return ne.IntervalBuilder}});Object.defineProperty(v,"IntervalDayTimeBuilder",{enumerable:!0,get:function(){return ne.IntervalDayTimeBuilder}});Object.defineProperty(v,"IntervalYearMonthBuilder",{enumerable:!0,get:function(){return ne.IntervalYearMonthBuilder}});Object.defineProperty(v,"IntBuilder",{enumerable:!0,get:function(){return ne.IntBuilder}});Object.defineProperty(v,"Int8Builder",{enumerable:!0,get:function(){return ne.Int8Builder}});Object.defineProperty(v,"Int16Builder",{enumerable:!0,get:function(){return ne.Int16Builder}});Object.defineProperty(v,"Int32Builder",{enumerable:!0,get:function(){return ne.Int32Builder}});Object.defineProperty(v,"Int64Builder",{enumerable:!0,get:function(){return ne.Int64Builder}});Object.defineProperty(v,"Uint8Builder",{enumerable:!0,get:function(){return ne.Uint8Builder}});Object.defineProperty(v,"Uint16Builder",{enumerable:!0,get:function(){return ne.Uint16Builder}});Object.defineProperty(v,"Uint32Builder",{enumerable:!0,get:function(){return ne.Uint32Builder}});Object.defineProperty(v,"Uint64Builder",{enumerable:!0,get:function(){return ne.Uint64Builder}});Object.defineProperty(v,"ListBuilder",{enumerable:!0,get:function(){return ne.ListBuilder}});Object.defineProperty(v,"MapBuilder",{enumerable:!0,get:function(){return ne.MapBuilder}});Object.defineProperty(v,"NullBuilder",{enumerable:!0,get:function(){return ne.NullBuilder}});Object.defineProperty(v,"StructBuilder",{enumerable:!0,get:function(){return ne.StructBuilder}});Object.defineProperty(v,"TimestampBuilder",{enumerable:!0,get:function(){return ne.TimestampBuilder}});Object.defineProperty(v,"TimestampSecondBuilder",{enumerable:!0,get:function(){return ne.TimestampSecondBuilder}});Object.defineProperty(v,"TimestampMillisecondBuilder",{enumerable:!0,get:function(){return ne.TimestampMillisecondBuilder}});Object.defineProperty(v,"TimestampMicrosecondBuilder",{enumerable:!0,get:function(){return ne.TimestampMicrosecondBuilder}});Object.defineProperty(v,"TimestampNanosecondBuilder",{enumerable:!0,get:function(){return ne.TimestampNanosecondBuilder}});Object.defineProperty(v,"TimeBuilder",{enumerable:!0,get:function(){return ne.TimeBuilder}});Object.defineProperty(v,"TimeSecondBuilder",{enumerable:!0,get:function(){return ne.TimeSecondBuilder}});Object.defineProperty(v,"TimeMillisecondBuilder",{enumerable:!0,get:function(){return ne.TimeMillisecondBuilder}});Object.defineProperty(v,"TimeMicrosecondBuilder",{enumerable:!0,get:function(){return ne.TimeMicrosecondBuilder}});Object.defineProperty(v,"TimeNanosecondBuilder",{enumerable:!0,get:function(){return ne.TimeNanosecondBuilder}});Object.defineProperty(v,"UnionBuilder",{enumerable:!0,get:function(){return ne.UnionBuilder}});Object.defineProperty(v,"DenseUnionBuilder",{enumerable:!0,get:function(){return ne.DenseUnionBuilder}});Object.defineProperty(v,"SparseUnionBuilder",{enumerable:!0,get:function(){return ne.SparseUnionBuilder}});Object.defineProperty(v,"Utf8Builder",{enumerable:!0,get:function(){return ne.Utf8Builder}});var dd=zr();Object.defineProperty(v,"ByteStream",{enumerable:!0,get:function(){return dd.ByteStream}});Object.defineProperty(v,"AsyncByteStream",{enumerable:!0,get:function(){return dd.AsyncByteStream}});Object.defineProperty(v,"AsyncByteQueue",{enumerable:!0,get:function(){return dd.AsyncByteQueue}});var ws=ys();Object.defineProperty(v,"RecordBatchReader",{enumerable:!0,get:function(){return ws.RecordBatchReader}});Object.defineProperty(v,"RecordBatchFileReader",{enumerable:!0,get:function(){return ws.RecordBatchFileReader}});Object.defineProperty(v,"RecordBatchStreamReader",{enumerable:!0,get:function(){return ws.RecordBatchStreamReader}});Object.defineProperty(v,"AsyncRecordBatchFileReader",{enumerable:!0,get:function(){return ws.AsyncRecordBatchFileReader}});Object.defineProperty(v,"AsyncRecordBatchStreamReader",{enumerable:!0,get:function(){return ws.AsyncRecordBatchStreamReader}});var Ro=so();Object.defineProperty(v,"RecordBatchWriter",{enumerable:!0,get:function(){return Ro.RecordBatchWriter}});Object.defineProperty(v,"RecordBatchFileWriter",{enumerable:!0,get:function(){return Ro.RecordBatchFileWriter}});Object.defineProperty(v,"RecordBatchStreamWriter",{enumerable:!0,get:function(){return Ro.RecordBatchStreamWriter}});Object.defineProperty(v,"RecordBatchJSONWriter",{enumerable:!0,get:function(){return Ro.RecordBatchJSONWriter}});var fd=Ka();Object.defineProperty(v,"MessageReader",{enumerable:!0,get:function(){return fd.MessageReader}});Object.defineProperty(v,"AsyncMessageReader",{enumerable:!0,get:function(){return fd.AsyncMessageReader}});Object.defineProperty(v,"JSONMessageReader",{enumerable:!0,get:function(){return fd.JSONMessageReader}});var JU=_i();Object.defineProperty(v,"Message",{enumerable:!0,get:function(){return JU.Message}});var KU=vr();Object.defineProperty(v,"RecordBatch",{enumerable:!0,get:function(){return KU.RecordBatch}});var hd=tv();Object.defineProperty(v,"DataFrame",{enumerable:!0,get:function(){return hd.DataFrame}});Object.defineProperty(v,"FilteredDataFrame",{enumerable:!0,get:function(){return hd.FilteredDataFrame}});Object.defineProperty(v,"CountByResult",{enumerable:!0,get:function(){return hd.CountByResult}});var GU=Yn(),QU=Sc(),XU=Ht(),ZU=Ln(),eC=Pe(),tC=Jn(),rC=cd();v.predicate=rC;v.util={...GU,...QU,...XU,...ZU,...eC,...tC}});var No=V(j=>{"use strict";Object.defineProperty(j,"__esModule",{value:!0});j.Utf8Builder=j.SparseUnionBuilder=j.DenseUnionBuilder=j.UnionBuilder=j.TimeNanosecondBuilder=j.TimeMicrosecondBuilder=j.TimeMillisecondBuilder=j.TimeSecondBuilder=j.TimeBuilder=j.TimestampNanosecondBuilder=j.TimestampMicrosecondBuilder=j.TimestampMillisecondBuilder=j.TimestampSecondBuilder=j.TimestampBuilder=j.StructBuilder=j.NullBuilder=j.MapBuilder=j.ListBuilder=j.Uint64Builder=j.Uint32Builder=j.Uint16Builder=j.Uint8Builder=j.Int64Builder=j.Int32Builder=j.Int16Builder=j.Int8Builder=j.IntBuilder=j.IntervalYearMonthBuilder=j.IntervalDayTimeBuilder=j.IntervalBuilder=j.Float64Builder=j.Float32Builder=j.Float16Builder=j.FloatBuilder=j.FixedSizeListBuilder=j.FixedSizeBinaryBuilder=j.DictionaryBuilder=j.DecimalBuilder=j.DateMillisecondBuilder=j.DateDayBuilder=j.DateBuilder=j.BoolBuilder=j.BinaryBuilder=j.Builder=j.util=j.predicate=j.CountByResult=j.FilteredDataFrame=j.DataFrame=j.RecordBatch=j.Message=j.JSONMessageReader=j.AsyncMessageReader=j.MessageReader=j.RecordBatchJSONWriter=j.RecordBatchStreamWriter=j.RecordBatchFileWriter=j.RecordBatchWriter=j.AsyncRecordBatchStreamReader=j.AsyncRecordBatchFileReader=j.RecordBatchStreamReader=j.RecordBatchFileReader=j.RecordBatchReader=j.AsyncByteQueue=j.AsyncByteStream=j.ByteStream=j.Utf8Vector=j.SparseUnionVector=j.DenseUnionVector=j.UnionVector=j.TimeNanosecondVector=j.TimeMicrosecondVector=j.TimeMillisecondVector=j.TimeSecondVector=j.TimeVector=j.TimestampNanosecondVector=j.TimestampMicrosecondVector=j.TimestampMillisecondVector=j.TimestampSecondVector=j.TimestampVector=j.StructVector=j.NullVector=j.MapVector=j.ListVector=j.Uint64Vector=j.Uint32Vector=j.Uint16Vector=j.Uint8Vector=j.Int64Vector=j.Int32Vector=j.Int16Vector=j.Int8Vector=j.IntVector=j.IntervalYearMonthVector=j.IntervalDayTimeVector=j.IntervalVector=j.Float64Vector=j.Float32Vector=j.Float16Vector=j.FloatVector=j.FixedSizeListVector=j.FixedSizeBinaryVector=j.DictionaryVector=j.DecimalVector=j.DateMillisecondVector=j.DateDayVector=j.DateVector=j.Chunked=j.BoolVector=j.BinaryVector=j.BaseVector=j.Vector=j.Visitor=j.Field=j.Schema=j.Column=j.Table=j.Map_=j.FixedSizeList=j.IntervalYearMonth=j.IntervalDayTime=j.Interval=j.Dictionary=j.SparseUnion=j.DenseUnion=j.Union=j.Struct=j.List=j.Decimal=j.TimeNanosecond=j.TimeMicrosecond=j.TimeMillisecond=j.TimeSecond=j.Time=j.TimestampNanosecond=j.TimestampMicrosecond=j.TimestampMillisecond=j.TimestampSecond=j.Timestamp=j.DateMillisecond=j.DateDay=j.Date_=j.FixedSizeBinary=j.Binary=j.Utf8=j.Float64=j.Float32=j.Float16=j.Float=j.Uint64=j.Uint32=j.Uint16=j.Uint8=j.Int64=j.Int32=j.Int16=j.Int8=j.Int=j.Bool=j.Null=j.DataType=j.Data=j.BufferType=j.UnionMode=j.Type=j.TimeUnit=j.Precision=j.MetadataVersion=j.MessageHeader=j.IntervalUnit=j.DateUnit=j.ArrowType=void 0;var iC=kn(),nC=Pa(),sC=ys(),aC=so(),oC=Hg(),uC=Kg(),cC=Gg(),lC=Qg();iC.default.toDOMStream=oC.toDOMStream;nC.Builder.throughDOM=uC.builderThroughDOMStream;sC.RecordBatchReader.throughDOM=cC.recordBatchReaderThroughDOMStream;aC.RecordBatchWriter.throughDOM=lC.recordBatchWriterThroughDOMStream;var A=iv();Object.defineProperty(j,"ArrowType",{enumerable:!0,get:function(){return A.ArrowType}});Object.defineProperty(j,"DateUnit",{enumerable:!0,get:function(){return A.DateUnit}});Object.defineProperty(j,"IntervalUnit",{enumerable:!0,get:function(){return A.IntervalUnit}});Object.defineProperty(j,"MessageHeader",{enumerable:!0,get:function(){return A.MessageHeader}});Object.defineProperty(j,"MetadataVersion",{enumerable:!0,get:function(){return A.MetadataVersion}});Object.defineProperty(j,"Precision",{enumerable:!0,get:function(){return A.Precision}});Object.defineProperty(j,"TimeUnit",{enumerable:!0,get:function(){return A.TimeUnit}});Object.defineProperty(j,"Type",{enumerable:!0,get:function(){return A.Type}});Object.defineProperty(j,"UnionMode",{enumerable:!0,get:function(){return A.UnionMode}});Object.defineProperty(j,"BufferType",{enumerable:!0,get:function(){return A.BufferType}});Object.defineProperty(j,"Data",{enumerable:!0,get:function(){return A.Data}});Object.defineProperty(j,"DataType",{enumerable:!0,get:function(){return A.DataType}});Object.defineProperty(j,"Null",{enumerable:!0,get:function(){return A.Null}});Object.defineProperty(j,"Bool",{enumerable:!0,get:function(){return A.Bool}});Object.defineProperty(j,"Int",{enumerable:!0,get:function(){return A.Int}});Object.defineProperty(j,"Int8",{enumerable:!0,get:function(){return A.Int8}});Object.defineProperty(j,"Int16",{enumerable:!0,get:function(){return A.Int16}});Object.defineProperty(j,"Int32",{enumerable:!0,get:function(){return A.Int32}});Object.defineProperty(j,"Int64",{enumerable:!0,get:function(){return A.Int64}});Object.defineProperty(j,"Uint8",{enumerable:!0,get:function(){return A.Uint8}});Object.defineProperty(j,"Uint16",{enumerable:!0,get:function(){return A.Uint16}});Object.defineProperty(j,"Uint32",{enumerable:!0,get:function(){return A.Uint32}});Object.defineProperty(j,"Uint64",{enumerable:!0,get:function(){return A.Uint64}});Object.defineProperty(j,"Float",{enumerable:!0,get:function(){return A.Float}});Object.defineProperty(j,"Float16",{enumerable:!0,get:function(){return A.Float16}});Object.defineProperty(j,"Float32",{enumerable:!0,get:function(){return A.Float32}});Object.defineProperty(j,"Float64",{enumerable:!0,get:function(){return A.Float64}});Object.defineProperty(j,"Utf8",{enumerable:!0,get:function(){return A.Utf8}});Object.defineProperty(j,"Binary",{enumerable:!0,get:function(){return A.Binary}});Object.defineProperty(j,"FixedSizeBinary",{enumerable:!0,get:function(){return A.FixedSizeBinary}});Object.defineProperty(j,"Date_",{enumerable:!0,get:function(){return A.Date_}});Object.defineProperty(j,"DateDay",{enumerable:!0,get:function(){return A.DateDay}});Object.defineProperty(j,"DateMillisecond",{enumerable:!0,get:function(){return A.DateMillisecond}});Object.defineProperty(j,"Timestamp",{enumerable:!0,get:function(){return A.Timestamp}});Object.defineProperty(j,"TimestampSecond",{enumerable:!0,get:function(){return A.TimestampSecond}});Object.defineProperty(j,"TimestampMillisecond",{enumerable:!0,get:function(){return A.TimestampMillisecond}});Object.defineProperty(j,"TimestampMicrosecond",{enumerable:!0,get:function(){return A.TimestampMicrosecond}});Object.defineProperty(j,"TimestampNanosecond",{enumerable:!0,get:function(){return A.TimestampNanosecond}});Object.defineProperty(j,"Time",{enumerable:!0,get:function(){return A.Time}});Object.defineProperty(j,"TimeSecond",{enumerable:!0,get:function(){return A.TimeSecond}});Object.defineProperty(j,"TimeMillisecond",{enumerable:!0,get:function(){return A.TimeMillisecond}});Object.defineProperty(j,"TimeMicrosecond",{enumerable:!0,get:function(){return A.TimeMicrosecond}});Object.defineProperty(j,"TimeNanosecond",{enumerable:!0,get:function(){return A.TimeNanosecond}});Object.defineProperty(j,"Decimal",{enumerable:!0,get:function(){return A.Decimal}});Object.defineProperty(j,"List",{enumerable:!0,get:function(){return A.List}});Object.defineProperty(j,"Struct",{enumerable:!0,get:function(){return A.Struct}});Object.defineProperty(j,"Union",{enumerable:!0,get:function(){return A.Union}});Object.defineProperty(j,"DenseUnion",{enumerable:!0,get:function(){return A.DenseUnion}});Object.defineProperty(j,"SparseUnion",{enumerable:!0,get:function(){return A.SparseUnion}});Object.defineProperty(j,"Dictionary",{enumerable:!0,get:function(){return A.Dictionary}});Object.defineProperty(j,"Interval",{enumerable:!0,get:function(){return A.Interval}});Object.defineProperty(j,"IntervalDayTime",{enumerable:!0,get:function(){return A.IntervalDayTime}});Object.defineProperty(j,"IntervalYearMonth",{enumerable:!0,get:function(){return A.IntervalYearMonth}});Object.defineProperty(j,"FixedSizeList",{enumerable:!0,get:function(){return A.FixedSizeList}});Object.defineProperty(j,"Map_",{enumerable:!0,get:function(){return A.Map_}});Object.defineProperty(j,"Table",{enumerable:!0,get:function(){return A.Table}});Object.defineProperty(j,"Column",{enumerable:!0,get:function(){return A.Column}});Object.defineProperty(j,"Schema",{enumerable:!0,get:function(){return A.Schema}});Object.defineProperty(j,"Field",{enumerable:!0,get:function(){return A.Field}});Object.defineProperty(j,"Visitor",{enumerable:!0,get:function(){return A.Visitor}});Object.defineProperty(j,"Vector",{enumerable:!0,get:function(){return A.Vector}});Object.defineProperty(j,"BaseVector",{enumerable:!0,get:function(){return A.BaseVector}});Object.defineProperty(j,"BinaryVector",{enumerable:!0,get:function(){return A.BinaryVector}});Object.defineProperty(j,"BoolVector",{enumerable:!0,get:function(){return A.BoolVector}});Object.defineProperty(j,"Chunked",{enumerable:!0,get:function(){return A.Chunked}});Object.defineProperty(j,"DateVector",{enumerable:!0,get:function(){return A.DateVector}});Object.defineProperty(j,"DateDayVector",{enumerable:!0,get:function(){return A.DateDayVector}});Object.defineProperty(j,"DateMillisecondVector",{enumerable:!0,get:function(){return A.DateMillisecondVector}});Object.defineProperty(j,"DecimalVector",{enumerable:!0,get:function(){return A.DecimalVector}});Object.defineProperty(j,"DictionaryVector",{enumerable:!0,get:function(){return A.DictionaryVector}});Object.defineProperty(j,"FixedSizeBinaryVector",{enumerable:!0,get:function(){return A.FixedSizeBinaryVector}});Object.defineProperty(j,"FixedSizeListVector",{enumerable:!0,get:function(){return A.FixedSizeListVector}});Object.defineProperty(j,"FloatVector",{enumerable:!0,get:function(){return A.FloatVector}});Object.defineProperty(j,"Float16Vector",{enumerable:!0,get:function(){return A.Float16Vector}});Object.defineProperty(j,"Float32Vector",{enumerable:!0,get:function(){return A.Float32Vector}});Object.defineProperty(j,"Float64Vector",{enumerable:!0,get:function(){return A.Float64Vector}});Object.defineProperty(j,"IntervalVector",{enumerable:!0,get:function(){return A.IntervalVector}});Object.defineProperty(j,"IntervalDayTimeVector",{enumerable:!0,get:function(){return A.IntervalDayTimeVector}});Object.defineProperty(j,"IntervalYearMonthVector",{enumerable:!0,get:function(){return A.IntervalYearMonthVector}});Object.defineProperty(j,"IntVector",{enumerable:!0,get:function(){return A.IntVector}});Object.defineProperty(j,"Int8Vector",{enumerable:!0,get:function(){return A.Int8Vector}});Object.defineProperty(j,"Int16Vector",{enumerable:!0,get:function(){return A.Int16Vector}});Object.defineProperty(j,"Int32Vector",{enumerable:!0,get:function(){return A.Int32Vector}});Object.defineProperty(j,"Int64Vector",{enumerable:!0,get:function(){return A.Int64Vector}});Object.defineProperty(j,"Uint8Vector",{enumerable:!0,get:function(){return A.Uint8Vector}});Object.defineProperty(j,"Uint16Vector",{enumerable:!0,get:function(){return A.Uint16Vector}});Object.defineProperty(j,"Uint32Vector",{enumerable:!0,get:function(){return A.Uint32Vector}});Object.defineProperty(j,"Uint64Vector",{enumerable:!0,get:function(){return A.Uint64Vector}});Object.defineProperty(j,"ListVector",{enumerable:!0,get:function(){return A.ListVector}});Object.defineProperty(j,"MapVector",{enumerable:!0,get:function(){return A.MapVector}});Object.defineProperty(j,"NullVector",{enumerable:!0,get:function(){return A.NullVector}});Object.defineProperty(j,"StructVector",{enumerable:!0,get:function(){return A.StructVector}});Object.defineProperty(j,"TimestampVector",{enumerable:!0,get:function(){return A.TimestampVector}});Object.defineProperty(j,"TimestampSecondVector",{enumerable:!0,get:function(){return A.TimestampSecondVector}});Object.defineProperty(j,"TimestampMillisecondVector",{enumerable:!0,get:function(){return A.TimestampMillisecondVector}});Object.defineProperty(j,"TimestampMicrosecondVector",{enumerable:!0,get:function(){return A.TimestampMicrosecondVector}});Object.defineProperty(j,"TimestampNanosecondVector",{enumerable:!0,get:function(){return A.TimestampNanosecondVector}});Object.defineProperty(j,"TimeVector",{enumerable:!0,get:function(){return A.TimeVector}});Object.defineProperty(j,"TimeSecondVector",{enumerable:!0,get:function(){return A.TimeSecondVector}});Object.defineProperty(j,"TimeMillisecondVector",{enumerable:!0,get:function(){return A.TimeMillisecondVector}});Object.defineProperty(j,"TimeMicrosecondVector",{enumerable:!0,get:function(){return A.TimeMicrosecondVector}});Object.defineProperty(j,"TimeNanosecondVector",{enumerable:!0,get:function(){return A.TimeNanosecondVector}});Object.defineProperty(j,"UnionVector",{enumerable:!0,get:function(){return A.UnionVector}});Object.defineProperty(j,"DenseUnionVector",{enumerable:!0,get:function(){return A.DenseUnionVector}});Object.defineProperty(j,"SparseUnionVector",{enumerable:!0,get:function(){return A.SparseUnionVector}});Object.defineProperty(j,"Utf8Vector",{enumerable:!0,get:function(){return A.Utf8Vector}});Object.defineProperty(j,"ByteStream",{enumerable:!0,get:function(){return A.ByteStream}});Object.defineProperty(j,"AsyncByteStream",{enumerable:!0,get:function(){return A.AsyncByteStream}});Object.defineProperty(j,"AsyncByteQueue",{enumerable:!0,get:function(){return A.AsyncByteQueue}});Object.defineProperty(j,"RecordBatchReader",{enumerable:!0,get:function(){return A.RecordBatchReader}});Object.defineProperty(j,"RecordBatchFileReader",{enumerable:!0,get:function(){return A.RecordBatchFileReader}});Object.defineProperty(j,"RecordBatchStreamReader",{enumerable:!0,get:function(){return A.RecordBatchStreamReader}});Object.defineProperty(j,"AsyncRecordBatchFileReader",{enumerable:!0,get:function(){return A.AsyncRecordBatchFileReader}});Object.defineProperty(j,"AsyncRecordBatchStreamReader",{enumerable:!0,get:function(){return A.AsyncRecordBatchStreamReader}});Object.defineProperty(j,"RecordBatchWriter",{enumerable:!0,get:function(){return A.RecordBatchWriter}});Object.defineProperty(j,"RecordBatchFileWriter",{enumerable:!0,get:function(){return A.RecordBatchFileWriter}});Object.defineProperty(j,"RecordBatchStreamWriter",{enumerable:!0,get:function(){return A.RecordBatchStreamWriter}});Object.defineProperty(j,"RecordBatchJSONWriter",{enumerable:!0,get:function(){return A.RecordBatchJSONWriter}});Object.defineProperty(j,"MessageReader",{enumerable:!0,get:function(){return A.MessageReader}});Object.defineProperty(j,"AsyncMessageReader",{enumerable:!0,get:function(){return A.AsyncMessageReader}});Object.defineProperty(j,"JSONMessageReader",{enumerable:!0,get:function(){return A.JSONMessageReader}});Object.defineProperty(j,"Message",{enumerable:!0,get:function(){return A.Message}});Object.defineProperty(j,"RecordBatch",{enumerable:!0,get:function(){return A.RecordBatch}});Object.defineProperty(j,"DataFrame",{enumerable:!0,get:function(){return A.DataFrame}});Object.defineProperty(j,"FilteredDataFrame",{enumerable:!0,get:function(){return A.FilteredDataFrame}});Object.defineProperty(j,"CountByResult",{enumerable:!0,get:function(){return A.CountByResult}});Object.defineProperty(j,"predicate",{enumerable:!0,get:function(){return A.predicate}});Object.defineProperty(j,"util",{enumerable:!0,get:function(){return A.util}});Object.defineProperty(j,"Builder",{enumerable:!0,get:function(){return A.Builder}});Object.defineProperty(j,"BinaryBuilder",{enumerable:!0,get:function(){return A.BinaryBuilder}});Object.defineProperty(j,"BoolBuilder",{enumerable:!0,get:function(){return A.BoolBuilder}});Object.defineProperty(j,"DateBuilder",{enumerable:!0,get:function(){return A.DateBuilder}});Object.defineProperty(j,"DateDayBuilder",{enumerable:!0,get:function(){return A.DateDayBuilder}});Object.defineProperty(j,"DateMillisecondBuilder",{enumerable:!0,get:function(){return A.DateMillisecondBuilder}});Object.defineProperty(j,"DecimalBuilder",{enumerable:!0,get:function(){return A.DecimalBuilder}});Object.defineProperty(j,"DictionaryBuilder",{enumerable:!0,get:function(){return A.DictionaryBuilder}});Object.defineProperty(j,"FixedSizeBinaryBuilder",{enumerable:!0,get:function(){return A.FixedSizeBinaryBuilder}});Object.defineProperty(j,"FixedSizeListBuilder",{enumerable:!0,get:function(){return A.FixedSizeListBuilder}});Object.defineProperty(j,"FloatBuilder",{enumerable:!0,get:function(){return A.FloatBuilder}});Object.defineProperty(j,"Float16Builder",{enumerable:!0,get:function(){return A.Float16Builder}});Object.defineProperty(j,"Float32Builder",{enumerable:!0,get:function(){return A.Float32Builder}});Object.defineProperty(j,"Float64Builder",{enumerable:!0,get:function(){return A.Float64Builder}});Object.defineProperty(j,"IntervalBuilder",{enumerable:!0,get:function(){return A.IntervalBuilder}});Object.defineProperty(j,"IntervalDayTimeBuilder",{enumerable:!0,get:function(){return A.IntervalDayTimeBuilder}});Object.defineProperty(j,"IntervalYearMonthBuilder",{enumerable:!0,get:function(){return A.IntervalYearMonthBuilder}});Object.defineProperty(j,"IntBuilder",{enumerable:!0,get:function(){return A.IntBuilder}});Object.defineProperty(j,"Int8Builder",{enumerable:!0,get:function(){return A.Int8Builder}});Object.defineProperty(j,"Int16Builder",{enumerable:!0,get:function(){return A.Int16Builder}});Object.defineProperty(j,"Int32Builder",{enumerable:!0,get:function(){return A.Int32Builder}});Object.defineProperty(j,"Int64Builder",{enumerable:!0,get:function(){return A.Int64Builder}});Object.defineProperty(j,"Uint8Builder",{enumerable:!0,get:function(){return A.Uint8Builder}});Object.defineProperty(j,"Uint16Builder",{enumerable:!0,get:function(){return A.Uint16Builder}});Object.defineProperty(j,"Uint32Builder",{enumerable:!0,get:function(){return A.Uint32Builder}});Object.defineProperty(j,"Uint64Builder",{enumerable:!0,get:function(){return A.Uint64Builder}});Object.defineProperty(j,"ListBuilder",{enumerable:!0,get:function(){return A.ListBuilder}});Object.defineProperty(j,"MapBuilder",{enumerable:!0,get:function(){return A.MapBuilder}});Object.defineProperty(j,"NullBuilder",{enumerable:!0,get:function(){return A.NullBuilder}});Object.defineProperty(j,"StructBuilder",{enumerable:!0,get:function(){return A.StructBuilder}});Object.defineProperty(j,"TimestampBuilder",{enumerable:!0,get:function(){return A.TimestampBuilder}});Object.defineProperty(j,"TimestampSecondBuilder",{enumerable:!0,get:function(){return A.TimestampSecondBuilder}});Object.defineProperty(j,"TimestampMillisecondBuilder",{enumerable:!0,get:function(){return A.TimestampMillisecondBuilder}});Object.defineProperty(j,"TimestampMicrosecondBuilder",{enumerable:!0,get:function(){return A.TimestampMicrosecondBuilder}});Object.defineProperty(j,"TimestampNanosecondBuilder",{enumerable:!0,get:function(){return A.TimestampNanosecondBuilder}});Object.defineProperty(j,"TimeBuilder",{enumerable:!0,get:function(){return A.TimeBuilder}});Object.defineProperty(j,"TimeSecondBuilder",{enumerable:!0,get:function(){return A.TimeSecondBuilder}});Object.defineProperty(j,"TimeMillisecondBuilder",{enumerable:!0,get:function(){return A.TimeMillisecondBuilder}});Object.defineProperty(j,"TimeMicrosecondBuilder",{enumerable:!0,get:function(){return A.TimeMicrosecondBuilder}});Object.defineProperty(j,"TimeNanosecondBuilder",{enumerable:!0,get:function(){return A.TimeNanosecondBuilder}});Object.defineProperty(j,"UnionBuilder",{enumerable:!0,get:function(){return A.UnionBuilder}});Object.defineProperty(j,"DenseUnionBuilder",{enumerable:!0,get:function(){return A.DenseUnionBuilder}});Object.defineProperty(j,"SparseUnionBuilder",{enumerable:!0,get:function(){return A.SparseUnionBuilder}});Object.defineProperty(j,"Utf8Builder",{enumerable:!0,get:function(){return A.Utf8Builder}})});var zo=V(()=>{});var gd=V(()=>{});var ov=V(()=>{});var pC={};y1(pC,{BROWSER_RUNTIME:()=>it,ConsoleLogger:()=>ay,DEFAULT_RUNTIME:()=>av,DuckDB:()=>lv,DuckDBBindingsBase:()=>qo,DuckDBConnection:()=>xo,DuckDBDataProtocol:()=>Qe,DuckDBFeature:()=>md,FileStatistics:()=>Lo,InsertMode:()=>bd,JSONTableShape:()=>_d,LogEvent:()=>fr,LogLevel:()=>Ir,LogOrigin:()=>Sr,LogTopic:()=>ui,PreparedStatement:()=>yd,ResultStreamIterator:()=>Eo,StatusCode:()=>ve,VoidLogger:()=>sy,callSRet:()=>Te,copyBuffer:()=>Ii,decodeText:()=>sv,dropResponseBuffers:()=>qe,failWith:()=>Le,getLogEventLabel:()=>b1,getLogLevelLabel:()=>_1,getLogOriginLabel:()=>v1,getLogTopicLabel:()=>g1,readString:()=>ge});var Ir;(function(a){a[a.NONE=0]="NONE",a[a.DEBUG=1]="DEBUG",a[a.INFO=2]="INFO",a[a.WARNING=3]="WARNING",a[a.ERROR=4]="ERROR"})(Ir||(Ir={}));var ui;(function(a){a[a.NONE=0]="NONE",a[a.CONNECT=1]="CONNECT",a[a.DISCONNECT=2]="DISCONNECT",a[a.OPEN=3]="OPEN",a[a.QUERY=4]="QUERY"})(ui||(ui={}));var fr;(function(c){c[c.NONE=0]="NONE",c[c.OK=1]="OK",c[c.ERROR=2]="ERROR",c[c.START=3]="START",c[c.RUN=4]="RUN",c[c.CAPTURE=5]="CAPTURE"})(fr||(fr={}));var Sr;(function(a){a[a.NONE=0]="NONE",a[a.WEB_WORKER=1]="WEB_WORKER",a[a.NODE_WORKER=2]="NODE_WORKER",a[a.BINDINGS=3]="BINDINGS",a[a.ASYNC_DUCKDB=4]="ASYNC_DUCKDB"})(Sr||(Sr={}));var sy=class{log(e){}},ay=class{log(e){console.log(e)}};function _1(r){switch(r){case 0:return"NONE";case 1:return"DEBUG";case 2:return"INFO";case 3:return"WARNING";case 4:return"ERROR";default:return"?"}}function b1(r){switch(r){case 0:return"NONE";case 1:return"OK";case 2:return"ERROR";case 3:return"START";case 4:return"RUN";case 5:return"CAPTURE";default:return"?"}}function g1(r){switch(r){case 1:return"CONNECT";case 2:return"DISCONNECT";case 3:return"OPEN";case 4:return"QUERY";default:return"?"}}function v1(r){switch(r){case 0:return"NONE";case 1:return"WEB WORKER";case 2:return"NODE WORKER";case 3:return"DUCKDB BINDINGS";case 4:return"DUCKDB";default:return"?"}}var ve;(function(e){e[e.SUCCESS=0]="SUCCESS"})(ve||(ve={}));var Lt=eu(No());var nv=eu(No()),pd=class extends nv.AsyncByteQueue{flush(){let e=super.toUint8Array(!0);return this._values.length=0,e}};var xo=class{constructor(e,t){this._bindings=e,this._conn=t}close(){this._bindings.disconnect(this._conn)}useUnsafe(e){return e(this._bindings,this._conn)}query(e){let t=this._bindings.runQuery(this._conn,e),i=Lt.RecordBatchReader.from(t);return console.assert(i.isSync()),console.assert(i.isFile()),Lt.Table.from(i)}send(e){let t=this._bindings.sendQuery(this._conn,e),i=new Eo(this._bindings,this._conn,t),n=Lt.RecordBatchReader.from(i);return console.assert(n.isSync()),console.assert(n.isStream()),n}prepare(e){let t=this._bindings.createPrepared(this._conn,e);return new yd(this._bindings,this._conn,t)}insertArrowVectors(e,t){this.insertArrowTable(Lt.Table.new(e),t)}insertArrowTable(e,t){e.schema.fields.length==0&&console.warn("The schema is empty! If you used arrow.Table.from, consider constructing schema and batches manually"),this.insertArrowBatches(e.schema,e.chunks,t)}insertArrowBatches(e,t,i){e.fields.length==0&&console.warn("The schema is empty! If you used arrow.Table.from, consider constructing schema and batches manually");let n=new pd,a=new Lt.RecordBatchStreamWriter().reset(n,e),c=!0;for(let f of t)c||this._bindings.insertArrowFromIPCStream(this._conn,n.flush(),i),c=!1,a.write(f);a.finish(),this._bindings.insertArrowFromIPCStream(this._conn,n.flush(),i)}insertArrowFromIPCStream(e,t){this._bindings.insertArrowFromIPCStream(this._conn,e,t)}insertCSVFromPath(e,t){this._bindings.insertCSVFromPath(this._conn,e,t)}insertJSONFromPath(e,t){this._bindings.insertJSONFromPath(this._conn,e,t)}},Eo=class{constructor(e,t,i){this.bindings=e;this.conn=t;this.header=i;this._first=!0,this._depleted=!1}next(){if(this._first)return this._first=!1,{done:!1,value:this.header};if(this._depleted)return{done:!0,value:null};let e=this.bindings.fetchQueryResults(this.conn);return this._depleted=e.length==0,{done:this._depleted,value:e}}[Symbol.iterator](){return this}},yd=class{constructor(e,t,i){this.bindings=e,this.connectionId=t,this.statementId=i}close(){this.bindings.closePrepared(this.connectionId,this.statementId)}query(...e){let t=this.bindings.runPrepared(this.connectionId,this.statementId,e),i=Lt.RecordBatchReader.from(t);return console.assert(i.isSync()),console.assert(i.isFile()),Lt.Table.from(i)}send(...e){let t=this.bindings.sendPrepared(this.connectionId,this.statementId,e),i=new Eo(this.bindings,this.connectionId,t),n=Lt.RecordBatchReader.from(i);return console.assert(n.isSync()),console.assert(n.isStream()),n}};function dC(){let r=new TextDecoder;return e=>(typeof SharedArrayBuffer!="undefined"&&e.buffer instanceof SharedArrayBuffer&&(e=new Uint8Array(e)),r.decode(e))}var sv=dC();function Le(r,e){console.error(e),r.ccall("duckdb_web_fail_with",null,["string"],[e])}function Ii(r,e,t){let i=r.HEAPU8.subarray(e,e+t),n=new Uint8Array(new ArrayBuffer(i.byteLength));return n.set(i),n}function ge(r,e,t){return sv(r.HEAPU8.subarray(e,e+t))}var Qe;(function(i){i[i.BUFFER=0]="BUFFER",i[i.NATIVE=1]="NATIVE",i[i.HTTP=3]="HTTP"})(Qe||(Qe={}));function Te(r,e,t,i){let n=r.stackSave(),a=r.stackAlloc(3*8);t.unshift("number"),i.unshift(a),r.ccall(e,null,t,i);let c=r.HEAPF64[(a>>3)+0],f=r.HEAPF64[(a>>3)+1],w=r.HEAPF64[(a>>3)+2];return r.stackRestore(n),[c,f,w]}function qe(r){r.ccall("duckdb_web_clear_response",null,[],[])}var av={testPlatformFeature:(r,e)=>!1,openFile:(r,e)=>{},syncFile:(r,e)=>{},closeFile:(r,e)=>{},getLastFileModificationTime:(r,e)=>0,getFileSize:(r,e)=>0,truncateFile:(r,e,t)=>{},readFile:(r,e,t,i,n)=>0,writeFile:(r,e,t,i,n)=>0,removeDirectory:(r,e,t)=>{},checkDirectory:(r,e,t)=>!1,createDirectory:(r,e,t)=>{},listDirectoryEntries:(r,e,t)=>!1,glob:(r,e,t)=>{},moveFile:(r,e,t,i,n)=>{},checkFile:(r,e,t)=>!1,removeFile:(r,e,t)=>{}};var Lo=class{constructor(e){let t=new Float64Array(e.buffer,e.byteOffset,e.byteLength/8),i=new Uint8Array(new ArrayBuffer(e.byteLength));i.set(e.subarray(7*8)),this.totalFileReadsCold=t[0],this.totalFileReadsAhead=t[1],this.totalFileReadsCached=t[2],this.totalFileWrites=t[3],this.totalPageAccesses=t[4],this.totalPageLoads=t[5],this.blockSize=t[6],this.blockStats=i}getBlockStats(e,t){return t=t||{file_reads_cold:0,file_reads_ahead:0,file_reads_cached:0,file_writes:0,page_accesses:0,page_loads:0},t.file_writes=this.blockStats[e*3+0]&15,t.file_reads_cold=this.blockStats[e*3+0]>>4,t.file_reads_ahead=this.blockStats[e*3+1]&15,t.file_reads_cached=this.blockStats[e*3+1]>>4,t.page_accesses=this.blockStats[e*3+1]&15,t.page_loads=this.blockStats[e*3+1]>>4,t}};var de=eu(No());function Bs(r,e){switch(e.typeId){case de.Type.Binary:return{name:r,type:"binary"};case de.Type.Bool:return{name:r,type:"bool"};case de.Type.Date:return{name:r,type:"date"};case de.Type.DateDay:return{name:r,type:"date32[d]"};case de.Type.DateMillisecond:return{name:r,type:"date64[ms]"};case de.Type.Decimal:{let t=e;return{name:r,type:"decimal",precision:t.precision,scale:t.scale}}case de.Type.Float:return{name:r,type:"float"};case de.Type.Float16:return{name:r,type:"float16"};case de.Type.Float32:return{name:r,type:"float32"};case de.Type.Float64:return{name:r,type:"float64"};case de.Type.Int:return{name:r,type:"int32"};case de.Type.Int16:return{name:r,type:"int16"};case de.Type.Int32:return{name:r,type:"int32"};case de.Type.Int64:return{name:r,type:"int64"};case de.Type.Uint16:return{name:r,type:"uint16"};case de.Type.Uint32:return{name:r,type:"uint32"};case de.Type.Uint64:return{name:r,type:"uint64"};case de.Type.Uint8:return{name:r,type:"uint8"};case de.Type.IntervalDayTime:return{name:r,type:"interval[dt]"};case de.Type.IntervalYearMonth:return{name:r,type:"interval[m]"};case de.Type.List:{let t=e;return{name:r,type:"list",children:[Bs(t.valueField.name,t.valueField.type)]}}case de.Type.FixedSizeBinary:return{name:r,type:"fixedsizebinary",byteWidth:e.byteWidth};case de.Type.Null:return{name:r,type:"null"};case de.Type.Utf8:return{name:r,type:"utf8"};case de.Type.Struct:return{name:r,type:"struct",children:e.children.map(i=>Bs(i.name,i.type))};case de.Type.Time:return{name:r,type:"time[s]"};case de.Type.TimeMicrosecond:return{name:r,type:"time[us]"};case de.Type.TimeMillisecond:return{name:r,type:"time[ms]"};case de.Type.TimeNanosecond:return{name:r,type:"time[ns]"};case de.Type.TimeSecond:return{name:r,type:"time[s]"};case de.Type.Timestamp:return{name:r,type:"timestamp",timezone:e.timezone||void 0};case de.Type.TimestampSecond:return{name:r,type:"timestamp[s]",timezone:e.timezone||void 0};case de.Type.TimestampMicrosecond:return{name:r,type:"timestamp[us]",timezone:e.timezone||void 0};case de.Type.TimestampNanosecond:return{name:r,type:"timestamp[ns]",timezone:e.timezone||void 0};case de.Type.TimestampMillisecond:return{name:r,type:"timestamp[ms]",timezone:e.timezone||void 0}}throw new Error(`unsupported arrow type: ${e.toString()}`)}var fC=new TextEncoder,md;(function(a){a[a.WASM_EXCEPTIONS=1]="WASM_EXCEPTIONS",a[a.WASM_THREADS=2]="WASM_THREADS",a[a.WASM_SIMD=4]="WASM_SIMD",a[a.WASM_BULK_MEMORY=8]="WASM_BULK_MEMORY",a[a.EMIT_BIGINT=16]="EMIT_BIGINT"})(md||(md={}));var qo=class{constructor(e,t){this._instance=null;this._initPromise=null;this._initPromiseResolver=()=>{};this._logger=e,this._runtime=t}get logger(){return this._logger}get mod(){return this._instance}get pthread(){return this.mod.PThread||null}async instantiate(){return this._instance!=null?this:(this._initPromise!=null&&await this._initPromise,this._initPromise=new Promise(e=>{this._initPromiseResolver=e}),this._instance=await this.instantiateImpl({print:console.log.bind(console),printErr:console.log.bind(console),onRuntimeInitialized:this._initPromiseResolver}),await this._initPromise,this._initPromise=null,this)}open(e){let[t,i,n]=Te(this.mod,"duckdb_web_open",["string"],[JSON.stringify(e)]);if(t!==ve.SUCCESS)throw new Error(ge(this.mod,i,n));qe(this.mod)}reset(){let[e,t,i]=Te(this.mod,"duckdb_web_reset",[],[]);if(e!==ve.SUCCESS)throw new Error(ge(this.mod,t,i));qe(this.mod)}getVersion(){let[e,t,i]=Te(this.mod,"duckdb_web_get_version",[],[]);if(e!==ve.SUCCESS)throw new Error(ge(this.mod,t,i));let n=ge(this.mod,t,i);return qe(this.mod),n}getFeatureFlags(){return this.mod.ccall("duckdb_web_get_feature_flags","number",[],[])}tokenize(e){let[t,i,n]=Te(this.mod,"duckdb_web_tokenize",["string"],[e]);if(t!==ve.SUCCESS)throw new Error(ge(this.mod,i,n));let a=ge(this.mod,i,n);return qe(this.mod),JSON.parse(a)}connect(){let e=this.mod.ccall("duckdb_web_connect","number",[],[]);return new xo(this,e)}disconnect(e){this.mod.ccall("duckdb_web_disconnect",null,["number"],[e])}runQuery(e,t){let[i,n,a]=Te(this.mod,"duckdb_web_query_run",["number","string"],[e,t]);if(i!==ve.SUCCESS)throw new Error(ge(this.mod,n,a));let c=Ii(this.mod,n,a);return qe(this.mod),c}sendQuery(e,t){let[i,n,a]=Te(this.mod,"duckdb_web_query_send",["number","string"],[e,t]);if(i!==ve.SUCCESS)throw new Error(ge(this.mod,n,a));let c=Ii(this.mod,n,a);return qe(this.mod),c}fetchQueryResults(e){let[t,i,n]=Te(this.mod,"duckdb_web_query_fetch_results",["number"],[e]);if(t!==ve.SUCCESS)throw new Error(ge(this.mod,i,n));let a=Ii(this.mod,i,n);return qe(this.mod),a}createPrepared(e,t){let[i,n,a]=Te(this.mod,"duckdb_web_prepared_create",["number","string"],[e,t]);if(i!==ve.SUCCESS)throw new Error(ge(this.mod,n,a));return qe(this.mod),n}closePrepared(e,t){let[i,n,a]=Te(this.mod,"duckdb_web_prepared_close",["number","number"],[e,t]);if(i!==ve.SUCCESS)throw new Error(ge(this.mod,n,a));qe(this.mod)}runPrepared(e,t,i){let[n,a,c]=Te(this.mod,"duckdb_web_prepared_run",["number","number","string"],[e,t,JSON.stringify(i)]);if(n!==ve.SUCCESS)throw new Error(ge(this.mod,a,c));let f=Ii(this.mod,a,c);return qe(this.mod),f}sendPrepared(e,t,i){let[n,a,c]=Te(this.mod,"duckdb_web_prepared_send",["number","number","string"],[e,t,JSON.stringify(i)]);if(n!==ve.SUCCESS)throw new Error(ge(this.mod,a,c));let f=Ii(this.mod,a,c);return qe(this.mod),f}insertArrowFromIPCStream(e,t,i){let n=this.mod._malloc(t.length);this.mod.HEAPU8.subarray(n,n+t.length).set(t);let c=i?JSON.stringify(i):"",[f,w,s]=Te(this.mod,"duckdb_web_insert_arrow_from_ipc_stream",["number","number","number","string"],[e,n,t.length,c]);if(f!==ve.SUCCESS)throw new Error(ge(this.mod,w,s))}insertCSVFromPath(e,t,i){if(i.columns!==void 0){i.columnsFlat=[];for(let s in i.columns)i.columnsFlat.push(Bs(s,i.columns[s]))}let n={...i};n.columns=n.columnsFlat,delete n.columnsFlat;let a=JSON.stringify(n),[c,f,w]=Te(this.mod,"duckdb_web_insert_csv_from_path",["number","string","string"],[e,t,a]);if(c!==ve.SUCCESS)throw new Error(ge(this.mod,f,w))}insertJSONFromPath(e,t,i){if(i.columns!==void 0){i.columnsFlat=[];for(let s in i.columns)i.columnsFlat.push(Bs(s,i.columns[s]))}let n={...i};n.columns=n.columnsFlat,delete n.columnsFlat;let a=JSON.stringify(n),[c,f,w]=Te(this.mod,"duckdb_web_insert_json_from_path",["number","string","string"],[e,t,a]);if(c!==ve.SUCCESS)throw new Error(ge(this.mod,f,w))}registerFileURL(e,t){t===void 0&&(t=e);let[i,n,a]=Te(this.mod,"duckdb_web_fs_register_file_url",["string","string"],[e,t]);if(i!==ve.SUCCESS)throw new Error(ge(this.mod,n,a));qe(this.mod)}registerFileText(e,t){let i=fC.encode(t);this.registerFileBuffer(e,i)}registerFileBuffer(e,t){let i=this.mod._malloc(t.length);this.mod.HEAPU8.subarray(i,i+t.length).set(t);let[a,c,f]=Te(this.mod,"duckdb_web_fs_register_file_buffer",["string","number","number"],[e,i,t.length]);if(a!==ve.SUCCESS)throw new Error(ge(this.mod,c,f));qe(this.mod)}registerFileHandle(e,t){let[i,n,a]=Te(this.mod,"duckdb_web_fs_register_file_url",["string","string"],[e,e]);if(i!==ve.SUCCESS)throw new Error(ge(this.mod,n,a));if(qe(this.mod),globalThis.DUCKDB_RUNTIME._files=(globalThis.DUCKDB_RUNTIME._files||new Map).set(e,t),this.pthread){for(let c of this.pthread.runningWorkers)c.postMessage({cmd:"registerFileHandle",fileName:e,fileHandle:t});for(let c of this.pthread.unusedWorkers)c.postMessage({cmd:"dropFileHandle",fileName:e})}}dropFile(e){return this.mod.ccall("duckdb_web_fs_drop_file","boolean",["string"],[e])}dropFiles(){this.mod.ccall("duckdb_web_fs_drop_files",null,[],[])}flushFiles(){this.mod.ccall("duckdb_web_flush_files",null,[],[])}copyFileToPath(e,t){let[i,n,a]=Te(this.mod,"duckdb_web_copy_file_to_path",["string","string"],[e,t]);if(i!==ve.SUCCESS)throw new Error(ge(this.mod,n,a));qe(this.mod)}copyFileToBuffer(e){let[t,i,n]=Te(this.mod,"duckdb_web_copy_file_to_buffer",["string"],[e]);if(t!==ve.SUCCESS)throw new Error(ge(this.mod,i,n));let a=this.mod.HEAPU8.subarray(i,i+n),c=new Uint8Array(a.length);return c.set(a),qe(this.mod),c}collectFileStatistics(e,t){let[i,n,a]=Te(this.mod,"duckdb_web_collect_file_stats",["string","boolean"],[e,t]);if(i!==ve.SUCCESS)throw new Error(ge(this.mod,n,a))}exportFileStatistics(e){let[t,i,n]=Te(this.mod,"duckdb_web_export_file_stats",["string"],[e]);if(t!==ve.SUCCESS)throw new Error(ge(this.mod,i,n));return new Lo(this.mod.HEAPU8.subarray(i,i+n))}};var _d;(function(t){t.ROW_ARRAY="row-array",t.COLUMN_OBJECT="column-object"})(_d||(_d={}));var bd;(function(t){t[t.APPEND=0]="APPEND",t[t.IMPORT=1]="IMPORT"})(bd||(bd={}));var cv={},hC=function(){var r=cv.url;return function(e){e=e||{};var t=typeof e!="undefined"?e:{},i,n;t.ready=new Promise(function(o,u){i=o,n=u});var a={},c;for(c in t)t.hasOwnProperty(c)&&(a[c]=t[c]);var f=[],w="./this.program",s=function(o,u){throw u},m=typeof window=="object",M=typeof importScripts=="function",$=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",oe="";function lt(o){return t.locateFile?t.locateFile(o,oe):oe+o}var qt,Ct,Si,dv;function fv(o){if(!(o instanceof Ps)){var u=o;ni("exiting due to exception: "+u)}}var Di,Oi;$?(M?oe=zo().dirname(oe)+"/":oe=__dirname+"/",qt=function(u,l){return Di||(Di=gd()),Oi||(Oi=zo()),u=Oi.normalize(u),Di.readFileSync(u,l?null:"utf8")},Si=function(u){var l=qt(u,!0);return l.buffer||(l=new Uint8Array(l)),wd(l.buffer),l},Ct=function(u,l,d){Di||(Di=gd()),Oi||(Oi=zo()),u=Oi.normalize(u),Di.readFile(u,function(h,p){h?d(h):l(p.buffer)})},process.argv.length>1&&(w=process.argv[1].replace(/\\/g,"/")),f=process.argv.slice(2),process.on("uncaughtException",function(o){if(!(o instanceof Ps))throw o}),process.on("unhandledRejection",function(o){throw o}),s=function(o,u){if(Yo())throw process.exitCode=o,u;fv(u),process.exit(o)},t.inspect=function(){return"[Emscripten Module object]"}):(m||M)&&(M?oe=self.location.href:typeof document!="undefined"&&document.currentScript&&(oe=document.currentScript.src),r&&(oe=r),oe.indexOf("blob:")!==0?oe=oe.substr(0,oe.replace(/[?#].*/,"").lastIndexOf("/")+1):oe="",qt=function(o){var u=new XMLHttpRequest;return u.open("GET",o,!1),u.send(null),u.responseText},M&&(Si=function(o){var u=new XMLHttpRequest;return u.open("GET",o,!1),u.responseType="arraybuffer",u.send(null),new Uint8Array(u.response)}),Ct=function(o,u,l){var d=new XMLHttpRequest;d.open("GET",o,!0),d.responseType="arraybuffer",d.onload=function(){if(d.status==200||d.status==0&&d.response){u(d.response);return}l()},d.onerror=l,d.send(null)},dv=function(o){document.title=o});var hv=t.print||console.log.bind(console),ni=t.printErr||console.warn.bind(console);for(c in a)a.hasOwnProperty(c)&&(t[c]=a[c]);a=null,t.arguments&&(f=t.arguments),t.thisProgram&&(w=t.thisProgram),t.quit&&(s=t.quit);var jd=0,Xe=function(o){jd=o},pv=function(){return jd},Mn;t.wasmBinary&&(Mn=t.wasmBinary);var yv=t.noExitRuntime||!0;typeof WebAssembly!="object"&&Wt("no native wasm support detected");var Ts,Wo=!1,Is;function wd(o,u){o||Wt("Assertion failed: "+u)}function mv(o){var u=t["_"+o];return wd(u,"Cannot call unknown function "+o+", make sure it is exported"),u}function _v(o,u,l,d,h){var p={string:function(x){var re=0;if(x!=null&&x!==0){var pe=(x.length<<2)+1;re=Go(pe),bv(x,re,pe)}return re},array:function(x){var re=Go(x.length);return Sd(x,re),re}};function y(x){return u==="string"?Ss(x):u==="boolean"?Boolean(x):x}var _=mv(o),b=[],g=0;if(d)for(var B=0;B<d.length;B++){var T=p[l[B]];T?(g===0&&(g=I()),b[B]=T(d[B])):b[B]=d[B]}var O=_.apply(null,b);function C(x){return g!==0&&S(g),y(x)}return O=C(O),O}var Bd=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):void 0;function Td(o,u,l){for(var d=u+l,h=u;o[h]&&!(h>=d);)++h;if(h-u>16&&o.subarray&&Bd)return Bd.decode(o.subarray(u,h));for(var p="";u<h;){var y=o[u++];if(!(y&128)){p+=String.fromCharCode(y);continue}var _=o[u++]&63;if((y&224)==192){p+=String.fromCharCode((y&31)<<6|_);continue}var b=o[u++]&63;if((y&240)==224?y=(y&15)<<12|_<<6|b:y=(y&7)<<18|_<<12|b<<6|o[u++]&63,y<65536)p+=String.fromCharCode(y);else{var g=y-65536;p+=String.fromCharCode(55296|g>>10,56320|g&1023)}}return p}function Ss(o,u){return o?Td(Ai,o,u):""}function Id(o,u,l,d){if(!(d>0))return 0;for(var h=l,p=l+d-1,y=0;y<o.length;++y){var _=o.charCodeAt(y);if(_>=55296&&_<=57343){var b=o.charCodeAt(++y);_=65536+((_&1023)<<10)|b&1023}if(_<=127){if(l>=p)break;u[l++]=_}else if(_<=2047){if(l+1>=p)break;u[l++]=192|_>>6,u[l++]=128|_&63}else if(_<=65535){if(l+2>=p)break;u[l++]=224|_>>12,u[l++]=128|_>>6&63,u[l++]=128|_&63}else{if(l+3>=p)break;u[l++]=240|_>>18,u[l++]=128|_>>12&63,u[l++]=128|_>>6&63,u[l++]=128|_&63}}return u[l]=0,l-h}function bv(o,u,l){return Id(o,Ai,u,l)}function gv(o){for(var u=0,l=0;l<o.length;++l){var d=o.charCodeAt(l);d>=55296&&d<=57343&&(d=65536+((d&1023)<<10)|o.charCodeAt(++l)&1023),d<=127?++u:d<=2047?u+=2:d<=65535?u+=3:u+=4}return u}function Sd(o,u){zt.set(o,u)}function vv(o,u,l){for(var d=0;d<o.length;++d)zt[u++>>0]=o.charCodeAt(d);l||(zt[u>>0]=0)}function jv(o,u){return o%u>0&&(o+=u-o%u),o}var Dd,zt,Ai,wv,Bv,ce,Tv,Iv,Sv;function Od(o){Dd=o,t.HEAP8=zt=new Int8Array(o),t.HEAP16=wv=new Int16Array(o),t.HEAP32=ce=new Int32Array(o),t.HEAPU8=Ai=new Uint8Array(o),t.HEAPU16=Bv=new Uint16Array(o),t.HEAPU32=Tv=new Uint32Array(o),t.HEAPF32=Iv=new Float32Array(o),t.HEAPF64=Sv=new Float64Array(o)}var yC=t.INITIAL_MEMORY||16777216,Y,Ad=[],Fd=[],Dv=[],Md=[],Ov=!1,Av=!1,Fv=0;function Yo(){return yv||Fv>0}function Mv(){if(t.preRun)for(typeof t.preRun=="function"&&(t.preRun=[t.preRun]);t.preRun.length;)Pv(t.preRun.shift());Ds(Ad)}function Uv(){Ov=!0,Ds(Fd)}function Cv(){Ds(Dv)}function Vv(){Av=!0}function kv(){if(t.postRun)for(typeof t.postRun=="function"&&(t.postRun=[t.postRun]);t.postRun.length;)Nv(t.postRun.shift());Ds(Md)}function Pv(o){Ad.unshift(o)}function Rv(o){Fd.unshift(o)}function Nv(o){Md.unshift(o)}var si=0,Ho=null,Un=null;function xv(o){si++,t.monitorRunDependencies&&t.monitorRunDependencies(si)}function Ev(o){if(si--,t.monitorRunDependencies&&t.monitorRunDependencies(si),si==0&&(Ho!==null&&(clearInterval(Ho),Ho=null),Un)){var u=Un;Un=null,u()}}t.preloadedImages={},t.preloadedAudios={};function Wt(o){t.onAbort&&t.onAbort(o),o="Aborted("+o+")",ni(o),Wo=!0,Is=1,o+=". Build with -s ASSERTIONS=1 for more info.";var u=new WebAssembly.RuntimeError(o);throw n(u),u}var Lv="data:application/octet-stream;base64,";function Ud(o){return o.startsWith(Lv)}var bt;t.locateFile?(bt="duckdb_wasm.wasm",Ud(bt)||(bt=lt(bt))):bt=new URL("duckdb_wasm.wasm",cv.url).toString();function Cd(o){try{if(o==bt&&Mn)return new Uint8Array(Mn);if(Si)return Si(o);throw"both async and sync fetching of the wasm failed"}catch(u){Wt(u)}}function qv(){return!Mn&&(m||M)&&typeof fetch=="function"?fetch(bt,{credentials:"same-origin"}).then(function(o){if(!o.ok)throw"failed to load wasm binary file at '"+bt+"'";return o.arrayBuffer()}).catch(function(){return Cd(bt)}):Promise.resolve().then(function(){return Cd(bt)})}function zv(){var o={a:ow};function u(y,_){var b=y.exports;t.asm=b,Ts=t.asm.Be,Od(Ts.buffer),Y=t.asm.Ee,Rv(t.asm.Ce),Ev("wasm-instantiate")}xv("wasm-instantiate");function l(y){u(y.instance)}function d(y){return qv().then(function(_){return WebAssembly.instantiate(_,o)}).then(function(_){return _}).then(y,function(_){ni("failed to asynchronously prepare wasm: "+_),Wt(_)})}function h(){return!Mn&&typeof WebAssembly.instantiateStreaming=="function"&&!Ud(bt)&&typeof fetch=="function"?fetch(bt,{credentials:"same-origin"}).then(function(y){var _=WebAssembly.instantiateStreaming(y,o);return _.then(l,function(b){return ni("wasm streaming compile failed: "+b),ni("falling back to ArrayBuffer instantiation"),d(l)})}):d(l)}if(t.instantiateWasm)try{var p=t.instantiateWasm(o,u);return p}catch(y){return ni("Module.instantiateWasm callback failed with error: "+y),!1}return h().catch(n),{}}function Ds(o){for(;o.length>0;){var u=o.shift();if(typeof u=="function"){u(t);continue}var l=u.func;typeof l=="number"?u.arg===void 0?Y.get(l)():Y.get(l)(u.arg):l(u.arg===void 0?null:u.arg)}}function Wv(o){if(o instanceof Ps||o=="unwind")return Is;s(1,o)}function Yv(o){return Qo(o+16)+16}function ai(o){this.excPtr=o,this.ptr=o-16,this.set_type=function(u){ce[this.ptr+4>>2]=u},this.get_type=function(){return ce[this.ptr+4>>2]},this.set_destructor=function(u){ce[this.ptr+8>>2]=u},this.get_destructor=function(){return ce[this.ptr+8>>2]},this.set_refcount=function(u){ce[this.ptr>>2]=u},this.set_caught=function(u){u=u?1:0,zt[this.ptr+12>>0]=u},this.get_caught=function(){return zt[this.ptr+12>>0]!=0},this.set_rethrown=function(u){u=u?1:0,zt[this.ptr+13>>0]=u},this.get_rethrown=function(){return zt[this.ptr+13>>0]!=0},this.init=function(u,l){this.set_type(u),this.set_destructor(l),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var u=ce[this.ptr>>2];ce[this.ptr>>2]=u+1},this.release_ref=function(){var u=ce[this.ptr>>2];return ce[this.ptr>>2]=u-1,u===1}}function Fi(o){this.free=function(){Xo(this.ptr),this.ptr=0},this.set_base_ptr=function(u){ce[this.ptr>>2]=u},this.get_base_ptr=function(){return ce[this.ptr>>2]},this.set_adjusted_ptr=function(u){ce[this.ptr+4>>2]=u},this.get_adjusted_ptr_addr=function(){return this.ptr+4},this.get_adjusted_ptr=function(){return ce[this.ptr+4>>2]},this.get_exception_ptr=function(){var u=Pd(this.get_exception_info().get_type());if(u)return ce[this.get_base_ptr()>>2];var l=this.get_adjusted_ptr();return l!==0?l:this.get_base_ptr()},this.get_exception_info=function(){return new ai(this.get_base_ptr())},o===void 0?(this.ptr=Qo(8),this.set_adjusted_ptr(0)):this.ptr=o}var Os=[];function Hv(o){o.add_ref()}var As=0;function $v(o){var u=new Fi(o),l=u.get_exception_info();return l.get_caught()||(l.set_caught(!0),As--),l.set_rethrown(!1),Os.push(u),Hv(l),u.get_exception_ptr()}var dr=0;function Vd(o){return Xo(new ai(o).ptr)}function Jv(o){if(o.release_ref()&&!o.get_rethrown()){var u=o.get_destructor();u&&Y.get(u)(o.excPtr),Vd(o.excPtr)}}function Kv(){D(0);var o=Os.pop();Jv(o.get_exception_info()),o.free(),dr=0}function Gv(o){var u=new Fi(o),l=u.get_base_ptr();throw dr||(dr=l),u.free(),l}function Qv(){var o=dr;if(!o)return Xe(0),0|0;var u=new ai(o),l=u.get_type(),d=new Fi;if(d.set_base_ptr(o),d.set_adjusted_ptr(o),!l)return Xe(0),d.ptr|0;for(var h=Array.prototype.slice.call(arguments),p=0;p<h.length;p++){var y=h[p];if(y===0||y===l)break;if(Vn(y,l,d.get_adjusted_ptr_addr()))return Xe(y),d.ptr|0}return Xe(l),d.ptr|0}function Xv(){var o=dr;if(!o)return Xe(0),0|0;var u=new ai(o),l=u.get_type(),d=new Fi;if(d.set_base_ptr(o),d.set_adjusted_ptr(o),!l)return Xe(0),d.ptr|0;for(var h=Array.prototype.slice.call(arguments),p=0;p<h.length;p++){var y=h[p];if(y===0||y===l)break;if(Vn(y,l,d.get_adjusted_ptr_addr()))return Xe(y),d.ptr|0}return Xe(l),d.ptr|0}function Zv(){var o=dr;if(!o)return Xe(0),0|0;var u=new ai(o),l=u.get_type(),d=new Fi;if(d.set_base_ptr(o),d.set_adjusted_ptr(o),!l)return Xe(0),d.ptr|0;for(var h=Array.prototype.slice.call(arguments),p=0;p<h.length;p++){var y=h[p];if(y===0||y===l)break;if(Vn(y,l,d.get_adjusted_ptr_addr()))return Xe(y),d.ptr|0}return Xe(l),d.ptr|0}function ej(){var o=dr;if(!o)return Xe(0),0|0;var u=new ai(o),l=u.get_type(),d=new Fi;if(d.set_base_ptr(o),d.set_adjusted_ptr(o),!l)return Xe(0),d.ptr|0;for(var h=Array.prototype.slice.call(arguments),p=0;p<h.length;p++){var y=h[p];if(y===0||y===l)break;if(Vn(y,l,d.get_adjusted_ptr_addr()))return Xe(y),d.ptr|0}return Xe(l),d.ptr|0}function tj(){var o=Os.pop();o||Wt("no exception to throw");var u=o.get_exception_info(),l=o.get_base_ptr();throw u.get_rethrown()?o.free():(Os.push(o),u.set_rethrown(!0),u.set_caught(!1),As++),dr=l,l}function rj(o,u,l){var d=new ai(o);throw d.init(u,l),dr=o,As++,o}function ij(){return As}var He={mappings:{},buffers:[null,[],[]],printChar:function(o,u){var l=He.buffers[o];u===0||u===10?((o===1?hv:ni)(Td(l,0)),l.length=0):l.push(u)},varargs:void 0,get:function(){He.varargs+=4;var o=ce[He.varargs-4>>2];return o},getStr:function(o){var u=Ss(o);return u},get64:function(o,u){return o}};function nj(o,u){return o=He.getStr(o),He.doAccess(o,u)}function sj(o){return ce[kd()>>2]=o,o}function aj(o,u,l){return He.varargs=l,0}function oj(o,u){}function uj(o,u,l,d){}function cj(o,u,l){}function lj(){return 42}function dj(o,u,l){return He.varargs=l,0}function fj(o,u,l){return 0}function hj(o,u){return o=He.getStr(o),He.doMkdir(o,u)}function pj(o,u,l){He.varargs=l}function yj(o,u){}function mj(o){}function _j(o,u){}function bj(o){}function gj(o,u){Wt("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")}function vj(o,u){Wt("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")}function jj(){Wt("")}var $o;$?$o=function(){var o=process.hrtime();return o[0]*1e3+o[1]/1e6}:$o=function(){return performance.now()};var wj=!0;function Bj(o,u){var l;if(o===0)l=Date.now();else if((o===1||o===4)&&wj)l=$o();else return sj(28),-1;return ce[u>>2]=l/1e3|0,ce[u+4>>2]=l%1e3*1e3*1e3|0,0}function Tj(o,u){return globalThis.DUCKDB_RUNTIME.createDirectory(t,o,u)}function Ij(o,u){return globalThis.DUCKDB_RUNTIME.checkDirectory(t,o,u)}function Sj(o,u){return globalThis.DUCKDB_RUNTIME.listDirectoryEntries(t,o,u)}function Dj(o,u){return globalThis.DUCKDB_RUNTIME.removeDirectory(t,o,u)}function Oj(o){return globalThis.DUCKDB_RUNTIME.closeFile(t,o)}function Aj(o,u){return globalThis.DUCKDB_RUNTIME.checkFile(t,o,u)}function Fj(o){return globalThis.DUCKDB_RUNTIME.getLastFileModificationTime(t,o)}function Mj(o){return globalThis.DUCKDB_RUNTIME.getFileSize(t,o)}function Uj(o,u,l,d){return globalThis.DUCKDB_RUNTIME.moveFile(t,o,u,l,d)}function Cj(o){return globalThis.DUCKDB_RUNTIME.openFile(t,o)}function Vj(o,u,l,d){return globalThis.DUCKDB_RUNTIME.readFile(t,o,u,l,d)}function kj(o,u){return globalThis.DUCKDB_RUNTIME.truncateFile(t,o,u)}function Pj(o,u,l,d){return globalThis.DUCKDB_RUNTIME.writeFile(t,o,u,l,d)}function Rj(o,u){return globalThis.DUCKDB_RUNTIME.glob(t,o,u)}function Nj(o){return globalThis.DUCKDB_RUNTIME.testPlatformFeature(t,o)}function xj(){return 2147483648}function Ej(o,u,l){Ai.copyWithin(o,u,u+l)}function Lj(o){try{return Ts.grow(o-Dd.byteLength+65535>>>16),Od(Ts.buffer),1}catch{}}function qj(o){var u=Ai.length;o=o>>>0;var l=2147483648;if(o>l)return!1;for(var d=1;d<=4;d*=2){var h=u*(1+.2/d);h=Math.min(h,o+100663296);var p=Math.min(l,jv(Math.max(o,h),65536)),y=Lj(p);if(y)return!0}return!1}var Jo={};function zj(){return w||"./this.program"}function Cn(){if(!Cn.strings){var o=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",u={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:o,_:zj()};for(var l in Jo)Jo[l]===void 0?delete u[l]:u[l]=Jo[l];var d=[];for(var l in u)d.push(l+"="+u[l]);Cn.strings=d}return Cn.strings}function Wj(o,u){var l=0;return Cn().forEach(function(d,h){var p=u+l;ce[o+h*4>>2]=p,vv(d,p),l+=d.length+1}),0}function Yj(o,u){var l=Cn();ce[o>>2]=l.length;var d=0;return l.forEach(function(h){d+=h.length+1}),ce[u>>2]=d,0}function Hj(o){return 0}function $j(o,u){var l=o==1||o==2?2:Wt();return zt[u>>0]=l,0}function Jj(o,u,l,d,h,p){var y=He.getStreamFromFD(o),_=He.doReadv(y,u,l,d);return ce[p>>2]=_,0}function Kj(o,u,l,d,h,p){var y=He.getStreamFromFD(o),_=He.doWritev(y,u,l,d);return ce[p>>2]=_,0}function Gj(o,u,l,d){var h=He.getStreamFromFD(o),p=He.doReadv(h,u,l);return ce[d>>2]=p,0}function Qj(o,u,l,d,h){}function Xj(o){var u=He.getStreamFromFD(o);return u.stream_ops&&u.stream_ops.fsync?-u.stream_ops.fsync(u):0}function Zj(o,u,l,d){for(var h=0,p=0;p<l;p++){for(var y=ce[u+p*8>>2],_=ce[u+(p*8+4)>>2],b=0;b<_;b++)He.printChar(o,Ai[y+b]);h+=_}return ce[d>>2]=h,0}function ew(){return pv()}function tw(){if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function"){var o=new Uint8Array(1);return function(){return crypto.getRandomValues(o),o[0]}}else if($)try{var u=ov();return function(){return u.randomBytes(1)[0]}}catch{}return function(){Wt("randomDevice")}}function Fs(o,u){Fs.randomDevice||(Fs.randomDevice=tw());for(var l=0;l<u;l++)zt[o+l>>0]=Fs.randomDevice();return 0}function rw(o){return o}function iw(o){Xe(o)}function Ms(o){return o%4==0&&(o%100!=0||o%400==0)}function Ko(o,u){for(var l=0,d=0;d<=u;l+=o[d++]);return l}var Us=[31,29,31,30,31,30,31,31,30,31,30,31],Cs=[31,28,31,30,31,30,31,31,30,31,30,31];function Vs(o,u){for(var l=new Date(o.getTime());u>0;){var d=Ms(l.getFullYear()),h=l.getMonth(),p=(d?Us:Cs)[h];if(u>p-l.getDate())u-=p-l.getDate()+1,l.setDate(1),h<11?l.setMonth(h+1):(l.setMonth(0),l.setFullYear(l.getFullYear()+1));else return l.setDate(l.getDate()+u),l}return l}function nw(o,u,l,d){var h=ce[d+40>>2],p={tm_sec:ce[d>>2],tm_min:ce[d+4>>2],tm_hour:ce[d+8>>2],tm_mday:ce[d+12>>2],tm_mon:ce[d+16>>2],tm_year:ce[d+20>>2],tm_wday:ce[d+24>>2],tm_yday:ce[d+28>>2],tm_isdst:ce[d+32>>2],tm_gmtoff:ce[d+36>>2],tm_zone:h?Ss(h):""},y=Ss(l),_={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var b in _)y=y.replace(new RegExp(b,"g"),_[b]);var g=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],B=["January","February","March","April","May","June","July","August","September","October","November","December"];function T(P,H,Oe){for(var me=typeof P=="number"?P.toString():P||"";me.length<H;)me=Oe[0]+me;return me}function O(P,H){return T(P,H,"0")}function C(P,H){function Oe(at){return at<0?-1:at>0?1:0}var me;return(me=Oe(P.getFullYear()-H.getFullYear()))===0&&(me=Oe(P.getMonth()-H.getMonth()))===0&&(me=Oe(P.getDate()-H.getDate())),me}function x(P){switch(P.getDay()){case 0:return new Date(P.getFullYear()-1,11,29);case 1:return P;case 2:return new Date(P.getFullYear(),0,3);case 3:return new Date(P.getFullYear(),0,2);case 4:return new Date(P.getFullYear(),0,1);case 5:return new Date(P.getFullYear()-1,11,31);case 6:return new Date(P.getFullYear()-1,11,30)}}function re(P){var H=Vs(new Date(P.tm_year+1900,0,1),P.tm_yday),Oe=new Date(H.getFullYear(),0,4),me=new Date(H.getFullYear()+1,0,4),at=x(Oe),Tr=x(me);return C(at,H)<=0?C(Tr,H)<=0?H.getFullYear()+1:H.getFullYear():H.getFullYear()-1}var pe={"%a":function(P){return g[P.tm_wday].substring(0,3)},"%A":function(P){return g[P.tm_wday]},"%b":function(P){return B[P.tm_mon].substring(0,3)},"%B":function(P){return B[P.tm_mon]},"%C":function(P){var H=P.tm_year+1900;return O(H/100|0,2)},"%d":function(P){return O(P.tm_mday,2)},"%e":function(P){return T(P.tm_mday,2," ")},"%g":function(P){return re(P).toString().substring(2)},"%G":function(P){return re(P)},"%H":function(P){return O(P.tm_hour,2)},"%I":function(P){var H=P.tm_hour;return H==0?H=12:H>12&&(H-=12),O(H,2)},"%j":function(P){return O(P.tm_mday+Ko(Ms(P.tm_year+1900)?Us:Cs,P.tm_mon-1),3)},"%m":function(P){return O(P.tm_mon+1,2)},"%M":function(P){return O(P.tm_min,2)},"%n":function(){return`
|
|
18
|
-
`},"%p":function(P){return P.tm_hour>=0&&P.tm_hour<12?"AM":"PM"},"%S":function(P){return O(P.tm_sec,2)},"%t":function(){return" "},"%u":function(P){return P.tm_wday||7},"%U":function(P){var H=new Date(P.tm_year+1900,0,1),Oe=H.getDay()===0?H:Vs(H,7-H.getDay()),me=new Date(P.tm_year+1900,P.tm_mon,P.tm_mday);if(C(Oe,me)<0){var at=Ko(Ms(me.getFullYear())?Us:Cs,me.getMonth()-1)-31,Tr=31-Oe.getDate(),oi=Tr+at+me.getDate();return O(Math.ceil(oi/7),2)}return C(Oe,H)===0?"01":"00"},"%V":function(P){var H=new Date(P.tm_year+1900,0,4),Oe=new Date(P.tm_year+1901,0,4),me=x(H),at=x(Oe),Tr=Vs(new Date(P.tm_year+1900,0,1),P.tm_yday);if(C(Tr,me)<0)return"53";if(C(at,Tr)<=0)return"01";var oi;return me.getFullYear()<P.tm_year+1900?oi=P.tm_yday+32-me.getDate():oi=P.tm_yday+1-me.getDate(),O(Math.ceil(oi/7),2)},"%w":function(P){return P.tm_wday},"%W":function(P){var H=new Date(P.tm_year,0,1),Oe=H.getDay()===1?H:Vs(H,H.getDay()===0?1:7-H.getDay()+1),me=new Date(P.tm_year+1900,P.tm_mon,P.tm_mday);if(C(Oe,me)<0){var at=Ko(Ms(me.getFullYear())?Us:Cs,me.getMonth()-1)-31,Tr=31-Oe.getDate(),oi=Tr+at+me.getDate();return O(Math.ceil(oi/7),2)}return C(Oe,H)===0?"01":"00"},"%y":function(P){return(P.tm_year+1900).toString().substring(2)},"%Y":function(P){return P.tm_year+1900},"%z":function(P){var H=P.tm_gmtoff,Oe=H>=0;return H=Math.abs(H)/60,H=H/60*100+H%60,(Oe?"+":"-")+String("0000"+H).slice(-4)},"%Z":function(P){return P.tm_zone},"%%":function(){return"%"}};for(var b in pe)y.includes(b)&&(y=y.replace(new RegExp(b,"g"),pe[b](p)));var we=aw(y,!1);return we.length>u?0:(Sd(we,o),we.length-1)}function sw(o,u,l,d){return nw(o,u,l,d)}function aw(o,u,l){var d=l>0?l:gv(o)+1,h=new Array(d),p=Id(o,h,0,h.length);return u&&(h.length=p),h}var ow={i:Yv,A:$v,G:Kv,b:Qv,n:Xv,J:Zv,ja:ej,j:Vd,sa:tj,u:rj,E:ij,c:Gv,ze:nj,ea:aj,Oa:oj,Na:uj,Pa:cj,ma:lj,Ra:dj,Ma:fj,Qa:hj,pa:pj,xe:yj,la:mj,oa:_j,na:bj,wa:gj,va:vj,fa:jj,ka:Bj,Ea:Tj,Fa:Ij,Ca:Sj,Da:Dj,Wa:Oj,Aa:Aj,Ha:Fj,Ja:Mj,Ba:Uj,Ka:Cj,da:Vj,Ga:kj,Ia:Pj,za:Rj,ve:Nj,xb:xj,Xa:Ej,Pc:qj,Ta:Wj,Ua:Yj,Y:Hj,Va:$j,je:Jj,qb:Kj,ra:Gj,qe:Qj,ye:Xj,ga:Zj,a:ew,La:Fs,Z:k0,K:h0,R:Xw,bd:nT,_:V0,M:C0,ta:Qw,cd:iT,t:r0,U:E0,xa:m0,W:b0,V:x0,ya:y0,e:Ww,$:M0,B:g0,hc:GT,d:Yw,ca:B0,ua:P0,h:$w,fc:XT,l:Gw,qa:d0,o:Jw,z:a0,w:i0,Q:_0,x:n0,v:o0,p:A0,L:T0,I:I0,Ac:UT,Hc:IT,Kc:wT,Rc:mT,Bc:MT,gc:QT,ad:sT,Ic:TT,Sc:yT,oe:H0,Hd:SB,cc:tI,ne:$0,pc:zT,Pb:mI,Za:n1,Ya:s1,Ud:hB,Gd:DB,zb:UI,Xb:uI,Td:pB,jd:GB,qc:qT,ec:ZT,be:nB,Ld:wB,fd:eT,dc:eI,Vb:lI,bc:rI,mb:zI,Md:jB,ge:Z0,Jd:TB,Ob:_I,hb:JI,_a:i1,Fb:SI,me:J0,Zb:aI,eb:QI,wb:VI,Cd:MB,ib:$I,Eb:DI,Kd:BB,_b:sI,Nb:bI,ac:iI,$b:nI,Gc:ST,Oc:bT,yc:VT,$d:aB,Xd:lB,Tc:pT,Wd:dB,ke:G0,Xc:lT,Wc:dT,se:z0,re:W0,Fd:OB,ue:L0,md:$B,Vc:fT,Cc:FT,kd:KB,_c:oT,mc:HT,vb:kI,gd:ZB,$c:aT,lc:$T,id:QB,Zc:uT,Bb:FI,Qb:yI,xc:kT,Sb:hI,ed:tT,vd:NB,ud:xB,sd:LB,td:EB,vc:RT,Cb:AI,Jb:wI,$a:r1,Mc:vT,ob:LI,Hb:TI,Yc:cT,tc:xT,s:qw,k:Hw,C:w0,aa:D0,sb:NI,D:j0,ba:S0,tb:RI,f:zw,T:e0,O:v0,kc:Zw,g:t0,m:Kw,Ae:R0,q:p0,r:l0,ha:U0,y:s0,P:f0,N:F0,S:u0,we:N0,ia:O0,X:c0,ld:JB,rb:xI,Dc:AT,zc:CT,Rd:mB,Qc:_T,ic:KT,lb:WI,Id:IB,hd:XB,yb:CI,fb:GI,Ec:OT,Fc:DT,uc:NT,Sd:yB,nc:YT,jc:JT,wd:RB,de:rB,Uc:hT,dd:rT,Wb:cI,pd:WB,Nd:vB,Od:gB,jb:HI,_d:oB,Pd:bB,oc:WT,nd:HB,Ad:CB,ce:iB,gb:KI,ie:Q0,le:K0,pe:Y0,zd:VB,Ab:MI,Qd:_B,rd:qB,qd:zB,Kb:jI,kb:YI,Rb:pI,Bd:UB,ab:t1,od:YB,nb:qI,te:q0,fe:eB,Lb:vI,xd:PB,Zd:uB,Jc:BT,ee:tB,Yd:cB,Mb:gI,Ed:AB,Dd:FB,Ib:BI,ub:PI,Gb:II,Nc:gT,ae:sB,db:XI,yd:kB,pb:EI,Vd:fB,rc:LT,bb:e1,cb:ZI,Lc:jT,he:X0,Ub:dI,sc:ET,wc:PT,Db:OI,Yb:oI,Tb:fI,H:rw,F:iw,Sa:sw},mC=zv(),uw=t.___wasm_call_ctors=function(){return(uw=t.___wasm_call_ctors=t.asm.Ce).apply(null,arguments)},cw=t._main=function(){return(cw=t._main=t.asm.De).apply(null,arguments)},lw=t._duckdb_web_fs_glob_add_path=function(){return(lw=t._duckdb_web_fs_glob_add_path=t.asm.Fe).apply(null,arguments)},dw=t._duckdb_web_clear_response=function(){return(dw=t._duckdb_web_clear_response=t.asm.Ge).apply(null,arguments)},fw=t._duckdb_web_fail_with=function(){return(fw=t._duckdb_web_fail_with=t.asm.He).apply(null,arguments)},hw=t._duckdb_web_reset=function(){return(hw=t._duckdb_web_reset=t.asm.Ie).apply(null,arguments)},pw=t._duckdb_web_connect=function(){return(pw=t._duckdb_web_connect=t.asm.Je).apply(null,arguments)},yw=t._duckdb_web_disconnect=function(){return(yw=t._duckdb_web_disconnect=t.asm.Ke).apply(null,arguments)},mw=t._duckdb_web_flush_files=function(){return(mw=t._duckdb_web_flush_files=t.asm.Le).apply(null,arguments)},_w=t._duckdb_web_flush_file=function(){return(_w=t._duckdb_web_flush_file=t.asm.Me).apply(null,arguments)},bw=t._duckdb_web_open=function(){return(bw=t._duckdb_web_open=t.asm.Ne).apply(null,arguments)},gw=t._duckdb_web_collect_file_stats=function(){return(gw=t._duckdb_web_collect_file_stats=t.asm.Oe).apply(null,arguments)},vw=t._duckdb_web_export_file_stats=function(){return(vw=t._duckdb_web_export_file_stats=t.asm.Pe).apply(null,arguments)},jw=t._duckdb_web_fs_drop_file=function(){return(jw=t._duckdb_web_fs_drop_file=t.asm.Qe).apply(null,arguments)},ww=t._duckdb_web_fs_drop_files=function(){return(ww=t._duckdb_web_fs_drop_files=t.asm.Re).apply(null,arguments)},Bw=t._duckdb_web_fs_get_file_info=function(){return(Bw=t._duckdb_web_fs_get_file_info=t.asm.Se).apply(null,arguments)},Tw=t._duckdb_web_fs_set_file_descriptor=function(){return(Tw=t._duckdb_web_fs_set_file_descriptor=t.asm.Te).apply(null,arguments)},Iw=t._duckdb_web_fs_register_file_url=function(){return(Iw=t._duckdb_web_fs_register_file_url=t.asm.Ue).apply(null,arguments)},Sw=t._duckdb_web_fs_register_file_buffer=function(){return(Sw=t._duckdb_web_fs_register_file_buffer=t.asm.Ve).apply(null,arguments)},Dw=t._duckdb_web_copy_file_to_buffer=function(){return(Dw=t._duckdb_web_copy_file_to_buffer=t.asm.We).apply(null,arguments)},Ow=t._duckdb_web_copy_file_to_path=function(){return(Ow=t._duckdb_web_copy_file_to_path=t.asm.Xe).apply(null,arguments)},Aw=t._duckdb_web_get_version=function(){return(Aw=t._duckdb_web_get_version=t.asm.Ye).apply(null,arguments)},Fw=t._duckdb_web_get_feature_flags=function(){return(Fw=t._duckdb_web_get_feature_flags=t.asm.Ze).apply(null,arguments)},Mw=t._duckdb_web_tokenize=function(){return(Mw=t._duckdb_web_tokenize=t.asm._e).apply(null,arguments)},Uw=t._duckdb_web_prepared_create=function(){return(Uw=t._duckdb_web_prepared_create=t.asm.$e).apply(null,arguments)},Cw=t._duckdb_web_prepared_close=function(){return(Cw=t._duckdb_web_prepared_close=t.asm.af).apply(null,arguments)},Vw=t._duckdb_web_prepared_run=function(){return(Vw=t._duckdb_web_prepared_run=t.asm.bf).apply(null,arguments)},kw=t._duckdb_web_prepared_send=function(){return(kw=t._duckdb_web_prepared_send=t.asm.cf).apply(null,arguments)},Pw=t._duckdb_web_query_run=function(){return(Pw=t._duckdb_web_query_run=t.asm.df).apply(null,arguments)},Rw=t._duckdb_web_query_send=function(){return(Rw=t._duckdb_web_query_send=t.asm.ef).apply(null,arguments)},Nw=t._duckdb_web_query_fetch_results=function(){return(Nw=t._duckdb_web_query_fetch_results=t.asm.ff).apply(null,arguments)},xw=t._duckdb_web_insert_arrow_from_ipc_stream=function(){return(xw=t._duckdb_web_insert_arrow_from_ipc_stream=t.asm.gf).apply(null,arguments)},Ew=t._duckdb_web_insert_csv_from_path=function(){return(Ew=t._duckdb_web_insert_csv_from_path=t.asm.hf).apply(null,arguments)},Lw=t._duckdb_web_insert_json_from_path=function(){return(Lw=t._duckdb_web_insert_json_from_path=t.asm.jf).apply(null,arguments)},kd=t.___errno_location=function(){return(kd=t.___errno_location=t.asm.kf).apply(null,arguments)},I=t.stackSave=function(){return(I=t.stackSave=t.asm.lf).apply(null,arguments)},S=t.stackRestore=function(){return(S=t.stackRestore=t.asm.mf).apply(null,arguments)},Go=t.stackAlloc=function(){return(Go=t.stackAlloc=t.asm.nf).apply(null,arguments)},D=t._setThrew=function(){return(D=t._setThrew=t.asm.of).apply(null,arguments)},Vn=t.___cxa_can_catch=function(){return(Vn=t.___cxa_can_catch=t.asm.pf).apply(null,arguments)},Pd=t.___cxa_is_pointer_type=function(){return(Pd=t.___cxa_is_pointer_type=t.asm.qf).apply(null,arguments)},Qo=t._malloc=function(){return(Qo=t._malloc=t.asm.rf).apply(null,arguments)},Xo=t._free=function(){return(Xo=t._free=t.asm.sf).apply(null,arguments)},Rd=t.dynCall_jiji=function(){return(Rd=t.dynCall_jiji=t.asm.tf).apply(null,arguments)},Nd=t.dynCall_jiiii=function(){return(Nd=t.dynCall_jiiii=t.asm.uf).apply(null,arguments)},xd=t.dynCall_iiiiij=function(){return(xd=t.dynCall_iiiiij=t.asm.vf).apply(null,arguments)},Ed=t.dynCall_iiiiijj=function(){return(Ed=t.dynCall_iiiiijj=t.asm.wf).apply(null,arguments)},Ld=t.dynCall_viijii=function(){return(Ld=t.dynCall_viijii=t.asm.xf).apply(null,arguments)},qd=t.dynCall_j=function(){return(qd=t.dynCall_j=t.asm.yf).apply(null,arguments)},zd=t.dynCall_ji=function(){return(zd=t.dynCall_ji=t.asm.zf).apply(null,arguments)},Wd=t.dynCall_iij=function(){return(Wd=t.dynCall_iij=t.asm.Af).apply(null,arguments)},Yd=t.dynCall_viij=function(){return(Yd=t.dynCall_viij=t.asm.Bf).apply(null,arguments)},Hd=t.dynCall_viijji=function(){return(Hd=t.dynCall_viijji=t.asm.Cf).apply(null,arguments)},$d=t.dynCall_viijj=function(){return($d=t.dynCall_viijj=t.asm.Df).apply(null,arguments)},Jd=t.dynCall_viiijj=function(){return(Jd=t.dynCall_viiijj=t.asm.Ef).apply(null,arguments)},Kd=t.dynCall_viiji=function(){return(Kd=t.dynCall_viiji=t.asm.Ff).apply(null,arguments)},Gd=t.dynCall_vijjj=function(){return(Gd=t.dynCall_vijjj=t.asm.Gf).apply(null,arguments)},Qd=t.dynCall_iiijj=function(){return(Qd=t.dynCall_iiijj=t.asm.Hf).apply(null,arguments)},Xd=t.dynCall_viiij=function(){return(Xd=t.dynCall_viiij=t.asm.If).apply(null,arguments)},Zd=t.dynCall_viijij=function(){return(Zd=t.dynCall_viijij=t.asm.Jf).apply(null,arguments)},ef=t.dynCall_viiijjj=function(){return(ef=t.dynCall_viiijjj=t.asm.Kf).apply(null,arguments)},tf=t.dynCall_iiij=function(){return(tf=t.dynCall_iiij=t.asm.Lf).apply(null,arguments)},rf=t.dynCall_vijijj=function(){return(rf=t.dynCall_vijijj=t.asm.Mf).apply(null,arguments)},nf=t.dynCall_iji=function(){return(nf=t.dynCall_iji=t.asm.Nf).apply(null,arguments)},sf=t.dynCall_vij=function(){return(sf=t.dynCall_vij=t.asm.Of).apply(null,arguments)},af=t.dynCall_jii=function(){return(af=t.dynCall_jii=t.asm.Pf).apply(null,arguments)},of=t.dynCall_vijj=function(){return(of=t.dynCall_vijj=t.asm.Qf).apply(null,arguments)},uf=t.dynCall_viji=function(){return(uf=t.dynCall_viji=t.asm.Rf).apply(null,arguments)},cf=t.dynCall_iiiijj=function(){return(cf=t.dynCall_iiiijj=t.asm.Sf).apply(null,arguments)},lf=t.dynCall_viijiiiii=function(){return(lf=t.dynCall_viijiiiii=t.asm.Tf).apply(null,arguments)},df=t.dynCall_viiiiijiiii=function(){return(df=t.dynCall_viiiiijiiii=t.asm.Uf).apply(null,arguments)},ff=t.dynCall_viiiijj=function(){return(ff=t.dynCall_viiiijj=t.asm.Vf).apply(null,arguments)},hf=t.dynCall_viiiij=function(){return(hf=t.dynCall_viiiij=t.asm.Wf).apply(null,arguments)},pf=t.dynCall_iiiij=function(){return(pf=t.dynCall_iiiij=t.asm.Xf).apply(null,arguments)},yf=t.dynCall_iiiiiji=function(){return(yf=t.dynCall_iiiiiji=t.asm.Yf).apply(null,arguments)},mf=t.dynCall_iiiji=function(){return(mf=t.dynCall_iiiji=t.asm.Zf).apply(null,arguments)},_f=t.dynCall_iiiiji=function(){return(_f=t.dynCall_iiiiji=t.asm._f).apply(null,arguments)},bf=t.dynCall_jiii=function(){return(bf=t.dynCall_jiii=t.asm.$f).apply(null,arguments)},gf=t.dynCall_jij=function(){return(gf=t.dynCall_jij=t.asm.ag).apply(null,arguments)},vf=t.dynCall_jiijiiiii=function(){return(vf=t.dynCall_jiijiiiii=t.asm.bg).apply(null,arguments)},jf=t.dynCall_jiijiijiii=function(){return(jf=t.dynCall_jiijiijiii=t.asm.cg).apply(null,arguments)},wf=t.dynCall_jiijjiii=function(){return(wf=t.dynCall_jiijjiii=t.asm.dg).apply(null,arguments)},Bf=t.dynCall_jiijijii=function(){return(Bf=t.dynCall_jiijijii=t.asm.eg).apply(null,arguments)},Tf=t.dynCall_viiijjij=function(){return(Tf=t.dynCall_viiijjij=t.asm.fg).apply(null,arguments)},If=t.dynCall_viijiii=function(){return(If=t.dynCall_viijiii=t.asm.gg).apply(null,arguments)},Sf=t.dynCall_vijijjiij=function(){return(Sf=t.dynCall_vijijjiij=t.asm.hg).apply(null,arguments)},Df=t.dynCall_viijjij=function(){return(Df=t.dynCall_viijjij=t.asm.ig).apply(null,arguments)},Of=t.dynCall_viiijjiij=function(){return(Of=t.dynCall_viiijjiij=t.asm.jg).apply(null,arguments)},Af=t.dynCall_viiiijjjj=function(){return(Af=t.dynCall_viiiijjjj=t.asm.kg).apply(null,arguments)},Ff=t.dynCall_viijiiiiij=function(){return(Ff=t.dynCall_viijiiiiij=t.asm.lg).apply(null,arguments)},Mf=t.dynCall_viijiiiijj=function(){return(Mf=t.dynCall_viijiiiijj=t.asm.mg).apply(null,arguments)},Uf=t.dynCall_viiijiiiijjj=function(){return(Uf=t.dynCall_viiijiiiijjj=t.asm.ng).apply(null,arguments)},Cf=t.dynCall_viijijiiiijjj=function(){return(Cf=t.dynCall_viijijiiiijjj=t.asm.og).apply(null,arguments)},Vf=t.dynCall_jiiijii=function(){return(Vf=t.dynCall_jiiijii=t.asm.pg).apply(null,arguments)},kf=t.dynCall_iiijii=function(){return(kf=t.dynCall_iiijii=t.asm.qg).apply(null,arguments)},Pf=t.dynCall_jiijii=function(){return(Pf=t.dynCall_jiijii=t.asm.rg).apply(null,arguments)},Rf=t.dynCall_viiijii=function(){return(Rf=t.dynCall_viiijii=t.asm.sg).apply(null,arguments)},Nf=t.dynCall_fiijii=function(){return(Nf=t.dynCall_fiijii=t.asm.tg).apply(null,arguments)},xf=t.dynCall_diijii=function(){return(xf=t.dynCall_diijii=t.asm.ug).apply(null,arguments)},Ef=t.dynCall_iiiiiiijii=function(){return(Ef=t.dynCall_iiiiiiijii=t.asm.vg).apply(null,arguments)},Lf=t.dynCall_viiiiji=function(){return(Lf=t.dynCall_viiiiji=t.asm.wg).apply(null,arguments)},qf=t.dynCall_jiiiijii=function(){return(qf=t.dynCall_jiiiijii=t.asm.xg).apply(null,arguments)},zf=t.dynCall_jiiiijiiiiiiii=function(){return(zf=t.dynCall_jiiiijiiiiiiii=t.asm.yg).apply(null,arguments)},Wf=t.dynCall_jiiiiijiiii=function(){return(Wf=t.dynCall_jiiiiijiiii=t.asm.zg).apply(null,arguments)},Yf=t.dynCall_jiiijiii=function(){return(Yf=t.dynCall_jiiijiii=t.asm.Ag).apply(null,arguments)},Hf=t.dynCall_jj=function(){return(Hf=t.dynCall_jj=t.asm.Bg).apply(null,arguments)},$f=t.dynCall_jd=function(){return($f=t.dynCall_jd=t.asm.Cg).apply(null,arguments)},Jf=t.dynCall_jf=function(){return(Jf=t.dynCall_jf=t.asm.Dg).apply(null,arguments)},Kf=t.dynCall_iijjjj=function(){return(Kf=t.dynCall_iijjjj=t.asm.Eg).apply(null,arguments)},Gf=t.dynCall_iiijji=function(){return(Gf=t.dynCall_iiijji=t.asm.Fg).apply(null,arguments)},Qf=t.dynCall_vijijiiiijjj=function(){return(Qf=t.dynCall_vijijiiiijjj=t.asm.Gg).apply(null,arguments)},Xf=t.dynCall_viiiiiij=function(){return(Xf=t.dynCall_viiiiiij=t.asm.Hg).apply(null,arguments)},Zf=t.dynCall_iiiiiiji=function(){return(Zf=t.dynCall_iiiiiiji=t.asm.Ig).apply(null,arguments)},eh=t.dynCall_iiiiiiiiji=function(){return(eh=t.dynCall_iiiiiiiiji=t.asm.Jg).apply(null,arguments)},th=t.dynCall_viiiiijj=function(){return(th=t.dynCall_viiiiijj=t.asm.Kg).apply(null,arguments)},rh=t.dynCall_vijiii=function(){return(rh=t.dynCall_vijiii=t.asm.Lg).apply(null,arguments)},ih=t.dynCall_jijijjij=function(){return(ih=t.dynCall_jijijjij=t.asm.Mg).apply(null,arguments)},nh=t.dynCall_vijjij=function(){return(nh=t.dynCall_vijjij=t.asm.Ng).apply(null,arguments)},sh=t.dynCall_viijjj=function(){return(sh=t.dynCall_viijjj=t.asm.Og).apply(null,arguments)},ah=t.dynCall_viijjji=function(){return(ah=t.dynCall_viijjji=t.asm.Pg).apply(null,arguments)},oh=t.dynCall_iijjijj=function(){return(oh=t.dynCall_iijjijj=t.asm.Qg).apply(null,arguments)},uh=t.dynCall_viiiijiiiii=function(){return(uh=t.dynCall_viiiijiiiii=t.asm.Rg).apply(null,arguments)},ch=t.dynCall_viiiijiiii=function(){return(ch=t.dynCall_viiiijiiii=t.asm.Sg).apply(null,arguments)},lh=t.dynCall_iiiiiij=function(){return(lh=t.dynCall_iiiiiij=t.asm.Tg).apply(null,arguments)},dh=t.dynCall_iiiiiiiiiiji=function(){return(dh=t.dynCall_iiiiiiiiiiji=t.asm.Ug).apply(null,arguments)},fh=t.dynCall_viiiiiji=function(){return(fh=t.dynCall_viiiiiji=t.asm.Vg).apply(null,arguments)},hh=t.dynCall_jiiiiiii=function(){return(hh=t.dynCall_jiiiiiii=t.asm.Wg).apply(null,arguments)},ph=t.dynCall_viiiji=function(){return(ph=t.dynCall_viiiji=t.asm.Xg).apply(null,arguments)},yh=t.dynCall_jijj=function(){return(yh=t.dynCall_jijj=t.asm.Yg).apply(null,arguments)},mh=t.dynCall_viiiijiiiiiiii=function(){return(mh=t.dynCall_viiiijiiiiiiii=t.asm.Zg).apply(null,arguments)},_h=t.dynCall_ij=function(){return(_h=t.dynCall_ij=t.asm._g).apply(null,arguments)},bh=t.dynCall_jjj=function(){return(bh=t.dynCall_jjj=t.asm.$g).apply(null,arguments)},gh=t.dynCall_vjii=function(){return(gh=t.dynCall_vjii=t.asm.ah).apply(null,arguments)},vh=t.dynCall_vjiiii=function(){return(vh=t.dynCall_vjiiii=t.asm.bh).apply(null,arguments)},jh=t.dynCall_viiiiijiii=function(){return(jh=t.dynCall_viiiiijiii=t.asm.ch).apply(null,arguments)},wh=t.dynCall_vijji=function(){return(wh=t.dynCall_vijji=t.asm.dh).apply(null,arguments)},Bh=t.dynCall_jiij=function(){return(Bh=t.dynCall_jiij=t.asm.eh).apply(null,arguments)},Th=t.dynCall_iiiijjii=function(){return(Th=t.dynCall_iiiijjii=t.asm.fh).apply(null,arguments)},Ih=t.dynCall_iiiiijji=function(){return(Ih=t.dynCall_iiiiijji=t.asm.gh).apply(null,arguments)},Sh=t.dynCall_viiijjii=function(){return(Sh=t.dynCall_viiijjii=t.asm.hh).apply(null,arguments)},Dh=t.dynCall_viiiijji=function(){return(Dh=t.dynCall_viiiijji=t.asm.ih).apply(null,arguments)},Oh=t.dynCall_viiiijjii=function(){return(Oh=t.dynCall_viiiijjii=t.asm.jh).apply(null,arguments)},Ah=t.dynCall_viiiiijji=function(){return(Ah=t.dynCall_viiiiijji=t.asm.kh).apply(null,arguments)},Fh=t.dynCall_jiiiij=function(){return(Fh=t.dynCall_jiiiij=t.asm.lh).apply(null,arguments)},Mh=t.dynCall_iidj=function(){return(Mh=t.dynCall_iidj=t.asm.mh).apply(null,arguments)},Uh=t.dynCall_ijji=function(){return(Uh=t.dynCall_ijji=t.asm.nh).apply(null,arguments)},Ch=t.dynCall_iiiiiiiij=function(){return(Ch=t.dynCall_iiiiiiiij=t.asm.oh).apply(null,arguments)},Vh=t.dynCall_iiiiiiij=function(){return(Vh=t.dynCall_iiiiiiij=t.asm.ph).apply(null,arguments)},kh=t.dynCall_iiiiiiiiiiiij=function(){return(kh=t.dynCall_iiiiiiiiiiiij=t.asm.qh).apply(null,arguments)},Ph=t.dynCall_iiiiiiiji=function(){return(Ph=t.dynCall_iiiiiiiji=t.asm.rh).apply(null,arguments)},Rh=t.dynCall_iiiidjj=function(){return(Rh=t.dynCall_iiiidjj=t.asm.sh).apply(null,arguments)},Nh=t.dynCall_iiiijjj=function(){return(Nh=t.dynCall_iiiijjj=t.asm.th).apply(null,arguments)},xh=t.dynCall_jiiiii=function(){return(xh=t.dynCall_jiiiii=t.asm.uh).apply(null,arguments)},Eh=t.dynCall_jiiiiiijii=function(){return(Eh=t.dynCall_jiiiiiijii=t.asm.vh).apply(null,arguments)},Lh=t.dynCall_iiiijji=function(){return(Lh=t.dynCall_iiiijji=t.asm.wh).apply(null,arguments)},qh=t.dynCall_viiijji=function(){return(qh=t.dynCall_viiijji=t.asm.xh).apply(null,arguments)},zh=t.dynCall_jiiiiii=function(){return(zh=t.dynCall_jiiiiii=t.asm.yh).apply(null,arguments)},Wh=t.dynCall_iiijiii=function(){return(Wh=t.dynCall_iiijiii=t.asm.zh).apply(null,arguments)},Yh=t.dynCall_iiiiijii=function(){return(Yh=t.dynCall_iiiiijii=t.asm.Ah).apply(null,arguments)},Hh=t.dynCall_iiijiij=function(){return(Hh=t.dynCall_iiijiij=t.asm.Bh).apply(null,arguments)},$h=t.dynCall_iijjiii=function(){return($h=t.dynCall_iijjiii=t.asm.Ch).apply(null,arguments)},Jh=t.dynCall_iijjiiii=function(){return(Jh=t.dynCall_iijjiiii=t.asm.Dh).apply(null,arguments)},Kh=t.dynCall_iiji=function(){return(Kh=t.dynCall_iiji=t.asm.Eh).apply(null,arguments)},Gh=t.dynCall_iijji=function(){return(Gh=t.dynCall_iijji=t.asm.Fh).apply(null,arguments)},Qh=t.dynCall_vijiiii=function(){return(Qh=t.dynCall_vijiiii=t.asm.Gh).apply(null,arguments)},Xh=t.dynCall_iijiiii=function(){return(Xh=t.dynCall_iijiiii=t.asm.Hh).apply(null,arguments)},Zh=t.dynCall_vjjii=function(){return(Zh=t.dynCall_vjjii=t.asm.Ih).apply(null,arguments)},ep=t.dynCall_iiiijiii=function(){return(ep=t.dynCall_iiiijiii=t.asm.Jh).apply(null,arguments)},tp=t.dynCall_iiijij=function(){return(tp=t.dynCall_iiijij=t.asm.Kh).apply(null,arguments)},rp=t.dynCall_iijj=function(){return(rp=t.dynCall_iijj=t.asm.Lh).apply(null,arguments)},ip=t.dynCall_viiijiii=function(){return(ip=t.dynCall_viiijiii=t.asm.Mh).apply(null,arguments)},np=t.dynCall_iiijiiii=function(){return(np=t.dynCall_iiijiiii=t.asm.Nh).apply(null,arguments)},sp=t.dynCall_jiiij=function(){return(sp=t.dynCall_jiiij=t.asm.Oh).apply(null,arguments)},ap=t.dynCall_iiiiijjiijj=function(){return(ap=t.dynCall_iiiiijjiijj=t.asm.Ph).apply(null,arguments)},op=t.dynCall_viijiijji=function(){return(op=t.dynCall_viijiijji=t.asm.Qh).apply(null,arguments)},up=t.dynCall_vjjijij=function(){return(up=t.dynCall_vjjijij=t.asm.Rh).apply(null,arguments)},cp=t.dynCall_vijjji=function(){return(cp=t.dynCall_vijjji=t.asm.Sh).apply(null,arguments)},lp=t.dynCall_jiiijji=function(){return(lp=t.dynCall_jiiijji=t.asm.Th).apply(null,arguments)},dp=t.dynCall_iiijjii=function(){return(dp=t.dynCall_iiijjii=t.asm.Uh).apply(null,arguments)},fp=t.dynCall_iijjii=function(){return(fp=t.dynCall_iijjii=t.asm.Vh).apply(null,arguments)},hp=t.dynCall_vijii=function(){return(hp=t.dynCall_vijii=t.asm.Wh).apply(null,arguments)},pp=t.dynCall_viijjii=function(){return(pp=t.dynCall_viijjii=t.asm.Xh).apply(null,arguments)},yp=t.dynCall_jijjij=function(){return(yp=t.dynCall_jijjij=t.asm.Yh).apply(null,arguments)},mp=t.dynCall_jijiii=function(){return(mp=t.dynCall_jijiii=t.asm.Zh).apply(null,arguments)},_p=t.dynCall_viijiiij=function(){return(_p=t.dynCall_viijiiij=t.asm._h).apply(null,arguments)},bp=t.dynCall_vijiiiji=function(){return(bp=t.dynCall_vijiiiji=t.asm.$h).apply(null,arguments)},gp=t.dynCall_jiiji=function(){return(gp=t.dynCall_jiiji=t.asm.ai).apply(null,arguments)},vp=t.dynCall_viiijij=function(){return(vp=t.dynCall_viiijij=t.asm.bi).apply(null,arguments)},jp=t.dynCall_viijiijj=function(){return(jp=t.dynCall_viijiijj=t.asm.ci).apply(null,arguments)},wp=t.dynCall_vijij=function(){return(wp=t.dynCall_vijij=t.asm.di).apply(null,arguments)},Bp=t.dynCall_iiijjjj=function(){return(Bp=t.dynCall_iiijjjj=t.asm.ei).apply(null,arguments)},Tp=t.dynCall_iijiji=function(){return(Tp=t.dynCall_iijiji=t.asm.fi).apply(null,arguments)},Ip=t.dynCall_viiijijiji=function(){return(Ip=t.dynCall_viiijijiji=t.asm.gi).apply(null,arguments)},Sp=t.dynCall_vjiiiji=function(){return(Sp=t.dynCall_vjiiiji=t.asm.hi).apply(null,arguments)},Dp=t.dynCall_jiiijj=function(){return(Dp=t.dynCall_jiiijj=t.asm.ii).apply(null,arguments)},Op=t.dynCall_viijiiii=function(){return(Op=t.dynCall_viijiiii=t.asm.ji).apply(null,arguments)},Ap=t.dynCall_iiiijii=function(){return(Ap=t.dynCall_iiiijii=t.asm.ki).apply(null,arguments)},Fp=t.dynCall_viiiijii=function(){return(Fp=t.dynCall_viiiijii=t.asm.li).apply(null,arguments)},Mp=t.dynCall_iijiii=function(){return(Mp=t.dynCall_iijiii=t.asm.mi).apply(null,arguments)},Up=t.dynCall_jiiiiji=function(){return(Up=t.dynCall_jiiiiji=t.asm.ni).apply(null,arguments)},Cp=t.dynCall_vijiijj=function(){return(Cp=t.dynCall_vijiijj=t.asm.oi).apply(null,arguments)},Vp=t.dynCall_vifiijj=function(){return(Vp=t.dynCall_vifiijj=t.asm.pi).apply(null,arguments)},kp=t.dynCall_vidiijj=function(){return(kp=t.dynCall_vidiijj=t.asm.qi).apply(null,arguments)},Pp=t.dynCall_viiiiij=function(){return(Pp=t.dynCall_viiiiij=t.asm.ri).apply(null,arguments)},Rp=t.dynCall_ijj=function(){return(Rp=t.dynCall_ijj=t.asm.si).apply(null,arguments)},Np=t.dynCall_ijjiii=function(){return(Np=t.dynCall_ijjiii=t.asm.ti).apply(null,arguments)},xp=t.dynCall_vijijjji=function(){return(xp=t.dynCall_vijijjji=t.asm.ui).apply(null,arguments)},Ep=t.dynCall_viiiiijjji=function(){return(Ep=t.dynCall_viiiiijjji=t.asm.vi).apply(null,arguments)},Lp=t.dynCall_viijijj=function(){return(Lp=t.dynCall_viijijj=t.asm.wi).apply(null,arguments)},qp=t.dynCall_iiijiijj=function(){return(qp=t.dynCall_iiijiijj=t.asm.xi).apply(null,arguments)},zp=t.dynCall_viiijijjj=function(){return(zp=t.dynCall_viiijijjj=t.asm.yi).apply(null,arguments)},Wp=t.dynCall_iijiijj=function(){return(Wp=t.dynCall_iijiijj=t.asm.zi).apply(null,arguments)},Yp=t.dynCall_viiijjjji=function(){return(Yp=t.dynCall_viiijjjji=t.asm.Ai).apply(null,arguments)},Hp=t.dynCall_viiiijiii=function(){return(Hp=t.dynCall_viiiijiii=t.asm.Bi).apply(null,arguments)},$p=t.dynCall_iijii=function(){return($p=t.dynCall_iijii=t.asm.Ci).apply(null,arguments)},Jp=t.dynCall_vijjiiii=function(){return(Jp=t.dynCall_vijjiiii=t.asm.Di).apply(null,arguments)},Kp=t.dynCall_vijijjiiiii=function(){return(Kp=t.dynCall_vijijjiiiii=t.asm.Ei).apply(null,arguments)},Gp=t.dynCall_vijjiiiii=function(){return(Gp=t.dynCall_vijjiiiii=t.asm.Fi).apply(null,arguments)},Qp=t.dynCall_iiijjji=function(){return(Qp=t.dynCall_iiijjji=t.asm.Gi).apply(null,arguments)},Xp=t.dynCall_iiiiijjj=function(){return(Xp=t.dynCall_iiiiijjj=t.asm.Hi).apply(null,arguments)},Zp=t.dynCall_jijiiii=function(){return(Zp=t.dynCall_jijiiii=t.asm.Ii).apply(null,arguments)},ey=t.dynCall_iiijjjii=function(){return(ey=t.dynCall_iiijjjii=t.asm.Ji).apply(null,arguments)},ty=t.dynCall_iiiiijjji=function(){return(ty=t.dynCall_iiiiijjji=t.asm.Ki).apply(null,arguments)},ry=t.dynCall_viijiji=function(){return(ry=t.dynCall_viijiji=t.asm.Li).apply(null,arguments)};function qw(o){var u=I();try{Y.get(o)()}catch(l){if(S(u),l!==l+0&&l!=="longjmp")throw l;D(1,0)}}function zw(o,u,l){var d=I();try{Y.get(o)(u,l)}catch(h){if(S(d),h!==h+0&&h!=="longjmp")throw h;D(1,0)}}function Ww(o,u){var l=I();try{return Y.get(o)(u)}catch(d){if(S(l),d!==d+0&&d!=="longjmp")throw d;D(1,0)}}function Yw(o,u,l){var d=I();try{return Y.get(o)(u,l)}catch(h){if(S(d),h!==h+0&&h!=="longjmp")throw h;D(1,0)}}function Hw(o,u){var l=I();try{Y.get(o)(u)}catch(d){if(S(l),d!==d+0&&d!=="longjmp")throw d;D(1,0)}}function $w(o,u,l,d){var h=I();try{return Y.get(o)(u,l,d)}catch(p){if(S(h),p!==p+0&&p!=="longjmp")throw p;D(1,0)}}function Jw(o,u,l,d,h,p){var y=I();try{return Y.get(o)(u,l,d,h,p)}catch(_){if(S(y),_!==_+0&&_!=="longjmp")throw _;D(1,0)}}function Kw(o,u,l,d,h){var p=I();try{Y.get(o)(u,l,d,h)}catch(y){if(S(p),y!==y+0&&y!=="longjmp")throw y;D(1,0)}}function Gw(o,u,l,d,h){var p=I();try{return Y.get(o)(u,l,d,h)}catch(y){if(S(p),y!==y+0&&y!=="longjmp")throw y;D(1,0)}}function Qw(o,u,l,d){var h=I();try{return Y.get(o)(u,l,d)}catch(p){if(S(h),p!==p+0&&p!=="longjmp")throw p;D(1,0)}}function Xw(o,u,l,d){var h=I();try{return Y.get(o)(u,l,d)}catch(p){if(S(h),p!==p+0&&p!=="longjmp")throw p;D(1,0)}}function Zw(o,u,l,d){var h=I();try{Y.get(o)(u,l,d)}catch(p){if(S(h),p!==p+0&&p!=="longjmp")throw p;D(1,0)}}function e0(o,u,l,d){var h=I();try{Y.get(o)(u,l,d)}catch(p){if(S(h),p!==p+0&&p!=="longjmp")throw p;D(1,0)}}function t0(o,u,l,d){var h=I();try{Y.get(o)(u,l,d)}catch(p){if(S(h),p!==p+0&&p!=="longjmp")throw p;D(1,0)}}function r0(o){var u=I();try{return Y.get(o)()}catch(l){if(S(u),l!==l+0&&l!=="longjmp")throw l;D(1,0)}}function i0(o,u,l,d,h,p,y,_){var b=I();try{return Y.get(o)(u,l,d,h,p,y,_)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;D(1,0)}}function n0(o,u,l,d,h,p,y,_,b,g,B){var T=I();try{return Y.get(o)(u,l,d,h,p,y,_,b,g,B)}catch(O){if(S(T),O!==O+0&&O!=="longjmp")throw O;D(1,0)}}function s0(o,u,l,d,h,p,y,_){var b=I();try{Y.get(o)(u,l,d,h,p,y,_)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;D(1,0)}}function a0(o,u,l,d,h,p,y){var _=I();try{return Y.get(o)(u,l,d,h,p,y)}catch(b){if(S(_),b!==b+0&&b!=="longjmp")throw b;D(1,0)}}function o0(o,u,l,d,h,p,y,_,b,g,B,T){var O=I();try{return Y.get(o)(u,l,d,h,p,y,_,b,g,B,T)}catch(C){if(S(O),C!==C+0&&C!=="longjmp")throw C;D(1,0)}}function u0(o,u,l,d,h,p,y,_,b,g,B){var T=I();try{Y.get(o)(u,l,d,h,p,y,_,b,g,B)}catch(O){if(S(T),O!==O+0&&O!=="longjmp")throw O;D(1,0)}}function c0(o,u,l,d,h,p,y,_,b,g,B,T,O,C,x,re){var pe=I();try{Y.get(o)(u,l,d,h,p,y,_,b,g,B,T,O,C,x,re)}catch(we){if(S(pe),we!==we+0&&we!=="longjmp")throw we;D(1,0)}}function l0(o,u,l,d,h,p,y){var _=I();try{Y.get(o)(u,l,d,h,p,y)}catch(b){if(S(_),b!==b+0&&b!=="longjmp")throw b;D(1,0)}}function d0(o,u,l,d,h,p){var y=I();try{return Y.get(o)(u,l,d,h,p)}catch(_){if(S(y),_!==_+0&&_!=="longjmp")throw _;D(1,0)}}function f0(o,u,l,d,h,p,y,_,b){var g=I();try{Y.get(o)(u,l,d,h,p,y,_,b)}catch(B){if(S(g),B!==B+0&&B!=="longjmp")throw B;D(1,0)}}function h0(o,u){var l=I();try{return Y.get(o)(u)}catch(d){if(S(l),d!==d+0&&d!=="longjmp")throw d;D(1,0)}}function p0(o,u,l,d,h,p){var y=I();try{Y.get(o)(u,l,d,h,p)}catch(_){if(S(y),_!==_+0&&_!=="longjmp")throw _;D(1,0)}}function y0(o,u,l){var d=I();try{return Y.get(o)(u,l)}catch(h){if(S(d),h!==h+0&&h!=="longjmp")throw h;D(1,0)}}function m0(o,u,l){var d=I();try{return Y.get(o)(u,l)}catch(h){if(S(d),h!==h+0&&h!=="longjmp")throw h;D(1,0)}}function _0(o,u,l,d,h,p,y,_,b){var g=I();try{return Y.get(o)(u,l,d,h,p,y,_,b)}catch(B){if(S(g),B!==B+0&&B!=="longjmp")throw B;D(1,0)}}function b0(o,u,l,d,h){var p=I();try{return Y.get(o)(u,l,d,h)}catch(y){if(S(p),y!==y+0&&y!=="longjmp")throw y;D(1,0)}}function g0(o,u,l,d,h){var p=I();try{return Y.get(o)(u,l,d,h)}catch(y){if(S(p),y!==y+0&&y!=="longjmp")throw y;D(1,0)}}function v0(o,u,l,d,h,p){var y=I();try{Y.get(o)(u,l,d,h,p)}catch(_){if(S(y),_!==_+0&&_!=="longjmp")throw _;D(1,0)}}function j0(o,u,l){var d=I();try{Y.get(o)(u,l)}catch(h){if(S(d),h!==h+0&&h!=="longjmp")throw h;D(1,0)}}function w0(o,u,l){var d=I();try{Y.get(o)(u,l)}catch(h){if(S(d),h!==h+0&&h!=="longjmp")throw h;D(1,0)}}function B0(o,u,l,d){var h=I();try{return Y.get(o)(u,l,d)}catch(p){if(S(h),p!==p+0&&p!=="longjmp")throw p;D(1,0)}}function T0(o,u,l,d,h,p,y,_,b,g,B,T,O,C,x,re,pe,we,P,H){var Oe=I();try{return Y.get(o)(u,l,d,h,p,y,_,b,g,B,T,O,C,x,re,pe,we,P,H)}catch(me){if(S(Oe),me!==me+0&&me!=="longjmp")throw me;D(1,0)}}function I0(o,u,l,d,h,p,y,_,b,g,B,T,O,C,x,re,pe,we,P,H,Oe){var me=I();try{return Y.get(o)(u,l,d,h,p,y,_,b,g,B,T,O,C,x,re,pe,we,P,H,Oe)}catch(at){if(S(me),at!==at+0&&at!=="longjmp")throw at;D(1,0)}}function S0(o,u,l,d){var h=I();try{Y.get(o)(u,l,d)}catch(p){if(S(h),p!==p+0&&p!=="longjmp")throw p;D(1,0)}}function D0(o,u,l,d){var h=I();try{Y.get(o)(u,l,d)}catch(p){if(S(h),p!==p+0&&p!=="longjmp")throw p;D(1,0)}}function O0(o,u,l,d,h,p,y,_,b,g,B,T,O,C){var x=I();try{Y.get(o)(u,l,d,h,p,y,_,b,g,B,T,O,C)}catch(re){if(S(x),re!==re+0&&re!=="longjmp")throw re;D(1,0)}}function A0(o,u,l,d,h,p,y,_,b,g,B,T,O,C,x,re){var pe=I();try{return Y.get(o)(u,l,d,h,p,y,_,b,g,B,T,O,C,x,re)}catch(we){if(S(pe),we!==we+0&&we!=="longjmp")throw we;D(1,0)}}function F0(o,u,l,d,h,p,y,_,b,g){var B=I();try{Y.get(o)(u,l,d,h,p,y,_,b,g)}catch(T){if(S(B),T!==T+0&&T!=="longjmp")throw T;D(1,0)}}function M0(o,u,l){var d=I();try{return Y.get(o)(u,l)}catch(h){if(S(d),h!==h+0&&h!=="longjmp")throw h;D(1,0)}}function U0(o,u,l,d,h,p,y,_,b,g,B){var T=I();try{Y.get(o)(u,l,d,h,p,y,_,b,g,B)}catch(O){if(S(T),O!==O+0&&O!=="longjmp")throw O;D(1,0)}}function C0(o,u){var l=I();try{return Y.get(o)(u)}catch(d){if(S(l),d!==d+0&&d!=="longjmp")throw d;D(1,0)}}function V0(o,u,l){var d=I();try{return Y.get(o)(u,l)}catch(h){if(S(d),h!==h+0&&h!=="longjmp")throw h;D(1,0)}}function k0(o,u,l){var d=I();try{return Y.get(o)(u,l)}catch(h){if(S(d),h!==h+0&&h!=="longjmp")throw h;D(1,0)}}function P0(o,u,l,d){var h=I();try{return Y.get(o)(u,l,d)}catch(p){if(S(h),p!==p+0&&p!=="longjmp")throw p;D(1,0)}}function R0(o,u,l,d,h,p,y,_,b,g){var B=I();try{Y.get(o)(u,l,d,h,p,y,_,b,g)}catch(T){if(S(B),T!==T+0&&T!=="longjmp")throw T;D(1,0)}}function N0(o,u,l,d,h,p,y,_,b,g,B,T){var O=I();try{Y.get(o)(u,l,d,h,p,y,_,b,g,B,T)}catch(C){if(S(O),C!==C+0&&C!=="longjmp")throw C;D(1,0)}}function x0(o,u){var l=I();try{return Y.get(o)(u)}catch(d){if(S(l),d!==d+0&&d!=="longjmp")throw d;D(1,0)}}function E0(o,u){var l=I();try{return Y.get(o)(u)}catch(d){if(S(l),d!==d+0&&d!=="longjmp")throw d;D(1,0)}}function L0(o,u,l,d,h){var p=I();try{return Nd(o,u,l,d,h)}catch(y){if(S(p),y!==y+0&&y!=="longjmp")throw y;D(1,0)}}function q0(o,u,l,d,h,p,y){var _=I();try{$d(o,u,l,d,h,p,y)}catch(b){if(S(_),b!==b+0&&b!=="longjmp")throw b;D(1,0)}}function z0(o,u){var l=I();try{return zd(o,u)}catch(d){if(S(l),d!==d+0&&d!=="longjmp")throw d;D(1,0)}}function W0(o,u,l){var d=I();try{return af(o,u,l)}catch(h){if(S(d),h!==h+0&&h!=="longjmp")throw h;D(1,0)}}function Y0(o,u,l,d,h,p,y){var _=I();try{Ld(o,u,l,d,h,p,y)}catch(b){if(S(_),b!==b+0&&b!=="longjmp")throw b;D(1,0)}}function H0(o,u,l,d,h,p,y){var _=I();try{return xd(o,u,l,d,h,p,y)}catch(b){if(S(_),b!==b+0&&b!=="longjmp")throw b;D(1,0)}}function $0(o,u,l,d,h,p,y,_,b){var g=I();try{return Ed(o,u,l,d,h,p,y,_,b)}catch(B){if(S(g),B!==B+0&&B!=="longjmp")throw B;D(1,0)}}function J0(o,u,l,d){var h=I();try{return Wd(o,u,l,d)}catch(p){if(S(h),p!==p+0&&p!=="longjmp")throw p;D(1,0)}}function K0(o,u,l,d,h,p){var y=I();try{Kd(o,u,l,d,h,p)}catch(_){if(S(y),_!==_+0&&_!=="longjmp")throw _;D(1,0)}}function G0(o){var u=I();try{return qd(o)}catch(l){if(S(u),l!==l+0&&l!=="longjmp")throw l;D(1,0)}}function Q0(o,u,l,d,h){var p=I();try{Yd(o,u,l,d,h)}catch(y){if(S(p),y!==y+0&&y!=="longjmp")throw y;D(1,0)}}function X0(o,u,l,d,h,p,y,_){var b=I();try{Gd(o,u,l,d,h,p,y,_)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;D(1,0)}}function Z0(o,u,l,d,h,p,y){var _=I();try{return Qd(o,u,l,d,h,p,y)}catch(b){if(S(_),b!==b+0&&b!=="longjmp")throw b;D(1,0)}}function eB(o,u,l,d,h,p,y,_){var b=I();try{Hd(o,u,l,d,h,p,y,_)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;D(1,0)}}function tB(o,u,l,d){var h=I();try{sf(o,u,l,d)}catch(p){if(S(h),p!==p+0&&p!=="longjmp")throw p;D(1,0)}}function rB(o,u,l,d,h,p){var y=I();try{Xd(o,u,l,d,h,p)}catch(_){if(S(y),_!==_+0&&_!=="longjmp")throw _;D(1,0)}}function iB(o,u,l,d,h,p,y,_,b,g){var B=I();try{ef(o,u,l,d,h,p,y,_,b,g)}catch(T){if(S(B),T!==T+0&&T!=="longjmp")throw T;D(1,0)}}function nB(o,u,l,d,h){var p=I();try{return tf(o,u,l,d,h)}catch(y){if(S(p),y!==y+0&&y!=="longjmp")throw y;D(1,0)}}function sB(o,u,l,d,h,p,y,_,b){var g=I();try{rf(o,u,l,d,h,p,y,_,b)}catch(B){if(S(g),B!==B+0&&B!=="longjmp")throw B;D(1,0)}}function aB(o,u,l,d){var h=I();try{return nf(o,u,l,d)}catch(p){if(S(h),p!==p+0&&p!=="longjmp")throw p;D(1,0)}}function oB(o,u,l,d,h,p,y,_){var b=I();try{Jd(o,u,l,d,h,p,y,_)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;D(1,0)}}function uB(o,u,l,d,h,p,y,_,b){var g=I();try{sh(o,u,l,d,h,p,y,_,b)}catch(B){if(S(g),B!==B+0&&B!=="longjmp")throw B;D(1,0)}}function cB(o,u,l,d,h){var p=I();try{uf(o,u,l,d,h)}catch(y){if(S(p),y!==y+0&&y!=="longjmp")throw y;D(1,0)}}function lB(o,u,l,d,h){var p=I();try{return Rp(o,u,l,d,h)}catch(y){if(S(p),y!==y+0&&y!=="longjmp")throw y;D(1,0)}}function dB(o,u,l,d,h,p,y,_){var b=I();try{return Np(o,u,l,d,h,p,y,_)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;D(1,0)}}function fB(o,u,l,d,h,p){var y=I();try{of(o,u,l,d,h,p)}catch(_){if(S(y),_!==_+0&&_!=="longjmp")throw _;D(1,0)}}function hB(o,u,l,d,h,p){var y=I();try{return pf(o,u,l,d,h,p)}catch(_){if(S(y),_!==_+0&&_!=="longjmp")throw _;D(1,0)}}function pB(o,u,l,d,h,p,y,_){var b=I();try{return cf(o,u,l,d,h,p,y,_)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;D(1,0)}}function yB(o,u,l,d,h,p,y,_,b){var g=I();try{ff(o,u,l,d,h,p,y,_,b)}catch(B){if(S(g),B!==B+0&&B!=="longjmp")throw B;D(1,0)}}function mB(o,u,l,d,h,p,y,_,b,g,B,T){var O=I();try{df(o,u,l,d,h,p,y,_,b,g,B,T)}catch(C){if(S(O),C!==C+0&&C!=="longjmp")throw C;D(1,0)}}function _B(o,u,l,d,h,p,y,_,b,g){var B=I();try{lf(o,u,l,d,h,p,y,_,b,g)}catch(T){if(S(B),T!==T+0&&T!=="longjmp")throw T;D(1,0)}}function bB(o,u,l,d,h,p,y,_,b){var g=I();try{qh(o,u,l,d,h,p,y,_,b)}catch(B){if(S(g),B!==B+0&&B!=="longjmp")throw B;D(1,0)}}function gB(o,u,l,d,h,p,y,_,b,g,B,T,O){var C=I();try{Ip(o,u,l,d,h,p,y,_,b,g,B,T,O)}catch(x){if(S(C),x!==x+0&&x!=="longjmp")throw x;D(1,0)}}function vB(o,u,l,d,h,p,y,_,b){var g=I();try{vp(o,u,l,d,h,p,y,_,b)}catch(B){if(S(g),B!==B+0&&B!=="longjmp")throw B;D(1,0)}}function jB(o,u,l,d,h,p,y,_){var b=I();try{return tp(o,u,l,d,h,p,y,_)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;D(1,0)}}function wB(o,u,l,d,h,p){var y=I();try{return mf(o,u,l,d,h,p)}catch(_){if(S(y),_!==_+0&&_!=="longjmp")throw _;D(1,0)}}function BB(o,u,l,d,h,p){var y=I();try{return rp(o,u,l,d,h,p)}catch(_){if(S(y),_!==_+0&&_!=="longjmp")throw _;D(1,0)}}function TB(o,u,l,d,h,p,y,_){var b=I();try{return Gf(o,u,l,d,h,p,y,_)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;D(1,0)}}function IB(o,u,l,d,h,p,y){var _=I();try{hf(o,u,l,d,h,p,y)}catch(b){if(S(_),b!==b+0&&b!=="longjmp")throw b;D(1,0)}}function SB(o,u,l,d,h,p,y,_){var b=I();try{return yf(o,u,l,d,h,p,y,_)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;D(1,0)}}function DB(o,u,l,d,h,p,y){var _=I();try{return _f(o,u,l,d,h,p,y)}catch(b){if(S(_),b!==b+0&&b!=="longjmp")throw b;D(1,0)}}function OB(o,u,l,d){var h=I();try{return bf(o,u,l,d)}catch(p){if(S(h),p!==p+0&&p!=="longjmp")throw p;D(1,0)}}function AB(o,u,l,d,h,p,y){var _=I();try{rh(o,u,l,d,h,p,y)}catch(b){if(S(_),b!==b+0&&b!=="longjmp")throw b;D(1,0)}}function FB(o,u,l,d,h,p,y,_){var b=I();try{Qh(o,u,l,d,h,p,y,_)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;D(1,0)}}function MB(o,u,l,d,h,p,y,_){var b=I();try{return Xh(o,u,l,d,h,p,y,_)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;D(1,0)}}function UB(o,u,l,d,h,p,y,_){var b=I();try{Zd(o,u,l,d,h,p,y,_)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;D(1,0)}}function CB(o,u,l,d,h,p,y,_,b,g,B){var T=I();try{Tf(o,u,l,d,h,p,y,_,b,g,B)}catch(O){if(S(T),O!==O+0&&O!=="longjmp")throw O;D(1,0)}}function VB(o,u,l,d,h,p,y,_){var b=I();try{If(o,u,l,d,h,p,y,_)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;D(1,0)}}function kB(o,u,l,d,h,p,y,_,b,g,B,T,O){var C=I();try{Sf(o,u,l,d,h,p,y,_,b,g,B,T,O)}catch(x){if(S(C),x!==x+0&&x!=="longjmp")throw x;D(1,0)}}function PB(o,u,l,d,h,p,y,_,b,g){var B=I();try{Df(o,u,l,d,h,p,y,_,b,g)}catch(T){if(S(B),T!==T+0&&T!=="longjmp")throw T;D(1,0)}}function RB(o,u,l,d,h,p,y,_,b,g,B,T,O){var C=I();try{Af(o,u,l,d,h,p,y,_,b,g,B,T,O)}catch(x){if(S(C),x!==x+0&&x!=="longjmp")throw x;D(1,0)}}function NB(o,u,l,d,h,p,y,_,b,g){var B=I();try{return vf(o,u,l,d,h,p,y,_,b,g)}catch(T){if(S(B),T!==T+0&&T!=="longjmp")throw T;D(1,0)}}function xB(o,u,l,d,h,p,y,_,b,g,B,T){var O=I();try{return jf(o,u,l,d,h,p,y,_,b,g,B,T)}catch(C){if(S(O),C!==C+0&&C!=="longjmp")throw C;D(1,0)}}function EB(o,u,l,d,h,p,y,_,b,g){var B=I();try{return wf(o,u,l,d,h,p,y,_,b,g)}catch(T){if(S(B),T!==T+0&&T!=="longjmp")throw T;D(1,0)}}function LB(o,u,l,d,h,p,y,_,b,g){var B=I();try{return Bf(o,u,l,d,h,p,y,_,b,g)}catch(T){if(S(B),T!==T+0&&T!=="longjmp")throw T;D(1,0)}}function qB(o,u,l,d,h,p,y,_,b,g,B,T){var O=I();try{Ff(o,u,l,d,h,p,y,_,b,g,B,T)}catch(C){if(S(O),C!==C+0&&C!=="longjmp")throw C;D(1,0)}}function zB(o,u,l,d,h,p,y,_,b,g,B,T,O){var C=I();try{Mf(o,u,l,d,h,p,y,_,b,g,B,T,O)}catch(x){if(S(C),x!==x+0&&x!=="longjmp")throw x;D(1,0)}}function WB(o,u,l,d,h,p,y,_,b,g,B,T,O,C,x,re){var pe=I();try{Uf(o,u,l,d,h,p,y,_,b,g,B,T,O,C,x,re)}catch(we){if(S(pe),we!==we+0&&we!=="longjmp")throw we;D(1,0)}}function YB(o,u,l,d,h,p,y,_,b,g,B,T,O,C,x,re,pe,we){var P=I();try{Cf(o,u,l,d,h,p,y,_,b,g,B,T,O,C,x,re,pe,we)}catch(H){if(S(P),H!==H+0&&H!=="longjmp")throw H;D(1,0)}}function HB(o,u,l,d,h,p,y,_,b,g,B,T){var O=I();try{Of(o,u,l,d,h,p,y,_,b,g,B,T)}catch(C){if(S(O),C!==C+0&&C!=="longjmp")throw C;D(1,0)}}function $B(o,u,l,d,h,p){var y=I();try{return xh(o,u,l,d,h,p)}catch(_){if(S(y),_!==_+0&&_!=="longjmp")throw _;D(1,0)}}function JB(o,u,l,d,h,p,y,_,b){var g=I();try{Xf(o,u,l,d,h,p,y,_,b)}catch(B){if(S(g),B!==B+0&&B!=="longjmp")throw B;D(1,0)}}function KB(o,u,l,d,h,p,y,_,b,g,B){var T=I();try{return Eh(o,u,l,d,h,p,y,_,b,g,B)}catch(O){if(S(T),O!==O+0&&O!=="longjmp")throw O;D(1,0)}}function GB(o,u,l,d,h,p,y,_,b){var g=I();try{return Lh(o,u,l,d,h,p,y,_,b)}catch(B){if(S(g),B!==B+0&&B!=="longjmp")throw B;D(1,0)}}function QB(o,u,l,d,h,p,y,_){var b=I();try{return Vf(o,u,l,d,h,p,y,_)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;D(1,0)}}function XB(o,u,l,d,h,p,y,_){var b=I();try{Lf(o,u,l,d,h,p,y,_)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;D(1,0)}}function ZB(o,u,l,d,h,p,y,_,b){var g=I();try{return qf(o,u,l,d,h,p,y,_,b)}catch(B){if(S(g),B!==B+0&&B!=="longjmp")throw B;D(1,0)}}function eT(o,u,l,d,h,p,y){var _=I();try{return kf(o,u,l,d,h,p,y)}catch(b){if(S(_),b!==b+0&&b!=="longjmp")throw b;D(1,0)}}function tT(o,u,l,d,h,p,y){var _=I();try{return Pf(o,u,l,d,h,p,y)}catch(b){if(S(_),b!==b+0&&b!=="longjmp")throw b;D(1,0)}}function rT(o,u,l,d,h,p,y,_){var b=I();try{Rf(o,u,l,d,h,p,y,_)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;D(1,0)}}function iT(o,u,l,d,h,p,y){var _=I();try{return Nf(o,u,l,d,h,p,y)}catch(b){if(S(_),b!==b+0&&b!=="longjmp")throw b;D(1,0)}}function nT(o,u,l,d,h,p,y){var _=I();try{return xf(o,u,l,d,h,p,y)}catch(b){if(S(_),b!==b+0&&b!=="longjmp")throw b;D(1,0)}}function sT(o,u,l,d,h,p,y,_,b,g,B){var T=I();try{return Ef(o,u,l,d,h,p,y,_,b,g,B)}catch(O){if(S(T),O!==O+0&&O!=="longjmp")throw O;D(1,0)}}function aT(o,u,l,d,h,p,y,_,b,g,B,T,O,C,x){var re=I();try{return zf(o,u,l,d,h,p,y,_,b,g,B,T,O,C,x)}catch(pe){if(S(re),pe!==pe+0&&pe!=="longjmp")throw pe;D(1,0)}}function oT(o,u,l,d,h,p,y,_,b,g,B,T){var O=I();try{return Wf(o,u,l,d,h,p,y,_,b,g,B,T)}catch(C){if(S(O),C!==C+0&&C!=="longjmp")throw C;D(1,0)}}function uT(o,u,l,d,h,p,y,_,b){var g=I();try{return Yf(o,u,l,d,h,p,y,_,b)}catch(B){if(S(g),B!==B+0&&B!=="longjmp")throw B;D(1,0)}}function cT(o,u,l){var d=I();try{return Hf(o,u,l)}catch(h){if(S(d),h!==h+0&&h!=="longjmp")throw h;D(1,0)}}function lT(o,u){var l=I();try{return $f(o,u)}catch(d){if(S(l),d!==d+0&&d!=="longjmp")throw d;D(1,0)}}function dT(o,u){var l=I();try{return Jf(o,u)}catch(d){if(S(l),d!==d+0&&d!=="longjmp")throw d;D(1,0)}}function fT(o,u,l,d,h,p,y){var _=I();try{return zh(o,u,l,d,h,p,y)}catch(b){if(S(_),b!==b+0&&b!=="longjmp")throw b;D(1,0)}}function hT(o,u,l,d,h,p,y){var _=I();try{ph(o,u,l,d,h,p,y)}catch(b){if(S(_),b!==b+0&&b!=="longjmp")throw b;D(1,0)}}function pT(o,u,l,d,h,p){var y=I();try{return Uh(o,u,l,d,h,p)}catch(_){if(S(y),_!==_+0&&_!=="longjmp")throw _;D(1,0)}}function yT(o,u,l,d,h,p,y,_,b){var g=I();try{return Zf(o,u,l,d,h,p,y,_,b)}catch(B){if(S(g),B!==B+0&&B!=="longjmp")throw B;D(1,0)}}function mT(o,u,l,d,h,p,y,_,b,g,B){var T=I();try{return eh(o,u,l,d,h,p,y,_,b,g,B)}catch(O){if(S(T),O!==O+0&&O!=="longjmp")throw O;D(1,0)}}function _T(o,u,l,d,h,p,y,_,b,g){var B=I();try{th(o,u,l,d,h,p,y,_,b,g)}catch(T){if(S(B),T!==T+0&&T!=="longjmp")throw T;D(1,0)}}function bT(o,u,l,d,h,p,y,_,b,g){var B=I();try{return Kf(o,u,l,d,h,p,y,_,b,g)}catch(T){if(S(B),T!==T+0&&T!=="longjmp")throw T;D(1,0)}}function gT(o,u,l,d,h,p,y,_,b,g,B,T,O,C,x,re,pe){var we=I();try{Qf(o,u,l,d,h,p,y,_,b,g,B,T,O,C,x,re,pe)}catch(P){if(S(we),P!==P+0&&P!=="longjmp")throw P;D(1,0)}}function vT(o,u,l,d,h,p,y,_,b,g,B,T){var O=I();try{return ih(o,u,l,d,h,p,y,_,b,g,B,T)}catch(C){if(S(O),C!==C+0&&C!=="longjmp")throw C;D(1,0)}}function jT(o,u,l,d,h,p,y,_,b){var g=I();try{nh(o,u,l,d,h,p,y,_,b)}catch(B){if(S(g),B!==B+0&&B!=="longjmp")throw B;D(1,0)}}function wT(o,u,l,d,h,p,y,_,b,g){var B=I();try{return Ch(o,u,l,d,h,p,y,_,b,g)}catch(T){if(S(B),T!==T+0&&T!=="longjmp")throw T;D(1,0)}}function BT(o,u,l,d,h,p,y,_,b,g){var B=I();try{ah(o,u,l,d,h,p,y,_,b,g)}catch(T){if(S(B),T!==T+0&&T!=="longjmp")throw T;D(1,0)}}function TT(o,u,l,d,h,p,y,_){var b=I();try{return lh(o,u,l,d,h,p,y,_)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;D(1,0)}}function IT(o,u,l,d,h,p,y,_,b,g,B,T,O){var C=I();try{return dh(o,u,l,d,h,p,y,_,b,g,B,T,O)}catch(x){if(S(C),x!==x+0&&x!=="longjmp")throw x;D(1,0)}}function ST(o,u,l,d,h,p,y,_,b,g,B){var T=I();try{return oh(o,u,l,d,h,p,y,_,b,g,B)}catch(O){if(S(T),O!==O+0&&O!=="longjmp")throw O;D(1,0)}}function DT(o,u,l,d,h,p,y,_,b,g,B,T){var O=I();try{uh(o,u,l,d,h,p,y,_,b,g,B,T)}catch(C){if(S(O),C!==C+0&&C!=="longjmp")throw C;D(1,0)}}function OT(o,u,l,d,h,p,y,_,b,g,B){var T=I();try{ch(o,u,l,d,h,p,y,_,b,g,B)}catch(O){if(S(T),O!==O+0&&O!=="longjmp")throw O;D(1,0)}}function AT(o,u,l,d,h,p,y,_,b){var g=I();try{fh(o,u,l,d,h,p,y,_,b)}catch(B){if(S(g),B!==B+0&&B!=="longjmp")throw B;D(1,0)}}function FT(o,u,l,d,h,p,y,_){var b=I();try{return hh(o,u,l,d,h,p,y,_)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;D(1,0)}}function MT(o,u,l,d,h,p,y,_,b){var g=I();try{return Vh(o,u,l,d,h,p,y,_,b)}catch(B){if(S(g),B!==B+0&&B!=="longjmp")throw B;D(1,0)}}function UT(o,u,l,d,h,p,y,_,b,g,B,T,O,C){var x=I();try{return kh(o,u,l,d,h,p,y,_,b,g,B,T,O,C)}catch(re){if(S(x),re!==re+0&&re!=="longjmp")throw re;D(1,0)}}function CT(o,u,l,d,h,p,y,_,b,g,B){var T=I();try{jh(o,u,l,d,h,p,y,_,b,g,B)}catch(O){if(S(T),O!==O+0&&O!=="longjmp")throw O;D(1,0)}}function VT(o,u,l){var d=I();try{return _h(o,u,l)}catch(h){if(S(d),h!==h+0&&h!=="longjmp")throw h;D(1,0)}}function kT(o,u,l,d,h){var p=I();try{return Bh(o,u,l,d,h)}catch(y){if(S(p),y!==y+0&&y!=="longjmp")throw y;D(1,0)}}function PT(o,u,l,d,h,p,y){var _=I();try{vh(o,u,l,d,h,p,y)}catch(b){if(S(_),b!==b+0&&b!=="longjmp")throw b;D(1,0)}}function RT(o,u,l,d){var h=I();try{return gf(o,u,l,d)}catch(p){if(S(h),p!==p+0&&p!=="longjmp")throw p;D(1,0)}}function NT(o,u,l,d,h,p,y,_,b,g,B,T,O,C,x){var re=I();try{mh(o,u,l,d,h,p,y,_,b,g,B,T,O,C,x)}catch(pe){if(S(re),pe!==pe+0&&pe!=="longjmp")throw pe;D(1,0)}}function xT(o,u,l,d,h){var p=I();try{return bh(o,u,l,d,h)}catch(y){if(S(p),y!==y+0&&y!=="longjmp")throw y;D(1,0)}}function ET(o,u,l,d,h){var p=I();try{gh(o,u,l,d,h)}catch(y){if(S(p),y!==y+0&&y!=="longjmp")throw y;D(1,0)}}function LT(o,u,l,d,h,p,y){var _=I();try{wh(o,u,l,d,h,p,y)}catch(b){if(S(_),b!==b+0&&b!=="longjmp")throw b;D(1,0)}}function qT(o,u,l,d,h,p,y,_,b,g){var B=I();try{return Th(o,u,l,d,h,p,y,_,b,g)}catch(T){if(S(B),T!==T+0&&T!=="longjmp")throw T;D(1,0)}}function zT(o,u,l,d,h,p,y,_,b,g){var B=I();try{return Ih(o,u,l,d,h,p,y,_,b,g)}catch(T){if(S(B),T!==T+0&&T!=="longjmp")throw T;D(1,0)}}function WT(o,u,l,d,h,p,y,_,b,g){var B=I();try{Sh(o,u,l,d,h,p,y,_,b,g)}catch(T){if(S(B),T!==T+0&&T!=="longjmp")throw T;D(1,0)}}function YT(o,u,l,d,h,p,y,_,b,g){var B=I();try{Dh(o,u,l,d,h,p,y,_,b,g)}catch(T){if(S(B),T!==T+0&&T!=="longjmp")throw T;D(1,0)}}function HT(o,u,l,d,h,p,y){var _=I();try{return Fh(o,u,l,d,h,p,y)}catch(b){if(S(_),b!==b+0&&b!=="longjmp")throw b;D(1,0)}}function $T(o,u,l,d,h,p){var y=I();try{return sp(o,u,l,d,h,p)}catch(_){if(S(y),_!==_+0&&_!=="longjmp")throw _;D(1,0)}}function JT(o,u,l,d,h,p,y,_,b,g,B){var T=I();try{Oh(o,u,l,d,h,p,y,_,b,g,B)}catch(O){if(S(T),O!==O+0&&O!=="longjmp")throw O;D(1,0)}}function KT(o,u,l,d,h,p,y,_,b,g,B){var T=I();try{Ah(o,u,l,d,h,p,y,_,b,g,B)}catch(O){if(S(T),O!==O+0&&O!=="longjmp")throw O;D(1,0)}}function GT(o,u,l,d,h){var p=I();try{return Mh(o,u,l,d,h)}catch(y){if(S(p),y!==y+0&&y!=="longjmp")throw y;D(1,0)}}function QT(o,u,l,d,h,p,y,_,b,g){var B=I();try{return Ph(o,u,l,d,h,p,y,_,b,g)}catch(T){if(S(B),T!==T+0&&T!=="longjmp")throw T;D(1,0)}}function XT(o,u,l,d,h,p,y,_,b){var g=I();try{return Rh(o,u,l,d,h,p,y,_,b)}catch(B){if(S(g),B!==B+0&&B!=="longjmp")throw B;D(1,0)}}function ZT(o,u,l,d,h,p,y,_,b,g){var B=I();try{return Nh(o,u,l,d,h,p,y,_,b,g)}catch(T){if(S(B),T!==T+0&&T!=="longjmp")throw T;D(1,0)}}function eI(o,u,l,d,h,p,y,_){var b=I();try{return Wh(o,u,l,d,h,p,y,_)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;D(1,0)}}function tI(o,u,l,d,h,p,y,_,b){var g=I();try{return Yh(o,u,l,d,h,p,y,_,b)}catch(B){if(S(g),B!==B+0&&B!=="longjmp")throw B;D(1,0)}}function rI(o,u,l,d,h,p,y,_,b){var g=I();try{return Hh(o,u,l,d,h,p,y,_,b)}catch(B){if(S(g),B!==B+0&&B!=="longjmp")throw B;D(1,0)}}function iI(o,u,l,d,h,p,y,_,b){var g=I();try{return $h(o,u,l,d,h,p,y,_,b)}catch(B){if(S(g),B!==B+0&&B!=="longjmp")throw B;D(1,0)}}function nI(o,u,l,d,h,p,y,_,b,g){var B=I();try{return Jh(o,u,l,d,h,p,y,_,b,g)}catch(T){if(S(B),T!==T+0&&T!=="longjmp")throw T;D(1,0)}}function sI(o,u,l,d,h,p,y){var _=I();try{return Gh(o,u,l,d,h,p,y)}catch(b){if(S(_),b!==b+0&&b!=="longjmp")throw b;D(1,0)}}function aI(o,u,l,d,h){var p=I();try{return Kh(o,u,l,d,h)}catch(y){if(S(p),y!==y+0&&y!=="longjmp")throw y;D(1,0)}}function oI(o,u,l,d,h,p,y){var _=I();try{Zh(o,u,l,d,h,p,y)}catch(b){if(S(_),b!==b+0&&b!=="longjmp")throw b;D(1,0)}}function uI(o,u,l,d,h,p,y,_,b){var g=I();try{return ep(o,u,l,d,h,p,y,_,b)}catch(B){if(S(g),B!==B+0&&B!=="longjmp")throw B;D(1,0)}}function cI(o,u,l,d,h,p,y,_,b){var g=I();try{ip(o,u,l,d,h,p,y,_,b)}catch(B){if(S(g),B!==B+0&&B!=="longjmp")throw B;D(1,0)}}function lI(o,u,l,d,h,p,y,_,b){var g=I();try{return np(o,u,l,d,h,p,y,_,b)}catch(B){if(S(g),B!==B+0&&B!=="longjmp")throw B;D(1,0)}}function dI(o,u,l,d,h,p,y,_,b){var g=I();try{cp(o,u,l,d,h,p,y,_,b)}catch(B){if(S(g),B!==B+0&&B!=="longjmp")throw B;D(1,0)}}function fI(o,u,l,d,h,p,y,_,b,g,B){var T=I();try{up(o,u,l,d,h,p,y,_,b,g,B)}catch(O){if(S(T),O!==O+0&&O!=="longjmp")throw O;D(1,0)}}function hI(o,u,l,d,h,p){var y=I();try{return gp(o,u,l,d,h,p)}catch(_){if(S(y),_!==_+0&&_!=="longjmp")throw _;D(1,0)}}function pI(o,u,l,d,h,p,y,_,b,g,B,T){var O=I();try{op(o,u,l,d,h,p,y,_,b,g,B,T)}catch(C){if(S(O),C!==C+0&&C!=="longjmp")throw C;D(1,0)}}function yI(o,u,l,d,h,p,y,_,b){var g=I();try{return lp(o,u,l,d,h,p,y,_,b)}catch(B){if(S(g),B!==B+0&&B!=="longjmp")throw B;D(1,0)}}function mI(o,u,l,d,h,p,y,_,b,g,B,T,O,C,x){var re=I();try{return ap(o,u,l,d,h,p,y,_,b,g,B,T,O,C,x)}catch(pe){if(S(re),pe!==pe+0&&pe!=="longjmp")throw pe;D(1,0)}}function _I(o,u,l,d,h,p,y,_,b){var g=I();try{return dp(o,u,l,d,h,p,y,_,b)}catch(B){if(S(g),B!==B+0&&B!=="longjmp")throw B;D(1,0)}}function bI(o,u,l,d,h,p,y,_){var b=I();try{return fp(o,u,l,d,h,p,y,_)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;D(1,0)}}function gI(o,u,l,d,h,p){var y=I();try{hp(o,u,l,d,h,p)}catch(_){if(S(y),_!==_+0&&_!=="longjmp")throw _;D(1,0)}}function vI(o,u,l,d,h,p,y,_,b){var g=I();try{pp(o,u,l,d,h,p,y,_,b)}catch(B){if(S(g),B!==B+0&&B!=="longjmp")throw B;D(1,0)}}function jI(o,u,l,d,h,p,y,_,b,g){var B=I();try{_p(o,u,l,d,h,p,y,_,b,g)}catch(T){if(S(B),T!==T+0&&T!=="longjmp")throw T;D(1,0)}}function wI(o,u,l,d,h,p,y){var _=I();try{return mp(o,u,l,d,h,p,y)}catch(b){if(S(_),b!==b+0&&b!=="longjmp")throw b;D(1,0)}}function BI(o,u,l,d,h,p,y,_,b,g){var B=I();try{bp(o,u,l,d,h,p,y,_,b,g)}catch(T){if(S(B),T!==T+0&&T!=="longjmp")throw T;D(1,0)}}function TI(o,u,l,d,h,p,y,_,b){var g=I();try{return yp(o,u,l,d,h,p,y,_,b)}catch(B){if(S(g),B!==B+0&&B!=="longjmp")throw B;D(1,0)}}function II(o,u,l,d,h,p,y){var _=I();try{wp(o,u,l,d,h,p,y)}catch(b){if(S(_),b!==b+0&&b!=="longjmp")throw b;D(1,0)}}function SI(o,u,l,d,h,p,y,_,b,g,B){var T=I();try{return Bp(o,u,l,d,h,p,y,_,b,g,B)}catch(O){if(S(T),O!==O+0&&O!=="longjmp")throw O;D(1,0)}}function DI(o,u,l,d,h,p,y,_){var b=I();try{return Tp(o,u,l,d,h,p,y,_)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;D(1,0)}}function OI(o,u,l,d,h,p,y,_,b){var g=I();try{Sp(o,u,l,d,h,p,y,_,b)}catch(B){if(S(g),B!==B+0&&B!=="longjmp")throw B;D(1,0)}}function AI(o,u,l,d,h){var p=I();try{return Rd(o,u,l,d,h)}catch(y){if(S(p),y!==y+0&&y!=="longjmp")throw y;D(1,0)}}function FI(o,u,l,d,h,p,y,_){var b=I();try{return Dp(o,u,l,d,h,p,y,_)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;D(1,0)}}function MI(o,u,l,d,h,p,y,_,b){var g=I();try{Op(o,u,l,d,h,p,y,_,b)}catch(B){if(S(g),B!==B+0&&B!=="longjmp")throw B;D(1,0)}}function UI(o,u,l,d,h,p,y,_){var b=I();try{return Ap(o,u,l,d,h,p,y,_)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;D(1,0)}}function CI(o,u,l,d,h,p,y,_,b){var g=I();try{Fp(o,u,l,d,h,p,y,_,b)}catch(B){if(S(g),B!==B+0&&B!=="longjmp")throw B;D(1,0)}}function VI(o,u,l,d,h,p,y){var _=I();try{return Mp(o,u,l,d,h,p,y)}catch(b){if(S(_),b!==b+0&&b!=="longjmp")throw b;D(1,0)}}function kI(o,u,l,d,h,p,y,_){var b=I();try{return Up(o,u,l,d,h,p,y,_)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;D(1,0)}}function PI(o,u,l,d,h,p,y,_,b,g){var B=I();try{Cp(o,u,l,d,h,p,y,_,b,g)}catch(T){if(S(B),T!==T+0&&T!=="longjmp")throw T;D(1,0)}}function RI(o,u,l,d,h,p,y,_,b){var g=I();try{Vp(o,u,l,d,h,p,y,_,b)}catch(B){if(S(g),B!==B+0&&B!=="longjmp")throw B;D(1,0)}}function NI(o,u,l,d,h,p,y,_,b){var g=I();try{kp(o,u,l,d,h,p,y,_,b)}catch(B){if(S(g),B!==B+0&&B!=="longjmp")throw B;D(1,0)}}function xI(o,u,l,d,h,p,y,_){var b=I();try{Pp(o,u,l,d,h,p,y,_)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;D(1,0)}}function EI(o,u,l,d,h,p,y,_,b,g,B,T){var O=I();try{xp(o,u,l,d,h,p,y,_,b,g,B,T)}catch(C){if(S(O),C!==C+0&&C!=="longjmp")throw C;D(1,0)}}function LI(o,u,l,d,h,p){var y=I();try{return yh(o,u,l,d,h,p)}catch(_){if(S(y),_!==_+0&&_!=="longjmp")throw _;D(1,0)}}function qI(o,u,l,d,h,p,y,_,b,g){var B=I();try{Lp(o,u,l,d,h,p,y,_,b,g)}catch(T){if(S(B),T!==T+0&&T!=="longjmp")throw T;D(1,0)}}function zI(o,u,l,d,h,p,y,_,b,g,B){var T=I();try{return qp(o,u,l,d,h,p,y,_,b,g,B)}catch(O){if(S(T),O!==O+0&&O!=="longjmp")throw O;D(1,0)}}function WI(o,u,l,d,h,p,y,_,b,g,B,T,O){var C=I();try{Ep(o,u,l,d,h,p,y,_,b,g,B,T,O)}catch(x){if(S(C),x!==x+0&&x!=="longjmp")throw x;D(1,0)}}function YI(o,u,l,d,h,p,y,_,b,g,B){var T=I();try{jp(o,u,l,d,h,p,y,_,b,g,B)}catch(O){if(S(T),O!==O+0&&O!=="longjmp")throw O;D(1,0)}}function HI(o,u,l,d,h,p,y,_,b,g,B,T,O){var C=I();try{zp(o,u,l,d,h,p,y,_,b,g,B,T,O)}catch(x){if(S(C),x!==x+0&&x!=="longjmp")throw x;D(1,0)}}function $I(o,u,l,d,h,p,y,_,b,g){var B=I();try{return Wp(o,u,l,d,h,p,y,_,b,g)}catch(T){if(S(B),T!==T+0&&T!=="longjmp")throw T;D(1,0)}}function JI(o,u,l,d,h,p,y,_,b,g){var B=I();try{return Qp(o,u,l,d,h,p,y,_,b,g)}catch(T){if(S(B),T!==T+0&&T!=="longjmp")throw T;D(1,0)}}function KI(o,u,l,d,h,p,y,_,b,g,B,T,O){var C=I();try{Yp(o,u,l,d,h,p,y,_,b,g,B,T,O)}catch(x){if(S(C),x!==x+0&&x!=="longjmp")throw x;D(1,0)}}function GI(o,u,l,d,h,p,y,_,b,g){var B=I();try{Hp(o,u,l,d,h,p,y,_,b,g)}catch(T){if(S(B),T!==T+0&&T!=="longjmp")throw T;D(1,0)}}function QI(o,u,l,d,h,p){var y=I();try{return $p(o,u,l,d,h,p)}catch(_){if(S(y),_!==_+0&&_!=="longjmp")throw _;D(1,0)}}function XI(o,u,l,d,h,p,y,_,b,g,B,T,O,C){var x=I();try{Kp(o,u,l,d,h,p,y,_,b,g,B,T,O,C)}catch(re){if(S(x),re!==re+0&&re!=="longjmp")throw re;D(1,0)}}function ZI(o,u,l,d,h,p,y,_,b,g,B){var T=I();try{Gp(o,u,l,d,h,p,y,_,b,g,B)}catch(O){if(S(T),O!==O+0&&O!=="longjmp")throw O;D(1,0)}}function e1(o,u,l,d,h,p,y,_,b,g){var B=I();try{Jp(o,u,l,d,h,p,y,_,b,g)}catch(T){if(S(B),T!==T+0&&T!=="longjmp")throw T;D(1,0)}}function t1(o,u,l,d,h,p,y,_,b){var g=I();try{ry(o,u,l,d,h,p,y,_,b)}catch(B){if(S(g),B!==B+0&&B!=="longjmp")throw B;D(1,0)}}function r1(o,u,l,d,h,p,y,_){var b=I();try{return Zp(o,u,l,d,h,p,y,_)}catch(g){if(S(b),g!==g+0&&g!=="longjmp")throw g;D(1,0)}}function i1(o,u,l,d,h,p,y,_,b,g,B){var T=I();try{return ey(o,u,l,d,h,p,y,_,b,g,B)}catch(O){if(S(T),O!==O+0&&O!=="longjmp")throw O;D(1,0)}}function n1(o,u,l,d,h,p,y,_,b,g,B){var T=I();try{return Xp(o,u,l,d,h,p,y,_,b,g,B)}catch(O){if(S(T),O!==O+0&&O!=="longjmp")throw O;D(1,0)}}function s1(o,u,l,d,h,p,y,_,b,g,B,T){var O=I();try{return ty(o,u,l,d,h,p,y,_,b,g,B,T)}catch(C){if(S(O),C!==C+0&&C!=="longjmp")throw C;D(1,0)}}t.ccall=_v;var ks;function Ps(o){this.name="ExitStatus",this.message="Program terminated with exit("+o+")",this.status=o}var a1=!1;Un=function o(){ks||Zo(),ks||(Un=o)};function o1(o){var u=t._main,l=0,d=0;try{var h=u(l,d);return u1(h,!0),h}catch(p){return Wv(p)}finally{a1=!0}}function Zo(o){if(o=o||f,si>0||(Mv(),si>0))return;function u(){ks||(ks=!0,t.calledRun=!0,!Wo&&(Uv(),Cv(),i(t),t.onRuntimeInitialized&&t.onRuntimeInitialized(),iy&&o1(o),kv()))}t.setStatus?(t.setStatus("Running..."),setTimeout(function(){setTimeout(function(){t.setStatus("")},1),u()},1)):u()}t.run=Zo;function u1(o,u){Is=o,Yo()||Vv(),c1(o)}function c1(o){Is=o,Yo()||(t.onExit&&t.onExit(o),Wo=!0),s(o,new Ps(o))}if(t.preInit)for(typeof t.preInit=="function"&&(t.preInit=[t.preInit]);t.preInit.length>0;)t.preInit.pop()();var iy=!0;return t.noInitialRun&&(iy=!1),Zo(),e.ready}}(),uv=hC;var vd=class extends qo{constructor(e,t,i,n){super(e,t);this.mainModuleURL=i,this.pthreadWorkerURL=n}locateFile(e,t){if(e.endsWith(".wasm"))return this.mainModuleURL;if(e.endsWith(".worker.js")){if(!this.pthreadWorkerURL)throw new Error("Missing DuckDB worker URL!");return this.pthreadWorkerURL}throw new Error(`WASM instantiation requested unexpected file: prefix=${t} path=${e}`)}instantiateWasm(e,t){return globalThis.DUCKDB_RUNTIME=this._runtime,WebAssembly.instantiateStreaming?WebAssembly.instantiateStreaming(fetch(this.mainModuleURL),e).then(i=>{t(i.instance,i.module)}):fetch(this.mainModuleURL).then(i=>i.arrayBuffer()).then(i=>WebAssembly.instantiate(i,e).then(n=>{t(n.instance,n.module)})).catch(i=>{console.error("Failed to instantiate WASM:",i)}),[]}};var lv=class extends vd{constructor(e,t,i,n=null){super(e,t,i,n)}instantiateImpl(e){return uv({...e,instantiateWasm:this.instantiateWasm.bind(this),locateFile:this.locateFile.bind(this)})}};var it={fileInfoCache:new Map,getFileInfo(r,e){try{let t=it.fileInfoCache.get(e);if(t)return t;let[i,n,a]=Te(r,"duckdb_web_fs_get_file_info",["number"],[e]);if(i!==ve.SUCCESS)throw new Error(ge(r,n,a));let c=ge(r,n,a);qe(r);let f=JSON.parse(c);if(f==null)return null;let w={...f,blob:null};return it.fileInfoCache.set(e,w),w}catch(t){return Le(r,t.toString()),null}},testPlatformFeature:(r,e)=>{switch(e){case 1:return typeof BigInt64Array!="undefined";default:return console.warn(`test for unknown feature: ${e}`),!1}},openFile:(r,e)=>{try{it.fileInfoCache.delete(e);let t=it.getFileInfo(r,e);switch(t?.data_protocol){case Qe.HTTP:{let i=new XMLHttpRequest;i.open("HEAD",t.data_url,!1),i.setRequestHeader("Range","bytes=0-"),i.send(null);let n=!1;if(i.status==206?n=!0:i.status==200&&(n=i.getResponseHeader("Accept-Ranges")==="bytes"),!n)return Le(r,`File does not support range requests: ${t.file_name}`),0;break}case Qe.NATIVE:{if(!it._files?.get(t.file_name))return Le(r,`No handle available for file: ${t.file_name}`),0;break}}}catch(t){Le(r,t.toString())}return 0},glob:(r,e,t)=>{try{let i=ge(r,e,t);if(i.startsWith("http")){let n=new XMLHttpRequest;n.open("HEAD",i,!1),n.setRequestHeader("Range","bytes=0-"),n.send(null);let a=!1;if(n.status==206)a=!0;else if(n.status==200)a=n.getResponseHeader("Accept-Ranges")==="bytes";else{Le(r,`HEAD request failed: ${i}`);return}if(!a){Le(r,`File does not support range requests: ${i}`);return}r.ccall("duckdb_web_fs_glob_add_path",null,["string"],[i])}}catch(i){return Le(r,i.toString()),0}},checkFile:(r,e,t)=>{try{let i=ge(r,e,t);if(i.startsWith("http")){let n=new XMLHttpRequest;n.open("HEAD",i,!1),n.setRequestHeader("Range","bytes=0-"),n.send(null);let a=!1;if(n.status==206)a=!0;else if(n.status==200)a=n.getResponseHeader("Accept-Ranges")==="bytes";else return!1;return!!a}}catch{return!1}return!1},syncFile:(r,e)=>{},closeFile:(r,e)=>{let t=it.getFileInfo(r,e);switch(it.fileInfoCache.delete(e),t?.data_protocol){case Qe.HTTP:break;case Qe.NATIVE:return}},truncateFile:(r,e,t)=>{switch(it.getFileInfo(r,e)?.data_protocol){case Qe.HTTP:Le(r,"Cannot truncate a http file");return;case Qe.NATIVE:Le(r,"truncateFile not implemented");return}return 0},readFile(r,e,t,i,n){try{let a=it.getFileInfo(r,e);switch(a?.data_protocol){case Qe.HTTP:{if(!a.data_url)return Le(r,`Missing data URL for file ${e}`),0;let c=new XMLHttpRequest;if(c.open("GET",a.data_url,!1),c.responseType="arraybuffer",c.setRequestHeader("Range",`bytes=${n}-${n+i-1}`),c.send(null),c.status==206||c.status==200&&i==c.response.byteLength&&n==0){let f=new Uint8Array(c.response,0,Math.min(c.response.byteLength,i));return r.HEAPU8.set(f,t),f.byteLength}else return c.status==200?(Le(r,`Range request for ${a.data_url} did not return a partial response: ${c.status} "${c.statusText}"`),0):(Le(r,`Range request for ${a.data_url} did returned non-success status: ${c.status} "${c.statusText}"`),0)}case Qe.NATIVE:{let c=it._files?.get(a.file_name);if(!c)return Le(r,`No handle available for file: ${a.file_name}`),0;let f=c.slice(n,n+i),w=new Uint8Array(new FileReaderSync().readAsArrayBuffer(f));return r.HEAPU8.set(w,t),w.byteLength}}return 0}catch(a){return Le(r,a.toString()),0}},writeFile:(r,e,t,i,n)=>{switch(it.getFileInfo(r,e)?.data_protocol){case Qe.HTTP:return Le(r,"Cannot write to HTTP file"),0;case Qe.NATIVE:return Le(r,"writefile not implemented"),0}return 0},getFileSize:(r,e)=>{try{let t=it.getFileInfo(r,e);switch(t?.data_protocol){case Qe.NATIVE:{let i=it._files?.get(t.file_name);return i?i.size:(Le(r,`No handle available for file: ${t.file_name}`),0)}case Qe.HTTP:{if(!t.data_url)throw new Error(`Missing data URL for file ${e}`);let i=new XMLHttpRequest;if(i.open("HEAD",t.data_url,!1),i.send(null),i.status==200){let n=i.getResponseHeader("Content-Length");if(n)return parseInt(n);throw Error(`HEAD ${t.data_url} does not contain the HTTP header: Content-Length`)}else throw Error(`HEAD ${t.data_url} returned non-success status: ${i.status} "${i.statusText}"`)}}return 0}catch(t){return Le(r,t.toString()),0}},getLastFileModificationTime:(r,e)=>{let t=it.getFileInfo(r,e);switch(t?.data_protocol){case Qe.NATIVE:{if(!it._files?.get(t.file_name))throw Error(`No handle available for file: ${t.file_name}`);return 0}case Qe.HTTP:return new Date().getTime()}return 0},checkDirectory:(r,e,t)=>!1,createDirectory:(r,e,t)=>{},removeDirectory:(r,e,t)=>{},listDirectoryEntries:(r,e,t)=>!1,moveFile:(r,e,t,i,n)=>{},removeFile:(r,e,t)=>{}};return pC;})();
|
|
19
|
-
//# sourceMappingURL=duckdb-browser-sync.js.map
|