@duckdb/duckdb-wasm 0.0.41-dev330.0 → 0.0.41-dev347.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/duckdb-browser-async-next-coi.pthread.worker.js +3 -3
- package/dist/duckdb-browser-async-next-coi.pthread.worker.js.map +2 -2
- package/dist/duckdb-browser-async-next-coi.worker.js +7 -7
- package/dist/duckdb-browser-async-next-coi.worker.js.map +2 -2
- package/dist/duckdb-browser-async-next.worker.js +7 -7
- package/dist/duckdb-browser-async-next.worker.js.map +2 -2
- package/dist/duckdb-browser-async.js +1 -1
- package/dist/duckdb-browser-async.worker.js +7 -7
- package/dist/duckdb-browser-async.worker.js.map +2 -2
- package/dist/duckdb-browser-sync-next.js +6 -6
- package/dist/duckdb-browser-sync-next.js.map +2 -2
- package/dist/duckdb-browser-sync.js +4 -4
- package/dist/duckdb-browser-sync.js.map +2 -2
- package/dist/duckdb-esm.js +1 -1
- package/dist/duckdb-next-coi.wasm +0 -0
- package/dist/duckdb-next.wasm +0 -0
- package/dist/duckdb-node-async-next.worker.js +3 -3
- package/dist/duckdb-node-async-next.worker.js.map +2 -2
- package/dist/duckdb-node-async.js +1 -1
- package/dist/duckdb-node-async.worker.js +2 -2
- package/dist/duckdb-node-async.worker.js.map +2 -2
- package/dist/duckdb-node-sync-next.js +3 -3
- package/dist/duckdb-node-sync-next.js.map +2 -2
- package/dist/duckdb-node-sync.js +2 -2
- package/dist/duckdb-node-sync.js.map +2 -2
- package/dist/duckdb.wasm +0 -0
- package/dist/tests-browser.js +281 -273
- package/dist/tests-browser.js.map +2 -2
- package/dist/tests-node.js +89 -89
- package/dist/tests-node.js.map +2 -2
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
var duckdb=(()=>{var jS=Object.create;var io=Object.defineProperty;var wS=Object.getOwnPropertyDescriptor;var BS=Object.getOwnPropertyNames;var TS=Object.getPrototypeOf,IS=Object.prototype.hasOwnProperty;var Sy=r=>io(r,"__esModule",{value:!0});var V=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),SS=(r,e)=>{Sy(r);for(var t in e)io(r,t,{get:e[t],enumerable:!0})},DS=(r,e,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of BS(e))!IS.call(r,i)&&i!=="default"&&io(r,i,{get:()=>e[i],enumerable:!(t=wS(e,i))||t.enumerable});return r},Dy=r=>DS(Sy(io(r!=null?jS(TS(r)):{},"default",r&&r.__esModule&&"default"in r?{get:()=>r.default,enumerable:!0}:{value:r,enumerable:!0})),r);var gr=V(Fy=>{var A={};A.Offset;A.Table;A.SIZEOF_SHORT=2;A.SIZEOF_INT=4;A.FILE_IDENTIFIER_LENGTH=4;A.SIZE_PREFIX_LENGTH=4;A.Encoding={UTF8_BYTES:1,UTF16_STRING:2};A.int32=new Int32Array(2);A.float32=new Float32Array(A.int32.buffer);A.float64=new Float64Array(A.int32.buffer);A.isLittleEndian=new Uint16Array(new Uint8Array([1,0]).buffer)[0]===1;A.Long=function(r,e){this.low=r|0,this.high=e|0};A.Long.create=function(r,e){return r==0&&e==0?A.Long.ZERO:new A.Long(r,e)};A.Long.prototype.toFloat64=function(){return(this.low>>>0)+this.high*4294967296};A.Long.prototype.equals=function(r){return this.low==r.low&&this.high==r.high};A.Long.ZERO=new A.Long(0,0);A.Builder=function(r){if(r)var e=r;else var e=1024;this.bb=A.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};A.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};A.Builder.prototype.forceDefaults=function(r){this.force_defaults=r};A.Builder.prototype.dataBuffer=function(){return this.bb};A.Builder.prototype.asUint8Array=function(){return this.bb.bytes().subarray(this.bb.position(),this.bb.position()+this.offset())};A.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=A.Builder.growByteBuffer(this.bb),this.space+=this.bb.capacity()-i}this.pad(t)};A.Builder.prototype.pad=function(r){for(var e=0;e<r;e++)this.bb.writeInt8(--this.space,0)};A.Builder.prototype.writeInt8=function(r){this.bb.writeInt8(this.space-=1,r)};A.Builder.prototype.writeInt16=function(r){this.bb.writeInt16(this.space-=2,r)};A.Builder.prototype.writeInt32=function(r){this.bb.writeInt32(this.space-=4,r)};A.Builder.prototype.writeInt64=function(r){this.bb.writeInt64(this.space-=8,r)};A.Builder.prototype.writeFloat32=function(r){this.bb.writeFloat32(this.space-=4,r)};A.Builder.prototype.writeFloat64=function(r){this.bb.writeFloat64(this.space-=8,r)};A.Builder.prototype.addInt8=function(r){this.prep(1,0),this.writeInt8(r)};A.Builder.prototype.addInt16=function(r){this.prep(2,0),this.writeInt16(r)};A.Builder.prototype.addInt32=function(r){this.prep(4,0),this.writeInt32(r)};A.Builder.prototype.addInt64=function(r){this.prep(8,0),this.writeInt64(r)};A.Builder.prototype.addFloat32=function(r){this.prep(4,0),this.writeFloat32(r)};A.Builder.prototype.addFloat64=function(r){this.prep(8,0),this.writeFloat64(r)};A.Builder.prototype.addFieldInt8=function(r,e,t){(this.force_defaults||e!=t)&&(this.addInt8(e),this.slot(r))};A.Builder.prototype.addFieldInt16=function(r,e,t){(this.force_defaults||e!=t)&&(this.addInt16(e),this.slot(r))};A.Builder.prototype.addFieldInt32=function(r,e,t){(this.force_defaults||e!=t)&&(this.addInt32(e),this.slot(r))};A.Builder.prototype.addFieldInt64=function(r,e,t){(this.force_defaults||!e.equals(t))&&(this.addInt64(e),this.slot(r))};A.Builder.prototype.addFieldFloat32=function(r,e,t){(this.force_defaults||e!=t)&&(this.addFloat32(e),this.slot(r))};A.Builder.prototype.addFieldFloat64=function(r,e,t){(this.force_defaults||e!=t)&&(this.addFloat64(e),this.slot(r))};A.Builder.prototype.addFieldOffset=function(r,e,t){(this.force_defaults||e!=t)&&(this.addOffset(e),this.slot(r))};A.Builder.prototype.addFieldStruct=function(r,e,t){e!=t&&(this.nested(e),this.slot(r))};A.Builder.prototype.nested=function(r){if(r!=this.offset())throw new Error("FlatBuffers: struct must be serialized inline.")};A.Builder.prototype.notNested=function(){if(this.isNested)throw new Error("FlatBuffers: object serialization must not be nested.")};A.Builder.prototype.slot=function(r){this.vtable[r]=this.offset()};A.Builder.prototype.offset=function(){return this.bb.capacity()-this.space};A.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=A.ByteBuffer.allocate(t);return i.setPosition(t-e),i.bytes().set(r.bytes(),t-e),i};A.Builder.prototype.addOffset=function(r){this.prep(A.SIZEOF_INT,0),this.writeInt32(this.offset()-r+A.SIZEOF_INT)};A.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()};A.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)*A.SIZEOF_SHORT;this.addInt16(n);var s=0,c=this.space;e:for(e=0;e<this.vtables.length;e++){var v=this.bb.capacity()-this.vtables[e];if(n==this.bb.readInt16(v)){for(var I=A.SIZEOF_SHORT;I<n;I+=A.SIZEOF_SHORT)if(this.bb.readInt16(c+I)!=this.bb.readInt16(v+I))continue e;s=this.vtables[e];break}}return s?(this.space=this.bb.capacity()-r,this.bb.writeInt32(this.space,s-r)):(this.vtables.push(this.offset()),this.bb.writeInt32(this.bb.capacity()-r,this.offset()-r)),this.isNested=!1,r};A.Builder.prototype.finish=function(r,e,t){var i=t?A.SIZE_PREFIX_LENGTH:0;if(e){var n=e;if(this.prep(this.minalign,A.SIZEOF_INT+A.FILE_IDENTIFIER_LENGTH+i),n.length!=A.FILE_IDENTIFIER_LENGTH)throw new Error("FlatBuffers: file identifier must be length "+A.FILE_IDENTIFIER_LENGTH);for(var s=A.FILE_IDENTIFIER_LENGTH-1;s>=0;s--)this.writeInt8(n.charCodeAt(s))}this.prep(this.minalign,A.SIZEOF_INT+i),this.addOffset(r),i&&this.addInt32(this.bb.capacity()-this.space),this.bb.setPosition(this.space)};A.Builder.prototype.finishSizePrefixed=function(r,e){this.finish(r,e,!0)};A.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")};A.Builder.prototype.startVector=function(r,e,t){this.notNested(),this.vector_num_elems=e,this.prep(A.SIZEOF_INT,r*e),this.prep(t,r*e)};A.Builder.prototype.endVector=function(){return this.writeInt32(this.vector_num_elems),this.offset()};A.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 s=r.charCodeAt(t++);i=(n<<10)+s+(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,v=this.bb.bytes();t<e.length;t++)v[c++]=e[t];return this.endVector()};A.Builder.prototype.createLong=function(r,e){return A.Long.create(r,e)};A.ByteBuffer=function(r){this.bytes_=r,this.position_=0};A.ByteBuffer.allocate=function(r){return new A.ByteBuffer(new Uint8Array(r))};A.ByteBuffer.prototype.clear=function(){this.position_=0};A.ByteBuffer.prototype.bytes=function(){return this.bytes_};A.ByteBuffer.prototype.position=function(){return this.position_};A.ByteBuffer.prototype.setPosition=function(r){this.position_=r};A.ByteBuffer.prototype.capacity=function(){return this.bytes_.length};A.ByteBuffer.prototype.readInt8=function(r){return this.readUint8(r)<<24>>24};A.ByteBuffer.prototype.readUint8=function(r){return this.bytes_[r]};A.ByteBuffer.prototype.readInt16=function(r){return this.readUint16(r)<<16>>16};A.ByteBuffer.prototype.readUint16=function(r){return this.bytes_[r]|this.bytes_[r+1]<<8};A.ByteBuffer.prototype.readInt32=function(r){return this.bytes_[r]|this.bytes_[r+1]<<8|this.bytes_[r+2]<<16|this.bytes_[r+3]<<24};A.ByteBuffer.prototype.readUint32=function(r){return this.readInt32(r)>>>0};A.ByteBuffer.prototype.readInt64=function(r){return new A.Long(this.readInt32(r),this.readInt32(r+4))};A.ByteBuffer.prototype.readUint64=function(r){return new A.Long(this.readUint32(r),this.readUint32(r+4))};A.ByteBuffer.prototype.readFloat32=function(r){return A.int32[0]=this.readInt32(r),A.float32[0]};A.ByteBuffer.prototype.readFloat64=function(r){return A.int32[A.isLittleEndian?0:1]=this.readInt32(r),A.int32[A.isLittleEndian?1:0]=this.readInt32(r+4),A.float64[0]};A.ByteBuffer.prototype.writeInt8=function(r,e){this.bytes_[r]=e};A.ByteBuffer.prototype.writeUint8=function(r,e){this.bytes_[r]=e};A.ByteBuffer.prototype.writeInt16=function(r,e){this.bytes_[r]=e,this.bytes_[r+1]=e>>8};A.ByteBuffer.prototype.writeUint16=function(r,e){this.bytes_[r]=e,this.bytes_[r+1]=e>>8};A.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};A.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};A.ByteBuffer.prototype.writeInt64=function(r,e){this.writeInt32(r,e.low),this.writeInt32(r+4,e.high)};A.ByteBuffer.prototype.writeUint64=function(r,e){this.writeUint32(r,e.low),this.writeUint32(r+4,e.high)};A.ByteBuffer.prototype.writeFloat32=function(r,e){A.float32[0]=e,this.writeInt32(r,A.int32[0])};A.ByteBuffer.prototype.writeFloat64=function(r,e){A.float64[0]=e,this.writeInt32(r,A.int32[A.isLittleEndian?0:1]),this.writeInt32(r+4,A.int32[A.isLittleEndian?1:0])};A.ByteBuffer.prototype.getBufferIdentifier=function(){if(this.bytes_.length<this.position_+A.SIZEOF_INT+A.FILE_IDENTIFIER_LENGTH)throw new Error("FlatBuffers: ByteBuffer is too short to contain an identifier.");for(var r="",e=0;e<A.FILE_IDENTIFIER_LENGTH;e++)r+=String.fromCharCode(this.readInt8(this.position_+A.SIZEOF_INT+e));return r};A.ByteBuffer.prototype.__offset=function(r,e){var t=r-this.readInt32(r);return e<this.readInt16(t)?this.readInt16(t+e):0};A.ByteBuffer.prototype.__union=function(r,e){return r.bb_pos=e+this.readInt32(e),r.bb=this,r};A.ByteBuffer.prototype.__string=function(r,e){r+=this.readInt32(r);var t=this.readInt32(r),i="",n=0;if(r+=A.SIZEOF_INT,e===A.Encoding.UTF8_BYTES)return this.bytes_.subarray(r,r+t);for(;n<t;){var s,c=this.readUint8(r+n++);if(c<192)s=c;else{var v=this.readUint8(r+n++);if(c<224)s=(c&31)<<6|v&63;else{var I=this.readUint8(r+n++);if(c<240)s=(c&15)<<12|(v&63)<<6|I&63;else{var S=this.readUint8(r+n++);s=(c&7)<<18|(v&63)<<12|(I&63)<<6|S&63}}}s<65536?i+=String.fromCharCode(s):(s-=65536,i+=String.fromCharCode((s>>10)+55296,(s&(1<<10)-1)+56320))}return i};A.ByteBuffer.prototype.__indirect=function(r){return r+this.readInt32(r)};A.ByteBuffer.prototype.__vector=function(r){return r+this.readInt32(r)+A.SIZEOF_INT};A.ByteBuffer.prototype.__vector_len=function(r){return this.readInt32(r+this.readInt32(r))};A.ByteBuffer.prototype.__has_identifier=function(r){if(r.length!=A.FILE_IDENTIFIER_LENGTH)throw new Error("FlatBuffers: file identifier must be length "+A.FILE_IDENTIFIER_LENGTH);for(var e=0;e<A.FILE_IDENTIFIER_LENGTH;e++)if(r.charCodeAt(e)!=this.readInt8(this.position_+A.SIZEOF_INT+e))return!1;return!0};A.ByteBuffer.prototype.createLong=function(r,e){return A.Long.create(r,e)};Fy.flatbuffers=A});var My=V(vu=>{"use strict";function vr(r,e,t){return e<=r&&r<=t}function no(r){if(r===void 0)return{};if(r===Object(r))return r;throw TypeError("Could not convert argument to dictionary")}function VS(r){for(var e=String(r),t=e.length,i=0,n=[];i<t;){var s=e.charCodeAt(i);if(s<55296||s>57343)n.push(s);else if(56320<=s&&s<=57343)n.push(65533);else if(55296<=s&&s<=56319)if(i===t-1)n.push(65533);else{var c=r.charCodeAt(i+1);if(56320<=c&&c<=57343){var v=s&1023,I=c&1023;n.push(65536+(v<<10)+I),i+=1}else n.push(65533)}i+=1}return n}function US(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 so=-1;function bu(r){this.tokens=[].slice.call(r)}bu.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():so},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 en=-1;function gu(r,e){if(r)throw TypeError("Decoder error");return e||65533}var oo="utf-8";function ao(r,e){if(!(this instanceof ao))return new ao(r,e);if(r=r!==void 0?String(r).toLowerCase():oo,r!==oo)throw new Error("Encoding not supported. Only utf-8 is supported");e=no(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})}ao.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=no(t),this._streaming||(this._decoder=new CS({fatal:this._fatal}),this._BOMseen=!1),this._streaming=Boolean(t.stream);for(var n=new bu(i),s=[],c;!n.endOfStream()&&(c=this._decoder.handler(n,n.read()),c!==en);)c!==null&&(Array.isArray(c)?s.push.apply(s,c):s.push(c));if(!this._streaming){do{if(c=this._decoder.handler(n,n.read()),c===en)break;c!==null&&(Array.isArray(c)?s.push.apply(s,c):s.push(c))}while(!n.endOfStream());this._decoder=null}return s.length&&["utf-8"].indexOf(this.encoding)!==-1&&!this._ignoreBOM&&!this._BOMseen&&(s[0]===65279?(this._BOMseen=!0,s.shift()):this._BOMseen=!0),US(s)}};function uo(r,e){if(!(this instanceof uo))return new uo(r,e);if(r=r!==void 0?String(r).toLowerCase():oo,r!==oo)throw new Error("Encoding not supported. Only utf-8 is supported");e=no(e),this._streaming=!1,this._encoder=null,this._options={fatal:Boolean(e.fatal)},Object.defineProperty(this,"encoding",{value:"utf-8"})}uo.prototype={encode:function(e,t){e=e?String(e):"",t=no(t),this._streaming||(this._encoder=new PS(this._options)),this._streaming=Boolean(t.stream);for(var i=[],n=new bu(VS(e)),s;!n.endOfStream()&&(s=this._encoder.handler(n,n.read()),s!==en);)Array.isArray(s)?i.push.apply(i,s):i.push(s);if(!this._streaming){for(;s=this._encoder.handler(n,n.read()),s!==en;)Array.isArray(s)?i.push.apply(i,s):i.push(s);this._encoder=null}return new Uint8Array(i)}};function CS(r){var e=r.fatal,t=0,i=0,n=0,s=128,c=191;this.handler=function(v,I){if(I===so&&n!==0)return n=0,gu(e);if(I===so)return en;if(n===0){if(vr(I,0,127))return I;if(vr(I,194,223))n=1,t=I-192;else if(vr(I,224,239))I===224&&(s=160),I===237&&(c=159),n=2,t=I-224;else if(vr(I,240,244))I===240&&(s=144),I===244&&(c=143),n=3,t=I-240;else return gu(e);return t=t<<6*n,null}if(!vr(I,s,c))return t=n=i=0,s=128,c=191,v.prepend(I),gu(e);if(s=128,c=191,i+=1,t+=I-128<<6*(n-i),i!==n)return null;var S=t;return t=n=i=0,S}}function PS(r){var e=r.fatal;this.handler=function(t,i){if(i===so)return en;if(vr(i,0,127))return i;var n,s;vr(i,128,2047)?(n=1,s=192):vr(i,2048,65535)?(n=2,s=224):vr(i,65536,1114111)&&(n=3,s=240);for(var c=[(i>>6*n)+s];n>0;){var v=i>>6*(n-1);c.push(128|v&63),n-=1}return c}}vu.TextEncoder=uo;vu.TextDecoder=ao});var Ti=V(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});tn.encodeUtf8=tn.decodeUtf8=void 0;var Vy=My(),kS=new(typeof TextDecoder!="undefined"?TextDecoder:Vy.TextDecoder)("utf-8");tn.decodeUtf8=r=>kS.decode(r);var RS=new(typeof TextEncoder!="undefined"?TextEncoder:Vy.TextEncoder);tn.encodeUtf8=r=>RS.encode(r)});var rn=V(lt=>{"use strict";Object.defineProperty(lt,"__esModule",{value:!0});lt.AsyncQueue=lt.ReadableInterop=lt.ArrowJSON=lt.ITERATOR_DONE=void 0;var Uy=ns();lt.ITERATOR_DONE=Object.freeze({done:!0,value:void 0});var Cy=class{constructor(e){this._json=e}get schema(){return this._json.schema}get batches(){return this._json.batches||[]}get dictionaries(){return this._json.dictionaries||[]}};lt.ArrowJSON=Cy;var ju=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())}};lt.ReadableInterop=ju;var Py=class extends ju{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(lt.ITERATOR_DONE);this._closedPromiseResolve(),this._closedPromiseResolve=void 0}}[Symbol.asyncIterator](){return this}toDOMStream(e){return Uy.default.toDOMStream(this._closedPromiseResolve||this._error?this:this._values,e)}toNodeStream(e){return Uy.default.toNodeStream(this._closedPromiseResolve||this._error?this:this._values,e)}async throw(e){return await this.abort(e),lt.ITERATOR_DONE}async return(e){return await this.close(),lt.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(lt.ITERATOR_DONE)}_ensureOpen(){if(this._closedPromiseResolve)return!0;throw new Error(`${this} is closed`)}};lt.AsyncQueue=Py});var st=V(q=>{"use strict";Object.defineProperty(q,"__esModule",{value:!0});q.isReadableNodeStream=q.isWritableNodeStream=q.isReadableDOMStream=q.isWritableDOMStream=q.isFetchResponse=q.isFSReadStream=q.isFileHandle=q.isUnderlyingSink=q.isIteratorResult=q.isArrayLike=q.isArrowJSON=q.isAsyncIterable=q.isIterable=q.isObservable=q.isPromise=q.isObject=q.BigUint64ArrayAvailable=q.BigUint64Array=q.BigInt64ArrayAvailable=q.BigInt64Array=q.BigIntAvailable=q.BigInt=void 0;var co=rn(),[NS,xS]=(()=>{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]})();q.BigInt=NS;q.BigIntAvailable=xS;var[ES,LS]=(()=>{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]})();q.BigInt64Array=ES;q.BigInt64ArrayAvailable=LS;var[qS,zS]=(()=>{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]})();q.BigUint64Array=qS;q.BigUint64ArrayAvailable=zS;var wu=r=>typeof r=="number",ky=r=>typeof r=="boolean",et=r=>typeof r=="function";q.isObject=r=>r!=null&&Object(r)===r;q.isPromise=r=>q.isObject(r)&&et(r.then);q.isObservable=r=>q.isObject(r)&&et(r.subscribe);q.isIterable=r=>q.isObject(r)&&et(r[Symbol.iterator]);q.isAsyncIterable=r=>q.isObject(r)&&et(r[Symbol.asyncIterator]);q.isArrowJSON=r=>q.isObject(r)&&q.isObject(r.schema);q.isArrayLike=r=>q.isObject(r)&&wu(r.length);q.isIteratorResult=r=>q.isObject(r)&&"done"in r&&"value"in r;q.isUnderlyingSink=r=>q.isObject(r)&&et(r.abort)&&et(r.close)&&et(r.start)&&et(r.write);q.isFileHandle=r=>q.isObject(r)&&et(r.stat)&&wu(r.fd);q.isFSReadStream=r=>q.isReadableNodeStream(r)&&wu(r.bytesRead);q.isFetchResponse=r=>q.isObject(r)&&q.isReadableDOMStream(r.body);q.isWritableDOMStream=r=>q.isObject(r)&&et(r.abort)&&et(r.getWriter)&&!(r instanceof co.ReadableInterop);q.isReadableDOMStream=r=>q.isObject(r)&&et(r.cancel)&&et(r.getReader)&&!(r instanceof co.ReadableInterop);q.isWritableNodeStream=r=>q.isObject(r)&&et(r.end)&&et(r.write)&&ky(r.writable)&&!(r instanceof co.ReadableInterop);q.isReadableNodeStream=r=>q.isObject(r)&&et(r.read)&&et(r.pipe)&&ky(r.readable)&&!(r instanceof co.ReadableInterop)});var Ye=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 WS=gr(),HS=Ti(),YS=WS.flatbuffers.ByteBuffer,Ii=st(),Bu=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:ArrayBuffer;function $S(r){let e=r[0]?[r[0]]:[],t,i,n,s;for(let c,v,I=0,S=0,U=r.length;++I<U;){if(c=e[S],v=r[I],!c||!v||c.buffer!==v.buffer||v.byteOffset<c.byteOffset){v&&(e[++S]=v);continue}if({byteOffset:t,byteLength:n}=c,{byteOffset:i,byteLength:s}=v,t+n<i||i+s<t){v&&(e[++S]=v);continue}e[S]=new Uint8Array(c.buffer,t,i-t+s)}return e}function Tu(r,e,t=0,i=e.byteLength){let n=r.byteLength,s=new Uint8Array(r.buffer,r.byteOffset,n),c=new Uint8Array(e.buffer,e.byteOffset,Math.min(i,n));return s.set(c,t),r}E.memcpy=Tu;function GS(r,e){let t=$S(r),i=t.reduce((U,G)=>U+G.byteLength,0),n,s,c,v=0,I=-1,S=Math.min(e||1/0,i);for(let U=t.length;++I<U;){if(n=t[I],s=n.subarray(0,Math.min(n.length,S-v)),S<=v+s.length){s.length<n.length?t[I]=n.subarray(s.length):s.length===n.length&&I++,c?Tu(c,s,v):c=s;break}Tu(c||(c=new Uint8Array(S)),s,v),v+=s.length}return[c||new Uint8Array(0),t.slice(I),i-(c?c.byteLength:0)]}E.joinUint8Arrays=GS;function ut(r,e){let t=Ii.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=HS.encodeUtf8(t)),t instanceof ArrayBuffer?new r(t):t instanceof Bu?new r(t):t instanceof YS?ut(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=ut;E.toInt8Array=r=>ut(Int8Array,r);E.toInt16Array=r=>ut(Int16Array,r);E.toInt32Array=r=>ut(Int32Array,r);E.toBigInt64Array=r=>ut(Ii.BigInt64Array,r);E.toUint8Array=r=>ut(Uint8Array,r);E.toUint16Array=r=>ut(Uint16Array,r);E.toUint32Array=r=>ut(Uint32Array,r);E.toBigUint64Array=r=>ut(Ii.BigUint64Array,r);E.toFloat32Array=r=>ut(Float32Array,r);E.toFloat64Array=r=>ut(Float64Array,r);E.toUint8ClampedArray=r=>ut(Uint8ClampedArray,r);var Iu=r=>(r.next(),r);function*Kt(r,e){let t=function*(n){yield n},i=typeof e=="string"||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof Bu?t(e):Ii.isIterable(e)?e:t(e);return yield*Iu(function*(n){let s=null;do s=n.next(yield ut(r,s));while(!s.done)}(i[Symbol.iterator]())),new r}E.toArrayBufferViewIterator=Kt;E.toInt8ArrayIterator=r=>Kt(Int8Array,r);E.toInt16ArrayIterator=r=>Kt(Int16Array,r);E.toInt32ArrayIterator=r=>Kt(Int32Array,r);E.toUint8ArrayIterator=r=>Kt(Uint8Array,r);E.toUint16ArrayIterator=r=>Kt(Uint16Array,r);E.toUint32ArrayIterator=r=>Kt(Uint32Array,r);E.toFloat32ArrayIterator=r=>Kt(Float32Array,r);E.toFloat64ArrayIterator=r=>Kt(Float64Array,r);E.toUint8ClampedArrayIterator=r=>Kt(Uint8ClampedArray,r);async function*xt(r,e){if(Ii.isPromise(e))return yield*xt(r,await e);let t=async function*(s){yield await s},i=async function*(s){yield*Iu(function*(c){let v=null;do v=c.next(yield v&&v.value);while(!v.done)}(s[Symbol.iterator]()))},n=typeof e=="string"||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof Bu?t(e):Ii.isIterable(e)?i(e):Ii.isAsyncIterable(e)?e:t(e);return yield*Iu(async function*(s){let c=null;do c=await s.next(yield ut(r,c));while(!c.done)}(n[Symbol.asyncIterator]())),new r}E.toArrayBufferViewAsyncIterator=xt;E.toInt8ArrayAsyncIterator=r=>xt(Int8Array,r);E.toInt16ArrayAsyncIterator=r=>xt(Int16Array,r);E.toInt32ArrayAsyncIterator=r=>xt(Int32Array,r);E.toUint8ArrayAsyncIterator=r=>xt(Uint8Array,r);E.toUint16ArrayAsyncIterator=r=>xt(Uint16Array,r);E.toUint32ArrayAsyncIterator=r=>xt(Uint32Array,r);E.toFloat32ArrayAsyncIterator=r=>xt(Float32Array,r);E.toFloat64ArrayAsyncIterator=r=>xt(Float64Array,r);E.toUint8ClampedArrayAsyncIterator=r=>xt(Uint8ClampedArray,r);function JS(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=JS;function KS(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=KS});var ns=V(Du=>{"use strict";Object.defineProperty(Du,"__esModule",{value:!0});var ct=Ye();Du.default={fromIterable(r){return lo(ZS(r))},fromAsyncIterable(r){return lo(XS(r))},fromDOMStream(r){return lo(QS(r))},fromNodeStream(r){return lo(e1(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 lo=r=>(r.next(),r);function*ZS(r){let e,t=!1,i=[],n,s,c,v=0;function I(){return s==="peek"?ct.joinUint8Arrays(i,c)[0]:([n,i,v]=ct.joinUint8Arrays(i,c),n)}({cmd:s,size:c}=yield null);let S=ct.toUint8ArrayIterator(r)[Symbol.iterator]();try{do if({done:e,value:n}=isNaN(c-v)?S.next(void 0):S.next(c-v),!e&&n.byteLength>0&&(i.push(n),v+=n.byteLength),e||c<=v)do({cmd:s,size:c}=yield I());while(c<v);while(!e)}catch(U){(t=!0)&&typeof S.throw=="function"&&S.throw(U)}finally{t===!1&&typeof S.return=="function"&&S.return(null)}return null}async function*XS(r){let e,t=!1,i=[],n,s,c,v=0;function I(){return s==="peek"?ct.joinUint8Arrays(i,c)[0]:([n,i,v]=ct.joinUint8Arrays(i,c),n)}({cmd:s,size:c}=yield null);let S=ct.toUint8ArrayAsyncIterator(r)[Symbol.asyncIterator]();try{do if({done:e,value:n}=isNaN(c-v)?await S.next(void 0):await S.next(c-v),!e&&n.byteLength>0&&(i.push(n),v+=n.byteLength),e||c<=v)do({cmd:s,size:c}=yield I());while(c<v);while(!e)}catch(U){(t=!0)&&typeof S.throw=="function"&&await S.throw(U)}finally{t===!1&&typeof S.return=="function"&&await S.return(new Uint8Array(0))}return null}async function*QS(r){let e=!1,t=!1,i=[],n,s,c,v=0;function I(){return s==="peek"?ct.joinUint8Arrays(i,c)[0]:([n,i,v]=ct.joinUint8Arrays(i,c),n)}({cmd:s,size:c}=yield null);let S=new Ry(r);try{do if({done:e,value:n}=isNaN(c-v)?await S.read(void 0):await S.read(c-v),!e&&n.byteLength>0&&(i.push(ct.toUint8Array(n)),v+=n.byteLength),e||c<=v)do({cmd:s,size:c}=yield I());while(c<v);while(!e)}catch(U){(t=!0)&&await S.cancel(U)}finally{t===!1?await S.cancel():r.locked&&S.releaseLock()}return null}var Ry=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=ct.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 Ny(this.getBYOBReader(),new ArrayBuffer(e),0,e)}};async function Ny(r,e,t,i){if(t>=i)return{done:!1,value:new Uint8Array(e,0,i)};let{done:n,value:s}=await r.read(new Uint8Array(e,t,i-t));return(t+=s.byteLength)<i&&!n?await Ny(r,s.buffer,t,i):{done:n,value:new Uint8Array(s.buffer,0,t)}}var Su=(r,e)=>{let t=n=>i([e,n]),i;return[e,t,new Promise(n=>(i=n)&&r.once(e,t))]};async function*e1(r){let e=[],t="error",i=!1,n=null,s,c,v=0,I=[],S;function U(){return s==="peek"?ct.joinUint8Arrays(I,c)[0]:([S,I,v]=ct.joinUint8Arrays(I,c),S)}if({cmd:s,size:c}=yield null,r.isTTY)return yield new Uint8Array(0),null;try{e[0]=Su(r,"end"),e[1]=Su(r,"error");do{if(e[2]=Su(r,"readable"),[t,n]=await Promise.race(e.map(me=>me[2])),t==="error")break;if((i=t==="end")||(isFinite(c-v)?(S=ct.toUint8Array(r.read(c-v)),S.byteLength<c-v&&(S=ct.toUint8Array(r.read(void 0)))):S=ct.toUint8Array(r.read(void 0)),S.byteLength>0&&(I.push(S),v+=S.byteLength)),i||c<=v)do({cmd:s,size:c}=yield U());while(c<v)}while(!i)}finally{await G(e,t==="error"?n:null)}return null;function G(me,fe){return S=I=null,new Promise((Gt,Cr)=>{for(let[_r,Ji]of me)r.off(_r,Ji);try{let _r=r.destroy;_r&&_r.call(r,fe),fe=void 0}catch(_r){fe=_r||fe}finally{fe!=null?Cr(fe):Gt()}})}}});var Re=V(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.Vector=nn.AbstractVector=void 0;var fo=class{};nn.AbstractVector=fo;nn.Vector=fo;fo.prototype.data=null});var $r=V(N=>{"use strict";Object.defineProperty(N,"__esModule",{value:!0});N.Schema=N.Buffer=N.Field=N.DictionaryEncoding=N.KeyValue=N.Duration=N.Interval=N.Timestamp=N.Time=N.Date=N.Decimal=N.Bool=N.FixedSizeBinary=N.LargeBinary=N.LargeUtf8=N.Binary=N.Utf8=N.FloatingPoint=N.Int=N.Union=N.Map=N.FixedSizeList=N.LargeList=N.List=N.Struct_=N.Null=N.Endianness=N.DictionaryKind=N.Type=N.IntervalUnit=N.TimeUnit=N.DateUnit=N.Precision=N.UnionMode=N.Feature=N.MetadataVersion=void 0;var Ie=gr(),t1;(function(r){r[r.V1=0]="V1",r[r.V2=1]="V2",r[r.V3=2]="V3",r[r.V4=3]="V4",r[r.V5=4]="V5"})(t1=N.MetadataVersion||(N.MetadataVersion={}));var r1;(function(r){r[r.UNUSED=0]="UNUSED",r[r.DICTIONARY_REPLACEMENT=1]="DICTIONARY_REPLACEMENT",r[r.COMPRESSED_BODY=2]="COMPRESSED_BODY"})(r1=N.Feature||(N.Feature={}));var Ou;(function(r){r[r.Sparse=0]="Sparse",r[r.Dense=1]="Dense"})(Ou=N.UnionMode||(N.UnionMode={}));var Au;(function(r){r[r.HALF=0]="HALF",r[r.SINGLE=1]="SINGLE",r[r.DOUBLE=2]="DOUBLE"})(Au=N.Precision||(N.Precision={}));var Fu;(function(r){r[r.DAY=0]="DAY",r[r.MILLISECOND=1]="MILLISECOND"})(Fu=N.DateUnit||(N.DateUnit={}));var Si;(function(r){r[r.SECOND=0]="SECOND",r[r.MILLISECOND=1]="MILLISECOND",r[r.MICROSECOND=2]="MICROSECOND",r[r.NANOSECOND=3]="NANOSECOND"})(Si=N.TimeUnit||(N.TimeUnit={}));var Mu;(function(r){r[r.YEAR_MONTH=0]="YEAR_MONTH",r[r.DAY_TIME=1]="DAY_TIME"})(Mu=N.IntervalUnit||(N.IntervalUnit={}));var Vu;(function(r){r[r.NONE=0]="NONE",r[r.Null=1]="Null",r[r.Int=2]="Int",r[r.FloatingPoint=3]="FloatingPoint",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.Duration=18]="Duration",r[r.LargeBinary=19]="LargeBinary",r[r.LargeUtf8=20]="LargeUtf8",r[r.LargeList=21]="LargeList"})(Vu=N.Type||(N.Type={}));var Uu;(function(r){r[r.DenseArray=0]="DenseArray"})(Uu=N.DictionaryKind||(N.DictionaryKind={}));var Cu;(function(r){r[r.Little=0]="Little",r[r.Big=1]="Big"})(Cu=N.Endianness||(N.Endianness={}));var Di=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsNull(e,t){return(t||new Di).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsNull(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Di).__init(e.readInt32(e.position())+e.position(),e)}static startNull(e){e.startObject(0)}static endNull(e){return e.endObject()}static createNull(e){return Di.startNull(e),Di.endNull(e)}};N.Null=Di;var Oi=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsStruct_(e,t){return(t||new Oi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsStruct_(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Oi).__init(e.readInt32(e.position())+e.position(),e)}static startStruct_(e){e.startObject(0)}static endStruct_(e){return e.endObject()}static createStruct_(e){return Oi.startStruct_(e),Oi.endStruct_(e)}};N.Struct_=Oi;var Ai=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsList(e,t){return(t||new Ai).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsList(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Ai).__init(e.readInt32(e.position())+e.position(),e)}static startList(e){e.startObject(0)}static endList(e){return e.endObject()}static createList(e){return Ai.startList(e),Ai.endList(e)}};N.List=Ai;var Fi=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsLargeList(e,t){return(t||new Fi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsLargeList(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Fi).__init(e.readInt32(e.position())+e.position(),e)}static startLargeList(e){e.startObject(0)}static endLargeList(e){return e.endObject()}static createLargeList(e){return Fi.startLargeList(e),Fi.endLargeList(e)}};N.LargeList=Fi;var Er=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsFixedSizeList(e,t){return(t||new Er).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFixedSizeList(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Er).__init(e.readInt32(e.position())+e.position(),e)}listSize(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}static startFixedSizeList(e){e.startObject(1)}static addListSize(e,t){e.addFieldInt32(0,t,0)}static endFixedSizeList(e){return e.endObject()}static createFixedSizeList(e,t){return Er.startFixedSizeList(e),Er.addListSize(e,t),Er.endFixedSizeList(e)}};N.FixedSizeList=Er;var Lr=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsMap(e,t){return(t||new Lr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsMap(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Lr).__init(e.readInt32(e.position())+e.position(),e)}keysSorted(){let e=this.bb.__offset(this.bb_pos,4);return e?!!this.bb.readInt8(this.bb_pos+e):!1}static startMap(e){e.startObject(1)}static addKeysSorted(e,t){e.addFieldInt8(0,+t,0)}static endMap(e){return e.endObject()}static createMap(e,t){return Lr.startMap(e),Lr.addKeysSorted(e,t),Lr.endMap(e)}};N.Map=Lr;var jr=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsUnion(e,t){return(t||new jr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsUnion(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new jr).__init(e.readInt32(e.position())+e.position(),e)}mode(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Ou.Sparse}typeIds(e){let t=this.bb.__offset(this.bb_pos,6);return t?this.bb.readInt32(this.bb.__vector(this.bb_pos+t)+e*4):0}typeIdsLength(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}typeIdsArray(){let e=this.bb.__offset(this.bb_pos,6);return e?new Int32Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+e),this.bb.__vector_len(this.bb_pos+e)):null}static startUnion(e){e.startObject(2)}static addMode(e,t){e.addFieldInt16(0,t,Ou.Sparse)}static addTypeIds(e,t){e.addFieldOffset(1,t,0)}static createTypeIdsVector(e,t){e.startVector(4,t.length,4);for(let i=t.length-1;i>=0;i--)e.addInt32(t[i]);return e.endVector()}static startTypeIdsVector(e,t){e.startVector(4,t,4)}static endUnion(e){return e.endObject()}static createUnion(e,t,i){return jr.startUnion(e),jr.addMode(e,t),jr.addTypeIds(e,i),jr.endUnion(e)}};N.Union=jr;var Zt=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsInt(e,t){return(t||new Zt).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsInt(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Zt).__init(e.readInt32(e.position())+e.position(),e)}bitWidth(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}isSigned(){let e=this.bb.__offset(this.bb_pos,6);return e?!!this.bb.readInt8(this.bb_pos+e):!1}static startInt(e){e.startObject(2)}static addBitWidth(e,t){e.addFieldInt32(0,t,0)}static addIsSigned(e,t){e.addFieldInt8(1,+t,0)}static endInt(e){return e.endObject()}static createInt(e,t,i){return Zt.startInt(e),Zt.addBitWidth(e,t),Zt.addIsSigned(e,i),Zt.endInt(e)}};N.Int=Zt;var qr=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsFloatingPoint(e,t){return(t||new qr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFloatingPoint(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new qr).__init(e.readInt32(e.position())+e.position(),e)}precision(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Au.HALF}static startFloatingPoint(e){e.startObject(1)}static addPrecision(e,t){e.addFieldInt16(0,t,Au.HALF)}static endFloatingPoint(e){return e.endObject()}static createFloatingPoint(e,t){return qr.startFloatingPoint(e),qr.addPrecision(e,t),qr.endFloatingPoint(e)}};N.FloatingPoint=qr;var Mi=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsUtf8(e,t){return(t||new Mi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsUtf8(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Mi).__init(e.readInt32(e.position())+e.position(),e)}static startUtf8(e){e.startObject(0)}static endUtf8(e){return e.endObject()}static createUtf8(e){return Mi.startUtf8(e),Mi.endUtf8(e)}};N.Utf8=Mi;var Vi=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsBinary(e,t){return(t||new Vi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBinary(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Vi).__init(e.readInt32(e.position())+e.position(),e)}static startBinary(e){e.startObject(0)}static endBinary(e){return e.endObject()}static createBinary(e){return Vi.startBinary(e),Vi.endBinary(e)}};N.Binary=Vi;var Ui=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsLargeUtf8(e,t){return(t||new Ui).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsLargeUtf8(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Ui).__init(e.readInt32(e.position())+e.position(),e)}static startLargeUtf8(e){e.startObject(0)}static endLargeUtf8(e){return e.endObject()}static createLargeUtf8(e){return Ui.startLargeUtf8(e),Ui.endLargeUtf8(e)}};N.LargeUtf8=Ui;var Ci=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsLargeBinary(e,t){return(t||new Ci).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsLargeBinary(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Ci).__init(e.readInt32(e.position())+e.position(),e)}static startLargeBinary(e){e.startObject(0)}static endLargeBinary(e){return e.endObject()}static createLargeBinary(e){return Ci.startLargeBinary(e),Ci.endLargeBinary(e)}};N.LargeBinary=Ci;var zr=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsFixedSizeBinary(e,t){return(t||new zr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFixedSizeBinary(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new zr).__init(e.readInt32(e.position())+e.position(),e)}byteWidth(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}static startFixedSizeBinary(e){e.startObject(1)}static addByteWidth(e,t){e.addFieldInt32(0,t,0)}static endFixedSizeBinary(e){return e.endObject()}static createFixedSizeBinary(e,t){return zr.startFixedSizeBinary(e),zr.addByteWidth(e,t),zr.endFixedSizeBinary(e)}};N.FixedSizeBinary=zr;var Pi=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsBool(e,t){return(t||new Pi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBool(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Pi).__init(e.readInt32(e.position())+e.position(),e)}static startBool(e){e.startObject(0)}static endBool(e){return e.endObject()}static createBool(e){return Pi.startBool(e),Pi.endBool(e)}};N.Bool=Pi;var Xt=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsDecimal(e,t){return(t||new Xt).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDecimal(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Xt).__init(e.readInt32(e.position())+e.position(),e)}precision(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}scale(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt32(this.bb_pos+e):0}bitWidth(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.readInt32(this.bb_pos+e):128}static startDecimal(e){e.startObject(3)}static addPrecision(e,t){e.addFieldInt32(0,t,0)}static addScale(e,t){e.addFieldInt32(1,t,0)}static addBitWidth(e,t){e.addFieldInt32(2,t,128)}static endDecimal(e){return e.endObject()}static createDecimal(e,t,i,n){return Xt.startDecimal(e),Xt.addPrecision(e,t),Xt.addScale(e,i),Xt.addBitWidth(e,n),Xt.endDecimal(e)}};N.Decimal=Xt;var Wr=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsDate(e,t){return(t||new Wr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDate(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Wr).__init(e.readInt32(e.position())+e.position(),e)}unit(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Fu.MILLISECOND}static startDate(e){e.startObject(1)}static addUnit(e,t){e.addFieldInt16(0,t,Fu.MILLISECOND)}static endDate(e){return e.endObject()}static createDate(e,t){return Wr.startDate(e),Wr.addUnit(e,t),Wr.endDate(e)}};N.Date=Wr;var wr=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsTime(e,t){return(t||new wr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsTime(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new wr).__init(e.readInt32(e.position())+e.position(),e)}unit(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Si.MILLISECOND}bitWidth(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt32(this.bb_pos+e):32}static startTime(e){e.startObject(2)}static addUnit(e,t){e.addFieldInt16(0,t,Si.MILLISECOND)}static addBitWidth(e,t){e.addFieldInt32(1,t,32)}static endTime(e){return e.endObject()}static createTime(e,t,i){return wr.startTime(e),wr.addUnit(e,t),wr.addBitWidth(e,i),wr.endTime(e)}};N.Time=wr;var Br=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsTimestamp(e,t){return(t||new Br).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsTimestamp(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Br).__init(e.readInt32(e.position())+e.position(),e)}unit(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Si.SECOND}timezone(e){let t=this.bb.__offset(this.bb_pos,6);return t?this.bb.__string(this.bb_pos+t,e):null}static startTimestamp(e){e.startObject(2)}static addUnit(e,t){e.addFieldInt16(0,t,Si.SECOND)}static addTimezone(e,t){e.addFieldOffset(1,t,0)}static endTimestamp(e){return e.endObject()}static createTimestamp(e,t,i){return Br.startTimestamp(e),Br.addUnit(e,t),Br.addTimezone(e,i),Br.endTimestamp(e)}};N.Timestamp=Br;var Hr=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsInterval(e,t){return(t||new Hr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsInterval(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Hr).__init(e.readInt32(e.position())+e.position(),e)}unit(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Mu.YEAR_MONTH}static startInterval(e){e.startObject(1)}static addUnit(e,t){e.addFieldInt16(0,t,Mu.YEAR_MONTH)}static endInterval(e){return e.endObject()}static createInterval(e,t){return Hr.startInterval(e),Hr.addUnit(e,t),Hr.endInterval(e)}};N.Interval=Hr;var Yr=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsDuration(e,t){return(t||new Yr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDuration(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Yr).__init(e.readInt32(e.position())+e.position(),e)}unit(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Si.MILLISECOND}static startDuration(e){e.startObject(1)}static addUnit(e,t){e.addFieldInt16(0,t,Si.MILLISECOND)}static endDuration(e){return e.endObject()}static createDuration(e,t){return Yr.startDuration(e),Yr.addUnit(e,t),Yr.endDuration(e)}};N.Duration=Yr;var Et=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsKeyValue(e,t){return(t||new Et).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsKeyValue(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Et).__init(e.readInt32(e.position())+e.position(),e)}key(e){let t=this.bb.__offset(this.bb_pos,4);return t?this.bb.__string(this.bb_pos+t,e):null}value(e){let t=this.bb.__offset(this.bb_pos,6);return t?this.bb.__string(this.bb_pos+t,e):null}static startKeyValue(e){e.startObject(2)}static addKey(e,t){e.addFieldOffset(0,t,0)}static addValue(e,t){e.addFieldOffset(1,t,0)}static endKeyValue(e){return e.endObject()}static createKeyValue(e,t,i){return Et.startKeyValue(e),Et.addKey(e,t),Et.addValue(e,i),Et.endKeyValue(e)}};N.KeyValue=Et;var bt=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsDictionaryEncoding(e,t){return(t||new bt).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDictionaryEncoding(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new bt).__init(e.readInt32(e.position())+e.position(),e)}id(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt64(this.bb_pos+e):this.bb.createLong(0,0)}indexType(e){let t=this.bb.__offset(this.bb_pos,6);return t?(e||new Zt).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}isOrdered(){let e=this.bb.__offset(this.bb_pos,8);return e?!!this.bb.readInt8(this.bb_pos+e):!1}dictionaryKind(){let e=this.bb.__offset(this.bb_pos,10);return e?this.bb.readInt16(this.bb_pos+e):Uu.DenseArray}static startDictionaryEncoding(e){e.startObject(4)}static addId(e,t){e.addFieldInt64(0,t,e.createLong(0,0))}static addIndexType(e,t){e.addFieldOffset(1,t,0)}static addIsOrdered(e,t){e.addFieldInt8(2,+t,0)}static addDictionaryKind(e,t){e.addFieldInt16(3,t,Uu.DenseArray)}static endDictionaryEncoding(e){return e.endObject()}static createDictionaryEncoding(e,t,i,n,s){return bt.startDictionaryEncoding(e),bt.addId(e,t),bt.addIndexType(e,i),bt.addIsOrdered(e,n),bt.addDictionaryKind(e,s),bt.endDictionaryEncoding(e)}};N.DictionaryEncoding=bt;var ot=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsField(e,t){return(t||new ot).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsField(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new ot).__init(e.readInt32(e.position())+e.position(),e)}name(e){let t=this.bb.__offset(this.bb_pos,4);return t?this.bb.__string(this.bb_pos+t,e):null}nullable(){let e=this.bb.__offset(this.bb_pos,6);return e?!!this.bb.readInt8(this.bb_pos+e):!1}typeType(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.readUint8(this.bb_pos+e):Vu.NONE}type(e){let t=this.bb.__offset(this.bb_pos,10);return t?this.bb.__union(e,this.bb_pos+t):null}dictionary(e){let t=this.bb.__offset(this.bb_pos,12);return t?(e||new bt).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}children(e,t){let i=this.bb.__offset(this.bb_pos,14);return i?(t||new ot).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+e*4),this.bb):null}childrenLength(){let e=this.bb.__offset(this.bb_pos,14);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,t){let i=this.bb.__offset(this.bb_pos,16);return i?(t||new Et).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+e*4),this.bb):null}customMetadataLength(){let e=this.bb.__offset(this.bb_pos,16);return e?this.bb.__vector_len(this.bb_pos+e):0}static startField(e){e.startObject(7)}static addName(e,t){e.addFieldOffset(0,t,0)}static addNullable(e,t){e.addFieldInt8(1,+t,0)}static addTypeType(e,t){e.addFieldInt8(2,t,Vu.NONE)}static addType(e,t){e.addFieldOffset(3,t,0)}static addDictionary(e,t){e.addFieldOffset(4,t,0)}static addChildren(e,t){e.addFieldOffset(5,t,0)}static createChildrenVector(e,t){e.startVector(4,t.length,4);for(let i=t.length-1;i>=0;i--)e.addOffset(t[i]);return e.endVector()}static startChildrenVector(e,t){e.startVector(4,t,4)}static addCustomMetadata(e,t){e.addFieldOffset(6,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let i=t.length-1;i>=0;i--)e.addOffset(t[i]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static endField(e){return e.endObject()}static createField(e,t,i,n,s,c,v,I){return ot.startField(e),ot.addName(e,t),ot.addNullable(e,i),ot.addTypeType(e,n),ot.addType(e,s),ot.addDictionary(e,c),ot.addChildren(e,v),ot.addCustomMetadata(e,I),ot.endField(e)}};N.Field=ot;var xy=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}offset(){return this.bb.readInt64(this.bb_pos)}length(){return this.bb.readInt64(this.bb_pos+8)}static createBuffer(e,t,i){return e.prep(8,16),e.writeInt64(i),e.writeInt64(t),e.offset()}};N.Buffer=xy;var Lt=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsSchema(e,t){return(t||new Lt).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsSchema(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Lt).__init(e.readInt32(e.position())+e.position(),e)}endianness(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Cu.Little}fields(e,t){let i=this.bb.__offset(this.bb_pos,6);return i?(t||new ot).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+e*4),this.bb):null}fieldsLength(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,t){let i=this.bb.__offset(this.bb_pos,8);return i?(t||new Et).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+e*4),this.bb):null}customMetadataLength(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}features(e){let t=this.bb.__offset(this.bb_pos,10);return t?this.bb.readInt64(this.bb.__vector(this.bb_pos+t)+e*8):this.bb.createLong(0,0)}featuresLength(){let e=this.bb.__offset(this.bb_pos,10);return e?this.bb.__vector_len(this.bb_pos+e):0}static startSchema(e){e.startObject(4)}static addEndianness(e,t){e.addFieldInt16(0,t,Cu.Little)}static addFields(e,t){e.addFieldOffset(1,t,0)}static createFieldsVector(e,t){e.startVector(4,t.length,4);for(let i=t.length-1;i>=0;i--)e.addOffset(t[i]);return e.endVector()}static startFieldsVector(e,t){e.startVector(4,t,4)}static addCustomMetadata(e,t){e.addFieldOffset(2,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let i=t.length-1;i>=0;i--)e.addOffset(t[i]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static addFeatures(e,t){e.addFieldOffset(3,t,0)}static createFeaturesVector(e,t){e.startVector(8,t.length,8);for(let i=t.length-1;i>=0;i--)e.addInt64(t[i]);return e.endVector()}static startFeaturesVector(e,t){e.startVector(8,t,8)}static endSchema(e){return e.endObject()}static finishSchemaBuffer(e,t){e.finish(t)}static finishSizePrefixedSchemaBuffer(e,t){e.finish(t,void 0,!0)}static createSchema(e,t,i,n,s){return Lt.startSchema(e),Lt.addEndianness(e,t),Lt.addFields(e,i),Lt.addCustomMetadata(e,n),Lt.addFeatures(e,s),Lt.endSchema(e)}};N.Schema=Lt});var yo=V(Ne=>{"use strict";Object.defineProperty(Ne,"__esModule",{value:!0});Ne.Message=Ne.DictionaryBatch=Ne.RecordBatch=Ne.BodyCompression=Ne.FieldNode=Ne.MessageHeader=Ne.BodyCompressionMethod=Ne.CompressionType=void 0;var ho=gr(),po=$r(),Pu;(function(r){r[r.LZ4_FRAME=0]="LZ4_FRAME",r[r.ZSTD=1]="ZSTD"})(Pu=Ne.CompressionType||(Ne.CompressionType={}));var ku;(function(r){r[r.BUFFER=0]="BUFFER"})(ku=Ne.BodyCompressionMethod||(Ne.BodyCompressionMethod={}));var Ru;(function(r){r[r.NONE=0]="NONE",r[r.Schema=1]="Schema",r[r.DictionaryBatch=2]="DictionaryBatch",r[r.RecordBatch=3]="RecordBatch",r[r.Tensor=4]="Tensor",r[r.SparseTensor=5]="SparseTensor"})(Ru=Ne.MessageHeader||(Ne.MessageHeader={}));var Nu=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}length(){return this.bb.readInt64(this.bb_pos)}nullCount(){return this.bb.readInt64(this.bb_pos+8)}static createFieldNode(e,t,i){return e.prep(8,16),e.writeInt64(i),e.writeInt64(t),e.offset()}};Ne.FieldNode=Nu;var Qt=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsBodyCompression(e,t){return(t||new Qt).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBodyCompression(e,t){return e.setPosition(e.position()+ho.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Qt).__init(e.readInt32(e.position())+e.position(),e)}codec(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt8(this.bb_pos+e):Pu.LZ4_FRAME}method(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt8(this.bb_pos+e):ku.BUFFER}static startBodyCompression(e){e.startObject(2)}static addCodec(e,t){e.addFieldInt8(0,t,Pu.LZ4_FRAME)}static addMethod(e,t){e.addFieldInt8(1,t,ku.BUFFER)}static endBodyCompression(e){return e.endObject()}static createBodyCompression(e,t,i){return Qt.startBodyCompression(e),Qt.addCodec(e,t),Qt.addMethod(e,i),Qt.endBodyCompression(e)}};Ne.BodyCompression=Qt;var gt=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsRecordBatch(e,t){return(t||new gt).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsRecordBatch(e,t){return e.setPosition(e.position()+ho.flatbuffers.SIZE_PREFIX_LENGTH),(t||new gt).__init(e.readInt32(e.position())+e.position(),e)}length(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt64(this.bb_pos+e):this.bb.createLong(0,0)}nodes(e,t){let i=this.bb.__offset(this.bb_pos,6);return i?(t||new Nu).__init(this.bb.__vector(this.bb_pos+i)+e*16,this.bb):null}nodesLength(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}buffers(e,t){let i=this.bb.__offset(this.bb_pos,8);return i?(t||new po.Buffer).__init(this.bb.__vector(this.bb_pos+i)+e*16,this.bb):null}buffersLength(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}compression(e){let t=this.bb.__offset(this.bb_pos,10);return t?(e||new Qt).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}static startRecordBatch(e){e.startObject(4)}static addLength(e,t){e.addFieldInt64(0,t,e.createLong(0,0))}static addNodes(e,t){e.addFieldOffset(1,t,0)}static startNodesVector(e,t){e.startVector(16,t,8)}static addBuffers(e,t){e.addFieldOffset(2,t,0)}static startBuffersVector(e,t){e.startVector(16,t,8)}static addCompression(e,t){e.addFieldOffset(3,t,0)}static endRecordBatch(e){return e.endObject()}static createRecordBatch(e,t,i,n,s){return gt.startRecordBatch(e),gt.addLength(e,t),gt.addNodes(e,i),gt.addBuffers(e,n),gt.addCompression(e,s),gt.endRecordBatch(e)}};Ne.RecordBatch=gt;var er=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsDictionaryBatch(e,t){return(t||new er).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDictionaryBatch(e,t){return e.setPosition(e.position()+ho.flatbuffers.SIZE_PREFIX_LENGTH),(t||new er).__init(e.readInt32(e.position())+e.position(),e)}id(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt64(this.bb_pos+e):this.bb.createLong(0,0)}data(e){let t=this.bb.__offset(this.bb_pos,6);return t?(e||new gt).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}isDelta(){let e=this.bb.__offset(this.bb_pos,8);return e?!!this.bb.readInt8(this.bb_pos+e):!1}static startDictionaryBatch(e){e.startObject(3)}static addId(e,t){e.addFieldInt64(0,t,e.createLong(0,0))}static addData(e,t){e.addFieldOffset(1,t,0)}static addIsDelta(e,t){e.addFieldInt8(2,+t,0)}static endDictionaryBatch(e){return e.endObject()}static createDictionaryBatch(e,t,i,n){return er.startDictionaryBatch(e),er.addId(e,t),er.addData(e,i),er.addIsDelta(e,n),er.endDictionaryBatch(e)}};Ne.DictionaryBatch=er;var vt=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsMessage(e,t){return(t||new vt).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsMessage(e,t){return e.setPosition(e.position()+ho.flatbuffers.SIZE_PREFIX_LENGTH),(t||new vt).__init(e.readInt32(e.position())+e.position(),e)}version(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):po.MetadataVersion.V1}headerType(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readUint8(this.bb_pos+e):Ru.NONE}header(e){let t=this.bb.__offset(this.bb_pos,8);return t?this.bb.__union(e,this.bb_pos+t):null}bodyLength(){let e=this.bb.__offset(this.bb_pos,10);return e?this.bb.readInt64(this.bb_pos+e):this.bb.createLong(0,0)}customMetadata(e,t){let i=this.bb.__offset(this.bb_pos,12);return i?(t||new po.KeyValue).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+e*4),this.bb):null}customMetadataLength(){let e=this.bb.__offset(this.bb_pos,12);return e?this.bb.__vector_len(this.bb_pos+e):0}static startMessage(e){e.startObject(5)}static addVersion(e,t){e.addFieldInt16(0,t,po.MetadataVersion.V1)}static addHeaderType(e,t){e.addFieldInt8(1,t,Ru.NONE)}static addHeader(e,t){e.addFieldOffset(2,t,0)}static addBodyLength(e,t){e.addFieldInt64(3,t,e.createLong(0,0))}static addCustomMetadata(e,t){e.addFieldOffset(4,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let i=t.length-1;i>=0;i--)e.addOffset(t[i]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static endMessage(e){return e.endObject()}static finishMessageBuffer(e,t){e.finish(t)}static finishSizePrefixedMessageBuffer(e,t){e.finish(t,void 0,!0)}static createMessage(e,t,i,n,s,c){return vt.startMessage(e),vt.addVersion(e,t),vt.addHeaderType(e,i),vt.addHeader(e,n),vt.addBodyLength(e,s),vt.addCustomMetadata(e,c),vt.endMessage(e)}};Ne.Message=vt});var Te=V(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.BufferType=Me.Type=Me.MessageHeader=Me.MetadataVersion=Me.IntervalUnit=Me.UnionMode=Me.Precision=Me.TimeUnit=Me.DateUnit=void 0;var sn=$r();Object.defineProperty(Me,"DateUnit",{enumerable:!0,get:function(){return sn.DateUnit}});Object.defineProperty(Me,"TimeUnit",{enumerable:!0,get:function(){return sn.TimeUnit}});Object.defineProperty(Me,"Precision",{enumerable:!0,get:function(){return sn.Precision}});Object.defineProperty(Me,"UnionMode",{enumerable:!0,get:function(){return sn.UnionMode}});Object.defineProperty(Me,"IntervalUnit",{enumerable:!0,get:function(){return sn.IntervalUnit}});Object.defineProperty(Me,"MetadataVersion",{enumerable:!0,get:function(){return sn.MetadataVersion}});var i1=yo();Object.defineProperty(Me,"MessageHeader",{enumerable:!0,get:function(){return i1.MessageHeader}});var n1;(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"})(n1=Me.Type||(Me.Type={}));var s1;(function(r){r[r.OFFSET=0]="OFFSET",r[r.DATA=1]="DATA",r[r.VALIDITY=2]="VALIDITY",r[r.TYPE=3]="TYPE"})(s1=Me.BufferType||(Me.BufferType={}))});var tr=V(Ee=>{"use strict";Object.defineProperty(Ee,"__esModule",{value:!0});Ee.popcnt_uint32=Ee.popcnt_array=Ee.popcnt_bit_range=Ee.BitIterator=Ee.packBools=Ee.truncateBitmap=Ee.setBool=Ee.getBit=Ee.getBool=void 0;function Ey(r,e,t,i){return(t&1<<i)!=0}Ee.getBool=Ey;function Ly(r,e,t,i){return(t&1<<i)>>i}Ee.getBit=Ly;function o1(r,e,t){return t?!!(r[e>>3]|=1<<e%8)||!0:!(r[e>>3]&=~(1<<e%8))&&!1}Ee.setBool=o1;function a1(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):qy(new mo(t,r,e,null,Ey)).subarray(0,i)),n}return t}Ee.truncateBitmap=a1;function qy(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 s=new Uint8Array(e.length+7&~7);return s.set(e),s}Ee.packBools=qy;var mo=class{constructor(e,t,i,n,s){this.bytes=e,this.length=i,this.context=n,this.get=s,this.bit=t%8,this.byteIndex=t>>3,this.byte=e[this.byteIndex++],this.index=0}next(){return this.index<this.length?(this.bit===8&&(this.bit=0,this.byte=this.bytes[this.byteIndex++]),{value:this.get(this.context,this.index++,this.byte,this.bit++)}):{done:!0,value:null}}[Symbol.iterator](){return this}};Ee.BitIterator=mo;function xu(r,e,t){if(t-e<=0)return 0;if(t-e<8){let s=0;for(let c of new mo(r,e,t-e,r,Ly))s+=c;return s}let i=t>>3<<3,n=e+(e%8==0?0:8-e%8);return xu(r,e,n)+xu(r,i,t)+zy(r,n>>3,i-n>>3)}Ee.popcnt_bit_range=xu;function zy(r,e,t){let i=0,n=e|0,s=new DataView(r.buffer,r.byteOffset,r.byteLength),c=t===void 0?r.byteLength:n+t;for(;c-n>=4;)i+=_o(s.getUint32(n)),n+=4;for(;c-n>=2;)i+=_o(s.getUint16(n)),n+=2;for(;c-n>=1;)i+=_o(s.getUint8(n)),n+=1;return i}Ee.popcnt_array=zy;function _o(r){let e=r|0;return e=e-(e>>>1&1431655765),e=(e&858993459)+(e>>>2&858993459),(e+(e>>>4)&252645135)*16843009>>>24}Ee.popcnt_uint32=_o});var be=V(k=>{"use strict";Object.defineProperty(k,"__esModule",{value:!0});k.strideForType=k.Dictionary=k.Map_=k.FixedSizeList=k.FixedSizeBinary=k.SparseUnion=k.DenseUnion=k.Union=k.Struct=k.List=k.IntervalYearMonth=k.IntervalDayTime=k.Interval=k.TimestampNanosecond=k.TimestampMicrosecond=k.TimestampMillisecond=k.TimestampSecond=k.Timestamp=k.TimeNanosecond=k.TimeMicrosecond=k.TimeMillisecond=k.TimeSecond=k.Time=k.DateMillisecond=k.DateDay=k.Date_=k.Decimal=k.Bool=k.Utf8=k.Binary=k.Float64=k.Float32=k.Float16=k.Float=k.Uint64=k.Uint32=k.Uint16=k.Uint8=k.Int64=k.Int32=k.Int16=k.Int8=k.Int=k.Null=k.DataType=void 0;var L=Te(),Ve=class{static isNull(e){return e&&e.typeId===L.Type.Null}static isInt(e){return e&&e.typeId===L.Type.Int}static isFloat(e){return e&&e.typeId===L.Type.Float}static isBinary(e){return e&&e.typeId===L.Type.Binary}static isUtf8(e){return e&&e.typeId===L.Type.Utf8}static isBool(e){return e&&e.typeId===L.Type.Bool}static isDecimal(e){return e&&e.typeId===L.Type.Decimal}static isDate(e){return e&&e.typeId===L.Type.Date}static isTime(e){return e&&e.typeId===L.Type.Time}static isTimestamp(e){return e&&e.typeId===L.Type.Timestamp}static isInterval(e){return e&&e.typeId===L.Type.Interval}static isList(e){return e&&e.typeId===L.Type.List}static isStruct(e){return e&&e.typeId===L.Type.Struct}static isUnion(e){return e&&e.typeId===L.Type.Union}static isFixedSizeBinary(e){return e&&e.typeId===L.Type.FixedSizeBinary}static isFixedSizeList(e){return e&&e.typeId===L.Type.FixedSizeList}static isMap(e){return e&&e.typeId===L.Type.Map}static isDictionary(e){return e&&e.typeId===L.Type.Dictionary}get typeId(){return L.Type.NONE}};k.DataType=Ve;Ve[Symbol.toStringTag]=(r=>(r.children=null,r.ArrayType=Array,r[Symbol.toStringTag]="DataType"))(Ve.prototype);var bo=class extends Ve{toString(){return"Null"}get typeId(){return L.Type.Null}};k.Null=bo;bo[Symbol.toStringTag]=(r=>r[Symbol.toStringTag]="Null")(bo.prototype);var jt=class extends Ve{constructor(e,t){super();this.isSigned=e,this.bitWidth=t}get typeId(){return L.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}`}};k.Int=jt;jt[Symbol.toStringTag]=(r=>(r.isSigned=null,r.bitWidth=null,r[Symbol.toStringTag]="Int"))(jt.prototype);var Eu=class extends jt{constructor(){super(!0,8)}};k.Int8=Eu;var Lu=class extends jt{constructor(){super(!0,16)}};k.Int16=Lu;var qu=class extends jt{constructor(){super(!0,32)}};k.Int32=qu;var zu=class extends jt{constructor(){super(!0,64)}};k.Int64=zu;var Wu=class extends jt{constructor(){super(!1,8)}};k.Uint8=Wu;var Hu=class extends jt{constructor(){super(!1,16)}};k.Uint16=Hu;var Yu=class extends jt{constructor(){super(!1,32)}};k.Uint32=Yu;var $u=class extends jt{constructor(){super(!1,64)}};k.Uint64=$u;Object.defineProperty(Eu.prototype,"ArrayType",{value:Int8Array});Object.defineProperty(Lu.prototype,"ArrayType",{value:Int16Array});Object.defineProperty(qu.prototype,"ArrayType",{value:Int32Array});Object.defineProperty(zu.prototype,"ArrayType",{value:Int32Array});Object.defineProperty(Wu.prototype,"ArrayType",{value:Uint8Array});Object.defineProperty(Hu.prototype,"ArrayType",{value:Uint16Array});Object.defineProperty(Yu.prototype,"ArrayType",{value:Uint32Array});Object.defineProperty($u.prototype,"ArrayType",{value:Uint32Array});var ki=class extends Ve{constructor(e){super();this.precision=e}get typeId(){return L.Type.Float}get ArrayType(){switch(this.precision){case L.Precision.HALF:return Uint16Array;case L.Precision.SINGLE:return Float32Array;case L.Precision.DOUBLE:return Float64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}};k.Float=ki;ki[Symbol.toStringTag]=(r=>(r.precision=null,r[Symbol.toStringTag]="Float"))(ki.prototype);var Gu=class extends ki{constructor(){super(L.Precision.HALF)}};k.Float16=Gu;var Ju=class extends ki{constructor(){super(L.Precision.SINGLE)}};k.Float32=Ju;var Ku=class extends ki{constructor(){super(L.Precision.DOUBLE)}};k.Float64=Ku;Object.defineProperty(Gu.prototype,"ArrayType",{value:Uint16Array});Object.defineProperty(Ju.prototype,"ArrayType",{value:Float32Array});Object.defineProperty(Ku.prototype,"ArrayType",{value:Float64Array});var go=class extends Ve{constructor(){super()}get typeId(){return L.Type.Binary}toString(){return"Binary"}};k.Binary=go;go[Symbol.toStringTag]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Binary"))(go.prototype);var vo=class extends Ve{constructor(){super()}get typeId(){return L.Type.Utf8}toString(){return"Utf8"}};k.Utf8=vo;vo[Symbol.toStringTag]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Utf8"))(vo.prototype);var jo=class extends Ve{constructor(){super()}get typeId(){return L.Type.Bool}toString(){return"Bool"}};k.Bool=jo;jo[Symbol.toStringTag]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Bool"))(jo.prototype);var wo=class extends Ve{constructor(e,t){super();this.scale=e,this.precision=t}get typeId(){return L.Type.Decimal}toString(){return`Decimal[${this.precision}e${this.scale>0?"+":""}${this.scale}]`}};k.Decimal=wo;wo[Symbol.toStringTag]=(r=>(r.scale=null,r.precision=null,r.ArrayType=Uint32Array,r[Symbol.toStringTag]="Decimal"))(wo.prototype);var on=class extends Ve{constructor(e){super();this.unit=e}get typeId(){return L.Type.Date}toString(){return`Date${(this.unit+1)*32}<${L.DateUnit[this.unit]}>`}};k.Date_=on;on[Symbol.toStringTag]=(r=>(r.unit=null,r.ArrayType=Int32Array,r[Symbol.toStringTag]="Date"))(on.prototype);var Wy=class extends on{constructor(){super(L.DateUnit.DAY)}};k.DateDay=Wy;var Hy=class extends on{constructor(){super(L.DateUnit.MILLISECOND)}};k.DateMillisecond=Hy;var Gr=class extends Ve{constructor(e,t){super();this.unit=e,this.bitWidth=t}get typeId(){return L.Type.Time}toString(){return`Time${this.bitWidth}<${L.TimeUnit[this.unit]}>`}};k.Time=Gr;Gr[Symbol.toStringTag]=(r=>(r.unit=null,r.bitWidth=null,r.ArrayType=Int32Array,r[Symbol.toStringTag]="Time"))(Gr.prototype);var Yy=class extends Gr{constructor(){super(L.TimeUnit.SECOND,32)}};k.TimeSecond=Yy;var $y=class extends Gr{constructor(){super(L.TimeUnit.MILLISECOND,32)}};k.TimeMillisecond=$y;var Gy=class extends Gr{constructor(){super(L.TimeUnit.MICROSECOND,64)}};k.TimeMicrosecond=Gy;var Jy=class extends Gr{constructor(){super(L.TimeUnit.NANOSECOND,64)}};k.TimeNanosecond=Jy;var Jr=class extends Ve{constructor(e,t){super();this.unit=e,this.timezone=t}get typeId(){return L.Type.Timestamp}toString(){return`Timestamp<${L.TimeUnit[this.unit]}${this.timezone?`, ${this.timezone}`:""}>`}};k.Timestamp=Jr;Jr[Symbol.toStringTag]=(r=>(r.unit=null,r.timezone=null,r.ArrayType=Int32Array,r[Symbol.toStringTag]="Timestamp"))(Jr.prototype);var Ky=class extends Jr{constructor(e){super(L.TimeUnit.SECOND,e)}};k.TimestampSecond=Ky;var Zy=class extends Jr{constructor(e){super(L.TimeUnit.MILLISECOND,e)}};k.TimestampMillisecond=Zy;var Xy=class extends Jr{constructor(e){super(L.TimeUnit.MICROSECOND,e)}};k.TimestampMicrosecond=Xy;var Qy=class extends Jr{constructor(e){super(L.TimeUnit.NANOSECOND,e)}};k.TimestampNanosecond=Qy;var an=class extends Ve{constructor(e){super();this.unit=e}get typeId(){return L.Type.Interval}toString(){return`Interval<${L.IntervalUnit[this.unit]}>`}};k.Interval=an;an[Symbol.toStringTag]=(r=>(r.unit=null,r.ArrayType=Int32Array,r[Symbol.toStringTag]="Interval"))(an.prototype);var em=class extends an{constructor(){super(L.IntervalUnit.DAY_TIME)}};k.IntervalDayTime=em;var tm=class extends an{constructor(){super(L.IntervalUnit.YEAR_MONTH)}};k.IntervalYearMonth=tm;var Bo=class extends Ve{constructor(e){super();this.children=[e]}get typeId(){return L.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}};k.List=Bo;Bo[Symbol.toStringTag]=(r=>(r.children=null,r[Symbol.toStringTag]="List"))(Bo.prototype);var To=class extends Ve{constructor(e){super();this.children=e}get typeId(){return L.Type.Struct}toString(){return`Struct<{${this.children.map(e=>`${e.name}:${e.type}`).join(", ")}}>`}};k.Struct=To;To[Symbol.toStringTag]=(r=>(r.children=null,r[Symbol.toStringTag]="Struct"))(To.prototype);var un=class extends Ve{constructor(e,t,i){super();this.mode=e,this.children=i,this.typeIds=t=Int32Array.from(t),this.typeIdToChildIndex=t.reduce((n,s,c)=>(n[s]=c)&&n||n,Object.create(null))}get typeId(){return L.Type.Union}toString(){return`${this[Symbol.toStringTag]}<${this.children.map(e=>`${e.type}`).join(" | ")}>`}};k.Union=un;un[Symbol.toStringTag]=(r=>(r.mode=null,r.typeIds=null,r.children=null,r.typeIdToChildIndex=null,r.ArrayType=Int8Array,r[Symbol.toStringTag]="Union"))(un.prototype);var rm=class extends un{constructor(e,t){super(L.UnionMode.Dense,e,t)}};k.DenseUnion=rm;var im=class extends un{constructor(e,t){super(L.UnionMode.Sparse,e,t)}};k.SparseUnion=im;var Io=class extends Ve{constructor(e){super();this.byteWidth=e}get typeId(){return L.Type.FixedSizeBinary}toString(){return`FixedSizeBinary[${this.byteWidth}]`}};k.FixedSizeBinary=Io;Io[Symbol.toStringTag]=(r=>(r.byteWidth=null,r.ArrayType=Uint8Array,r[Symbol.toStringTag]="FixedSizeBinary"))(Io.prototype);var So=class extends Ve{constructor(e,t){super();this.listSize=e,this.children=[t]}get typeId(){return L.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}>`}};k.FixedSizeList=So;So[Symbol.toStringTag]=(r=>(r.children=null,r.listSize=null,r[Symbol.toStringTag]="FixedSizeList"))(So.prototype);var Do=class extends Ve{constructor(e,t=!1){super();this.children=[e],this.keysSorted=t}get typeId(){return L.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(", ")}}>`}};k.Map_=Do;Do[Symbol.toStringTag]=(r=>(r.children=null,r.keysSorted=null,r[Symbol.toStringTag]="Map_"))(Do.prototype);var u1=(r=>()=>++r)(-1),Oo=class extends Ve{constructor(e,t,i,n){super();this.indices=t,this.dictionary=e,this.isOrdered=n||!1,this.id=i==null?u1():typeof i=="number"?i:i.low}get typeId(){return L.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}>`}};k.Dictionary=Oo;Oo[Symbol.toStringTag]=(r=>(r.id=null,r.indices=null,r.isOrdered=null,r.dictionary=null,r[Symbol.toStringTag]="Dictionary"))(Oo.prototype);function c1(r){let e=r;switch(r.typeId){case L.Type.Decimal:return 4;case L.Type.Timestamp:return 2;case L.Type.Date:return 1+e.unit;case L.Type.Interval:return 1+e.unit;case L.Type.Int:return 1+ +(e.bitWidth>32);case L.Type.Time:return 1+ +(e.bitWidth>32);case L.Type.FixedSizeList:return e.listSize;case L.Type.FixedSizeBinary:return e.byteWidth;default:return 1}}k.strideForType=c1});var qt=V(Ri=>{"use strict";Object.defineProperty(Ri,"__esModule",{value:!0});Ri.Data=Ri.kUnknownNullCount=void 0;var l1=tr(),d1=tr(),z=Te(),f1=be(),he=Ye();Ri.kUnknownNullCount=-1;var te=class{constructor(e,t,i,n,s,c,v){this.type=e,this.dictionary=v,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 te?S:S.data);let I;s instanceof te?(this.stride=s.stride,this.values=s.values,this.typeIds=s.typeIds,this.nullBitmap=s.nullBitmap,this.valueOffsets=s.valueOffsets):(this.stride=f1.strideForType(e),s&&((I=s[0])&&(this.valueOffsets=I),(I=s[1])&&(this.values=I),(I=s[2])&&(this.nullBitmap=I),(I=s[3])&&(this.typeIds=I)))}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:s}=this;return t&&(e+=t.byteLength),i&&(e+=i.byteLength),n&&(e+=n.byteLength),s&&(e+=s.byteLength),this.childData.reduce((c,v)=>c+v.byteLength,e)}get nullCount(){let e=this._nullCount,t;return e<=Ri.kUnknownNullCount&&(t=this.nullBitmap)&&(this._nullCount=e=this.length-d1.popcnt_bit_range(t,this.offset,this.offset+this.length)),e}clone(e,t=this.offset,i=this.length,n=this._nullCount,s=this,c=this.childData){return new te(e,t,i,n,s,c,this.dictionary)}slice(e,t){let{stride:i,typeId:n,childData:s}=this,c=+(this._nullCount===0)-1,v=n===16?i:1,I=this._sliceBuffers(e,t,i,n);return this.clone(this.type,this.offset+e,t,c,I,!s.length||this.valueOffsets?s:this._sliceChildren(s,v*e,v*t))}_changeLengthAndBackfillNullBitmap(e){if(this.typeId===z.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(l1.truncateBitmap(this.offset,t,this.nullBitmap),0);let s=this.buffers;return s[z.BufferType.VALIDITY]=n,this.clone(this.type,0,e,i+(e-t),s)}_sliceBuffers(e,t,i,n){let s,{buffers:c}=this;return(s=c[z.BufferType.TYPE])&&(c[z.BufferType.TYPE]=s.subarray(e,e+t)),(s=c[z.BufferType.OFFSET])&&(c[z.BufferType.OFFSET]=s.subarray(e,e+t+1))||(s=c[z.BufferType.DATA])&&(c[z.BufferType.DATA]=n===6?s:s.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,s,c,v){switch(s instanceof te?s=s.buffers:s||(s=[]),e.typeId){case z.Type.Null:return te.Null(e,t,i);case z.Type.Int:return te.Int(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.DATA]||[]);case z.Type.Dictionary:return te.Dictionary(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.DATA]||[],v);case z.Type.Float:return te.Float(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.DATA]||[]);case z.Type.Bool:return te.Bool(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.DATA]||[]);case z.Type.Decimal:return te.Decimal(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.DATA]||[]);case z.Type.Date:return te.Date(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.DATA]||[]);case z.Type.Time:return te.Time(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.DATA]||[]);case z.Type.Timestamp:return te.Timestamp(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.DATA]||[]);case z.Type.Interval:return te.Interval(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.DATA]||[]);case z.Type.FixedSizeBinary:return te.FixedSizeBinary(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.DATA]||[]);case z.Type.Binary:return te.Binary(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.OFFSET]||[],s[z.BufferType.DATA]||[]);case z.Type.Utf8:return te.Utf8(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.OFFSET]||[],s[z.BufferType.DATA]||[]);case z.Type.List:return te.List(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.OFFSET]||[],(c||[])[0]);case z.Type.FixedSizeList:return te.FixedSizeList(e,t,i,n||0,s[z.BufferType.VALIDITY],(c||[])[0]);case z.Type.Struct:return te.Struct(e,t,i,n||0,s[z.BufferType.VALIDITY],c||[]);case z.Type.Map:return te.Map(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.OFFSET]||[],(c||[])[0]);case z.Type.Union:return te.Union(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.TYPE]||[],s[z.BufferType.OFFSET]||c,c)}throw new Error(`Unrecognized typeId ${e.typeId}`)}static Null(e,t,i){return new te(e,t,i,0)}static Int(e,t,i,n,s,c){return new te(e,t,i,n,[void 0,he.toArrayBufferView(e.ArrayType,c),he.toUint8Array(s)])}static Dictionary(e,t,i,n,s,c,v){return new te(e,t,i,n,[void 0,he.toArrayBufferView(e.indices.ArrayType,c),he.toUint8Array(s)],[],v)}static Float(e,t,i,n,s,c){return new te(e,t,i,n,[void 0,he.toArrayBufferView(e.ArrayType,c),he.toUint8Array(s)])}static Bool(e,t,i,n,s,c){return new te(e,t,i,n,[void 0,he.toArrayBufferView(e.ArrayType,c),he.toUint8Array(s)])}static Decimal(e,t,i,n,s,c){return new te(e,t,i,n,[void 0,he.toArrayBufferView(e.ArrayType,c),he.toUint8Array(s)])}static Date(e,t,i,n,s,c){return new te(e,t,i,n,[void 0,he.toArrayBufferView(e.ArrayType,c),he.toUint8Array(s)])}static Time(e,t,i,n,s,c){return new te(e,t,i,n,[void 0,he.toArrayBufferView(e.ArrayType,c),he.toUint8Array(s)])}static Timestamp(e,t,i,n,s,c){return new te(e,t,i,n,[void 0,he.toArrayBufferView(e.ArrayType,c),he.toUint8Array(s)])}static Interval(e,t,i,n,s,c){return new te(e,t,i,n,[void 0,he.toArrayBufferView(e.ArrayType,c),he.toUint8Array(s)])}static FixedSizeBinary(e,t,i,n,s,c){return new te(e,t,i,n,[void 0,he.toArrayBufferView(e.ArrayType,c),he.toUint8Array(s)])}static Binary(e,t,i,n,s,c,v){return new te(e,t,i,n,[he.toInt32Array(c),he.toUint8Array(v),he.toUint8Array(s)])}static Utf8(e,t,i,n,s,c,v){return new te(e,t,i,n,[he.toInt32Array(c),he.toUint8Array(v),he.toUint8Array(s)])}static List(e,t,i,n,s,c,v){return new te(e,t,i,n,[he.toInt32Array(c),void 0,he.toUint8Array(s)],v?[v]:[])}static FixedSizeList(e,t,i,n,s,c){return new te(e,t,i,n,[void 0,void 0,he.toUint8Array(s)],c?[c]:[])}static Struct(e,t,i,n,s,c){return new te(e,t,i,n,[void 0,void 0,he.toUint8Array(s)],c)}static Map(e,t,i,n,s,c,v){return new te(e,t,i,n,[he.toInt32Array(c),void 0,he.toUint8Array(s)],v?[v]:[])}static Union(e,t,i,n,s,c,v,I){let S=[void 0,void 0,he.toUint8Array(s),he.toArrayBufferView(e.ArrayType,c)];return e.mode===z.UnionMode.Sparse?new te(e,t,i,n,S,v):(S[z.BufferType.OFFSET]=he.toInt32Array(v),new te(e,t,i,n,S,I))}};Ri.Data=te;te.prototype.childData=Object.freeze([])});var Zu=V(Ao=>{"use strict";Object.defineProperty(Ao,"__esModule",{value:!0});Ao.valueToString=void 0;var h1=void 0;function p1(r){if(r===null)return"null";if(r===h1)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)}Ao.valueToString=p1});var nm=V(Fo=>{"use strict";Object.defineProperty(Fo,"__esModule",{value:!0});Fo.createIsValidFunction=void 0;var Xu=Zu(),y1=st();function m1(r){if(!r||r.length<=0)return function(n){return!0};let e="",t=r.filter(i=>i===i);return t.length>0&&(e=`
|
|
1
|
+
var duckdb=(()=>{var jS=Object.create;var so=Object.defineProperty;var wS=Object.getOwnPropertyDescriptor;var BS=Object.getOwnPropertyNames;var TS=Object.getPrototypeOf,IS=Object.prototype.hasOwnProperty;var Sy=r=>so(r,"__esModule",{value:!0});var V=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),SS=(r,e)=>{Sy(r);for(var t in e)so(r,t,{get:e[t],enumerable:!0})},DS=(r,e,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of BS(e))!IS.call(r,i)&&i!=="default"&&so(r,i,{get:()=>e[i],enumerable:!(t=wS(e,i))||t.enumerable});return r},Dy=r=>DS(Sy(so(r!=null?jS(TS(r)):{},"default",r&&r.__esModule&&"default"in r?{get:()=>r.default,enumerable:!0}:{value:r,enumerable:!0})),r);var gr=V(Fy=>{var A={};A.Offset;A.Table;A.SIZEOF_SHORT=2;A.SIZEOF_INT=4;A.FILE_IDENTIFIER_LENGTH=4;A.SIZE_PREFIX_LENGTH=4;A.Encoding={UTF8_BYTES:1,UTF16_STRING:2};A.int32=new Int32Array(2);A.float32=new Float32Array(A.int32.buffer);A.float64=new Float64Array(A.int32.buffer);A.isLittleEndian=new Uint16Array(new Uint8Array([1,0]).buffer)[0]===1;A.Long=function(r,e){this.low=r|0,this.high=e|0};A.Long.create=function(r,e){return r==0&&e==0?A.Long.ZERO:new A.Long(r,e)};A.Long.prototype.toFloat64=function(){return(this.low>>>0)+this.high*4294967296};A.Long.prototype.equals=function(r){return this.low==r.low&&this.high==r.high};A.Long.ZERO=new A.Long(0,0);A.Builder=function(r){if(r)var e=r;else var e=1024;this.bb=A.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};A.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};A.Builder.prototype.forceDefaults=function(r){this.force_defaults=r};A.Builder.prototype.dataBuffer=function(){return this.bb};A.Builder.prototype.asUint8Array=function(){return this.bb.bytes().subarray(this.bb.position(),this.bb.position()+this.offset())};A.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=A.Builder.growByteBuffer(this.bb),this.space+=this.bb.capacity()-i}this.pad(t)};A.Builder.prototype.pad=function(r){for(var e=0;e<r;e++)this.bb.writeInt8(--this.space,0)};A.Builder.prototype.writeInt8=function(r){this.bb.writeInt8(this.space-=1,r)};A.Builder.prototype.writeInt16=function(r){this.bb.writeInt16(this.space-=2,r)};A.Builder.prototype.writeInt32=function(r){this.bb.writeInt32(this.space-=4,r)};A.Builder.prototype.writeInt64=function(r){this.bb.writeInt64(this.space-=8,r)};A.Builder.prototype.writeFloat32=function(r){this.bb.writeFloat32(this.space-=4,r)};A.Builder.prototype.writeFloat64=function(r){this.bb.writeFloat64(this.space-=8,r)};A.Builder.prototype.addInt8=function(r){this.prep(1,0),this.writeInt8(r)};A.Builder.prototype.addInt16=function(r){this.prep(2,0),this.writeInt16(r)};A.Builder.prototype.addInt32=function(r){this.prep(4,0),this.writeInt32(r)};A.Builder.prototype.addInt64=function(r){this.prep(8,0),this.writeInt64(r)};A.Builder.prototype.addFloat32=function(r){this.prep(4,0),this.writeFloat32(r)};A.Builder.prototype.addFloat64=function(r){this.prep(8,0),this.writeFloat64(r)};A.Builder.prototype.addFieldInt8=function(r,e,t){(this.force_defaults||e!=t)&&(this.addInt8(e),this.slot(r))};A.Builder.prototype.addFieldInt16=function(r,e,t){(this.force_defaults||e!=t)&&(this.addInt16(e),this.slot(r))};A.Builder.prototype.addFieldInt32=function(r,e,t){(this.force_defaults||e!=t)&&(this.addInt32(e),this.slot(r))};A.Builder.prototype.addFieldInt64=function(r,e,t){(this.force_defaults||!e.equals(t))&&(this.addInt64(e),this.slot(r))};A.Builder.prototype.addFieldFloat32=function(r,e,t){(this.force_defaults||e!=t)&&(this.addFloat32(e),this.slot(r))};A.Builder.prototype.addFieldFloat64=function(r,e,t){(this.force_defaults||e!=t)&&(this.addFloat64(e),this.slot(r))};A.Builder.prototype.addFieldOffset=function(r,e,t){(this.force_defaults||e!=t)&&(this.addOffset(e),this.slot(r))};A.Builder.prototype.addFieldStruct=function(r,e,t){e!=t&&(this.nested(e),this.slot(r))};A.Builder.prototype.nested=function(r){if(r!=this.offset())throw new Error("FlatBuffers: struct must be serialized inline.")};A.Builder.prototype.notNested=function(){if(this.isNested)throw new Error("FlatBuffers: object serialization must not be nested.")};A.Builder.prototype.slot=function(r){this.vtable[r]=this.offset()};A.Builder.prototype.offset=function(){return this.bb.capacity()-this.space};A.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=A.ByteBuffer.allocate(t);return i.setPosition(t-e),i.bytes().set(r.bytes(),t-e),i};A.Builder.prototype.addOffset=function(r){this.prep(A.SIZEOF_INT,0),this.writeInt32(this.offset()-r+A.SIZEOF_INT)};A.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()};A.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)*A.SIZEOF_SHORT;this.addInt16(n);var s=0,c=this.space;e:for(e=0;e<this.vtables.length;e++){var v=this.bb.capacity()-this.vtables[e];if(n==this.bb.readInt16(v)){for(var I=A.SIZEOF_SHORT;I<n;I+=A.SIZEOF_SHORT)if(this.bb.readInt16(c+I)!=this.bb.readInt16(v+I))continue e;s=this.vtables[e];break}}return s?(this.space=this.bb.capacity()-r,this.bb.writeInt32(this.space,s-r)):(this.vtables.push(this.offset()),this.bb.writeInt32(this.bb.capacity()-r,this.offset()-r)),this.isNested=!1,r};A.Builder.prototype.finish=function(r,e,t){var i=t?A.SIZE_PREFIX_LENGTH:0;if(e){var n=e;if(this.prep(this.minalign,A.SIZEOF_INT+A.FILE_IDENTIFIER_LENGTH+i),n.length!=A.FILE_IDENTIFIER_LENGTH)throw new Error("FlatBuffers: file identifier must be length "+A.FILE_IDENTIFIER_LENGTH);for(var s=A.FILE_IDENTIFIER_LENGTH-1;s>=0;s--)this.writeInt8(n.charCodeAt(s))}this.prep(this.minalign,A.SIZEOF_INT+i),this.addOffset(r),i&&this.addInt32(this.bb.capacity()-this.space),this.bb.setPosition(this.space)};A.Builder.prototype.finishSizePrefixed=function(r,e){this.finish(r,e,!0)};A.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")};A.Builder.prototype.startVector=function(r,e,t){this.notNested(),this.vector_num_elems=e,this.prep(A.SIZEOF_INT,r*e),this.prep(t,r*e)};A.Builder.prototype.endVector=function(){return this.writeInt32(this.vector_num_elems),this.offset()};A.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 s=r.charCodeAt(t++);i=(n<<10)+s+(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,v=this.bb.bytes();t<e.length;t++)v[c++]=e[t];return this.endVector()};A.Builder.prototype.createLong=function(r,e){return A.Long.create(r,e)};A.ByteBuffer=function(r){this.bytes_=r,this.position_=0};A.ByteBuffer.allocate=function(r){return new A.ByteBuffer(new Uint8Array(r))};A.ByteBuffer.prototype.clear=function(){this.position_=0};A.ByteBuffer.prototype.bytes=function(){return this.bytes_};A.ByteBuffer.prototype.position=function(){return this.position_};A.ByteBuffer.prototype.setPosition=function(r){this.position_=r};A.ByteBuffer.prototype.capacity=function(){return this.bytes_.length};A.ByteBuffer.prototype.readInt8=function(r){return this.readUint8(r)<<24>>24};A.ByteBuffer.prototype.readUint8=function(r){return this.bytes_[r]};A.ByteBuffer.prototype.readInt16=function(r){return this.readUint16(r)<<16>>16};A.ByteBuffer.prototype.readUint16=function(r){return this.bytes_[r]|this.bytes_[r+1]<<8};A.ByteBuffer.prototype.readInt32=function(r){return this.bytes_[r]|this.bytes_[r+1]<<8|this.bytes_[r+2]<<16|this.bytes_[r+3]<<24};A.ByteBuffer.prototype.readUint32=function(r){return this.readInt32(r)>>>0};A.ByteBuffer.prototype.readInt64=function(r){return new A.Long(this.readInt32(r),this.readInt32(r+4))};A.ByteBuffer.prototype.readUint64=function(r){return new A.Long(this.readUint32(r),this.readUint32(r+4))};A.ByteBuffer.prototype.readFloat32=function(r){return A.int32[0]=this.readInt32(r),A.float32[0]};A.ByteBuffer.prototype.readFloat64=function(r){return A.int32[A.isLittleEndian?0:1]=this.readInt32(r),A.int32[A.isLittleEndian?1:0]=this.readInt32(r+4),A.float64[0]};A.ByteBuffer.prototype.writeInt8=function(r,e){this.bytes_[r]=e};A.ByteBuffer.prototype.writeUint8=function(r,e){this.bytes_[r]=e};A.ByteBuffer.prototype.writeInt16=function(r,e){this.bytes_[r]=e,this.bytes_[r+1]=e>>8};A.ByteBuffer.prototype.writeUint16=function(r,e){this.bytes_[r]=e,this.bytes_[r+1]=e>>8};A.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};A.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};A.ByteBuffer.prototype.writeInt64=function(r,e){this.writeInt32(r,e.low),this.writeInt32(r+4,e.high)};A.ByteBuffer.prototype.writeUint64=function(r,e){this.writeUint32(r,e.low),this.writeUint32(r+4,e.high)};A.ByteBuffer.prototype.writeFloat32=function(r,e){A.float32[0]=e,this.writeInt32(r,A.int32[0])};A.ByteBuffer.prototype.writeFloat64=function(r,e){A.float64[0]=e,this.writeInt32(r,A.int32[A.isLittleEndian?0:1]),this.writeInt32(r+4,A.int32[A.isLittleEndian?1:0])};A.ByteBuffer.prototype.getBufferIdentifier=function(){if(this.bytes_.length<this.position_+A.SIZEOF_INT+A.FILE_IDENTIFIER_LENGTH)throw new Error("FlatBuffers: ByteBuffer is too short to contain an identifier.");for(var r="",e=0;e<A.FILE_IDENTIFIER_LENGTH;e++)r+=String.fromCharCode(this.readInt8(this.position_+A.SIZEOF_INT+e));return r};A.ByteBuffer.prototype.__offset=function(r,e){var t=r-this.readInt32(r);return e<this.readInt16(t)?this.readInt16(t+e):0};A.ByteBuffer.prototype.__union=function(r,e){return r.bb_pos=e+this.readInt32(e),r.bb=this,r};A.ByteBuffer.prototype.__string=function(r,e){r+=this.readInt32(r);var t=this.readInt32(r),i="",n=0;if(r+=A.SIZEOF_INT,e===A.Encoding.UTF8_BYTES)return this.bytes_.subarray(r,r+t);for(;n<t;){var s,c=this.readUint8(r+n++);if(c<192)s=c;else{var v=this.readUint8(r+n++);if(c<224)s=(c&31)<<6|v&63;else{var I=this.readUint8(r+n++);if(c<240)s=(c&15)<<12|(v&63)<<6|I&63;else{var S=this.readUint8(r+n++);s=(c&7)<<18|(v&63)<<12|(I&63)<<6|S&63}}}s<65536?i+=String.fromCharCode(s):(s-=65536,i+=String.fromCharCode((s>>10)+55296,(s&(1<<10)-1)+56320))}return i};A.ByteBuffer.prototype.__indirect=function(r){return r+this.readInt32(r)};A.ByteBuffer.prototype.__vector=function(r){return r+this.readInt32(r)+A.SIZEOF_INT};A.ByteBuffer.prototype.__vector_len=function(r){return this.readInt32(r+this.readInt32(r))};A.ByteBuffer.prototype.__has_identifier=function(r){if(r.length!=A.FILE_IDENTIFIER_LENGTH)throw new Error("FlatBuffers: file identifier must be length "+A.FILE_IDENTIFIER_LENGTH);for(var e=0;e<A.FILE_IDENTIFIER_LENGTH;e++)if(r.charCodeAt(e)!=this.readInt8(this.position_+A.SIZEOF_INT+e))return!1;return!0};A.ByteBuffer.prototype.createLong=function(r,e){return A.Long.create(r,e)};Fy.flatbuffers=A});var My=V(wu=>{"use strict";function vr(r,e,t){return e<=r&&r<=t}function oo(r){if(r===void 0)return{};if(r===Object(r))return r;throw TypeError("Could not convert argument to dictionary")}function VS(r){for(var e=String(r),t=e.length,i=0,n=[];i<t;){var s=e.charCodeAt(i);if(s<55296||s>57343)n.push(s);else if(56320<=s&&s<=57343)n.push(65533);else if(55296<=s&&s<=56319)if(i===t-1)n.push(65533);else{var c=r.charCodeAt(i+1);if(56320<=c&&c<=57343){var v=s&1023,I=c&1023;n.push(65536+(v<<10)+I),i+=1}else n.push(65533)}i+=1}return n}function US(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 ao=-1;function vu(r){this.tokens=[].slice.call(r)}vu.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():ao},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 en=-1;function ju(r,e){if(r)throw TypeError("Decoder error");return e||65533}var uo="utf-8";function co(r,e){if(!(this instanceof co))return new co(r,e);if(r=r!==void 0?String(r).toLowerCase():uo,r!==uo)throw new Error("Encoding not supported. Only utf-8 is supported");e=oo(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})}co.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=oo(t),this._streaming||(this._decoder=new CS({fatal:this._fatal}),this._BOMseen=!1),this._streaming=Boolean(t.stream);for(var n=new vu(i),s=[],c;!n.endOfStream()&&(c=this._decoder.handler(n,n.read()),c!==en);)c!==null&&(Array.isArray(c)?s.push.apply(s,c):s.push(c));if(!this._streaming){do{if(c=this._decoder.handler(n,n.read()),c===en)break;c!==null&&(Array.isArray(c)?s.push.apply(s,c):s.push(c))}while(!n.endOfStream());this._decoder=null}return s.length&&["utf-8"].indexOf(this.encoding)!==-1&&!this._ignoreBOM&&!this._BOMseen&&(s[0]===65279?(this._BOMseen=!0,s.shift()):this._BOMseen=!0),US(s)}};function lo(r,e){if(!(this instanceof lo))return new lo(r,e);if(r=r!==void 0?String(r).toLowerCase():uo,r!==uo)throw new Error("Encoding not supported. Only utf-8 is supported");e=oo(e),this._streaming=!1,this._encoder=null,this._options={fatal:Boolean(e.fatal)},Object.defineProperty(this,"encoding",{value:"utf-8"})}lo.prototype={encode:function(e,t){e=e?String(e):"",t=oo(t),this._streaming||(this._encoder=new PS(this._options)),this._streaming=Boolean(t.stream);for(var i=[],n=new vu(VS(e)),s;!n.endOfStream()&&(s=this._encoder.handler(n,n.read()),s!==en);)Array.isArray(s)?i.push.apply(i,s):i.push(s);if(!this._streaming){for(;s=this._encoder.handler(n,n.read()),s!==en;)Array.isArray(s)?i.push.apply(i,s):i.push(s);this._encoder=null}return new Uint8Array(i)}};function CS(r){var e=r.fatal,t=0,i=0,n=0,s=128,c=191;this.handler=function(v,I){if(I===ao&&n!==0)return n=0,ju(e);if(I===ao)return en;if(n===0){if(vr(I,0,127))return I;if(vr(I,194,223))n=1,t=I-192;else if(vr(I,224,239))I===224&&(s=160),I===237&&(c=159),n=2,t=I-224;else if(vr(I,240,244))I===240&&(s=144),I===244&&(c=143),n=3,t=I-240;else return ju(e);return t=t<<6*n,null}if(!vr(I,s,c))return t=n=i=0,s=128,c=191,v.prepend(I),ju(e);if(s=128,c=191,i+=1,t+=I-128<<6*(n-i),i!==n)return null;var S=t;return t=n=i=0,S}}function PS(r){var e=r.fatal;this.handler=function(t,i){if(i===ao)return en;if(vr(i,0,127))return i;var n,s;vr(i,128,2047)?(n=1,s=192):vr(i,2048,65535)?(n=2,s=224):vr(i,65536,1114111)&&(n=3,s=240);for(var c=[(i>>6*n)+s];n>0;){var v=i>>6*(n-1);c.push(128|v&63),n-=1}return c}}wu.TextEncoder=lo;wu.TextDecoder=co});var Ti=V(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});tn.encodeUtf8=tn.decodeUtf8=void 0;var Vy=My(),kS=new(typeof TextDecoder!="undefined"?TextDecoder:Vy.TextDecoder)("utf-8");tn.decodeUtf8=r=>kS.decode(r);var RS=new(typeof TextEncoder!="undefined"?TextEncoder:Vy.TextEncoder);tn.encodeUtf8=r=>RS.encode(r)});var rn=V(lt=>{"use strict";Object.defineProperty(lt,"__esModule",{value:!0});lt.AsyncQueue=lt.ReadableInterop=lt.ArrowJSON=lt.ITERATOR_DONE=void 0;var Uy=ns();lt.ITERATOR_DONE=Object.freeze({done:!0,value:void 0});var Cy=class{constructor(e){this._json=e}get schema(){return this._json.schema}get batches(){return this._json.batches||[]}get dictionaries(){return this._json.dictionaries||[]}};lt.ArrowJSON=Cy;var Bu=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())}};lt.ReadableInterop=Bu;var Py=class extends Bu{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(lt.ITERATOR_DONE);this._closedPromiseResolve(),this._closedPromiseResolve=void 0}}[Symbol.asyncIterator](){return this}toDOMStream(e){return Uy.default.toDOMStream(this._closedPromiseResolve||this._error?this:this._values,e)}toNodeStream(e){return Uy.default.toNodeStream(this._closedPromiseResolve||this._error?this:this._values,e)}async throw(e){return await this.abort(e),lt.ITERATOR_DONE}async return(e){return await this.close(),lt.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(lt.ITERATOR_DONE)}_ensureOpen(){if(this._closedPromiseResolve)return!0;throw new Error(`${this} is closed`)}};lt.AsyncQueue=Py});var st=V(q=>{"use strict";Object.defineProperty(q,"__esModule",{value:!0});q.isReadableNodeStream=q.isWritableNodeStream=q.isReadableDOMStream=q.isWritableDOMStream=q.isFetchResponse=q.isFSReadStream=q.isFileHandle=q.isUnderlyingSink=q.isIteratorResult=q.isArrayLike=q.isArrowJSON=q.isAsyncIterable=q.isIterable=q.isObservable=q.isPromise=q.isObject=q.BigUint64ArrayAvailable=q.BigUint64Array=q.BigInt64ArrayAvailable=q.BigInt64Array=q.BigIntAvailable=q.BigInt=void 0;var fo=rn(),[xS,NS]=(()=>{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]})();q.BigInt=xS;q.BigIntAvailable=NS;var[ES,LS]=(()=>{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]})();q.BigInt64Array=ES;q.BigInt64ArrayAvailable=LS;var[qS,zS]=(()=>{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]})();q.BigUint64Array=qS;q.BigUint64ArrayAvailable=zS;var Tu=r=>typeof r=="number",ky=r=>typeof r=="boolean",et=r=>typeof r=="function";q.isObject=r=>r!=null&&Object(r)===r;q.isPromise=r=>q.isObject(r)&&et(r.then);q.isObservable=r=>q.isObject(r)&&et(r.subscribe);q.isIterable=r=>q.isObject(r)&&et(r[Symbol.iterator]);q.isAsyncIterable=r=>q.isObject(r)&&et(r[Symbol.asyncIterator]);q.isArrowJSON=r=>q.isObject(r)&&q.isObject(r.schema);q.isArrayLike=r=>q.isObject(r)&&Tu(r.length);q.isIteratorResult=r=>q.isObject(r)&&"done"in r&&"value"in r;q.isUnderlyingSink=r=>q.isObject(r)&&et(r.abort)&&et(r.close)&&et(r.start)&&et(r.write);q.isFileHandle=r=>q.isObject(r)&&et(r.stat)&&Tu(r.fd);q.isFSReadStream=r=>q.isReadableNodeStream(r)&&Tu(r.bytesRead);q.isFetchResponse=r=>q.isObject(r)&&q.isReadableDOMStream(r.body);q.isWritableDOMStream=r=>q.isObject(r)&&et(r.abort)&&et(r.getWriter)&&!(r instanceof fo.ReadableInterop);q.isReadableDOMStream=r=>q.isObject(r)&&et(r.cancel)&&et(r.getReader)&&!(r instanceof fo.ReadableInterop);q.isWritableNodeStream=r=>q.isObject(r)&&et(r.end)&&et(r.write)&&ky(r.writable)&&!(r instanceof fo.ReadableInterop);q.isReadableNodeStream=r=>q.isObject(r)&&et(r.read)&&et(r.pipe)&&ky(r.readable)&&!(r instanceof fo.ReadableInterop)});var Ye=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 WS=gr(),HS=Ti(),YS=WS.flatbuffers.ByteBuffer,Ii=st(),Iu=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:ArrayBuffer;function $S(r){let e=r[0]?[r[0]]:[],t,i,n,s;for(let c,v,I=0,S=0,U=r.length;++I<U;){if(c=e[S],v=r[I],!c||!v||c.buffer!==v.buffer||v.byteOffset<c.byteOffset){v&&(e[++S]=v);continue}if({byteOffset:t,byteLength:n}=c,{byteOffset:i,byteLength:s}=v,t+n<i||i+s<t){v&&(e[++S]=v);continue}e[S]=new Uint8Array(c.buffer,t,i-t+s)}return e}function Su(r,e,t=0,i=e.byteLength){let n=r.byteLength,s=new Uint8Array(r.buffer,r.byteOffset,n),c=new Uint8Array(e.buffer,e.byteOffset,Math.min(i,n));return s.set(c,t),r}E.memcpy=Su;function GS(r,e){let t=$S(r),i=t.reduce((U,G)=>U+G.byteLength,0),n,s,c,v=0,I=-1,S=Math.min(e||1/0,i);for(let U=t.length;++I<U;){if(n=t[I],s=n.subarray(0,Math.min(n.length,S-v)),S<=v+s.length){s.length<n.length?t[I]=n.subarray(s.length):s.length===n.length&&I++,c?Su(c,s,v):c=s;break}Su(c||(c=new Uint8Array(S)),s,v),v+=s.length}return[c||new Uint8Array(0),t.slice(I),i-(c?c.byteLength:0)]}E.joinUint8Arrays=GS;function ut(r,e){let t=Ii.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=HS.encodeUtf8(t)),t instanceof ArrayBuffer?new r(t):t instanceof Iu?new r(t):t instanceof YS?ut(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=ut;E.toInt8Array=r=>ut(Int8Array,r);E.toInt16Array=r=>ut(Int16Array,r);E.toInt32Array=r=>ut(Int32Array,r);E.toBigInt64Array=r=>ut(Ii.BigInt64Array,r);E.toUint8Array=r=>ut(Uint8Array,r);E.toUint16Array=r=>ut(Uint16Array,r);E.toUint32Array=r=>ut(Uint32Array,r);E.toBigUint64Array=r=>ut(Ii.BigUint64Array,r);E.toFloat32Array=r=>ut(Float32Array,r);E.toFloat64Array=r=>ut(Float64Array,r);E.toUint8ClampedArray=r=>ut(Uint8ClampedArray,r);var Du=r=>(r.next(),r);function*Kt(r,e){let t=function*(n){yield n},i=typeof e=="string"||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof Iu?t(e):Ii.isIterable(e)?e:t(e);return yield*Du(function*(n){let s=null;do s=n.next(yield ut(r,s));while(!s.done)}(i[Symbol.iterator]())),new r}E.toArrayBufferViewIterator=Kt;E.toInt8ArrayIterator=r=>Kt(Int8Array,r);E.toInt16ArrayIterator=r=>Kt(Int16Array,r);E.toInt32ArrayIterator=r=>Kt(Int32Array,r);E.toUint8ArrayIterator=r=>Kt(Uint8Array,r);E.toUint16ArrayIterator=r=>Kt(Uint16Array,r);E.toUint32ArrayIterator=r=>Kt(Uint32Array,r);E.toFloat32ArrayIterator=r=>Kt(Float32Array,r);E.toFloat64ArrayIterator=r=>Kt(Float64Array,r);E.toUint8ClampedArrayIterator=r=>Kt(Uint8ClampedArray,r);async function*xt(r,e){if(Ii.isPromise(e))return yield*xt(r,await e);let t=async function*(s){yield await s},i=async function*(s){yield*Du(function*(c){let v=null;do v=c.next(yield v&&v.value);while(!v.done)}(s[Symbol.iterator]()))},n=typeof e=="string"||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof Iu?t(e):Ii.isIterable(e)?i(e):Ii.isAsyncIterable(e)?e:t(e);return yield*Du(async function*(s){let c=null;do c=await s.next(yield ut(r,c));while(!c.done)}(n[Symbol.asyncIterator]())),new r}E.toArrayBufferViewAsyncIterator=xt;E.toInt8ArrayAsyncIterator=r=>xt(Int8Array,r);E.toInt16ArrayAsyncIterator=r=>xt(Int16Array,r);E.toInt32ArrayAsyncIterator=r=>xt(Int32Array,r);E.toUint8ArrayAsyncIterator=r=>xt(Uint8Array,r);E.toUint16ArrayAsyncIterator=r=>xt(Uint16Array,r);E.toUint32ArrayAsyncIterator=r=>xt(Uint32Array,r);E.toFloat32ArrayAsyncIterator=r=>xt(Float32Array,r);E.toFloat64ArrayAsyncIterator=r=>xt(Float64Array,r);E.toUint8ClampedArrayAsyncIterator=r=>xt(Uint8ClampedArray,r);function JS(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=JS;function KS(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=KS});var ns=V(Au=>{"use strict";Object.defineProperty(Au,"__esModule",{value:!0});var ct=Ye();Au.default={fromIterable(r){return ho(ZS(r))},fromAsyncIterable(r){return ho(XS(r))},fromDOMStream(r){return ho(QS(r))},fromNodeStream(r){return ho(e1(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 ho=r=>(r.next(),r);function*ZS(r){let e,t=!1,i=[],n,s,c,v=0;function I(){return s==="peek"?ct.joinUint8Arrays(i,c)[0]:([n,i,v]=ct.joinUint8Arrays(i,c),n)}({cmd:s,size:c}=yield null);let S=ct.toUint8ArrayIterator(r)[Symbol.iterator]();try{do if({done:e,value:n}=isNaN(c-v)?S.next(void 0):S.next(c-v),!e&&n.byteLength>0&&(i.push(n),v+=n.byteLength),e||c<=v)do({cmd:s,size:c}=yield I());while(c<v);while(!e)}catch(U){(t=!0)&&typeof S.throw=="function"&&S.throw(U)}finally{t===!1&&typeof S.return=="function"&&S.return(null)}return null}async function*XS(r){let e,t=!1,i=[],n,s,c,v=0;function I(){return s==="peek"?ct.joinUint8Arrays(i,c)[0]:([n,i,v]=ct.joinUint8Arrays(i,c),n)}({cmd:s,size:c}=yield null);let S=ct.toUint8ArrayAsyncIterator(r)[Symbol.asyncIterator]();try{do if({done:e,value:n}=isNaN(c-v)?await S.next(void 0):await S.next(c-v),!e&&n.byteLength>0&&(i.push(n),v+=n.byteLength),e||c<=v)do({cmd:s,size:c}=yield I());while(c<v);while(!e)}catch(U){(t=!0)&&typeof S.throw=="function"&&await S.throw(U)}finally{t===!1&&typeof S.return=="function"&&await S.return(new Uint8Array(0))}return null}async function*QS(r){let e=!1,t=!1,i=[],n,s,c,v=0;function I(){return s==="peek"?ct.joinUint8Arrays(i,c)[0]:([n,i,v]=ct.joinUint8Arrays(i,c),n)}({cmd:s,size:c}=yield null);let S=new Ry(r);try{do if({done:e,value:n}=isNaN(c-v)?await S.read(void 0):await S.read(c-v),!e&&n.byteLength>0&&(i.push(ct.toUint8Array(n)),v+=n.byteLength),e||c<=v)do({cmd:s,size:c}=yield I());while(c<v);while(!e)}catch(U){(t=!0)&&await S.cancel(U)}finally{t===!1?await S.cancel():r.locked&&S.releaseLock()}return null}var Ry=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=ct.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 xy(this.getBYOBReader(),new ArrayBuffer(e),0,e)}};async function xy(r,e,t,i){if(t>=i)return{done:!1,value:new Uint8Array(e,0,i)};let{done:n,value:s}=await r.read(new Uint8Array(e,t,i-t));return(t+=s.byteLength)<i&&!n?await xy(r,s.buffer,t,i):{done:n,value:new Uint8Array(s.buffer,0,t)}}var Ou=(r,e)=>{let t=n=>i([e,n]),i;return[e,t,new Promise(n=>(i=n)&&r.once(e,t))]};async function*e1(r){let e=[],t="error",i=!1,n=null,s,c,v=0,I=[],S;function U(){return s==="peek"?ct.joinUint8Arrays(I,c)[0]:([S,I,v]=ct.joinUint8Arrays(I,c),S)}if({cmd:s,size:c}=yield null,r.isTTY)return yield new Uint8Array(0),null;try{e[0]=Ou(r,"end"),e[1]=Ou(r,"error");do{if(e[2]=Ou(r,"readable"),[t,n]=await Promise.race(e.map(_e=>_e[2])),t==="error")break;if((i=t==="end")||(isFinite(c-v)?(S=ct.toUint8Array(r.read(c-v)),S.byteLength<c-v&&(S=ct.toUint8Array(r.read(void 0)))):S=ct.toUint8Array(r.read(void 0)),S.byteLength>0&&(I.push(S),v+=S.byteLength)),i||c<=v)do({cmd:s,size:c}=yield U());while(c<v)}while(!i)}finally{await G(e,t==="error"?n:null)}return null;function G(_e,fe){return S=I=null,new Promise(($t,Cr)=>{for(let[_r,Ji]of _e)r.off(_r,Ji);try{let _r=r.destroy;_r&&_r.call(r,fe),fe=void 0}catch(_r){fe=_r||fe}finally{fe!=null?Cr(fe):$t()}})}}});var Re=V(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.Vector=nn.AbstractVector=void 0;var po=class{};nn.AbstractVector=po;nn.Vector=po;po.prototype.data=null});var Yr=V(N=>{"use strict";Object.defineProperty(N,"__esModule",{value:!0});N.Schema=N.Buffer=N.Field=N.DictionaryEncoding=N.KeyValue=N.Duration=N.Interval=N.Timestamp=N.Time=N.Date=N.Decimal=N.Bool=N.FixedSizeBinary=N.LargeBinary=N.LargeUtf8=N.Binary=N.Utf8=N.FloatingPoint=N.Int=N.Union=N.Map=N.FixedSizeList=N.LargeList=N.List=N.Struct_=N.Null=N.Endianness=N.DictionaryKind=N.Type=N.IntervalUnit=N.TimeUnit=N.DateUnit=N.Precision=N.UnionMode=N.Feature=N.MetadataVersion=void 0;var Ie=gr(),t1;(function(r){r[r.V1=0]="V1",r[r.V2=1]="V2",r[r.V3=2]="V3",r[r.V4=3]="V4",r[r.V5=4]="V5"})(t1=N.MetadataVersion||(N.MetadataVersion={}));var r1;(function(r){r[r.UNUSED=0]="UNUSED",r[r.DICTIONARY_REPLACEMENT=1]="DICTIONARY_REPLACEMENT",r[r.COMPRESSED_BODY=2]="COMPRESSED_BODY"})(r1=N.Feature||(N.Feature={}));var Fu;(function(r){r[r.Sparse=0]="Sparse",r[r.Dense=1]="Dense"})(Fu=N.UnionMode||(N.UnionMode={}));var Mu;(function(r){r[r.HALF=0]="HALF",r[r.SINGLE=1]="SINGLE",r[r.DOUBLE=2]="DOUBLE"})(Mu=N.Precision||(N.Precision={}));var Vu;(function(r){r[r.DAY=0]="DAY",r[r.MILLISECOND=1]="MILLISECOND"})(Vu=N.DateUnit||(N.DateUnit={}));var Si;(function(r){r[r.SECOND=0]="SECOND",r[r.MILLISECOND=1]="MILLISECOND",r[r.MICROSECOND=2]="MICROSECOND",r[r.NANOSECOND=3]="NANOSECOND"})(Si=N.TimeUnit||(N.TimeUnit={}));var Uu;(function(r){r[r.YEAR_MONTH=0]="YEAR_MONTH",r[r.DAY_TIME=1]="DAY_TIME"})(Uu=N.IntervalUnit||(N.IntervalUnit={}));var Cu;(function(r){r[r.NONE=0]="NONE",r[r.Null=1]="Null",r[r.Int=2]="Int",r[r.FloatingPoint=3]="FloatingPoint",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.Duration=18]="Duration",r[r.LargeBinary=19]="LargeBinary",r[r.LargeUtf8=20]="LargeUtf8",r[r.LargeList=21]="LargeList"})(Cu=N.Type||(N.Type={}));var Pu;(function(r){r[r.DenseArray=0]="DenseArray"})(Pu=N.DictionaryKind||(N.DictionaryKind={}));var ku;(function(r){r[r.Little=0]="Little",r[r.Big=1]="Big"})(ku=N.Endianness||(N.Endianness={}));var Di=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsNull(e,t){return(t||new Di).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsNull(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Di).__init(e.readInt32(e.position())+e.position(),e)}static startNull(e){e.startObject(0)}static endNull(e){return e.endObject()}static createNull(e){return Di.startNull(e),Di.endNull(e)}};N.Null=Di;var Oi=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsStruct_(e,t){return(t||new Oi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsStruct_(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Oi).__init(e.readInt32(e.position())+e.position(),e)}static startStruct_(e){e.startObject(0)}static endStruct_(e){return e.endObject()}static createStruct_(e){return Oi.startStruct_(e),Oi.endStruct_(e)}};N.Struct_=Oi;var Ai=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsList(e,t){return(t||new Ai).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsList(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Ai).__init(e.readInt32(e.position())+e.position(),e)}static startList(e){e.startObject(0)}static endList(e){return e.endObject()}static createList(e){return Ai.startList(e),Ai.endList(e)}};N.List=Ai;var Fi=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsLargeList(e,t){return(t||new Fi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsLargeList(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Fi).__init(e.readInt32(e.position())+e.position(),e)}static startLargeList(e){e.startObject(0)}static endLargeList(e){return e.endObject()}static createLargeList(e){return Fi.startLargeList(e),Fi.endLargeList(e)}};N.LargeList=Fi;var Nr=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsFixedSizeList(e,t){return(t||new Nr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFixedSizeList(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Nr).__init(e.readInt32(e.position())+e.position(),e)}listSize(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}static startFixedSizeList(e){e.startObject(1)}static addListSize(e,t){e.addFieldInt32(0,t,0)}static endFixedSizeList(e){return e.endObject()}static createFixedSizeList(e,t){return Nr.startFixedSizeList(e),Nr.addListSize(e,t),Nr.endFixedSizeList(e)}};N.FixedSizeList=Nr;var Er=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsMap(e,t){return(t||new Er).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsMap(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Er).__init(e.readInt32(e.position())+e.position(),e)}keysSorted(){let e=this.bb.__offset(this.bb_pos,4);return e?!!this.bb.readInt8(this.bb_pos+e):!1}static startMap(e){e.startObject(1)}static addKeysSorted(e,t){e.addFieldInt8(0,+t,0)}static endMap(e){return e.endObject()}static createMap(e,t){return Er.startMap(e),Er.addKeysSorted(e,t),Er.endMap(e)}};N.Map=Er;var jr=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsUnion(e,t){return(t||new jr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsUnion(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new jr).__init(e.readInt32(e.position())+e.position(),e)}mode(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Fu.Sparse}typeIds(e){let t=this.bb.__offset(this.bb_pos,6);return t?this.bb.readInt32(this.bb.__vector(this.bb_pos+t)+e*4):0}typeIdsLength(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}typeIdsArray(){let e=this.bb.__offset(this.bb_pos,6);return e?new Int32Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+e),this.bb.__vector_len(this.bb_pos+e)):null}static startUnion(e){e.startObject(2)}static addMode(e,t){e.addFieldInt16(0,t,Fu.Sparse)}static addTypeIds(e,t){e.addFieldOffset(1,t,0)}static createTypeIdsVector(e,t){e.startVector(4,t.length,4);for(let i=t.length-1;i>=0;i--)e.addInt32(t[i]);return e.endVector()}static startTypeIdsVector(e,t){e.startVector(4,t,4)}static endUnion(e){return e.endObject()}static createUnion(e,t,i){return jr.startUnion(e),jr.addMode(e,t),jr.addTypeIds(e,i),jr.endUnion(e)}};N.Union=jr;var Zt=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsInt(e,t){return(t||new Zt).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsInt(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Zt).__init(e.readInt32(e.position())+e.position(),e)}bitWidth(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}isSigned(){let e=this.bb.__offset(this.bb_pos,6);return e?!!this.bb.readInt8(this.bb_pos+e):!1}static startInt(e){e.startObject(2)}static addBitWidth(e,t){e.addFieldInt32(0,t,0)}static addIsSigned(e,t){e.addFieldInt8(1,+t,0)}static endInt(e){return e.endObject()}static createInt(e,t,i){return Zt.startInt(e),Zt.addBitWidth(e,t),Zt.addIsSigned(e,i),Zt.endInt(e)}};N.Int=Zt;var Lr=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsFloatingPoint(e,t){return(t||new Lr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFloatingPoint(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Lr).__init(e.readInt32(e.position())+e.position(),e)}precision(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Mu.HALF}static startFloatingPoint(e){e.startObject(1)}static addPrecision(e,t){e.addFieldInt16(0,t,Mu.HALF)}static endFloatingPoint(e){return e.endObject()}static createFloatingPoint(e,t){return Lr.startFloatingPoint(e),Lr.addPrecision(e,t),Lr.endFloatingPoint(e)}};N.FloatingPoint=Lr;var Mi=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsUtf8(e,t){return(t||new Mi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsUtf8(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Mi).__init(e.readInt32(e.position())+e.position(),e)}static startUtf8(e){e.startObject(0)}static endUtf8(e){return e.endObject()}static createUtf8(e){return Mi.startUtf8(e),Mi.endUtf8(e)}};N.Utf8=Mi;var Vi=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsBinary(e,t){return(t||new Vi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBinary(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Vi).__init(e.readInt32(e.position())+e.position(),e)}static startBinary(e){e.startObject(0)}static endBinary(e){return e.endObject()}static createBinary(e){return Vi.startBinary(e),Vi.endBinary(e)}};N.Binary=Vi;var Ui=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsLargeUtf8(e,t){return(t||new Ui).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsLargeUtf8(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Ui).__init(e.readInt32(e.position())+e.position(),e)}static startLargeUtf8(e){e.startObject(0)}static endLargeUtf8(e){return e.endObject()}static createLargeUtf8(e){return Ui.startLargeUtf8(e),Ui.endLargeUtf8(e)}};N.LargeUtf8=Ui;var Ci=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsLargeBinary(e,t){return(t||new Ci).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsLargeBinary(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Ci).__init(e.readInt32(e.position())+e.position(),e)}static startLargeBinary(e){e.startObject(0)}static endLargeBinary(e){return e.endObject()}static createLargeBinary(e){return Ci.startLargeBinary(e),Ci.endLargeBinary(e)}};N.LargeBinary=Ci;var qr=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsFixedSizeBinary(e,t){return(t||new qr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFixedSizeBinary(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new qr).__init(e.readInt32(e.position())+e.position(),e)}byteWidth(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}static startFixedSizeBinary(e){e.startObject(1)}static addByteWidth(e,t){e.addFieldInt32(0,t,0)}static endFixedSizeBinary(e){return e.endObject()}static createFixedSizeBinary(e,t){return qr.startFixedSizeBinary(e),qr.addByteWidth(e,t),qr.endFixedSizeBinary(e)}};N.FixedSizeBinary=qr;var Pi=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsBool(e,t){return(t||new Pi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBool(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Pi).__init(e.readInt32(e.position())+e.position(),e)}static startBool(e){e.startObject(0)}static endBool(e){return e.endObject()}static createBool(e){return Pi.startBool(e),Pi.endBool(e)}};N.Bool=Pi;var Xt=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsDecimal(e,t){return(t||new Xt).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDecimal(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Xt).__init(e.readInt32(e.position())+e.position(),e)}precision(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}scale(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt32(this.bb_pos+e):0}bitWidth(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.readInt32(this.bb_pos+e):128}static startDecimal(e){e.startObject(3)}static addPrecision(e,t){e.addFieldInt32(0,t,0)}static addScale(e,t){e.addFieldInt32(1,t,0)}static addBitWidth(e,t){e.addFieldInt32(2,t,128)}static endDecimal(e){return e.endObject()}static createDecimal(e,t,i,n){return Xt.startDecimal(e),Xt.addPrecision(e,t),Xt.addScale(e,i),Xt.addBitWidth(e,n),Xt.endDecimal(e)}};N.Decimal=Xt;var zr=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsDate(e,t){return(t||new zr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDate(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new zr).__init(e.readInt32(e.position())+e.position(),e)}unit(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Vu.MILLISECOND}static startDate(e){e.startObject(1)}static addUnit(e,t){e.addFieldInt16(0,t,Vu.MILLISECOND)}static endDate(e){return e.endObject()}static createDate(e,t){return zr.startDate(e),zr.addUnit(e,t),zr.endDate(e)}};N.Date=zr;var wr=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsTime(e,t){return(t||new wr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsTime(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new wr).__init(e.readInt32(e.position())+e.position(),e)}unit(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Si.MILLISECOND}bitWidth(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt32(this.bb_pos+e):32}static startTime(e){e.startObject(2)}static addUnit(e,t){e.addFieldInt16(0,t,Si.MILLISECOND)}static addBitWidth(e,t){e.addFieldInt32(1,t,32)}static endTime(e){return e.endObject()}static createTime(e,t,i){return wr.startTime(e),wr.addUnit(e,t),wr.addBitWidth(e,i),wr.endTime(e)}};N.Time=wr;var Br=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsTimestamp(e,t){return(t||new Br).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsTimestamp(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Br).__init(e.readInt32(e.position())+e.position(),e)}unit(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Si.SECOND}timezone(e){let t=this.bb.__offset(this.bb_pos,6);return t?this.bb.__string(this.bb_pos+t,e):null}static startTimestamp(e){e.startObject(2)}static addUnit(e,t){e.addFieldInt16(0,t,Si.SECOND)}static addTimezone(e,t){e.addFieldOffset(1,t,0)}static endTimestamp(e){return e.endObject()}static createTimestamp(e,t,i){return Br.startTimestamp(e),Br.addUnit(e,t),Br.addTimezone(e,i),Br.endTimestamp(e)}};N.Timestamp=Br;var Wr=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsInterval(e,t){return(t||new Wr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsInterval(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Wr).__init(e.readInt32(e.position())+e.position(),e)}unit(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Uu.YEAR_MONTH}static startInterval(e){e.startObject(1)}static addUnit(e,t){e.addFieldInt16(0,t,Uu.YEAR_MONTH)}static endInterval(e){return e.endObject()}static createInterval(e,t){return Wr.startInterval(e),Wr.addUnit(e,t),Wr.endInterval(e)}};N.Interval=Wr;var Hr=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsDuration(e,t){return(t||new Hr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDuration(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Hr).__init(e.readInt32(e.position())+e.position(),e)}unit(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Si.MILLISECOND}static startDuration(e){e.startObject(1)}static addUnit(e,t){e.addFieldInt16(0,t,Si.MILLISECOND)}static endDuration(e){return e.endObject()}static createDuration(e,t){return Hr.startDuration(e),Hr.addUnit(e,t),Hr.endDuration(e)}};N.Duration=Hr;var Nt=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsKeyValue(e,t){return(t||new Nt).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsKeyValue(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Nt).__init(e.readInt32(e.position())+e.position(),e)}key(e){let t=this.bb.__offset(this.bb_pos,4);return t?this.bb.__string(this.bb_pos+t,e):null}value(e){let t=this.bb.__offset(this.bb_pos,6);return t?this.bb.__string(this.bb_pos+t,e):null}static startKeyValue(e){e.startObject(2)}static addKey(e,t){e.addFieldOffset(0,t,0)}static addValue(e,t){e.addFieldOffset(1,t,0)}static endKeyValue(e){return e.endObject()}static createKeyValue(e,t,i){return Nt.startKeyValue(e),Nt.addKey(e,t),Nt.addValue(e,i),Nt.endKeyValue(e)}};N.KeyValue=Nt;var bt=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsDictionaryEncoding(e,t){return(t||new bt).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDictionaryEncoding(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new bt).__init(e.readInt32(e.position())+e.position(),e)}id(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt64(this.bb_pos+e):this.bb.createLong(0,0)}indexType(e){let t=this.bb.__offset(this.bb_pos,6);return t?(e||new Zt).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}isOrdered(){let e=this.bb.__offset(this.bb_pos,8);return e?!!this.bb.readInt8(this.bb_pos+e):!1}dictionaryKind(){let e=this.bb.__offset(this.bb_pos,10);return e?this.bb.readInt16(this.bb_pos+e):Pu.DenseArray}static startDictionaryEncoding(e){e.startObject(4)}static addId(e,t){e.addFieldInt64(0,t,e.createLong(0,0))}static addIndexType(e,t){e.addFieldOffset(1,t,0)}static addIsOrdered(e,t){e.addFieldInt8(2,+t,0)}static addDictionaryKind(e,t){e.addFieldInt16(3,t,Pu.DenseArray)}static endDictionaryEncoding(e){return e.endObject()}static createDictionaryEncoding(e,t,i,n,s){return bt.startDictionaryEncoding(e),bt.addId(e,t),bt.addIndexType(e,i),bt.addIsOrdered(e,n),bt.addDictionaryKind(e,s),bt.endDictionaryEncoding(e)}};N.DictionaryEncoding=bt;var ot=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsField(e,t){return(t||new ot).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsField(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new ot).__init(e.readInt32(e.position())+e.position(),e)}name(e){let t=this.bb.__offset(this.bb_pos,4);return t?this.bb.__string(this.bb_pos+t,e):null}nullable(){let e=this.bb.__offset(this.bb_pos,6);return e?!!this.bb.readInt8(this.bb_pos+e):!1}typeType(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.readUint8(this.bb_pos+e):Cu.NONE}type(e){let t=this.bb.__offset(this.bb_pos,10);return t?this.bb.__union(e,this.bb_pos+t):null}dictionary(e){let t=this.bb.__offset(this.bb_pos,12);return t?(e||new bt).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}children(e,t){let i=this.bb.__offset(this.bb_pos,14);return i?(t||new ot).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+e*4),this.bb):null}childrenLength(){let e=this.bb.__offset(this.bb_pos,14);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,t){let i=this.bb.__offset(this.bb_pos,16);return i?(t||new Nt).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+e*4),this.bb):null}customMetadataLength(){let e=this.bb.__offset(this.bb_pos,16);return e?this.bb.__vector_len(this.bb_pos+e):0}static startField(e){e.startObject(7)}static addName(e,t){e.addFieldOffset(0,t,0)}static addNullable(e,t){e.addFieldInt8(1,+t,0)}static addTypeType(e,t){e.addFieldInt8(2,t,Cu.NONE)}static addType(e,t){e.addFieldOffset(3,t,0)}static addDictionary(e,t){e.addFieldOffset(4,t,0)}static addChildren(e,t){e.addFieldOffset(5,t,0)}static createChildrenVector(e,t){e.startVector(4,t.length,4);for(let i=t.length-1;i>=0;i--)e.addOffset(t[i]);return e.endVector()}static startChildrenVector(e,t){e.startVector(4,t,4)}static addCustomMetadata(e,t){e.addFieldOffset(6,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let i=t.length-1;i>=0;i--)e.addOffset(t[i]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static endField(e){return e.endObject()}static createField(e,t,i,n,s,c,v,I){return ot.startField(e),ot.addName(e,t),ot.addNullable(e,i),ot.addTypeType(e,n),ot.addType(e,s),ot.addDictionary(e,c),ot.addChildren(e,v),ot.addCustomMetadata(e,I),ot.endField(e)}};N.Field=ot;var Ny=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}offset(){return this.bb.readInt64(this.bb_pos)}length(){return this.bb.readInt64(this.bb_pos+8)}static createBuffer(e,t,i){return e.prep(8,16),e.writeInt64(i),e.writeInt64(t),e.offset()}};N.Buffer=Ny;var Et=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsSchema(e,t){return(t||new Et).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsSchema(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Et).__init(e.readInt32(e.position())+e.position(),e)}endianness(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):ku.Little}fields(e,t){let i=this.bb.__offset(this.bb_pos,6);return i?(t||new ot).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+e*4),this.bb):null}fieldsLength(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,t){let i=this.bb.__offset(this.bb_pos,8);return i?(t||new Nt).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+e*4),this.bb):null}customMetadataLength(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}features(e){let t=this.bb.__offset(this.bb_pos,10);return t?this.bb.readInt64(this.bb.__vector(this.bb_pos+t)+e*8):this.bb.createLong(0,0)}featuresLength(){let e=this.bb.__offset(this.bb_pos,10);return e?this.bb.__vector_len(this.bb_pos+e):0}static startSchema(e){e.startObject(4)}static addEndianness(e,t){e.addFieldInt16(0,t,ku.Little)}static addFields(e,t){e.addFieldOffset(1,t,0)}static createFieldsVector(e,t){e.startVector(4,t.length,4);for(let i=t.length-1;i>=0;i--)e.addOffset(t[i]);return e.endVector()}static startFieldsVector(e,t){e.startVector(4,t,4)}static addCustomMetadata(e,t){e.addFieldOffset(2,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let i=t.length-1;i>=0;i--)e.addOffset(t[i]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static addFeatures(e,t){e.addFieldOffset(3,t,0)}static createFeaturesVector(e,t){e.startVector(8,t.length,8);for(let i=t.length-1;i>=0;i--)e.addInt64(t[i]);return e.endVector()}static startFeaturesVector(e,t){e.startVector(8,t,8)}static endSchema(e){return e.endObject()}static finishSchemaBuffer(e,t){e.finish(t)}static finishSizePrefixedSchemaBuffer(e,t){e.finish(t,void 0,!0)}static createSchema(e,t,i,n,s){return Et.startSchema(e),Et.addEndianness(e,t),Et.addFields(e,i),Et.addCustomMetadata(e,n),Et.addFeatures(e,s),Et.endSchema(e)}};N.Schema=Et});var _o=V(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.Message=xe.DictionaryBatch=xe.RecordBatch=xe.BodyCompression=xe.FieldNode=xe.MessageHeader=xe.BodyCompressionMethod=xe.CompressionType=void 0;var yo=gr(),mo=Yr(),Ru;(function(r){r[r.LZ4_FRAME=0]="LZ4_FRAME",r[r.ZSTD=1]="ZSTD"})(Ru=xe.CompressionType||(xe.CompressionType={}));var xu;(function(r){r[r.BUFFER=0]="BUFFER"})(xu=xe.BodyCompressionMethod||(xe.BodyCompressionMethod={}));var Nu;(function(r){r[r.NONE=0]="NONE",r[r.Schema=1]="Schema",r[r.DictionaryBatch=2]="DictionaryBatch",r[r.RecordBatch=3]="RecordBatch",r[r.Tensor=4]="Tensor",r[r.SparseTensor=5]="SparseTensor"})(Nu=xe.MessageHeader||(xe.MessageHeader={}));var Eu=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}length(){return this.bb.readInt64(this.bb_pos)}nullCount(){return this.bb.readInt64(this.bb_pos+8)}static createFieldNode(e,t,i){return e.prep(8,16),e.writeInt64(i),e.writeInt64(t),e.offset()}};xe.FieldNode=Eu;var Qt=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsBodyCompression(e,t){return(t||new Qt).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBodyCompression(e,t){return e.setPosition(e.position()+yo.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Qt).__init(e.readInt32(e.position())+e.position(),e)}codec(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt8(this.bb_pos+e):Ru.LZ4_FRAME}method(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt8(this.bb_pos+e):xu.BUFFER}static startBodyCompression(e){e.startObject(2)}static addCodec(e,t){e.addFieldInt8(0,t,Ru.LZ4_FRAME)}static addMethod(e,t){e.addFieldInt8(1,t,xu.BUFFER)}static endBodyCompression(e){return e.endObject()}static createBodyCompression(e,t,i){return Qt.startBodyCompression(e),Qt.addCodec(e,t),Qt.addMethod(e,i),Qt.endBodyCompression(e)}};xe.BodyCompression=Qt;var gt=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsRecordBatch(e,t){return(t||new gt).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsRecordBatch(e,t){return e.setPosition(e.position()+yo.flatbuffers.SIZE_PREFIX_LENGTH),(t||new gt).__init(e.readInt32(e.position())+e.position(),e)}length(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt64(this.bb_pos+e):this.bb.createLong(0,0)}nodes(e,t){let i=this.bb.__offset(this.bb_pos,6);return i?(t||new Eu).__init(this.bb.__vector(this.bb_pos+i)+e*16,this.bb):null}nodesLength(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}buffers(e,t){let i=this.bb.__offset(this.bb_pos,8);return i?(t||new mo.Buffer).__init(this.bb.__vector(this.bb_pos+i)+e*16,this.bb):null}buffersLength(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}compression(e){let t=this.bb.__offset(this.bb_pos,10);return t?(e||new Qt).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}static startRecordBatch(e){e.startObject(4)}static addLength(e,t){e.addFieldInt64(0,t,e.createLong(0,0))}static addNodes(e,t){e.addFieldOffset(1,t,0)}static startNodesVector(e,t){e.startVector(16,t,8)}static addBuffers(e,t){e.addFieldOffset(2,t,0)}static startBuffersVector(e,t){e.startVector(16,t,8)}static addCompression(e,t){e.addFieldOffset(3,t,0)}static endRecordBatch(e){return e.endObject()}static createRecordBatch(e,t,i,n,s){return gt.startRecordBatch(e),gt.addLength(e,t),gt.addNodes(e,i),gt.addBuffers(e,n),gt.addCompression(e,s),gt.endRecordBatch(e)}};xe.RecordBatch=gt;var er=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsDictionaryBatch(e,t){return(t||new er).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDictionaryBatch(e,t){return e.setPosition(e.position()+yo.flatbuffers.SIZE_PREFIX_LENGTH),(t||new er).__init(e.readInt32(e.position())+e.position(),e)}id(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt64(this.bb_pos+e):this.bb.createLong(0,0)}data(e){let t=this.bb.__offset(this.bb_pos,6);return t?(e||new gt).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}isDelta(){let e=this.bb.__offset(this.bb_pos,8);return e?!!this.bb.readInt8(this.bb_pos+e):!1}static startDictionaryBatch(e){e.startObject(3)}static addId(e,t){e.addFieldInt64(0,t,e.createLong(0,0))}static addData(e,t){e.addFieldOffset(1,t,0)}static addIsDelta(e,t){e.addFieldInt8(2,+t,0)}static endDictionaryBatch(e){return e.endObject()}static createDictionaryBatch(e,t,i,n){return er.startDictionaryBatch(e),er.addId(e,t),er.addData(e,i),er.addIsDelta(e,n),er.endDictionaryBatch(e)}};xe.DictionaryBatch=er;var vt=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsMessage(e,t){return(t||new vt).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsMessage(e,t){return e.setPosition(e.position()+yo.flatbuffers.SIZE_PREFIX_LENGTH),(t||new vt).__init(e.readInt32(e.position())+e.position(),e)}version(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):mo.MetadataVersion.V1}headerType(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readUint8(this.bb_pos+e):Nu.NONE}header(e){let t=this.bb.__offset(this.bb_pos,8);return t?this.bb.__union(e,this.bb_pos+t):null}bodyLength(){let e=this.bb.__offset(this.bb_pos,10);return e?this.bb.readInt64(this.bb_pos+e):this.bb.createLong(0,0)}customMetadata(e,t){let i=this.bb.__offset(this.bb_pos,12);return i?(t||new mo.KeyValue).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+e*4),this.bb):null}customMetadataLength(){let e=this.bb.__offset(this.bb_pos,12);return e?this.bb.__vector_len(this.bb_pos+e):0}static startMessage(e){e.startObject(5)}static addVersion(e,t){e.addFieldInt16(0,t,mo.MetadataVersion.V1)}static addHeaderType(e,t){e.addFieldInt8(1,t,Nu.NONE)}static addHeader(e,t){e.addFieldOffset(2,t,0)}static addBodyLength(e,t){e.addFieldInt64(3,t,e.createLong(0,0))}static addCustomMetadata(e,t){e.addFieldOffset(4,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let i=t.length-1;i>=0;i--)e.addOffset(t[i]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static endMessage(e){return e.endObject()}static finishMessageBuffer(e,t){e.finish(t)}static finishSizePrefixedMessageBuffer(e,t){e.finish(t,void 0,!0)}static createMessage(e,t,i,n,s,c){return vt.startMessage(e),vt.addVersion(e,t),vt.addHeaderType(e,i),vt.addHeader(e,n),vt.addBodyLength(e,s),vt.addCustomMetadata(e,c),vt.endMessage(e)}};xe.Message=vt});var Te=V(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.BufferType=Me.Type=Me.MessageHeader=Me.MetadataVersion=Me.IntervalUnit=Me.UnionMode=Me.Precision=Me.TimeUnit=Me.DateUnit=void 0;var sn=Yr();Object.defineProperty(Me,"DateUnit",{enumerable:!0,get:function(){return sn.DateUnit}});Object.defineProperty(Me,"TimeUnit",{enumerable:!0,get:function(){return sn.TimeUnit}});Object.defineProperty(Me,"Precision",{enumerable:!0,get:function(){return sn.Precision}});Object.defineProperty(Me,"UnionMode",{enumerable:!0,get:function(){return sn.UnionMode}});Object.defineProperty(Me,"IntervalUnit",{enumerable:!0,get:function(){return sn.IntervalUnit}});Object.defineProperty(Me,"MetadataVersion",{enumerable:!0,get:function(){return sn.MetadataVersion}});var i1=_o();Object.defineProperty(Me,"MessageHeader",{enumerable:!0,get:function(){return i1.MessageHeader}});var n1;(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"})(n1=Me.Type||(Me.Type={}));var s1;(function(r){r[r.OFFSET=0]="OFFSET",r[r.DATA=1]="DATA",r[r.VALIDITY=2]="VALIDITY",r[r.TYPE=3]="TYPE"})(s1=Me.BufferType||(Me.BufferType={}))});var tr=V(Ee=>{"use strict";Object.defineProperty(Ee,"__esModule",{value:!0});Ee.popcnt_uint32=Ee.popcnt_array=Ee.popcnt_bit_range=Ee.BitIterator=Ee.packBools=Ee.truncateBitmap=Ee.setBool=Ee.getBit=Ee.getBool=void 0;function Ey(r,e,t,i){return(t&1<<i)!=0}Ee.getBool=Ey;function Ly(r,e,t,i){return(t&1<<i)>>i}Ee.getBit=Ly;function o1(r,e,t){return t?!!(r[e>>3]|=1<<e%8)||!0:!(r[e>>3]&=~(1<<e%8))&&!1}Ee.setBool=o1;function a1(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):qy(new bo(t,r,e,null,Ey)).subarray(0,i)),n}return t}Ee.truncateBitmap=a1;function qy(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 s=new Uint8Array(e.length+7&~7);return s.set(e),s}Ee.packBools=qy;var bo=class{constructor(e,t,i,n,s){this.bytes=e,this.length=i,this.context=n,this.get=s,this.bit=t%8,this.byteIndex=t>>3,this.byte=e[this.byteIndex++],this.index=0}next(){return this.index<this.length?(this.bit===8&&(this.bit=0,this.byte=this.bytes[this.byteIndex++]),{value:this.get(this.context,this.index++,this.byte,this.bit++)}):{done:!0,value:null}}[Symbol.iterator](){return this}};Ee.BitIterator=bo;function Lu(r,e,t){if(t-e<=0)return 0;if(t-e<8){let s=0;for(let c of new bo(r,e,t-e,r,Ly))s+=c;return s}let i=t>>3<<3,n=e+(e%8==0?0:8-e%8);return Lu(r,e,n)+Lu(r,i,t)+zy(r,n>>3,i-n>>3)}Ee.popcnt_bit_range=Lu;function zy(r,e,t){let i=0,n=e|0,s=new DataView(r.buffer,r.byteOffset,r.byteLength),c=t===void 0?r.byteLength:n+t;for(;c-n>=4;)i+=go(s.getUint32(n)),n+=4;for(;c-n>=2;)i+=go(s.getUint16(n)),n+=2;for(;c-n>=1;)i+=go(s.getUint8(n)),n+=1;return i}Ee.popcnt_array=zy;function go(r){let e=r|0;return e=e-(e>>>1&1431655765),e=(e&858993459)+(e>>>2&858993459),(e+(e>>>4)&252645135)*16843009>>>24}Ee.popcnt_uint32=go});var be=V(k=>{"use strict";Object.defineProperty(k,"__esModule",{value:!0});k.strideForType=k.Dictionary=k.Map_=k.FixedSizeList=k.FixedSizeBinary=k.SparseUnion=k.DenseUnion=k.Union=k.Struct=k.List=k.IntervalYearMonth=k.IntervalDayTime=k.Interval=k.TimestampNanosecond=k.TimestampMicrosecond=k.TimestampMillisecond=k.TimestampSecond=k.Timestamp=k.TimeNanosecond=k.TimeMicrosecond=k.TimeMillisecond=k.TimeSecond=k.Time=k.DateMillisecond=k.DateDay=k.Date_=k.Decimal=k.Bool=k.Utf8=k.Binary=k.Float64=k.Float32=k.Float16=k.Float=k.Uint64=k.Uint32=k.Uint16=k.Uint8=k.Int64=k.Int32=k.Int16=k.Int8=k.Int=k.Null=k.DataType=void 0;var L=Te(),Ve=class{static isNull(e){return e&&e.typeId===L.Type.Null}static isInt(e){return e&&e.typeId===L.Type.Int}static isFloat(e){return e&&e.typeId===L.Type.Float}static isBinary(e){return e&&e.typeId===L.Type.Binary}static isUtf8(e){return e&&e.typeId===L.Type.Utf8}static isBool(e){return e&&e.typeId===L.Type.Bool}static isDecimal(e){return e&&e.typeId===L.Type.Decimal}static isDate(e){return e&&e.typeId===L.Type.Date}static isTime(e){return e&&e.typeId===L.Type.Time}static isTimestamp(e){return e&&e.typeId===L.Type.Timestamp}static isInterval(e){return e&&e.typeId===L.Type.Interval}static isList(e){return e&&e.typeId===L.Type.List}static isStruct(e){return e&&e.typeId===L.Type.Struct}static isUnion(e){return e&&e.typeId===L.Type.Union}static isFixedSizeBinary(e){return e&&e.typeId===L.Type.FixedSizeBinary}static isFixedSizeList(e){return e&&e.typeId===L.Type.FixedSizeList}static isMap(e){return e&&e.typeId===L.Type.Map}static isDictionary(e){return e&&e.typeId===L.Type.Dictionary}get typeId(){return L.Type.NONE}};k.DataType=Ve;Ve[Symbol.toStringTag]=(r=>(r.children=null,r.ArrayType=Array,r[Symbol.toStringTag]="DataType"))(Ve.prototype);var vo=class extends Ve{toString(){return"Null"}get typeId(){return L.Type.Null}};k.Null=vo;vo[Symbol.toStringTag]=(r=>r[Symbol.toStringTag]="Null")(vo.prototype);var jt=class extends Ve{constructor(e,t){super();this.isSigned=e,this.bitWidth=t}get typeId(){return L.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}`}};k.Int=jt;jt[Symbol.toStringTag]=(r=>(r.isSigned=null,r.bitWidth=null,r[Symbol.toStringTag]="Int"))(jt.prototype);var qu=class extends jt{constructor(){super(!0,8)}};k.Int8=qu;var zu=class extends jt{constructor(){super(!0,16)}};k.Int16=zu;var Wu=class extends jt{constructor(){super(!0,32)}};k.Int32=Wu;var Hu=class extends jt{constructor(){super(!0,64)}};k.Int64=Hu;var Yu=class extends jt{constructor(){super(!1,8)}};k.Uint8=Yu;var $u=class extends jt{constructor(){super(!1,16)}};k.Uint16=$u;var Gu=class extends jt{constructor(){super(!1,32)}};k.Uint32=Gu;var Ju=class extends jt{constructor(){super(!1,64)}};k.Uint64=Ju;Object.defineProperty(qu.prototype,"ArrayType",{value:Int8Array});Object.defineProperty(zu.prototype,"ArrayType",{value:Int16Array});Object.defineProperty(Wu.prototype,"ArrayType",{value:Int32Array});Object.defineProperty(Hu.prototype,"ArrayType",{value:Int32Array});Object.defineProperty(Yu.prototype,"ArrayType",{value:Uint8Array});Object.defineProperty($u.prototype,"ArrayType",{value:Uint16Array});Object.defineProperty(Gu.prototype,"ArrayType",{value:Uint32Array});Object.defineProperty(Ju.prototype,"ArrayType",{value:Uint32Array});var ki=class extends Ve{constructor(e){super();this.precision=e}get typeId(){return L.Type.Float}get ArrayType(){switch(this.precision){case L.Precision.HALF:return Uint16Array;case L.Precision.SINGLE:return Float32Array;case L.Precision.DOUBLE:return Float64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}};k.Float=ki;ki[Symbol.toStringTag]=(r=>(r.precision=null,r[Symbol.toStringTag]="Float"))(ki.prototype);var Ku=class extends ki{constructor(){super(L.Precision.HALF)}};k.Float16=Ku;var Zu=class extends ki{constructor(){super(L.Precision.SINGLE)}};k.Float32=Zu;var Xu=class extends ki{constructor(){super(L.Precision.DOUBLE)}};k.Float64=Xu;Object.defineProperty(Ku.prototype,"ArrayType",{value:Uint16Array});Object.defineProperty(Zu.prototype,"ArrayType",{value:Float32Array});Object.defineProperty(Xu.prototype,"ArrayType",{value:Float64Array});var jo=class extends Ve{constructor(){super()}get typeId(){return L.Type.Binary}toString(){return"Binary"}};k.Binary=jo;jo[Symbol.toStringTag]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Binary"))(jo.prototype);var wo=class extends Ve{constructor(){super()}get typeId(){return L.Type.Utf8}toString(){return"Utf8"}};k.Utf8=wo;wo[Symbol.toStringTag]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Utf8"))(wo.prototype);var Bo=class extends Ve{constructor(){super()}get typeId(){return L.Type.Bool}toString(){return"Bool"}};k.Bool=Bo;Bo[Symbol.toStringTag]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Bool"))(Bo.prototype);var To=class extends Ve{constructor(e,t){super();this.scale=e,this.precision=t}get typeId(){return L.Type.Decimal}toString(){return`Decimal[${this.precision}e${this.scale>0?"+":""}${this.scale}]`}};k.Decimal=To;To[Symbol.toStringTag]=(r=>(r.scale=null,r.precision=null,r.ArrayType=Uint32Array,r[Symbol.toStringTag]="Decimal"))(To.prototype);var on=class extends Ve{constructor(e){super();this.unit=e}get typeId(){return L.Type.Date}toString(){return`Date${(this.unit+1)*32}<${L.DateUnit[this.unit]}>`}};k.Date_=on;on[Symbol.toStringTag]=(r=>(r.unit=null,r.ArrayType=Int32Array,r[Symbol.toStringTag]="Date"))(on.prototype);var Wy=class extends on{constructor(){super(L.DateUnit.DAY)}};k.DateDay=Wy;var Hy=class extends on{constructor(){super(L.DateUnit.MILLISECOND)}};k.DateMillisecond=Hy;var $r=class extends Ve{constructor(e,t){super();this.unit=e,this.bitWidth=t}get typeId(){return L.Type.Time}toString(){return`Time${this.bitWidth}<${L.TimeUnit[this.unit]}>`}};k.Time=$r;$r[Symbol.toStringTag]=(r=>(r.unit=null,r.bitWidth=null,r.ArrayType=Int32Array,r[Symbol.toStringTag]="Time"))($r.prototype);var Yy=class extends $r{constructor(){super(L.TimeUnit.SECOND,32)}};k.TimeSecond=Yy;var $y=class extends $r{constructor(){super(L.TimeUnit.MILLISECOND,32)}};k.TimeMillisecond=$y;var Gy=class extends $r{constructor(){super(L.TimeUnit.MICROSECOND,64)}};k.TimeMicrosecond=Gy;var Jy=class extends $r{constructor(){super(L.TimeUnit.NANOSECOND,64)}};k.TimeNanosecond=Jy;var Gr=class extends Ve{constructor(e,t){super();this.unit=e,this.timezone=t}get typeId(){return L.Type.Timestamp}toString(){return`Timestamp<${L.TimeUnit[this.unit]}${this.timezone?`, ${this.timezone}`:""}>`}};k.Timestamp=Gr;Gr[Symbol.toStringTag]=(r=>(r.unit=null,r.timezone=null,r.ArrayType=Int32Array,r[Symbol.toStringTag]="Timestamp"))(Gr.prototype);var Ky=class extends Gr{constructor(e){super(L.TimeUnit.SECOND,e)}};k.TimestampSecond=Ky;var Zy=class extends Gr{constructor(e){super(L.TimeUnit.MILLISECOND,e)}};k.TimestampMillisecond=Zy;var Xy=class extends Gr{constructor(e){super(L.TimeUnit.MICROSECOND,e)}};k.TimestampMicrosecond=Xy;var Qy=class extends Gr{constructor(e){super(L.TimeUnit.NANOSECOND,e)}};k.TimestampNanosecond=Qy;var an=class extends Ve{constructor(e){super();this.unit=e}get typeId(){return L.Type.Interval}toString(){return`Interval<${L.IntervalUnit[this.unit]}>`}};k.Interval=an;an[Symbol.toStringTag]=(r=>(r.unit=null,r.ArrayType=Int32Array,r[Symbol.toStringTag]="Interval"))(an.prototype);var em=class extends an{constructor(){super(L.IntervalUnit.DAY_TIME)}};k.IntervalDayTime=em;var tm=class extends an{constructor(){super(L.IntervalUnit.YEAR_MONTH)}};k.IntervalYearMonth=tm;var Io=class extends Ve{constructor(e){super();this.children=[e]}get typeId(){return L.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}};k.List=Io;Io[Symbol.toStringTag]=(r=>(r.children=null,r[Symbol.toStringTag]="List"))(Io.prototype);var So=class extends Ve{constructor(e){super();this.children=e}get typeId(){return L.Type.Struct}toString(){return`Struct<{${this.children.map(e=>`${e.name}:${e.type}`).join(", ")}}>`}};k.Struct=So;So[Symbol.toStringTag]=(r=>(r.children=null,r[Symbol.toStringTag]="Struct"))(So.prototype);var un=class extends Ve{constructor(e,t,i){super();this.mode=e,this.children=i,this.typeIds=t=Int32Array.from(t),this.typeIdToChildIndex=t.reduce((n,s,c)=>(n[s]=c)&&n||n,Object.create(null))}get typeId(){return L.Type.Union}toString(){return`${this[Symbol.toStringTag]}<${this.children.map(e=>`${e.type}`).join(" | ")}>`}};k.Union=un;un[Symbol.toStringTag]=(r=>(r.mode=null,r.typeIds=null,r.children=null,r.typeIdToChildIndex=null,r.ArrayType=Int8Array,r[Symbol.toStringTag]="Union"))(un.prototype);var rm=class extends un{constructor(e,t){super(L.UnionMode.Dense,e,t)}};k.DenseUnion=rm;var im=class extends un{constructor(e,t){super(L.UnionMode.Sparse,e,t)}};k.SparseUnion=im;var Do=class extends Ve{constructor(e){super();this.byteWidth=e}get typeId(){return L.Type.FixedSizeBinary}toString(){return`FixedSizeBinary[${this.byteWidth}]`}};k.FixedSizeBinary=Do;Do[Symbol.toStringTag]=(r=>(r.byteWidth=null,r.ArrayType=Uint8Array,r[Symbol.toStringTag]="FixedSizeBinary"))(Do.prototype);var Oo=class extends Ve{constructor(e,t){super();this.listSize=e,this.children=[t]}get typeId(){return L.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}>`}};k.FixedSizeList=Oo;Oo[Symbol.toStringTag]=(r=>(r.children=null,r.listSize=null,r[Symbol.toStringTag]="FixedSizeList"))(Oo.prototype);var Ao=class extends Ve{constructor(e,t=!1){super();this.children=[e],this.keysSorted=t}get typeId(){return L.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(", ")}}>`}};k.Map_=Ao;Ao[Symbol.toStringTag]=(r=>(r.children=null,r.keysSorted=null,r[Symbol.toStringTag]="Map_"))(Ao.prototype);var u1=(r=>()=>++r)(-1),Fo=class extends Ve{constructor(e,t,i,n){super();this.indices=t,this.dictionary=e,this.isOrdered=n||!1,this.id=i==null?u1():typeof i=="number"?i:i.low}get typeId(){return L.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}>`}};k.Dictionary=Fo;Fo[Symbol.toStringTag]=(r=>(r.id=null,r.indices=null,r.isOrdered=null,r.dictionary=null,r[Symbol.toStringTag]="Dictionary"))(Fo.prototype);function c1(r){let e=r;switch(r.typeId){case L.Type.Decimal:return 4;case L.Type.Timestamp:return 2;case L.Type.Date:return 1+e.unit;case L.Type.Interval:return 1+e.unit;case L.Type.Int:return 1+ +(e.bitWidth>32);case L.Type.Time:return 1+ +(e.bitWidth>32);case L.Type.FixedSizeList:return e.listSize;case L.Type.FixedSizeBinary:return e.byteWidth;default:return 1}}k.strideForType=c1});var Lt=V(Ri=>{"use strict";Object.defineProperty(Ri,"__esModule",{value:!0});Ri.Data=Ri.kUnknownNullCount=void 0;var l1=tr(),d1=tr(),z=Te(),f1=be(),he=Ye();Ri.kUnknownNullCount=-1;var te=class{constructor(e,t,i,n,s,c,v){this.type=e,this.dictionary=v,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 te?S:S.data);let I;s instanceof te?(this.stride=s.stride,this.values=s.values,this.typeIds=s.typeIds,this.nullBitmap=s.nullBitmap,this.valueOffsets=s.valueOffsets):(this.stride=f1.strideForType(e),s&&((I=s[0])&&(this.valueOffsets=I),(I=s[1])&&(this.values=I),(I=s[2])&&(this.nullBitmap=I),(I=s[3])&&(this.typeIds=I)))}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:s}=this;return t&&(e+=t.byteLength),i&&(e+=i.byteLength),n&&(e+=n.byteLength),s&&(e+=s.byteLength),this.childData.reduce((c,v)=>c+v.byteLength,e)}get nullCount(){let e=this._nullCount,t;return e<=Ri.kUnknownNullCount&&(t=this.nullBitmap)&&(this._nullCount=e=this.length-d1.popcnt_bit_range(t,this.offset,this.offset+this.length)),e}clone(e,t=this.offset,i=this.length,n=this._nullCount,s=this,c=this.childData){return new te(e,t,i,n,s,c,this.dictionary)}slice(e,t){let{stride:i,typeId:n,childData:s}=this,c=+(this._nullCount===0)-1,v=n===16?i:1,I=this._sliceBuffers(e,t,i,n);return this.clone(this.type,this.offset+e,t,c,I,!s.length||this.valueOffsets?s:this._sliceChildren(s,v*e,v*t))}_changeLengthAndBackfillNullBitmap(e){if(this.typeId===z.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(l1.truncateBitmap(this.offset,t,this.nullBitmap),0);let s=this.buffers;return s[z.BufferType.VALIDITY]=n,this.clone(this.type,0,e,i+(e-t),s)}_sliceBuffers(e,t,i,n){let s,{buffers:c}=this;return(s=c[z.BufferType.TYPE])&&(c[z.BufferType.TYPE]=s.subarray(e,e+t)),(s=c[z.BufferType.OFFSET])&&(c[z.BufferType.OFFSET]=s.subarray(e,e+t+1))||(s=c[z.BufferType.DATA])&&(c[z.BufferType.DATA]=n===6?s:s.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,s,c,v){switch(s instanceof te?s=s.buffers:s||(s=[]),e.typeId){case z.Type.Null:return te.Null(e,t,i);case z.Type.Int:return te.Int(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.DATA]||[]);case z.Type.Dictionary:return te.Dictionary(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.DATA]||[],v);case z.Type.Float:return te.Float(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.DATA]||[]);case z.Type.Bool:return te.Bool(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.DATA]||[]);case z.Type.Decimal:return te.Decimal(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.DATA]||[]);case z.Type.Date:return te.Date(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.DATA]||[]);case z.Type.Time:return te.Time(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.DATA]||[]);case z.Type.Timestamp:return te.Timestamp(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.DATA]||[]);case z.Type.Interval:return te.Interval(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.DATA]||[]);case z.Type.FixedSizeBinary:return te.FixedSizeBinary(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.DATA]||[]);case z.Type.Binary:return te.Binary(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.OFFSET]||[],s[z.BufferType.DATA]||[]);case z.Type.Utf8:return te.Utf8(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.OFFSET]||[],s[z.BufferType.DATA]||[]);case z.Type.List:return te.List(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.OFFSET]||[],(c||[])[0]);case z.Type.FixedSizeList:return te.FixedSizeList(e,t,i,n||0,s[z.BufferType.VALIDITY],(c||[])[0]);case z.Type.Struct:return te.Struct(e,t,i,n||0,s[z.BufferType.VALIDITY],c||[]);case z.Type.Map:return te.Map(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.OFFSET]||[],(c||[])[0]);case z.Type.Union:return te.Union(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.TYPE]||[],s[z.BufferType.OFFSET]||c,c)}throw new Error(`Unrecognized typeId ${e.typeId}`)}static Null(e,t,i){return new te(e,t,i,0)}static Int(e,t,i,n,s,c){return new te(e,t,i,n,[void 0,he.toArrayBufferView(e.ArrayType,c),he.toUint8Array(s)])}static Dictionary(e,t,i,n,s,c,v){return new te(e,t,i,n,[void 0,he.toArrayBufferView(e.indices.ArrayType,c),he.toUint8Array(s)],[],v)}static Float(e,t,i,n,s,c){return new te(e,t,i,n,[void 0,he.toArrayBufferView(e.ArrayType,c),he.toUint8Array(s)])}static Bool(e,t,i,n,s,c){return new te(e,t,i,n,[void 0,he.toArrayBufferView(e.ArrayType,c),he.toUint8Array(s)])}static Decimal(e,t,i,n,s,c){return new te(e,t,i,n,[void 0,he.toArrayBufferView(e.ArrayType,c),he.toUint8Array(s)])}static Date(e,t,i,n,s,c){return new te(e,t,i,n,[void 0,he.toArrayBufferView(e.ArrayType,c),he.toUint8Array(s)])}static Time(e,t,i,n,s,c){return new te(e,t,i,n,[void 0,he.toArrayBufferView(e.ArrayType,c),he.toUint8Array(s)])}static Timestamp(e,t,i,n,s,c){return new te(e,t,i,n,[void 0,he.toArrayBufferView(e.ArrayType,c),he.toUint8Array(s)])}static Interval(e,t,i,n,s,c){return new te(e,t,i,n,[void 0,he.toArrayBufferView(e.ArrayType,c),he.toUint8Array(s)])}static FixedSizeBinary(e,t,i,n,s,c){return new te(e,t,i,n,[void 0,he.toArrayBufferView(e.ArrayType,c),he.toUint8Array(s)])}static Binary(e,t,i,n,s,c,v){return new te(e,t,i,n,[he.toInt32Array(c),he.toUint8Array(v),he.toUint8Array(s)])}static Utf8(e,t,i,n,s,c,v){return new te(e,t,i,n,[he.toInt32Array(c),he.toUint8Array(v),he.toUint8Array(s)])}static List(e,t,i,n,s,c,v){return new te(e,t,i,n,[he.toInt32Array(c),void 0,he.toUint8Array(s)],v?[v]:[])}static FixedSizeList(e,t,i,n,s,c){return new te(e,t,i,n,[void 0,void 0,he.toUint8Array(s)],c?[c]:[])}static Struct(e,t,i,n,s,c){return new te(e,t,i,n,[void 0,void 0,he.toUint8Array(s)],c)}static Map(e,t,i,n,s,c,v){return new te(e,t,i,n,[he.toInt32Array(c),void 0,he.toUint8Array(s)],v?[v]:[])}static Union(e,t,i,n,s,c,v,I){let S=[void 0,void 0,he.toUint8Array(s),he.toArrayBufferView(e.ArrayType,c)];return e.mode===z.UnionMode.Sparse?new te(e,t,i,n,S,v):(S[z.BufferType.OFFSET]=he.toInt32Array(v),new te(e,t,i,n,S,I))}};Ri.Data=te;te.prototype.childData=Object.freeze([])});var Qu=V(Mo=>{"use strict";Object.defineProperty(Mo,"__esModule",{value:!0});Mo.valueToString=void 0;var h1=void 0;function p1(r){if(r===null)return"null";if(r===h1)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)}Mo.valueToString=p1});var nm=V(Vo=>{"use strict";Object.defineProperty(Vo,"__esModule",{value:!0});Vo.createIsValidFunction=void 0;var ec=Qu(),y1=st();function m1(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
2
|
switch (x) {${t.map(i=>`
|
|
3
3
|
case ${_1(i)}:`).join("")}
|
|
4
4
|
return false;
|
|
5
5
|
}`),r.length!==t.length&&(e=`if (x !== x) return false;
|
|
6
6
|
${e}`),new Function("x",`${e}
|
|
7
|
-
return true;`)}Fo.createIsValidFunction=m1;function _1(r){return typeof r!="bigint"?Xu.valueToString(r):y1.BigIntAvailable?`${Xu.valueToString(r)}n`:`"${Xu.valueToString(r)}"`}});var Kr=V(wt=>{"use strict";Object.defineProperty(wt,"__esModule",{value:!0});wt.WideBufferBuilder=wt.OffsetsBufferBuilder=wt.BitmapBufferBuilder=wt.DataBufferBuilder=wt.BufferBuilder=void 0;var sm=Ye(),Qu=st(),ec=(r,e)=>(r*e+63&~63||64)/e,b1=(r,e=0)=>r.length>=e?r.subarray(0,e):sm.memcpy(new r.constructor(e),r,0),ss=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?ec(i*1,this.BYTES_PER_ELEMENT):ec(i*2,this.BYTES_PER_ELEMENT))}return this}flush(e=this.length){e=ec(e*this.stride,this.BYTES_PER_ELEMENT);let t=b1(this.buffer,e);return this.clear(),t}clear(){return this.length=0,this._resize(0),this}_resize(e){return this.buffer=sm.memcpy(new this.ArrayType(e),this.buffer)}};wt.BufferBuilder=ss;ss.prototype.offset=0;var Mo=class extends ss{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}};wt.DataBufferBuilder=Mo;var om=class extends Mo{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,s=e%8,c=i[n]>>s&1;return t?c===0&&(i[n]|=1<<s,++this.numValid):c===1&&(i[n]&=~(1<<s),--this.numValid),this}clear(){return this.numValid=0,super.clear()}};wt.BitmapBufferBuilder=om;var am=class extends Mo{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)}};wt.OffsetsBufferBuilder=am;var um=class extends ss{get ArrayType64(){return this._ArrayType64||(this._ArrayType64=this.buffer instanceof Int32Array?Qu.BigInt64Array:Qu.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 Qu.BigIntAvailable&&(this.buffer64=new this.ArrayType64(t.buffer,t.byteOffset,i)),t}};wt.WideBufferBuilder=um});var Ue=V(Zr=>{"use strict";Object.defineProperty(Zr,"__esModule",{value:!0});Zr.VariableWidthBuilder=Zr.FixedWidthBuilder=Zr.Builder=void 0;var g1=Re(),cn=Te(),v1=qt(),j1=nm(),tc=Kr(),w1=be(),Bt=class{constructor({type:e,nullValues:t}){this.length=0,this.finished=!1,this.type=e,this.children=[],this.nullValues=t,this.stride=w1.strideForType(e),this._nulls=new tc.BitmapBufferBuilder,t&&t.length>0&&(this._isValid=j1.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 B1(e)}static throughAsyncIterable(e){return T1(e)}toVector(){return g1.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:s,nullCount:c}=this;n?(e[cn.BufferType.TYPE]=n.flush(s),i&&(e[cn.BufferType.OFFSET]=i.flush(s))):i?(t&&(e[cn.BufferType.DATA]=t.flush(i.last())),e[cn.BufferType.OFFSET]=i.flush(s)):t&&(e[cn.BufferType.DATA]=t.flush(s)),c>0&&(e[cn.BufferType.VALIDITY]=this._nulls.flush(s));let v=v1.Data.new(this.type,0,s,c,e,this.children.map(I=>I.flush()));return this.clear(),v}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}};Zr.Builder=Bt;Bt.prototype.length=1;Bt.prototype.stride=1;Bt.prototype.children=null;Bt.prototype.finished=!1;Bt.prototype.nullValues=null;Bt.prototype._isValid=()=>!0;var cm=class extends Bt{constructor(e){super(e);this._values=new tc.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)}};Zr.FixedWidthBuilder=cm;var lm=class extends Bt{constructor(e){super(e);this._pendingLength=0,this._offsets=new tc.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}};Zr.VariableWidthBuilder=lm;function B1(r){let{["queueingStrategy"]:e="count"}=r,{["highWaterMark"]:t=e!=="bytes"?1e3:2**14}=r,i=e!=="bytes"?"length":"byteLength";return function*(n){let s=0,c=Bt.new(r);for(let v of n)c.append(v)[i]>=t&&++s&&(yield c.toVector());(c.finish().length>0||s===0)&&(yield c.toVector())}}function T1(r){let{["queueingStrategy"]:e="count"}=r,{["highWaterMark"]:t=e!=="bytes"?1e3:2**14}=r,i=e!=="bytes"?"length":"byteLength";return async function*(n){let s=0,c=Bt.new(r);for await(let v of n)c.append(v)[i]>=t&&++s&&(yield c.toVector());(c.finish().length>0||s===0)&&(yield c.toVector())}}});var rc=V(Vo=>{"use strict";Object.defineProperty(Vo,"__esModule",{value:!0});Vo.BoolBuilder=void 0;var I1=Kr(),S1=Ue(),dm=class extends S1.Builder{constructor(e){super(e);this._values=new I1.BitmapBufferBuilder}setValue(e,t){this._values.set(e,+t)}};Vo.BoolBuilder=dm});var ic=V(Uo=>{"use strict";Object.defineProperty(Uo,"__esModule",{value:!0});Uo.NullBuilder=void 0;var D1=Ue(),fm=class extends D1.Builder{setValue(e,t){}setValid(e,t){return this.length=Math.max(e+1,this.length),t}};Uo.NullBuilder=fm});var nc=V(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr.DateMillisecondBuilder=Xr.DateDayBuilder=Xr.DateBuilder=void 0;var O1=Ue(),Co=class extends O1.FixedWidthBuilder{};Xr.DateBuilder=Co;var hm=class extends Co{};Xr.DateDayBuilder=hm;var pm=class extends Co{};Xr.DateMillisecondBuilder=pm});var sc=V(Po=>{"use strict";Object.defineProperty(Po,"__esModule",{value:!0});Po.DecimalBuilder=void 0;var A1=Ue(),ym=class extends A1.FixedWidthBuilder{};Po.DecimalBuilder=ym});var ac=V(ko=>{"use strict";Object.defineProperty(ko,"__esModule",{value:!0});ko.DictionaryBuilder=void 0;var F1=be(),oc=Ue(),mm=class extends oc.Builder{constructor({type:e,nullValues:t,dictionaryHashFunction:i}){super({type:new F1.Dictionary(e.dictionary,e.indices,e.id,e.isOrdered)});this._nulls=null,this._dictionaryOffset=0,this._keysToIndices=Object.create(null),this.indices=oc.Builder.new({type:this.type.indices,nullValues:t}),this.dictionary=oc.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),s=i[n];return s===void 0&&(i[n]=s=this._dictionaryOffset+this.dictionary.append(t).length-1),this.indices.setValue(e,s)}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}`}};ko.DictionaryBuilder=mm});var uc=V(Ro=>{"use strict";Object.defineProperty(Ro,"__esModule",{value:!0});Ro.FixedSizeBinaryBuilder=void 0;var M1=Ue(),_m=class extends M1.FixedWidthBuilder{};Ro.FixedSizeBinaryBuilder=_m});var os=V(dn=>{"use strict";Object.defineProperty(dn,"__esModule",{value:!0});dn.float64ToUint16=dn.uint16ToFloat64=void 0;var bm=new Float64Array(1),ln=new Uint32Array(bm.buffer);function V1(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)}dn.uint16ToFloat64=V1;function U1(r){if(r!==r)return 32256;bm[0]=r;let e=(ln[1]&2147483648)>>16&65535,t=ln[1]&2146435072,i=0;return t>=1089470464?ln[0]>0?t=31744:(t=(t&2080374784)>>16,i=(ln[1]&1048575)>>10):t<=1056964608?(i=1048576+(ln[1]&1048575),i=1048576+(i<<(t>>20)-998)>>21,t=0):(t=t-1056964608>>10,i=(ln[1]&1048575)+512>>10),e|t|i&65535}dn.float64ToUint16=U1});var cc=V(rr=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});rr.Float64Builder=rr.Float32Builder=rr.Float16Builder=rr.FloatBuilder=void 0;var C1=os(),P1=Ue(),as=class extends P1.FixedWidthBuilder{};rr.FloatBuilder=as;var gm=class extends as{setValue(e,t){this._values.set(e,C1.float64ToUint16(t))}};rr.Float16Builder=gm;var vm=class extends as{setValue(e,t){this._values.set(e,t)}};rr.Float32Builder=vm;var jm=class extends as{setValue(e,t){this._values.set(e,t)}};rr.Float64Builder=jm});var ls=V($e=>{"use strict";Object.defineProperty($e,"__esModule",{value:!0});$e.BN=$e.bignumToBigInt=$e.bignumToString=$e.isArrowBigNumSymbol=void 0;var k1=Ye(),us=st();$e.isArrowBigNumSymbol=Symbol.for("isArrowBigNum");function zt(r,...e){return e.length===0?Object.setPrototypeOf(k1.toArrayBufferView(this.TypedArray,r),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(r,...e),this.constructor.prototype)}zt.prototype[$e.isArrowBigNumSymbol]=!0;zt.prototype.toJSON=function(){return`"${$e.bignumToString(this)}"`};zt.prototype.valueOf=function(){return wm(this)};zt.prototype.toString=function(){return $e.bignumToString(this)};zt.prototype[Symbol.toPrimitive]=function(r="default"){switch(r){case"number":return wm(this);case"string":return $e.bignumToString(this);case"default":return $e.bignumToBigInt(this)}return $e.bignumToString(this)};function fn(...r){return zt.apply(this,r)}function hn(...r){return zt.apply(this,r)}function cs(...r){return zt.apply(this,r)}Object.setPrototypeOf(fn.prototype,Object.create(Int32Array.prototype));Object.setPrototypeOf(hn.prototype,Object.create(Uint32Array.prototype));Object.setPrototypeOf(cs.prototype,Object.create(Uint32Array.prototype));Object.assign(fn.prototype,zt.prototype,{constructor:fn,signed:!0,TypedArray:Int32Array,BigIntArray:us.BigInt64Array});Object.assign(hn.prototype,zt.prototype,{constructor:hn,signed:!1,TypedArray:Uint32Array,BigIntArray:us.BigUint64Array});Object.assign(cs.prototype,zt.prototype,{constructor:cs,signed:!0,TypedArray:Uint32Array,BigIntArray:us.BigUint64Array});function wm(r){let{buffer:e,byteOffset:t,length:i,signed:n}=r,s=new Int32Array(e,t,i),c=0,v=0,I=s.length,S,U;for(;v<I;)U=s[v++],S=s[v++],n||(S=S>>>0),c+=(U>>>0)+S*v**32;return c}us.BigIntAvailable?($e.bignumToBigInt=r=>r.byteLength===8?new r.BigIntArray(r.buffer,r.byteOffset,1)[0]:lc(r),$e.bignumToString=r=>r.byteLength===8?`${new r.BigIntArray(r.buffer,r.byteOffset,1)[0]}`:lc(r)):($e.bignumToString=lc,$e.bignumToBigInt=$e.bignumToString);function lc(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),s=-1,c=i.length-1;do{for(t[0]=i[s=0];s<c;)i[s++]=t[1]=t[0]/10,t[0]=(t[0]-t[1]*10<<16)+i[s];i[s]=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 No=class{static new(e,t){switch(t){case!0:return new fn(e);case!1:return new hn(e)}switch(e.constructor){case Int8Array:case Int16Array:case Int32Array:case us.BigInt64Array:return new fn(e)}return e.byteLength===16?new cs(e):new hn(e)}static signed(e){return new fn(e)}static unsigned(e){return new hn(e)}static decimal(e){return new cs(e)}constructor(e,t){return No.new(e,t)}};$e.BN=No});var dc=V(Le=>{"use strict";Object.defineProperty(Le,"__esModule",{value:!0});Le.Uint64Builder=Le.Uint32Builder=Le.Uint16Builder=Le.Uint8Builder=Le.Int64Builder=Le.Int32Builder=Le.Int16Builder=Le.Int8Builder=Le.IntBuilder=void 0;var R1=ls(),Bm=Kr(),N1=st(),x1=Ue(),ir=class extends x1.FixedWidthBuilder{setValue(e,t){this._values.set(e,t)}};Le.IntBuilder=ir;var Tm=class extends ir{};Le.Int8Builder=Tm;var Im=class extends ir{};Le.Int16Builder=Im;var Sm=class extends ir{};Le.Int32Builder=Sm;var Dm=class extends ir{constructor(e){e.nullValues&&(e.nullValues=e.nullValues.map(xo));super(e);this._values=new Bm.WideBufferBuilder(new Int32Array(0),2)}get values64(){return this._values.buffer64}isValid(e){return super.isValid(xo(e))}};Le.Int64Builder=Dm;var Om=class extends ir{};Le.Uint8Builder=Om;var Am=class extends ir{};Le.Uint16Builder=Am;var Fm=class extends ir{};Le.Uint32Builder=Fm;var Mm=class extends ir{constructor(e){e.nullValues&&(e.nullValues=e.nullValues.map(xo));super(e);this._values=new Bm.WideBufferBuilder(new Uint32Array(0),2)}get values64(){return this._values.buffer64}isValid(e){return super.isValid(xo(e))}};Le.Uint64Builder=Mm;var xo=(r=>e=>(ArrayBuffer.isView(e)&&(r.buffer=e.buffer,r.byteOffset=e.byteOffset,r.byteLength=e.byteLength,e=R1.bignumToBigInt(r),r.buffer=null),e))({BigIntArray:N1.BigInt64Array})});var fc=V(Tt=>{"use strict";Object.defineProperty(Tt,"__esModule",{value:!0});Tt.TimeNanosecondBuilder=Tt.TimeMicrosecondBuilder=Tt.TimeMillisecondBuilder=Tt.TimeSecondBuilder=Tt.TimeBuilder=void 0;var E1=Ue(),pn=class extends E1.FixedWidthBuilder{};Tt.TimeBuilder=pn;var Vm=class extends pn{};Tt.TimeSecondBuilder=Vm;var Um=class extends pn{};Tt.TimeMillisecondBuilder=Um;var Cm=class extends pn{};Tt.TimeMicrosecondBuilder=Cm;var Pm=class extends pn{};Tt.TimeNanosecondBuilder=Pm});var hc=V(It=>{"use strict";Object.defineProperty(It,"__esModule",{value:!0});It.TimestampNanosecondBuilder=It.TimestampMicrosecondBuilder=It.TimestampMillisecondBuilder=It.TimestampSecondBuilder=It.TimestampBuilder=void 0;var L1=Ue(),yn=class extends L1.FixedWidthBuilder{};It.TimestampBuilder=yn;var km=class extends yn{};It.TimestampSecondBuilder=km;var Rm=class extends yn{};It.TimestampMillisecondBuilder=Rm;var Nm=class extends yn{};It.TimestampMicrosecondBuilder=Nm;var xm=class extends yn{};It.TimestampNanosecondBuilder=xm});var pc=V(Qr=>{"use strict";Object.defineProperty(Qr,"__esModule",{value:!0});Qr.IntervalYearMonthBuilder=Qr.IntervalDayTimeBuilder=Qr.IntervalBuilder=void 0;var q1=Ue(),Eo=class extends q1.FixedWidthBuilder{};Qr.IntervalBuilder=Eo;var Em=class extends Eo{};Qr.IntervalDayTimeBuilder=Em;var Lm=class extends Eo{};Qr.IntervalYearMonthBuilder=Lm});var qo=V(Lo=>{"use strict";Object.defineProperty(Lo,"__esModule",{value:!0});Lo.BinaryBuilder=void 0;var z1=Ye(),W1=Kr(),H1=Ue(),qm=class extends H1.VariableWidthBuilder{constructor(e){super(e);this._values=new W1.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,z1.toUint8Array(t))}_flushPending(e,t){let i=this._offsets,n=this._values.reserve(t).buffer,s=0,c=0,v=0,I;for([s,I]of e)I===void 0?i.set(s,0):(c=I.length,n.set(I,v),i.set(s,c),v+=c)}};Lo.BinaryBuilder=qm});var Wo=V(zo=>{"use strict";Object.defineProperty(zo,"__esModule",{value:!0});zo.Utf8Builder=void 0;var Y1=Ti(),$1=qo(),G1=Kr(),J1=Ue(),yc=class extends J1.VariableWidthBuilder{constructor(e){super(e);this._values=new G1.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,Y1.encodeUtf8(t))}_flushPending(e,t){}};zo.Utf8Builder=yc;yc.prototype._flushPending=$1.BinaryBuilder.prototype._flushPending});var mc=V(Ho=>{"use strict";Object.defineProperty(Ho,"__esModule",{value:!0});Ho.Run=void 0;var K1=Re(),zm=class{get length(){return this._values.length}get(e){return this._values[e]}clear(){return this._values=null,this}bind(e){return e instanceof K1.Vector?e:(this._values=e,this)}};Ho.Run=zm});var Ke=V(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});mn.Field=mn.Schema=void 0;var Z1=be(),St=class{constructor(e=[],t,i){this.fields=e||[],this.metadata=t||new Map,i||(i=_c(e)),this.dictionaries=i}get[Symbol.toStringTag](){return"Schema"}toString(){return`Schema<{ ${this.fields.map((e,t)=>`${t}: ${e}`).join(", ")} }>`}select(...e){let t=e.reduce((i,n)=>(i[n]=!0)&&i,Object.create(null));return new St(this.fields.filter(i=>t[i.name]),this.metadata)}selectAt(...e){return new St(e.map(t=>this.fields[t]).filter(Boolean),this.metadata)}assign(...e){let t=e[0]instanceof St?e[0]:Array.isArray(e[0])?new St(e[0]):new St(e),i=[...this.fields],n=Yo(Yo(new Map,this.metadata),t.metadata),s=t.fields.filter(v=>{let I=i.findIndex(S=>S.name===v.name);return~I?(i[I]=v.clone({metadata:Yo(Yo(new Map,i[I].metadata),v.metadata)}))&&!1:!0}),c=_c(s,new Map);return new St([...i,...s],n,new Map([...this.dictionaries,...c]))}};mn.Schema=St;var Tr=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,s]=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),s===void 0&&(s=e[0].metadata)),new Tr(`${t}`,i,n,s)}get typeId(){return this.type.typeId}get[Symbol.toStringTag](){return"Field"}toString(){return`${this.name}: ${this.type}`}clone(...e){let[t,i,n,s]=e;return!e[0]||typeof e[0]!="object"?[t=this.name,i=this.type,n=this.nullable,s=this.metadata]=e:{name:t=this.name,type:i=this.type,nullable:n=this.nullable,metadata:s=this.metadata}=e[0],Tr.new(t,i,n,s)}};mn.Field=Tr;function Yo(r,e){return new Map([...r||new Map,...e||new Map])}function _c(r,e=new Map){for(let t=-1,i=r.length;++t<i;){let s=r[t].type;if(Z1.DataType.isDictionary(s)){if(!e.has(s.id))e.set(s.id,s.dictionary);else if(e.get(s.id)!==s.dictionary)throw new Error("Cannot create Schema containing two different dictionaries with the same Id")}s.children&&s.children.length>0&&_c(s.children,e)}return e}St.prototype.fields=null;St.prototype.metadata=null;St.prototype.dictionaries=null;Tr.prototype.type=null;Tr.prototype.name=null;Tr.prototype.nullable=null;Tr.prototype.metadata=null});var bc=V($o=>{"use strict";Object.defineProperty($o,"__esModule",{value:!0});$o.ListBuilder=void 0;var X1=mc(),Q1=Ke(),eD=be(),tD=Kr(),rD=Ue(),Wm=class extends rD.VariableWidthBuilder{constructor(e){super(e);this._run=new X1.Run,this._offsets=new tD.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 eD.List(new Q1.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,s=0,c;for([s,c]of e)c===void 0?i.set(s,0):(i.set(s,c.length),n(this,s,t.bind(c)))}};$o.ListBuilder=Wm});var gc=V(Go=>{"use strict";Object.defineProperty(Go,"__esModule",{value:!0});Go.FixedSizeListBuilder=void 0;var iD=mc(),nD=Ke(),sD=Ue(),oD=be(),Hm=class extends sD.Builder{constructor(){super(...arguments);this._run=new iD.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 oD.FixedSizeList(this.type.listSize,new nD.Field(t,e.type,!0)),i}clear(){return this._run.clear(),super.clear()}};Go.FixedSizeListBuilder=Hm});var vc=V(Jo=>{"use strict";Object.defineProperty(Jo,"__esModule",{value:!0});Jo.MapBuilder=void 0;var aD=Ke(),uD=be(),cD=Ue(),Ym=class extends cD.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 uD.Map_(new aD.Field(t,e.type,!0),this.type.keysSorted),this.numChildren-1}_flushPending(e){let t=this._offsets,i=this._setValue;e.forEach((n,s)=>{n===void 0?t.set(s,0):(t.set(s,n.size),i(this,s,n))})}};Jo.MapBuilder=Ym});var jc=V(Ko=>{"use strict";Object.defineProperty(Ko,"__esModule",{value:!0});Ko.StructBuilder=void 0;var lD=Ke(),dD=Ue(),fD=be(),$m=class extends dD.Builder{addChild(e,t=`${this.numChildren}`){let i=this.children.push(e);return this.type=new fD.Struct([...this.type.children,new lD.Field(t,e.type,!0)]),i}};Ko.StructBuilder=$m});var wc=V(ei=>{"use strict";Object.defineProperty(ei,"__esModule",{value:!0});ei.DenseUnionBuilder=ei.SparseUnionBuilder=ei.UnionBuilder=void 0;var hD=Ke(),Gm=Kr(),pD=Ue(),yD=be(),Zo=class extends pD.Builder{constructor(e){super(e);this._typeIds=new Gm.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:s,typeIds:c}}=this,v=[...n,new hD.Field(t,e.type)];return this.type=new yD.Union(s,[...c,i],v),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.")}};ei.UnionBuilder=Zo;var Jm=class extends Zo{};ei.SparseUnionBuilder=Jm;var Km=class extends Zo{constructor(e){super(e);this._offsets=new Gm.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)}};ei.DenseUnionBuilder=Km});var tt=V(Xo=>{"use strict";Object.defineProperty(Xo,"__esModule",{value:!0});Xo.Visitor=void 0;var mD=qt(),_D=Re(),F=Te(),bD=be(),we=class{visitMany(e,...t){return e.map((i,n)=>this.visit(i,...t.map(s=>s[n])))}visit(...e){return this.getVisitFn(e[0],!1).apply(this,e)}getVisitFn(e,t=!0){return gD(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}};Xo.Visitor=we;function gD(r,e,t=!0){let i=null,n=F.Type.NONE;switch(e instanceof mD.Data||e instanceof _D.Vector?n=Bc(e.type):e instanceof bD.DataType?n=Bc(e):typeof(n=e)!="number"&&(n=F.Type[e]),n){case F.Type.Null:i=r.visitNull;break;case F.Type.Bool:i=r.visitBool;break;case F.Type.Int:i=r.visitInt;break;case F.Type.Int8:i=r.visitInt8||r.visitInt;break;case F.Type.Int16:i=r.visitInt16||r.visitInt;break;case F.Type.Int32:i=r.visitInt32||r.visitInt;break;case F.Type.Int64:i=r.visitInt64||r.visitInt;break;case F.Type.Uint8:i=r.visitUint8||r.visitInt;break;case F.Type.Uint16:i=r.visitUint16||r.visitInt;break;case F.Type.Uint32:i=r.visitUint32||r.visitInt;break;case F.Type.Uint64:i=r.visitUint64||r.visitInt;break;case F.Type.Float:i=r.visitFloat;break;case F.Type.Float16:i=r.visitFloat16||r.visitFloat;break;case F.Type.Float32:i=r.visitFloat32||r.visitFloat;break;case F.Type.Float64:i=r.visitFloat64||r.visitFloat;break;case F.Type.Utf8:i=r.visitUtf8;break;case F.Type.Binary:i=r.visitBinary;break;case F.Type.FixedSizeBinary:i=r.visitFixedSizeBinary;break;case F.Type.Date:i=r.visitDate;break;case F.Type.DateDay:i=r.visitDateDay||r.visitDate;break;case F.Type.DateMillisecond:i=r.visitDateMillisecond||r.visitDate;break;case F.Type.Timestamp:i=r.visitTimestamp;break;case F.Type.TimestampSecond:i=r.visitTimestampSecond||r.visitTimestamp;break;case F.Type.TimestampMillisecond:i=r.visitTimestampMillisecond||r.visitTimestamp;break;case F.Type.TimestampMicrosecond:i=r.visitTimestampMicrosecond||r.visitTimestamp;break;case F.Type.TimestampNanosecond:i=r.visitTimestampNanosecond||r.visitTimestamp;break;case F.Type.Time:i=r.visitTime;break;case F.Type.TimeSecond:i=r.visitTimeSecond||r.visitTime;break;case F.Type.TimeMillisecond:i=r.visitTimeMillisecond||r.visitTime;break;case F.Type.TimeMicrosecond:i=r.visitTimeMicrosecond||r.visitTime;break;case F.Type.TimeNanosecond:i=r.visitTimeNanosecond||r.visitTime;break;case F.Type.Decimal:i=r.visitDecimal;break;case F.Type.List:i=r.visitList;break;case F.Type.Struct:i=r.visitStruct;break;case F.Type.Union:i=r.visitUnion;break;case F.Type.DenseUnion:i=r.visitDenseUnion||r.visitUnion;break;case F.Type.SparseUnion:i=r.visitSparseUnion||r.visitUnion;break;case F.Type.Dictionary:i=r.visitDictionary;break;case F.Type.Interval:i=r.visitInterval;break;case F.Type.IntervalDayTime:i=r.visitIntervalDayTime||r.visitInterval;break;case F.Type.IntervalYearMonth:i=r.visitIntervalYearMonth||r.visitInterval;break;case F.Type.FixedSizeList:i=r.visitFixedSizeList;break;case F.Type.Map:i=r.visitMap;break}if(typeof i=="function")return i;if(!t)return()=>null;throw new Error(`Unrecognized type '${F.Type[n]}'`)}function Bc(r){switch(r.typeId){case F.Type.Null:return F.Type.Null;case F.Type.Int:{let{bitWidth:e,isSigned:t}=r;switch(e){case 8:return t?F.Type.Int8:F.Type.Uint8;case 16:return t?F.Type.Int16:F.Type.Uint16;case 32:return t?F.Type.Int32:F.Type.Uint32;case 64:return t?F.Type.Int64:F.Type.Uint64}return F.Type.Int}case F.Type.Float:switch(r.precision){case F.Precision.HALF:return F.Type.Float16;case F.Precision.SINGLE:return F.Type.Float32;case F.Precision.DOUBLE:return F.Type.Float64}return F.Type.Float;case F.Type.Binary:return F.Type.Binary;case F.Type.Utf8:return F.Type.Utf8;case F.Type.Bool:return F.Type.Bool;case F.Type.Decimal:return F.Type.Decimal;case F.Type.Time:switch(r.unit){case F.TimeUnit.SECOND:return F.Type.TimeSecond;case F.TimeUnit.MILLISECOND:return F.Type.TimeMillisecond;case F.TimeUnit.MICROSECOND:return F.Type.TimeMicrosecond;case F.TimeUnit.NANOSECOND:return F.Type.TimeNanosecond}return F.Type.Time;case F.Type.Timestamp:switch(r.unit){case F.TimeUnit.SECOND:return F.Type.TimestampSecond;case F.TimeUnit.MILLISECOND:return F.Type.TimestampMillisecond;case F.TimeUnit.MICROSECOND:return F.Type.TimestampMicrosecond;case F.TimeUnit.NANOSECOND:return F.Type.TimestampNanosecond}return F.Type.Timestamp;case F.Type.Date:switch(r.unit){case F.DateUnit.DAY:return F.Type.DateDay;case F.DateUnit.MILLISECOND:return F.Type.DateMillisecond}return F.Type.Date;case F.Type.Interval:switch(r.unit){case F.IntervalUnit.DAY_TIME:return F.Type.IntervalDayTime;case F.IntervalUnit.YEAR_MONTH:return F.Type.IntervalYearMonth}return F.Type.Interval;case F.Type.Map:return F.Type.Map;case F.Type.List:return F.Type.List;case F.Type.Struct:return F.Type.Struct;case F.Type.Union:switch(r.mode){case F.UnionMode.Dense:return F.Type.DenseUnion;case F.UnionMode.Sparse:return F.Type.SparseUnion}return F.Type.Union;case F.Type.FixedSizeBinary:return F.Type.FixedSizeBinary;case F.Type.FixedSizeList:return F.Type.FixedSizeList;case F.Type.Dictionary:return F.Type.Dictionary}throw new Error(`Unrecognized type '${F.Type[r.typeId]}'`)}we.prototype.visitInt8=null;we.prototype.visitInt16=null;we.prototype.visitInt32=null;we.prototype.visitInt64=null;we.prototype.visitUint8=null;we.prototype.visitUint16=null;we.prototype.visitUint32=null;we.prototype.visitUint64=null;we.prototype.visitFloat16=null;we.prototype.visitFloat32=null;we.prototype.visitFloat64=null;we.prototype.visitDateDay=null;we.prototype.visitDateMillisecond=null;we.prototype.visitTimestampSecond=null;we.prototype.visitTimestampMillisecond=null;we.prototype.visitTimestampMicrosecond=null;we.prototype.visitTimestampNanosecond=null;we.prototype.visitTimeSecond=null;we.prototype.visitTimeMillisecond=null;we.prototype.visitTimeMicrosecond=null;we.prototype.visitTimeNanosecond=null;we.prototype.visitDenseUnion=null;we.prototype.visitSparseUnion=null;we.prototype.visitIntervalDayTime=null;we.prototype.visitIntervalYearMonth=null});var Sc=V(_n=>{"use strict";Object.defineProperty(_n,"__esModule",{value:!0});_n.instance=_n.SetVisitor=void 0;var vD=Re(),jD=tt(),wD=Ti(),BD=os(),TD=Ye(),Dt=Te(),re=class extends jD.Visitor{};_n.SetVisitor=re;var ID=(r,e,t)=>{r[e]=t/864e5|0},Tc=(r,e,t)=>{r[e]=t%4294967296|0,r[e+1]=t/4294967296|0},SD=(r,e,t)=>{r[e]=t*1e3%4294967296|0,r[e+1]=t*1e3/4294967296|0},DD=(r,e,t)=>{r[e]=t*1e6%4294967296|0,r[e+1]=t*1e6/4294967296|0},Zm=(r,e,t,i)=>{let{[t]:n,[t+1]:s}=e;n!=null&&s!=null&&r.set(i.subarray(0,s-n),n)},OD=({offset:r,values:e},t,i)=>{let n=r+t;i?e[n>>3]|=1<<n%8:e[n>>3]&=~(1<<n%8)},Xm=({values:r},e,t)=>{ID(r,e,t.valueOf())},Qm=({values:r},e,t)=>{Tc(r,e*2,t.valueOf())},nr=({stride:r,values:e},t,i)=>{e[r*t]=i},e_=({stride:r,values:e},t,i)=>{e[r*t]=BD.float64ToUint16(i)},Ic=(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:s}=r,c=TD.toArrayBufferView(s,i);r.values.set(c.subarray(0,n),n*e)}}},AD=({stride:r,values:e},t,i)=>{e.set(i.subarray(0,r),r*t)},FD=({values:r,valueOffsets:e},t,i)=>Zm(r,e,t,i),MD=({values:r,valueOffsets:e},t,i)=>{Zm(r,e,t,wD.encodeUtf8(i))},VD=(r,e,t)=>{r.type.bitWidth<64?nr(r,e,t):Ic(r,e,t)},UD=(r,e,t)=>{r.type.precision!==Dt.Precision.HALF?nr(r,e,t):e_(r,e,t)},CD=(r,e,t)=>{r.type.unit===Dt.DateUnit.DAY?Xm(r,e,t):Qm(r,e,t)},t_=({values:r},e,t)=>Tc(r,e*2,t/1e3),r_=({values:r},e,t)=>Tc(r,e*2,t),i_=({values:r},e,t)=>SD(r,e*2,t),n_=({values:r},e,t)=>DD(r,e*2,t),PD=(r,e,t)=>{switch(r.type.unit){case Dt.TimeUnit.SECOND:return t_(r,e,t);case Dt.TimeUnit.MILLISECOND:return r_(r,e,t);case Dt.TimeUnit.MICROSECOND:return i_(r,e,t);case Dt.TimeUnit.NANOSECOND:return n_(r,e,t)}},s_=({values:r,stride:e},t,i)=>{r[e*t]=i},o_=({values:r,stride:e},t,i)=>{r[e*t]=i},a_=({values:r},e,t)=>{r.set(t.subarray(0,2),2*e)},u_=({values:r},e,t)=>{r.set(t.subarray(0,2),2*e)},kD=(r,e,t)=>{switch(r.type.unit){case Dt.TimeUnit.SECOND:return s_(r,e,t);case Dt.TimeUnit.MILLISECOND:return o_(r,e,t);case Dt.TimeUnit.MICROSECOND:return a_(r,e,t);case Dt.TimeUnit.NANOSECOND:return u_(r,e,t)}},RD=({values:r},e,t)=>{r.set(t.subarray(0,4),4*e)},ND=(r,e,t)=>{let i=r.getChildAt(0),n=r.valueOffsets;for(let s=-1,c=n[e],v=n[e+1];c<v;)i.set(c++,t.get(++s))},xD=(r,e,t)=>{let i=r.getChildAt(0),n=r.valueOffsets,s=t instanceof Map?[...t]:Object.entries(t);for(let c=-1,v=n[e],I=n[e+1];v<I;)i.set(v++,s[++c])},ED=(r,e)=>(t,i,n)=>t&&t.set(r,e[n]),LD=(r,e)=>(t,i,n)=>t&&t.set(r,e.get(n)),qD=(r,e)=>(t,i,n)=>t&&t.set(r,e.get(i.name)),zD=(r,e)=>(t,i,n)=>t&&t.set(r,e[i.name]),WD=(r,e,t)=>{let i=t instanceof Map?qD(e,t):t instanceof vD.Vector?LD(e,t):Array.isArray(t)?ED(e,t):zD(e,t);r.type.children.forEach((n,s)=>i(r.getChildAt(s),n,s))},HD=(r,e,t)=>{r.type.mode===Dt.UnionMode.Dense?c_(r,e,t):l_(r,e,t)},c_=(r,e,t)=>{let i=r.typeIdToChildIndex[r.typeIds[e]],n=r.getChildAt(i);n&&n.set(r.valueOffsets[e],t)},l_=(r,e,t)=>{let i=r.typeIdToChildIndex[r.typeIds[e]],n=r.getChildAt(i);n&&n.set(e,t)},YD=(r,e,t)=>{let i=r.getKey(e);i!==null&&r.setValue(i,t)},$D=(r,e,t)=>{r.type.unit===Dt.IntervalUnit.DAY_TIME?d_(r,e,t):f_(r,e,t)},d_=({values:r},e,t)=>{r.set(t.subarray(0,2),2*e)},f_=({values:r},e,t)=>{r[e]=t[0]*12+t[1]%12},GD=(r,e,t)=>{let i=r.getChildAt(0),{stride:n}=r;for(let s=-1,c=e*n;++s<n;)i.set(c+s,t.get(s))};re.prototype.visitBool=OD;re.prototype.visitInt=VD;re.prototype.visitInt8=nr;re.prototype.visitInt16=nr;re.prototype.visitInt32=nr;re.prototype.visitInt64=Ic;re.prototype.visitUint8=nr;re.prototype.visitUint16=nr;re.prototype.visitUint32=nr;re.prototype.visitUint64=Ic;re.prototype.visitFloat=UD;re.prototype.visitFloat16=e_;re.prototype.visitFloat32=nr;re.prototype.visitFloat64=nr;re.prototype.visitUtf8=MD;re.prototype.visitBinary=FD;re.prototype.visitFixedSizeBinary=AD;re.prototype.visitDate=CD;re.prototype.visitDateDay=Xm;re.prototype.visitDateMillisecond=Qm;re.prototype.visitTimestamp=PD;re.prototype.visitTimestampSecond=t_;re.prototype.visitTimestampMillisecond=r_;re.prototype.visitTimestampMicrosecond=i_;re.prototype.visitTimestampNanosecond=n_;re.prototype.visitTime=kD;re.prototype.visitTimeSecond=s_;re.prototype.visitTimeMillisecond=o_;re.prototype.visitTimeMicrosecond=a_;re.prototype.visitTimeNanosecond=u_;re.prototype.visitDecimal=RD;re.prototype.visitList=ND;re.prototype.visitStruct=WD;re.prototype.visitUnion=HD;re.prototype.visitDenseUnion=c_;re.prototype.visitSparseUnion=l_;re.prototype.visitDictionary=YD;re.prototype.visitInterval=$D;re.prototype.visitIntervalDayTime=d_;re.prototype.visitIntervalYearMonth=f_;re.prototype.visitFixedSizeList=GD;re.prototype.visitMap=xD;_n.instance=new re});var h_=V(bn=>{"use strict";Object.defineProperty(bn,"__esModule",{value:!0});bn.instance=bn.GetBuilderCtor=void 0;var JD=tt(),KD=qo(),ZD=rc(),Dc=nc(),XD=sc(),QD=ac(),eO=uc(),tO=gc(),Qo=cc(),Oc=pc(),Ir=dc(),rO=bc(),iO=vc(),nO=ic(),sO=jc(),ds=hc(),fs=fc(),Ac=wc(),oO=Wo(),Fc=class extends JD.Visitor{visitNull(){return nO.NullBuilder}visitBool(){return ZD.BoolBuilder}visitInt(){return Ir.IntBuilder}visitInt8(){return Ir.Int8Builder}visitInt16(){return Ir.Int16Builder}visitInt32(){return Ir.Int32Builder}visitInt64(){return Ir.Int64Builder}visitUint8(){return Ir.Uint8Builder}visitUint16(){return Ir.Uint16Builder}visitUint32(){return Ir.Uint32Builder}visitUint64(){return Ir.Uint64Builder}visitFloat(){return Qo.FloatBuilder}visitFloat16(){return Qo.Float16Builder}visitFloat32(){return Qo.Float32Builder}visitFloat64(){return Qo.Float64Builder}visitUtf8(){return oO.Utf8Builder}visitBinary(){return KD.BinaryBuilder}visitFixedSizeBinary(){return eO.FixedSizeBinaryBuilder}visitDate(){return Dc.DateBuilder}visitDateDay(){return Dc.DateDayBuilder}visitDateMillisecond(){return Dc.DateMillisecondBuilder}visitTimestamp(){return ds.TimestampBuilder}visitTimestampSecond(){return ds.TimestampSecondBuilder}visitTimestampMillisecond(){return ds.TimestampMillisecondBuilder}visitTimestampMicrosecond(){return ds.TimestampMicrosecondBuilder}visitTimestampNanosecond(){return ds.TimestampNanosecondBuilder}visitTime(){return fs.TimeBuilder}visitTimeSecond(){return fs.TimeSecondBuilder}visitTimeMillisecond(){return fs.TimeMillisecondBuilder}visitTimeMicrosecond(){return fs.TimeMicrosecondBuilder}visitTimeNanosecond(){return fs.TimeNanosecondBuilder}visitDecimal(){return XD.DecimalBuilder}visitList(){return rO.ListBuilder}visitStruct(){return sO.StructBuilder}visitUnion(){return Ac.UnionBuilder}visitDenseUnion(){return Ac.DenseUnionBuilder}visitSparseUnion(){return Ac.SparseUnionBuilder}visitDictionary(){return QD.DictionaryBuilder}visitInterval(){return Oc.IntervalBuilder}visitIntervalDayTime(){return Oc.IntervalDayTimeBuilder}visitIntervalYearMonth(){return Oc.IntervalYearMonthBuilder}visitFixedSizeList(){return tO.FixedSizeListBuilder}visitMap(){return iO.MapBuilder}};bn.GetBuilderCtor=Fc;bn.instance=new Fc});var ta=V(R=>{"use strict";Object.defineProperty(R,"__esModule",{value:!0});R.DenseUnionBuilder=R.SparseUnionBuilder=R.UnionBuilder=R.StructBuilder=R.MapBuilder=R.FixedSizeListBuilder=R.ListBuilder=R.BinaryBuilder=R.Utf8Builder=R.IntervalYearMonthBuilder=R.IntervalDayTimeBuilder=R.IntervalBuilder=R.TimestampNanosecondBuilder=R.TimestampMicrosecondBuilder=R.TimestampMillisecondBuilder=R.TimestampSecondBuilder=R.TimestampBuilder=R.TimeNanosecondBuilder=R.TimeMicrosecondBuilder=R.TimeMillisecondBuilder=R.TimeSecondBuilder=R.TimeBuilder=R.Uint64Builder=R.Uint32Builder=R.Uint16Builder=R.Uint8Builder=R.Int64Builder=R.Int32Builder=R.Int16Builder=R.Int8Builder=R.IntBuilder=R.Float64Builder=R.Float32Builder=R.Float16Builder=R.FloatBuilder=R.FixedSizeBinaryBuilder=R.DictionaryBuilder=R.DecimalBuilder=R.DateMillisecondBuilder=R.DateDayBuilder=R.DateBuilder=R.NullBuilder=R.BoolBuilder=R.Builder=void 0;var aO=Ue();Object.defineProperty(R,"Builder",{enumerable:!0,get:function(){return aO.Builder}});var uO=rc();Object.defineProperty(R,"BoolBuilder",{enumerable:!0,get:function(){return uO.BoolBuilder}});var cO=ic();Object.defineProperty(R,"NullBuilder",{enumerable:!0,get:function(){return cO.NullBuilder}});var Mc=nc();Object.defineProperty(R,"DateBuilder",{enumerable:!0,get:function(){return Mc.DateBuilder}});Object.defineProperty(R,"DateDayBuilder",{enumerable:!0,get:function(){return Mc.DateDayBuilder}});Object.defineProperty(R,"DateMillisecondBuilder",{enumerable:!0,get:function(){return Mc.DateMillisecondBuilder}});var lO=sc();Object.defineProperty(R,"DecimalBuilder",{enumerable:!0,get:function(){return lO.DecimalBuilder}});var dO=ac();Object.defineProperty(R,"DictionaryBuilder",{enumerable:!0,get:function(){return dO.DictionaryBuilder}});var fO=uc();Object.defineProperty(R,"FixedSizeBinaryBuilder",{enumerable:!0,get:function(){return fO.FixedSizeBinaryBuilder}});var ea=cc();Object.defineProperty(R,"FloatBuilder",{enumerable:!0,get:function(){return ea.FloatBuilder}});Object.defineProperty(R,"Float16Builder",{enumerable:!0,get:function(){return ea.Float16Builder}});Object.defineProperty(R,"Float32Builder",{enumerable:!0,get:function(){return ea.Float32Builder}});Object.defineProperty(R,"Float64Builder",{enumerable:!0,get:function(){return ea.Float64Builder}});var Sr=dc();Object.defineProperty(R,"IntBuilder",{enumerable:!0,get:function(){return Sr.IntBuilder}});Object.defineProperty(R,"Int8Builder",{enumerable:!0,get:function(){return Sr.Int8Builder}});Object.defineProperty(R,"Int16Builder",{enumerable:!0,get:function(){return Sr.Int16Builder}});Object.defineProperty(R,"Int32Builder",{enumerable:!0,get:function(){return Sr.Int32Builder}});Object.defineProperty(R,"Int64Builder",{enumerable:!0,get:function(){return Sr.Int64Builder}});Object.defineProperty(R,"Uint8Builder",{enumerable:!0,get:function(){return Sr.Uint8Builder}});Object.defineProperty(R,"Uint16Builder",{enumerable:!0,get:function(){return Sr.Uint16Builder}});Object.defineProperty(R,"Uint32Builder",{enumerable:!0,get:function(){return Sr.Uint32Builder}});Object.defineProperty(R,"Uint64Builder",{enumerable:!0,get:function(){return Sr.Uint64Builder}});var hs=fc();Object.defineProperty(R,"TimeBuilder",{enumerable:!0,get:function(){return hs.TimeBuilder}});Object.defineProperty(R,"TimeSecondBuilder",{enumerable:!0,get:function(){return hs.TimeSecondBuilder}});Object.defineProperty(R,"TimeMillisecondBuilder",{enumerable:!0,get:function(){return hs.TimeMillisecondBuilder}});Object.defineProperty(R,"TimeMicrosecondBuilder",{enumerable:!0,get:function(){return hs.TimeMicrosecondBuilder}});Object.defineProperty(R,"TimeNanosecondBuilder",{enumerable:!0,get:function(){return hs.TimeNanosecondBuilder}});var ps=hc();Object.defineProperty(R,"TimestampBuilder",{enumerable:!0,get:function(){return ps.TimestampBuilder}});Object.defineProperty(R,"TimestampSecondBuilder",{enumerable:!0,get:function(){return ps.TimestampSecondBuilder}});Object.defineProperty(R,"TimestampMillisecondBuilder",{enumerable:!0,get:function(){return ps.TimestampMillisecondBuilder}});Object.defineProperty(R,"TimestampMicrosecondBuilder",{enumerable:!0,get:function(){return ps.TimestampMicrosecondBuilder}});Object.defineProperty(R,"TimestampNanosecondBuilder",{enumerable:!0,get:function(){return ps.TimestampNanosecondBuilder}});var Vc=pc();Object.defineProperty(R,"IntervalBuilder",{enumerable:!0,get:function(){return Vc.IntervalBuilder}});Object.defineProperty(R,"IntervalDayTimeBuilder",{enumerable:!0,get:function(){return Vc.IntervalDayTimeBuilder}});Object.defineProperty(R,"IntervalYearMonthBuilder",{enumerable:!0,get:function(){return Vc.IntervalYearMonthBuilder}});var hO=Wo();Object.defineProperty(R,"Utf8Builder",{enumerable:!0,get:function(){return hO.Utf8Builder}});var pO=qo();Object.defineProperty(R,"BinaryBuilder",{enumerable:!0,get:function(){return pO.BinaryBuilder}});var yO=bc();Object.defineProperty(R,"ListBuilder",{enumerable:!0,get:function(){return yO.ListBuilder}});var mO=gc();Object.defineProperty(R,"FixedSizeListBuilder",{enumerable:!0,get:function(){return mO.FixedSizeListBuilder}});var _O=vc();Object.defineProperty(R,"MapBuilder",{enumerable:!0,get:function(){return _O.MapBuilder}});var bO=jc();Object.defineProperty(R,"StructBuilder",{enumerable:!0,get:function(){return bO.StructBuilder}});var Uc=wc();Object.defineProperty(R,"UnionBuilder",{enumerable:!0,get:function(){return Uc.UnionBuilder}});Object.defineProperty(R,"SparseUnionBuilder",{enumerable:!0,get:function(){return Uc.SparseUnionBuilder}});Object.defineProperty(R,"DenseUnionBuilder",{enumerable:!0,get:function(){return Uc.DenseUnionBuilder}});var Cc=Te(),gO=Wo(),vO=Ue(),p_=Sc(),y_=h_();vO.Builder.new=m_;function m_(r){let e=r.type,t=new(y_.instance.getVisitFn(e)())(r);if(e.children&&e.children.length>0){let i=r.children||[],n={nullValues:r.nullValues},s=Array.isArray(i)?(c,v)=>i[v]||n:({name:c})=>i[c]||n;e.children.forEach((c,v)=>{let{type:I}=c,S=s(c,v);t.children.push(m_({...S,type:I}))})}return t}Object.keys(Cc.Type).map(r=>Cc.Type[r]).filter(r=>typeof r=="number"&&r!==Cc.Type.NONE).forEach(r=>{let e=y_.instance.visit(r);e.prototype._setValue=p_.instance.getVisitFn(r)});gO.Utf8Builder.prototype._setValue=p_.instance.visitBinary});var __=V(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.Block=gn.Footer=void 0;var jO=gr(),ra=$r(),Ot=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsFooter(e,t){return(t||new Ot).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFooter(e,t){return e.setPosition(e.position()+jO.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Ot).__init(e.readInt32(e.position())+e.position(),e)}version(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):ra.MetadataVersion.V1}schema(e){let t=this.bb.__offset(this.bb_pos,6);return t?(e||new ra.Schema).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}dictionaries(e,t){let i=this.bb.__offset(this.bb_pos,8);return i?(t||new ia).__init(this.bb.__vector(this.bb_pos+i)+e*24,this.bb):null}dictionariesLength(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}recordBatches(e,t){let i=this.bb.__offset(this.bb_pos,10);return i?(t||new ia).__init(this.bb.__vector(this.bb_pos+i)+e*24,this.bb):null}recordBatchesLength(){let e=this.bb.__offset(this.bb_pos,10);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,t){let i=this.bb.__offset(this.bb_pos,12);return i?(t||new ra.KeyValue).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+e*4),this.bb):null}customMetadataLength(){let e=this.bb.__offset(this.bb_pos,12);return e?this.bb.__vector_len(this.bb_pos+e):0}static startFooter(e){e.startObject(5)}static addVersion(e,t){e.addFieldInt16(0,t,ra.MetadataVersion.V1)}static addSchema(e,t){e.addFieldOffset(1,t,0)}static addDictionaries(e,t){e.addFieldOffset(2,t,0)}static startDictionariesVector(e,t){e.startVector(24,t,8)}static addRecordBatches(e,t){e.addFieldOffset(3,t,0)}static startRecordBatchesVector(e,t){e.startVector(24,t,8)}static addCustomMetadata(e,t){e.addFieldOffset(4,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let i=t.length-1;i>=0;i--)e.addOffset(t[i]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static endFooter(e){return e.endObject()}static finishFooterBuffer(e,t){e.finish(t)}static finishSizePrefixedFooterBuffer(e,t){e.finish(t,void 0,!0)}static createFooter(e,t,i,n,s,c){return Ot.startFooter(e),Ot.addVersion(e,t),Ot.addSchema(e,i),Ot.addDictionaries(e,n),Ot.addRecordBatches(e,s),Ot.addCustomMetadata(e,c),Ot.endFooter(e)}};gn.Footer=Ot;var ia=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,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(e,t,i,n){return e.prep(8,24),e.writeInt64(n),e.pad(4),e.writeInt32(i),e.writeInt64(t),e.offset()}};gn.Block=ia});var Rc=V(vn=>{"use strict";Object.defineProperty(vn,"__esModule",{value:!0});vn.FileBlock=vn.Footer=void 0;var Wt=__(),Pc=gr(),b_=Pc.flatbuffers.Long,wO=Pc.flatbuffers.Builder,BO=Pc.flatbuffers.ByteBuffer,g_=Ke(),v_=Te(),TO=Ye(),kc=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 BO(TO.toUint8Array(e));let t=Wt.Footer.getRootAsFooter(e),i=g_.Schema.decode(t.schema());return new j_(i,t)}static encode(e){let t=new wO,i=g_.Schema.encode(t,e.schema);Wt.Footer.startRecordBatchesVector(t,e.numRecordBatches),[...e.recordBatches()].slice().reverse().forEach(c=>ti.encode(t,c));let n=t.endVector();Wt.Footer.startDictionariesVector(t,e.numDictionaries),[...e.dictionaryBatches()].slice().reverse().forEach(c=>ti.encode(t,c));let s=t.endVector();return Wt.Footer.startFooter(t),Wt.Footer.addSchema(t,i),Wt.Footer.addVersion(t,v_.MetadataVersion.V4),Wt.Footer.addRecordBatches(t,n),Wt.Footer.addDictionaries(t,s),Wt.Footer.finishFooterBuffer(t,Wt.Footer.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}};vn.Footer=kc;var j_=class extends kc{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 ti.decode(t)}return null}getDictionaryBatch(e){if(e>=0&&e<this.numDictionaries){let t=this._footer.dictionaries(e);if(t)return ti.decode(t)}return null}},ti=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 ti(e.metaDataLength(),e.bodyLength(),e.offset())}static encode(e,t){let{metaDataLength:i}=t,n=new b_(t.offset,0),s=new b_(t.bodyLength,0);return Wt.Block.createBlock(e,n,i,s)}};vn.FileBlock=ti});var si=V(ni=>{"use strict";Object.defineProperty(ni,"__esModule",{value:!0});ni.AsyncByteStream=ni.ByteStream=ni.AsyncByteQueue=void 0;var ri=ns(),w_=Ti(),ys=rn(),Nc=Ye(),jn=st(),xc=class extends ys.AsyncQueue{write(e){if((e=Nc.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?Nc.joinUint8Arrays(this._values)[0]:(async()=>{let t=[],i=0;for await(let n of this)t.push(n),i+=n.byteLength;return Nc.joinUint8Arrays(t,i)[0]})()}};ni.AsyncByteQueue=xc;var B_=class{constructor(e){e&&(this.source=new T_(ri.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)}};ni.ByteStream=B_;var na=class{constructor(e){e instanceof na?this.source=e.source:e instanceof xc?this.source=new ii(ri.default.fromAsyncIterable(e)):jn.isReadableNodeStream(e)?this.source=new ii(ri.default.fromNodeStream(e)):jn.isReadableDOMStream(e)?this.source=new ii(ri.default.fromDOMStream(e)):jn.isFetchResponse(e)?this.source=new ii(ri.default.fromDOMStream(e.body)):jn.isIterable(e)?this.source=new ii(ri.default.fromIterable(e)):jn.isPromise(e)?this.source=new ii(ri.default.fromAsyncIterable(e)):jn.isAsyncIterable(e)&&(this.source=new ii(ri.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)}};ni.AsyncByteStream=na;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)||ys.ITERATOR_DONE)}return(e){return Object.create(this.source.return&&this.source.return(e)||ys.ITERATOR_DONE)}},ii=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)||ys.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)||ys.ITERATOR_DONE;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(t)}}});var Ec=V(wn=>{"use strict";Object.defineProperty(wn,"__esModule",{value:!0});wn.AsyncRandomAccessFile=wn.RandomAccessFile=void 0;var I_=si(),IO=Ye(),S_=class extends I_.ByteStream{constructor(e,t){super();this.position=0,this.buffer=IO.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}}};wn.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 s=n,c=0,v=0,I=Math.min(i,s+Math.min(i-s,e)),S=new Uint8Array(Math.max(0,(this.position=I)-s));for(;(s+=v)<I&&(c+=v)<S.byteLength;)({bytesRead:v}=await t.read(S,c,S.byteLength-c,s));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 s=Math.min(n,e+t),c=new Uint8Array(s-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}}};wn.AsyncRandomAccessFile=D_});var qc=V(sr=>{"use strict";Object.defineProperty(sr,"__esModule",{value:!0});sr.Int128=sr.Int64=sr.Uint64=sr.BaseInt64=void 0;var SO=1<<16;function Bn(r){return r<0&&(r=4294967295+r+1),`0x${r.toString(16)}`}var Tn=8,Lc=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8],sa=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 s=n>>>16;return n=t[2]*i[3],s+=n,n=t[3]*i[2]>>>0,s+=n,this.buffer[0]+=s<<16,this.buffer[1]=s>>>0<n?SO:0,this.buffer[1]+=s>>>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`${Bn(this.buffer[1])} ${Bn(this.buffer[0])}`}};sr.BaseInt64=sa;var ge=class extends sa{times(e){return this._times(e),this}plus(e){return this._plus(e),this}static from(e,t=new Uint32Array(2)){return ge.fromString(typeof e=="string"?e:e.toString(),t)}static fromNumber(e,t=new Uint32Array(2)){return ge.fromString(e.toString(),t)}static fromString(e,t=new Uint32Array(2)){let i=e.length,n=new ge(t);for(let s=0;s<i;){let c=Tn<i-s?Tn:i-s,v=new ge(new Uint32Array([parseInt(e.substr(s,c),10),0])),I=new ge(new Uint32Array([Lc[c],0]));n.times(I),n.plus(v),s+=c}return n}static convertArray(e){let t=new Uint32Array(e.length*2);for(let i=-1,n=e.length;++i<n;)ge.from(e[i],new Uint32Array(t.buffer,t.byteOffset+2*i*4,2));return t}static multiply(e,t){return new ge(new Uint32Array(e.buffer)).times(t)}static add(e,t){return new ge(new Uint32Array(e.buffer)).plus(t)}};sr.Uint64=ge;var pt=class extends sa{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 pt.fromString(typeof e=="string"?e:e.toString(),t)}static fromNumber(e,t=new Uint32Array(2)){return pt.fromString(e.toString(),t)}static fromString(e,t=new Uint32Array(2)){let i=e.startsWith("-"),n=e.length,s=new pt(t);for(let c=i?1:0;c<n;){let v=Tn<n-c?Tn:n-c,I=new pt(new Uint32Array([parseInt(e.substr(c,v),10),0])),S=new pt(new Uint32Array([Lc[v],0]));s.times(S),s.plus(I),c+=v}return i?s.negate():s}static convertArray(e){let t=new Uint32Array(e.length*2);for(let i=-1,n=e.length;++i<n;)pt.from(e[i],new Uint32Array(t.buffer,t.byteOffset+2*i*4,2));return t}static multiply(e,t){return new pt(new Uint32Array(e.buffer)).times(t)}static add(e,t){return new pt(new Uint32Array(e.buffer)).plus(t)}};sr.Int64=pt;var Ht=class{constructor(e){this.buffer=e}high(){return new pt(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset+8,2))}low(){return new pt(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 ge(new Uint32Array([this.buffer[3],0])),i=new ge(new Uint32Array([this.buffer[2],0])),n=new ge(new Uint32Array([this.buffer[1],0])),s=new ge(new Uint32Array([this.buffer[0],0])),c=new ge(new Uint32Array([e.buffer[3],0])),v=new ge(new Uint32Array([e.buffer[2],0])),I=new ge(new Uint32Array([e.buffer[1],0])),S=new ge(new Uint32Array([e.buffer[0],0])),U=ge.multiply(s,S);this.buffer[0]=U.low();let G=new ge(new Uint32Array([U.high(),0]));return U=ge.multiply(n,S),G.plus(U),U=ge.multiply(s,I),G.plus(U),this.buffer[1]=G.low(),this.buffer[3]=G.lessThan(U)?1:0,this.buffer[2]=G.high(),new ge(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset+8,2)).plus(ge.multiply(i,S)).plus(ge.multiply(n,I)).plus(ge.multiply(s,v)),this.buffer[3]+=ge.multiply(t,S).plus(ge.multiply(i,I)).plus(ge.multiply(n,v)).plus(ge.multiply(s,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`${Bn(this.buffer[3])} ${Bn(this.buffer[2])} ${Bn(this.buffer[1])} ${Bn(this.buffer[0])}`}static multiply(e,t){return new Ht(new Uint32Array(e.buffer)).times(t)}static add(e,t){return new Ht(new Uint32Array(e.buffer)).plus(t)}static from(e,t=new Uint32Array(4)){return Ht.fromString(typeof e=="string"?e:e.toString(),t)}static fromNumber(e,t=new Uint32Array(4)){return Ht.fromString(e.toString(),t)}static fromString(e,t=new Uint32Array(4)){let i=e.startsWith("-"),n=e.length,s=new Ht(t);for(let c=i?1:0;c<n;){let v=Tn<n-c?Tn:n-c,I=new Ht(new Uint32Array([parseInt(e.substr(c,v),10),0,0,0])),S=new Ht(new Uint32Array([Lc[v],0,0,0]));s.times(S),s.plus(I),c+=v}return i?s.negate():s}static convertArray(e){let t=new Uint32Array(e.length*4);for(let i=-1,n=e.length;++i<n;)Ht.from(e[i],new Uint32Array(t.buffer,t.byteOffset+4*4*i,4));return t}};sr.Int128=Ht});var M_=V(In=>{"use strict";Object.defineProperty(In,"__esModule",{value:!0});In.JSONVectorLoader=In.VectorLoader=void 0;var Ge=qt(),DO=Ke(),Dr=be(),OO=tt(),O_=tr(),AO=Ti(),oa=qc(),A_=Te(),or=Ye(),zc=class extends OO.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 DO.Field?e.type:e)}visitNull(e,{length:t}=this.nextFieldNode()){return Ge.Data.Null(e,0,t)}visitBool(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.Data.Bool(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitInt(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.Data.Int(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitFloat(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.Data.Float(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitUtf8(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.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 Ge.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 Ge.Data.FixedSizeBinary(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitDate(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.Data.Date(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitTimestamp(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.Data.Timestamp(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitTime(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.Data.Time(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitDecimal(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.Data.Decimal(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitList(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.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 Ge.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 Ge.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 Ge.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 Ge.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 Ge.Data.Interval(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitFixedSizeList(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.Data.FixedSizeList(e,0,t,i,this.readNullBitmap(e,i),this.visit(e.children[0]))}visitMap(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.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)}};In.VectorLoader=zc;var F_=class extends zc{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 or.toArrayBufferView(Uint8Array,or.toArrayBufferView(Int32Array,this.sources[t]))}readTypeIds(e,{offset:t}=this.nextBufferRange()){return or.toArrayBufferView(Uint8Array,or.toArrayBufferView(e.ArrayType,this.sources[t]))}readData(e,{offset:t}=this.nextBufferRange()){let{sources:i}=this;return Dr.DataType.isTimestamp(e)||(Dr.DataType.isInt(e)||Dr.DataType.isTime(e))&&e.bitWidth===64||Dr.DataType.isDate(e)&&e.unit===A_.DateUnit.MILLISECOND?or.toArrayBufferView(Uint8Array,oa.Int64.convertArray(i[t])):Dr.DataType.isDecimal(e)?or.toArrayBufferView(Uint8Array,oa.Int128.convertArray(i[t])):Dr.DataType.isBinary(e)||Dr.DataType.isFixedSizeBinary(e)?FO(i[t]):Dr.DataType.isBool(e)?O_.packBools(i[t]):Dr.DataType.isUtf8(e)?AO.encodeUtf8(i[t].join("")):or.toArrayBufferView(Uint8Array,or.toArrayBufferView(e.ArrayType,i[t].map(n=>+n)))}};In.JSONVectorLoader=F_;function FO(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 ms=V(Dn=>{"use strict";Object.defineProperty(Dn,"__esModule",{value:!0});Dn.StructRow=Dn.MapRow=void 0;var V_=Zu(),rt=Symbol.for("parent"),Sn=Symbol.for("rowIndex"),yt=Symbol.for("keyToIdx"),mt=Symbol.for("idxToVal"),Wc=Symbol.for("nodejs.util.inspect.custom"),ar=class{constructor(e,t){this[rt]=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[yt]||(this[yt]=new Map),n=i.get(e);if(n!==void 0){let s=this[mt]||(this[mt]=new Array(this.size));(t=s[n])!==void 0||(s[n]=t=this.getValue(n))}else if((n=this.getIndex(e))>-1){i.set(e,n);let s=this[mt]||(this[mt]=new Array(this.size));(t=s[n])!==void 0||(s[n]=t=this.getValue(n))}}return t}set(e,t){if(e!=null){let i=this[yt]||(this[yt]=new Map),n=i.get(e);if(n===void 0&&i.set(e,n=this.getIndex(e)),n>-1){let s=this[mt]||(this[mt]=new Array(this.size));s[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[yt]||(this[yt]=new Map),n=this[mt]||(this[mt]=new Array(this.size));for(let s,c,v=0,I,S;!((I=e.next()).done||(S=t.next()).done);++v)s=I.value,c=S.value,n[v]=c,i.has(s)||i.set(s,v),yield[s,c]}forEach(e,t){let i=this.keys(),n=this.values(),s=t===void 0?e:(I,S,U)=>e.call(t,I,S,U),c=this[yt]||(this[yt]=new Map),v=this[mt]||(this[mt]=new Array(this.size));for(let I,S,U=0,G,me;!((G=i.next()).done||(me=n.next()).done);++U)I=G.value,S=me.value,v[U]=S,c.has(I)||c.set(I,U),s(S,I,this)}toArray(){return[...this.values()]}toJSON(){let e={};return this.forEach((t,i)=>e[i]=t),e}inspect(){return this.toString()}[Wc](){return this.toString()}toString(){let e=[];return this.forEach((t,i)=>{i=V_.valueToString(i),t=V_.valueToString(t),e.push(`${i}: ${t}`)}),`{ ${e.join(", ")} }`}};ar[Symbol.toStringTag]=(r=>(Object.defineProperties(r,{size:{writable:!0,enumerable:!1,configurable:!1,value:0},[rt]:{writable:!0,enumerable:!1,configurable:!1,value:null},[Sn]:{writable:!0,enumerable:!1,configurable:!1,value:-1}}),r[Symbol.toStringTag]="Row"))(ar.prototype);var U_=class extends ar{constructor(e){super(e,e.length);return MO(this)}keys(){return this[rt].getChildAt(0)[Symbol.iterator]()}values(){return this[rt].getChildAt(1)[Symbol.iterator]()}getKey(e){return this[rt].getChildAt(0).get(e)}getIndex(e){return this[rt].getChildAt(0).indexOf(e)}getValue(e){return this[rt].getChildAt(1).get(e)}setValue(e,t){this[rt].getChildAt(1).set(e,t)}};Dn.MapRow=U_;var C_=class extends ar{constructor(e){super(e,e.type.children.length);return P_(this)}*keys(){for(let e of this[rt].type.children)yield e.name}*values(){for(let e of this[rt].type.children)yield this[e.name]}getKey(e){return this[rt].type.children[e].name}getIndex(e){return this[rt].type.children.findIndex(t=>t.name===e)}getValue(e){return this[rt].getChildAt(e).get(this[Sn])}setValue(e,t){return this[rt].getChildAt(e).set(this[Sn],t)}};Dn.StructRow=C_;Object.setPrototypeOf(ar.prototype,Map.prototype);var P_=(()=>{let r={enumerable:!0,configurable:!1,get:null,set:null};return e=>{let t=-1,i=e[yt]||(e[yt]=new Map),n=c=>function(){return this.get(c)},s=c=>function(v){return this.set(c,v)};for(let c of e.keys())i.set(c,++t),r.get=n(c),r.set=s(c),Object.prototype.hasOwnProperty.call(e,c)||(r.enumerable=!0,Object.defineProperty(e,c,r)),Object.prototype.hasOwnProperty.call(e,t)||(r.enumerable=!1,Object.defineProperty(e,t,r));return r.get=r.set=null,e}})(),MO=(()=>{if(typeof Proxy=="undefined")return P_;let r=ar.prototype.has,e=ar.prototype.get,t=ar.prototype.set,i=ar.prototype.getKey,n={isExtensible(){return!1},deleteProperty(){return!1},preventExtensions(){return!0},ownKeys(s){return[...s.keys()].map(c=>`${c}`)},has(s,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 rt:case Sn:case mt:case yt:case Wc:return!0}return typeof c=="number"&&!s.has(c)&&(c=s.getKey(c)),s.has(c)},get(s,c,v){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 rt:case Sn:case mt:case yt:case Wc:return Reflect.get(s,c,v)}return typeof c=="number"&&!r.call(v,c)&&(c=i.call(v,c)),e.call(v,c)},set(s,c,v,I){switch(c){case rt:case Sn:case mt:case yt:return Reflect.set(s,c,v,I);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(I,c)&&(c=i.call(I,c)),r.call(I,c)?!!t.call(I,c,v):!1}};return s=>new Proxy(s,n)})()});var bs=V(oi=>{"use strict";Object.defineProperty(oi,"__esModule",{value:!0});oi.createElementComparator=oi.clampRange=oi.clampIndex=void 0;var k_=Re(),R_=ms(),VO=Ye(),N_=st();function UO(r,e,t){let i=r.length,n=e>-1?e:i+e%i;return t?t(r,n):n}oi.clampIndex=UO;var x_;function CO(r,e,t,i){let{length:n=0}=r,s=typeof e!="number"?0:e,c=typeof t!="number"?n:t;return s<0&&(s=(s%n+n)%n),c<0&&(c=(c%n+n)%n),c<s&&(x_=s,s=c,c=x_),c>n&&(c=n),i?i(r,s,c):[s,c]}oi.clampRange=CO;var PO=N_.BigIntAvailable?N_.BigInt(0):0,E_=r=>r!==r;function _s(r){let e=typeof r;if(e!=="object"||r===null)return E_(r)?E_:e!=="bigint"?t=>t===r:t=>PO+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?VO.compareArrayLike(r,t):!1:r instanceof Map?RO(r):Array.isArray(r)?kO(r):r instanceof k_.Vector?NO(r):xO(r)}oi.createElementComparator=_s;function kO(r){let e=[];for(let t=-1,i=r.length;++t<i;)e[t]=_s(r[t]);return aa(e)}function RO(r){let e=-1,t=[];return r.forEach(i=>t[++e]=_s(i)),aa(t)}function NO(r){let e=[];for(let t=-1,i=r.length;++t<i;)e[t]=_s(r.get(t));return aa(e)}function xO(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]=_s(r[e[i]]);return aa(t,e)}function aa(r,e){return t=>{if(!t||typeof t!="object")return!1;switch(t.constructor){case Array:return EO(r,t);case Map:case R_.MapRow:case R_.StructRow:return L_(r,t,t.keys());case Object:case void 0:return L_(r,t,e||Object.keys(t))}return t instanceof k_.Vector?LO(r,t):!1}}function EO(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 LO(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 L_(r,e,t){let i=t[Symbol.iterator](),n=e instanceof Map?e.keys():Object.keys(e)[Symbol.iterator](),s=e instanceof Map?e.values():Object.values(e)[Symbol.iterator](),c=0,v=r.length,I=s.next(),S=i.next(),U=n.next();for(;c<v&&!S.done&&!U.done&&!I.done&&!(S.value!==U.value||!r[c](I.value));++c,S=i.next(),U=n.next(),I=s.next());return c===v&&S.done&&U.done&&I.done?!0:(i.return&&i.return(),n.return&&n.return(),s.return&&s.return(),!1)}});var On=V(dt=>{"use strict";Object.defineProperty(dt,"__esModule",{value:!0});dt.selectColumnChildrenArgs=dt.selectVectorChildrenArgs=dt.selectChunkArgs=dt.selectFieldArgs=dt.selectColumnArgs=dt.selectArgs=void 0;var q_=qt(),z_=Ke(),ai=An(),gs=Re(),W_=be(),qO=ci(),ui=Array.isArray;dt.selectArgs=(r,e)=>ua(r,e,[],0);dt.selectColumnArgs=r=>{let[e,t]=Yc(r,[[],[]]);return t.map((i,n)=>i instanceof ai.Column?ai.Column.new(i.field.clone(e[n]),i):i instanceof gs.Vector?ai.Column.new(e[n],i):ai.Column.new(e[n],[]))};dt.selectFieldArgs=r=>Yc(r,[[],[]]);dt.selectChunkArgs=(r,e)=>Hc(r,e,[],0);dt.selectVectorChildrenArgs=(r,e)=>H_(r,e,[],0);dt.selectColumnChildrenArgs=(r,e)=>Y_(r,e,[],0);function ua(r,e,t,i){let n,s=i,c=-1,v=e.length;for(;++c<v;)ui(n=e[c])?s=ua(r,n,t,s).length:n instanceof r&&(t[s++]=n);return t}function Hc(r,e,t,i){let n,s=i,c=-1,v=e.length;for(;++c<v;)ui(n=e[c])?s=Hc(r,n,t,s).length:n instanceof qO.Chunked?s=Hc(r,n.chunks,t,s).length:n instanceof r&&(t[s++]=n);return t}function H_(r,e,t,i){let n,s=i,c=-1,v=e.length;for(;++c<v;)ui(n=e[c])?s=H_(r,n,t,s).length:n instanceof r?s=ua(gs.Vector,n.schema.fields.map((I,S)=>n.getChildAt(S)),t,s).length:n instanceof gs.Vector&&(t[s++]=n);return t}function Y_(r,e,t,i){let n,s=i,c=-1,v=e.length;for(;++c<v;)ui(n=e[c])?s=Y_(r,n,t,s).length:n instanceof r?s=ua(ai.Column,n.schema.fields.map((I,S)=>ai.Column.new(I,n.getChildAt(S))),t,s).length:n instanceof ai.Column&&(t[s++]=n);return t}var zO=(r,[e,t],i)=>(r[0][i]=e,r[1][i]=t,r);function Yc(r,e){let t,i;switch(i=r.length){case 0:return e;case 1:if(t=e[0],!r[0])return e;if(ui(r[0]))return Yc(r[0],e);r[0]instanceof q_.Data||r[0]instanceof gs.Vector||r[0]instanceof W_.DataType||([t,r]=Object.entries(r[0]).reduce(zO,e));break;default:ui(t=r[i-1])?r=ui(r[0])?r[0]:r.slice(0,i-1):(r=ui(r[0])?r[0]:r,t=[])}let n=-1,s=-1,c=-1,v=r.length,I,S,[U,G]=e;for(;++c<v;)S=r[c],S instanceof ai.Column&&(G[++s]=S)?U[++n]=S.field.clone(t[c],S.type,!0):({[c]:I=c}=t,S instanceof W_.DataType&&(G[++s]=S)?U[++n]=z_.Field.new(I,S,!0):S&&S.type&&(G[++s]=S)&&(S instanceof q_.Data&&(G[s]=S=gs.Vector.new(S)),U[++n]=z_.Field.new(I,S.type,!0)));return e}});var ci=V(ca=>{"use strict";Object.defineProperty(ca,"__esModule",{value:!0});ca.Chunked=void 0;var WO=bs(),$_=be(),HO=On(),G_=Re(),J_=class{constructor(e){this.chunks=e,this.chunkIndex=0,this.chunkIterator=this.getChunkIterator()}next(){for(;this.chunkIndex<this.chunks.length;){let e=this.chunkIterator.next();if(!e.done)return e;++this.chunkIndex<this.chunks.length&&(this.chunkIterator=this.getChunkIterator())}return{done:!0,value:null}}getChunkIterator(){return this.chunks[this.chunkIndex][Symbol.iterator]()}[Symbol.iterator](){return this}},Or=class extends G_.AbstractVector{constructor(e,t=[],i=YO(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 HO.selectChunkArgs(G_.Vector,e)}static concat(...e){let t=Or.flatten(...e);return new Or(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($_.DataType.isDictionary(this._type)){if(!this._indices){let e=this._chunks;this._indices=e.length===1?e[0].indices:Or.concat(...e.map(t=>t.indices))}return this._indices}return null}get dictionary(){return $_.DataType.isDictionary(this._type)?this._chunks[this._chunks.length-1].data.dictionary:null}[Symbol.iterator](){return new J_(this._chunks)}clone(e=this._chunks){return new Or(this._type,e)}concat(...e){return this.clone(Or.flatten(this,...e))}slice(e,t){return WO.clampRange(this,e,t,this._sliceInternal)}getChildAt(e){if(e<0||e>=this._numChildren)return null;let t=this._children||(this._children=[]),i,n,s;return(i=t[e])?i:(n=(this._type.children||[])[e])&&(s=this._chunks.map(c=>c.getChildAt(e)).filter(c=>c!=null),s.length>0)?t[e]=new Or(n.type,s):null}search(e,t){let i=e,n=this._chunkOffsets,s=n.length-1;if(i<0||i>=n[s])return null;if(s<=1)return t?t(this,0,i):[0,i];let c=0,v=0,I=0;do{if(c+1===s)return t?t(this,c,i-v):[c,i-v];I=c+(s-c)/2|0,i>=n[I]?c=I:s=I}while(i<n[s]&&i>=(v=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,s)=>i[n].set(s,t))}indexOf(e,t){return t&&typeof t=="number"?this.search(t,(i,n,s)=>this.indexOfInternal(i,n,s,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,s=new Array(t);for(let I=-1;++I<t;)n+=(s[I]=e[I].toArray()).length;i!==s[0].constructor&&(i=s[0].constructor);let c=new i(n),v=i===Array?GO:$O;for(let I=-1,S=0;++I<t;)S=v(s[I],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 s=t-1,c=e.length,v=i,I=0,S=-1;for(;++s<c;){if(~(S=e[s].indexOf(n,v)))return I+S;v=0,I+=e[s].length}return-1}_sliceInternal(e,t,i){let n=[],{chunks:s,_chunkOffsets:c}=e;for(let v=-1,I=s.length;++v<I;){let S=s[v],U=S.length,G=c[v];if(G>=i)break;if(t>=G+U)continue;if(G>=t&&G+U<=i){n.push(S);continue}let me=Math.max(0,t-G),fe=Math.min(i-G,U);n.push(S.slice(me,fe))}return e.clone(n)}};ca.Chunked=Or;function YO(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 $O=(r,e,t)=>(e.set(r,t),t+r.length),GO=(r,e,t)=>{let i=t;for(let n=-1,s=r.length;++n<s;)e[i++]=r[n];return i}});var An=V(la=>{"use strict";Object.defineProperty(la,"__esModule",{value:!0});la.Column=void 0;var K_=Ke(),Z_=Re(),$c=ci(),Ni=class extends $c.Chunked{constructor(e,t=[],i){t=$c.Chunked.flatten(...t);super(e.type,t,i);if(this._field=e,t.length===1&&!(this instanceof Gc))return new Gc(e,t[0],this._chunkOffsets)}static new(...e){let[t,i,...n]=e;typeof t!="string"&&!(t instanceof K_.Field)&&(i=t,t="");let s=$c.Chunked.flatten(Array.isArray(i)?[...i,...n]:i instanceof Z_.Vector?[i,...n]:[Z_.Vector.new(i,...n)]);if(typeof t=="string"){let c=s[0].data.type;t=new K_.Field(t,c,!0)}else!t.nullable&&s.some(({nullCount:c})=>c>0)&&(t=t.clone({nullable:!0}));return new Ni(t,s)}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 Ni(this._field,e)}getChildAt(e){if(e<0||e>=this.numChildren)return null;let t=this._children||(this._children=[]),i,n,s;return(i=t[e])?i:(n=(this.type.children||[])[e])&&(s=this._chunks.map(c=>c.getChildAt(e)).filter(c=>c!=null),s.length>0)?t[e]=new Ni(n,s):null}};la.Column=Ni;var Gc=class extends Ni{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 X_=V(Fn=>{"use strict";Object.defineProperty(Fn,"__esModule",{value:!0});Fn.instance=Fn.TypeAssembler=void 0;var JO=gr(),KO=JO.flatbuffers.Long,ZO=tt(),Y=$r(),Jc=class extends ZO.Visitor{visit(e,t){return e==null||t==null?void 0:super.visit(e,t)}visitNull(e,t){return Y.Null.startNull(t),Y.Null.endNull(t)}visitInt(e,t){return Y.Int.startInt(t),Y.Int.addBitWidth(t,e.bitWidth),Y.Int.addIsSigned(t,e.isSigned),Y.Int.endInt(t)}visitFloat(e,t){return Y.FloatingPoint.startFloatingPoint(t),Y.FloatingPoint.addPrecision(t,e.precision),Y.FloatingPoint.endFloatingPoint(t)}visitBinary(e,t){return Y.Binary.startBinary(t),Y.Binary.endBinary(t)}visitBool(e,t){return Y.Bool.startBool(t),Y.Bool.endBool(t)}visitUtf8(e,t){return Y.Utf8.startUtf8(t),Y.Utf8.endUtf8(t)}visitDecimal(e,t){return Y.Decimal.startDecimal(t),Y.Decimal.addScale(t,e.scale),Y.Decimal.addPrecision(t,e.precision),Y.Decimal.endDecimal(t)}visitDate(e,t){return Y.Date.startDate(t),Y.Date.addUnit(t,e.unit),Y.Date.endDate(t)}visitTime(e,t){return Y.Time.startTime(t),Y.Time.addUnit(t,e.unit),Y.Time.addBitWidth(t,e.bitWidth),Y.Time.endTime(t)}visitTimestamp(e,t){let i=e.timezone&&t.createString(e.timezone)||void 0;return Y.Timestamp.startTimestamp(t),Y.Timestamp.addUnit(t,e.unit),i!==void 0&&Y.Timestamp.addTimezone(t,i),Y.Timestamp.endTimestamp(t)}visitInterval(e,t){return Y.Interval.startInterval(t),Y.Interval.addUnit(t,e.unit),Y.Interval.endInterval(t)}visitList(e,t){return Y.List.startList(t),Y.List.endList(t)}visitStruct(e,t){return Y.Struct_.startStruct_(t),Y.Struct_.endStruct_(t)}visitUnion(e,t){Y.Union.startTypeIdsVector(t,e.typeIds.length);let i=Y.Union.createTypeIdsVector(t,e.typeIds);return Y.Union.startUnion(t),Y.Union.addMode(t,e.mode),Y.Union.addTypeIds(t,i),Y.Union.endUnion(t)}visitDictionary(e,t){let i=this.visit(e.indices,t);return Y.DictionaryEncoding.startDictionaryEncoding(t),Y.DictionaryEncoding.addId(t,new KO(e.id,0)),Y.DictionaryEncoding.addIsOrdered(t,e.isOrdered),i!==void 0&&Y.DictionaryEncoding.addIndexType(t,i),Y.DictionaryEncoding.endDictionaryEncoding(t)}visitFixedSizeBinary(e,t){return Y.FixedSizeBinary.startFixedSizeBinary(t),Y.FixedSizeBinary.addByteWidth(t,e.byteWidth),Y.FixedSizeBinary.endFixedSizeBinary(t)}visitFixedSizeList(e,t){return Y.FixedSizeList.startFixedSizeList(t),Y.FixedSizeList.addListSize(t,e.listSize),Y.FixedSizeList.endFixedSizeList(t)}visitMap(e,t){return Y.Map.startMap(t),Y.Map.addKeysSorted(t,e.keysSorted),Y.Map.endMap(t)}};Fn.TypeAssembler=Jc;Fn.instance=new Jc});var sb=V(ur=>{"use strict";Object.defineProperty(ur,"__esModule",{value:!0});ur.fieldFromJSON=ur.dictionaryBatchFromJSON=ur.recordBatchFromJSON=ur.schemaFromJSON=void 0;var Mn=Ke(),De=be(),xi=Ei(),Vn=Te();function XO(r,e=new Map){return new Mn.Schema(eA(r,e),da(r.customMetadata),e)}ur.schemaFromJSON=XO;function Q_(r){return new xi.RecordBatch(r.count,tb(r.columns),rb(r.columns))}ur.recordBatchFromJSON=Q_;function QO(r){return new xi.DictionaryBatch(Q_(r.data),r.id,r.isDelta)}ur.dictionaryBatchFromJSON=QO;function eA(r,e){return(r.fields||[]).filter(Boolean).map(t=>Mn.Field.fromJSON(t,e))}function eb(r,e){return(r.children||[]).filter(Boolean).map(t=>Mn.Field.fromJSON(t,e))}function tb(r){return(r||[]).reduce((e,t)=>[...e,new xi.FieldNode(t.count,tA(t.VALIDITY)),...tb(t.children)],[])}function rb(r,e=[]){for(let t=-1,i=(r||[]).length;++t<i;){let n=r[t];n.VALIDITY&&e.push(new xi.BufferRegion(e.length,n.VALIDITY.length)),n.TYPE&&e.push(new xi.BufferRegion(e.length,n.TYPE.length)),n.OFFSET&&e.push(new xi.BufferRegion(e.length,n.OFFSET.length)),n.DATA&&e.push(new xi.BufferRegion(e.length,n.DATA.length)),e=rb(n.children,e)}return e}function tA(r){return(r||[]).reduce((e,t)=>e+ +(t===0),0)}function rA(r,e){let t,i,n,s,c,v;return!e||!(s=r.dictionary)?(c=nb(r,eb(r,e)),n=new Mn.Field(r.name,c,r.nullable,da(r.customMetadata))):e.has(t=s.id)?(i=(i=s.indexType)?ib(i):new De.Int32,v=new De.Dictionary(e.get(t),i,t,s.isOrdered),n=new Mn.Field(r.name,v,r.nullable,da(r.customMetadata))):(i=(i=s.indexType)?ib(i):new De.Int32,e.set(t,c=nb(r,eb(r,e))),v=new De.Dictionary(c,i,t,s.isOrdered),n=new Mn.Field(r.name,v,r.nullable,da(r.customMetadata))),n||null}ur.fieldFromJSON=rA;function da(r){return new Map(Object.entries(r||{}))}function ib(r){return new De.Int(r.isSigned,r.bitWidth)}function nb(r,e){let t=r.type.name;switch(t){case"NONE":return new De.Null;case"null":return new De.Null;case"binary":return new De.Binary;case"utf8":return new De.Utf8;case"bool":return new De.Bool;case"list":return new De.List((e||[])[0]);case"struct":return new De.Struct(e||[]);case"struct_":return new De.Struct(e||[])}switch(t){case"int":{let i=r.type;return new De.Int(i.isSigned,i.bitWidth)}case"floatingpoint":{let i=r.type;return new De.Float(Vn.Precision[i.precision])}case"decimal":{let i=r.type;return new De.Decimal(i.scale,i.precision)}case"date":{let i=r.type;return new De.Date_(Vn.DateUnit[i.unit])}case"time":{let i=r.type;return new De.Time(Vn.TimeUnit[i.unit],i.bitWidth)}case"timestamp":{let i=r.type;return new De.Timestamp(Vn.TimeUnit[i.unit],i.timezone)}case"interval":{let i=r.type;return new De.Interval(Vn.IntervalUnit[i.unit])}case"union":{let i=r.type;return new De.Union(Vn.UnionMode[i.mode],i.typeIds||[],e||[])}case"fixedsizebinary":{let i=r.type;return new De.FixedSizeBinary(i.byteWidth)}case"fixedsizelist":{let i=r.type;return new De.FixedSizeList(i.listSize,(e||[])[0])}case"map":{let i=r.type;return new De.Map_((e||[])[0],i.keysSorted)}}throw new Error(`Unrecognized type: "${t}"`)}});var Ei=V(Ft=>{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.FieldNode=Ft.BufferRegion=Ft.DictionaryBatch=Ft.RecordBatch=Ft.Message=void 0;var Kc=gr(),W=$r(),Fe=yo(),Ze=Ke(),iA=Ye(),Ce=Te(),Zc=X_(),fa=sb(),Li=Kc.flatbuffers.Long,nA=Kc.flatbuffers.Builder,sA=Kc.flatbuffers.ByteBuffer,Oe=be(),li=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 li(0,Ce.MetadataVersion.V4,t);return i._createHeader=oA(e,t),i}static decode(e){e=new sA(iA.toUint8Array(e));let t=Fe.Message.getRootAsMessage(e),i=t.bodyLength(),n=t.version(),s=t.headerType(),c=new li(i,n,s);return c._createHeader=aA(t,s),c}static encode(e){let t=new nA,i=-1;return e.isSchema()?i=Ze.Schema.encode(t,e.header()):e.isRecordBatch()?i=At.encode(t,e.header()):e.isDictionaryBatch()&&(i=cr.encode(t,e.header())),Fe.Message.startMessage(t),Fe.Message.addVersion(t,Ce.MetadataVersion.V4),Fe.Message.addHeader(t,i),Fe.Message.addHeaderType(t,e.headerType),Fe.Message.addBodyLength(t,new Li(e.bodyLength,0)),Fe.Message.finishMessageBuffer(t,Fe.Message.endMessage(t)),t.asUint8Array()}static from(e,t=0){if(e instanceof Ze.Schema)return new li(0,Ce.MetadataVersion.V4,Ce.MessageHeader.Schema,e);if(e instanceof At)return new li(t,Ce.MetadataVersion.V4,Ce.MessageHeader.RecordBatch,e);if(e instanceof cr)return new li(t,Ce.MetadataVersion.V4,Ce.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===Ce.MessageHeader.Schema}isRecordBatch(){return this.headerType===Ce.MessageHeader.RecordBatch}isDictionaryBatch(){return this.headerType===Ce.MessageHeader.DictionaryBatch}};Ft.Message=li;var At=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}};Ft.RecordBatch=At;var cr=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}};Ft.DictionaryBatch=cr;var qi=class{constructor(e,t){this.offset=typeof e=="number"?e:e.low,this.length=typeof t=="number"?t:t.low}};Ft.BufferRegion=qi;var zi=class{constructor(e,t){this.length=typeof e=="number"?e:e.low,this.nullCount=typeof t=="number"?t:t.low}};Ft.FieldNode=zi;function oA(r,e){return()=>{switch(e){case Ce.MessageHeader.Schema:return Ze.Schema.fromJSON(r);case Ce.MessageHeader.RecordBatch:return At.fromJSON(r);case Ce.MessageHeader.DictionaryBatch:return cr.fromJSON(r)}throw new Error(`Unrecognized Message type: { name: ${Ce.MessageHeader[e]}, type: ${e} }`)}}function aA(r,e){return()=>{switch(e){case Ce.MessageHeader.Schema:return Ze.Schema.decode(r.header(new W.Schema));case Ce.MessageHeader.RecordBatch:return At.decode(r.header(new Fe.RecordBatch),r.version());case Ce.MessageHeader.DictionaryBatch:return cr.decode(r.header(new Fe.DictionaryBatch),r.version())}throw new Error(`Unrecognized Message type: { name: ${Ce.MessageHeader[e]}, type: ${e} }`)}}Ze.Field.encode=bA;Ze.Field.decode=mA;Ze.Field.fromJSON=fa.fieldFromJSON;Ze.Schema.encode=_A;Ze.Schema.decode=uA;Ze.Schema.fromJSON=fa.schemaFromJSON;At.encode=gA;At.decode=cA;At.fromJSON=fa.recordBatchFromJSON;cr.encode=vA;cr.decode=lA;cr.fromJSON=fa.dictionaryBatchFromJSON;zi.encode=jA;zi.decode=fA;qi.encode=wA;qi.decode=dA;function uA(r,e=new Map){let t=yA(r,e);return new Ze.Schema(t,ha(r),e)}function cA(r,e=Ce.MetadataVersion.V4){return new At(r.length(),hA(r),pA(r,e))}function lA(r,e=Ce.MetadataVersion.V4){return new cr(At.decode(r.data(),e),r.id(),r.isDelta())}function dA(r){return new qi(r.offset(),r.length())}function fA(r){return new zi(r.length(),r.nullCount())}function hA(r){let e=[];for(let t,i=-1,n=-1,s=r.nodesLength();++i<s;)(t=r.nodes(i))&&(e[++n]=zi.decode(t));return e}function pA(r,e){let t=[];for(let i,n=-1,s=-1,c=r.buffersLength();++n<c;)(i=r.buffers(n))&&(e<Ce.MetadataVersion.V4&&(i.bb_pos+=8*(n+1)),t[++s]=qi.decode(i));return t}function yA(r,e){let t=[];for(let i,n=-1,s=-1,c=r.fieldsLength();++n<c;)(i=r.fields(n))&&(t[++s]=Ze.Field.decode(i,e));return t}function ob(r,e){let t=[];for(let i,n=-1,s=-1,c=r.childrenLength();++n<c;)(i=r.children(n))&&(t[++s]=Ze.Field.decode(i,e));return t}function mA(r,e){let t,i,n,s,c,v;return!e||!(v=r.dictionary())?(n=ub(r,ob(r,e)),i=new Ze.Field(r.name(),n,r.nullable(),ha(r))):e.has(t=v.id().low)?(s=(s=v.indexType())?ab(s):new Oe.Int32,c=new Oe.Dictionary(e.get(t),s,t,v.isOrdered()),i=new Ze.Field(r.name(),c,r.nullable(),ha(r))):(s=(s=v.indexType())?ab(s):new Oe.Int32,e.set(t,n=ub(r,ob(r,e))),c=new Oe.Dictionary(n,s,t,v.isOrdered()),i=new Ze.Field(r.name(),c,r.nullable(),ha(r))),i||null}function ha(r){let e=new Map;if(r)for(let t,i,n=-1,s=r.customMetadataLength()|0;++n<s;)(t=r.customMetadata(n))&&(i=t.key())!=null&&e.set(i,t.value());return e}function ab(r){return new Oe.Int(r.isSigned(),r.bitWidth())}function ub(r,e){let t=r.typeType();switch(t){case W.Type.NONE:return new Oe.Null;case W.Type.Null:return new Oe.Null;case W.Type.Binary:return new Oe.Binary;case W.Type.Utf8:return new Oe.Utf8;case W.Type.Bool:return new Oe.Bool;case W.Type.List:return new Oe.List((e||[])[0]);case W.Type.Struct_:return new Oe.Struct(e||[])}switch(t){case W.Type.Int:{let i=r.type(new W.Int);return new Oe.Int(i.isSigned(),i.bitWidth())}case W.Type.FloatingPoint:{let i=r.type(new W.FloatingPoint);return new Oe.Float(i.precision())}case W.Type.Decimal:{let i=r.type(new W.Decimal);return new Oe.Decimal(i.scale(),i.precision())}case W.Type.Date:{let i=r.type(new W.Date);return new Oe.Date_(i.unit())}case W.Type.Time:{let i=r.type(new W.Time);return new Oe.Time(i.unit(),i.bitWidth())}case W.Type.Timestamp:{let i=r.type(new W.Timestamp);return new Oe.Timestamp(i.unit(),i.timezone())}case W.Type.Interval:{let i=r.type(new W.Interval);return new Oe.Interval(i.unit())}case W.Type.Union:{let i=r.type(new W.Union);return new Oe.Union(i.mode(),i.typeIdsArray()||[],e||[])}case W.Type.FixedSizeBinary:{let i=r.type(new W.FixedSizeBinary);return new Oe.FixedSizeBinary(i.byteWidth())}case W.Type.FixedSizeList:{let i=r.type(new W.FixedSizeList);return new Oe.FixedSizeList(i.listSize(),(e||[])[0])}case W.Type.Map:{let i=r.type(new W.Map);return new Oe.Map_((e||[])[0],i.keysSorted())}}throw new Error(`Unrecognized type: "${W.Type[t]}" (${t})`)}function _A(r,e){let t=e.fields.map(s=>Ze.Field.encode(r,s));W.Schema.startFieldsVector(r,t.length);let i=W.Schema.createFieldsVector(r,t),n=e.metadata&&e.metadata.size>0?W.Schema.createCustomMetadataVector(r,[...e.metadata].map(([s,c])=>{let v=r.createString(`${s}`),I=r.createString(`${c}`);return W.KeyValue.startKeyValue(r),W.KeyValue.addKey(r,v),W.KeyValue.addValue(r,I),W.KeyValue.endKeyValue(r)})):-1;return W.Schema.startSchema(r),W.Schema.addFields(r,i),W.Schema.addEndianness(r,BA?W.Endianness.Little:W.Endianness.Big),n!==-1&&W.Schema.addCustomMetadata(r,n),W.Schema.endSchema(r)}function bA(r,e){let t=-1,i=-1,n=-1,s=e.type,c=e.typeId;Oe.DataType.isDictionary(s)?(c=s.dictionary.typeId,n=Zc.instance.visit(s,r),i=Zc.instance.visit(s.dictionary,r)):i=Zc.instance.visit(s,r);let v=(s.children||[]).map(U=>Ze.Field.encode(r,U)),I=W.Field.createChildrenVector(r,v),S=e.metadata&&e.metadata.size>0?W.Field.createCustomMetadataVector(r,[...e.metadata].map(([U,G])=>{let me=r.createString(`${U}`),fe=r.createString(`${G}`);return W.KeyValue.startKeyValue(r),W.KeyValue.addKey(r,me),W.KeyValue.addValue(r,fe),W.KeyValue.endKeyValue(r)})):-1;return e.name&&(t=r.createString(e.name)),W.Field.startField(r),W.Field.addType(r,i),W.Field.addTypeType(r,c),W.Field.addChildren(r,I),W.Field.addNullable(r,!!e.nullable),t!==-1&&W.Field.addName(r,t),n!==-1&&W.Field.addDictionary(r,n),S!==-1&&W.Field.addCustomMetadata(r,S),W.Field.endField(r)}function gA(r,e){let t=e.nodes||[],i=e.buffers||[];Fe.RecordBatch.startNodesVector(r,t.length),t.slice().reverse().forEach(c=>zi.encode(r,c));let n=r.endVector();Fe.RecordBatch.startBuffersVector(r,i.length),i.slice().reverse().forEach(c=>qi.encode(r,c));let s=r.endVector();return Fe.RecordBatch.startRecordBatch(r),Fe.RecordBatch.addLength(r,new Li(e.length,0)),Fe.RecordBatch.addNodes(r,n),Fe.RecordBatch.addBuffers(r,s),Fe.RecordBatch.endRecordBatch(r)}function vA(r,e){let t=At.encode(r,e.data);return Fe.DictionaryBatch.startDictionaryBatch(r),Fe.DictionaryBatch.addId(r,new Li(e.id,0)),Fe.DictionaryBatch.addIsDelta(r,e.isDelta),Fe.DictionaryBatch.addData(r,t),Fe.DictionaryBatch.endDictionaryBatch(r)}function jA(r,e){return Fe.FieldNode.createFieldNode(r,new Li(e.length,0),new Li(e.nullCount,0))}function wA(r,e){return W.Buffer.createBuffer(r,new Li(e.offset,0),new Li(e.length,0))}var BA=function(){let r=new ArrayBuffer(2);return new DataView(r).setInt16(0,256,!0),new Int16Array(r)[0]===256}()});var ya=V(pe=>{"use strict";Object.defineProperty(pe,"__esModule",{value:!0});pe.magicX2AndPadding=pe.magicAndPadding=pe.magicLength=pe.checkForMagicArrowString=pe.MAGIC=pe.MAGIC_STR=pe.PADDING=pe.JSONMessageReader=pe.AsyncMessageReader=pe.MessageReader=void 0;var di=Te(),TA=gr(),cb=TA.flatbuffers.ByteBuffer,vs=Ei(),IA=st(),SA=Ec(),lb=Ye(),pa=si(),Yt=rn(),Xc=r=>`Expected ${di.MessageHeader[r]} Message in stream, but was null or length 0.`,Qc=r=>`Header pointer of flatbuffer-encoded ${di.MessageHeader[r]} Message is null or length 0.`,db=(r,e)=>`Expected to read ${r} metadata bytes, but only read ${e}.`,fb=(r,e)=>`Expected to read ${r} bytes for message body, but only read ${e}.`,el=class{constructor(e){this.source=e instanceof pa.ByteStream?e:new pa.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?Yt.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(Xc(e));return t.value}readMessageBody(e){if(e<=0)return new Uint8Array(0);let t=lb.toUint8Array(this.source.read(e));if(t.byteLength<e)throw new Error(fb(e,t.byteLength));return t.byteOffset%8==0&&t.byteOffset+t.byteLength<=t.buffer.byteLength?t:t.slice()}readSchema(e=!1){let t=di.MessageHeader.Schema,i=this.readMessage(t),n=i&&i.header();if(e&&!n)throw new Error(Qc(t));return n}readMetadataLength(){let e=this.source.read(pe.PADDING),t=e&&new cb(e),i=t&&t.readInt32(0)||0;return{done:i===0,value:i}}readMetadata(e){let t=this.source.read(e);if(!t)return Yt.ITERATOR_DONE;if(t.byteLength<e)throw new Error(db(e,t.byteLength));return{done:!1,value:vs.Message.decode(t)}}};pe.MessageReader=el;var hb=class{constructor(e,t){this.source=e instanceof pa.AsyncByteStream?e:IA.isFileHandle(e)?new SA.AsyncRandomAccessFile(e,t):new pa.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?Yt.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(Xc(e));return t.value}async readMessageBody(e){if(e<=0)return new Uint8Array(0);let t=lb.toUint8Array(await this.source.read(e));if(t.byteLength<e)throw new Error(fb(e,t.byteLength));return t.byteOffset%8==0&&t.byteOffset+t.byteLength<=t.buffer.byteLength?t:t.slice()}async readSchema(e=!1){let t=di.MessageHeader.Schema,i=await this.readMessage(t),n=i&&i.header();if(e&&!n)throw new Error(Qc(t));return n}async readMetadataLength(){let e=await this.source.read(pe.PADDING),t=e&&new cb(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 Yt.ITERATOR_DONE;if(t.byteLength<e)throw new Error(db(e,t.byteLength));return{done:!1,value:vs.Message.decode(t)}}};pe.AsyncMessageReader=hb;var pb=class extends el{constructor(e){super(new Uint8Array(0));this._schema=!1,this._body=[],this._batchIndex=0,this._dictionaryIndex=0,this._json=e instanceof Yt.ArrowJSON?e:new Yt.ArrowJSON(e)}next(){let{_json:e}=this;if(!this._schema){this._schema=!0;let t=vs.Message.fromJSON(e.schema,di.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=vs.Message.fromJSON(t,di.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=vs.Message.fromJSON(t,di.MessageHeader.RecordBatch);return{done:!1,value:i}}return this._body=[],Yt.ITERATOR_DONE}readMessageBody(e){return t(this._body);function t(i){return(i||[]).reduce((n,s)=>[...n,...s.VALIDITY&&[s.VALIDITY]||[],...s.TYPE&&[s.TYPE]||[],...s.OFFSET&&[s.OFFSET]||[],...s.DATA&&[s.DATA]||[],...t(s.children)],[])}}readMessage(e){let t;if((t=this.next()).done)return null;if(e!=null&&t.value.headerType!==e)throw new Error(Xc(e));return t.value}readSchema(){let e=di.MessageHeader.Schema,t=this.readMessage(e),i=t&&t.header();if(!t||!i)throw new Error(Qc(e));return i}};pe.JSONMessageReader=pb;pe.PADDING=4;pe.MAGIC_STR="ARROW1";pe.MAGIC=new Uint8Array(pe.MAGIC_STR.length);for(let r=0;r<pe.MAGIC_STR.length;r+=1|0)pe.MAGIC[r]=pe.MAGIC_STR.charCodeAt(r);function DA(r,e=0){for(let t=-1,i=pe.MAGIC.length;++t<i;)if(pe.MAGIC[t]!==r[e+t])return!1;return!0}pe.checkForMagicArrowString=DA;pe.magicLength=pe.MAGIC.length;pe.magicAndPadding=pe.magicLength+pe.PADDING;pe.magicX2AndPadding=pe.magicLength*2+pe.PADDING});var nl=V(Pe=>{"use strict";Object.defineProperty(Pe,"__esModule",{value:!0});Pe.compareTypes=Pe.compareFields=Pe.compareSchemas=Pe.instance=Pe.TypeComparator=void 0;var OA=tt(),J=class extends OA.Visitor{compareSchemas(e,t){return e===t||t instanceof e.constructor&&this.compareManyFields(e.fields,t.fields)}compareManyFields(e,t){return e===t||Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&e.every((i,n)=>this.compareFields(i,t[n]))}compareFields(e,t){return e===t||t instanceof e.constructor&&e.name===t.name&&e.nullable===t.nullable&&this.visit(e.type,t.type)}};Pe.TypeComparator=J;function ft(r,e){return e instanceof r.constructor}function js(r,e){return r===e||ft(r,e)}function Ar(r,e){return r===e||ft(r,e)&&r.bitWidth===e.bitWidth&&r.isSigned===e.isSigned}function ma(r,e){return r===e||ft(r,e)&&r.precision===e.precision}function AA(r,e){return r===e||ft(r,e)&&r.byteWidth===e.byteWidth}function tl(r,e){return r===e||ft(r,e)&&r.unit===e.unit}function ws(r,e){return r===e||ft(r,e)&&r.unit===e.unit&&r.timezone===e.timezone}function Bs(r,e){return r===e||ft(r,e)&&r.unit===e.unit&&r.bitWidth===e.bitWidth}function FA(r,e){return r===e||ft(r,e)&&r.children.length===e.children.length&&Pe.instance.compareManyFields(r.children,e.children)}function MA(r,e){return r===e||ft(r,e)&&r.children.length===e.children.length&&Pe.instance.compareManyFields(r.children,e.children)}function rl(r,e){return r===e||ft(r,e)&&r.mode===e.mode&&r.typeIds.every((t,i)=>t===e.typeIds[i])&&Pe.instance.compareManyFields(r.children,e.children)}function VA(r,e){return r===e||ft(r,e)&&r.id===e.id&&r.isOrdered===e.isOrdered&&Pe.instance.visit(r.indices,e.indices)&&Pe.instance.visit(r.dictionary,e.dictionary)}function il(r,e){return r===e||ft(r,e)&&r.unit===e.unit}function UA(r,e){return r===e||ft(r,e)&&r.listSize===e.listSize&&r.children.length===e.children.length&&Pe.instance.compareManyFields(r.children,e.children)}function CA(r,e){return r===e||ft(r,e)&&r.keysSorted===e.keysSorted&&r.children.length===e.children.length&&Pe.instance.compareManyFields(r.children,e.children)}J.prototype.visitNull=js;J.prototype.visitBool=js;J.prototype.visitInt=Ar;J.prototype.visitInt8=Ar;J.prototype.visitInt16=Ar;J.prototype.visitInt32=Ar;J.prototype.visitInt64=Ar;J.prototype.visitUint8=Ar;J.prototype.visitUint16=Ar;J.prototype.visitUint32=Ar;J.prototype.visitUint64=Ar;J.prototype.visitFloat=ma;J.prototype.visitFloat16=ma;J.prototype.visitFloat32=ma;J.prototype.visitFloat64=ma;J.prototype.visitUtf8=js;J.prototype.visitBinary=js;J.prototype.visitFixedSizeBinary=AA;J.prototype.visitDate=tl;J.prototype.visitDateDay=tl;J.prototype.visitDateMillisecond=tl;J.prototype.visitTimestamp=ws;J.prototype.visitTimestampSecond=ws;J.prototype.visitTimestampMillisecond=ws;J.prototype.visitTimestampMicrosecond=ws;J.prototype.visitTimestampNanosecond=ws;J.prototype.visitTime=Bs;J.prototype.visitTimeSecond=Bs;J.prototype.visitTimeMillisecond=Bs;J.prototype.visitTimeMicrosecond=Bs;J.prototype.visitTimeNanosecond=Bs;J.prototype.visitDecimal=js;J.prototype.visitList=FA;J.prototype.visitStruct=MA;J.prototype.visitUnion=rl;J.prototype.visitDenseUnion=rl;J.prototype.visitSparseUnion=rl;J.prototype.visitDictionary=VA;J.prototype.visitInterval=il;J.prototype.visitIntervalDayTime=il;J.prototype.visitIntervalYearMonth=il;J.prototype.visitFixedSizeList=UA;J.prototype.visitMap=CA;Pe.instance=new J;function PA(r,e){return Pe.instance.compareSchemas(r,e)}Pe.compareSchemas=PA;function kA(r,e){return Pe.instance.compareFields(r,e)}Pe.compareFields=kA;function RA(r,e){return Pe.instance.visit(r,e)}Pe.compareTypes=RA});var gb=V(_a=>{"use strict";Object.defineProperty(_a,"__esModule",{value:!0});_a.VectorAssembler=void 0;var NA=tt(),yb=Te(),xA=Fr(),sl=Ye(),ol=tr(),EA=On(),mb=Ei(),_b=be(),qe=class extends NA.Visitor{constructor(){super();this._byteLength=0,this._nodes=[],this._buffers=[],this._bufferRegions=[]}static assemble(...e){let t=new qe,i=EA.selectVectorChildrenArgs(xA.RecordBatch,e),[n=t]=t.visitMany(i);return n}visit(e){if(!_b.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");_b.DataType.isNull(e.type)||$t.call(this,n<=0?new Uint8Array(0):ol.truncateBitmap(t.offset,i,t.nullBitmap)),this.nodes.push(new mb.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}};_a.VectorAssembler=qe;function $t(r){let e=r.byteLength+7&~7;return this.buffers.push(r),this.bufferRegions.push(new mb.BufferRegion(this._byteLength,e)),this._byteLength+=e,this}function LA(r){let{type:e,length:t,typeIds:i,valueOffsets:n}=r;if($t.call(this,i),e.mode===yb.UnionMode.Sparse)return ul.call(this,r);if(e.mode===yb.UnionMode.Dense){if(r.offset<=0)return $t.call(this,n),ul.call(this,r);{let s=i.reduce((U,G)=>Math.max(U,G),i[0]),c=new Int32Array(s+1),v=new Int32Array(s+1).fill(-1),I=new Int32Array(t),S=sl.rebaseValueOffsets(-n[0],t,n);for(let U,G,me=-1;++me<t;)(G=v[U=i[me]])===-1&&(G=v[U]=S[U]),I[me]=S[me]-G,++c[U];$t.call(this,I);for(let U,G=-1,me=e.children.length;++G<me;)if(U=r.getChildAt(G)){let fe=e.typeIds[G],Gt=Math.min(t,c[fe]);this.visit(U.slice(v[fe],Gt))}}}return this}function qA(r){let e;return r.nullCount>=r.length?$t.call(this,new Uint8Array(0)):(e=r.values)instanceof Uint8Array?$t.call(this,ol.truncateBitmap(r.offset,r.length,e)):$t.call(this,ol.packBools(r))}function fi(r){return $t.call(this,r.values.subarray(0,r.length*r.stride))}function bb(r){let{length:e,values:t,valueOffsets:i}=r,n=i[0],s=i[e],c=Math.min(s-n,t.byteLength-n);return $t.call(this,sl.rebaseValueOffsets(-i[0],e,i)),$t.call(this,t.subarray(n,n+c)),this}function al(r){let{length:e,valueOffsets:t}=r;return t&&$t.call(this,sl.rebaseValueOffsets(t[0],e,t)),this.visit(r.getChildAt(0))}function ul(r){return this.visitMany(r.type.children.map((e,t)=>r.getChildAt(t)).filter(Boolean))[0]}qe.prototype.visitBool=qA;qe.prototype.visitInt=fi;qe.prototype.visitFloat=fi;qe.prototype.visitUtf8=bb;qe.prototype.visitBinary=bb;qe.prototype.visitFixedSizeBinary=fi;qe.prototype.visitDate=fi;qe.prototype.visitTimestamp=fi;qe.prototype.visitTime=fi;qe.prototype.visitDecimal=fi;qe.prototype.visitList=al;qe.prototype.visitStruct=ul;qe.prototype.visitUnion=LA;qe.prototype.visitInterval=fi;qe.prototype.visitFixedSizeList=al;qe.prototype.visitMap=al});var jb=V(ba=>{"use strict";Object.defineProperty(ba,"__esModule",{value:!0});ba.JSONTypeAssembler=void 0;var zA=tt(),it=$r(),Un=Te(),vb=class extends zA.Visitor{visit(e){return e==null?void 0:super.visit(e)}visitNull({typeId:e}){return{name:it.Type[e].toLowerCase()}}visitInt({typeId:e,bitWidth:t,isSigned:i}){return{name:it.Type[e].toLowerCase(),bitWidth:t,isSigned:i}}visitFloat({typeId:e,precision:t}){return{name:it.Type[e].toLowerCase(),precision:Un.Precision[t]}}visitBinary({typeId:e}){return{name:it.Type[e].toLowerCase()}}visitBool({typeId:e}){return{name:it.Type[e].toLowerCase()}}visitUtf8({typeId:e}){return{name:it.Type[e].toLowerCase()}}visitDecimal({typeId:e,scale:t,precision:i}){return{name:it.Type[e].toLowerCase(),scale:t,precision:i}}visitDate({typeId:e,unit:t}){return{name:it.Type[e].toLowerCase(),unit:Un.DateUnit[t]}}visitTime({typeId:e,unit:t,bitWidth:i}){return{name:it.Type[e].toLowerCase(),unit:Un.TimeUnit[t],bitWidth:i}}visitTimestamp({typeId:e,timezone:t,unit:i}){return{name:it.Type[e].toLowerCase(),unit:Un.TimeUnit[i],timezone:t}}visitInterval({typeId:e,unit:t}){return{name:it.Type[e].toLowerCase(),unit:Un.IntervalUnit[t]}}visitList({typeId:e}){return{name:it.Type[e].toLowerCase()}}visitStruct({typeId:e}){return{name:it.Type[e].toLowerCase()}}visitUnion({typeId:e,mode:t,typeIds:i}){return{name:it.Type[e].toLowerCase(),mode:Un.UnionMode[t],typeIds:[...i]}}visitDictionary(e){return this.visit(e.dictionary)}visitFixedSizeBinary({typeId:e,byteWidth:t}){return{name:it.Type[e].toLowerCase(),byteWidth:t}}visitFixedSizeList({typeId:e,listSize:t}){return{name:it.Type[e].toLowerCase(),listSize:t}}visitMap({typeId:e,keysSorted:t}){return{name:it.Type[e].toLowerCase(),keysSorted:t}}};ba.JSONTypeAssembler=vb});var Tb=V(ja=>{"use strict";Object.defineProperty(ja,"__esModule",{value:!0});ja.JSONVectorAssembler=void 0;var WA=ls(),Ts=An(),HA=Re(),YA=tt(),$A=Te(),GA=Fr(),cl=Te(),ga=tr(),JA=On(),wb=be(),va=class extends YA.Visitor{static assemble(...e){return new va().visitMany(JA.selectColumnChildrenArgs(GA.RecordBatch,e))}visit(e){let{data:t,name:i,length:n}=e,{offset:s,nullCount:c,nullBitmap:v}=t,I=wb.DataType.isDictionary(e.type)?e.type.indices:e.type,S=Object.assign([],t.buffers,{[$A.BufferType.VALIDITY]:void 0});return{name:i,count:n,VALIDITY:wb.DataType.isNull(I)?void 0:c<=0?Array.from({length:n},()=>1):[...new ga.BitIterator(v,s,n,null,ga.getBit)],...super.visit(HA.Vector.new(t.clone(I,s,n,0,S)))}}visitNull(){return{}}visitBool({values:e,offset:t,length:i}){return{DATA:[...new ga.BitIterator(e,t,i,null,ga.getBool)]}}visitInt(e){return{DATA:e.type.bitWidth<64?[...e.values]:[...Is(e.values,2)]}}visitFloat(e){return{DATA:[...e.values]}}visitUtf8(e){return{DATA:[...e],OFFSET:[...e.valueOffsets]}}visitBinary(e){return{DATA:[...Bb(e)],OFFSET:[...e.valueOffsets]}}visitFixedSizeBinary(e){return{DATA:[...Bb(e)]}}visitDate(e){return{DATA:e.type.unit===cl.DateUnit.DAY?[...e.values]:[...Is(e.values,2)]}}visitTimestamp(e){return{DATA:[...Is(e.values,2)]}}visitTime(e){return{DATA:e.type.unit<cl.TimeUnit.MICROSECOND?[...e.values]:[...Is(e.values,2)]}}visitDecimal(e){return{DATA:[...Is(e.values,4)]}}visitList(e){return{OFFSET:[...e.valueOffsets],children:e.type.children.map((t,i)=>this.visit(new Ts.Column(t,[e.getChildAt(i)])))}}visitStruct(e){return{children:e.type.children.map((t,i)=>this.visit(new Ts.Column(t,[e.getChildAt(i)])))}}visitUnion(e){return{TYPE:[...e.typeIds],OFFSET:e.type.mode===cl.UnionMode.Dense?[...e.valueOffsets]:void 0,children:e.type.children.map((t,i)=>this.visit(new Ts.Column(t,[e.getChildAt(i)])))}}visitInterval(e){return{DATA:[...e.values]}}visitFixedSizeList(e){return{children:e.type.children.map((t,i)=>this.visit(new Ts.Column(t,[e.getChildAt(i)])))}}visitMap(e){return{OFFSET:[...e.valueOffsets],children:e.type.children.map((t,i)=>this.visit(new Ts.Column(t,[e.getChildAt(i)])))}}};ja.JSONVectorAssembler=va;function*Bb(r){for(let e of r)yield e.reduce((t,i)=>`${t}${("0"+(i&255).toString(16)).slice(-2)}`,"").toUpperCase()}function*Is(r,e){for(let t=-1,i=r.length/e;++t<i;)yield`${WA.BN.new(r.subarray((t+0)*e,(t+1)*e),!1)}`}});var Sa=V(dr=>{"use strict";Object.defineProperty(dr,"__esModule",{value:!0});dr.RecordBatchJSONWriter=dr.RecordBatchFileWriter=dr.RecordBatchStreamWriter=dr.RecordBatchWriter=void 0;var ll=Ds(),KA=ya(),ZA=An(),XA=be(),QA=Ke(),wa=Ei(),dl=Ei(),Cn=Rc(),fl=Te(),Ib=nl(),hl=si(),Sb=gb(),eF=jb(),Db=Tb(),tF=Ye(),pl=Fr(),rF=rn(),lr=st(),Ss=class extends rF.ReadableInterop{constructor(e){super();this._position=0,this._started=!1,this._sink=new hl.AsyncByteQueue,this._schema=null,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._dictionaryDeltaOffsets=new Map,lr.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 lr.isPromise(e)?e.then(t=>this.writeAll(t)):lr.isAsyncIterable(e)?ml(this,e):yl(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 hl.AsyncByteQueue?this._sink=e:(this._sink=new hl.AsyncByteQueue,e&&lr.isWritableDOMStream(e)?this.toDOMStream({type:"bytes"}).pipeTo(e):e&&lr.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||!Ib.compareSchemas(t,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 ll.Table&&!(t=e.schema))return this.finish()&&void 0;if(e instanceof pl.RecordBatch&&!(t=e.schema))return this.finish()&&void 0}else throw new Error("RecordBatchWriter is closed");if(t&&!Ib.compareSchemas(t,this._schema)){if(this._started&&this._autoDestroy)return this.close();this.reset(this._sink,t)}e instanceof pl.RecordBatch?e instanceof pl._InternalEmptyPlaceholderRecordBatch||this._writeRecordBatch(e):e instanceof ll.Table?this.writeAll(e.chunks):lr.isIterable(e)&&this.writeAll(e)}_writeMessage(e,t=8){let i=t-1,n=wa.Message.encode(e),s=n.byteLength,c=this._writeLegacyIpcFormat?4:8,v=s+c+i&~i,I=v-s-c;return e.headerType===fl.MessageHeader.RecordBatch?this._recordBatchBlocks.push(new Cn.FileBlock(v,e.bodyLength,this._position)):e.headerType===fl.MessageHeader.DictionaryBatch&&this._dictionaryBlocks.push(new Cn.FileBlock(v,e.bodyLength,this._position)),this._writeLegacyIpcFormat||this._write(Int32Array.of(-1)),this._write(Int32Array.of(v-c)),s>0&&this._write(n),this._writePadding(I)}_write(e){if(this._started){let t=tF.toUint8Array(e);t&&t.byteLength>0&&(this._sink.write(t),this._position+=t.byteLength)}return this}_writeSchema(e){return this._writeMessage(wa.Message.from(e))}_writeFooter(e){return this._writeLegacyIpcFormat?this._write(Int32Array.of(0)):this._write(Int32Array.of(-1,0))}_writeMagic(){return this._write(KA.MAGIC)}_writePadding(e){return e>0?this._write(new Uint8Array(e)):this}_writeRecordBatch(e){let{byteLength:t,nodes:i,bufferRegions:n,buffers:s}=Sb.VectorAssembler.assemble(e),c=new dl.RecordBatch(e.length,i,n),v=wa.Message.from(c,t);return this._writeDictionaries(e)._writeMessage(v)._writeBodyBuffers(s)}_writeDictionaryBatch(e,t,i=!1){this._dictionaryDeltaOffsets.set(t,e.length+(this._dictionaryDeltaOffsets.get(t)||0));let{byteLength:n,nodes:s,bufferRegions:c,buffers:v}=Sb.VectorAssembler.assemble(e),I=new dl.RecordBatch(e.length,s,c),S=new dl.DictionaryBatch(I,t,i),U=wa.Message.from(S,n);return this._writeMessage(U)._writeBodyBuffers(v)}_writeBodyBuffers(e){let t,i,n;for(let s=-1,c=e.length;++s<c;)(t=e[s])&&(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 s="chunks"in i?i.chunks:[i];for(let c of s)this._writeDictionaryBatch(c,t,n>0),n+=c.length}}return this}};dr.RecordBatchWriter=Ss;var Ba=class extends Ss{static writeAll(e,t){let i=new Ba(t);return lr.isPromise(e)?e.then(n=>i.writeAll(n)):lr.isAsyncIterable(e)?ml(i,e):yl(i,e)}};dr.RecordBatchStreamWriter=Ba;var Ta=class extends Ss{static writeAll(e){let t=new Ta;return lr.isPromise(e)?e.then(i=>t.writeAll(i)):lr.isAsyncIterable(e)?ml(t,e):yl(t,e)}constructor(){super();this._autoDestroy=!0}_writeSchema(e){return this._writeMagic()._writePadding(2)}_writeFooter(e){let t=Cn.Footer.encode(new Cn.Footer(e,fl.MetadataVersion.V4,this._recordBatchBlocks,this._dictionaryBlocks));return super._writeFooter(e)._write(t)._write(Int32Array.of(t.byteLength))._writeMagic()}};dr.RecordBatchFileWriter=Ta;var Ia=class extends Ss{constructor(){super();this._autoDestroy=!0,this._recordBatches=[],this._dictionaries=[]}static writeAll(e){return new Ia().writeAll(e)}_writeMessage(){return this}_writeFooter(e){return this}_writeSchema(e){return this._write(`{
|
|
7
|
+
return true;`)}Vo.createIsValidFunction=m1;function _1(r){return typeof r!="bigint"?ec.valueToString(r):y1.BigIntAvailable?`${ec.valueToString(r)}n`:`"${ec.valueToString(r)}"`}});var Jr=V(wt=>{"use strict";Object.defineProperty(wt,"__esModule",{value:!0});wt.WideBufferBuilder=wt.OffsetsBufferBuilder=wt.BitmapBufferBuilder=wt.DataBufferBuilder=wt.BufferBuilder=void 0;var sm=Ye(),tc=st(),rc=(r,e)=>(r*e+63&~63||64)/e,b1=(r,e=0)=>r.length>=e?r.subarray(0,e):sm.memcpy(new r.constructor(e),r,0),ss=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?rc(i*1,this.BYTES_PER_ELEMENT):rc(i*2,this.BYTES_PER_ELEMENT))}return this}flush(e=this.length){e=rc(e*this.stride,this.BYTES_PER_ELEMENT);let t=b1(this.buffer,e);return this.clear(),t}clear(){return this.length=0,this._resize(0),this}_resize(e){return this.buffer=sm.memcpy(new this.ArrayType(e),this.buffer)}};wt.BufferBuilder=ss;ss.prototype.offset=0;var Uo=class extends ss{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}};wt.DataBufferBuilder=Uo;var om=class extends Uo{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,s=e%8,c=i[n]>>s&1;return t?c===0&&(i[n]|=1<<s,++this.numValid):c===1&&(i[n]&=~(1<<s),--this.numValid),this}clear(){return this.numValid=0,super.clear()}};wt.BitmapBufferBuilder=om;var am=class extends Uo{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)}};wt.OffsetsBufferBuilder=am;var um=class extends ss{get ArrayType64(){return this._ArrayType64||(this._ArrayType64=this.buffer instanceof Int32Array?tc.BigInt64Array:tc.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 tc.BigIntAvailable&&(this.buffer64=new this.ArrayType64(t.buffer,t.byteOffset,i)),t}};wt.WideBufferBuilder=um});var Ue=V(Kr=>{"use strict";Object.defineProperty(Kr,"__esModule",{value:!0});Kr.VariableWidthBuilder=Kr.FixedWidthBuilder=Kr.Builder=void 0;var g1=Re(),cn=Te(),v1=Lt(),j1=nm(),ic=Jr(),w1=be(),Bt=class{constructor({type:e,nullValues:t}){this.length=0,this.finished=!1,this.type=e,this.children=[],this.nullValues=t,this.stride=w1.strideForType(e),this._nulls=new ic.BitmapBufferBuilder,t&&t.length>0&&(this._isValid=j1.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 B1(e)}static throughAsyncIterable(e){return T1(e)}toVector(){return g1.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:s,nullCount:c}=this;n?(e[cn.BufferType.TYPE]=n.flush(s),i&&(e[cn.BufferType.OFFSET]=i.flush(s))):i?(t&&(e[cn.BufferType.DATA]=t.flush(i.last())),e[cn.BufferType.OFFSET]=i.flush(s)):t&&(e[cn.BufferType.DATA]=t.flush(s)),c>0&&(e[cn.BufferType.VALIDITY]=this._nulls.flush(s));let v=v1.Data.new(this.type,0,s,c,e,this.children.map(I=>I.flush()));return this.clear(),v}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}};Kr.Builder=Bt;Bt.prototype.length=1;Bt.prototype.stride=1;Bt.prototype.children=null;Bt.prototype.finished=!1;Bt.prototype.nullValues=null;Bt.prototype._isValid=()=>!0;var cm=class extends Bt{constructor(e){super(e);this._values=new ic.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)}};Kr.FixedWidthBuilder=cm;var lm=class extends Bt{constructor(e){super(e);this._pendingLength=0,this._offsets=new ic.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}};Kr.VariableWidthBuilder=lm;function B1(r){let{["queueingStrategy"]:e="count"}=r,{["highWaterMark"]:t=e!=="bytes"?1e3:2**14}=r,i=e!=="bytes"?"length":"byteLength";return function*(n){let s=0,c=Bt.new(r);for(let v of n)c.append(v)[i]>=t&&++s&&(yield c.toVector());(c.finish().length>0||s===0)&&(yield c.toVector())}}function T1(r){let{["queueingStrategy"]:e="count"}=r,{["highWaterMark"]:t=e!=="bytes"?1e3:2**14}=r,i=e!=="bytes"?"length":"byteLength";return async function*(n){let s=0,c=Bt.new(r);for await(let v of n)c.append(v)[i]>=t&&++s&&(yield c.toVector());(c.finish().length>0||s===0)&&(yield c.toVector())}}});var nc=V(Co=>{"use strict";Object.defineProperty(Co,"__esModule",{value:!0});Co.BoolBuilder=void 0;var I1=Jr(),S1=Ue(),dm=class extends S1.Builder{constructor(e){super(e);this._values=new I1.BitmapBufferBuilder}setValue(e,t){this._values.set(e,+t)}};Co.BoolBuilder=dm});var sc=V(Po=>{"use strict";Object.defineProperty(Po,"__esModule",{value:!0});Po.NullBuilder=void 0;var D1=Ue(),fm=class extends D1.Builder{setValue(e,t){}setValid(e,t){return this.length=Math.max(e+1,this.length),t}};Po.NullBuilder=fm});var oc=V(Zr=>{"use strict";Object.defineProperty(Zr,"__esModule",{value:!0});Zr.DateMillisecondBuilder=Zr.DateDayBuilder=Zr.DateBuilder=void 0;var O1=Ue(),ko=class extends O1.FixedWidthBuilder{};Zr.DateBuilder=ko;var hm=class extends ko{};Zr.DateDayBuilder=hm;var pm=class extends ko{};Zr.DateMillisecondBuilder=pm});var ac=V(Ro=>{"use strict";Object.defineProperty(Ro,"__esModule",{value:!0});Ro.DecimalBuilder=void 0;var A1=Ue(),ym=class extends A1.FixedWidthBuilder{};Ro.DecimalBuilder=ym});var cc=V(xo=>{"use strict";Object.defineProperty(xo,"__esModule",{value:!0});xo.DictionaryBuilder=void 0;var F1=be(),uc=Ue(),mm=class extends uc.Builder{constructor({type:e,nullValues:t,dictionaryHashFunction:i}){super({type:new F1.Dictionary(e.dictionary,e.indices,e.id,e.isOrdered)});this._nulls=null,this._dictionaryOffset=0,this._keysToIndices=Object.create(null),this.indices=uc.Builder.new({type:this.type.indices,nullValues:t}),this.dictionary=uc.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),s=i[n];return s===void 0&&(i[n]=s=this._dictionaryOffset+this.dictionary.append(t).length-1),this.indices.setValue(e,s)}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}`}};xo.DictionaryBuilder=mm});var lc=V(No=>{"use strict";Object.defineProperty(No,"__esModule",{value:!0});No.FixedSizeBinaryBuilder=void 0;var M1=Ue(),_m=class extends M1.FixedWidthBuilder{};No.FixedSizeBinaryBuilder=_m});var os=V(dn=>{"use strict";Object.defineProperty(dn,"__esModule",{value:!0});dn.float64ToUint16=dn.uint16ToFloat64=void 0;var bm=new Float64Array(1),ln=new Uint32Array(bm.buffer);function V1(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)}dn.uint16ToFloat64=V1;function U1(r){if(r!==r)return 32256;bm[0]=r;let e=(ln[1]&2147483648)>>16&65535,t=ln[1]&2146435072,i=0;return t>=1089470464?ln[0]>0?t=31744:(t=(t&2080374784)>>16,i=(ln[1]&1048575)>>10):t<=1056964608?(i=1048576+(ln[1]&1048575),i=1048576+(i<<(t>>20)-998)>>21,t=0):(t=t-1056964608>>10,i=(ln[1]&1048575)+512>>10),e|t|i&65535}dn.float64ToUint16=U1});var dc=V(rr=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});rr.Float64Builder=rr.Float32Builder=rr.Float16Builder=rr.FloatBuilder=void 0;var C1=os(),P1=Ue(),as=class extends P1.FixedWidthBuilder{};rr.FloatBuilder=as;var gm=class extends as{setValue(e,t){this._values.set(e,C1.float64ToUint16(t))}};rr.Float16Builder=gm;var vm=class extends as{setValue(e,t){this._values.set(e,t)}};rr.Float32Builder=vm;var jm=class extends as{setValue(e,t){this._values.set(e,t)}};rr.Float64Builder=jm});var ls=V($e=>{"use strict";Object.defineProperty($e,"__esModule",{value:!0});$e.BN=$e.bignumToBigInt=$e.bignumToString=$e.isArrowBigNumSymbol=void 0;var k1=Ye(),us=st();$e.isArrowBigNumSymbol=Symbol.for("isArrowBigNum");function qt(r,...e){return e.length===0?Object.setPrototypeOf(k1.toArrayBufferView(this.TypedArray,r),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(r,...e),this.constructor.prototype)}qt.prototype[$e.isArrowBigNumSymbol]=!0;qt.prototype.toJSON=function(){return`"${$e.bignumToString(this)}"`};qt.prototype.valueOf=function(){return wm(this)};qt.prototype.toString=function(){return $e.bignumToString(this)};qt.prototype[Symbol.toPrimitive]=function(r="default"){switch(r){case"number":return wm(this);case"string":return $e.bignumToString(this);case"default":return $e.bignumToBigInt(this)}return $e.bignumToString(this)};function fn(...r){return qt.apply(this,r)}function hn(...r){return qt.apply(this,r)}function cs(...r){return qt.apply(this,r)}Object.setPrototypeOf(fn.prototype,Object.create(Int32Array.prototype));Object.setPrototypeOf(hn.prototype,Object.create(Uint32Array.prototype));Object.setPrototypeOf(cs.prototype,Object.create(Uint32Array.prototype));Object.assign(fn.prototype,qt.prototype,{constructor:fn,signed:!0,TypedArray:Int32Array,BigIntArray:us.BigInt64Array});Object.assign(hn.prototype,qt.prototype,{constructor:hn,signed:!1,TypedArray:Uint32Array,BigIntArray:us.BigUint64Array});Object.assign(cs.prototype,qt.prototype,{constructor:cs,signed:!0,TypedArray:Uint32Array,BigIntArray:us.BigUint64Array});function wm(r){let{buffer:e,byteOffset:t,length:i,signed:n}=r,s=new Int32Array(e,t,i),c=0,v=0,I=s.length,S,U;for(;v<I;)U=s[v++],S=s[v++],n||(S=S>>>0),c+=(U>>>0)+S*v**32;return c}us.BigIntAvailable?($e.bignumToBigInt=r=>r.byteLength===8?new r.BigIntArray(r.buffer,r.byteOffset,1)[0]:fc(r),$e.bignumToString=r=>r.byteLength===8?`${new r.BigIntArray(r.buffer,r.byteOffset,1)[0]}`:fc(r)):($e.bignumToString=fc,$e.bignumToBigInt=$e.bignumToString);function fc(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),s=-1,c=i.length-1;do{for(t[0]=i[s=0];s<c;)i[s++]=t[1]=t[0]/10,t[0]=(t[0]-t[1]*10<<16)+i[s];i[s]=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 Eo=class{static new(e,t){switch(t){case!0:return new fn(e);case!1:return new hn(e)}switch(e.constructor){case Int8Array:case Int16Array:case Int32Array:case us.BigInt64Array:return new fn(e)}return e.byteLength===16?new cs(e):new hn(e)}static signed(e){return new fn(e)}static unsigned(e){return new hn(e)}static decimal(e){return new cs(e)}constructor(e,t){return Eo.new(e,t)}};$e.BN=Eo});var hc=V(Le=>{"use strict";Object.defineProperty(Le,"__esModule",{value:!0});Le.Uint64Builder=Le.Uint32Builder=Le.Uint16Builder=Le.Uint8Builder=Le.Int64Builder=Le.Int32Builder=Le.Int16Builder=Le.Int8Builder=Le.IntBuilder=void 0;var R1=ls(),Bm=Jr(),x1=st(),N1=Ue(),ir=class extends N1.FixedWidthBuilder{setValue(e,t){this._values.set(e,t)}};Le.IntBuilder=ir;var Tm=class extends ir{};Le.Int8Builder=Tm;var Im=class extends ir{};Le.Int16Builder=Im;var Sm=class extends ir{};Le.Int32Builder=Sm;var Dm=class extends ir{constructor(e){e.nullValues&&(e.nullValues=e.nullValues.map(Lo));super(e);this._values=new Bm.WideBufferBuilder(new Int32Array(0),2)}get values64(){return this._values.buffer64}isValid(e){return super.isValid(Lo(e))}};Le.Int64Builder=Dm;var Om=class extends ir{};Le.Uint8Builder=Om;var Am=class extends ir{};Le.Uint16Builder=Am;var Fm=class extends ir{};Le.Uint32Builder=Fm;var Mm=class extends ir{constructor(e){e.nullValues&&(e.nullValues=e.nullValues.map(Lo));super(e);this._values=new Bm.WideBufferBuilder(new Uint32Array(0),2)}get values64(){return this._values.buffer64}isValid(e){return super.isValid(Lo(e))}};Le.Uint64Builder=Mm;var Lo=(r=>e=>(ArrayBuffer.isView(e)&&(r.buffer=e.buffer,r.byteOffset=e.byteOffset,r.byteLength=e.byteLength,e=R1.bignumToBigInt(r),r.buffer=null),e))({BigIntArray:x1.BigInt64Array})});var pc=V(Tt=>{"use strict";Object.defineProperty(Tt,"__esModule",{value:!0});Tt.TimeNanosecondBuilder=Tt.TimeMicrosecondBuilder=Tt.TimeMillisecondBuilder=Tt.TimeSecondBuilder=Tt.TimeBuilder=void 0;var E1=Ue(),pn=class extends E1.FixedWidthBuilder{};Tt.TimeBuilder=pn;var Vm=class extends pn{};Tt.TimeSecondBuilder=Vm;var Um=class extends pn{};Tt.TimeMillisecondBuilder=Um;var Cm=class extends pn{};Tt.TimeMicrosecondBuilder=Cm;var Pm=class extends pn{};Tt.TimeNanosecondBuilder=Pm});var yc=V(It=>{"use strict";Object.defineProperty(It,"__esModule",{value:!0});It.TimestampNanosecondBuilder=It.TimestampMicrosecondBuilder=It.TimestampMillisecondBuilder=It.TimestampSecondBuilder=It.TimestampBuilder=void 0;var L1=Ue(),yn=class extends L1.FixedWidthBuilder{};It.TimestampBuilder=yn;var km=class extends yn{};It.TimestampSecondBuilder=km;var Rm=class extends yn{};It.TimestampMillisecondBuilder=Rm;var xm=class extends yn{};It.TimestampMicrosecondBuilder=xm;var Nm=class extends yn{};It.TimestampNanosecondBuilder=Nm});var mc=V(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr.IntervalYearMonthBuilder=Xr.IntervalDayTimeBuilder=Xr.IntervalBuilder=void 0;var q1=Ue(),qo=class extends q1.FixedWidthBuilder{};Xr.IntervalBuilder=qo;var Em=class extends qo{};Xr.IntervalDayTimeBuilder=Em;var Lm=class extends qo{};Xr.IntervalYearMonthBuilder=Lm});var Wo=V(zo=>{"use strict";Object.defineProperty(zo,"__esModule",{value:!0});zo.BinaryBuilder=void 0;var z1=Ye(),W1=Jr(),H1=Ue(),qm=class extends H1.VariableWidthBuilder{constructor(e){super(e);this._values=new W1.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,z1.toUint8Array(t))}_flushPending(e,t){let i=this._offsets,n=this._values.reserve(t).buffer,s=0,c=0,v=0,I;for([s,I]of e)I===void 0?i.set(s,0):(c=I.length,n.set(I,v),i.set(s,c),v+=c)}};zo.BinaryBuilder=qm});var Yo=V(Ho=>{"use strict";Object.defineProperty(Ho,"__esModule",{value:!0});Ho.Utf8Builder=void 0;var Y1=Ti(),$1=Wo(),G1=Jr(),J1=Ue(),_c=class extends J1.VariableWidthBuilder{constructor(e){super(e);this._values=new G1.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,Y1.encodeUtf8(t))}_flushPending(e,t){}};Ho.Utf8Builder=_c;_c.prototype._flushPending=$1.BinaryBuilder.prototype._flushPending});var bc=V($o=>{"use strict";Object.defineProperty($o,"__esModule",{value:!0});$o.Run=void 0;var K1=Re(),zm=class{get length(){return this._values.length}get(e){return this._values[e]}clear(){return this._values=null,this}bind(e){return e instanceof K1.Vector?e:(this._values=e,this)}};$o.Run=zm});var Ke=V(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});mn.Field=mn.Schema=void 0;var Z1=be(),St=class{constructor(e=[],t,i){this.fields=e||[],this.metadata=t||new Map,i||(i=gc(e)),this.dictionaries=i}get[Symbol.toStringTag](){return"Schema"}toString(){return`Schema<{ ${this.fields.map((e,t)=>`${t}: ${e}`).join(", ")} }>`}select(...e){let t=e.reduce((i,n)=>(i[n]=!0)&&i,Object.create(null));return new St(this.fields.filter(i=>t[i.name]),this.metadata)}selectAt(...e){return new St(e.map(t=>this.fields[t]).filter(Boolean),this.metadata)}assign(...e){let t=e[0]instanceof St?e[0]:Array.isArray(e[0])?new St(e[0]):new St(e),i=[...this.fields],n=Go(Go(new Map,this.metadata),t.metadata),s=t.fields.filter(v=>{let I=i.findIndex(S=>S.name===v.name);return~I?(i[I]=v.clone({metadata:Go(Go(new Map,i[I].metadata),v.metadata)}))&&!1:!0}),c=gc(s,new Map);return new St([...i,...s],n,new Map([...this.dictionaries,...c]))}};mn.Schema=St;var Tr=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,s]=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),s===void 0&&(s=e[0].metadata)),new Tr(`${t}`,i,n,s)}get typeId(){return this.type.typeId}get[Symbol.toStringTag](){return"Field"}toString(){return`${this.name}: ${this.type}`}clone(...e){let[t,i,n,s]=e;return!e[0]||typeof e[0]!="object"?[t=this.name,i=this.type,n=this.nullable,s=this.metadata]=e:{name:t=this.name,type:i=this.type,nullable:n=this.nullable,metadata:s=this.metadata}=e[0],Tr.new(t,i,n,s)}};mn.Field=Tr;function Go(r,e){return new Map([...r||new Map,...e||new Map])}function gc(r,e=new Map){for(let t=-1,i=r.length;++t<i;){let s=r[t].type;if(Z1.DataType.isDictionary(s)){if(!e.has(s.id))e.set(s.id,s.dictionary);else if(e.get(s.id)!==s.dictionary)throw new Error("Cannot create Schema containing two different dictionaries with the same Id")}s.children&&s.children.length>0&&gc(s.children,e)}return e}St.prototype.fields=null;St.prototype.metadata=null;St.prototype.dictionaries=null;Tr.prototype.type=null;Tr.prototype.name=null;Tr.prototype.nullable=null;Tr.prototype.metadata=null});var vc=V(Jo=>{"use strict";Object.defineProperty(Jo,"__esModule",{value:!0});Jo.ListBuilder=void 0;var X1=bc(),Q1=Ke(),eD=be(),tD=Jr(),rD=Ue(),Wm=class extends rD.VariableWidthBuilder{constructor(e){super(e);this._run=new X1.Run,this._offsets=new tD.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 eD.List(new Q1.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,s=0,c;for([s,c]of e)c===void 0?i.set(s,0):(i.set(s,c.length),n(this,s,t.bind(c)))}};Jo.ListBuilder=Wm});var jc=V(Ko=>{"use strict";Object.defineProperty(Ko,"__esModule",{value:!0});Ko.FixedSizeListBuilder=void 0;var iD=bc(),nD=Ke(),sD=Ue(),oD=be(),Hm=class extends sD.Builder{constructor(){super(...arguments);this._run=new iD.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 oD.FixedSizeList(this.type.listSize,new nD.Field(t,e.type,!0)),i}clear(){return this._run.clear(),super.clear()}};Ko.FixedSizeListBuilder=Hm});var wc=V(Zo=>{"use strict";Object.defineProperty(Zo,"__esModule",{value:!0});Zo.MapBuilder=void 0;var aD=Ke(),uD=be(),cD=Ue(),Ym=class extends cD.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 uD.Map_(new aD.Field(t,e.type,!0),this.type.keysSorted),this.numChildren-1}_flushPending(e){let t=this._offsets,i=this._setValue;e.forEach((n,s)=>{n===void 0?t.set(s,0):(t.set(s,n.size),i(this,s,n))})}};Zo.MapBuilder=Ym});var Bc=V(Xo=>{"use strict";Object.defineProperty(Xo,"__esModule",{value:!0});Xo.StructBuilder=void 0;var lD=Ke(),dD=Ue(),fD=be(),$m=class extends dD.Builder{addChild(e,t=`${this.numChildren}`){let i=this.children.push(e);return this.type=new fD.Struct([...this.type.children,new lD.Field(t,e.type,!0)]),i}};Xo.StructBuilder=$m});var Tc=V(Qr=>{"use strict";Object.defineProperty(Qr,"__esModule",{value:!0});Qr.DenseUnionBuilder=Qr.SparseUnionBuilder=Qr.UnionBuilder=void 0;var hD=Ke(),Gm=Jr(),pD=Ue(),yD=be(),Qo=class extends pD.Builder{constructor(e){super(e);this._typeIds=new Gm.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:s,typeIds:c}}=this,v=[...n,new hD.Field(t,e.type)];return this.type=new yD.Union(s,[...c,i],v),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.")}};Qr.UnionBuilder=Qo;var Jm=class extends Qo{};Qr.SparseUnionBuilder=Jm;var Km=class extends Qo{constructor(e){super(e);this._offsets=new Gm.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)}};Qr.DenseUnionBuilder=Km});var tt=V(ea=>{"use strict";Object.defineProperty(ea,"__esModule",{value:!0});ea.Visitor=void 0;var mD=Lt(),_D=Re(),F=Te(),bD=be(),we=class{visitMany(e,...t){return e.map((i,n)=>this.visit(i,...t.map(s=>s[n])))}visit(...e){return this.getVisitFn(e[0],!1).apply(this,e)}getVisitFn(e,t=!0){return gD(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}};ea.Visitor=we;function gD(r,e,t=!0){let i=null,n=F.Type.NONE;switch(e instanceof mD.Data||e instanceof _D.Vector?n=Ic(e.type):e instanceof bD.DataType?n=Ic(e):typeof(n=e)!="number"&&(n=F.Type[e]),n){case F.Type.Null:i=r.visitNull;break;case F.Type.Bool:i=r.visitBool;break;case F.Type.Int:i=r.visitInt;break;case F.Type.Int8:i=r.visitInt8||r.visitInt;break;case F.Type.Int16:i=r.visitInt16||r.visitInt;break;case F.Type.Int32:i=r.visitInt32||r.visitInt;break;case F.Type.Int64:i=r.visitInt64||r.visitInt;break;case F.Type.Uint8:i=r.visitUint8||r.visitInt;break;case F.Type.Uint16:i=r.visitUint16||r.visitInt;break;case F.Type.Uint32:i=r.visitUint32||r.visitInt;break;case F.Type.Uint64:i=r.visitUint64||r.visitInt;break;case F.Type.Float:i=r.visitFloat;break;case F.Type.Float16:i=r.visitFloat16||r.visitFloat;break;case F.Type.Float32:i=r.visitFloat32||r.visitFloat;break;case F.Type.Float64:i=r.visitFloat64||r.visitFloat;break;case F.Type.Utf8:i=r.visitUtf8;break;case F.Type.Binary:i=r.visitBinary;break;case F.Type.FixedSizeBinary:i=r.visitFixedSizeBinary;break;case F.Type.Date:i=r.visitDate;break;case F.Type.DateDay:i=r.visitDateDay||r.visitDate;break;case F.Type.DateMillisecond:i=r.visitDateMillisecond||r.visitDate;break;case F.Type.Timestamp:i=r.visitTimestamp;break;case F.Type.TimestampSecond:i=r.visitTimestampSecond||r.visitTimestamp;break;case F.Type.TimestampMillisecond:i=r.visitTimestampMillisecond||r.visitTimestamp;break;case F.Type.TimestampMicrosecond:i=r.visitTimestampMicrosecond||r.visitTimestamp;break;case F.Type.TimestampNanosecond:i=r.visitTimestampNanosecond||r.visitTimestamp;break;case F.Type.Time:i=r.visitTime;break;case F.Type.TimeSecond:i=r.visitTimeSecond||r.visitTime;break;case F.Type.TimeMillisecond:i=r.visitTimeMillisecond||r.visitTime;break;case F.Type.TimeMicrosecond:i=r.visitTimeMicrosecond||r.visitTime;break;case F.Type.TimeNanosecond:i=r.visitTimeNanosecond||r.visitTime;break;case F.Type.Decimal:i=r.visitDecimal;break;case F.Type.List:i=r.visitList;break;case F.Type.Struct:i=r.visitStruct;break;case F.Type.Union:i=r.visitUnion;break;case F.Type.DenseUnion:i=r.visitDenseUnion||r.visitUnion;break;case F.Type.SparseUnion:i=r.visitSparseUnion||r.visitUnion;break;case F.Type.Dictionary:i=r.visitDictionary;break;case F.Type.Interval:i=r.visitInterval;break;case F.Type.IntervalDayTime:i=r.visitIntervalDayTime||r.visitInterval;break;case F.Type.IntervalYearMonth:i=r.visitIntervalYearMonth||r.visitInterval;break;case F.Type.FixedSizeList:i=r.visitFixedSizeList;break;case F.Type.Map:i=r.visitMap;break}if(typeof i=="function")return i;if(!t)return()=>null;throw new Error(`Unrecognized type '${F.Type[n]}'`)}function Ic(r){switch(r.typeId){case F.Type.Null:return F.Type.Null;case F.Type.Int:{let{bitWidth:e,isSigned:t}=r;switch(e){case 8:return t?F.Type.Int8:F.Type.Uint8;case 16:return t?F.Type.Int16:F.Type.Uint16;case 32:return t?F.Type.Int32:F.Type.Uint32;case 64:return t?F.Type.Int64:F.Type.Uint64}return F.Type.Int}case F.Type.Float:switch(r.precision){case F.Precision.HALF:return F.Type.Float16;case F.Precision.SINGLE:return F.Type.Float32;case F.Precision.DOUBLE:return F.Type.Float64}return F.Type.Float;case F.Type.Binary:return F.Type.Binary;case F.Type.Utf8:return F.Type.Utf8;case F.Type.Bool:return F.Type.Bool;case F.Type.Decimal:return F.Type.Decimal;case F.Type.Time:switch(r.unit){case F.TimeUnit.SECOND:return F.Type.TimeSecond;case F.TimeUnit.MILLISECOND:return F.Type.TimeMillisecond;case F.TimeUnit.MICROSECOND:return F.Type.TimeMicrosecond;case F.TimeUnit.NANOSECOND:return F.Type.TimeNanosecond}return F.Type.Time;case F.Type.Timestamp:switch(r.unit){case F.TimeUnit.SECOND:return F.Type.TimestampSecond;case F.TimeUnit.MILLISECOND:return F.Type.TimestampMillisecond;case F.TimeUnit.MICROSECOND:return F.Type.TimestampMicrosecond;case F.TimeUnit.NANOSECOND:return F.Type.TimestampNanosecond}return F.Type.Timestamp;case F.Type.Date:switch(r.unit){case F.DateUnit.DAY:return F.Type.DateDay;case F.DateUnit.MILLISECOND:return F.Type.DateMillisecond}return F.Type.Date;case F.Type.Interval:switch(r.unit){case F.IntervalUnit.DAY_TIME:return F.Type.IntervalDayTime;case F.IntervalUnit.YEAR_MONTH:return F.Type.IntervalYearMonth}return F.Type.Interval;case F.Type.Map:return F.Type.Map;case F.Type.List:return F.Type.List;case F.Type.Struct:return F.Type.Struct;case F.Type.Union:switch(r.mode){case F.UnionMode.Dense:return F.Type.DenseUnion;case F.UnionMode.Sparse:return F.Type.SparseUnion}return F.Type.Union;case F.Type.FixedSizeBinary:return F.Type.FixedSizeBinary;case F.Type.FixedSizeList:return F.Type.FixedSizeList;case F.Type.Dictionary:return F.Type.Dictionary}throw new Error(`Unrecognized type '${F.Type[r.typeId]}'`)}we.prototype.visitInt8=null;we.prototype.visitInt16=null;we.prototype.visitInt32=null;we.prototype.visitInt64=null;we.prototype.visitUint8=null;we.prototype.visitUint16=null;we.prototype.visitUint32=null;we.prototype.visitUint64=null;we.prototype.visitFloat16=null;we.prototype.visitFloat32=null;we.prototype.visitFloat64=null;we.prototype.visitDateDay=null;we.prototype.visitDateMillisecond=null;we.prototype.visitTimestampSecond=null;we.prototype.visitTimestampMillisecond=null;we.prototype.visitTimestampMicrosecond=null;we.prototype.visitTimestampNanosecond=null;we.prototype.visitTimeSecond=null;we.prototype.visitTimeMillisecond=null;we.prototype.visitTimeMicrosecond=null;we.prototype.visitTimeNanosecond=null;we.prototype.visitDenseUnion=null;we.prototype.visitSparseUnion=null;we.prototype.visitIntervalDayTime=null;we.prototype.visitIntervalYearMonth=null});var Oc=V(_n=>{"use strict";Object.defineProperty(_n,"__esModule",{value:!0});_n.instance=_n.SetVisitor=void 0;var vD=Re(),jD=tt(),wD=Ti(),BD=os(),TD=Ye(),Dt=Te(),re=class extends jD.Visitor{};_n.SetVisitor=re;var ID=(r,e,t)=>{r[e]=t/864e5|0},Sc=(r,e,t)=>{r[e]=t%4294967296|0,r[e+1]=t/4294967296|0},SD=(r,e,t)=>{r[e]=t*1e3%4294967296|0,r[e+1]=t*1e3/4294967296|0},DD=(r,e,t)=>{r[e]=t*1e6%4294967296|0,r[e+1]=t*1e6/4294967296|0},Zm=(r,e,t,i)=>{let{[t]:n,[t+1]:s}=e;n!=null&&s!=null&&r.set(i.subarray(0,s-n),n)},OD=({offset:r,values:e},t,i)=>{let n=r+t;i?e[n>>3]|=1<<n%8:e[n>>3]&=~(1<<n%8)},Xm=({values:r},e,t)=>{ID(r,e,t.valueOf())},Qm=({values:r},e,t)=>{Sc(r,e*2,t.valueOf())},nr=({stride:r,values:e},t,i)=>{e[r*t]=i},e_=({stride:r,values:e},t,i)=>{e[r*t]=BD.float64ToUint16(i)},Dc=(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:s}=r,c=TD.toArrayBufferView(s,i);r.values.set(c.subarray(0,n),n*e)}}},AD=({stride:r,values:e},t,i)=>{e.set(i.subarray(0,r),r*t)},FD=({values:r,valueOffsets:e},t,i)=>Zm(r,e,t,i),MD=({values:r,valueOffsets:e},t,i)=>{Zm(r,e,t,wD.encodeUtf8(i))},VD=(r,e,t)=>{r.type.bitWidth<64?nr(r,e,t):Dc(r,e,t)},UD=(r,e,t)=>{r.type.precision!==Dt.Precision.HALF?nr(r,e,t):e_(r,e,t)},CD=(r,e,t)=>{r.type.unit===Dt.DateUnit.DAY?Xm(r,e,t):Qm(r,e,t)},t_=({values:r},e,t)=>Sc(r,e*2,t/1e3),r_=({values:r},e,t)=>Sc(r,e*2,t),i_=({values:r},e,t)=>SD(r,e*2,t),n_=({values:r},e,t)=>DD(r,e*2,t),PD=(r,e,t)=>{switch(r.type.unit){case Dt.TimeUnit.SECOND:return t_(r,e,t);case Dt.TimeUnit.MILLISECOND:return r_(r,e,t);case Dt.TimeUnit.MICROSECOND:return i_(r,e,t);case Dt.TimeUnit.NANOSECOND:return n_(r,e,t)}},s_=({values:r,stride:e},t,i)=>{r[e*t]=i},o_=({values:r,stride:e},t,i)=>{r[e*t]=i},a_=({values:r},e,t)=>{r.set(t.subarray(0,2),2*e)},u_=({values:r},e,t)=>{r.set(t.subarray(0,2),2*e)},kD=(r,e,t)=>{switch(r.type.unit){case Dt.TimeUnit.SECOND:return s_(r,e,t);case Dt.TimeUnit.MILLISECOND:return o_(r,e,t);case Dt.TimeUnit.MICROSECOND:return a_(r,e,t);case Dt.TimeUnit.NANOSECOND:return u_(r,e,t)}},RD=({values:r},e,t)=>{r.set(t.subarray(0,4),4*e)},xD=(r,e,t)=>{let i=r.getChildAt(0),n=r.valueOffsets;for(let s=-1,c=n[e],v=n[e+1];c<v;)i.set(c++,t.get(++s))},ND=(r,e,t)=>{let i=r.getChildAt(0),n=r.valueOffsets,s=t instanceof Map?[...t]:Object.entries(t);for(let c=-1,v=n[e],I=n[e+1];v<I;)i.set(v++,s[++c])},ED=(r,e)=>(t,i,n)=>t&&t.set(r,e[n]),LD=(r,e)=>(t,i,n)=>t&&t.set(r,e.get(n)),qD=(r,e)=>(t,i,n)=>t&&t.set(r,e.get(i.name)),zD=(r,e)=>(t,i,n)=>t&&t.set(r,e[i.name]),WD=(r,e,t)=>{let i=t instanceof Map?qD(e,t):t instanceof vD.Vector?LD(e,t):Array.isArray(t)?ED(e,t):zD(e,t);r.type.children.forEach((n,s)=>i(r.getChildAt(s),n,s))},HD=(r,e,t)=>{r.type.mode===Dt.UnionMode.Dense?c_(r,e,t):l_(r,e,t)},c_=(r,e,t)=>{let i=r.typeIdToChildIndex[r.typeIds[e]],n=r.getChildAt(i);n&&n.set(r.valueOffsets[e],t)},l_=(r,e,t)=>{let i=r.typeIdToChildIndex[r.typeIds[e]],n=r.getChildAt(i);n&&n.set(e,t)},YD=(r,e,t)=>{let i=r.getKey(e);i!==null&&r.setValue(i,t)},$D=(r,e,t)=>{r.type.unit===Dt.IntervalUnit.DAY_TIME?d_(r,e,t):f_(r,e,t)},d_=({values:r},e,t)=>{r.set(t.subarray(0,2),2*e)},f_=({values:r},e,t)=>{r[e]=t[0]*12+t[1]%12},GD=(r,e,t)=>{let i=r.getChildAt(0),{stride:n}=r;for(let s=-1,c=e*n;++s<n;)i.set(c+s,t.get(s))};re.prototype.visitBool=OD;re.prototype.visitInt=VD;re.prototype.visitInt8=nr;re.prototype.visitInt16=nr;re.prototype.visitInt32=nr;re.prototype.visitInt64=Dc;re.prototype.visitUint8=nr;re.prototype.visitUint16=nr;re.prototype.visitUint32=nr;re.prototype.visitUint64=Dc;re.prototype.visitFloat=UD;re.prototype.visitFloat16=e_;re.prototype.visitFloat32=nr;re.prototype.visitFloat64=nr;re.prototype.visitUtf8=MD;re.prototype.visitBinary=FD;re.prototype.visitFixedSizeBinary=AD;re.prototype.visitDate=CD;re.prototype.visitDateDay=Xm;re.prototype.visitDateMillisecond=Qm;re.prototype.visitTimestamp=PD;re.prototype.visitTimestampSecond=t_;re.prototype.visitTimestampMillisecond=r_;re.prototype.visitTimestampMicrosecond=i_;re.prototype.visitTimestampNanosecond=n_;re.prototype.visitTime=kD;re.prototype.visitTimeSecond=s_;re.prototype.visitTimeMillisecond=o_;re.prototype.visitTimeMicrosecond=a_;re.prototype.visitTimeNanosecond=u_;re.prototype.visitDecimal=RD;re.prototype.visitList=xD;re.prototype.visitStruct=WD;re.prototype.visitUnion=HD;re.prototype.visitDenseUnion=c_;re.prototype.visitSparseUnion=l_;re.prototype.visitDictionary=YD;re.prototype.visitInterval=$D;re.prototype.visitIntervalDayTime=d_;re.prototype.visitIntervalYearMonth=f_;re.prototype.visitFixedSizeList=GD;re.prototype.visitMap=ND;_n.instance=new re});var h_=V(bn=>{"use strict";Object.defineProperty(bn,"__esModule",{value:!0});bn.instance=bn.GetBuilderCtor=void 0;var JD=tt(),KD=Wo(),ZD=nc(),Ac=oc(),XD=ac(),QD=cc(),eO=lc(),tO=jc(),ta=dc(),Fc=mc(),Ir=hc(),rO=vc(),iO=wc(),nO=sc(),sO=Bc(),ds=yc(),fs=pc(),Mc=Tc(),oO=Yo(),Vc=class extends JD.Visitor{visitNull(){return nO.NullBuilder}visitBool(){return ZD.BoolBuilder}visitInt(){return Ir.IntBuilder}visitInt8(){return Ir.Int8Builder}visitInt16(){return Ir.Int16Builder}visitInt32(){return Ir.Int32Builder}visitInt64(){return Ir.Int64Builder}visitUint8(){return Ir.Uint8Builder}visitUint16(){return Ir.Uint16Builder}visitUint32(){return Ir.Uint32Builder}visitUint64(){return Ir.Uint64Builder}visitFloat(){return ta.FloatBuilder}visitFloat16(){return ta.Float16Builder}visitFloat32(){return ta.Float32Builder}visitFloat64(){return ta.Float64Builder}visitUtf8(){return oO.Utf8Builder}visitBinary(){return KD.BinaryBuilder}visitFixedSizeBinary(){return eO.FixedSizeBinaryBuilder}visitDate(){return Ac.DateBuilder}visitDateDay(){return Ac.DateDayBuilder}visitDateMillisecond(){return Ac.DateMillisecondBuilder}visitTimestamp(){return ds.TimestampBuilder}visitTimestampSecond(){return ds.TimestampSecondBuilder}visitTimestampMillisecond(){return ds.TimestampMillisecondBuilder}visitTimestampMicrosecond(){return ds.TimestampMicrosecondBuilder}visitTimestampNanosecond(){return ds.TimestampNanosecondBuilder}visitTime(){return fs.TimeBuilder}visitTimeSecond(){return fs.TimeSecondBuilder}visitTimeMillisecond(){return fs.TimeMillisecondBuilder}visitTimeMicrosecond(){return fs.TimeMicrosecondBuilder}visitTimeNanosecond(){return fs.TimeNanosecondBuilder}visitDecimal(){return XD.DecimalBuilder}visitList(){return rO.ListBuilder}visitStruct(){return sO.StructBuilder}visitUnion(){return Mc.UnionBuilder}visitDenseUnion(){return Mc.DenseUnionBuilder}visitSparseUnion(){return Mc.SparseUnionBuilder}visitDictionary(){return QD.DictionaryBuilder}visitInterval(){return Fc.IntervalBuilder}visitIntervalDayTime(){return Fc.IntervalDayTimeBuilder}visitIntervalYearMonth(){return Fc.IntervalYearMonthBuilder}visitFixedSizeList(){return tO.FixedSizeListBuilder}visitMap(){return iO.MapBuilder}};bn.GetBuilderCtor=Vc;bn.instance=new Vc});var ia=V(R=>{"use strict";Object.defineProperty(R,"__esModule",{value:!0});R.DenseUnionBuilder=R.SparseUnionBuilder=R.UnionBuilder=R.StructBuilder=R.MapBuilder=R.FixedSizeListBuilder=R.ListBuilder=R.BinaryBuilder=R.Utf8Builder=R.IntervalYearMonthBuilder=R.IntervalDayTimeBuilder=R.IntervalBuilder=R.TimestampNanosecondBuilder=R.TimestampMicrosecondBuilder=R.TimestampMillisecondBuilder=R.TimestampSecondBuilder=R.TimestampBuilder=R.TimeNanosecondBuilder=R.TimeMicrosecondBuilder=R.TimeMillisecondBuilder=R.TimeSecondBuilder=R.TimeBuilder=R.Uint64Builder=R.Uint32Builder=R.Uint16Builder=R.Uint8Builder=R.Int64Builder=R.Int32Builder=R.Int16Builder=R.Int8Builder=R.IntBuilder=R.Float64Builder=R.Float32Builder=R.Float16Builder=R.FloatBuilder=R.FixedSizeBinaryBuilder=R.DictionaryBuilder=R.DecimalBuilder=R.DateMillisecondBuilder=R.DateDayBuilder=R.DateBuilder=R.NullBuilder=R.BoolBuilder=R.Builder=void 0;var aO=Ue();Object.defineProperty(R,"Builder",{enumerable:!0,get:function(){return aO.Builder}});var uO=nc();Object.defineProperty(R,"BoolBuilder",{enumerable:!0,get:function(){return uO.BoolBuilder}});var cO=sc();Object.defineProperty(R,"NullBuilder",{enumerable:!0,get:function(){return cO.NullBuilder}});var Uc=oc();Object.defineProperty(R,"DateBuilder",{enumerable:!0,get:function(){return Uc.DateBuilder}});Object.defineProperty(R,"DateDayBuilder",{enumerable:!0,get:function(){return Uc.DateDayBuilder}});Object.defineProperty(R,"DateMillisecondBuilder",{enumerable:!0,get:function(){return Uc.DateMillisecondBuilder}});var lO=ac();Object.defineProperty(R,"DecimalBuilder",{enumerable:!0,get:function(){return lO.DecimalBuilder}});var dO=cc();Object.defineProperty(R,"DictionaryBuilder",{enumerable:!0,get:function(){return dO.DictionaryBuilder}});var fO=lc();Object.defineProperty(R,"FixedSizeBinaryBuilder",{enumerable:!0,get:function(){return fO.FixedSizeBinaryBuilder}});var ra=dc();Object.defineProperty(R,"FloatBuilder",{enumerable:!0,get:function(){return ra.FloatBuilder}});Object.defineProperty(R,"Float16Builder",{enumerable:!0,get:function(){return ra.Float16Builder}});Object.defineProperty(R,"Float32Builder",{enumerable:!0,get:function(){return ra.Float32Builder}});Object.defineProperty(R,"Float64Builder",{enumerable:!0,get:function(){return ra.Float64Builder}});var Sr=hc();Object.defineProperty(R,"IntBuilder",{enumerable:!0,get:function(){return Sr.IntBuilder}});Object.defineProperty(R,"Int8Builder",{enumerable:!0,get:function(){return Sr.Int8Builder}});Object.defineProperty(R,"Int16Builder",{enumerable:!0,get:function(){return Sr.Int16Builder}});Object.defineProperty(R,"Int32Builder",{enumerable:!0,get:function(){return Sr.Int32Builder}});Object.defineProperty(R,"Int64Builder",{enumerable:!0,get:function(){return Sr.Int64Builder}});Object.defineProperty(R,"Uint8Builder",{enumerable:!0,get:function(){return Sr.Uint8Builder}});Object.defineProperty(R,"Uint16Builder",{enumerable:!0,get:function(){return Sr.Uint16Builder}});Object.defineProperty(R,"Uint32Builder",{enumerable:!0,get:function(){return Sr.Uint32Builder}});Object.defineProperty(R,"Uint64Builder",{enumerable:!0,get:function(){return Sr.Uint64Builder}});var hs=pc();Object.defineProperty(R,"TimeBuilder",{enumerable:!0,get:function(){return hs.TimeBuilder}});Object.defineProperty(R,"TimeSecondBuilder",{enumerable:!0,get:function(){return hs.TimeSecondBuilder}});Object.defineProperty(R,"TimeMillisecondBuilder",{enumerable:!0,get:function(){return hs.TimeMillisecondBuilder}});Object.defineProperty(R,"TimeMicrosecondBuilder",{enumerable:!0,get:function(){return hs.TimeMicrosecondBuilder}});Object.defineProperty(R,"TimeNanosecondBuilder",{enumerable:!0,get:function(){return hs.TimeNanosecondBuilder}});var ps=yc();Object.defineProperty(R,"TimestampBuilder",{enumerable:!0,get:function(){return ps.TimestampBuilder}});Object.defineProperty(R,"TimestampSecondBuilder",{enumerable:!0,get:function(){return ps.TimestampSecondBuilder}});Object.defineProperty(R,"TimestampMillisecondBuilder",{enumerable:!0,get:function(){return ps.TimestampMillisecondBuilder}});Object.defineProperty(R,"TimestampMicrosecondBuilder",{enumerable:!0,get:function(){return ps.TimestampMicrosecondBuilder}});Object.defineProperty(R,"TimestampNanosecondBuilder",{enumerable:!0,get:function(){return ps.TimestampNanosecondBuilder}});var Cc=mc();Object.defineProperty(R,"IntervalBuilder",{enumerable:!0,get:function(){return Cc.IntervalBuilder}});Object.defineProperty(R,"IntervalDayTimeBuilder",{enumerable:!0,get:function(){return Cc.IntervalDayTimeBuilder}});Object.defineProperty(R,"IntervalYearMonthBuilder",{enumerable:!0,get:function(){return Cc.IntervalYearMonthBuilder}});var hO=Yo();Object.defineProperty(R,"Utf8Builder",{enumerable:!0,get:function(){return hO.Utf8Builder}});var pO=Wo();Object.defineProperty(R,"BinaryBuilder",{enumerable:!0,get:function(){return pO.BinaryBuilder}});var yO=vc();Object.defineProperty(R,"ListBuilder",{enumerable:!0,get:function(){return yO.ListBuilder}});var mO=jc();Object.defineProperty(R,"FixedSizeListBuilder",{enumerable:!0,get:function(){return mO.FixedSizeListBuilder}});var _O=wc();Object.defineProperty(R,"MapBuilder",{enumerable:!0,get:function(){return _O.MapBuilder}});var bO=Bc();Object.defineProperty(R,"StructBuilder",{enumerable:!0,get:function(){return bO.StructBuilder}});var Pc=Tc();Object.defineProperty(R,"UnionBuilder",{enumerable:!0,get:function(){return Pc.UnionBuilder}});Object.defineProperty(R,"SparseUnionBuilder",{enumerable:!0,get:function(){return Pc.SparseUnionBuilder}});Object.defineProperty(R,"DenseUnionBuilder",{enumerable:!0,get:function(){return Pc.DenseUnionBuilder}});var kc=Te(),gO=Yo(),vO=Ue(),p_=Oc(),y_=h_();vO.Builder.new=m_;function m_(r){let e=r.type,t=new(y_.instance.getVisitFn(e)())(r);if(e.children&&e.children.length>0){let i=r.children||[],n={nullValues:r.nullValues},s=Array.isArray(i)?(c,v)=>i[v]||n:({name:c})=>i[c]||n;e.children.forEach((c,v)=>{let{type:I}=c,S=s(c,v);t.children.push(m_({...S,type:I}))})}return t}Object.keys(kc.Type).map(r=>kc.Type[r]).filter(r=>typeof r=="number"&&r!==kc.Type.NONE).forEach(r=>{let e=y_.instance.visit(r);e.prototype._setValue=p_.instance.getVisitFn(r)});gO.Utf8Builder.prototype._setValue=p_.instance.visitBinary});var __=V(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.Block=gn.Footer=void 0;var jO=gr(),na=Yr(),Ot=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsFooter(e,t){return(t||new Ot).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFooter(e,t){return e.setPosition(e.position()+jO.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Ot).__init(e.readInt32(e.position())+e.position(),e)}version(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):na.MetadataVersion.V1}schema(e){let t=this.bb.__offset(this.bb_pos,6);return t?(e||new na.Schema).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}dictionaries(e,t){let i=this.bb.__offset(this.bb_pos,8);return i?(t||new sa).__init(this.bb.__vector(this.bb_pos+i)+e*24,this.bb):null}dictionariesLength(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}recordBatches(e,t){let i=this.bb.__offset(this.bb_pos,10);return i?(t||new sa).__init(this.bb.__vector(this.bb_pos+i)+e*24,this.bb):null}recordBatchesLength(){let e=this.bb.__offset(this.bb_pos,10);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,t){let i=this.bb.__offset(this.bb_pos,12);return i?(t||new na.KeyValue).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+e*4),this.bb):null}customMetadataLength(){let e=this.bb.__offset(this.bb_pos,12);return e?this.bb.__vector_len(this.bb_pos+e):0}static startFooter(e){e.startObject(5)}static addVersion(e,t){e.addFieldInt16(0,t,na.MetadataVersion.V1)}static addSchema(e,t){e.addFieldOffset(1,t,0)}static addDictionaries(e,t){e.addFieldOffset(2,t,0)}static startDictionariesVector(e,t){e.startVector(24,t,8)}static addRecordBatches(e,t){e.addFieldOffset(3,t,0)}static startRecordBatchesVector(e,t){e.startVector(24,t,8)}static addCustomMetadata(e,t){e.addFieldOffset(4,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let i=t.length-1;i>=0;i--)e.addOffset(t[i]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static endFooter(e){return e.endObject()}static finishFooterBuffer(e,t){e.finish(t)}static finishSizePrefixedFooterBuffer(e,t){e.finish(t,void 0,!0)}static createFooter(e,t,i,n,s,c){return Ot.startFooter(e),Ot.addVersion(e,t),Ot.addSchema(e,i),Ot.addDictionaries(e,n),Ot.addRecordBatches(e,s),Ot.addCustomMetadata(e,c),Ot.endFooter(e)}};gn.Footer=Ot;var sa=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,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(e,t,i,n){return e.prep(8,24),e.writeInt64(n),e.pad(4),e.writeInt32(i),e.writeInt64(t),e.offset()}};gn.Block=sa});var Nc=V(vn=>{"use strict";Object.defineProperty(vn,"__esModule",{value:!0});vn.FileBlock=vn.Footer=void 0;var zt=__(),Rc=gr(),b_=Rc.flatbuffers.Long,wO=Rc.flatbuffers.Builder,BO=Rc.flatbuffers.ByteBuffer,g_=Ke(),v_=Te(),TO=Ye(),xc=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 BO(TO.toUint8Array(e));let t=zt.Footer.getRootAsFooter(e),i=g_.Schema.decode(t.schema());return new j_(i,t)}static encode(e){let t=new wO,i=g_.Schema.encode(t,e.schema);zt.Footer.startRecordBatchesVector(t,e.numRecordBatches),[...e.recordBatches()].slice().reverse().forEach(c=>ei.encode(t,c));let n=t.endVector();zt.Footer.startDictionariesVector(t,e.numDictionaries),[...e.dictionaryBatches()].slice().reverse().forEach(c=>ei.encode(t,c));let s=t.endVector();return zt.Footer.startFooter(t),zt.Footer.addSchema(t,i),zt.Footer.addVersion(t,v_.MetadataVersion.V4),zt.Footer.addRecordBatches(t,n),zt.Footer.addDictionaries(t,s),zt.Footer.finishFooterBuffer(t,zt.Footer.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}};vn.Footer=xc;var j_=class extends xc{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 ei.decode(t)}return null}getDictionaryBatch(e){if(e>=0&&e<this.numDictionaries){let t=this._footer.dictionaries(e);if(t)return ei.decode(t)}return null}},ei=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 ei(e.metaDataLength(),e.bodyLength(),e.offset())}static encode(e,t){let{metaDataLength:i}=t,n=new b_(t.offset,0),s=new b_(t.bodyLength,0);return zt.Block.createBlock(e,n,i,s)}};vn.FileBlock=ei});var ni=V(ii=>{"use strict";Object.defineProperty(ii,"__esModule",{value:!0});ii.AsyncByteStream=ii.ByteStream=ii.AsyncByteQueue=void 0;var ti=ns(),w_=Ti(),ys=rn(),Ec=Ye(),jn=st(),Lc=class extends ys.AsyncQueue{write(e){if((e=Ec.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?Ec.joinUint8Arrays(this._values)[0]:(async()=>{let t=[],i=0;for await(let n of this)t.push(n),i+=n.byteLength;return Ec.joinUint8Arrays(t,i)[0]})()}};ii.AsyncByteQueue=Lc;var B_=class{constructor(e){e&&(this.source=new T_(ti.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)}};ii.ByteStream=B_;var oa=class{constructor(e){e instanceof oa?this.source=e.source:e instanceof Lc?this.source=new ri(ti.default.fromAsyncIterable(e)):jn.isReadableNodeStream(e)?this.source=new ri(ti.default.fromNodeStream(e)):jn.isReadableDOMStream(e)?this.source=new ri(ti.default.fromDOMStream(e)):jn.isFetchResponse(e)?this.source=new ri(ti.default.fromDOMStream(e.body)):jn.isIterable(e)?this.source=new ri(ti.default.fromIterable(e)):jn.isPromise(e)?this.source=new ri(ti.default.fromAsyncIterable(e)):jn.isAsyncIterable(e)&&(this.source=new ri(ti.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)}};ii.AsyncByteStream=oa;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)||ys.ITERATOR_DONE)}return(e){return Object.create(this.source.return&&this.source.return(e)||ys.ITERATOR_DONE)}},ri=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)||ys.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)||ys.ITERATOR_DONE;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(t)}}});var qc=V(wn=>{"use strict";Object.defineProperty(wn,"__esModule",{value:!0});wn.AsyncRandomAccessFile=wn.RandomAccessFile=void 0;var I_=ni(),IO=Ye(),S_=class extends I_.ByteStream{constructor(e,t){super();this.position=0,this.buffer=IO.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}}};wn.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 s=n,c=0,v=0,I=Math.min(i,s+Math.min(i-s,e)),S=new Uint8Array(Math.max(0,(this.position=I)-s));for(;(s+=v)<I&&(c+=v)<S.byteLength;)({bytesRead:v}=await t.read(S,c,S.byteLength-c,s));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 s=Math.min(n,e+t),c=new Uint8Array(s-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}}};wn.AsyncRandomAccessFile=D_});var Wc=V(sr=>{"use strict";Object.defineProperty(sr,"__esModule",{value:!0});sr.Int128=sr.Int64=sr.Uint64=sr.BaseInt64=void 0;var SO=1<<16;function Bn(r){return r<0&&(r=4294967295+r+1),`0x${r.toString(16)}`}var Tn=8,zc=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8],aa=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 s=n>>>16;return n=t[2]*i[3],s+=n,n=t[3]*i[2]>>>0,s+=n,this.buffer[0]+=s<<16,this.buffer[1]=s>>>0<n?SO:0,this.buffer[1]+=s>>>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`${Bn(this.buffer[1])} ${Bn(this.buffer[0])}`}};sr.BaseInt64=aa;var ge=class extends aa{times(e){return this._times(e),this}plus(e){return this._plus(e),this}static from(e,t=new Uint32Array(2)){return ge.fromString(typeof e=="string"?e:e.toString(),t)}static fromNumber(e,t=new Uint32Array(2)){return ge.fromString(e.toString(),t)}static fromString(e,t=new Uint32Array(2)){let i=e.length,n=new ge(t);for(let s=0;s<i;){let c=Tn<i-s?Tn:i-s,v=new ge(new Uint32Array([parseInt(e.substr(s,c),10),0])),I=new ge(new Uint32Array([zc[c],0]));n.times(I),n.plus(v),s+=c}return n}static convertArray(e){let t=new Uint32Array(e.length*2);for(let i=-1,n=e.length;++i<n;)ge.from(e[i],new Uint32Array(t.buffer,t.byteOffset+2*i*4,2));return t}static multiply(e,t){return new ge(new Uint32Array(e.buffer)).times(t)}static add(e,t){return new ge(new Uint32Array(e.buffer)).plus(t)}};sr.Uint64=ge;var pt=class extends aa{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 pt.fromString(typeof e=="string"?e:e.toString(),t)}static fromNumber(e,t=new Uint32Array(2)){return pt.fromString(e.toString(),t)}static fromString(e,t=new Uint32Array(2)){let i=e.startsWith("-"),n=e.length,s=new pt(t);for(let c=i?1:0;c<n;){let v=Tn<n-c?Tn:n-c,I=new pt(new Uint32Array([parseInt(e.substr(c,v),10),0])),S=new pt(new Uint32Array([zc[v],0]));s.times(S),s.plus(I),c+=v}return i?s.negate():s}static convertArray(e){let t=new Uint32Array(e.length*2);for(let i=-1,n=e.length;++i<n;)pt.from(e[i],new Uint32Array(t.buffer,t.byteOffset+2*i*4,2));return t}static multiply(e,t){return new pt(new Uint32Array(e.buffer)).times(t)}static add(e,t){return new pt(new Uint32Array(e.buffer)).plus(t)}};sr.Int64=pt;var Wt=class{constructor(e){this.buffer=e}high(){return new pt(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset+8,2))}low(){return new pt(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 ge(new Uint32Array([this.buffer[3],0])),i=new ge(new Uint32Array([this.buffer[2],0])),n=new ge(new Uint32Array([this.buffer[1],0])),s=new ge(new Uint32Array([this.buffer[0],0])),c=new ge(new Uint32Array([e.buffer[3],0])),v=new ge(new Uint32Array([e.buffer[2],0])),I=new ge(new Uint32Array([e.buffer[1],0])),S=new ge(new Uint32Array([e.buffer[0],0])),U=ge.multiply(s,S);this.buffer[0]=U.low();let G=new ge(new Uint32Array([U.high(),0]));return U=ge.multiply(n,S),G.plus(U),U=ge.multiply(s,I),G.plus(U),this.buffer[1]=G.low(),this.buffer[3]=G.lessThan(U)?1:0,this.buffer[2]=G.high(),new ge(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset+8,2)).plus(ge.multiply(i,S)).plus(ge.multiply(n,I)).plus(ge.multiply(s,v)),this.buffer[3]+=ge.multiply(t,S).plus(ge.multiply(i,I)).plus(ge.multiply(n,v)).plus(ge.multiply(s,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`${Bn(this.buffer[3])} ${Bn(this.buffer[2])} ${Bn(this.buffer[1])} ${Bn(this.buffer[0])}`}static multiply(e,t){return new Wt(new Uint32Array(e.buffer)).times(t)}static add(e,t){return new Wt(new Uint32Array(e.buffer)).plus(t)}static from(e,t=new Uint32Array(4)){return Wt.fromString(typeof e=="string"?e:e.toString(),t)}static fromNumber(e,t=new Uint32Array(4)){return Wt.fromString(e.toString(),t)}static fromString(e,t=new Uint32Array(4)){let i=e.startsWith("-"),n=e.length,s=new Wt(t);for(let c=i?1:0;c<n;){let v=Tn<n-c?Tn:n-c,I=new Wt(new Uint32Array([parseInt(e.substr(c,v),10),0,0,0])),S=new Wt(new Uint32Array([zc[v],0,0,0]));s.times(S),s.plus(I),c+=v}return i?s.negate():s}static convertArray(e){let t=new Uint32Array(e.length*4);for(let i=-1,n=e.length;++i<n;)Wt.from(e[i],new Uint32Array(t.buffer,t.byteOffset+4*4*i,4));return t}};sr.Int128=Wt});var M_=V(In=>{"use strict";Object.defineProperty(In,"__esModule",{value:!0});In.JSONVectorLoader=In.VectorLoader=void 0;var Ge=Lt(),DO=Ke(),Dr=be(),OO=tt(),O_=tr(),AO=Ti(),ua=Wc(),A_=Te(),or=Ye(),Hc=class extends OO.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 DO.Field?e.type:e)}visitNull(e,{length:t}=this.nextFieldNode()){return Ge.Data.Null(e,0,t)}visitBool(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.Data.Bool(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitInt(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.Data.Int(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitFloat(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.Data.Float(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitUtf8(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.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 Ge.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 Ge.Data.FixedSizeBinary(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitDate(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.Data.Date(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitTimestamp(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.Data.Timestamp(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitTime(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.Data.Time(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitDecimal(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.Data.Decimal(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitList(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.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 Ge.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 Ge.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 Ge.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 Ge.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 Ge.Data.Interval(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitFixedSizeList(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.Data.FixedSizeList(e,0,t,i,this.readNullBitmap(e,i),this.visit(e.children[0]))}visitMap(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.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)}};In.VectorLoader=Hc;var F_=class extends Hc{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 or.toArrayBufferView(Uint8Array,or.toArrayBufferView(Int32Array,this.sources[t]))}readTypeIds(e,{offset:t}=this.nextBufferRange()){return or.toArrayBufferView(Uint8Array,or.toArrayBufferView(e.ArrayType,this.sources[t]))}readData(e,{offset:t}=this.nextBufferRange()){let{sources:i}=this;return Dr.DataType.isTimestamp(e)||(Dr.DataType.isInt(e)||Dr.DataType.isTime(e))&&e.bitWidth===64||Dr.DataType.isDate(e)&&e.unit===A_.DateUnit.MILLISECOND?or.toArrayBufferView(Uint8Array,ua.Int64.convertArray(i[t])):Dr.DataType.isDecimal(e)?or.toArrayBufferView(Uint8Array,ua.Int128.convertArray(i[t])):Dr.DataType.isBinary(e)||Dr.DataType.isFixedSizeBinary(e)?FO(i[t]):Dr.DataType.isBool(e)?O_.packBools(i[t]):Dr.DataType.isUtf8(e)?AO.encodeUtf8(i[t].join("")):or.toArrayBufferView(Uint8Array,or.toArrayBufferView(e.ArrayType,i[t].map(n=>+n)))}};In.JSONVectorLoader=F_;function FO(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 ms=V(Dn=>{"use strict";Object.defineProperty(Dn,"__esModule",{value:!0});Dn.StructRow=Dn.MapRow=void 0;var V_=Qu(),rt=Symbol.for("parent"),Sn=Symbol.for("rowIndex"),yt=Symbol.for("keyToIdx"),mt=Symbol.for("idxToVal"),Yc=Symbol.for("nodejs.util.inspect.custom"),ar=class{constructor(e,t){this[rt]=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[yt]||(this[yt]=new Map),n=i.get(e);if(n!==void 0){let s=this[mt]||(this[mt]=new Array(this.size));(t=s[n])!==void 0||(s[n]=t=this.getValue(n))}else if((n=this.getIndex(e))>-1){i.set(e,n);let s=this[mt]||(this[mt]=new Array(this.size));(t=s[n])!==void 0||(s[n]=t=this.getValue(n))}}return t}set(e,t){if(e!=null){let i=this[yt]||(this[yt]=new Map),n=i.get(e);if(n===void 0&&i.set(e,n=this.getIndex(e)),n>-1){let s=this[mt]||(this[mt]=new Array(this.size));s[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[yt]||(this[yt]=new Map),n=this[mt]||(this[mt]=new Array(this.size));for(let s,c,v=0,I,S;!((I=e.next()).done||(S=t.next()).done);++v)s=I.value,c=S.value,n[v]=c,i.has(s)||i.set(s,v),yield[s,c]}forEach(e,t){let i=this.keys(),n=this.values(),s=t===void 0?e:(I,S,U)=>e.call(t,I,S,U),c=this[yt]||(this[yt]=new Map),v=this[mt]||(this[mt]=new Array(this.size));for(let I,S,U=0,G,_e;!((G=i.next()).done||(_e=n.next()).done);++U)I=G.value,S=_e.value,v[U]=S,c.has(I)||c.set(I,U),s(S,I,this)}toArray(){return[...this.values()]}toJSON(){let e={};return this.forEach((t,i)=>e[i]=t),e}inspect(){return this.toString()}[Yc](){return this.toString()}toString(){let e=[];return this.forEach((t,i)=>{i=V_.valueToString(i),t=V_.valueToString(t),e.push(`${i}: ${t}`)}),`{ ${e.join(", ")} }`}};ar[Symbol.toStringTag]=(r=>(Object.defineProperties(r,{size:{writable:!0,enumerable:!1,configurable:!1,value:0},[rt]:{writable:!0,enumerable:!1,configurable:!1,value:null},[Sn]:{writable:!0,enumerable:!1,configurable:!1,value:-1}}),r[Symbol.toStringTag]="Row"))(ar.prototype);var U_=class extends ar{constructor(e){super(e,e.length);return MO(this)}keys(){return this[rt].getChildAt(0)[Symbol.iterator]()}values(){return this[rt].getChildAt(1)[Symbol.iterator]()}getKey(e){return this[rt].getChildAt(0).get(e)}getIndex(e){return this[rt].getChildAt(0).indexOf(e)}getValue(e){return this[rt].getChildAt(1).get(e)}setValue(e,t){this[rt].getChildAt(1).set(e,t)}};Dn.MapRow=U_;var C_=class extends ar{constructor(e){super(e,e.type.children.length);return P_(this)}*keys(){for(let e of this[rt].type.children)yield e.name}*values(){for(let e of this[rt].type.children)yield this[e.name]}getKey(e){return this[rt].type.children[e].name}getIndex(e){return this[rt].type.children.findIndex(t=>t.name===e)}getValue(e){return this[rt].getChildAt(e).get(this[Sn])}setValue(e,t){return this[rt].getChildAt(e).set(this[Sn],t)}};Dn.StructRow=C_;Object.setPrototypeOf(ar.prototype,Map.prototype);var P_=(()=>{let r={enumerable:!0,configurable:!1,get:null,set:null};return e=>{let t=-1,i=e[yt]||(e[yt]=new Map),n=c=>function(){return this.get(c)},s=c=>function(v){return this.set(c,v)};for(let c of e.keys())i.set(c,++t),r.get=n(c),r.set=s(c),Object.prototype.hasOwnProperty.call(e,c)||(r.enumerable=!0,Object.defineProperty(e,c,r)),Object.prototype.hasOwnProperty.call(e,t)||(r.enumerable=!1,Object.defineProperty(e,t,r));return r.get=r.set=null,e}})(),MO=(()=>{if(typeof Proxy=="undefined")return P_;let r=ar.prototype.has,e=ar.prototype.get,t=ar.prototype.set,i=ar.prototype.getKey,n={isExtensible(){return!1},deleteProperty(){return!1},preventExtensions(){return!0},ownKeys(s){return[...s.keys()].map(c=>`${c}`)},has(s,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 rt:case Sn:case mt:case yt:case Yc:return!0}return typeof c=="number"&&!s.has(c)&&(c=s.getKey(c)),s.has(c)},get(s,c,v){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 rt:case Sn:case mt:case yt:case Yc:return Reflect.get(s,c,v)}return typeof c=="number"&&!r.call(v,c)&&(c=i.call(v,c)),e.call(v,c)},set(s,c,v,I){switch(c){case rt:case Sn:case mt:case yt:return Reflect.set(s,c,v,I);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(I,c)&&(c=i.call(I,c)),r.call(I,c)?!!t.call(I,c,v):!1}};return s=>new Proxy(s,n)})()});var bs=V(si=>{"use strict";Object.defineProperty(si,"__esModule",{value:!0});si.createElementComparator=si.clampRange=si.clampIndex=void 0;var k_=Re(),R_=ms(),VO=Ye(),x_=st();function UO(r,e,t){let i=r.length,n=e>-1?e:i+e%i;return t?t(r,n):n}si.clampIndex=UO;var N_;function CO(r,e,t,i){let{length:n=0}=r,s=typeof e!="number"?0:e,c=typeof t!="number"?n:t;return s<0&&(s=(s%n+n)%n),c<0&&(c=(c%n+n)%n),c<s&&(N_=s,s=c,c=N_),c>n&&(c=n),i?i(r,s,c):[s,c]}si.clampRange=CO;var PO=x_.BigIntAvailable?x_.BigInt(0):0,E_=r=>r!==r;function _s(r){let e=typeof r;if(e!=="object"||r===null)return E_(r)?E_:e!=="bigint"?t=>t===r:t=>PO+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?VO.compareArrayLike(r,t):!1:r instanceof Map?RO(r):Array.isArray(r)?kO(r):r instanceof k_.Vector?xO(r):NO(r)}si.createElementComparator=_s;function kO(r){let e=[];for(let t=-1,i=r.length;++t<i;)e[t]=_s(r[t]);return ca(e)}function RO(r){let e=-1,t=[];return r.forEach(i=>t[++e]=_s(i)),ca(t)}function xO(r){let e=[];for(let t=-1,i=r.length;++t<i;)e[t]=_s(r.get(t));return ca(e)}function NO(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]=_s(r[e[i]]);return ca(t,e)}function ca(r,e){return t=>{if(!t||typeof t!="object")return!1;switch(t.constructor){case Array:return EO(r,t);case Map:case R_.MapRow:case R_.StructRow:return L_(r,t,t.keys());case Object:case void 0:return L_(r,t,e||Object.keys(t))}return t instanceof k_.Vector?LO(r,t):!1}}function EO(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 LO(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 L_(r,e,t){let i=t[Symbol.iterator](),n=e instanceof Map?e.keys():Object.keys(e)[Symbol.iterator](),s=e instanceof Map?e.values():Object.values(e)[Symbol.iterator](),c=0,v=r.length,I=s.next(),S=i.next(),U=n.next();for(;c<v&&!S.done&&!U.done&&!I.done&&!(S.value!==U.value||!r[c](I.value));++c,S=i.next(),U=n.next(),I=s.next());return c===v&&S.done&&U.done&&I.done?!0:(i.return&&i.return(),n.return&&n.return(),s.return&&s.return(),!1)}});var On=V(dt=>{"use strict";Object.defineProperty(dt,"__esModule",{value:!0});dt.selectColumnChildrenArgs=dt.selectVectorChildrenArgs=dt.selectChunkArgs=dt.selectFieldArgs=dt.selectColumnArgs=dt.selectArgs=void 0;var q_=Lt(),z_=Ke(),oi=An(),gs=Re(),W_=be(),qO=ui(),ai=Array.isArray;dt.selectArgs=(r,e)=>la(r,e,[],0);dt.selectColumnArgs=r=>{let[e,t]=Gc(r,[[],[]]);return t.map((i,n)=>i instanceof oi.Column?oi.Column.new(i.field.clone(e[n]),i):i instanceof gs.Vector?oi.Column.new(e[n],i):oi.Column.new(e[n],[]))};dt.selectFieldArgs=r=>Gc(r,[[],[]]);dt.selectChunkArgs=(r,e)=>$c(r,e,[],0);dt.selectVectorChildrenArgs=(r,e)=>H_(r,e,[],0);dt.selectColumnChildrenArgs=(r,e)=>Y_(r,e,[],0);function la(r,e,t,i){let n,s=i,c=-1,v=e.length;for(;++c<v;)ai(n=e[c])?s=la(r,n,t,s).length:n instanceof r&&(t[s++]=n);return t}function $c(r,e,t,i){let n,s=i,c=-1,v=e.length;for(;++c<v;)ai(n=e[c])?s=$c(r,n,t,s).length:n instanceof qO.Chunked?s=$c(r,n.chunks,t,s).length:n instanceof r&&(t[s++]=n);return t}function H_(r,e,t,i){let n,s=i,c=-1,v=e.length;for(;++c<v;)ai(n=e[c])?s=H_(r,n,t,s).length:n instanceof r?s=la(gs.Vector,n.schema.fields.map((I,S)=>n.getChildAt(S)),t,s).length:n instanceof gs.Vector&&(t[s++]=n);return t}function Y_(r,e,t,i){let n,s=i,c=-1,v=e.length;for(;++c<v;)ai(n=e[c])?s=Y_(r,n,t,s).length:n instanceof r?s=la(oi.Column,n.schema.fields.map((I,S)=>oi.Column.new(I,n.getChildAt(S))),t,s).length:n instanceof oi.Column&&(t[s++]=n);return t}var zO=(r,[e,t],i)=>(r[0][i]=e,r[1][i]=t,r);function Gc(r,e){let t,i;switch(i=r.length){case 0:return e;case 1:if(t=e[0],!r[0])return e;if(ai(r[0]))return Gc(r[0],e);r[0]instanceof q_.Data||r[0]instanceof gs.Vector||r[0]instanceof W_.DataType||([t,r]=Object.entries(r[0]).reduce(zO,e));break;default:ai(t=r[i-1])?r=ai(r[0])?r[0]:r.slice(0,i-1):(r=ai(r[0])?r[0]:r,t=[])}let n=-1,s=-1,c=-1,v=r.length,I,S,[U,G]=e;for(;++c<v;)S=r[c],S instanceof oi.Column&&(G[++s]=S)?U[++n]=S.field.clone(t[c],S.type,!0):({[c]:I=c}=t,S instanceof W_.DataType&&(G[++s]=S)?U[++n]=z_.Field.new(I,S,!0):S&&S.type&&(G[++s]=S)&&(S instanceof q_.Data&&(G[s]=S=gs.Vector.new(S)),U[++n]=z_.Field.new(I,S.type,!0)));return e}});var ui=V(da=>{"use strict";Object.defineProperty(da,"__esModule",{value:!0});da.Chunked=void 0;var WO=bs(),$_=be(),HO=On(),G_=Re(),J_=class{constructor(e){this.chunks=e,this.chunkIndex=0,this.chunkIterator=this.getChunkIterator()}next(){for(;this.chunkIndex<this.chunks.length;){let e=this.chunkIterator.next();if(!e.done)return e;++this.chunkIndex<this.chunks.length&&(this.chunkIterator=this.getChunkIterator())}return{done:!0,value:null}}getChunkIterator(){return this.chunks[this.chunkIndex][Symbol.iterator]()}[Symbol.iterator](){return this}},Or=class extends G_.AbstractVector{constructor(e,t=[],i=YO(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 HO.selectChunkArgs(G_.Vector,e)}static concat(...e){let t=Or.flatten(...e);return new Or(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($_.DataType.isDictionary(this._type)){if(!this._indices){let e=this._chunks;this._indices=e.length===1?e[0].indices:Or.concat(...e.map(t=>t.indices))}return this._indices}return null}get dictionary(){return $_.DataType.isDictionary(this._type)?this._chunks[this._chunks.length-1].data.dictionary:null}[Symbol.iterator](){return new J_(this._chunks)}clone(e=this._chunks){return new Or(this._type,e)}concat(...e){return this.clone(Or.flatten(this,...e))}slice(e,t){return WO.clampRange(this,e,t,this._sliceInternal)}getChildAt(e){if(e<0||e>=this._numChildren)return null;let t=this._children||(this._children=[]),i,n,s;return(i=t[e])?i:(n=(this._type.children||[])[e])&&(s=this._chunks.map(c=>c.getChildAt(e)).filter(c=>c!=null),s.length>0)?t[e]=new Or(n.type,s):null}search(e,t){let i=e,n=this._chunkOffsets,s=n.length-1;if(i<0||i>=n[s])return null;if(s<=1)return t?t(this,0,i):[0,i];let c=0,v=0,I=0;do{if(c+1===s)return t?t(this,c,i-v):[c,i-v];I=c+(s-c)/2|0,i>=n[I]?c=I:s=I}while(i<n[s]&&i>=(v=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,s)=>i[n].set(s,t))}indexOf(e,t){return t&&typeof t=="number"?this.search(t,(i,n,s)=>this.indexOfInternal(i,n,s,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,s=new Array(t);for(let I=-1;++I<t;)n+=(s[I]=e[I].toArray()).length;i!==s[0].constructor&&(i=s[0].constructor);let c=new i(n),v=i===Array?GO:$O;for(let I=-1,S=0;++I<t;)S=v(s[I],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 s=t-1,c=e.length,v=i,I=0,S=-1;for(;++s<c;){if(~(S=e[s].indexOf(n,v)))return I+S;v=0,I+=e[s].length}return-1}_sliceInternal(e,t,i){let n=[],{chunks:s,_chunkOffsets:c}=e;for(let v=-1,I=s.length;++v<I;){let S=s[v],U=S.length,G=c[v];if(G>=i)break;if(t>=G+U)continue;if(G>=t&&G+U<=i){n.push(S);continue}let _e=Math.max(0,t-G),fe=Math.min(i-G,U);n.push(S.slice(_e,fe))}return e.clone(n)}};da.Chunked=Or;function YO(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 $O=(r,e,t)=>(e.set(r,t),t+r.length),GO=(r,e,t)=>{let i=t;for(let n=-1,s=r.length;++n<s;)e[i++]=r[n];return i}});var An=V(fa=>{"use strict";Object.defineProperty(fa,"__esModule",{value:!0});fa.Column=void 0;var K_=Ke(),Z_=Re(),Jc=ui(),xi=class extends Jc.Chunked{constructor(e,t=[],i){t=Jc.Chunked.flatten(...t);super(e.type,t,i);if(this._field=e,t.length===1&&!(this instanceof Kc))return new Kc(e,t[0],this._chunkOffsets)}static new(...e){let[t,i,...n]=e;typeof t!="string"&&!(t instanceof K_.Field)&&(i=t,t="");let s=Jc.Chunked.flatten(Array.isArray(i)?[...i,...n]:i instanceof Z_.Vector?[i,...n]:[Z_.Vector.new(i,...n)]);if(typeof t=="string"){let c=s[0].data.type;t=new K_.Field(t,c,!0)}else!t.nullable&&s.some(({nullCount:c})=>c>0)&&(t=t.clone({nullable:!0}));return new xi(t,s)}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 xi(this._field,e)}getChildAt(e){if(e<0||e>=this.numChildren)return null;let t=this._children||(this._children=[]),i,n,s;return(i=t[e])?i:(n=(this.type.children||[])[e])&&(s=this._chunks.map(c=>c.getChildAt(e)).filter(c=>c!=null),s.length>0)?t[e]=new xi(n,s):null}};fa.Column=xi;var Kc=class extends xi{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 X_=V(Fn=>{"use strict";Object.defineProperty(Fn,"__esModule",{value:!0});Fn.instance=Fn.TypeAssembler=void 0;var JO=gr(),KO=JO.flatbuffers.Long,ZO=tt(),Y=Yr(),Zc=class extends ZO.Visitor{visit(e,t){return e==null||t==null?void 0:super.visit(e,t)}visitNull(e,t){return Y.Null.startNull(t),Y.Null.endNull(t)}visitInt(e,t){return Y.Int.startInt(t),Y.Int.addBitWidth(t,e.bitWidth),Y.Int.addIsSigned(t,e.isSigned),Y.Int.endInt(t)}visitFloat(e,t){return Y.FloatingPoint.startFloatingPoint(t),Y.FloatingPoint.addPrecision(t,e.precision),Y.FloatingPoint.endFloatingPoint(t)}visitBinary(e,t){return Y.Binary.startBinary(t),Y.Binary.endBinary(t)}visitBool(e,t){return Y.Bool.startBool(t),Y.Bool.endBool(t)}visitUtf8(e,t){return Y.Utf8.startUtf8(t),Y.Utf8.endUtf8(t)}visitDecimal(e,t){return Y.Decimal.startDecimal(t),Y.Decimal.addScale(t,e.scale),Y.Decimal.addPrecision(t,e.precision),Y.Decimal.endDecimal(t)}visitDate(e,t){return Y.Date.startDate(t),Y.Date.addUnit(t,e.unit),Y.Date.endDate(t)}visitTime(e,t){return Y.Time.startTime(t),Y.Time.addUnit(t,e.unit),Y.Time.addBitWidth(t,e.bitWidth),Y.Time.endTime(t)}visitTimestamp(e,t){let i=e.timezone&&t.createString(e.timezone)||void 0;return Y.Timestamp.startTimestamp(t),Y.Timestamp.addUnit(t,e.unit),i!==void 0&&Y.Timestamp.addTimezone(t,i),Y.Timestamp.endTimestamp(t)}visitInterval(e,t){return Y.Interval.startInterval(t),Y.Interval.addUnit(t,e.unit),Y.Interval.endInterval(t)}visitList(e,t){return Y.List.startList(t),Y.List.endList(t)}visitStruct(e,t){return Y.Struct_.startStruct_(t),Y.Struct_.endStruct_(t)}visitUnion(e,t){Y.Union.startTypeIdsVector(t,e.typeIds.length);let i=Y.Union.createTypeIdsVector(t,e.typeIds);return Y.Union.startUnion(t),Y.Union.addMode(t,e.mode),Y.Union.addTypeIds(t,i),Y.Union.endUnion(t)}visitDictionary(e,t){let i=this.visit(e.indices,t);return Y.DictionaryEncoding.startDictionaryEncoding(t),Y.DictionaryEncoding.addId(t,new KO(e.id,0)),Y.DictionaryEncoding.addIsOrdered(t,e.isOrdered),i!==void 0&&Y.DictionaryEncoding.addIndexType(t,i),Y.DictionaryEncoding.endDictionaryEncoding(t)}visitFixedSizeBinary(e,t){return Y.FixedSizeBinary.startFixedSizeBinary(t),Y.FixedSizeBinary.addByteWidth(t,e.byteWidth),Y.FixedSizeBinary.endFixedSizeBinary(t)}visitFixedSizeList(e,t){return Y.FixedSizeList.startFixedSizeList(t),Y.FixedSizeList.addListSize(t,e.listSize),Y.FixedSizeList.endFixedSizeList(t)}visitMap(e,t){return Y.Map.startMap(t),Y.Map.addKeysSorted(t,e.keysSorted),Y.Map.endMap(t)}};Fn.TypeAssembler=Zc;Fn.instance=new Zc});var sb=V(ur=>{"use strict";Object.defineProperty(ur,"__esModule",{value:!0});ur.fieldFromJSON=ur.dictionaryBatchFromJSON=ur.recordBatchFromJSON=ur.schemaFromJSON=void 0;var Mn=Ke(),De=be(),Ni=Ei(),Vn=Te();function XO(r,e=new Map){return new Mn.Schema(eA(r,e),ha(r.customMetadata),e)}ur.schemaFromJSON=XO;function Q_(r){return new Ni.RecordBatch(r.count,tb(r.columns),rb(r.columns))}ur.recordBatchFromJSON=Q_;function QO(r){return new Ni.DictionaryBatch(Q_(r.data),r.id,r.isDelta)}ur.dictionaryBatchFromJSON=QO;function eA(r,e){return(r.fields||[]).filter(Boolean).map(t=>Mn.Field.fromJSON(t,e))}function eb(r,e){return(r.children||[]).filter(Boolean).map(t=>Mn.Field.fromJSON(t,e))}function tb(r){return(r||[]).reduce((e,t)=>[...e,new Ni.FieldNode(t.count,tA(t.VALIDITY)),...tb(t.children)],[])}function rb(r,e=[]){for(let t=-1,i=(r||[]).length;++t<i;){let n=r[t];n.VALIDITY&&e.push(new Ni.BufferRegion(e.length,n.VALIDITY.length)),n.TYPE&&e.push(new Ni.BufferRegion(e.length,n.TYPE.length)),n.OFFSET&&e.push(new Ni.BufferRegion(e.length,n.OFFSET.length)),n.DATA&&e.push(new Ni.BufferRegion(e.length,n.DATA.length)),e=rb(n.children,e)}return e}function tA(r){return(r||[]).reduce((e,t)=>e+ +(t===0),0)}function rA(r,e){let t,i,n,s,c,v;return!e||!(s=r.dictionary)?(c=nb(r,eb(r,e)),n=new Mn.Field(r.name,c,r.nullable,ha(r.customMetadata))):e.has(t=s.id)?(i=(i=s.indexType)?ib(i):new De.Int32,v=new De.Dictionary(e.get(t),i,t,s.isOrdered),n=new Mn.Field(r.name,v,r.nullable,ha(r.customMetadata))):(i=(i=s.indexType)?ib(i):new De.Int32,e.set(t,c=nb(r,eb(r,e))),v=new De.Dictionary(c,i,t,s.isOrdered),n=new Mn.Field(r.name,v,r.nullable,ha(r.customMetadata))),n||null}ur.fieldFromJSON=rA;function ha(r){return new Map(Object.entries(r||{}))}function ib(r){return new De.Int(r.isSigned,r.bitWidth)}function nb(r,e){let t=r.type.name;switch(t){case"NONE":return new De.Null;case"null":return new De.Null;case"binary":return new De.Binary;case"utf8":return new De.Utf8;case"bool":return new De.Bool;case"list":return new De.List((e||[])[0]);case"struct":return new De.Struct(e||[]);case"struct_":return new De.Struct(e||[])}switch(t){case"int":{let i=r.type;return new De.Int(i.isSigned,i.bitWidth)}case"floatingpoint":{let i=r.type;return new De.Float(Vn.Precision[i.precision])}case"decimal":{let i=r.type;return new De.Decimal(i.scale,i.precision)}case"date":{let i=r.type;return new De.Date_(Vn.DateUnit[i.unit])}case"time":{let i=r.type;return new De.Time(Vn.TimeUnit[i.unit],i.bitWidth)}case"timestamp":{let i=r.type;return new De.Timestamp(Vn.TimeUnit[i.unit],i.timezone)}case"interval":{let i=r.type;return new De.Interval(Vn.IntervalUnit[i.unit])}case"union":{let i=r.type;return new De.Union(Vn.UnionMode[i.mode],i.typeIds||[],e||[])}case"fixedsizebinary":{let i=r.type;return new De.FixedSizeBinary(i.byteWidth)}case"fixedsizelist":{let i=r.type;return new De.FixedSizeList(i.listSize,(e||[])[0])}case"map":{let i=r.type;return new De.Map_((e||[])[0],i.keysSorted)}}throw new Error(`Unrecognized type: "${t}"`)}});var Ei=V(Ft=>{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.FieldNode=Ft.BufferRegion=Ft.DictionaryBatch=Ft.RecordBatch=Ft.Message=void 0;var Xc=gr(),W=Yr(),Fe=_o(),Ze=Ke(),iA=Ye(),Ce=Te(),Qc=X_(),pa=sb(),Li=Xc.flatbuffers.Long,nA=Xc.flatbuffers.Builder,sA=Xc.flatbuffers.ByteBuffer,Oe=be(),ci=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 ci(0,Ce.MetadataVersion.V4,t);return i._createHeader=oA(e,t),i}static decode(e){e=new sA(iA.toUint8Array(e));let t=Fe.Message.getRootAsMessage(e),i=t.bodyLength(),n=t.version(),s=t.headerType(),c=new ci(i,n,s);return c._createHeader=aA(t,s),c}static encode(e){let t=new nA,i=-1;return e.isSchema()?i=Ze.Schema.encode(t,e.header()):e.isRecordBatch()?i=At.encode(t,e.header()):e.isDictionaryBatch()&&(i=cr.encode(t,e.header())),Fe.Message.startMessage(t),Fe.Message.addVersion(t,Ce.MetadataVersion.V4),Fe.Message.addHeader(t,i),Fe.Message.addHeaderType(t,e.headerType),Fe.Message.addBodyLength(t,new Li(e.bodyLength,0)),Fe.Message.finishMessageBuffer(t,Fe.Message.endMessage(t)),t.asUint8Array()}static from(e,t=0){if(e instanceof Ze.Schema)return new ci(0,Ce.MetadataVersion.V4,Ce.MessageHeader.Schema,e);if(e instanceof At)return new ci(t,Ce.MetadataVersion.V4,Ce.MessageHeader.RecordBatch,e);if(e instanceof cr)return new ci(t,Ce.MetadataVersion.V4,Ce.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===Ce.MessageHeader.Schema}isRecordBatch(){return this.headerType===Ce.MessageHeader.RecordBatch}isDictionaryBatch(){return this.headerType===Ce.MessageHeader.DictionaryBatch}};Ft.Message=ci;var At=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}};Ft.RecordBatch=At;var cr=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}};Ft.DictionaryBatch=cr;var qi=class{constructor(e,t){this.offset=typeof e=="number"?e:e.low,this.length=typeof t=="number"?t:t.low}};Ft.BufferRegion=qi;var zi=class{constructor(e,t){this.length=typeof e=="number"?e:e.low,this.nullCount=typeof t=="number"?t:t.low}};Ft.FieldNode=zi;function oA(r,e){return()=>{switch(e){case Ce.MessageHeader.Schema:return Ze.Schema.fromJSON(r);case Ce.MessageHeader.RecordBatch:return At.fromJSON(r);case Ce.MessageHeader.DictionaryBatch:return cr.fromJSON(r)}throw new Error(`Unrecognized Message type: { name: ${Ce.MessageHeader[e]}, type: ${e} }`)}}function aA(r,e){return()=>{switch(e){case Ce.MessageHeader.Schema:return Ze.Schema.decode(r.header(new W.Schema));case Ce.MessageHeader.RecordBatch:return At.decode(r.header(new Fe.RecordBatch),r.version());case Ce.MessageHeader.DictionaryBatch:return cr.decode(r.header(new Fe.DictionaryBatch),r.version())}throw new Error(`Unrecognized Message type: { name: ${Ce.MessageHeader[e]}, type: ${e} }`)}}Ze.Field.encode=bA;Ze.Field.decode=mA;Ze.Field.fromJSON=pa.fieldFromJSON;Ze.Schema.encode=_A;Ze.Schema.decode=uA;Ze.Schema.fromJSON=pa.schemaFromJSON;At.encode=gA;At.decode=cA;At.fromJSON=pa.recordBatchFromJSON;cr.encode=vA;cr.decode=lA;cr.fromJSON=pa.dictionaryBatchFromJSON;zi.encode=jA;zi.decode=fA;qi.encode=wA;qi.decode=dA;function uA(r,e=new Map){let t=yA(r,e);return new Ze.Schema(t,ya(r),e)}function cA(r,e=Ce.MetadataVersion.V4){return new At(r.length(),hA(r),pA(r,e))}function lA(r,e=Ce.MetadataVersion.V4){return new cr(At.decode(r.data(),e),r.id(),r.isDelta())}function dA(r){return new qi(r.offset(),r.length())}function fA(r){return new zi(r.length(),r.nullCount())}function hA(r){let e=[];for(let t,i=-1,n=-1,s=r.nodesLength();++i<s;)(t=r.nodes(i))&&(e[++n]=zi.decode(t));return e}function pA(r,e){let t=[];for(let i,n=-1,s=-1,c=r.buffersLength();++n<c;)(i=r.buffers(n))&&(e<Ce.MetadataVersion.V4&&(i.bb_pos+=8*(n+1)),t[++s]=qi.decode(i));return t}function yA(r,e){let t=[];for(let i,n=-1,s=-1,c=r.fieldsLength();++n<c;)(i=r.fields(n))&&(t[++s]=Ze.Field.decode(i,e));return t}function ob(r,e){let t=[];for(let i,n=-1,s=-1,c=r.childrenLength();++n<c;)(i=r.children(n))&&(t[++s]=Ze.Field.decode(i,e));return t}function mA(r,e){let t,i,n,s,c,v;return!e||!(v=r.dictionary())?(n=ub(r,ob(r,e)),i=new Ze.Field(r.name(),n,r.nullable(),ya(r))):e.has(t=v.id().low)?(s=(s=v.indexType())?ab(s):new Oe.Int32,c=new Oe.Dictionary(e.get(t),s,t,v.isOrdered()),i=new Ze.Field(r.name(),c,r.nullable(),ya(r))):(s=(s=v.indexType())?ab(s):new Oe.Int32,e.set(t,n=ub(r,ob(r,e))),c=new Oe.Dictionary(n,s,t,v.isOrdered()),i=new Ze.Field(r.name(),c,r.nullable(),ya(r))),i||null}function ya(r){let e=new Map;if(r)for(let t,i,n=-1,s=r.customMetadataLength()|0;++n<s;)(t=r.customMetadata(n))&&(i=t.key())!=null&&e.set(i,t.value());return e}function ab(r){return new Oe.Int(r.isSigned(),r.bitWidth())}function ub(r,e){let t=r.typeType();switch(t){case W.Type.NONE:return new Oe.Null;case W.Type.Null:return new Oe.Null;case W.Type.Binary:return new Oe.Binary;case W.Type.Utf8:return new Oe.Utf8;case W.Type.Bool:return new Oe.Bool;case W.Type.List:return new Oe.List((e||[])[0]);case W.Type.Struct_:return new Oe.Struct(e||[])}switch(t){case W.Type.Int:{let i=r.type(new W.Int);return new Oe.Int(i.isSigned(),i.bitWidth())}case W.Type.FloatingPoint:{let i=r.type(new W.FloatingPoint);return new Oe.Float(i.precision())}case W.Type.Decimal:{let i=r.type(new W.Decimal);return new Oe.Decimal(i.scale(),i.precision())}case W.Type.Date:{let i=r.type(new W.Date);return new Oe.Date_(i.unit())}case W.Type.Time:{let i=r.type(new W.Time);return new Oe.Time(i.unit(),i.bitWidth())}case W.Type.Timestamp:{let i=r.type(new W.Timestamp);return new Oe.Timestamp(i.unit(),i.timezone())}case W.Type.Interval:{let i=r.type(new W.Interval);return new Oe.Interval(i.unit())}case W.Type.Union:{let i=r.type(new W.Union);return new Oe.Union(i.mode(),i.typeIdsArray()||[],e||[])}case W.Type.FixedSizeBinary:{let i=r.type(new W.FixedSizeBinary);return new Oe.FixedSizeBinary(i.byteWidth())}case W.Type.FixedSizeList:{let i=r.type(new W.FixedSizeList);return new Oe.FixedSizeList(i.listSize(),(e||[])[0])}case W.Type.Map:{let i=r.type(new W.Map);return new Oe.Map_((e||[])[0],i.keysSorted())}}throw new Error(`Unrecognized type: "${W.Type[t]}" (${t})`)}function _A(r,e){let t=e.fields.map(s=>Ze.Field.encode(r,s));W.Schema.startFieldsVector(r,t.length);let i=W.Schema.createFieldsVector(r,t),n=e.metadata&&e.metadata.size>0?W.Schema.createCustomMetadataVector(r,[...e.metadata].map(([s,c])=>{let v=r.createString(`${s}`),I=r.createString(`${c}`);return W.KeyValue.startKeyValue(r),W.KeyValue.addKey(r,v),W.KeyValue.addValue(r,I),W.KeyValue.endKeyValue(r)})):-1;return W.Schema.startSchema(r),W.Schema.addFields(r,i),W.Schema.addEndianness(r,BA?W.Endianness.Little:W.Endianness.Big),n!==-1&&W.Schema.addCustomMetadata(r,n),W.Schema.endSchema(r)}function bA(r,e){let t=-1,i=-1,n=-1,s=e.type,c=e.typeId;Oe.DataType.isDictionary(s)?(c=s.dictionary.typeId,n=Qc.instance.visit(s,r),i=Qc.instance.visit(s.dictionary,r)):i=Qc.instance.visit(s,r);let v=(s.children||[]).map(U=>Ze.Field.encode(r,U)),I=W.Field.createChildrenVector(r,v),S=e.metadata&&e.metadata.size>0?W.Field.createCustomMetadataVector(r,[...e.metadata].map(([U,G])=>{let _e=r.createString(`${U}`),fe=r.createString(`${G}`);return W.KeyValue.startKeyValue(r),W.KeyValue.addKey(r,_e),W.KeyValue.addValue(r,fe),W.KeyValue.endKeyValue(r)})):-1;return e.name&&(t=r.createString(e.name)),W.Field.startField(r),W.Field.addType(r,i),W.Field.addTypeType(r,c),W.Field.addChildren(r,I),W.Field.addNullable(r,!!e.nullable),t!==-1&&W.Field.addName(r,t),n!==-1&&W.Field.addDictionary(r,n),S!==-1&&W.Field.addCustomMetadata(r,S),W.Field.endField(r)}function gA(r,e){let t=e.nodes||[],i=e.buffers||[];Fe.RecordBatch.startNodesVector(r,t.length),t.slice().reverse().forEach(c=>zi.encode(r,c));let n=r.endVector();Fe.RecordBatch.startBuffersVector(r,i.length),i.slice().reverse().forEach(c=>qi.encode(r,c));let s=r.endVector();return Fe.RecordBatch.startRecordBatch(r),Fe.RecordBatch.addLength(r,new Li(e.length,0)),Fe.RecordBatch.addNodes(r,n),Fe.RecordBatch.addBuffers(r,s),Fe.RecordBatch.endRecordBatch(r)}function vA(r,e){let t=At.encode(r,e.data);return Fe.DictionaryBatch.startDictionaryBatch(r),Fe.DictionaryBatch.addId(r,new Li(e.id,0)),Fe.DictionaryBatch.addIsDelta(r,e.isDelta),Fe.DictionaryBatch.addData(r,t),Fe.DictionaryBatch.endDictionaryBatch(r)}function jA(r,e){return Fe.FieldNode.createFieldNode(r,new Li(e.length,0),new Li(e.nullCount,0))}function wA(r,e){return W.Buffer.createBuffer(r,new Li(e.offset,0),new Li(e.length,0))}var BA=function(){let r=new ArrayBuffer(2);return new DataView(r).setInt16(0,256,!0),new Int16Array(r)[0]===256}()});var _a=V(pe=>{"use strict";Object.defineProperty(pe,"__esModule",{value:!0});pe.magicX2AndPadding=pe.magicAndPadding=pe.magicLength=pe.checkForMagicArrowString=pe.MAGIC=pe.MAGIC_STR=pe.PADDING=pe.JSONMessageReader=pe.AsyncMessageReader=pe.MessageReader=void 0;var li=Te(),TA=gr(),cb=TA.flatbuffers.ByteBuffer,vs=Ei(),IA=st(),SA=qc(),lb=Ye(),ma=ni(),Ht=rn(),el=r=>`Expected ${li.MessageHeader[r]} Message in stream, but was null or length 0.`,tl=r=>`Header pointer of flatbuffer-encoded ${li.MessageHeader[r]} Message is null or length 0.`,db=(r,e)=>`Expected to read ${r} metadata bytes, but only read ${e}.`,fb=(r,e)=>`Expected to read ${r} bytes for message body, but only read ${e}.`,rl=class{constructor(e){this.source=e instanceof ma.ByteStream?e:new ma.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?Ht.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(el(e));return t.value}readMessageBody(e){if(e<=0)return new Uint8Array(0);let t=lb.toUint8Array(this.source.read(e));if(t.byteLength<e)throw new Error(fb(e,t.byteLength));return t.byteOffset%8==0&&t.byteOffset+t.byteLength<=t.buffer.byteLength?t:t.slice()}readSchema(e=!1){let t=li.MessageHeader.Schema,i=this.readMessage(t),n=i&&i.header();if(e&&!n)throw new Error(tl(t));return n}readMetadataLength(){let e=this.source.read(pe.PADDING),t=e&&new cb(e),i=t&&t.readInt32(0)||0;return{done:i===0,value:i}}readMetadata(e){let t=this.source.read(e);if(!t)return Ht.ITERATOR_DONE;if(t.byteLength<e)throw new Error(db(e,t.byteLength));return{done:!1,value:vs.Message.decode(t)}}};pe.MessageReader=rl;var hb=class{constructor(e,t){this.source=e instanceof ma.AsyncByteStream?e:IA.isFileHandle(e)?new SA.AsyncRandomAccessFile(e,t):new ma.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?Ht.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(el(e));return t.value}async readMessageBody(e){if(e<=0)return new Uint8Array(0);let t=lb.toUint8Array(await this.source.read(e));if(t.byteLength<e)throw new Error(fb(e,t.byteLength));return t.byteOffset%8==0&&t.byteOffset+t.byteLength<=t.buffer.byteLength?t:t.slice()}async readSchema(e=!1){let t=li.MessageHeader.Schema,i=await this.readMessage(t),n=i&&i.header();if(e&&!n)throw new Error(tl(t));return n}async readMetadataLength(){let e=await this.source.read(pe.PADDING),t=e&&new cb(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 Ht.ITERATOR_DONE;if(t.byteLength<e)throw new Error(db(e,t.byteLength));return{done:!1,value:vs.Message.decode(t)}}};pe.AsyncMessageReader=hb;var pb=class extends rl{constructor(e){super(new Uint8Array(0));this._schema=!1,this._body=[],this._batchIndex=0,this._dictionaryIndex=0,this._json=e instanceof Ht.ArrowJSON?e:new Ht.ArrowJSON(e)}next(){let{_json:e}=this;if(!this._schema){this._schema=!0;let t=vs.Message.fromJSON(e.schema,li.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=vs.Message.fromJSON(t,li.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=vs.Message.fromJSON(t,li.MessageHeader.RecordBatch);return{done:!1,value:i}}return this._body=[],Ht.ITERATOR_DONE}readMessageBody(e){return t(this._body);function t(i){return(i||[]).reduce((n,s)=>[...n,...s.VALIDITY&&[s.VALIDITY]||[],...s.TYPE&&[s.TYPE]||[],...s.OFFSET&&[s.OFFSET]||[],...s.DATA&&[s.DATA]||[],...t(s.children)],[])}}readMessage(e){let t;if((t=this.next()).done)return null;if(e!=null&&t.value.headerType!==e)throw new Error(el(e));return t.value}readSchema(){let e=li.MessageHeader.Schema,t=this.readMessage(e),i=t&&t.header();if(!t||!i)throw new Error(tl(e));return i}};pe.JSONMessageReader=pb;pe.PADDING=4;pe.MAGIC_STR="ARROW1";pe.MAGIC=new Uint8Array(pe.MAGIC_STR.length);for(let r=0;r<pe.MAGIC_STR.length;r+=1|0)pe.MAGIC[r]=pe.MAGIC_STR.charCodeAt(r);function DA(r,e=0){for(let t=-1,i=pe.MAGIC.length;++t<i;)if(pe.MAGIC[t]!==r[e+t])return!1;return!0}pe.checkForMagicArrowString=DA;pe.magicLength=pe.MAGIC.length;pe.magicAndPadding=pe.magicLength+pe.PADDING;pe.magicX2AndPadding=pe.magicLength*2+pe.PADDING});var ol=V(Pe=>{"use strict";Object.defineProperty(Pe,"__esModule",{value:!0});Pe.compareTypes=Pe.compareFields=Pe.compareSchemas=Pe.instance=Pe.TypeComparator=void 0;var OA=tt(),J=class extends OA.Visitor{compareSchemas(e,t){return e===t||t instanceof e.constructor&&this.compareManyFields(e.fields,t.fields)}compareManyFields(e,t){return e===t||Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&e.every((i,n)=>this.compareFields(i,t[n]))}compareFields(e,t){return e===t||t instanceof e.constructor&&e.name===t.name&&e.nullable===t.nullable&&this.visit(e.type,t.type)}};Pe.TypeComparator=J;function ft(r,e){return e instanceof r.constructor}function js(r,e){return r===e||ft(r,e)}function Ar(r,e){return r===e||ft(r,e)&&r.bitWidth===e.bitWidth&&r.isSigned===e.isSigned}function ba(r,e){return r===e||ft(r,e)&&r.precision===e.precision}function AA(r,e){return r===e||ft(r,e)&&r.byteWidth===e.byteWidth}function il(r,e){return r===e||ft(r,e)&&r.unit===e.unit}function ws(r,e){return r===e||ft(r,e)&&r.unit===e.unit&&r.timezone===e.timezone}function Bs(r,e){return r===e||ft(r,e)&&r.unit===e.unit&&r.bitWidth===e.bitWidth}function FA(r,e){return r===e||ft(r,e)&&r.children.length===e.children.length&&Pe.instance.compareManyFields(r.children,e.children)}function MA(r,e){return r===e||ft(r,e)&&r.children.length===e.children.length&&Pe.instance.compareManyFields(r.children,e.children)}function nl(r,e){return r===e||ft(r,e)&&r.mode===e.mode&&r.typeIds.every((t,i)=>t===e.typeIds[i])&&Pe.instance.compareManyFields(r.children,e.children)}function VA(r,e){return r===e||ft(r,e)&&r.id===e.id&&r.isOrdered===e.isOrdered&&Pe.instance.visit(r.indices,e.indices)&&Pe.instance.visit(r.dictionary,e.dictionary)}function sl(r,e){return r===e||ft(r,e)&&r.unit===e.unit}function UA(r,e){return r===e||ft(r,e)&&r.listSize===e.listSize&&r.children.length===e.children.length&&Pe.instance.compareManyFields(r.children,e.children)}function CA(r,e){return r===e||ft(r,e)&&r.keysSorted===e.keysSorted&&r.children.length===e.children.length&&Pe.instance.compareManyFields(r.children,e.children)}J.prototype.visitNull=js;J.prototype.visitBool=js;J.prototype.visitInt=Ar;J.prototype.visitInt8=Ar;J.prototype.visitInt16=Ar;J.prototype.visitInt32=Ar;J.prototype.visitInt64=Ar;J.prototype.visitUint8=Ar;J.prototype.visitUint16=Ar;J.prototype.visitUint32=Ar;J.prototype.visitUint64=Ar;J.prototype.visitFloat=ba;J.prototype.visitFloat16=ba;J.prototype.visitFloat32=ba;J.prototype.visitFloat64=ba;J.prototype.visitUtf8=js;J.prototype.visitBinary=js;J.prototype.visitFixedSizeBinary=AA;J.prototype.visitDate=il;J.prototype.visitDateDay=il;J.prototype.visitDateMillisecond=il;J.prototype.visitTimestamp=ws;J.prototype.visitTimestampSecond=ws;J.prototype.visitTimestampMillisecond=ws;J.prototype.visitTimestampMicrosecond=ws;J.prototype.visitTimestampNanosecond=ws;J.prototype.visitTime=Bs;J.prototype.visitTimeSecond=Bs;J.prototype.visitTimeMillisecond=Bs;J.prototype.visitTimeMicrosecond=Bs;J.prototype.visitTimeNanosecond=Bs;J.prototype.visitDecimal=js;J.prototype.visitList=FA;J.prototype.visitStruct=MA;J.prototype.visitUnion=nl;J.prototype.visitDenseUnion=nl;J.prototype.visitSparseUnion=nl;J.prototype.visitDictionary=VA;J.prototype.visitInterval=sl;J.prototype.visitIntervalDayTime=sl;J.prototype.visitIntervalYearMonth=sl;J.prototype.visitFixedSizeList=UA;J.prototype.visitMap=CA;Pe.instance=new J;function PA(r,e){return Pe.instance.compareSchemas(r,e)}Pe.compareSchemas=PA;function kA(r,e){return Pe.instance.compareFields(r,e)}Pe.compareFields=kA;function RA(r,e){return Pe.instance.visit(r,e)}Pe.compareTypes=RA});var gb=V(ga=>{"use strict";Object.defineProperty(ga,"__esModule",{value:!0});ga.VectorAssembler=void 0;var xA=tt(),yb=Te(),NA=Fr(),al=Ye(),ul=tr(),EA=On(),mb=Ei(),_b=be(),qe=class extends xA.Visitor{constructor(){super();this._byteLength=0,this._nodes=[],this._buffers=[],this._bufferRegions=[]}static assemble(...e){let t=new qe,i=EA.selectVectorChildrenArgs(NA.RecordBatch,e),[n=t]=t.visitMany(i);return n}visit(e){if(!_b.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");_b.DataType.isNull(e.type)||Yt.call(this,n<=0?new Uint8Array(0):ul.truncateBitmap(t.offset,i,t.nullBitmap)),this.nodes.push(new mb.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=qe;function Yt(r){let e=r.byteLength+7&~7;return this.buffers.push(r),this.bufferRegions.push(new mb.BufferRegion(this._byteLength,e)),this._byteLength+=e,this}function LA(r){let{type:e,length:t,typeIds:i,valueOffsets:n}=r;if(Yt.call(this,i),e.mode===yb.UnionMode.Sparse)return ll.call(this,r);if(e.mode===yb.UnionMode.Dense){if(r.offset<=0)return Yt.call(this,n),ll.call(this,r);{let s=i.reduce((U,G)=>Math.max(U,G),i[0]),c=new Int32Array(s+1),v=new Int32Array(s+1).fill(-1),I=new Int32Array(t),S=al.rebaseValueOffsets(-n[0],t,n);for(let U,G,_e=-1;++_e<t;)(G=v[U=i[_e]])===-1&&(G=v[U]=S[U]),I[_e]=S[_e]-G,++c[U];Yt.call(this,I);for(let U,G=-1,_e=e.children.length;++G<_e;)if(U=r.getChildAt(G)){let fe=e.typeIds[G],$t=Math.min(t,c[fe]);this.visit(U.slice(v[fe],$t))}}}return this}function qA(r){let e;return r.nullCount>=r.length?Yt.call(this,new Uint8Array(0)):(e=r.values)instanceof Uint8Array?Yt.call(this,ul.truncateBitmap(r.offset,r.length,e)):Yt.call(this,ul.packBools(r))}function di(r){return Yt.call(this,r.values.subarray(0,r.length*r.stride))}function bb(r){let{length:e,values:t,valueOffsets:i}=r,n=i[0],s=i[e],c=Math.min(s-n,t.byteLength-n);return Yt.call(this,al.rebaseValueOffsets(-i[0],e,i)),Yt.call(this,t.subarray(n,n+c)),this}function cl(r){let{length:e,valueOffsets:t}=r;return t&&Yt.call(this,al.rebaseValueOffsets(t[0],e,t)),this.visit(r.getChildAt(0))}function ll(r){return this.visitMany(r.type.children.map((e,t)=>r.getChildAt(t)).filter(Boolean))[0]}qe.prototype.visitBool=qA;qe.prototype.visitInt=di;qe.prototype.visitFloat=di;qe.prototype.visitUtf8=bb;qe.prototype.visitBinary=bb;qe.prototype.visitFixedSizeBinary=di;qe.prototype.visitDate=di;qe.prototype.visitTimestamp=di;qe.prototype.visitTime=di;qe.prototype.visitDecimal=di;qe.prototype.visitList=cl;qe.prototype.visitStruct=ll;qe.prototype.visitUnion=LA;qe.prototype.visitInterval=di;qe.prototype.visitFixedSizeList=cl;qe.prototype.visitMap=cl});var jb=V(va=>{"use strict";Object.defineProperty(va,"__esModule",{value:!0});va.JSONTypeAssembler=void 0;var zA=tt(),it=Yr(),Un=Te(),vb=class extends zA.Visitor{visit(e){return e==null?void 0:super.visit(e)}visitNull({typeId:e}){return{name:it.Type[e].toLowerCase()}}visitInt({typeId:e,bitWidth:t,isSigned:i}){return{name:it.Type[e].toLowerCase(),bitWidth:t,isSigned:i}}visitFloat({typeId:e,precision:t}){return{name:it.Type[e].toLowerCase(),precision:Un.Precision[t]}}visitBinary({typeId:e}){return{name:it.Type[e].toLowerCase()}}visitBool({typeId:e}){return{name:it.Type[e].toLowerCase()}}visitUtf8({typeId:e}){return{name:it.Type[e].toLowerCase()}}visitDecimal({typeId:e,scale:t,precision:i}){return{name:it.Type[e].toLowerCase(),scale:t,precision:i}}visitDate({typeId:e,unit:t}){return{name:it.Type[e].toLowerCase(),unit:Un.DateUnit[t]}}visitTime({typeId:e,unit:t,bitWidth:i}){return{name:it.Type[e].toLowerCase(),unit:Un.TimeUnit[t],bitWidth:i}}visitTimestamp({typeId:e,timezone:t,unit:i}){return{name:it.Type[e].toLowerCase(),unit:Un.TimeUnit[i],timezone:t}}visitInterval({typeId:e,unit:t}){return{name:it.Type[e].toLowerCase(),unit:Un.IntervalUnit[t]}}visitList({typeId:e}){return{name:it.Type[e].toLowerCase()}}visitStruct({typeId:e}){return{name:it.Type[e].toLowerCase()}}visitUnion({typeId:e,mode:t,typeIds:i}){return{name:it.Type[e].toLowerCase(),mode:Un.UnionMode[t],typeIds:[...i]}}visitDictionary(e){return this.visit(e.dictionary)}visitFixedSizeBinary({typeId:e,byteWidth:t}){return{name:it.Type[e].toLowerCase(),byteWidth:t}}visitFixedSizeList({typeId:e,listSize:t}){return{name:it.Type[e].toLowerCase(),listSize:t}}visitMap({typeId:e,keysSorted:t}){return{name:it.Type[e].toLowerCase(),keysSorted:t}}};va.JSONTypeAssembler=vb});var Tb=V(Ba=>{"use strict";Object.defineProperty(Ba,"__esModule",{value:!0});Ba.JSONVectorAssembler=void 0;var WA=ls(),Ts=An(),HA=Re(),YA=tt(),$A=Te(),GA=Fr(),dl=Te(),ja=tr(),JA=On(),wb=be(),wa=class extends YA.Visitor{static assemble(...e){return new wa().visitMany(JA.selectColumnChildrenArgs(GA.RecordBatch,e))}visit(e){let{data:t,name:i,length:n}=e,{offset:s,nullCount:c,nullBitmap:v}=t,I=wb.DataType.isDictionary(e.type)?e.type.indices:e.type,S=Object.assign([],t.buffers,{[$A.BufferType.VALIDITY]:void 0});return{name:i,count:n,VALIDITY:wb.DataType.isNull(I)?void 0:c<=0?Array.from({length:n},()=>1):[...new ja.BitIterator(v,s,n,null,ja.getBit)],...super.visit(HA.Vector.new(t.clone(I,s,n,0,S)))}}visitNull(){return{}}visitBool({values:e,offset:t,length:i}){return{DATA:[...new ja.BitIterator(e,t,i,null,ja.getBool)]}}visitInt(e){return{DATA:e.type.bitWidth<64?[...e.values]:[...Is(e.values,2)]}}visitFloat(e){return{DATA:[...e.values]}}visitUtf8(e){return{DATA:[...e],OFFSET:[...e.valueOffsets]}}visitBinary(e){return{DATA:[...Bb(e)],OFFSET:[...e.valueOffsets]}}visitFixedSizeBinary(e){return{DATA:[...Bb(e)]}}visitDate(e){return{DATA:e.type.unit===dl.DateUnit.DAY?[...e.values]:[...Is(e.values,2)]}}visitTimestamp(e){return{DATA:[...Is(e.values,2)]}}visitTime(e){return{DATA:e.type.unit<dl.TimeUnit.MICROSECOND?[...e.values]:[...Is(e.values,2)]}}visitDecimal(e){return{DATA:[...Is(e.values,4)]}}visitList(e){return{OFFSET:[...e.valueOffsets],children:e.type.children.map((t,i)=>this.visit(new Ts.Column(t,[e.getChildAt(i)])))}}visitStruct(e){return{children:e.type.children.map((t,i)=>this.visit(new Ts.Column(t,[e.getChildAt(i)])))}}visitUnion(e){return{TYPE:[...e.typeIds],OFFSET:e.type.mode===dl.UnionMode.Dense?[...e.valueOffsets]:void 0,children:e.type.children.map((t,i)=>this.visit(new Ts.Column(t,[e.getChildAt(i)])))}}visitInterval(e){return{DATA:[...e.values]}}visitFixedSizeList(e){return{children:e.type.children.map((t,i)=>this.visit(new Ts.Column(t,[e.getChildAt(i)])))}}visitMap(e){return{OFFSET:[...e.valueOffsets],children:e.type.children.map((t,i)=>this.visit(new Ts.Column(t,[e.getChildAt(i)])))}}};Ba.JSONVectorAssembler=wa;function*Bb(r){for(let e of r)yield e.reduce((t,i)=>`${t}${("0"+(i&255).toString(16)).slice(-2)}`,"").toUpperCase()}function*Is(r,e){for(let t=-1,i=r.length/e;++t<i;)yield`${WA.BN.new(r.subarray((t+0)*e,(t+1)*e),!1)}`}});var Oa=V(dr=>{"use strict";Object.defineProperty(dr,"__esModule",{value:!0});dr.RecordBatchJSONWriter=dr.RecordBatchFileWriter=dr.RecordBatchStreamWriter=dr.RecordBatchWriter=void 0;var fl=Ds(),KA=_a(),ZA=An(),XA=be(),QA=Ke(),Ta=Ei(),hl=Ei(),Cn=Nc(),pl=Te(),Ib=ol(),yl=ni(),Sb=gb(),eF=jb(),Db=Tb(),tF=Ye(),ml=Fr(),rF=rn(),lr=st(),Ss=class extends rF.ReadableInterop{constructor(e){super();this._position=0,this._started=!1,this._sink=new yl.AsyncByteQueue,this._schema=null,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._dictionaryDeltaOffsets=new Map,lr.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 lr.isPromise(e)?e.then(t=>this.writeAll(t)):lr.isAsyncIterable(e)?bl(this,e):_l(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 yl.AsyncByteQueue?this._sink=e:(this._sink=new yl.AsyncByteQueue,e&&lr.isWritableDOMStream(e)?this.toDOMStream({type:"bytes"}).pipeTo(e):e&&lr.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||!Ib.compareSchemas(t,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 fl.Table&&!(t=e.schema))return this.finish()&&void 0;if(e instanceof ml.RecordBatch&&!(t=e.schema))return this.finish()&&void 0}else throw new Error("RecordBatchWriter is closed");if(t&&!Ib.compareSchemas(t,this._schema)){if(this._started&&this._autoDestroy)return this.close();this.reset(this._sink,t)}e instanceof ml.RecordBatch?e instanceof ml._InternalEmptyPlaceholderRecordBatch||this._writeRecordBatch(e):e instanceof fl.Table?this.writeAll(e.chunks):lr.isIterable(e)&&this.writeAll(e)}_writeMessage(e,t=8){let i=t-1,n=Ta.Message.encode(e),s=n.byteLength,c=this._writeLegacyIpcFormat?4:8,v=s+c+i&~i,I=v-s-c;return e.headerType===pl.MessageHeader.RecordBatch?this._recordBatchBlocks.push(new Cn.FileBlock(v,e.bodyLength,this._position)):e.headerType===pl.MessageHeader.DictionaryBatch&&this._dictionaryBlocks.push(new Cn.FileBlock(v,e.bodyLength,this._position)),this._writeLegacyIpcFormat||this._write(Int32Array.of(-1)),this._write(Int32Array.of(v-c)),s>0&&this._write(n),this._writePadding(I)}_write(e){if(this._started){let t=tF.toUint8Array(e);t&&t.byteLength>0&&(this._sink.write(t),this._position+=t.byteLength)}return this}_writeSchema(e){return this._writeMessage(Ta.Message.from(e))}_writeFooter(e){return this._writeLegacyIpcFormat?this._write(Int32Array.of(0)):this._write(Int32Array.of(-1,0))}_writeMagic(){return this._write(KA.MAGIC)}_writePadding(e){return e>0?this._write(new Uint8Array(e)):this}_writeRecordBatch(e){let{byteLength:t,nodes:i,bufferRegions:n,buffers:s}=Sb.VectorAssembler.assemble(e),c=new hl.RecordBatch(e.length,i,n),v=Ta.Message.from(c,t);return this._writeDictionaries(e)._writeMessage(v)._writeBodyBuffers(s)}_writeDictionaryBatch(e,t,i=!1){this._dictionaryDeltaOffsets.set(t,e.length+(this._dictionaryDeltaOffsets.get(t)||0));let{byteLength:n,nodes:s,bufferRegions:c,buffers:v}=Sb.VectorAssembler.assemble(e),I=new hl.RecordBatch(e.length,s,c),S=new hl.DictionaryBatch(I,t,i),U=Ta.Message.from(S,n);return this._writeMessage(U)._writeBodyBuffers(v)}_writeBodyBuffers(e){let t,i,n;for(let s=-1,c=e.length;++s<c;)(t=e[s])&&(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 s="chunks"in i?i.chunks:[i];for(let c of s)this._writeDictionaryBatch(c,t,n>0),n+=c.length}}return this}};dr.RecordBatchWriter=Ss;var Ia=class extends Ss{static writeAll(e,t){let i=new Ia(t);return lr.isPromise(e)?e.then(n=>i.writeAll(n)):lr.isAsyncIterable(e)?bl(i,e):_l(i,e)}};dr.RecordBatchStreamWriter=Ia;var Sa=class extends Ss{static writeAll(e){let t=new Sa;return lr.isPromise(e)?e.then(i=>t.writeAll(i)):lr.isAsyncIterable(e)?bl(t,e):_l(t,e)}constructor(){super();this._autoDestroy=!0}_writeSchema(e){return this._writeMagic()._writePadding(2)}_writeFooter(e){let t=Cn.Footer.encode(new Cn.Footer(e,pl.MetadataVersion.V4,this._recordBatchBlocks,this._dictionaryBlocks));return super._writeFooter(e)._write(t)._write(Int32Array.of(t.byteLength))._writeMagic()}};dr.RecordBatchFileWriter=Sa;var Da=class extends Ss{constructor(){super();this._autoDestroy=!0,this._recordBatches=[],this._dictionaries=[]}static writeAll(e){return new Da().writeAll(e)}_writeMessage(){return this}_writeFooter(e){return this}_writeSchema(e){return this._write(`{
|
|
8
8
|
"schema": ${JSON.stringify({fields:e.fields.map(Ob)},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
9
|
`),this._write(`${iF(e,t,i)}`),this._dictionaryBlocks.push(new Cn.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
10
|
"dictionaries": [
|
|
@@ -14,6 +14,6 @@ return true;`)}Fo.createIsValidFunction=m1;function _1(r){return typeof r!="bigi
|
|
|
14
14
|
`:`,
|
|
15
15
|
`),this._write(`${nF(this._recordBatches[e])}`),this._recordBatchBlocks.push(new Cn.FileBlock(0,0,0));this._write(`
|
|
16
16
|
]`)}return this._schema&&this._write(`
|
|
17
|
-
}`),this._dictionaries=[],this._recordBatches=[],super.close()}};dr.RecordBatchJSONWriter=Ia;function yl(r,e){let t=e;e instanceof ll.Table&&(t=e.chunks,r.reset(void 0,e.schema));for(let i of t)r.write(i);return r.finish()}async function ml(r,e){for await(let t of e)r.write(t);return r.finish()}function Ob({name:r,type:e,nullable:t}){let i=new eF.JSONTypeAssembler;return{name:r,nullable:t,type:i.visit(e),children:(e.children||[]).map(Ob),dictionary:XA.DataType.isDictionary(e)?{id:e.id,isOrdered:e.isOrdered,indexType:i.visit(e.indices)}:void 0}}function iF(r,e,t=!1){let i=new QA.Field(`${e}`,r.type,r.nullCount>0),n=Db.JSONVectorAssembler.assemble(new ZA.Column(i,[r]));return JSON.stringify({id:e,isDelta:t,data:{count:r.length,columns:n}},null,2)}function nF(r){return JSON.stringify({count:r.length,columns:Db.JSONVectorAssembler.assemble(r)},null,2)}});var gl=V(hi=>{"use strict";Object.defineProperty(hi,"__esModule",{value:!0});hi.distributeVectorsIntoRecordBatches=hi.distributeColumnsIntoRecordBatches=hi.ensureSameLengthData=void 0;var Ab=qt(),_l=Ke(),sF=ci(),oF=Fr(),bl=new Uint8Array(0),Fb=r=>[bl,bl,new Uint8Array(r),bl];function aF(r,e,t=e.reduce((i,n)=>Math.max(i,n.length),0)){let i,n,s=-1,c=e.length,v=[...r.fields],I=[],S=(t+63&~63)>>3;for(;++s<c;)(i=e[s])&&i.length===t?I[s]=i:((n=v[s]).nullable||(v[s]=v[s].clone({nullable:!0})),I[s]=i?i._changeLengthAndBackfillNullBitmap(t):Ab.Data.new(n.type,0,t,t,Fb(S)));return[new _l.Schema(v),t,I]}hi.ensureSameLengthData=aF;function uF(r){return Mb(new _l.Schema(r.map(({field:e})=>e)),r)}hi.distributeColumnsIntoRecordBatches=uF;function Mb(r,e){return cF(r,e.map(t=>t instanceof sF.Chunked?t.chunks.map(i=>i.data):[t.data]))}hi.distributeVectorsIntoRecordBatches=Mb;function cF(r,e){let t=[...r.fields],i=[],n={numBatches:e.reduce((G,me)=>Math.max(G,me.length),0)},s=0,c=0,v=-1,I=e.length,S,U=[];for(;n.numBatches-- >0;){for(c=Number.POSITIVE_INFINITY,v=-1;++v<I;)U[v]=S=e[v].shift(),c=Math.min(c,S?S.length:c);isFinite(c)&&(U=lF(t,c,U,e,n),c>0&&(i[s++]=[c,U.slice()]))}return[r=new _l.Schema(t,r.metadata),i.map(G=>new oF.RecordBatch(r,...G))]}function lF(r,e,t,i,n){let s,c,v=0,I=-1,S=i.length,U=(e+63&~63)>>3;for(;++I<S;)(s=t[I])&&(v=s.length)>=e?v===e?t[I]=s:(t[I]=s.slice(0,e),s=s.slice(e,v-e),n.numBatches=Math.max(n.numBatches,i[I].unshift(s))):((c=r[I]).nullable||(r[I]=c.clone({nullable:!0})),t[I]=s?s._changeLengthAndBackfillNullBitmap(e):Ab.Data.new(c.type,0,e,e,Fb(U)));return t}});var xe=V(Da=>{"use strict";Object.defineProperty(Da,"__esModule",{value:!0});Da.BaseVector=void 0;var dF=Te(),fF=ci(),hF=bs(),vl=Re(),jl=class extends vl.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`${dF.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 vl.Vector.new(e,t)}concat(...e){return fF.Chunked.concat(this,...e)}slice(e,t){return hF.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]=vl.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){}};Da.BaseVector=jl;jl.prototype[Symbol.isConcatSpreadable]=!0});var wl=V(Oa=>{"use strict";Object.defineProperty(Oa,"__esModule",{value:!0});Oa.BinaryVector=void 0;var pF=Re(),yF=xe(),mF=be(),Vb=class extends yF.BaseVector{asUtf8(){return pF.Vector.new(this.data.clone(new mF.Utf8))}};Oa.BinaryVector=Vb});var Bl=V(Aa=>{"use strict";Object.defineProperty(Aa,"__esModule",{value:!0});Aa.BoolVector=void 0;var _F=be(),bF=xe(),gF=fr(),Ub=class extends bF.BaseVector{static from(e){return gF.vectorFromValuesWithType(()=>new _F.Bool,e)}};Aa.BoolVector=Ub});var Il=V(pi=>{"use strict";Object.defineProperty(pi,"__esModule",{value:!0});pi.DateMillisecondVector=pi.DateDayVector=pi.DateVector=void 0;var vF=Te(),jF=xe(),Cb=fr(),Tl=be(),Fa=class extends jF.BaseVector{static from(...e){return e.length===2?Cb.vectorFromValuesWithType(()=>e[1]===vF.DateUnit.DAY?new Tl.DateDay:new Tl.DateMillisecond,e[0]):Cb.vectorFromValuesWithType(()=>new Tl.DateMillisecond,e[0])}};pi.DateVector=Fa;var Pb=class extends Fa{};pi.DateDayVector=Pb;var kb=class extends Fa{};pi.DateMillisecondVector=kb});var Sl=V(Ma=>{"use strict";Object.defineProperty(Ma,"__esModule",{value:!0});Ma.DecimalVector=void 0;var wF=xe(),Rb=class extends wF.BaseVector{};Ma.DecimalVector=Rb});var Ua=V(Va=>{"use strict";Object.defineProperty(Va,"__esModule",{value:!0});Va.DictionaryVector=void 0;var BF=qt(),Nb=Re(),TF=xe(),IF=fr(),SF=be(),Dl=class extends TF.BaseVector{constructor(e){super(e);this.indices=Nb.Vector.new(e.clone(this.type.indices))}static from(...e){if(e.length===3){let[t,i,n]=e,s=new SF.Dictionary(t.type,i,null,null);return Nb.Vector.new(BF.Data.Dictionary(s,0,n.length,0,null,n,t))}return IF.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)}};Va.DictionaryVector=Dl;Dl.prototype.indices=null});var Ol=V(Ca=>{"use strict";Object.defineProperty(Ca,"__esModule",{value:!0});Ca.FixedSizeBinaryVector=void 0;var DF=xe(),xb=class extends DF.BaseVector{};Ca.FixedSizeBinaryVector=xb});var Al=V(Pa=>{"use strict";Object.defineProperty(Pa,"__esModule",{value:!0});Pa.FixedSizeListVector=void 0;var OF=xe(),Eb=class extends OF.BaseVector{};Pa.FixedSizeListVector=Eb});var Ul=V(hr=>{"use strict";Object.defineProperty(hr,"__esModule",{value:!0});hr.Float64Vector=hr.Float32Vector=hr.Float16Vector=hr.FloatVector=void 0;var AF=qt(),FF=Re(),MF=xe(),VF=fr(),Wi=be(),Os=class extends MF.BaseVector{static from(e){let t=PF(this);if(e instanceof ArrayBuffer||ArrayBuffer.isView(e)){let i=CF(e.constructor)||t;if(t===null&&(t=i),t&&t===i){let n=new t,s=e.byteLength/n.ArrayType.BYTES_PER_ELEMENT;if(!UF(t,e.constructor))return FF.Vector.new(AF.Data.Float(n,0,s,0,null,e))}}if(t)return VF.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")}};hr.FloatVector=Os;var Fl=class extends Os{toFloat32Array(){return new Float32Array(this)}toFloat64Array(){return new Float64Array(this)}};hr.Float16Vector=Fl;var Ml=class extends Os{};hr.Float32Vector=Ml;var Vl=class extends Os{};hr.Float64Vector=Vl;var UF=(r,e)=>r===Wi.Float16&&e!==Uint16Array,CF=r=>{switch(r){case Uint16Array:return Wi.Float16;case Float32Array:return Wi.Float32;case Float64Array:return Wi.Float64;default:return null}},PF=r=>{switch(r){case Fl:return Wi.Float16;case Ml:return Wi.Float32;case Vl:return Wi.Float64;default:return null}}});var Cl=V(yi=>{"use strict";Object.defineProperty(yi,"__esModule",{value:!0});yi.IntervalYearMonthVector=yi.IntervalDayTimeVector=yi.IntervalVector=void 0;var kF=xe(),ka=class extends kF.BaseVector{};yi.IntervalVector=ka;var Lb=class extends ka{};yi.IntervalDayTimeVector=Lb;var qb=class extends ka{};yi.IntervalYearMonthVector=qb});var Ra=V(ze=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});ze.Uint64Vector=ze.Uint32Vector=ze.Uint16Vector=ze.Uint8Vector=ze.Int64Vector=ze.Int32Vector=ze.Int16Vector=ze.Int8Vector=ze.IntVector=void 0;var RF=qt(),NF=Re(),xF=xe(),EF=fr(),zb=st(),Wb=Ye(),ke=be(),pr=class extends xF.BaseVector{static from(...e){let[t,i=!1]=e,n=zF(this,i);if(t instanceof ArrayBuffer||ArrayBuffer.isView(t)){let s=qF(t.constructor,i)||n;if(n===null&&(n=s),n&&n===s){let c=new n,v=t.byteLength/c.ArrayType.BYTES_PER_ELEMENT;return LF(n,t.constructor)&&(v*=.5),NF.Vector.new(RF.Data.Int(c,0,v,0,null,t))}}if(n)return EF.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")}};ze.IntVector=pr;var Pl=class extends pr{};ze.Int8Vector=Pl;var kl=class extends pr{};ze.Int16Vector=kl;var Rl=class extends pr{};ze.Int32Vector=Rl;var Nl=class extends pr{toBigInt64Array(){return Wb.toBigInt64Array(this.values)}get values64(){return this._values64||(this._values64=this.toBigInt64Array())}};ze.Int64Vector=Nl;var xl=class extends pr{};ze.Uint8Vector=xl;var El=class extends pr{};ze.Uint16Vector=El;var Ll=class extends pr{};ze.Uint32Vector=Ll;var ql=class extends pr{toBigUint64Array(){return Wb.toBigUint64Array(this.values)}get values64(){return this._values64||(this._values64=this.toBigUint64Array())}};ze.Uint64Vector=ql;var LF=(r,e)=>(r===ke.Int64||r===ke.Uint64)&&(e===Int32Array||e===Uint32Array),qF=(r,e)=>{switch(r){case Int8Array:return ke.Int8;case Int16Array:return ke.Int16;case Int32Array:return e?ke.Int64:ke.Int32;case zb.BigInt64Array:return ke.Int64;case Uint8Array:return ke.Uint8;case Uint16Array:return ke.Uint16;case Uint32Array:return e?ke.Uint64:ke.Uint32;case zb.BigUint64Array:return ke.Uint64;default:return null}},zF=(r,e)=>{switch(r){case Pl:return ke.Int8;case kl:return ke.Int16;case Rl:return e?ke.Int64:ke.Int32;case Nl:return ke.Int64;case xl:return ke.Uint8;case El:return ke.Uint16;case Ll:return e?ke.Uint64:ke.Uint32;case ql:return ke.Uint64;default:return null}}});var zl=V(Na=>{"use strict";Object.defineProperty(Na,"__esModule",{value:!0});Na.ListVector=void 0;var WF=xe(),Hb=class extends WF.BaseVector{};Na.ListVector=Hb});var Wl=V(xa=>{"use strict";Object.defineProperty(xa,"__esModule",{value:!0});xa.MapVector=void 0;var HF=ms(),YF=Re(),$F=xe(),GF=be(),Yb=class extends $F.BaseVector{asList(){let e=this.type.children[0];return YF.Vector.new(this.data.clone(new GF.List(e)))}bind(e){let t=this.getChildAt(0),{[e]:i,[e+1]:n}=this.valueOffsets;return new HF.MapRow(t.slice(i,n))}};xa.MapVector=Yb});var Hl=V(Ea=>{"use strict";Object.defineProperty(Ea,"__esModule",{value:!0});Ea.NullVector=void 0;var JF=xe(),$b=class extends JF.BaseVector{};Ea.NullVector=$b});var Yl=V(La=>{"use strict";Object.defineProperty(La,"__esModule",{value:!0});La.StructVector=void 0;var KF=ms(),ZF=xe(),XF=Symbol.for("rowIndex"),Gb=class extends ZF.BaseVector{bind(e){let t=this._row||(this._row=new KF.StructRow(this)),i=Object.create(t);return i[XF]=e,i}};La.StructVector=Gb});var $l=V(Mt=>{"use strict";Object.defineProperty(Mt,"__esModule",{value:!0});Mt.TimestampNanosecondVector=Mt.TimestampMicrosecondVector=Mt.TimestampMillisecondVector=Mt.TimestampSecondVector=Mt.TimestampVector=void 0;var QF=xe(),Pn=class extends QF.BaseVector{};Mt.TimestampVector=Pn;var Jb=class extends Pn{};Mt.TimestampSecondVector=Jb;var Kb=class extends Pn{};Mt.TimestampMillisecondVector=Kb;var Zb=class extends Pn{};Mt.TimestampMicrosecondVector=Zb;var Xb=class extends Pn{};Mt.TimestampNanosecondVector=Xb});var Gl=V(Vt=>{"use strict";Object.defineProperty(Vt,"__esModule",{value:!0});Vt.TimeNanosecondVector=Vt.TimeMicrosecondVector=Vt.TimeMillisecondVector=Vt.TimeSecondVector=Vt.TimeVector=void 0;var eM=xe(),kn=class extends eM.BaseVector{};Vt.TimeVector=kn;var Qb=class extends kn{};Vt.TimeSecondVector=Qb;var eg=class extends kn{};Vt.TimeMillisecondVector=eg;var tg=class extends kn{};Vt.TimeMicrosecondVector=tg;var rg=class extends kn{};Vt.TimeNanosecondVector=rg});var Jl=V(mi=>{"use strict";Object.defineProperty(mi,"__esModule",{value:!0});mi.SparseUnionVector=mi.DenseUnionVector=mi.UnionVector=void 0;var tM=xe(),qa=class extends tM.BaseVector{get typeIdToChildIndex(){return this.data.type.typeIdToChildIndex}};mi.UnionVector=qa;var ig=class extends qa{get valueOffsets(){return this.data.valueOffsets}};mi.DenseUnionVector=ig;var ng=class extends qa{};mi.SparseUnionVector=ng});var Kl=V(za=>{"use strict";Object.defineProperty(za,"__esModule",{value:!0});za.Utf8Vector=void 0;var rM=Re(),iM=xe(),sg=be(),nM=fr(),og=class extends iM.BaseVector{static from(e){return nM.vectorFromValuesWithType(()=>new sg.Utf8,e)}asBinary(){return rM.Vector.new(this.data.clone(new sg.Binary))}};za.Utf8Vector=og});var ag=V(_i=>{"use strict";Object.defineProperty(_i,"__esModule",{value:!0});_i.partial2=_i.partial1=_i.partial0=void 0;function sM(r){return function(){return r(this)}}_i.partial0=sM;function oM(r){return function(e){return r(this,e)}}_i.partial1=oM;function aM(r){return function(e,t){return r(this,e,t)}}_i.partial2=aM});var Ql=V(Rn=>{"use strict";Object.defineProperty(Rn,"__esModule",{value:!0});Rn.instance=Rn.GetVisitor=void 0;var Wa=ls(),uM=tt(),cM=Ti(),lM=os(),Ut=Te(),K=class extends uM.Visitor{};Rn.GetVisitor=K;var dM=(r,e)=>864e5*r[e],Zl=(r,e)=>4294967296*r[e+1]+(r[e]>>>0),fM=(r,e)=>4294967296*(r[e+1]/1e3)+(r[e]>>>0)/1e3,hM=(r,e)=>4294967296*(r[e+1]/1e6)+(r[e]>>>0)/1e6,ug=r=>new Date(r),pM=(r,e)=>ug(dM(r,e)),yM=(r,e)=>ug(Zl(r,e)),mM=(r,e)=>null,cg=(r,e,t)=>{let{[t]:i,[t+1]:n}=e;return i!=null&&n!=null?r.subarray(i,n):null},_M=({offset:r,values:e},t)=>{let i=r+t;return(e[i>>3]&1<<i%8)!=0},lg=({values:r},e)=>pM(r,e),dg=({values:r},e)=>yM(r,e*2),yr=({stride:r,values:e},t)=>e[r*t],fg=({stride:r,values:e},t)=>lM.uint16ToFloat64(e[r*t]),Xl=({stride:r,values:e,type:t},i)=>Wa.BN.new(e.subarray(r*i,r*(i+1)),t.isSigned),bM=({stride:r,values:e},t)=>e.subarray(r*t,r*(t+1)),gM=({values:r,valueOffsets:e},t)=>cg(r,e,t),vM=({values:r,valueOffsets:e},t)=>{let i=cg(r,e,t);return i!==null?cM.decodeUtf8(i):null},jM=(r,e)=>r.type.bitWidth<64?yr(r,e):Xl(r,e),wM=(r,e)=>r.type.precision!==Ut.Precision.HALF?yr(r,e):fg(r,e),BM=(r,e)=>r.type.unit===Ut.DateUnit.DAY?lg(r,e):dg(r,e),hg=({values:r},e)=>1e3*Zl(r,e*2),pg=({values:r},e)=>Zl(r,e*2),yg=({values:r},e)=>fM(r,e*2),mg=({values:r},e)=>hM(r,e*2),TM=(r,e)=>{switch(r.type.unit){case Ut.TimeUnit.SECOND:return hg(r,e);case Ut.TimeUnit.MILLISECOND:return pg(r,e);case Ut.TimeUnit.MICROSECOND:return yg(r,e);case Ut.TimeUnit.NANOSECOND:return mg(r,e)}},_g=({values:r,stride:e},t)=>r[e*t],bg=({values:r,stride:e},t)=>r[e*t],gg=({values:r},e)=>Wa.BN.signed(r.subarray(2*e,2*(e+1))),vg=({values:r},e)=>Wa.BN.signed(r.subarray(2*e,2*(e+1))),IM=(r,e)=>{switch(r.type.unit){case Ut.TimeUnit.SECOND:return _g(r,e);case Ut.TimeUnit.MILLISECOND:return bg(r,e);case Ut.TimeUnit.MICROSECOND:return gg(r,e);case Ut.TimeUnit.NANOSECOND:return vg(r,e)}},SM=({values:r},e)=>Wa.BN.decimal(r.subarray(4*e,4*(e+1))),DM=(r,e)=>{let t=r.getChildAt(0),{valueOffsets:i,stride:n}=r;return t.slice(i[e*n],i[e*n+1])},OM=(r,e)=>r.bind(e),AM=(r,e)=>r.bind(e),FM=(r,e)=>r.type.mode===Ut.UnionMode.Dense?jg(r,e):wg(r,e),jg=(r,e)=>{let t=r.typeIdToChildIndex[r.typeIds[e]],i=r.getChildAt(t);return i?i.get(r.valueOffsets[e]):null},wg=(r,e)=>{let t=r.typeIdToChildIndex[r.typeIds[e]],i=r.getChildAt(t);return i?i.get(e):null},MM=(r,e)=>r.getValue(r.getKey(e)),VM=(r,e)=>r.type.unit===Ut.IntervalUnit.DAY_TIME?Bg(r,e):Tg(r,e),Bg=({values:r},e)=>r.subarray(2*e,2*(e+1)),Tg=({values:r},e)=>{let t=r[e],i=new Int32Array(2);return i[0]=t/12|0,i[1]=t%12|0,i},UM=(r,e)=>{let t=r.getChildAt(0),{stride:i}=r;return t.slice(e*i,(e+1)*i)};K.prototype.visitNull=mM;K.prototype.visitBool=_M;K.prototype.visitInt=jM;K.prototype.visitInt8=yr;K.prototype.visitInt16=yr;K.prototype.visitInt32=yr;K.prototype.visitInt64=Xl;K.prototype.visitUint8=yr;K.prototype.visitUint16=yr;K.prototype.visitUint32=yr;K.prototype.visitUint64=Xl;K.prototype.visitFloat=wM;K.prototype.visitFloat16=fg;K.prototype.visitFloat32=yr;K.prototype.visitFloat64=yr;K.prototype.visitUtf8=vM;K.prototype.visitBinary=gM;K.prototype.visitFixedSizeBinary=bM;K.prototype.visitDate=BM;K.prototype.visitDateDay=lg;K.prototype.visitDateMillisecond=dg;K.prototype.visitTimestamp=TM;K.prototype.visitTimestampSecond=hg;K.prototype.visitTimestampMillisecond=pg;K.prototype.visitTimestampMicrosecond=yg;K.prototype.visitTimestampNanosecond=mg;K.prototype.visitTime=IM;K.prototype.visitTimeSecond=_g;K.prototype.visitTimeMillisecond=bg;K.prototype.visitTimeMicrosecond=gg;K.prototype.visitTimeNanosecond=vg;K.prototype.visitDecimal=SM;K.prototype.visitList=DM;K.prototype.visitStruct=AM;K.prototype.visitUnion=FM;K.prototype.visitDenseUnion=jg;K.prototype.visitSparseUnion=wg;K.prototype.visitDictionary=MM;K.prototype.visitInterval=VM;K.prototype.visitIntervalDayTime=Bg;K.prototype.visitIntervalYearMonth=Tg;K.prototype.visitFixedSizeList=UM;K.prototype.visitMap=OM;Rn.instance=new K});var Og=V(Nn=>{"use strict";Object.defineProperty(Nn,"__esModule",{value:!0});Nn.instance=Nn.IndexOfVisitor=void 0;var CM=tt(),Ig=tr(),Sg=bs(),Z=class extends CM.Visitor{};Nn.IndexOfVisitor=Z;function PM(r,e){return e===null&&r.length>0?0:-1}function kM(r,e){let{nullBitmap:t}=r.data;if(!t||r.nullCount<=0)return-1;let i=0;for(let n of new Ig.BitIterator(t,r.data.offset+(e||0),r.length,t,Ig.getBool)){if(!n)return i;++i}return-1}function ce(r,e,t){if(e===void 0)return-1;if(e===null)return kM(r,t);let i=Sg.createElementComparator(e);for(let n=(t||0)-1,s=r.length;++n<s;)if(i(r.get(n)))return n;return-1}function Dg(r,e,t){let i=Sg.createElementComparator(e);for(let n=(t||0)-1,s=r.length;++n<s;)if(i(r.get(n)))return n;return-1}Z.prototype.visitNull=PM;Z.prototype.visitBool=ce;Z.prototype.visitInt=ce;Z.prototype.visitInt8=ce;Z.prototype.visitInt16=ce;Z.prototype.visitInt32=ce;Z.prototype.visitInt64=ce;Z.prototype.visitUint8=ce;Z.prototype.visitUint16=ce;Z.prototype.visitUint32=ce;Z.prototype.visitUint64=ce;Z.prototype.visitFloat=ce;Z.prototype.visitFloat16=ce;Z.prototype.visitFloat32=ce;Z.prototype.visitFloat64=ce;Z.prototype.visitUtf8=ce;Z.prototype.visitBinary=ce;Z.prototype.visitFixedSizeBinary=ce;Z.prototype.visitDate=ce;Z.prototype.visitDateDay=ce;Z.prototype.visitDateMillisecond=ce;Z.prototype.visitTimestamp=ce;Z.prototype.visitTimestampSecond=ce;Z.prototype.visitTimestampMillisecond=ce;Z.prototype.visitTimestampMicrosecond=ce;Z.prototype.visitTimestampNanosecond=ce;Z.prototype.visitTime=ce;Z.prototype.visitTimeSecond=ce;Z.prototype.visitTimeMillisecond=ce;Z.prototype.visitTimeMicrosecond=ce;Z.prototype.visitTimeNanosecond=ce;Z.prototype.visitDecimal=ce;Z.prototype.visitList=ce;Z.prototype.visitStruct=ce;Z.prototype.visitUnion=ce;Z.prototype.visitDenseUnion=Dg;Z.prototype.visitSparseUnion=Dg;Z.prototype.visitDictionary=ce;Z.prototype.visitInterval=ce;Z.prototype.visitIntervalDayTime=ce;Z.prototype.visitIntervalYearMonth=ce;Z.prototype.visitFixedSizeList=ce;Z.prototype.visitMap=ce;Nn.instance=new Z});var ed=V(xn=>{"use strict";Object.defineProperty(xn,"__esModule",{value:!0});xn.instance=xn.IteratorVisitor=void 0;var Ha=Te(),RM=tt(),NM=tr(),Ag=Ql(),X=class extends RM.Visitor{};xn.IteratorVisitor=X;function xM(r){let e=Ag.instance.getVisitFn(r);return new NM.BitIterator(r.data.nullBitmap,r.data.offset,r.length,r,(t,i,n,s)=>(n&1<<s)!=0?e(t,i):null)}var Fg=class{constructor(e,t){this.vector=e,this.getFn=t,this.index=0}next(){return this.index<this.vector.length?{value:this.getFn(this.vector,this.index++)}:{done:!0,value:null}}[Symbol.iterator](){return this}};function se(r){if(r.nullCount>0)return xM(r);let{type:e,typeId:t,length:i}=r;return r.stride===1&&(t===Ha.Type.Timestamp||t===Ha.Type.Int&&e.bitWidth!==64||t===Ha.Type.Time&&e.bitWidth!==64||t===Ha.Type.Float&&e.precision>0)?r.data.values.subarray(0,i)[Symbol.iterator]():new Fg(r,Ag.instance.getVisitFn(r))}X.prototype.visitNull=se;X.prototype.visitBool=se;X.prototype.visitInt=se;X.prototype.visitInt8=se;X.prototype.visitInt16=se;X.prototype.visitInt32=se;X.prototype.visitInt64=se;X.prototype.visitUint8=se;X.prototype.visitUint16=se;X.prototype.visitUint32=se;X.prototype.visitUint64=se;X.prototype.visitFloat=se;X.prototype.visitFloat16=se;X.prototype.visitFloat32=se;X.prototype.visitFloat64=se;X.prototype.visitUtf8=se;X.prototype.visitBinary=se;X.prototype.visitFixedSizeBinary=se;X.prototype.visitDate=se;X.prototype.visitDateDay=se;X.prototype.visitDateMillisecond=se;X.prototype.visitTimestamp=se;X.prototype.visitTimestampSecond=se;X.prototype.visitTimestampMillisecond=se;X.prototype.visitTimestampMicrosecond=se;X.prototype.visitTimestampNanosecond=se;X.prototype.visitTime=se;X.prototype.visitTimeSecond=se;X.prototype.visitTimeMillisecond=se;X.prototype.visitTimeMicrosecond=se;X.prototype.visitTimeNanosecond=se;X.prototype.visitDecimal=se;X.prototype.visitList=se;X.prototype.visitStruct=se;X.prototype.visitUnion=se;X.prototype.visitDenseUnion=se;X.prototype.visitSparseUnion=se;X.prototype.visitDictionary=se;X.prototype.visitInterval=se;X.prototype.visitIntervalDayTime=se;X.prototype.visitIntervalYearMonth=se;X.prototype.visitFixedSizeList=se;X.prototype.visitMap=se;xn.instance=new X});var Mg=V(En=>{"use strict";Object.defineProperty(En,"__esModule",{value:!0});En.instance=En.ToArrayVisitor=void 0;var As=Te(),EM=tt(),LM=ed(),Q=class extends EM.Visitor{};En.ToArrayVisitor=Q;function oe(r){let{type:e,length:t,stride:i}=r;switch(e.typeId){case As.Type.Int:case As.Type.Float:case As.Type.Decimal:case As.Type.Time:case As.Type.Timestamp:return r.data.values.subarray(0,t*i)}return[...LM.instance.visit(r)]}Q.prototype.visitNull=oe;Q.prototype.visitBool=oe;Q.prototype.visitInt=oe;Q.prototype.visitInt8=oe;Q.prototype.visitInt16=oe;Q.prototype.visitInt32=oe;Q.prototype.visitInt64=oe;Q.prototype.visitUint8=oe;Q.prototype.visitUint16=oe;Q.prototype.visitUint32=oe;Q.prototype.visitUint64=oe;Q.prototype.visitFloat=oe;Q.prototype.visitFloat16=oe;Q.prototype.visitFloat32=oe;Q.prototype.visitFloat64=oe;Q.prototype.visitUtf8=oe;Q.prototype.visitBinary=oe;Q.prototype.visitFixedSizeBinary=oe;Q.prototype.visitDate=oe;Q.prototype.visitDateDay=oe;Q.prototype.visitDateMillisecond=oe;Q.prototype.visitTimestamp=oe;Q.prototype.visitTimestampSecond=oe;Q.prototype.visitTimestampMillisecond=oe;Q.prototype.visitTimestampMicrosecond=oe;Q.prototype.visitTimestampNanosecond=oe;Q.prototype.visitTime=oe;Q.prototype.visitTimeSecond=oe;Q.prototype.visitTimeMillisecond=oe;Q.prototype.visitTimeMicrosecond=oe;Q.prototype.visitTimeNanosecond=oe;Q.prototype.visitDecimal=oe;Q.prototype.visitList=oe;Q.prototype.visitStruct=oe;Q.prototype.visitUnion=oe;Q.prototype.visitDenseUnion=oe;Q.prototype.visitSparseUnion=oe;Q.prototype.visitDictionary=oe;Q.prototype.visitInterval=oe;Q.prototype.visitIntervalDayTime=oe;Q.prototype.visitIntervalYearMonth=oe;Q.prototype.visitFixedSizeList=oe;Q.prototype.visitMap=oe;En.instance=new Q});var Vg=V(Ln=>{"use strict";Object.defineProperty(Ln,"__esModule",{value:!0});Ln.instance=Ln.ByteWidthVisitor=void 0;var qM=tt(),zM=Te(),Fs=(r,e)=>r+e,td=r=>`Cannot compute the byte width of variable-width column ${r}`,rd=class extends qM.Visitor{visitNull(e){return 0}visitInt(e){return e.bitWidth/8}visitFloat(e){return e.ArrayType.BYTES_PER_ELEMENT}visitBinary(e){throw new Error(td(e))}visitUtf8(e){throw new Error(td(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===zM.TimeUnit.SECOND?4:8}visitInterval(e){return(e.unit+1)*4}visitList(e){throw new Error(td(e))}visitStruct(e){return this.visitFields(e.children).reduce(Fs,0)}visitUnion(e){return this.visitFields(e.children).reduce(Fs,0)}visitFixedSizeBinary(e){return e.byteWidth}visitFixedSizeList(e){return e.listSize*this.visitFields(e.children).reduce(Fs,0)}visitMap(e){return this.visitFields(e.children).reduce(Fs,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(Fs,0)}};Ln.ByteWidthVisitor=rd;Ln.instance=new rd});var Ug=V(qn=>{"use strict";Object.defineProperty(qn,"__esModule",{value:!0});qn.instance=qn.GetVectorConstructor=void 0;var WM=tt(),HM=wl(),YM=Bl(),id=Il(),$M=Sl(),GM=Ua(),JM=Ol(),KM=Al(),Ya=Ul(),nd=Cl(),Mr=Ra(),ZM=zl(),XM=Wl(),QM=Hl(),eV=Yl(),Ms=$l(),Vs=Gl(),sd=Jl(),tV=Kl(),od=class extends WM.Visitor{visitNull(){return QM.NullVector}visitBool(){return YM.BoolVector}visitInt(){return Mr.IntVector}visitInt8(){return Mr.Int8Vector}visitInt16(){return Mr.Int16Vector}visitInt32(){return Mr.Int32Vector}visitInt64(){return Mr.Int64Vector}visitUint8(){return Mr.Uint8Vector}visitUint16(){return Mr.Uint16Vector}visitUint32(){return Mr.Uint32Vector}visitUint64(){return Mr.Uint64Vector}visitFloat(){return Ya.FloatVector}visitFloat16(){return Ya.Float16Vector}visitFloat32(){return Ya.Float32Vector}visitFloat64(){return Ya.Float64Vector}visitUtf8(){return tV.Utf8Vector}visitBinary(){return HM.BinaryVector}visitFixedSizeBinary(){return JM.FixedSizeBinaryVector}visitDate(){return id.DateVector}visitDateDay(){return id.DateDayVector}visitDateMillisecond(){return id.DateMillisecondVector}visitTimestamp(){return Ms.TimestampVector}visitTimestampSecond(){return Ms.TimestampSecondVector}visitTimestampMillisecond(){return Ms.TimestampMillisecondVector}visitTimestampMicrosecond(){return Ms.TimestampMicrosecondVector}visitTimestampNanosecond(){return Ms.TimestampNanosecondVector}visitTime(){return Vs.TimeVector}visitTimeSecond(){return Vs.TimeSecondVector}visitTimeMillisecond(){return Vs.TimeMillisecondVector}visitTimeMicrosecond(){return Vs.TimeMicrosecondVector}visitTimeNanosecond(){return Vs.TimeNanosecondVector}visitDecimal(){return $M.DecimalVector}visitList(){return ZM.ListVector}visitStruct(){return eV.StructVector}visitUnion(){return sd.UnionVector}visitDenseUnion(){return sd.DenseUnionVector}visitSparseUnion(){return sd.SparseUnionVector}visitDictionary(){return GM.DictionaryVector}visitInterval(){return nd.IntervalVector}visitIntervalDayTime(){return nd.IntervalDayTimeVector}visitIntervalYearMonth(){return nd.IntervalYearMonthVector}visitFixedSizeList(){return KM.FixedSizeListVector}visitMap(){return XM.MapVector}};qn.GetVectorConstructor=od;qn.instance=new od});var fr=V(C=>{"use strict";Object.defineProperty(C,"__esModule",{value:!0});C.vectorFromValuesWithType=C.StructRow=C.MapRow=C.Utf8Vector=C.SparseUnionVector=C.DenseUnionVector=C.UnionVector=C.TimeNanosecondVector=C.TimeMicrosecondVector=C.TimeMillisecondVector=C.TimeSecondVector=C.TimeVector=C.TimestampNanosecondVector=C.TimestampMicrosecondVector=C.TimestampMillisecondVector=C.TimestampSecondVector=C.TimestampVector=C.StructVector=C.NullVector=C.MapVector=C.ListVector=C.Uint64Vector=C.Uint32Vector=C.Uint16Vector=C.Uint8Vector=C.Int64Vector=C.Int32Vector=C.Int16Vector=C.Int8Vector=C.IntVector=C.IntervalYearMonthVector=C.IntervalDayTimeVector=C.IntervalVector=C.Float64Vector=C.Float32Vector=C.Float16Vector=C.FloatVector=C.FixedSizeListVector=C.FixedSizeBinaryVector=C.DictionaryVector=C.DecimalVector=C.DateMillisecondVector=C.DateDayVector=C.DateVector=C.Chunked=C.BoolVector=C.BinaryVector=C.BaseVector=C.Vector=void 0;var rV=Re();Object.defineProperty(C,"Vector",{enumerable:!0,get:function(){return rV.Vector}});var iV=xe();Object.defineProperty(C,"BaseVector",{enumerable:!0,get:function(){return iV.BaseVector}});var nV=wl();Object.defineProperty(C,"BinaryVector",{enumerable:!0,get:function(){return nV.BinaryVector}});var sV=Bl();Object.defineProperty(C,"BoolVector",{enumerable:!0,get:function(){return sV.BoolVector}});var oV=ci();Object.defineProperty(C,"Chunked",{enumerable:!0,get:function(){return oV.Chunked}});var ad=Il();Object.defineProperty(C,"DateVector",{enumerable:!0,get:function(){return ad.DateVector}});Object.defineProperty(C,"DateDayVector",{enumerable:!0,get:function(){return ad.DateDayVector}});Object.defineProperty(C,"DateMillisecondVector",{enumerable:!0,get:function(){return ad.DateMillisecondVector}});var aV=Sl();Object.defineProperty(C,"DecimalVector",{enumerable:!0,get:function(){return aV.DecimalVector}});var uV=Ua();Object.defineProperty(C,"DictionaryVector",{enumerable:!0,get:function(){return uV.DictionaryVector}});var cV=Ol();Object.defineProperty(C,"FixedSizeBinaryVector",{enumerable:!0,get:function(){return cV.FixedSizeBinaryVector}});var lV=Al();Object.defineProperty(C,"FixedSizeListVector",{enumerable:!0,get:function(){return lV.FixedSizeListVector}});var $a=Ul();Object.defineProperty(C,"FloatVector",{enumerable:!0,get:function(){return $a.FloatVector}});Object.defineProperty(C,"Float16Vector",{enumerable:!0,get:function(){return $a.Float16Vector}});Object.defineProperty(C,"Float32Vector",{enumerable:!0,get:function(){return $a.Float32Vector}});Object.defineProperty(C,"Float64Vector",{enumerable:!0,get:function(){return $a.Float64Vector}});var ud=Cl();Object.defineProperty(C,"IntervalVector",{enumerable:!0,get:function(){return ud.IntervalVector}});Object.defineProperty(C,"IntervalDayTimeVector",{enumerable:!0,get:function(){return ud.IntervalDayTimeVector}});Object.defineProperty(C,"IntervalYearMonthVector",{enumerable:!0,get:function(){return ud.IntervalYearMonthVector}});var Vr=Ra();Object.defineProperty(C,"IntVector",{enumerable:!0,get:function(){return Vr.IntVector}});Object.defineProperty(C,"Int8Vector",{enumerable:!0,get:function(){return Vr.Int8Vector}});Object.defineProperty(C,"Int16Vector",{enumerable:!0,get:function(){return Vr.Int16Vector}});Object.defineProperty(C,"Int32Vector",{enumerable:!0,get:function(){return Vr.Int32Vector}});Object.defineProperty(C,"Int64Vector",{enumerable:!0,get:function(){return Vr.Int64Vector}});Object.defineProperty(C,"Uint8Vector",{enumerable:!0,get:function(){return Vr.Uint8Vector}});Object.defineProperty(C,"Uint16Vector",{enumerable:!0,get:function(){return Vr.Uint16Vector}});Object.defineProperty(C,"Uint32Vector",{enumerable:!0,get:function(){return Vr.Uint32Vector}});Object.defineProperty(C,"Uint64Vector",{enumerable:!0,get:function(){return Vr.Uint64Vector}});var dV=zl();Object.defineProperty(C,"ListVector",{enumerable:!0,get:function(){return dV.ListVector}});var fV=Wl();Object.defineProperty(C,"MapVector",{enumerable:!0,get:function(){return fV.MapVector}});var hV=Hl();Object.defineProperty(C,"NullVector",{enumerable:!0,get:function(){return hV.NullVector}});var pV=Yl();Object.defineProperty(C,"StructVector",{enumerable:!0,get:function(){return pV.StructVector}});var Us=$l();Object.defineProperty(C,"TimestampVector",{enumerable:!0,get:function(){return Us.TimestampVector}});Object.defineProperty(C,"TimestampSecondVector",{enumerable:!0,get:function(){return Us.TimestampSecondVector}});Object.defineProperty(C,"TimestampMillisecondVector",{enumerable:!0,get:function(){return Us.TimestampMillisecondVector}});Object.defineProperty(C,"TimestampMicrosecondVector",{enumerable:!0,get:function(){return Us.TimestampMicrosecondVector}});Object.defineProperty(C,"TimestampNanosecondVector",{enumerable:!0,get:function(){return Us.TimestampNanosecondVector}});var Cs=Gl();Object.defineProperty(C,"TimeVector",{enumerable:!0,get:function(){return Cs.TimeVector}});Object.defineProperty(C,"TimeSecondVector",{enumerable:!0,get:function(){return Cs.TimeSecondVector}});Object.defineProperty(C,"TimeMillisecondVector",{enumerable:!0,get:function(){return Cs.TimeMillisecondVector}});Object.defineProperty(C,"TimeMicrosecondVector",{enumerable:!0,get:function(){return Cs.TimeMicrosecondVector}});Object.defineProperty(C,"TimeNanosecondVector",{enumerable:!0,get:function(){return Cs.TimeNanosecondVector}});var cd=Jl();Object.defineProperty(C,"UnionVector",{enumerable:!0,get:function(){return cd.UnionVector}});Object.defineProperty(C,"DenseUnionVector",{enumerable:!0,get:function(){return cd.DenseUnionVector}});Object.defineProperty(C,"SparseUnionVector",{enumerable:!0,get:function(){return cd.SparseUnionVector}});var yV=Kl();Object.defineProperty(C,"Utf8Vector",{enumerable:!0,get:function(){return yV.Utf8Vector}});var Cg=ms();Object.defineProperty(C,"MapRow",{enumerable:!0,get:function(){return Cg.MapRow}});Object.defineProperty(C,"StructRow",{enumerable:!0,get:function(){return Cg.StructRow}});var Ps=ag(),ld=Te(),zn=Re(),Pg=ci(),Hi=xe(),mV=tr(),Ga=st(),kg=Ue(),Rg=Ql(),Ng=Sc(),xg=Og(),Eg=Mg(),Lg=ed(),qg=Vg(),zg=Ug();zn.Vector.new=_V;zn.Vector.from=gV;function _V(r,...e){return new(zg.instance.getVisitFn(r)())(r,...e)}function bV(r,e){if(Ga.isIterable(e))return zn.Vector.from({nullValues:[null,void 0],type:r(),values:e});if(Ga.isAsyncIterable(e))return zn.Vector.from({nullValues:[null,void 0],type:r(),values:e});let{values:t=[],type:i=r(),nullValues:n=[null,void 0]}={...e};return Ga.isIterable(t)?zn.Vector.from({nullValues:n,...e,type:i}):zn.Vector.from({nullValues:n,...e,type:i})}C.vectorFromValuesWithType=bV;function gV(r){let{values:e=[],...t}={nullValues:[null,void 0],...r};if(Ga.isIterable(e)){let i=[...kg.Builder.throughIterable(t)(e)];return i.length===1?i[0]:Pg.Chunked.concat(i)}return(async i=>{let n=kg.Builder.throughAsyncIterable(t);for await(let s of n(e))i.push(s);return i.length===1?i[0]:Pg.Chunked.concat(i)})([])}Hi.BaseVector.prototype.get=function(e){return Rg.instance.visit(this,e)};Hi.BaseVector.prototype.set=function(e,t){return Ng.instance.visit(this,e,t)};Hi.BaseVector.prototype.indexOf=function(e,t){return xg.instance.visit(this,e,t)};Hi.BaseVector.prototype.toArray=function(){return Eg.instance.visit(this)};Hi.BaseVector.prototype.getByteWidth=function(){return qg.instance.visit(this.type)};Hi.BaseVector.prototype[Symbol.iterator]=function(){return Lg.instance.visit(this)};Hi.BaseVector.prototype._bindDataAccessors=BV;Object.keys(ld.Type).map(r=>ld.Type[r]).filter(r=>typeof r=="number").filter(r=>r!==ld.Type.NONE).forEach(r=>{let e=zg.instance.visit(r);e.prototype.get=Ps.partial1(Rg.instance.getVisitFn(r)),e.prototype.set=Ps.partial2(Ng.instance.getVisitFn(r)),e.prototype.indexOf=Ps.partial2(xg.instance.getVisitFn(r)),e.prototype.toArray=Ps.partial0(Eg.instance.getVisitFn(r)),e.prototype.getByteWidth=vV(qg.instance.getVisitFn(r)),e.prototype[Symbol.iterator]=Ps.partial0(Lg.instance.getVisitFn(r))});function vV(r){return function(){return r(this.type)}}function jV(r){return function(e){return this.isValid(e)?r.call(this,e):null}}function wV(r){return function(e,t){mV.setBool(this.nullBitmap,this.offset+e,t!=null)&&r.call(this,e,t)}}function BV(){let r=this.nullBitmap;r&&r.byteLength>0&&(this.get=jV(this.get),this.set=wV(this.set))}});var Ds=V(Ja=>{"use strict";Object.defineProperty(Ja,"__esModule",{value:!0});Ja.Table=void 0;var TV=An(),Wg=Ke(),dd=Fr(),IV=ks(),fd=be(),Hg=On(),hd=st(),Yg=Sa(),$g=gl(),pd=fr(),Xe=class extends pd.Chunked{constructor(...e){let t=null;e[0]instanceof Wg.Schema&&(t=e.shift());let i=Hg.selectArgs(dd.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 dd._InternalEmptyPlaceholderRecordBatch(t));super(new fd.Struct(t.fields),i);this._schema=t,this._chunks=i}static empty(e=new Wg.Schema([])){return new Xe(e,[])}static from(e){if(!e)return Xe.empty();if(typeof e=="object"){let i=hd.isIterable(e.values)?SV(e):hd.isAsyncIterable(e.values)?DV(e):null;if(i!==null)return i}let t=IV.RecordBatchReader.from(e);return hd.isPromise(t)?(async()=>await Xe.from(await t))():t.isSync()&&(t=t.open())?t.schema?new Xe(t.schema,[...t]):Xe.empty():(async i=>{let n=await i,s=n.schema,c=[];if(s){for await(let v of n)c.push(v);return new Xe(s,c)}return Xe.empty()})(t.open())}static async fromAsync(e){return await Xe.from(e)}static fromStruct(e){return Xe.new(e.data.childData,e.type.children)}static new(...e){return new Xe(...$g.distributeColumnsIntoRecordBatches(Hg.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 Xe(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,s=this._children||(this._children=[]);if(i=s[e])return i;if(t=n[e]){let c=this._chunks.map(v=>v.getChildAt(e)).filter(v=>v!=null);if(c.length>0)return s[e]=new TV.Column(t,c)}return null}serialize(e="binary",t=!0){return(t?Yg.RecordBatchStreamWriter:Yg.RecordBatchFileWriter).writeAll(this).toUint8Array(!0)}count(){return this._length}select(...e){let t=this._schema.fields.reduce((i,n,s)=>i.set(n.name,s),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 Xe(t,this._chunks.map(({length:i,data:{childData:n}})=>new dd.RecordBatch(t,i,e.map(s=>n[s]).filter(Boolean))))}assign(e){let t=this._schema.fields,[i,n]=e.schema.fields.reduce((v,I,S)=>{let[U,G]=v,me=t.findIndex(fe=>fe.name===I.name);return~me?G[me]=S:U.push(S),v},[[],[]]),s=this._schema.assign(e.schema),c=[...t.map((v,I,S,U=n[I])=>U===void 0?this.getColumnAt(I):e.getColumnAt(U)),...i.map(v=>e.getColumnAt(v))].filter(Boolean);return new Xe(...$g.distributeVectorsIntoRecordBatches(s,c))}};Ja.Table=Xe;function SV(r){let{type:e}=r;return e instanceof fd.Struct?Xe.fromStruct(pd.StructVector.from(r)):null}function DV(r){let{type:e}=r;return e instanceof fd.Struct?pd.StructVector.from(r).then(t=>Xe.fromStruct(t)):null}});var Fr=V(Wn=>{"use strict";Object.defineProperty(Wn,"__esModule",{value:!0});Wn._InternalEmptyPlaceholderRecordBatch=Wn.RecordBatch=void 0;var yd=qt(),md=Ds(),OV=Re(),AV=tt(),FV=Ke(),MV=st(),VV=ci(),UV=On(),_d=be(),CV=gl(),PV=fr(),bi=class extends PV.StructVector{constructor(...e){let t,i=e[0],n;if(e[1]instanceof yd.Data)[,t,n]=e;else{let s=i.fields,[,c,v]=e;t=yd.Data.Struct(new _d.Struct(s),0,c,0,null,v)}super(t,n);this._schema=i}static from(e){return MV.isIterable(e.values),md.Table.from(e)}static new(...e){let[t,i]=UV.selectFieldArgs(e),n=i.filter(s=>s instanceof OV.Vector);return new bi(...CV.ensureSameLengthData(new FV.Schema(t),n.map(s=>s.data)))}clone(e,t=this._children){return new bi(this._schema,e,t)}concat(...e){let t=this._schema,i=VV.Chunked.flatten(this,...e);return new md.Table(t,i.map(({data:n})=>new bi(t,n)))}get schema(){return this._schema}get numCols(){return this._schema.fields.length}get dictionaries(){return this._dictionaries||(this._dictionaries=Ka.collect(this))}select(...e){let t=this._schema.fields.reduce((i,n,s)=>i.set(n.name,s),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 bi(t,this.length,i)}};Wn.RecordBatch=bi;var Gg=class extends bi{constructor(e){super(e,0,e.fields.map(t=>yd.Data.new(t.type,0,0,0)))}};Wn._InternalEmptyPlaceholderRecordBatch=Gg;var Ka=class extends AV.Visitor{constructor(){super(...arguments);this.dictionaries=new Map}static collect(e){return new Ka().visit(e.data,new _d.Struct(e.schema.fields)).dictionaries}visit(e,t){return _d.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 ks=V(kt=>{"use strict";Object.defineProperty(kt,"__esModule",{value:!0});kt.AsyncRecordBatchFileReader=kt.RecordBatchFileReader=kt.AsyncRecordBatchStreamReader=kt.RecordBatchStreamReader=kt.RecordBatchReader=void 0;var Jg=Re(),Za=Te(),Kg=Rc(),Zg=ns(),Xg=si(),Rs=Ec(),Qg=M_(),bd=Fr(),Yi=rn(),Ct=ya(),Pt=st(),mr=class extends Yi.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 Pt.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 Zg.default.toDOMStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this})}toNodeStream(){return Zg.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 mr?e:Pt.isArrowJSON(e)?kV(e):Pt.isFileHandle(e)?xV(e):Pt.isPromise(e)?(async()=>await mr.from(await e))():Pt.isFetchResponse(e)||Pt.isReadableDOMStream(e)||Pt.isReadableNodeStream(e)||Pt.isAsyncIterable(e)?NV(new Xg.AsyncByteStream(e)):RV(new Xg.ByteStream(e))}static readAll(e){return e instanceof mr?e.isSync()?iv(e):nv(e):Pt.isArrowJSON(e)||ArrayBuffer.isView(e)||Pt.isIterable(e)||Pt.isIteratorResult(e)?iv(e):nv(e)}};kt.RecordBatchReader=mr;var Hn=class extends mr{constructor(e){super(e);this._impl=e}[Symbol.iterator](){return this._impl[Symbol.iterator]()}async*[Symbol.asyncIterator](){yield*this[Symbol.iterator]()}};kt.RecordBatchStreamReader=Hn;var Yn=class extends mr{constructor(e){super(e);this._impl=e}[Symbol.iterator](){throw new Error("AsyncRecordBatchStreamReader is not Iterable")}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}};kt.AsyncRecordBatchStreamReader=Yn;var Xa=class extends Hn{constructor(e){super(e);this._impl=e}};kt.RecordBatchFileReader=Xa;var gd=class extends Yn{constructor(e){super(e);this._impl=e}};kt.AsyncRecordBatchFileReader=gd;var vd=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 bd.RecordBatch(this.schema,e.length,this._loadVectors(e,t,this.schema.fields))}_loadDictionaryBatch(e,t){let{id:i,isDelta:n,data:s}=e,{dictionaries:c,schema:v}=this,I=c.get(i);if(n||!I){let S=v.dictionaries.get(i);return I&&n?I.concat(Jg.Vector.new(this._loadVectors(s,t,[S])[0])):Jg.Vector.new(this._loadVectors(s,t,[S])[0])}return I}_loadVectors(e,t,i){return new Qg.VectorLoader(t,e.nodes,e.buffers,this.dictionaries).visitMany(i)}},Ns=class extends vd{constructor(e,t){super(t);this._reader=Pt.isArrowJSON(e)?new Ct.JSONMessageReader(this._handle=e):new Ct.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=rv(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):Yi.ITERATOR_DONE}return(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(e):Yi.ITERATOR_DONE}next(){if(this.closed)return Yi.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),s=this._loadRecordBatch(i,n);return{done:!1,value:s}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;let i=e.header(),n=t.readMessageBody(e.bodyLength),s=this._loadDictionaryBatch(i,n);this.dictionaries.set(i.id,s)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new bd._InternalEmptyPlaceholderRecordBatch(this.schema)}):this.return()}_readNextMessageAndValidate(e){return this._reader.readMessage(e)}},xs=class extends vd{constructor(e,t){super(t);this._reader=new Ct.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=rv(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):Yi.ITERATOR_DONE}async return(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?await this.reset()._reader.return(e):Yi.ITERATOR_DONE}async next(){if(this.closed)return Yi.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),s=this._loadRecordBatch(i,n);return{done:!1,value:s}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;let i=e.header(),n=await t.readMessageBody(e.bodyLength),s=this._loadDictionaryBatch(i,n);this.dictionaries.set(i.id,s)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new bd._InternalEmptyPlaceholderRecordBatch(this.schema)}):await this.return()}async _readNextMessageAndValidate(e){return await this._reader.readMessage(e)}},jd=class extends Ns{constructor(e,t){super(e instanceof Rs.RandomAccessFile?e:new Rs.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(Za.MessageHeader.RecordBatch);if(i&&i.isRecordBatch()){let n=i.header(),s=this._reader.readMessageBody(i.bodyLength);return this._loadRecordBatch(n,s)}}return null}_readDictionaryBatch(e){let t=this._footer&&this._footer.getDictionaryBatch(e);if(t&&this._handle.seek(t.offset)){let i=this._reader.readMessage(Za.MessageHeader.DictionaryBatch);if(i&&i.isDictionaryBatch()){let n=i.header(),s=this._reader.readMessageBody(i.bodyLength),c=this._loadDictionaryBatch(n,s);this.dictionaries.set(n.id,c)}}}_readFooter(){let{_handle:e}=this,t=e.size-Ct.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}},ev=class extends xs{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 Rs.AsyncRandomAccessFile?e:new Rs.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(Za.MessageHeader.RecordBatch);if(i&&i.isRecordBatch()){let n=i.header(),s=await this._reader.readMessageBody(i.bodyLength);return this._loadRecordBatch(n,s)}}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(Za.MessageHeader.DictionaryBatch);if(i&&i.isDictionaryBatch()){let n=i.header(),s=await this._reader.readMessageBody(i.bodyLength),c=this._loadDictionaryBatch(n,s);this.dictionaries.set(n.id,c)}}}async _readFooter(){let{_handle:e}=this;e._pending&&await e._pending;let t=e.size-Ct.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}},tv=class extends Ns{constructor(e,t){super(e,t)}_loadVectors(e,t,i){return new Qg.JSONVectorLoader(t,e.nodes,e.buffers,this.dictionaries).visitMany(i)}};function rv(r,e){return e&&typeof e.autoDestroy=="boolean"?e.autoDestroy:r.autoDestroy}function*iv(r){let e=mr.from(r);try{if(!e.open({autoDestroy:!1}).closed)do yield e;while(!e.reset().open().closed)}finally{e.cancel()}}async function*nv(r){let e=await mr.from(r);try{if(!(await e.open({autoDestroy:!1})).closed)do yield e;while(!(await e.reset().open()).closed)}finally{await e.cancel()}}function kV(r){return new Hn(new tv(r))}function RV(r){let e=r.peek(Ct.magicLength+7&~7);return e&&e.byteLength>=4?Ct.checkForMagicArrowString(e)?new Xa(new jd(r.read())):new Hn(new Ns(r)):new Hn(new Ns(function*(){}()))}async function NV(r){let e=await r.peek(Ct.magicLength+7&~7);return e&&e.byteLength>=4?Ct.checkForMagicArrowString(e)?new Xa(new jd(await r.read())):new Yn(new xs(r)):new Yn(new xs(async function*(){}()))}async function xV(r){let{size:e}=await r.stat(),t=new Rs.AsyncRandomAccessFile(r,e);return e>=Ct.magicX2AndPadding&&Ct.checkForMagicArrowString(await t.readAt(0,Ct.magicLength+7&~7))?new gd(new ev(t)):new Yn(new xs(t))}});var av=V(Qa=>{"use strict";Object.defineProperty(Qa,"__esModule",{value:!0});Qa.toDOMStream=void 0;var sv=Ye(),ov=st();function EV(r,e){if(ov.isAsyncIterable(r))return qV(r,e);if(ov.isIterable(r))return LV(r,e);throw new Error("toDOMStream() must be called with an Iterable or AsyncIterable")}Qa.toDOMStream=EV;function LV(r,e){let t=null,i=e&&e.type==="bytes"||!1,n=e&&e.highWaterMark||2**24;return new ReadableStream({...e,start(c){s(c,t||(t=r[Symbol.iterator]()))},pull(c){t?s(c,t):c.close()},cancel(){(t&&t.return&&t.return()||!0)&&(t=null)}},{highWaterMark:i?n:void 0,...e});function s(c,v){let I,S=null,U=c.desiredSize||null;for(;!(S=v.next(i?U:null)).done;)if(ArrayBuffer.isView(S.value)&&(I=sv.toUint8Array(S.value))&&(U!=null&&i&&(U=U-I.byteLength+1),S.value=I),c.enqueue(S.value),U!=null&&--U<=0)return;c.close()}}function qV(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 s(c,t||(t=r[Symbol.asyncIterator]()))},async pull(c){t?await s(c,t):c.close()},async cancel(){(t&&t.return&&await t.return()||!0)&&(t=null)}},{highWaterMark:i?n:void 0,...e});async function s(c,v){let I,S=null,U=c.desiredSize||null;for(;!(S=await v.next(i?U:null)).done;)if(ArrayBuffer.isView(S.value)&&(I=sv.toUint8Array(S.value))&&(U!=null&&i&&(U=U-I.byteLength+1),S.value=I),c.enqueue(S.value),U!=null&&--U<=0)return;c.close()}}});var lv=V($n=>{"use strict";Object.defineProperty($n,"__esModule",{value:!0});$n.BuilderTransform=$n.builderThroughDOMStream=void 0;var zV=ta();function WV(r){return new wd(r)}$n.builderThroughDOMStream=WV;var wd=class{constructor(e){this._numChunks=0,this._finished=!1,this._bufferedSize=0;let{["readableStrategy"]:t,["writableStrategy"]:i,["queueingStrategy"]:n="count",...s}=e;this._controller=null,this._builder=zV.Builder.new(s),this._getSize=n!=="bytes"?uv:cv;let{["highWaterMark"]:c=n==="bytes"?2**14:1e3}={...t},{["highWaterMark"]:v=n==="bytes"?2**14:1e3}={...i};this.readable=new ReadableStream({cancel:()=>{this._builder.clear()},pull:I=>{this._maybeFlush(this._builder,this._controller=I)},start:I=>{this._maybeFlush(this._builder,this._controller=I)}},{highWaterMark:c,size:n!=="bytes"?uv:cv}),this.writable=new WritableStream({abort:()=>{this._builder.clear()},write:()=>{this._maybeFlush(this._builder,this._controller)},close:()=>{this._maybeFlush(this._builder.finish(),this._controller)}},{highWaterMark:v,size:I=>this._writeValueAndReturnChunkSize(I)})}_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)}};$n.BuilderTransform=wd;var uv=r=>r.length,cv=r=>r.byteLength});var dv=V(eu=>{"use strict";Object.defineProperty(eu,"__esModule",{value:!0});eu.recordBatchReaderThroughDOMStream=void 0;var HV=si(),YV=ks();function $V(r,e){let t=new HV.AsyncByteQueue,i=null,n=new ReadableStream({async cancel(){await t.close()},async start(v){await c(v,i||(i=await s()))},async pull(v){i?await c(v,i):v.close()}});return{writable:new WritableStream(t,{highWaterMark:2**14,...r}),readable:n};async function s(){return await(await YV.RecordBatchReader.from(t)).open(e)}async function c(v,I){let S=v.desiredSize,U=null;for(;!(U=await I.next()).done;)if(v.enqueue(U.value),S!=null&&--S<=0)return;v.close()}}eu.recordBatchReaderThroughDOMStream=$V});var fv=V(tu=>{"use strict";Object.defineProperty(tu,"__esModule",{value:!0});tu.recordBatchWriterThroughDOMStream=void 0;var GV=si();function JV(r,e){let t=new this(r),i=new GV.AsyncByteStream(t),n=new ReadableStream({type:"bytes",async cancel(){await i.cancel()},async pull(c){await s(c)},async start(c){await s(c)}},{highWaterMark:2**14,...e});return{writable:new WritableStream(t,r),readable:n};async function s(c){let v=null,I=c.desiredSize;for(;v=await i.read(I||null);)if(c.enqueue(v),I!=null&&(I-=v.byteLength)<=0)return;c.close()}}tu.recordBatchWriterThroughDOMStream=JV});var Od=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 KV=Ua(),gi=class{eq(e){return e instanceof gi||(e=new Ur(e)),new Td(this,e)}le(e){return e instanceof gi||(e=new Ur(e)),new Id(this,e)}ge(e){return e instanceof gi||(e=new Ur(e)),new Sd(this,e)}lt(e){return new Zn(this.ge(e))}gt(e){return new Zn(this.le(e))}ne(e){return new Zn(this.eq(e))}};le.Value=gi;var Ur=class extends gi{constructor(e){super();this.v=e}};le.Literal=Ur;var Bd=class extends gi{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=Bd;var Gn=class{and(...e){return new Jn(this,...e)}or(...e){return new Kn(this,...e)}not(){return new Zn(this)}};le.Predicate=Gn;var Es=class extends Gn{constructor(e,t){super();this.left=e,this.right=t}bind(e){return this.left instanceof Ur?this.right instanceof Ur?this._bindLitLit(e,this.left,this.right):this._bindLitCol(e,this.left,this.right):this.right instanceof Ur?this._bindColLit(e,this.left,this.right):this._bindColCol(e,this.left,this.right)}};le.ComparisonPredicate=Es;var Ls=class extends Gn{constructor(...e){super();this.children=e}};le.CombinationPredicate=Ls;Ls.prototype.children=Object.freeze([]);var Jn=class extends Ls{constructor(...e){e=e.reduce((t,i)=>t.concat(i instanceof Jn?i.children:i),[]);super(...e)}bind(e){let t=this.children.map(i=>i.bind(e));return(i,n)=>t.every(s=>s(i,n))}};le.And=Jn;var Kn=class extends Ls{constructor(...e){e=e.reduce((t,i)=>t.concat(i instanceof Kn?i.children:i),[]);super(...e)}bind(e){let t=this.children.map(i=>i.bind(e));return(i,n)=>t.some(s=>s(i,n))}};le.Or=Kn;var Td=class extends Es{_bindLitLit(e,t,i){let n=t.v==i.v;return()=>n}_bindColCol(e,t,i){let n=t.bind(e),s=i.bind(e);return(c,v)=>n(c,v)==s(c,v)}_bindColLit(e,t,i){let n=t.bind(e);if(t.vector instanceof KV.DictionaryVector){let s,c=t.vector;return c.dictionary!==this.lastDictionary?(s=c.reverseLookup(i.v),this.lastDictionary=c.dictionary,this.lastKey=s):s=this.lastKey,s===-1?()=>!1:v=>c.getKey(v)===s}else return(s,c)=>n(s,c)==i.v}_bindLitCol(e,t,i){return this._bindColLit(e,i,t)}};le.Equals=Td;var Id=class extends Es{_bindLitLit(e,t,i){let n=t.v<=i.v;return()=>n}_bindColCol(e,t,i){let n=t.bind(e),s=i.bind(e);return(c,v)=>n(c,v)<=s(c,v)}_bindColLit(e,t,i){let n=t.bind(e);return(s,c)=>n(s,c)<=i.v}_bindLitCol(e,t,i){let n=i.bind(e);return(s,c)=>t.v<=n(s,c)}};le.LTeq=Id;var Sd=class extends Es{_bindLitLit(e,t,i){let n=t.v>=i.v;return()=>n}_bindColCol(e,t,i){let n=t.bind(e),s=i.bind(e);return(c,v)=>n(c,v)>=s(c,v)}_bindColLit(e,t,i){let n=t.bind(e);return(s,c)=>n(s,c)>=i.v}_bindLitCol(e,t,i){let n=i.bind(e);return(s,c)=>t.v>=n(s,c)}};le.GTeq=Sd;var Zn=class extends Gn{constructor(e){super();this.child=e}bind(e){let t=this.child.bind(e);return(i,n)=>!t(i,n)}};le.Not=Zn;var Dd=class extends Gn{constructor(e,t){super();this.next=e,this.bind_=t}bind(e){return this.bind_(e),this.next}};le.CustomPredicate=Dd;function ZV(r){return new Ur(r)}le.lit=ZV;function XV(r){return new Bd(r)}le.col=XV;function QV(...r){return new Jn(...r)}le.and=QV;function eU(...r){return new Kn(...r)}le.or=eU;function tU(r,e){return new Dd(r,e)}le.custom=tU});var _v=V(vi=>{"use strict";Object.defineProperty(vi,"__esModule",{value:!0});vi.FilteredDataFrame=vi.CountByResult=vi.DataFrame=void 0;var Xn=Ds(),hv=Ra(),Ad=Ke(),pv=Od(),rU=Fr(),yv=be();Xn.Table.prototype.countBy=function(r){return new $i(this.chunks).countBy(r)};Xn.Table.prototype.scan=function(r,e){return new $i(this.chunks).scan(r,e)};Xn.Table.prototype.scanReverse=function(r,e){return new $i(this.chunks).scanReverse(r,e)};Xn.Table.prototype.filter=function(r){return new $i(this.chunks).filter(r)};var $i=class extends Xn.Table{filter(e){return new qs(this.chunks,e)}scan(e,t){let i=this.chunks,n=i.length;for(let s=-1;++s<n;){let c=i[s];t&&t(c);for(let v=-1,I=c.length;++v<I;)e(v,c)}}scanReverse(e,t){let i=this.chunks,n=i.length;for(let s=n;--s>=0;){let c=i[s];t&&t(c);for(let v=c.length;--v>=0;)e(v,c)}}countBy(e){let t=this.chunks,i=t.length,n=typeof e=="string"?new pv.Col(e):e;n.bind(t[i-1]);let s=n.vector;if(!yv.DataType.isDictionary(s.type))throw new Error("countBy currently only supports dictionary-encoded columns");let c=Math.ceil(Math.log(s.length)/Math.log(256)),v=c==4?Uint32Array:c>=2?Uint16Array:Uint8Array,I=new v(s.dictionary.length);for(let S=-1;++S<i;){let U=t[S];n.bind(U);let G=n.vector.indices;for(let me=-1,fe=U.length;++me<fe;){let Gt=G.get(me);Gt!==null&&I[Gt]++}}return new ru(s.dictionary,hv.IntVector.from(I))}};vi.DataFrame=$i;var ru=class extends Xn.Table{constructor(e,t){let i=new Ad.Schema([new Ad.Field("values",e.type),new Ad.Field("counts",t.type)]);super(new rU.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}};vi.CountByResult=ru;var mv=class{constructor(e,t){this.batches=e,this.predicate=t,this.batchIndex=0,this.index=0,this.batch=this.batches[this.batchIndex],this.predicateFunc=this.predicate.bind(this.batch)}next(){for(;this.batchIndex<this.batches.length;){for(;this.index<this.batch.length;){if(this.predicateFunc(this.index,this.batch))return{value:this.batch.get(this.index++)};this.index++}++this.batchIndex<this.batches.length&&(this.index=0,this.batch=this.batches[this.batchIndex],this.predicateFunc=this.predicate.bind(this.batch))}return{done:!0,value:null}}[Symbol.iterator](){return this}},qs=class extends $i{constructor(e,t){super(e);this._predicate=t}scan(e,t){let i=this._chunks,n=i.length;for(let s=-1;++s<n;){let c=i[s],v=this._predicate.bind(c),I=!1;for(let S=-1,U=c.length;++S<U;)v(S,c)&&(t&&!I&&(t(c),I=!0),e(S,c))}}scanReverse(e,t){let i=this._chunks,n=i.length;for(let s=n;--s>=0;){let c=i[s],v=this._predicate.bind(c),I=!1;for(let S=c.length;--S>=0;)v(S,c)&&(t&&!I&&(t(c),I=!0),e(S,c))}}count(){let e=0,t=this._chunks,i=t.length;for(let n=-1;++n<i;){let s=t[n],c=this._predicate.bind(s);for(let v=-1,I=s.length;++v<I;)c(v,s)&&++e}return e}[Symbol.iterator](){return new mv(this._chunks,this._predicate)}filter(e){return new qs(this._chunks,this._predicate.and(e))}countBy(e){let t=this._chunks,i=t.length,n=typeof e=="string"?new pv.Col(e):e;n.bind(t[i-1]);let s=n.vector;if(!yv.DataType.isDictionary(s.type))throw new Error("countBy currently only supports dictionary-encoded columns");let c=Math.ceil(Math.log(s.length)/Math.log(256)),v=c==4?Uint32Array:c>=2?Uint16Array:Uint8Array,I=new v(s.dictionary.length);for(let S=-1;++S<i;){let U=t[S],G=this._predicate.bind(U);n.bind(U);let me=n.vector.indices;for(let fe=-1,Gt=U.length;++fe<Gt;){let Cr=me.get(fe);Cr!==null&&G(fe,U)&&I[Cr]++}}return new ru(s.dictionary,hv.IntVector.from(I))}};vi.FilteredDataFrame=qs});var vv=V(_=>{"use strict";Object.defineProperty(_,"__esModule",{value:!0});_.util=_.predicate=_.CountByResult=_.FilteredDataFrame=_.DataFrame=_.RecordBatch=_.Message=_.JSONMessageReader=_.AsyncMessageReader=_.MessageReader=_.RecordBatchJSONWriter=_.RecordBatchStreamWriter=_.RecordBatchFileWriter=_.RecordBatchWriter=_.AsyncRecordBatchStreamReader=_.AsyncRecordBatchFileReader=_.RecordBatchStreamReader=_.RecordBatchFileReader=_.RecordBatchReader=_.AsyncByteQueue=_.AsyncByteStream=_.ByteStream=_.Utf8Builder=_.SparseUnionBuilder=_.DenseUnionBuilder=_.UnionBuilder=_.TimeNanosecondBuilder=_.TimeMicrosecondBuilder=_.TimeMillisecondBuilder=_.TimeSecondBuilder=_.TimeBuilder=_.TimestampNanosecondBuilder=_.TimestampMicrosecondBuilder=_.TimestampMillisecondBuilder=_.TimestampSecondBuilder=_.TimestampBuilder=_.StructBuilder=_.NullBuilder=_.MapBuilder=_.ListBuilder=_.Uint64Builder=_.Uint32Builder=_.Uint16Builder=_.Uint8Builder=_.Int64Builder=_.Int32Builder=_.Int16Builder=_.Int8Builder=_.IntBuilder=_.IntervalYearMonthBuilder=_.IntervalDayTimeBuilder=_.IntervalBuilder=_.Float64Builder=_.Float32Builder=_.Float16Builder=_.FloatBuilder=_.FixedSizeListBuilder=_.FixedSizeBinaryBuilder=_.DictionaryBuilder=_.DecimalBuilder=_.DateMillisecondBuilder=_.DateDayBuilder=_.DateBuilder=_.BoolBuilder=_.BinaryBuilder=_.Builder=_.Utf8Vector=_.SparseUnionVector=_.DenseUnionVector=_.UnionVector=_.TimeNanosecondVector=_.TimeMicrosecondVector=_.TimeMillisecondVector=_.TimeSecondVector=_.TimeVector=_.TimestampNanosecondVector=_.TimestampMicrosecondVector=_.TimestampMillisecondVector=_.TimestampSecondVector=_.TimestampVector=_.StructVector=_.NullVector=_.MapVector=_.ListVector=_.Uint64Vector=_.Uint32Vector=_.Uint16Vector=_.Uint8Vector=_.Int64Vector=_.Int32Vector=_.Int16Vector=_.Int8Vector=_.IntVector=_.IntervalYearMonthVector=_.IntervalDayTimeVector=_.IntervalVector=_.Float64Vector=_.Float32Vector=_.Float16Vector=_.FloatVector=_.FixedSizeListVector=_.FixedSizeBinaryVector=_.DictionaryVector=_.DecimalVector=_.DateMillisecondVector=_.DateDayVector=_.DateVector=_.Chunked=_.BoolVector=_.BinaryVector=_.BaseVector=_.Vector=_.Field=_.Schema=_.Visitor=_.Column=_.Table=_.Map_=_.FixedSizeList=_.IntervalYearMonth=_.IntervalDayTime=_.Interval=_.Dictionary=_.SparseUnion=_.DenseUnion=_.Union=_.Struct=_.List=_.Decimal=_.TimeNanosecond=_.TimeMicrosecond=_.TimeMillisecond=_.TimeSecond=_.Time=_.TimestampNanosecond=_.TimestampMicrosecond=_.TimestampMillisecond=_.TimestampSecond=_.Timestamp=_.DateMillisecond=_.DateDay=_.Date_=_.FixedSizeBinary=_.Binary=_.Utf8=_.Float64=_.Float32=_.Float16=_.Float=_.Uint64=_.Uint32=_.Uint16=_.Uint8=_.Int64=_.Int32=_.Int16=_.Int8=_.Int=_.Bool=_.Null=_.DataType=_.Data=_.BufferType=_.Type=_.MessageHeader=_.MetadataVersion=_.IntervalUnit=_.UnionMode=_.Precision=_.TimeUnit=_.DateUnit=void 0;var Qn=$r();Object.defineProperty(_,"DateUnit",{enumerable:!0,get:function(){return Qn.DateUnit}});Object.defineProperty(_,"TimeUnit",{enumerable:!0,get:function(){return Qn.TimeUnit}});Object.defineProperty(_,"Precision",{enumerable:!0,get:function(){return Qn.Precision}});Object.defineProperty(_,"UnionMode",{enumerable:!0,get:function(){return Qn.UnionMode}});Object.defineProperty(_,"IntervalUnit",{enumerable:!0,get:function(){return Qn.IntervalUnit}});Object.defineProperty(_,"MetadataVersion",{enumerable:!0,get:function(){return Qn.MetadataVersion}});var iU=yo();Object.defineProperty(_,"MessageHeader",{enumerable:!0,get:function(){return iU.MessageHeader}});var bv=Te();Object.defineProperty(_,"Type",{enumerable:!0,get:function(){return bv.Type}});Object.defineProperty(_,"BufferType",{enumerable:!0,get:function(){return bv.BufferType}});var nU=qt();Object.defineProperty(_,"Data",{enumerable:!0,get:function(){return nU.Data}});var ie=be();Object.defineProperty(_,"DataType",{enumerable:!0,get:function(){return ie.DataType}});Object.defineProperty(_,"Null",{enumerable:!0,get:function(){return ie.Null}});Object.defineProperty(_,"Bool",{enumerable:!0,get:function(){return ie.Bool}});Object.defineProperty(_,"Int",{enumerable:!0,get:function(){return ie.Int}});Object.defineProperty(_,"Int8",{enumerable:!0,get:function(){return ie.Int8}});Object.defineProperty(_,"Int16",{enumerable:!0,get:function(){return ie.Int16}});Object.defineProperty(_,"Int32",{enumerable:!0,get:function(){return ie.Int32}});Object.defineProperty(_,"Int64",{enumerable:!0,get:function(){return ie.Int64}});Object.defineProperty(_,"Uint8",{enumerable:!0,get:function(){return ie.Uint8}});Object.defineProperty(_,"Uint16",{enumerable:!0,get:function(){return ie.Uint16}});Object.defineProperty(_,"Uint32",{enumerable:!0,get:function(){return ie.Uint32}});Object.defineProperty(_,"Uint64",{enumerable:!0,get:function(){return ie.Uint64}});Object.defineProperty(_,"Float",{enumerable:!0,get:function(){return ie.Float}});Object.defineProperty(_,"Float16",{enumerable:!0,get:function(){return ie.Float16}});Object.defineProperty(_,"Float32",{enumerable:!0,get:function(){return ie.Float32}});Object.defineProperty(_,"Float64",{enumerable:!0,get:function(){return ie.Float64}});Object.defineProperty(_,"Utf8",{enumerable:!0,get:function(){return ie.Utf8}});Object.defineProperty(_,"Binary",{enumerable:!0,get:function(){return ie.Binary}});Object.defineProperty(_,"FixedSizeBinary",{enumerable:!0,get:function(){return ie.FixedSizeBinary}});Object.defineProperty(_,"Date_",{enumerable:!0,get:function(){return ie.Date_}});Object.defineProperty(_,"DateDay",{enumerable:!0,get:function(){return ie.DateDay}});Object.defineProperty(_,"DateMillisecond",{enumerable:!0,get:function(){return ie.DateMillisecond}});Object.defineProperty(_,"Timestamp",{enumerable:!0,get:function(){return ie.Timestamp}});Object.defineProperty(_,"TimestampSecond",{enumerable:!0,get:function(){return ie.TimestampSecond}});Object.defineProperty(_,"TimestampMillisecond",{enumerable:!0,get:function(){return ie.TimestampMillisecond}});Object.defineProperty(_,"TimestampMicrosecond",{enumerable:!0,get:function(){return ie.TimestampMicrosecond}});Object.defineProperty(_,"TimestampNanosecond",{enumerable:!0,get:function(){return ie.TimestampNanosecond}});Object.defineProperty(_,"Time",{enumerable:!0,get:function(){return ie.Time}});Object.defineProperty(_,"TimeSecond",{enumerable:!0,get:function(){return ie.TimeSecond}});Object.defineProperty(_,"TimeMillisecond",{enumerable:!0,get:function(){return ie.TimeMillisecond}});Object.defineProperty(_,"TimeMicrosecond",{enumerable:!0,get:function(){return ie.TimeMicrosecond}});Object.defineProperty(_,"TimeNanosecond",{enumerable:!0,get:function(){return ie.TimeNanosecond}});Object.defineProperty(_,"Decimal",{enumerable:!0,get:function(){return ie.Decimal}});Object.defineProperty(_,"List",{enumerable:!0,get:function(){return ie.List}});Object.defineProperty(_,"Struct",{enumerable:!0,get:function(){return ie.Struct}});Object.defineProperty(_,"Union",{enumerable:!0,get:function(){return ie.Union}});Object.defineProperty(_,"DenseUnion",{enumerable:!0,get:function(){return ie.DenseUnion}});Object.defineProperty(_,"SparseUnion",{enumerable:!0,get:function(){return ie.SparseUnion}});Object.defineProperty(_,"Dictionary",{enumerable:!0,get:function(){return ie.Dictionary}});Object.defineProperty(_,"Interval",{enumerable:!0,get:function(){return ie.Interval}});Object.defineProperty(_,"IntervalDayTime",{enumerable:!0,get:function(){return ie.IntervalDayTime}});Object.defineProperty(_,"IntervalYearMonth",{enumerable:!0,get:function(){return ie.IntervalYearMonth}});Object.defineProperty(_,"FixedSizeList",{enumerable:!0,get:function(){return ie.FixedSizeList}});Object.defineProperty(_,"Map_",{enumerable:!0,get:function(){return ie.Map_}});var sU=Ds();Object.defineProperty(_,"Table",{enumerable:!0,get:function(){return sU.Table}});var oU=An();Object.defineProperty(_,"Column",{enumerable:!0,get:function(){return oU.Column}});var aU=tt();Object.defineProperty(_,"Visitor",{enumerable:!0,get:function(){return aU.Visitor}});var gv=Ke();Object.defineProperty(_,"Schema",{enumerable:!0,get:function(){return gv.Schema}});Object.defineProperty(_,"Field",{enumerable:!0,get:function(){return gv.Field}});var ee=fr();Object.defineProperty(_,"Vector",{enumerable:!0,get:function(){return ee.Vector}});Object.defineProperty(_,"BaseVector",{enumerable:!0,get:function(){return ee.BaseVector}});Object.defineProperty(_,"BinaryVector",{enumerable:!0,get:function(){return ee.BinaryVector}});Object.defineProperty(_,"BoolVector",{enumerable:!0,get:function(){return ee.BoolVector}});Object.defineProperty(_,"Chunked",{enumerable:!0,get:function(){return ee.Chunked}});Object.defineProperty(_,"DateVector",{enumerable:!0,get:function(){return ee.DateVector}});Object.defineProperty(_,"DateDayVector",{enumerable:!0,get:function(){return ee.DateDayVector}});Object.defineProperty(_,"DateMillisecondVector",{enumerable:!0,get:function(){return ee.DateMillisecondVector}});Object.defineProperty(_,"DecimalVector",{enumerable:!0,get:function(){return ee.DecimalVector}});Object.defineProperty(_,"DictionaryVector",{enumerable:!0,get:function(){return ee.DictionaryVector}});Object.defineProperty(_,"FixedSizeBinaryVector",{enumerable:!0,get:function(){return ee.FixedSizeBinaryVector}});Object.defineProperty(_,"FixedSizeListVector",{enumerable:!0,get:function(){return ee.FixedSizeListVector}});Object.defineProperty(_,"FloatVector",{enumerable:!0,get:function(){return ee.FloatVector}});Object.defineProperty(_,"Float16Vector",{enumerable:!0,get:function(){return ee.Float16Vector}});Object.defineProperty(_,"Float32Vector",{enumerable:!0,get:function(){return ee.Float32Vector}});Object.defineProperty(_,"Float64Vector",{enumerable:!0,get:function(){return ee.Float64Vector}});Object.defineProperty(_,"IntervalVector",{enumerable:!0,get:function(){return ee.IntervalVector}});Object.defineProperty(_,"IntervalDayTimeVector",{enumerable:!0,get:function(){return ee.IntervalDayTimeVector}});Object.defineProperty(_,"IntervalYearMonthVector",{enumerable:!0,get:function(){return ee.IntervalYearMonthVector}});Object.defineProperty(_,"IntVector",{enumerable:!0,get:function(){return ee.IntVector}});Object.defineProperty(_,"Int8Vector",{enumerable:!0,get:function(){return ee.Int8Vector}});Object.defineProperty(_,"Int16Vector",{enumerable:!0,get:function(){return ee.Int16Vector}});Object.defineProperty(_,"Int32Vector",{enumerable:!0,get:function(){return ee.Int32Vector}});Object.defineProperty(_,"Int64Vector",{enumerable:!0,get:function(){return ee.Int64Vector}});Object.defineProperty(_,"Uint8Vector",{enumerable:!0,get:function(){return ee.Uint8Vector}});Object.defineProperty(_,"Uint16Vector",{enumerable:!0,get:function(){return ee.Uint16Vector}});Object.defineProperty(_,"Uint32Vector",{enumerable:!0,get:function(){return ee.Uint32Vector}});Object.defineProperty(_,"Uint64Vector",{enumerable:!0,get:function(){return ee.Uint64Vector}});Object.defineProperty(_,"ListVector",{enumerable:!0,get:function(){return ee.ListVector}});Object.defineProperty(_,"MapVector",{enumerable:!0,get:function(){return ee.MapVector}});Object.defineProperty(_,"NullVector",{enumerable:!0,get:function(){return ee.NullVector}});Object.defineProperty(_,"StructVector",{enumerable:!0,get:function(){return ee.StructVector}});Object.defineProperty(_,"TimestampVector",{enumerable:!0,get:function(){return ee.TimestampVector}});Object.defineProperty(_,"TimestampSecondVector",{enumerable:!0,get:function(){return ee.TimestampSecondVector}});Object.defineProperty(_,"TimestampMillisecondVector",{enumerable:!0,get:function(){return ee.TimestampMillisecondVector}});Object.defineProperty(_,"TimestampMicrosecondVector",{enumerable:!0,get:function(){return ee.TimestampMicrosecondVector}});Object.defineProperty(_,"TimestampNanosecondVector",{enumerable:!0,get:function(){return ee.TimestampNanosecondVector}});Object.defineProperty(_,"TimeVector",{enumerable:!0,get:function(){return ee.TimeVector}});Object.defineProperty(_,"TimeSecondVector",{enumerable:!0,get:function(){return ee.TimeSecondVector}});Object.defineProperty(_,"TimeMillisecondVector",{enumerable:!0,get:function(){return ee.TimeMillisecondVector}});Object.defineProperty(_,"TimeMicrosecondVector",{enumerable:!0,get:function(){return ee.TimeMicrosecondVector}});Object.defineProperty(_,"TimeNanosecondVector",{enumerable:!0,get:function(){return ee.TimeNanosecondVector}});Object.defineProperty(_,"UnionVector",{enumerable:!0,get:function(){return ee.UnionVector}});Object.defineProperty(_,"DenseUnionVector",{enumerable:!0,get:function(){return ee.DenseUnionVector}});Object.defineProperty(_,"SparseUnionVector",{enumerable:!0,get:function(){return ee.SparseUnionVector}});Object.defineProperty(_,"Utf8Vector",{enumerable:!0,get:function(){return ee.Utf8Vector}});var ne=ta();Object.defineProperty(_,"Builder",{enumerable:!0,get:function(){return ne.Builder}});Object.defineProperty(_,"BinaryBuilder",{enumerable:!0,get:function(){return ne.BinaryBuilder}});Object.defineProperty(_,"BoolBuilder",{enumerable:!0,get:function(){return ne.BoolBuilder}});Object.defineProperty(_,"DateBuilder",{enumerable:!0,get:function(){return ne.DateBuilder}});Object.defineProperty(_,"DateDayBuilder",{enumerable:!0,get:function(){return ne.DateDayBuilder}});Object.defineProperty(_,"DateMillisecondBuilder",{enumerable:!0,get:function(){return ne.DateMillisecondBuilder}});Object.defineProperty(_,"DecimalBuilder",{enumerable:!0,get:function(){return ne.DecimalBuilder}});Object.defineProperty(_,"DictionaryBuilder",{enumerable:!0,get:function(){return ne.DictionaryBuilder}});Object.defineProperty(_,"FixedSizeBinaryBuilder",{enumerable:!0,get:function(){return ne.FixedSizeBinaryBuilder}});Object.defineProperty(_,"FixedSizeListBuilder",{enumerable:!0,get:function(){return ne.FixedSizeListBuilder}});Object.defineProperty(_,"FloatBuilder",{enumerable:!0,get:function(){return ne.FloatBuilder}});Object.defineProperty(_,"Float16Builder",{enumerable:!0,get:function(){return ne.Float16Builder}});Object.defineProperty(_,"Float32Builder",{enumerable:!0,get:function(){return ne.Float32Builder}});Object.defineProperty(_,"Float64Builder",{enumerable:!0,get:function(){return ne.Float64Builder}});Object.defineProperty(_,"IntervalBuilder",{enumerable:!0,get:function(){return ne.IntervalBuilder}});Object.defineProperty(_,"IntervalDayTimeBuilder",{enumerable:!0,get:function(){return ne.IntervalDayTimeBuilder}});Object.defineProperty(_,"IntervalYearMonthBuilder",{enumerable:!0,get:function(){return ne.IntervalYearMonthBuilder}});Object.defineProperty(_,"IntBuilder",{enumerable:!0,get:function(){return ne.IntBuilder}});Object.defineProperty(_,"Int8Builder",{enumerable:!0,get:function(){return ne.Int8Builder}});Object.defineProperty(_,"Int16Builder",{enumerable:!0,get:function(){return ne.Int16Builder}});Object.defineProperty(_,"Int32Builder",{enumerable:!0,get:function(){return ne.Int32Builder}});Object.defineProperty(_,"Int64Builder",{enumerable:!0,get:function(){return ne.Int64Builder}});Object.defineProperty(_,"Uint8Builder",{enumerable:!0,get:function(){return ne.Uint8Builder}});Object.defineProperty(_,"Uint16Builder",{enumerable:!0,get:function(){return ne.Uint16Builder}});Object.defineProperty(_,"Uint32Builder",{enumerable:!0,get:function(){return ne.Uint32Builder}});Object.defineProperty(_,"Uint64Builder",{enumerable:!0,get:function(){return ne.Uint64Builder}});Object.defineProperty(_,"ListBuilder",{enumerable:!0,get:function(){return ne.ListBuilder}});Object.defineProperty(_,"MapBuilder",{enumerable:!0,get:function(){return ne.MapBuilder}});Object.defineProperty(_,"NullBuilder",{enumerable:!0,get:function(){return ne.NullBuilder}});Object.defineProperty(_,"StructBuilder",{enumerable:!0,get:function(){return ne.StructBuilder}});Object.defineProperty(_,"TimestampBuilder",{enumerable:!0,get:function(){return ne.TimestampBuilder}});Object.defineProperty(_,"TimestampSecondBuilder",{enumerable:!0,get:function(){return ne.TimestampSecondBuilder}});Object.defineProperty(_,"TimestampMillisecondBuilder",{enumerable:!0,get:function(){return ne.TimestampMillisecondBuilder}});Object.defineProperty(_,"TimestampMicrosecondBuilder",{enumerable:!0,get:function(){return ne.TimestampMicrosecondBuilder}});Object.defineProperty(_,"TimestampNanosecondBuilder",{enumerable:!0,get:function(){return ne.TimestampNanosecondBuilder}});Object.defineProperty(_,"TimeBuilder",{enumerable:!0,get:function(){return ne.TimeBuilder}});Object.defineProperty(_,"TimeSecondBuilder",{enumerable:!0,get:function(){return ne.TimeSecondBuilder}});Object.defineProperty(_,"TimeMillisecondBuilder",{enumerable:!0,get:function(){return ne.TimeMillisecondBuilder}});Object.defineProperty(_,"TimeMicrosecondBuilder",{enumerable:!0,get:function(){return ne.TimeMicrosecondBuilder}});Object.defineProperty(_,"TimeNanosecondBuilder",{enumerable:!0,get:function(){return ne.TimeNanosecondBuilder}});Object.defineProperty(_,"UnionBuilder",{enumerable:!0,get:function(){return ne.UnionBuilder}});Object.defineProperty(_,"DenseUnionBuilder",{enumerable:!0,get:function(){return ne.DenseUnionBuilder}});Object.defineProperty(_,"SparseUnionBuilder",{enumerable:!0,get:function(){return ne.SparseUnionBuilder}});Object.defineProperty(_,"Utf8Builder",{enumerable:!0,get:function(){return ne.Utf8Builder}});var Fd=si();Object.defineProperty(_,"ByteStream",{enumerable:!0,get:function(){return Fd.ByteStream}});Object.defineProperty(_,"AsyncByteStream",{enumerable:!0,get:function(){return Fd.AsyncByteStream}});Object.defineProperty(_,"AsyncByteQueue",{enumerable:!0,get:function(){return Fd.AsyncByteQueue}});var zs=ks();Object.defineProperty(_,"RecordBatchReader",{enumerable:!0,get:function(){return zs.RecordBatchReader}});Object.defineProperty(_,"RecordBatchFileReader",{enumerable:!0,get:function(){return zs.RecordBatchFileReader}});Object.defineProperty(_,"RecordBatchStreamReader",{enumerable:!0,get:function(){return zs.RecordBatchStreamReader}});Object.defineProperty(_,"AsyncRecordBatchFileReader",{enumerable:!0,get:function(){return zs.AsyncRecordBatchFileReader}});Object.defineProperty(_,"AsyncRecordBatchStreamReader",{enumerable:!0,get:function(){return zs.AsyncRecordBatchStreamReader}});var iu=Sa();Object.defineProperty(_,"RecordBatchWriter",{enumerable:!0,get:function(){return iu.RecordBatchWriter}});Object.defineProperty(_,"RecordBatchFileWriter",{enumerable:!0,get:function(){return iu.RecordBatchFileWriter}});Object.defineProperty(_,"RecordBatchStreamWriter",{enumerable:!0,get:function(){return iu.RecordBatchStreamWriter}});Object.defineProperty(_,"RecordBatchJSONWriter",{enumerable:!0,get:function(){return iu.RecordBatchJSONWriter}});var Md=ya();Object.defineProperty(_,"MessageReader",{enumerable:!0,get:function(){return Md.MessageReader}});Object.defineProperty(_,"AsyncMessageReader",{enumerable:!0,get:function(){return Md.AsyncMessageReader}});Object.defineProperty(_,"JSONMessageReader",{enumerable:!0,get:function(){return Md.JSONMessageReader}});var uU=Ei();Object.defineProperty(_,"Message",{enumerable:!0,get:function(){return uU.Message}});var cU=Fr();Object.defineProperty(_,"RecordBatch",{enumerable:!0,get:function(){return cU.RecordBatch}});var Vd=_v();Object.defineProperty(_,"DataFrame",{enumerable:!0,get:function(){return Vd.DataFrame}});Object.defineProperty(_,"FilteredDataFrame",{enumerable:!0,get:function(){return Vd.FilteredDataFrame}});Object.defineProperty(_,"CountByResult",{enumerable:!0,get:function(){return Vd.CountByResult}});var lU=ls(),dU=qc(),fU=tr(),hU=os(),pU=Ye(),yU=bs(),mU=Od();_.predicate=mU;var Ud=nl();_.util={...lU,...dU,...fU,...hU,...pU,...yU,compareSchemas:Ud.compareSchemas,compareFields:Ud.compareFields,compareTypes:Ud.compareTypes}});var Nd=V(b=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});b.Utf8Builder=b.SparseUnionBuilder=b.DenseUnionBuilder=b.UnionBuilder=b.TimeNanosecondBuilder=b.TimeMicrosecondBuilder=b.TimeMillisecondBuilder=b.TimeSecondBuilder=b.TimeBuilder=b.TimestampNanosecondBuilder=b.TimestampMicrosecondBuilder=b.TimestampMillisecondBuilder=b.TimestampSecondBuilder=b.TimestampBuilder=b.StructBuilder=b.NullBuilder=b.MapBuilder=b.ListBuilder=b.Uint64Builder=b.Uint32Builder=b.Uint16Builder=b.Uint8Builder=b.Int64Builder=b.Int32Builder=b.Int16Builder=b.Int8Builder=b.IntBuilder=b.IntervalYearMonthBuilder=b.IntervalDayTimeBuilder=b.IntervalBuilder=b.Float64Builder=b.Float32Builder=b.Float16Builder=b.FloatBuilder=b.FixedSizeListBuilder=b.FixedSizeBinaryBuilder=b.DictionaryBuilder=b.DecimalBuilder=b.DateMillisecondBuilder=b.DateDayBuilder=b.DateBuilder=b.BoolBuilder=b.BinaryBuilder=b.Builder=b.util=b.predicate=b.CountByResult=b.FilteredDataFrame=b.DataFrame=b.RecordBatch=b.Message=b.JSONMessageReader=b.AsyncMessageReader=b.MessageReader=b.RecordBatchJSONWriter=b.RecordBatchStreamWriter=b.RecordBatchFileWriter=b.RecordBatchWriter=b.AsyncRecordBatchStreamReader=b.AsyncRecordBatchFileReader=b.RecordBatchStreamReader=b.RecordBatchFileReader=b.RecordBatchReader=b.AsyncByteQueue=b.AsyncByteStream=b.ByteStream=b.Utf8Vector=b.SparseUnionVector=b.DenseUnionVector=b.UnionVector=b.TimeNanosecondVector=b.TimeMicrosecondVector=b.TimeMillisecondVector=b.TimeSecondVector=b.TimeVector=b.TimestampNanosecondVector=b.TimestampMicrosecondVector=b.TimestampMillisecondVector=b.TimestampSecondVector=b.TimestampVector=b.StructVector=b.NullVector=b.MapVector=b.ListVector=b.Uint64Vector=b.Uint32Vector=b.Uint16Vector=b.Uint8Vector=b.Int64Vector=b.Int32Vector=b.Int16Vector=b.Int8Vector=b.IntVector=b.IntervalYearMonthVector=b.IntervalDayTimeVector=b.IntervalVector=b.Float64Vector=b.Float32Vector=b.Float16Vector=b.FloatVector=b.FixedSizeListVector=b.FixedSizeBinaryVector=b.DictionaryVector=b.DecimalVector=b.DateMillisecondVector=b.DateDayVector=b.DateVector=b.Chunked=b.BoolVector=b.BinaryVector=b.BaseVector=b.Vector=b.Visitor=b.Field=b.Schema=b.Column=b.Table=b.Map_=b.FixedSizeList=b.IntervalYearMonth=b.IntervalDayTime=b.Interval=b.Dictionary=b.SparseUnion=b.DenseUnion=b.Union=b.Struct=b.List=b.Decimal=b.TimeNanosecond=b.TimeMicrosecond=b.TimeMillisecond=b.TimeSecond=b.Time=b.TimestampNanosecond=b.TimestampMicrosecond=b.TimestampMillisecond=b.TimestampSecond=b.Timestamp=b.DateMillisecond=b.DateDay=b.Date_=b.FixedSizeBinary=b.Binary=b.Utf8=b.Float64=b.Float32=b.Float16=b.Float=b.Uint64=b.Uint32=b.Uint16=b.Uint8=b.Int64=b.Int32=b.Int16=b.Int8=b.Int=b.Bool=b.Null=b.DataType=b.Data=b.BufferType=b.UnionMode=b.Type=b.TimeUnit=b.Precision=b.MetadataVersion=b.MessageHeader=b.IntervalUnit=b.DateUnit=void 0;var _U=ns(),bU=ta(),Cd=ks(),Pd=Sa(),gU=av(),vU=lv(),kd=dv(),Rd=fv();_U.default.toDOMStream=gU.toDOMStream;bU.Builder.throughDOM=vU.builderThroughDOMStream;Cd.RecordBatchReader.throughDOM=kd.recordBatchReaderThroughDOMStream;Cd.RecordBatchFileReader.throughDOM=kd.recordBatchReaderThroughDOMStream;Cd.RecordBatchStreamReader.throughDOM=kd.recordBatchReaderThroughDOMStream;Pd.RecordBatchWriter.throughDOM=Rd.recordBatchWriterThroughDOMStream;Pd.RecordBatchFileWriter.throughDOM=Rd.recordBatchWriterThroughDOMStream;Pd.RecordBatchStreamWriter.throughDOM=Rd.recordBatchWriterThroughDOMStream;var D=vv();Object.defineProperty(b,"DateUnit",{enumerable:!0,get:function(){return D.DateUnit}});Object.defineProperty(b,"IntervalUnit",{enumerable:!0,get:function(){return D.IntervalUnit}});Object.defineProperty(b,"MessageHeader",{enumerable:!0,get:function(){return D.MessageHeader}});Object.defineProperty(b,"MetadataVersion",{enumerable:!0,get:function(){return D.MetadataVersion}});Object.defineProperty(b,"Precision",{enumerable:!0,get:function(){return D.Precision}});Object.defineProperty(b,"TimeUnit",{enumerable:!0,get:function(){return D.TimeUnit}});Object.defineProperty(b,"Type",{enumerable:!0,get:function(){return D.Type}});Object.defineProperty(b,"UnionMode",{enumerable:!0,get:function(){return D.UnionMode}});Object.defineProperty(b,"BufferType",{enumerable:!0,get:function(){return D.BufferType}});Object.defineProperty(b,"Data",{enumerable:!0,get:function(){return D.Data}});Object.defineProperty(b,"DataType",{enumerable:!0,get:function(){return D.DataType}});Object.defineProperty(b,"Null",{enumerable:!0,get:function(){return D.Null}});Object.defineProperty(b,"Bool",{enumerable:!0,get:function(){return D.Bool}});Object.defineProperty(b,"Int",{enumerable:!0,get:function(){return D.Int}});Object.defineProperty(b,"Int8",{enumerable:!0,get:function(){return D.Int8}});Object.defineProperty(b,"Int16",{enumerable:!0,get:function(){return D.Int16}});Object.defineProperty(b,"Int32",{enumerable:!0,get:function(){return D.Int32}});Object.defineProperty(b,"Int64",{enumerable:!0,get:function(){return D.Int64}});Object.defineProperty(b,"Uint8",{enumerable:!0,get:function(){return D.Uint8}});Object.defineProperty(b,"Uint16",{enumerable:!0,get:function(){return D.Uint16}});Object.defineProperty(b,"Uint32",{enumerable:!0,get:function(){return D.Uint32}});Object.defineProperty(b,"Uint64",{enumerable:!0,get:function(){return D.Uint64}});Object.defineProperty(b,"Float",{enumerable:!0,get:function(){return D.Float}});Object.defineProperty(b,"Float16",{enumerable:!0,get:function(){return D.Float16}});Object.defineProperty(b,"Float32",{enumerable:!0,get:function(){return D.Float32}});Object.defineProperty(b,"Float64",{enumerable:!0,get:function(){return D.Float64}});Object.defineProperty(b,"Utf8",{enumerable:!0,get:function(){return D.Utf8}});Object.defineProperty(b,"Binary",{enumerable:!0,get:function(){return D.Binary}});Object.defineProperty(b,"FixedSizeBinary",{enumerable:!0,get:function(){return D.FixedSizeBinary}});Object.defineProperty(b,"Date_",{enumerable:!0,get:function(){return D.Date_}});Object.defineProperty(b,"DateDay",{enumerable:!0,get:function(){return D.DateDay}});Object.defineProperty(b,"DateMillisecond",{enumerable:!0,get:function(){return D.DateMillisecond}});Object.defineProperty(b,"Timestamp",{enumerable:!0,get:function(){return D.Timestamp}});Object.defineProperty(b,"TimestampSecond",{enumerable:!0,get:function(){return D.TimestampSecond}});Object.defineProperty(b,"TimestampMillisecond",{enumerable:!0,get:function(){return D.TimestampMillisecond}});Object.defineProperty(b,"TimestampMicrosecond",{enumerable:!0,get:function(){return D.TimestampMicrosecond}});Object.defineProperty(b,"TimestampNanosecond",{enumerable:!0,get:function(){return D.TimestampNanosecond}});Object.defineProperty(b,"Time",{enumerable:!0,get:function(){return D.Time}});Object.defineProperty(b,"TimeSecond",{enumerable:!0,get:function(){return D.TimeSecond}});Object.defineProperty(b,"TimeMillisecond",{enumerable:!0,get:function(){return D.TimeMillisecond}});Object.defineProperty(b,"TimeMicrosecond",{enumerable:!0,get:function(){return D.TimeMicrosecond}});Object.defineProperty(b,"TimeNanosecond",{enumerable:!0,get:function(){return D.TimeNanosecond}});Object.defineProperty(b,"Decimal",{enumerable:!0,get:function(){return D.Decimal}});Object.defineProperty(b,"List",{enumerable:!0,get:function(){return D.List}});Object.defineProperty(b,"Struct",{enumerable:!0,get:function(){return D.Struct}});Object.defineProperty(b,"Union",{enumerable:!0,get:function(){return D.Union}});Object.defineProperty(b,"DenseUnion",{enumerable:!0,get:function(){return D.DenseUnion}});Object.defineProperty(b,"SparseUnion",{enumerable:!0,get:function(){return D.SparseUnion}});Object.defineProperty(b,"Dictionary",{enumerable:!0,get:function(){return D.Dictionary}});Object.defineProperty(b,"Interval",{enumerable:!0,get:function(){return D.Interval}});Object.defineProperty(b,"IntervalDayTime",{enumerable:!0,get:function(){return D.IntervalDayTime}});Object.defineProperty(b,"IntervalYearMonth",{enumerable:!0,get:function(){return D.IntervalYearMonth}});Object.defineProperty(b,"FixedSizeList",{enumerable:!0,get:function(){return D.FixedSizeList}});Object.defineProperty(b,"Map_",{enumerable:!0,get:function(){return D.Map_}});Object.defineProperty(b,"Table",{enumerable:!0,get:function(){return D.Table}});Object.defineProperty(b,"Column",{enumerable:!0,get:function(){return D.Column}});Object.defineProperty(b,"Schema",{enumerable:!0,get:function(){return D.Schema}});Object.defineProperty(b,"Field",{enumerable:!0,get:function(){return D.Field}});Object.defineProperty(b,"Visitor",{enumerable:!0,get:function(){return D.Visitor}});Object.defineProperty(b,"Vector",{enumerable:!0,get:function(){return D.Vector}});Object.defineProperty(b,"BaseVector",{enumerable:!0,get:function(){return D.BaseVector}});Object.defineProperty(b,"BinaryVector",{enumerable:!0,get:function(){return D.BinaryVector}});Object.defineProperty(b,"BoolVector",{enumerable:!0,get:function(){return D.BoolVector}});Object.defineProperty(b,"Chunked",{enumerable:!0,get:function(){return D.Chunked}});Object.defineProperty(b,"DateVector",{enumerable:!0,get:function(){return D.DateVector}});Object.defineProperty(b,"DateDayVector",{enumerable:!0,get:function(){return D.DateDayVector}});Object.defineProperty(b,"DateMillisecondVector",{enumerable:!0,get:function(){return D.DateMillisecondVector}});Object.defineProperty(b,"DecimalVector",{enumerable:!0,get:function(){return D.DecimalVector}});Object.defineProperty(b,"DictionaryVector",{enumerable:!0,get:function(){return D.DictionaryVector}});Object.defineProperty(b,"FixedSizeBinaryVector",{enumerable:!0,get:function(){return D.FixedSizeBinaryVector}});Object.defineProperty(b,"FixedSizeListVector",{enumerable:!0,get:function(){return D.FixedSizeListVector}});Object.defineProperty(b,"FloatVector",{enumerable:!0,get:function(){return D.FloatVector}});Object.defineProperty(b,"Float16Vector",{enumerable:!0,get:function(){return D.Float16Vector}});Object.defineProperty(b,"Float32Vector",{enumerable:!0,get:function(){return D.Float32Vector}});Object.defineProperty(b,"Float64Vector",{enumerable:!0,get:function(){return D.Float64Vector}});Object.defineProperty(b,"IntervalVector",{enumerable:!0,get:function(){return D.IntervalVector}});Object.defineProperty(b,"IntervalDayTimeVector",{enumerable:!0,get:function(){return D.IntervalDayTimeVector}});Object.defineProperty(b,"IntervalYearMonthVector",{enumerable:!0,get:function(){return D.IntervalYearMonthVector}});Object.defineProperty(b,"IntVector",{enumerable:!0,get:function(){return D.IntVector}});Object.defineProperty(b,"Int8Vector",{enumerable:!0,get:function(){return D.Int8Vector}});Object.defineProperty(b,"Int16Vector",{enumerable:!0,get:function(){return D.Int16Vector}});Object.defineProperty(b,"Int32Vector",{enumerable:!0,get:function(){return D.Int32Vector}});Object.defineProperty(b,"Int64Vector",{enumerable:!0,get:function(){return D.Int64Vector}});Object.defineProperty(b,"Uint8Vector",{enumerable:!0,get:function(){return D.Uint8Vector}});Object.defineProperty(b,"Uint16Vector",{enumerable:!0,get:function(){return D.Uint16Vector}});Object.defineProperty(b,"Uint32Vector",{enumerable:!0,get:function(){return D.Uint32Vector}});Object.defineProperty(b,"Uint64Vector",{enumerable:!0,get:function(){return D.Uint64Vector}});Object.defineProperty(b,"ListVector",{enumerable:!0,get:function(){return D.ListVector}});Object.defineProperty(b,"MapVector",{enumerable:!0,get:function(){return D.MapVector}});Object.defineProperty(b,"NullVector",{enumerable:!0,get:function(){return D.NullVector}});Object.defineProperty(b,"StructVector",{enumerable:!0,get:function(){return D.StructVector}});Object.defineProperty(b,"TimestampVector",{enumerable:!0,get:function(){return D.TimestampVector}});Object.defineProperty(b,"TimestampSecondVector",{enumerable:!0,get:function(){return D.TimestampSecondVector}});Object.defineProperty(b,"TimestampMillisecondVector",{enumerable:!0,get:function(){return D.TimestampMillisecondVector}});Object.defineProperty(b,"TimestampMicrosecondVector",{enumerable:!0,get:function(){return D.TimestampMicrosecondVector}});Object.defineProperty(b,"TimestampNanosecondVector",{enumerable:!0,get:function(){return D.TimestampNanosecondVector}});Object.defineProperty(b,"TimeVector",{enumerable:!0,get:function(){return D.TimeVector}});Object.defineProperty(b,"TimeSecondVector",{enumerable:!0,get:function(){return D.TimeSecondVector}});Object.defineProperty(b,"TimeMillisecondVector",{enumerable:!0,get:function(){return D.TimeMillisecondVector}});Object.defineProperty(b,"TimeMicrosecondVector",{enumerable:!0,get:function(){return D.TimeMicrosecondVector}});Object.defineProperty(b,"TimeNanosecondVector",{enumerable:!0,get:function(){return D.TimeNanosecondVector}});Object.defineProperty(b,"UnionVector",{enumerable:!0,get:function(){return D.UnionVector}});Object.defineProperty(b,"DenseUnionVector",{enumerable:!0,get:function(){return D.DenseUnionVector}});Object.defineProperty(b,"SparseUnionVector",{enumerable:!0,get:function(){return D.SparseUnionVector}});Object.defineProperty(b,"Utf8Vector",{enumerable:!0,get:function(){return D.Utf8Vector}});Object.defineProperty(b,"ByteStream",{enumerable:!0,get:function(){return D.ByteStream}});Object.defineProperty(b,"AsyncByteStream",{enumerable:!0,get:function(){return D.AsyncByteStream}});Object.defineProperty(b,"AsyncByteQueue",{enumerable:!0,get:function(){return D.AsyncByteQueue}});Object.defineProperty(b,"RecordBatchReader",{enumerable:!0,get:function(){return D.RecordBatchReader}});Object.defineProperty(b,"RecordBatchFileReader",{enumerable:!0,get:function(){return D.RecordBatchFileReader}});Object.defineProperty(b,"RecordBatchStreamReader",{enumerable:!0,get:function(){return D.RecordBatchStreamReader}});Object.defineProperty(b,"AsyncRecordBatchFileReader",{enumerable:!0,get:function(){return D.AsyncRecordBatchFileReader}});Object.defineProperty(b,"AsyncRecordBatchStreamReader",{enumerable:!0,get:function(){return D.AsyncRecordBatchStreamReader}});Object.defineProperty(b,"RecordBatchWriter",{enumerable:!0,get:function(){return D.RecordBatchWriter}});Object.defineProperty(b,"RecordBatchFileWriter",{enumerable:!0,get:function(){return D.RecordBatchFileWriter}});Object.defineProperty(b,"RecordBatchStreamWriter",{enumerable:!0,get:function(){return D.RecordBatchStreamWriter}});Object.defineProperty(b,"RecordBatchJSONWriter",{enumerable:!0,get:function(){return D.RecordBatchJSONWriter}});Object.defineProperty(b,"MessageReader",{enumerable:!0,get:function(){return D.MessageReader}});Object.defineProperty(b,"AsyncMessageReader",{enumerable:!0,get:function(){return D.AsyncMessageReader}});Object.defineProperty(b,"JSONMessageReader",{enumerable:!0,get:function(){return D.JSONMessageReader}});Object.defineProperty(b,"Message",{enumerable:!0,get:function(){return D.Message}});Object.defineProperty(b,"RecordBatch",{enumerable:!0,get:function(){return D.RecordBatch}});Object.defineProperty(b,"DataFrame",{enumerable:!0,get:function(){return D.DataFrame}});Object.defineProperty(b,"FilteredDataFrame",{enumerable:!0,get:function(){return D.FilteredDataFrame}});Object.defineProperty(b,"CountByResult",{enumerable:!0,get:function(){return D.CountByResult}});Object.defineProperty(b,"predicate",{enumerable:!0,get:function(){return D.predicate}});Object.defineProperty(b,"util",{enumerable:!0,get:function(){return D.util}});Object.defineProperty(b,"Builder",{enumerable:!0,get:function(){return D.Builder}});Object.defineProperty(b,"BinaryBuilder",{enumerable:!0,get:function(){return D.BinaryBuilder}});Object.defineProperty(b,"BoolBuilder",{enumerable:!0,get:function(){return D.BoolBuilder}});Object.defineProperty(b,"DateBuilder",{enumerable:!0,get:function(){return D.DateBuilder}});Object.defineProperty(b,"DateDayBuilder",{enumerable:!0,get:function(){return D.DateDayBuilder}});Object.defineProperty(b,"DateMillisecondBuilder",{enumerable:!0,get:function(){return D.DateMillisecondBuilder}});Object.defineProperty(b,"DecimalBuilder",{enumerable:!0,get:function(){return D.DecimalBuilder}});Object.defineProperty(b,"DictionaryBuilder",{enumerable:!0,get:function(){return D.DictionaryBuilder}});Object.defineProperty(b,"FixedSizeBinaryBuilder",{enumerable:!0,get:function(){return D.FixedSizeBinaryBuilder}});Object.defineProperty(b,"FixedSizeListBuilder",{enumerable:!0,get:function(){return D.FixedSizeListBuilder}});Object.defineProperty(b,"FloatBuilder",{enumerable:!0,get:function(){return D.FloatBuilder}});Object.defineProperty(b,"Float16Builder",{enumerable:!0,get:function(){return D.Float16Builder}});Object.defineProperty(b,"Float32Builder",{enumerable:!0,get:function(){return D.Float32Builder}});Object.defineProperty(b,"Float64Builder",{enumerable:!0,get:function(){return D.Float64Builder}});Object.defineProperty(b,"IntervalBuilder",{enumerable:!0,get:function(){return D.IntervalBuilder}});Object.defineProperty(b,"IntervalDayTimeBuilder",{enumerable:!0,get:function(){return D.IntervalDayTimeBuilder}});Object.defineProperty(b,"IntervalYearMonthBuilder",{enumerable:!0,get:function(){return D.IntervalYearMonthBuilder}});Object.defineProperty(b,"IntBuilder",{enumerable:!0,get:function(){return D.IntBuilder}});Object.defineProperty(b,"Int8Builder",{enumerable:!0,get:function(){return D.Int8Builder}});Object.defineProperty(b,"Int16Builder",{enumerable:!0,get:function(){return D.Int16Builder}});Object.defineProperty(b,"Int32Builder",{enumerable:!0,get:function(){return D.Int32Builder}});Object.defineProperty(b,"Int64Builder",{enumerable:!0,get:function(){return D.Int64Builder}});Object.defineProperty(b,"Uint8Builder",{enumerable:!0,get:function(){return D.Uint8Builder}});Object.defineProperty(b,"Uint16Builder",{enumerable:!0,get:function(){return D.Uint16Builder}});Object.defineProperty(b,"Uint32Builder",{enumerable:!0,get:function(){return D.Uint32Builder}});Object.defineProperty(b,"Uint64Builder",{enumerable:!0,get:function(){return D.Uint64Builder}});Object.defineProperty(b,"ListBuilder",{enumerable:!0,get:function(){return D.ListBuilder}});Object.defineProperty(b,"MapBuilder",{enumerable:!0,get:function(){return D.MapBuilder}});Object.defineProperty(b,"NullBuilder",{enumerable:!0,get:function(){return D.NullBuilder}});Object.defineProperty(b,"StructBuilder",{enumerable:!0,get:function(){return D.StructBuilder}});Object.defineProperty(b,"TimestampBuilder",{enumerable:!0,get:function(){return D.TimestampBuilder}});Object.defineProperty(b,"TimestampSecondBuilder",{enumerable:!0,get:function(){return D.TimestampSecondBuilder}});Object.defineProperty(b,"TimestampMillisecondBuilder",{enumerable:!0,get:function(){return D.TimestampMillisecondBuilder}});Object.defineProperty(b,"TimestampMicrosecondBuilder",{enumerable:!0,get:function(){return D.TimestampMicrosecondBuilder}});Object.defineProperty(b,"TimestampNanosecondBuilder",{enumerable:!0,get:function(){return D.TimestampNanosecondBuilder}});Object.defineProperty(b,"TimeBuilder",{enumerable:!0,get:function(){return D.TimeBuilder}});Object.defineProperty(b,"TimeSecondBuilder",{enumerable:!0,get:function(){return D.TimeSecondBuilder}});Object.defineProperty(b,"TimeMillisecondBuilder",{enumerable:!0,get:function(){return D.TimeMillisecondBuilder}});Object.defineProperty(b,"TimeMicrosecondBuilder",{enumerable:!0,get:function(){return D.TimeMicrosecondBuilder}});Object.defineProperty(b,"TimeNanosecondBuilder",{enumerable:!0,get:function(){return D.TimeNanosecondBuilder}});Object.defineProperty(b,"UnionBuilder",{enumerable:!0,get:function(){return D.UnionBuilder}});Object.defineProperty(b,"DenseUnionBuilder",{enumerable:!0,get:function(){return D.DenseUnionBuilder}});Object.defineProperty(b,"SparseUnionBuilder",{enumerable:!0,get:function(){return D.SparseUnionBuilder}});Object.defineProperty(b,"Utf8Builder",{enumerable:!0,get:function(){return D.Utf8Builder}})});var au=V(()=>{});var zd=V(()=>{});var Bv=V(()=>{});var BU={};SS(BU,{BROWSER_RUNTIME:()=>nt,ConsoleLogger:()=>Ay,DEFAULT_RUNTIME:()=>wv,DuckDB:()=>Sv,DuckDBBindings:()=>ou,DuckDBConnection:()=>nu,DuckDBDataProtocol:()=>Qe,DuckDBFeature:()=>Ed,FileStatistics:()=>su,InsertMode:()=>qd,JSONTableShape:()=>Ld,LogEvent:()=>br,LogLevel:()=>Nr,LogOrigin:()=>xr,LogTopic:()=>Bi,StatusCode:()=>je,VoidLogger:()=>Oy,callSRet:()=>Se,copyBuffer:()=>Gi,decodeText:()=>jv,dropResponseBuffers:()=>He,failWith:()=>We,getLogEventLabel:()=>AS,getLogLevelLabel:()=>OS,getLogOriginLabel:()=>MS,getLogTopicLabel:()=>FS,readString:()=>ve});var Nr;(function(s){s[s.NONE=0]="NONE",s[s.DEBUG=1]="DEBUG",s[s.INFO=2]="INFO",s[s.WARNING=3]="WARNING",s[s.ERROR=4]="ERROR"})(Nr||(Nr={}));var Bi;(function(s){s[s.NONE=0]="NONE",s[s.CONNECT=1]="CONNECT",s[s.DISCONNECT=2]="DISCONNECT",s[s.OPEN=3]="OPEN",s[s.QUERY=4]="QUERY"})(Bi||(Bi={}));var br;(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"})(br||(br={}));var xr;(function(s){s[s.NONE=0]="NONE",s[s.WEB_WORKER=1]="WEB_WORKER",s[s.NODE_WORKER=2]="NODE_WORKER",s[s.BINDINGS=3]="BINDINGS",s[s.ASYNC_DUCKDB=4]="ASYNC_DUCKDB"})(xr||(xr={}));var Oy=class{log(e){}},Ay=class{log(e){console.log(e)}};function OS(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 AS(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 FS(r){switch(r){case 1:return"CONNECT";case 2:return"DISCONNECT";case 3:return"OPEN";case 4:return"QUERY";default:return"?"}}function MS(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 je;(function(e){e[e.SUCCESS=0]="SUCCESS"})(je||(je={}));var Rt=Dy(Nd()),xd=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}},nu=class{constructor(e,t){this._bindings=e,this._conn=t}get handle(){return this._conn}close(){this._bindings.disconnect(this._conn)}runQuery(e){let t=this._bindings.runQuery(this._conn,e),i=Rt.RecordBatchReader.from(t);return console.assert(i.isSync()),console.assert(i.isFile()),Rt.Table.from(i)}sendQuery(e){let t=this._bindings.sendQuery(this._conn,e),i=new xd(this._bindings,this._conn,t),n=Rt.RecordBatchReader.from(i);return console.assert(n.isSync()),console.assert(n.isStream()),n}createPreparedStatement(e){return this._bindings.createPreparedStatement(this._conn,e)}closePreparedStatement(e){this._bindings.closePreparedStatement(this._conn,e)}runPreparedStatement(e,t){let i=this._bindings.runPreparedStatement(this._conn,e,t),n=Rt.RecordBatchReader.from(i);return console.assert(n.isSync()),console.assert(n.isFile()),Rt.Table.from(n)}sendPreparedStatement(e,t){let i=this._bindings.sendPreparedStatement(this._conn,e,t),n=new xd(this._bindings,this._conn,i),s=Rt.RecordBatchReader.from(n);return console.assert(s.isSync()),console.assert(s.isStream()),s}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 Rt.AsyncByteQueue,s=new Rt.RecordBatchStreamWriter().reset(n,e);s.writeAll(t),s.close();let c=s.toUint8Array(!0);this._bindings.insertArrowFromIPCStream(this._conn,c,i)}insertCSVFromPath(e,t){this._bindings.insertCSVFromPath(this._conn,e,t)}insertJSONFromPath(e,t){this._bindings.insertJSONFromPath(this._conn,e,t)}};function jU(){let r=new TextDecoder;return e=>(typeof SharedArrayBuffer!="undefined"&&e.buffer instanceof SharedArrayBuffer&&(e=new Uint8Array(e)),r.decode(e))}var jv=jU();function We(r,e){console.error(e),r.ccall("duckdb_web_fail_with",null,["string"],[e])}function Gi(r,e,t){let i=r.HEAPU8.subarray(e,e+t),n=new Uint8Array(new ArrayBuffer(i.byteLength));return n.set(i),n}function ve(r,e,t){return jv(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 Se(r,e,t,i){let n=r.stackSave(),s=r.stackAlloc(3*8);t.unshift("number"),i.unshift(s),r.ccall(e,null,t,i);let c=r.HEAPF64[(s>>3)+0],v=r.HEAPF64[(s>>3)+1],I=r.HEAPF64[(s>>3)+2];return r.stackRestore(n),[c,v,I]}function He(r){r.ccall("duckdb_web_clear_response",null,[],[])}var wv={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 su=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=Dy(Nd());function Ws(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:[Ws(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=>Ws(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 Ed;(function(s){s[s.WASM_EXCEPTIONS=1]="WASM_EXCEPTIONS",s[s.WASM_THREADS=2]="WASM_THREADS",s[s.WASM_SIMD=4]="WASM_SIMD",s[s.WASM_BULK_MEMORY=8]="WASM_BULK_MEMORY",s[s.EMIT_BIGINT=16]="EMIT_BIGINT"})(Ed||(Ed={}));var ou=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]=Se(this.mod,"duckdb_web_open",["string"],[JSON.stringify(e)]);if(t!==je.SUCCESS)throw new Error(ve(this.mod,i,n));He(this.mod)}reset(){let[e,t,i]=Se(this.mod,"duckdb_web_reset",[],[]);if(e!==je.SUCCESS)throw new Error(ve(this.mod,t,i));He(this.mod)}getVersion(){let[e,t,i]=Se(this.mod,"duckdb_web_get_version",[],[]);if(e!==je.SUCCESS)throw new Error(ve(this.mod,t,i));let n=ve(this.mod,t,i);return He(this.mod),n}getFeatureFlags(){return this.mod.ccall("duckdb_web_get_feature_flags","number",[],[])}tokenize(e){let[t,i,n]=Se(this.mod,"duckdb_web_tokenize",["string"],[e]);if(t!==je.SUCCESS)throw new Error(ve(this.mod,i,n));let s=ve(this.mod,i,n);return He(this.mod),JSON.parse(s)}connect(){let e=this.mod.ccall("duckdb_web_connect","number",[],[]);return new nu(this,e)}disconnect(e){this.mod.ccall("duckdb_web_disconnect",null,["number"],[e])}runQuery(e,t){let[i,n,s]=Se(this.mod,"duckdb_web_query_run",["number","string"],[e,t]);if(i!==je.SUCCESS)throw new Error(ve(this.mod,n,s));let c=Gi(this.mod,n,s);return He(this.mod),c}sendQuery(e,t){let[i,n,s]=Se(this.mod,"duckdb_web_query_send",["number","string"],[e,t]);if(i!==je.SUCCESS)throw new Error(ve(this.mod,n,s));let c=Gi(this.mod,n,s);return He(this.mod),c}fetchQueryResults(e){let[t,i,n]=Se(this.mod,"duckdb_web_query_fetch_results",["number"],[e]);if(t!==je.SUCCESS)throw new Error(ve(this.mod,i,n));let s=Gi(this.mod,i,n);return He(this.mod),s}createPreparedStatement(e,t){let[i,n,s]=Se(this.mod,"duckdb_web_prepared_statement_create",["number","string"],[e,t]);if(i!==je.SUCCESS)throw new Error(ve(this.mod,n,s));return He(this.mod),n}closePreparedStatement(e,t){let[i,n,s]=Se(this.mod,"duckdb_web_prepared_statement_close",["number","number"],[e,t]);if(i!==je.SUCCESS)throw new Error(ve(this.mod,n,s));He(this.mod)}runPreparedStatement(e,t,i){let[n,s,c]=Se(this.mod,"duckdb_web_prepared_statement_run",["number","number","string"],[e,t,JSON.stringify(i)]);if(n!==je.SUCCESS)throw new Error(ve(this.mod,s,c));let v=Gi(this.mod,s,c);return He(this.mod),v}sendPreparedStatement(e,t,i){let[n,s,c]=Se(this.mod,"duckdb_web_prepared_statement_send",["number","number","string"],[e,t,JSON.stringify(i)]);if(n!==je.SUCCESS)throw new Error(ve(this.mod,s,c));let v=Gi(this.mod,s,c);return He(this.mod),v}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):"",[v,I,S]=Se(this.mod,"duckdb_web_insert_arrow_from_ipc_stream",["number","number","number","string"],[e,n,t.length,c]);if(v!==je.SUCCESS)throw new Error(ve(this.mod,I,S))}insertCSVFromPath(e,t,i){if(i.columns!==void 0){i.columnsFlat=[];for(let S in i.columns)i.columnsFlat.push(Ws(S,i.columns[S]))}let n={...i};n.columns=n.columnsFlat,delete n.columnsFlat;let s=JSON.stringify(n),[c,v,I]=Se(this.mod,"duckdb_web_insert_csv_from_path",["number","string","string"],[e,t,s]);if(c!==je.SUCCESS)throw new Error(ve(this.mod,v,I))}insertJSONFromPath(e,t,i){if(i.columns!==void 0){i.columnsFlat=[];for(let S in i.columns)i.columnsFlat.push(Ws(S,i.columns[S]))}let n={...i};n.columns=n.columnsFlat,delete n.columnsFlat;let s=JSON.stringify(n),[c,v,I]=Se(this.mod,"duckdb_web_insert_json_from_path",["number","string","string"],[e,t,s]);if(c!==je.SUCCESS)throw new Error(ve(this.mod,v,I))}finishInsert(e,t){}registerFileURL(e,t){t===void 0&&(t=e);let[i,n,s]=Se(this.mod,"duckdb_web_fs_register_file_url",["string","string"],[e,t]);if(i!==je.SUCCESS)throw new Error(ve(this.mod,n,s));He(this.mod)}registerFileBuffer(e,t){let i=this.mod._malloc(t.length);this.mod.HEAPU8.subarray(i,i+t.length).set(t);let[s,c,v]=Se(this.mod,"duckdb_web_fs_register_file_buffer",["string","number","number"],[e,i,t.length]);if(s!==je.SUCCESS)throw new Error(ve(this.mod,c,v));He(this.mod)}registerFileHandle(e,t){let[i,n,s]=Se(this.mod,"duckdb_web_fs_register_file_url",["string","string"],[e,e]);if(i!==je.SUCCESS)throw new Error(ve(this.mod,n,s));if(He(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,s]=Se(this.mod,"duckdb_web_copy_file_to_path",["string","string"],[e,t]);if(i!==je.SUCCESS)throw new Error(ve(this.mod,n,s));He(this.mod)}copyFileToBuffer(e){let[t,i,n]=Se(this.mod,"duckdb_web_copy_file_to_buffer",["string"],[e]);if(t!==je.SUCCESS)throw new Error(ve(this.mod,i,n));let s=this.mod.HEAPU8.subarray(i,i+n),c=new Uint8Array(s.length);return c.set(s),He(this.mod),c}collectFileStatistics(e,t){let[i,n,s]=Se(this.mod,"duckdb_web_collect_file_stats",["string","boolean"],[e,t]);if(i!==je.SUCCESS)throw new Error(ve(this.mod,n,s))}exportFileStatistics(e){let[t,i,n]=Se(this.mod,"duckdb_web_export_file_stats",["string"],[e]);if(t!==je.SUCCESS)throw new Error(ve(this.mod,i,n));return new su(this.mod.HEAPU8.subarray(i,i+n))}};var Ld;(function(t){t.ROW_ARRAY="row-array",t.COLUMN_OBJECT="column-object"})(Ld||(Ld={}));var qd;(function(t){t[t.APPEND=0]="APPEND",t[t.IMPORT=1]="IMPORT"})(qd||(qd={}));var Iv={},wU=function(){var r=Iv.url;return function(e){e=e||{};var t=typeof e!="undefined"?e:{},i,n;t.ready=new Promise(function(o,a){i=o,n=a});var s={},c;for(c in t)t.hasOwnProperty(c)&&(s[c]=t[c]);var v=[],I="./this.program",S=function(o,a){throw a},U=typeof window=="object",G=typeof importScripts=="function",me=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",fe="";function Gt(o){return t.locateFile?t.locateFile(o,fe):fe+o}var Cr,_r,Ji,Dv,Ki,Zi;me?(G?fe=au().dirname(fe)+"/":fe=__dirname+"/",Cr=function(a,u){return Ki||(Ki=zd()),Zi||(Zi=au()),a=Zi.normalize(a),Ki.readFileSync(a,u?null:"utf8")},Ji=function(a){var u=Cr(a,!0);return u.buffer||(u=new Uint8Array(u)),$d(u.buffer),u},_r=function(a,u,l){Ki||(Ki=zd()),Zi||(Zi=au()),a=Zi.normalize(a),Ki.readFile(a,function(d,f){d?l(d):u(f.buffer)})},process.argv.length>1&&(I=process.argv[1].replace(/\\/g,"/")),v=process.argv.slice(2),process.on("uncaughtException",function(o){if(!(o instanceof mu))throw o}),process.on("unhandledRejection",Nt),S=function(o,a){if(nf())throw process.exitCode=o,a;process.exit(o)},t.inspect=function(){return"[Emscripten Module object]"}):(U||G)&&(G?fe=self.location.href:typeof document!="undefined"&&document.currentScript&&(fe=document.currentScript.src),r&&(fe=r),fe.indexOf("blob:")!==0?fe=fe.substr(0,fe.lastIndexOf("/")+1):fe="",Cr=function(o){var a=new XMLHttpRequest;return a.open("GET",o,!1),a.send(null),a.responseText},G&&(Ji=function(o){var a=new XMLHttpRequest;return a.open("GET",o,!1),a.responseType="arraybuffer",a.send(null),new Uint8Array(a.response)}),_r=function(o,a,u){var l=new XMLHttpRequest;l.open("GET",o,!0),l.responseType="arraybuffer",l.onload=function(){if(l.status==200||l.status==0&&l.response){a(l.response);return}u()},l.onerror=u,l.send(null)},Dv=function(o){document.title=o});var Ov=t.print||console.log.bind(console),Pr=t.printErr||console.warn.bind(console);for(c in s)s.hasOwnProperty(c)&&(t[c]=s[c]);s=null,t.arguments&&(v=t.arguments),t.thisProgram&&(I=t.thisProgram),t.quit&&(S=t.quit);var Hd=0,ht=function(o){Hd=o},Av=function(){return Hd},es;t.wasmBinary&&(es=t.wasmBinary);var Fv=t.noExitRuntime||!0;typeof WebAssembly!="object"&&Nt("no native wasm support detected");var Hs,uu=!1,Yd;function $d(o,a){o||Nt("Assertion failed: "+a)}function Mv(o){var a=t["_"+o];return $d(a,"Cannot call unknown function "+o+", make sure it is exported"),a}function Vv(o,a,u,l,d){var f={string:function(M){var x=0;if(M!=null&&M!==0){var ue=(M.length<<2)+1;x=hu(ue),Uv(M,x,ue)}return x},array:function(M){var x=hu(M.length);return Zd(M,x),x}};function h(M){return a==="string"?Ys(M):a==="boolean"?Boolean(M):M}var p=Mv(o),y=[],m=0;if(l)for(var g=0;g<l.length;g++){var j=f[u[g]];j?(m===0&&(m=w()),y[g]=j(l[g])):y[g]=l[g]}var O=p.apply(null,y);return O=h(O),m!==0&&B(m),O}var Gd=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):void 0;function Jd(o,a,u){for(var l=a+u,d=a;o[d]&&!(d>=l);)++d;if(d-a>16&&o.subarray&&Gd)return Gd.decode(o.subarray(a,d));for(var f="";a<d;){var h=o[a++];if(!(h&128)){f+=String.fromCharCode(h);continue}var p=o[a++]&63;if((h&224)==192){f+=String.fromCharCode((h&31)<<6|p);continue}var y=o[a++]&63;if((h&240)==224?h=(h&15)<<12|p<<6|y:h=(h&7)<<18|p<<12|y<<6|o[a++]&63,h<65536)f+=String.fromCharCode(h);else{var m=h-65536;f+=String.fromCharCode(55296|m>>10,56320|m&1023)}}return f}function Ys(o,a){return o?Jd(Xi,o,a):""}function Kd(o,a,u,l){if(!(l>0))return 0;for(var d=u,f=u+l-1,h=0;h<o.length;++h){var p=o.charCodeAt(h);if(p>=55296&&p<=57343){var y=o.charCodeAt(++h);p=65536+((p&1023)<<10)|y&1023}if(p<=127){if(u>=f)break;a[u++]=p}else if(p<=2047){if(u+1>=f)break;a[u++]=192|p>>6,a[u++]=128|p&63}else if(p<=65535){if(u+2>=f)break;a[u++]=224|p>>12,a[u++]=128|p>>6&63,a[u++]=128|p&63}else{if(u+3>=f)break;a[u++]=240|p>>18,a[u++]=128|p>>12&63,a[u++]=128|p>>6&63,a[u++]=128|p&63}}return a[u]=0,u-d}function Uv(o,a,u){return Kd(o,Xi,a,u)}function Cv(o){for(var a=0,u=0;u<o.length;++u){var l=o.charCodeAt(u);l>=55296&&l<=57343&&(l=65536+((l&1023)<<10)|o.charCodeAt(++u)&1023),l<=127?++a:l<=2047?a+=2:l<=65535?a+=3:a+=4}return a}function Zd(o,a){Jt.set(o,a)}function Pv(o,a,u){for(var l=0;l<o.length;++l)Jt[a++>>0]=o.charCodeAt(l);u||(Jt[a>>0]=0)}function kv(o,a){return o%a>0&&(o+=a-o%a),o}var Xd,Jt,Xi,Rv,Nv,ae,xv,Ev,Lv;function Qd(o){Xd=o,t.HEAP8=Jt=new Int8Array(o),t.HEAP16=Rv=new Int16Array(o),t.HEAP32=ae=new Int32Array(o),t.HEAPU8=Xi=new Uint8Array(o),t.HEAPU16=Nv=new Uint16Array(o),t.HEAPU32=xv=new Uint32Array(o),t.HEAPF32=Ev=new Float32Array(o),t.HEAPF64=Lv=new Float64Array(o)}var TU=t.INITIAL_MEMORY||16777216,H,ef=[],tf=[],qv=[],rf=[],zv=!1,Wv=!1,Hv=0;function nf(){return Fv||Hv>0}function Yv(){if(t.preRun)for(typeof t.preRun=="function"&&(t.preRun=[t.preRun]);t.preRun.length;)Zv(t.preRun.shift());$s(ef)}function $v(){zv=!0,$s(tf)}function Gv(){$s(qv)}function Jv(){Wv=!0}function Kv(){if(t.postRun)for(typeof t.postRun=="function"&&(t.postRun=[t.postRun]);t.postRun.length;)Qv(t.postRun.shift());$s(rf)}function Zv(o){ef.unshift(o)}function Xv(o){tf.unshift(o)}function Qv(o){rf.unshift(o)}var ji=0,cu=null,ts=null;function ej(o){ji++,t.monitorRunDependencies&&t.monitorRunDependencies(ji)}function tj(o){if(ji--,t.monitorRunDependencies&&t.monitorRunDependencies(ji),ji==0&&(cu!==null&&(clearInterval(cu),cu=null),ts)){var a=ts;ts=null,a()}}t.preloadedImages={},t.preloadedAudios={};function Nt(o){t.onAbort&&t.onAbort(o),o+="",Pr(o),uu=!0,Yd=1,o="abort("+o+"). Build with -s ASSERTIONS=1 for more info.";var a=new WebAssembly.RuntimeError(o);throw n(a),a}var rj="data:application/octet-stream;base64,";function sf(o){return o.startsWith(rj)}var _t;t.locateFile?(_t="duckdb_wasm.wasm",sf(_t)||(_t=Gt(_t))):_t=new URL("duckdb_wasm.wasm",Iv.url).toString();function of(o){try{if(o==_t&&es)return new Uint8Array(es);if(Ji)return Ji(o);throw"both async and sync fetching of the wasm failed"}catch(a){Nt(a)}}function ij(){return!es&&(U||G)&&typeof fetch=="function"?fetch(_t,{credentials:"same-origin"}).then(function(o){if(!o.ok)throw"failed to load wasm binary file at '"+_t+"'";return o.arrayBuffer()}).catch(function(){return of(_t)}):Promise.resolve().then(function(){return of(_t)})}function nj(){var o={a:B0};function a(h,p){var y=h.exports;t.asm=y,Hs=t.asm.xe,Qd(Hs.buffer),H=t.asm.Ae,Xv(t.asm.ye),tj("wasm-instantiate")}ej("wasm-instantiate");function u(h){a(h.instance)}function l(h){return ij().then(function(p){var y=WebAssembly.instantiate(p,o);return y}).then(h,function(p){Pr("failed to asynchronously prepare wasm: "+p),Nt(p)})}function d(){return!es&&typeof WebAssembly.instantiateStreaming=="function"&&!sf(_t)&&typeof fetch=="function"?fetch(_t,{credentials:"same-origin"}).then(function(h){var p=WebAssembly.instantiateStreaming(h,o);return p.then(u,function(y){return Pr("wasm streaming compile failed: "+y),Pr("falling back to ArrayBuffer instantiation"),l(u)})}):l(u)}if(t.instantiateWasm)try{var f=t.instantiateWasm(o,a);return f}catch(h){return Pr("Module.instantiateWasm callback failed with error: "+h),!1}return d().catch(n),{}}function $s(o){for(;o.length>0;){var a=o.shift();if(typeof a=="function"){a(t);continue}var u=a.func;typeof u=="number"?a.arg===void 0?H.get(u)():H.get(u)(a.arg):u(a.arg===void 0?null:a.arg)}}function sj(o){return pu(o+16)+16}function Qi(o){this.excPtr=o,this.ptr=o-16,this.set_type=function(a){ae[this.ptr+4>>2]=a},this.get_type=function(){return ae[this.ptr+4>>2]},this.set_destructor=function(a){ae[this.ptr+8>>2]=a},this.get_destructor=function(){return ae[this.ptr+8>>2]},this.set_refcount=function(a){ae[this.ptr>>2]=a},this.set_caught=function(a){a=a?1:0,Jt[this.ptr+12>>0]=a},this.get_caught=function(){return Jt[this.ptr+12>>0]!=0},this.set_rethrown=function(a){a=a?1:0,Jt[this.ptr+13>>0]=a},this.get_rethrown=function(){return Jt[this.ptr+13>>0]!=0},this.init=function(a,u){this.set_type(a),this.set_destructor(u),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var a=ae[this.ptr>>2];ae[this.ptr>>2]=a+1},this.release_ref=function(){var a=ae[this.ptr>>2];return ae[this.ptr>>2]=a-1,a===1}}function rs(o){this.free=function(){yu(this.ptr),this.ptr=0},this.set_base_ptr=function(a){ae[this.ptr>>2]=a},this.get_base_ptr=function(){return ae[this.ptr>>2]},this.set_adjusted_ptr=function(a){ae[this.ptr+4>>2]=a},this.get_adjusted_ptr_addr=function(){return this.ptr+4},this.get_adjusted_ptr=function(){return ae[this.ptr+4>>2]},this.get_exception_ptr=function(){var a=cf(this.get_exception_info().get_type());if(a)return ae[this.get_base_ptr()>>2];var u=this.get_adjusted_ptr();return u!==0?u:this.get_base_ptr()},this.get_exception_info=function(){return new Qi(this.get_base_ptr())},o===void 0?(this.ptr=pu(8),this.set_adjusted_ptr(0)):this.ptr=o}var Gs=[];function oj(o){o.add_ref()}var Js=0;function aj(o){var a=new rs(o),u=a.get_exception_info();return u.get_caught()||(u.set_caught(!0),Js--),u.set_rethrown(!1),Gs.push(a),oj(u),a.get_exception_ptr()}var kr=0;function af(o){return yu(new Qi(o).ptr)}function uj(o){if(o.release_ref()&&!o.get_rethrown()){var a=o.get_destructor();a&&H.get(a)(o.excPtr),af(o.excPtr)}}function cj(){T(0);var o=Gs.pop();uj(o.get_exception_info()),o.free(),kr=0}function lj(o){var a=new rs(o),u=a.get_base_ptr();throw kr||(kr=u),a.free(),u}function dj(){var o=kr;if(!o)return ht(0),0|0;var a=new Qi(o),u=a.get_type(),l=new rs;if(l.set_base_ptr(o),l.set_adjusted_ptr(o),!u)return ht(0),l.ptr|0;for(var d=Array.prototype.slice.call(arguments),f=0;f<d.length;f++){var h=d[f];if(h===0||h===u)break;if(to(h,u,l.get_adjusted_ptr_addr()))return ht(h),l.ptr|0}return ht(u),l.ptr|0}function fj(){var o=kr;if(!o)return ht(0),0|0;var a=new Qi(o),u=a.get_type(),l=new rs;if(l.set_base_ptr(o),l.set_adjusted_ptr(o),!u)return ht(0),l.ptr|0;for(var d=Array.prototype.slice.call(arguments),f=0;f<d.length;f++){var h=d[f];if(h===0||h===u)break;if(to(h,u,l.get_adjusted_ptr_addr()))return ht(h),l.ptr|0}return ht(u),l.ptr|0}function hj(){var o=kr;if(!o)return ht(0),0|0;var a=new Qi(o),u=a.get_type(),l=new rs;if(l.set_base_ptr(o),l.set_adjusted_ptr(o),!u)return ht(0),l.ptr|0;for(var d=Array.prototype.slice.call(arguments),f=0;f<d.length;f++){var h=d[f];if(h===0||h===u)break;if(to(h,u,l.get_adjusted_ptr_addr()))return ht(h),l.ptr|0}return ht(u),l.ptr|0}function pj(){var o=Gs.pop();o||Nt("no exception to throw");var a=o.get_exception_info(),u=o.get_base_ptr();throw a.get_rethrown()?o.free():(Gs.push(o),a.set_rethrown(!0),a.set_caught(!1),Js++),kr=u,u}function yj(o,a,u){var l=new Qi(o);throw l.init(a,u),kr=o,Js++,o}function mj(){return Js}var Je={mappings:{},buffers:[null,[],[]],printChar:function(o,a){var u=Je.buffers[o];a===0||a===10?((o===1?Ov:Pr)(Jd(u,0)),u.length=0):u.push(a)},varargs:void 0,get:function(){Je.varargs+=4;var o=ae[Je.varargs-4>>2];return o},getStr:function(o){var a=Ys(o);return a},get64:function(o,a){return o}};function _j(o,a){return o=Je.getStr(o),Je.doAccess(o,a)}function bj(o){return ae[uf()>>2]=o,o}function gj(o,a,u){return Je.varargs=u,0}function vj(o,a){}function jj(o,a,u,l){}function wj(o,a,u){}function Bj(){return 42}function Tj(o,a,u){return Je.varargs=u,0}var Ij=function(o,a,u){return Pr("warning: unsupported syscall: __sys_madvise1"),0};function Sj(o,a){return o=Je.getStr(o),Je.doMkdir(o,a)}function Dj(o,a,u){Je.varargs=u}function Oj(o,a){}function Aj(o){}function Fj(o,a){}function Mj(o){}function Vj(){Nt()}var lu;me?lu=function(){var o=process.hrtime();return o[0]*1e3+o[1]/1e6}:lu=function(){return performance.now()};var Uj=!0;function Cj(o,a){var u;if(o===0)u=Date.now();else if((o===1||o===4)&&Uj)u=lu();else return bj(28),-1;return ae[a>>2]=u/1e3|0,ae[a+4>>2]=u%1e3*1e3*1e3|0,0}function Pj(o,a){Nt("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")}function kj(o,a){Nt("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")}function Rj(o,a){return globalThis.DUCKDB_RUNTIME.createDirectory(t,o,a)}function Nj(o,a){return globalThis.DUCKDB_RUNTIME.checkDirectory(t,o,a)}function xj(o,a){return globalThis.DUCKDB_RUNTIME.listDirectoryEntries(t,o,a)}function Ej(o,a){return globalThis.DUCKDB_RUNTIME.removeDirectory(t,o,a)}function Lj(o){return globalThis.DUCKDB_RUNTIME.closeFile(t,o)}function qj(o,a){return globalThis.DUCKDB_RUNTIME.checkFile(t,o,a)}function zj(o){return globalThis.DUCKDB_RUNTIME.getLastFileModificationTime(t,o)}function Wj(o){return globalThis.DUCKDB_RUNTIME.getFileSize(t,o)}function Hj(o,a,u,l){return globalThis.DUCKDB_RUNTIME.moveFile(t,o,a,u,l)}function Yj(o){return globalThis.DUCKDB_RUNTIME.openFile(t,o)}function $j(o,a,u,l){return globalThis.DUCKDB_RUNTIME.readFile(t,o,a,u,l)}function Gj(o,a){return globalThis.DUCKDB_RUNTIME.truncateFile(t,o,a)}function Jj(o,a,u,l){return globalThis.DUCKDB_RUNTIME.writeFile(t,o,a,u,l)}function Kj(o,a){return globalThis.DUCKDB_RUNTIME.glob(t,o,a)}function Zj(o){return globalThis.DUCKDB_RUNTIME.testPlatformFeature(t,o)}function Xj(){return 2147483648}function Qj(o,a,u){Xi.copyWithin(o,a,a+u)}function e0(o){try{return Hs.grow(o-Xd.byteLength+65535>>>16),Qd(Hs.buffer),1}catch{}}function t0(o){var a=Xi.length;o=o>>>0;var u=2147483648;if(o>u)return!1;for(var l=1;l<=4;l*=2){var d=a*(1+.2/l);d=Math.min(d,o+100663296);var f=Math.min(u,kv(Math.max(o,d),65536)),h=e0(f);if(h)return!0}return!1}var du={};function r0(){return I||"./this.program"}function is(){if(!is.strings){var o=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:o,_:r0()};for(var u in du)du[u]===void 0?delete a[u]:a[u]=du[u];var l=[];for(var u in a)l.push(u+"="+a[u]);is.strings=l}return is.strings}function i0(o,a){var u=0;return is().forEach(function(l,d){var f=a+u;ae[o+d*4>>2]=f,Pv(l,f),u+=l.length+1}),0}function n0(o,a){var u=is();ae[o>>2]=u.length;var l=0;return u.forEach(function(d){l+=d.length+1}),ae[a>>2]=l,0}function s0(o){return 0}function o0(o,a){var u=o==1||o==2?2:Nt();return Jt[a>>0]=u,0}function a0(o,a,u,l,d,f){var h=Je.getStreamFromFD(o),p=Je.doReadv(h,a,u,l);return ae[f>>2]=p,0}function u0(o,a,u,l,d,f){var h=Je.getStreamFromFD(o),p=Je.doWritev(h,a,u,l);return ae[f>>2]=p,0}function c0(o,a,u,l){var d=Je.getStreamFromFD(o),f=Je.doReadv(d,a,u);return ae[l>>2]=f,0}function l0(o,a,u,l,d){}function d0(o){var a=Je.getStreamFromFD(o);return a.stream_ops&&a.stream_ops.fsync?-a.stream_ops.fsync(a):0}function f0(o,a,u,l){for(var d=0,f=0;f<u;f++){for(var h=ae[a+f*8>>2],p=ae[a+(f*8+4)>>2],y=0;y<p;y++)Je.printChar(o,Xi[h+y]);d+=p}return ae[l>>2]=d,0}function h0(){return Av()}function p0(){if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function"){var o=new Uint8Array(1);return function(){return crypto.getRandomValues(o),o[0]}}else if(me)try{var a=Bv();return function(){return a.randomBytes(1)[0]}}catch{}return function(){Nt("randomDevice")}}function Ks(o,a){Ks.randomDevice||(Ks.randomDevice=p0());for(var u=0;u<a;u++)Jt[o+u>>0]=Ks.randomDevice();return 0}function y0(o){return o}function m0(o){ht(o)}var _0=0;function b0(o,a,u){return o==14&&(_0=ae[a>>2]),0}function g0(o,a,u){return b0(o,a,u)}function Zs(o){return o%4==0&&(o%100!=0||o%400==0)}function fu(o,a){for(var u=0,l=0;l<=a;u+=o[l++]);return u}var Xs=[31,29,31,30,31,30,31,31,30,31,30,31],Qs=[31,28,31,30,31,30,31,31,30,31,30,31];function eo(o,a){for(var u=new Date(o.getTime());a>0;){var l=Zs(u.getFullYear()),d=u.getMonth(),f=(l?Xs:Qs)[d];if(a>f-u.getDate())a-=f-u.getDate()+1,u.setDate(1),d<11?u.setMonth(d+1):(u.setMonth(0),u.setFullYear(u.getFullYear()+1));else return u.setDate(u.getDate()+a),u}return u}function v0(o,a,u,l){var d=ae[l+40>>2],f={tm_sec:ae[l>>2],tm_min:ae[l+4>>2],tm_hour:ae[l+8>>2],tm_mday:ae[l+12>>2],tm_mon:ae[l+16>>2],tm_year:ae[l+20>>2],tm_wday:ae[l+24>>2],tm_yday:ae[l+28>>2],tm_isdst:ae[l+32>>2],tm_gmtoff:ae[l+36>>2],tm_zone:d?Ys(d):""},h=Ys(u),p={"%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 y in p)h=h.replace(new RegExp(y,"g"),p[y]);var m=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],g=["January","February","March","April","May","June","July","August","September","October","November","December"];function j(P,$,Ae){for(var ye=typeof P=="number"?P.toString():P||"";ye.length<$;)ye=Ae[0]+ye;return ye}function O(P,$){return j(P,$,"0")}function M(P,$){function Ae(at){return at<0?-1:at>0?1:0}var ye;return(ye=Ae(P.getFullYear()-$.getFullYear()))===0&&(ye=Ae(P.getMonth()-$.getMonth()))===0&&(ye=Ae(P.getDate()-$.getDate())),ye}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 ue(P){var $=eo(new Date(P.tm_year+1900,0,1),P.tm_yday),Ae=new Date($.getFullYear(),0,4),ye=new Date($.getFullYear()+1,0,4),at=x(Ae),Rr=x(ye);return M(at,$)<=0?M(Rr,$)<=0?$.getFullYear()+1:$.getFullYear():$.getFullYear()-1}var _e={"%a":function(P){return m[P.tm_wday].substring(0,3)},"%A":function(P){return m[P.tm_wday]},"%b":function(P){return g[P.tm_mon].substring(0,3)},"%B":function(P){return g[P.tm_mon]},"%C":function(P){var $=P.tm_year+1900;return O($/100|0,2)},"%d":function(P){return O(P.tm_mday,2)},"%e":function(P){return j(P.tm_mday,2," ")},"%g":function(P){return ue(P).toString().substring(2)},"%G":function(P){return ue(P)},"%H":function(P){return O(P.tm_hour,2)},"%I":function(P){var $=P.tm_hour;return $==0?$=12:$>12&&($-=12),O($,2)},"%j":function(P){return O(P.tm_mday+fu(Zs(P.tm_year+1900)?Xs:Qs,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 $=new Date(P.tm_year+1900,0,1),Ae=$.getDay()===0?$:eo($,7-$.getDay()),ye=new Date(P.tm_year+1900,P.tm_mon,P.tm_mday);if(M(Ae,ye)<0){var at=fu(Zs(ye.getFullYear())?Xs:Qs,ye.getMonth()-1)-31,Rr=31-Ae.getDate(),wi=Rr+at+ye.getDate();return O(Math.ceil(wi/7),2)}return M(Ae,$)===0?"01":"00"},"%V":function(P){var $=new Date(P.tm_year+1900,0,4),Ae=new Date(P.tm_year+1901,0,4),ye=x($),at=x(Ae),Rr=eo(new Date(P.tm_year+1900,0,1),P.tm_yday);if(M(Rr,ye)<0)return"53";if(M(at,Rr)<=0)return"01";var wi;return ye.getFullYear()<P.tm_year+1900?wi=P.tm_yday+32-ye.getDate():wi=P.tm_yday+1-ye.getDate(),O(Math.ceil(wi/7),2)},"%w":function(P){return P.tm_wday},"%W":function(P){var $=new Date(P.tm_year,0,1),Ae=$.getDay()===1?$:eo($,$.getDay()===0?1:7-$.getDay()+1),ye=new Date(P.tm_year+1900,P.tm_mon,P.tm_mday);if(M(Ae,ye)<0){var at=fu(Zs(ye.getFullYear())?Xs:Qs,ye.getMonth()-1)-31,Rr=31-Ae.getDate(),wi=Rr+at+ye.getDate();return O(Math.ceil(wi/7),2)}return M(Ae,$)===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 $=P.tm_gmtoff,Ae=$>=0;return $=Math.abs($)/60,$=$/60*100+$%60,(Ae?"+":"-")+String("0000"+$).slice(-4)},"%Z":function(P){return P.tm_zone},"%%":function(){return"%"}};for(var y in _e)h.includes(y)&&(h=h.replace(new RegExp(y,"g"),_e[y](f)));var Be=w0(h,!1);return Be.length>a?0:(Zd(Be,o),Be.length-1)}function j0(o,a,u,l){return v0(o,a,u,l)}function w0(o,a,u){var l=u>0?u:Cv(o)+1,d=new Array(l),f=Kd(o,d,0,d.length);return a&&(d.length=f),d}var B0={i:sj,A:aj,G:cj,b:dj,n:fj,I:hj,j:af,ra:pj,u:yj,E:mj,c:lj,se:_j,ea:gj,La:vj,Ka:jj,Ma:wj,la:Bj,Oa:Tj,Ja:Ij,Na:Sj,oa:Dj,qe:Oj,ka:Aj,na:Fj,ma:Mj,fa:Vj,ja:Cj,ua:Pj,we:kj,Aa:Rj,Ba:Nj,ya:xj,za:Ej,Ta:Lj,wa:qj,Da:zj,Fa:Wj,xa:Hj,Ga:Yj,da:$j,Ca:Gj,Ea:Jj,va:Kj,oe:Zj,qb:Xj,Ua:Qj,Ic:t0,Qa:i0,Ra:n0,_:s0,Sa:o0,ce:a0,ob:u0,qa:c0,je:l0,re:d0,ga:f0,a:h0,Ha:Ks,W:Gw,K:Aw,R:pw,wb:WI,X:$w,M:Ww,sa:hw,xb:zI,s:bw,U:rB,ue:Zw,Y:Ew,V:tB,ve:Kw,e:ow,aa:Lw,B:Rw,Lb:AI,d:aw,$:Jw,ta:Xw,h:cw,Ib:VI,l:fw,pa:Dw,o:lw,z:ww,w:gw,Q:zw,x:vw,v:Bw,p:kw,L:Mw,J:Vw,Mb:OI,Pb:II,Rb:BI,Nb:DI,Jb:MI,Qb:TI,qc:ZT,he:uB,jd:sT,cd:fT,ge:cB,Ac:LT,xd:HB,Xa:yS,Wa:mS,Wd:vB,id:oT,Qc:ST,Qd:SB,Vb:gI,Bc:ET,Va:_S,Xd:gB,Ud:wB,Dc:NT,dd:dT,Id:CB,ad:pT,kb:eS,Vd:jB,$d:yB,Sd:TB,wd:YB,fb:sS,Ya:pS,kd:nT,fe:lB,Yc:bT,cb:uS,vb:HI,ed:lT,gb:nS,tc:GT,Td:BB,Zc:_T,vd:$B,$c:yT,_c:mT,Uc:wT,oc:QT,Mc:FT,Pc:DT,Oc:OT,Tb:jI,Nc:AT,de:fB,Bb:xI,Cb:NI,le:sB,ke:oB,hd:aT,ne:iB,Xb:_I,Ub:vI,Ob:SI,Wb:bI,Fb:PI,wc:HT,ub:YI,Hb:UI,Gb:CI,Fd:RB,Kb:FI,Eb:kI,_b:pI,zd:zB,Kc:VT,Bd:LB,qd:XB,Ab:EI,zb:LI,jc:nI,yb:qI,Gd:kB,rc:KT,od:eT,Za:hS,bc:dI,mb:XI,md:rT,Lc:MT,Gc:PT,t:nw,k:uw,C:Uw,ba:Pw,rb:JI,D:Nw,ca:Cw,sb:GI,f:sw,T:mw,O:Hw,dc:yw,g:_w,m:dw,te:Qw,q:Fw,r:Sw,ia:qw,y:jw,P:Ow,N:xw,S:Tw,pe:eB,ha:Yw,Z:Iw,Xc:gT,pb:KI,yd:WB,Ec:RT,Nd:AB,pc:XT,uc:$T,jb:tS,Dd:xB,zc:qT,db:aS,Sc:TT,Tc:BT,Hc:CT,Od:OB,xc:WT,vc:YT,kc:iI,Rd:IB,Rc:IT,Wc:vT,Yb:mI,gc:aI,Jd:UB,Kd:VB,hb:iS,Pd:DB,Ld:MB,yc:zT,ec:cI,nc:eI,Vc:jT,eb:oS,be:hB,ee:dB,ie:aB,bd:hT,Zb:yI,Md:FB,ic:sI,hc:oI,pd:QB,ib:rS,Ad:qB,ud:GB,_a:fS,fc:uI,lb:QI,me:nB,_d:mB,sd:KB,lc:rI,$b:hI,Sb:wI,Zd:_B,Yd:bB,td:JB,gd:uT,fd:cT,nd:tT,tb:$I,ld:iT,cc:lI,Db:RI,bb:cS,mc:tI,nb:ZI,rd:ZB,Cc:xT,$a:dS,ab:lS,ac:fI,ae:pB,Ed:NB,Fc:kT,Jc:UT,sc:JT,Hd:PB,Cd:EB,H:y0,F:m0,Ia:g0,Pa:j0},IU=nj(),T0=t.___wasm_call_ctors=function(){return(T0=t.___wasm_call_ctors=t.asm.ye).apply(null,arguments)},I0=t._main=function(){return(I0=t._main=t.asm.ze).apply(null,arguments)},S0=t._duckdb_web_fs_glob_add_path=function(){return(S0=t._duckdb_web_fs_glob_add_path=t.asm.Be).apply(null,arguments)},D0=t._duckdb_web_clear_response=function(){return(D0=t._duckdb_web_clear_response=t.asm.Ce).apply(null,arguments)},O0=t._duckdb_web_fail_with=function(){return(O0=t._duckdb_web_fail_with=t.asm.De).apply(null,arguments)},A0=t._duckdb_web_reset=function(){return(A0=t._duckdb_web_reset=t.asm.Ee).apply(null,arguments)},F0=t._duckdb_web_connect=function(){return(F0=t._duckdb_web_connect=t.asm.Fe).apply(null,arguments)},M0=t._duckdb_web_disconnect=function(){return(M0=t._duckdb_web_disconnect=t.asm.Ge).apply(null,arguments)},V0=t._duckdb_web_flush_files=function(){return(V0=t._duckdb_web_flush_files=t.asm.He).apply(null,arguments)},U0=t._duckdb_web_flush_file=function(){return(U0=t._duckdb_web_flush_file=t.asm.Ie).apply(null,arguments)},C0=t._duckdb_web_open=function(){return(C0=t._duckdb_web_open=t.asm.Je).apply(null,arguments)},P0=t._duckdb_web_collect_file_stats=function(){return(P0=t._duckdb_web_collect_file_stats=t.asm.Ke).apply(null,arguments)},k0=t._duckdb_web_export_file_stats=function(){return(k0=t._duckdb_web_export_file_stats=t.asm.Le).apply(null,arguments)},R0=t._duckdb_web_fs_drop_file=function(){return(R0=t._duckdb_web_fs_drop_file=t.asm.Me).apply(null,arguments)},N0=t._duckdb_web_fs_drop_files=function(){return(N0=t._duckdb_web_fs_drop_files=t.asm.Ne).apply(null,arguments)},x0=t._duckdb_web_fs_get_file_info=function(){return(x0=t._duckdb_web_fs_get_file_info=t.asm.Oe).apply(null,arguments)},E0=t._duckdb_web_fs_set_file_descriptor=function(){return(E0=t._duckdb_web_fs_set_file_descriptor=t.asm.Pe).apply(null,arguments)},L0=t._duckdb_web_fs_register_file_url=function(){return(L0=t._duckdb_web_fs_register_file_url=t.asm.Qe).apply(null,arguments)},q0=t._duckdb_web_fs_register_file_buffer=function(){return(q0=t._duckdb_web_fs_register_file_buffer=t.asm.Re).apply(null,arguments)},z0=t._duckdb_web_copy_file_to_buffer=function(){return(z0=t._duckdb_web_copy_file_to_buffer=t.asm.Se).apply(null,arguments)},W0=t._duckdb_web_copy_file_to_path=function(){return(W0=t._duckdb_web_copy_file_to_path=t.asm.Te).apply(null,arguments)},H0=t._duckdb_web_get_version=function(){return(H0=t._duckdb_web_get_version=t.asm.Ue).apply(null,arguments)},Y0=t._duckdb_web_get_feature_flags=function(){return(Y0=t._duckdb_web_get_feature_flags=t.asm.Ve).apply(null,arguments)},$0=t._duckdb_web_tokenize=function(){return($0=t._duckdb_web_tokenize=t.asm.We).apply(null,arguments)},G0=t._duckdb_web_prepared_statement_create=function(){return(G0=t._duckdb_web_prepared_statement_create=t.asm.Xe).apply(null,arguments)},J0=t._duckdb_web_prepared_statement_close=function(){return(J0=t._duckdb_web_prepared_statement_close=t.asm.Ye).apply(null,arguments)},K0=t._duckdb_web_prepared_statement_run=function(){return(K0=t._duckdb_web_prepared_statement_run=t.asm.Ze).apply(null,arguments)},Z0=t._duckdb_web_prepared_statement_send=function(){return(Z0=t._duckdb_web_prepared_statement_send=t.asm._e).apply(null,arguments)},X0=t._duckdb_web_query_run=function(){return(X0=t._duckdb_web_query_run=t.asm.$e).apply(null,arguments)},Q0=t._duckdb_web_query_send=function(){return(Q0=t._duckdb_web_query_send=t.asm.af).apply(null,arguments)},ew=t._duckdb_web_query_fetch_results=function(){return(ew=t._duckdb_web_query_fetch_results=t.asm.bf).apply(null,arguments)},tw=t._duckdb_web_insert_arrow_from_ipc_stream=function(){return(tw=t._duckdb_web_insert_arrow_from_ipc_stream=t.asm.cf).apply(null,arguments)},rw=t._duckdb_web_insert_csv_from_path=function(){return(rw=t._duckdb_web_insert_csv_from_path=t.asm.df).apply(null,arguments)},iw=t._duckdb_web_insert_json_from_path=function(){return(iw=t._duckdb_web_insert_json_from_path=t.asm.ef).apply(null,arguments)},uf=t.___errno_location=function(){return(uf=t.___errno_location=t.asm.ff).apply(null,arguments)},w=t.stackSave=function(){return(w=t.stackSave=t.asm.gf).apply(null,arguments)},B=t.stackRestore=function(){return(B=t.stackRestore=t.asm.hf).apply(null,arguments)},hu=t.stackAlloc=function(){return(hu=t.stackAlloc=t.asm.jf).apply(null,arguments)},T=t._setThrew=function(){return(T=t._setThrew=t.asm.kf).apply(null,arguments)},to=t.___cxa_can_catch=function(){return(to=t.___cxa_can_catch=t.asm.lf).apply(null,arguments)},cf=t.___cxa_is_pointer_type=function(){return(cf=t.___cxa_is_pointer_type=t.asm.mf).apply(null,arguments)},pu=t._malloc=function(){return(pu=t._malloc=t.asm.nf).apply(null,arguments)},yu=t._free=function(){return(yu=t._free=t.asm.of).apply(null,arguments)},lf=t.dynCall_jiji=function(){return(lf=t.dynCall_jiji=t.asm.pf).apply(null,arguments)},df=t.dynCall_jiiii=function(){return(df=t.dynCall_jiiii=t.asm.qf).apply(null,arguments)},ff=t.dynCall_iiiiij=function(){return(ff=t.dynCall_iiiiij=t.asm.rf).apply(null,arguments)},hf=t.dynCall_iiiiijj=function(){return(hf=t.dynCall_iiiiijj=t.asm.sf).apply(null,arguments)},pf=t.dynCall_viijii=function(){return(pf=t.dynCall_viijii=t.asm.tf).apply(null,arguments)},yf=t.dynCall_j=function(){return(yf=t.dynCall_j=t.asm.uf).apply(null,arguments)},mf=t.dynCall_ji=function(){return(mf=t.dynCall_ji=t.asm.vf).apply(null,arguments)},_f=t.dynCall_iij=function(){return(_f=t.dynCall_iij=t.asm.wf).apply(null,arguments)},bf=t.dynCall_viij=function(){return(bf=t.dynCall_viij=t.asm.xf).apply(null,arguments)},gf=t.dynCall_viijji=function(){return(gf=t.dynCall_viijji=t.asm.yf).apply(null,arguments)},vf=t.dynCall_viijj=function(){return(vf=t.dynCall_viijj=t.asm.zf).apply(null,arguments)},jf=t.dynCall_viiijj=function(){return(jf=t.dynCall_viiijj=t.asm.Af).apply(null,arguments)},wf=t.dynCall_viiji=function(){return(wf=t.dynCall_viiji=t.asm.Bf).apply(null,arguments)},Bf=t.dynCall_vijjj=function(){return(Bf=t.dynCall_vijjj=t.asm.Cf).apply(null,arguments)},Tf=t.dynCall_iiijj=function(){return(Tf=t.dynCall_iiijj=t.asm.Df).apply(null,arguments)},If=t.dynCall_viiij=function(){return(If=t.dynCall_viiij=t.asm.Ef).apply(null,arguments)},Sf=t.dynCall_viijij=function(){return(Sf=t.dynCall_viijij=t.asm.Ff).apply(null,arguments)},Df=t.dynCall_viji=function(){return(Df=t.dynCall_viji=t.asm.Gf).apply(null,arguments)},Of=t.dynCall_iiiijj=function(){return(Of=t.dynCall_iiiijj=t.asm.Hf).apply(null,arguments)},Af=t.dynCall_viijiiiii=function(){return(Af=t.dynCall_viijiiiii=t.asm.If).apply(null,arguments)},Ff=t.dynCall_viiiiijiiii=function(){return(Ff=t.dynCall_viiiiijiiii=t.asm.Jf).apply(null,arguments)},Mf=t.dynCall_viiiijj=function(){return(Mf=t.dynCall_viiiijj=t.asm.Kf).apply(null,arguments)},Vf=t.dynCall_iiijiiii=function(){return(Vf=t.dynCall_iiijiiii=t.asm.Lf).apply(null,arguments)},Uf=t.dynCall_vij=function(){return(Uf=t.dynCall_vij=t.asm.Mf).apply(null,arguments)},Cf=t.dynCall_jij=function(){return(Cf=t.dynCall_jij=t.asm.Nf).apply(null,arguments)},Pf=t.dynCall_jiiij=function(){return(Pf=t.dynCall_jiiij=t.asm.Of).apply(null,arguments)},kf=t.dynCall_iiij=function(){return(kf=t.dynCall_iiij=t.asm.Pf).apply(null,arguments)},Rf=t.dynCall_iiiiijjiijj=function(){return(Rf=t.dynCall_iiiiijjiijj=t.asm.Qf).apply(null,arguments)},Nf=t.dynCall_viijiijji=function(){return(Nf=t.dynCall_viijiijji=t.asm.Rf).apply(null,arguments)},xf=t.dynCall_vjjijij=function(){return(xf=t.dynCall_vjjijij=t.asm.Sf).apply(null,arguments)},Ef=t.dynCall_vijjji=function(){return(Ef=t.dynCall_vijjji=t.asm.Tf).apply(null,arguments)},Lf=t.dynCall_vjjii=function(){return(Lf=t.dynCall_vjjii=t.asm.Uf).apply(null,arguments)},qf=t.dynCall_viiiiiji=function(){return(qf=t.dynCall_viiiiiji=t.asm.Vf).apply(null,arguments)},zf=t.dynCall_jiiijji=function(){return(zf=t.dynCall_jiiijji=t.asm.Wf).apply(null,arguments)},Wf=t.dynCall_iijj=function(){return(Wf=t.dynCall_iijj=t.asm.Xf).apply(null,arguments)},Hf=t.dynCall_iiijjii=function(){return(Hf=t.dynCall_iiijjii=t.asm.Yf).apply(null,arguments)},Yf=t.dynCall_iijjii=function(){return(Yf=t.dynCall_iijjii=t.asm.Zf).apply(null,arguments)},$f=t.dynCall_viiiij=function(){return($f=t.dynCall_viiiij=t.asm._f).apply(null,arguments)},Gf=t.dynCall_vijii=function(){return(Gf=t.dynCall_vijii=t.asm.$f).apply(null,arguments)},Jf=t.dynCall_viijjii=function(){return(Jf=t.dynCall_viijjii=t.asm.ag).apply(null,arguments)},Kf=t.dynCall_vijj=function(){return(Kf=t.dynCall_vijj=t.asm.bg).apply(null,arguments)},Zf=t.dynCall_jijjij=function(){return(Zf=t.dynCall_jijjij=t.asm.cg).apply(null,arguments)},Xf=t.dynCall_jiijii=function(){return(Xf=t.dynCall_jiijii=t.asm.dg).apply(null,arguments)},Qf=t.dynCall_jijiii=function(){return(Qf=t.dynCall_jijiii=t.asm.eg).apply(null,arguments)},eh=t.dynCall_viijiiij=function(){return(eh=t.dynCall_viijiiij=t.asm.fg).apply(null,arguments)},th=t.dynCall_vijiiiji=function(){return(th=t.dynCall_vijiiiji=t.asm.gg).apply(null,arguments)},rh=t.dynCall_jiiji=function(){return(rh=t.dynCall_jiiji=t.asm.hg).apply(null,arguments)},ih=t.dynCall_viiijij=function(){return(ih=t.dynCall_viiijij=t.asm.ig).apply(null,arguments)},nh=t.dynCall_viijiijj=function(){return(nh=t.dynCall_viijiijj=t.asm.jg).apply(null,arguments)},sh=t.dynCall_viiiiijj=function(){return(sh=t.dynCall_viiiiijj=t.asm.kg).apply(null,arguments)},oh=t.dynCall_viiijji=function(){return(oh=t.dynCall_viiijji=t.asm.lg).apply(null,arguments)},ah=t.dynCall_iiiij=function(){return(ah=t.dynCall_iiiij=t.asm.mg).apply(null,arguments)},uh=t.dynCall_iiiiiji=function(){return(uh=t.dynCall_iiiiiji=t.asm.ng).apply(null,arguments)},ch=t.dynCall_iiiji=function(){return(ch=t.dynCall_iiiji=t.asm.og).apply(null,arguments)},lh=t.dynCall_iiiiji=function(){return(lh=t.dynCall_iiiiji=t.asm.pg).apply(null,arguments)},dh=t.dynCall_jii=function(){return(dh=t.dynCall_jii=t.asm.qg).apply(null,arguments)},fh=t.dynCall_jiii=function(){return(fh=t.dynCall_jiii=t.asm.rg).apply(null,arguments)},hh=t.dynCall_iijjijj=function(){return(hh=t.dynCall_iijjijj=t.asm.sg).apply(null,arguments)},ph=t.dynCall_viiiijiiiii=function(){return(ph=t.dynCall_viiiijiiiii=t.asm.tg).apply(null,arguments)},yh=t.dynCall_viiiijiiii=function(){return(yh=t.dynCall_viiiijiiii=t.asm.ug).apply(null,arguments)},mh=t.dynCall_viiijii=function(){return(mh=t.dynCall_viiijii=t.asm.vg).apply(null,arguments)},_h=t.dynCall_viiiiiij=function(){return(_h=t.dynCall_viiiiiij=t.asm.wg).apply(null,arguments)},bh=t.dynCall_viiijjj=function(){return(bh=t.dynCall_viiijjj=t.asm.xg).apply(null,arguments)},gh=t.dynCall_iiijiii=function(){return(gh=t.dynCall_iiijiii=t.asm.yg).apply(null,arguments)},vh=t.dynCall_iiiiijii=function(){return(vh=t.dynCall_iiiiijii=t.asm.zg).apply(null,arguments)},jh=t.dynCall_viijiii=function(){return(jh=t.dynCall_viijiii=t.asm.Ag).apply(null,arguments)},wh=t.dynCall_iiijiij=function(){return(wh=t.dynCall_iiijiij=t.asm.Bg).apply(null,arguments)},Bh=t.dynCall_vijiii=function(){return(Bh=t.dynCall_vijiii=t.asm.Cg).apply(null,arguments)},Th=t.dynCall_iijjiii=function(){return(Th=t.dynCall_iijjiii=t.asm.Dg).apply(null,arguments)},Ih=t.dynCall_iijjiiii=function(){return(Ih=t.dynCall_iijjiiii=t.asm.Eg).apply(null,arguments)},Sh=t.dynCall_iiji=function(){return(Sh=t.dynCall_iiji=t.asm.Fg).apply(null,arguments)},Dh=t.dynCall_iijji=function(){return(Dh=t.dynCall_iijji=t.asm.Gg).apply(null,arguments)},Oh=t.dynCall_vijiiii=function(){return(Oh=t.dynCall_vijiiii=t.asm.Hg).apply(null,arguments)},Ah=t.dynCall_iijiiii=function(){return(Ah=t.dynCall_iijiiii=t.asm.Ig).apply(null,arguments)},Fh=t.dynCall_viiiji=function(){return(Fh=t.dynCall_viiiji=t.asm.Jg).apply(null,arguments)},Mh=t.dynCall_iiiijiii=function(){return(Mh=t.dynCall_iiiijiii=t.asm.Kg).apply(null,arguments)},Vh=t.dynCall_vijij=function(){return(Vh=t.dynCall_vijij=t.asm.Lg).apply(null,arguments)},Uh=t.dynCall_iiijjjj=function(){return(Uh=t.dynCall_iiijjjj=t.asm.Mg).apply(null,arguments)},Ch=t.dynCall_jijj=function(){return(Ch=t.dynCall_jijj=t.asm.Ng).apply(null,arguments)},Ph=t.dynCall_viiiijiiiiiiii=function(){return(Ph=t.dynCall_viiiijiiiiiiii=t.asm.Og).apply(null,arguments)},kh=t.dynCall_ij=function(){return(kh=t.dynCall_ij=t.asm.Pg).apply(null,arguments)},Rh=t.dynCall_jj=function(){return(Rh=t.dynCall_jj=t.asm.Qg).apply(null,arguments)},Nh=t.dynCall_jjj=function(){return(Nh=t.dynCall_jjj=t.asm.Rg).apply(null,arguments)},xh=t.dynCall_iji=function(){return(xh=t.dynCall_iji=t.asm.Sg).apply(null,arguments)},Eh=t.dynCall_vjii=function(){return(Eh=t.dynCall_vjii=t.asm.Tg).apply(null,arguments)},Lh=t.dynCall_vjiiii=function(){return(Lh=t.dynCall_vjiiii=t.asm.Ug).apply(null,arguments)},qh=t.dynCall_viiiiijiii=function(){return(qh=t.dynCall_viiiiijiii=t.asm.Vg).apply(null,arguments)},zh=t.dynCall_vijji=function(){return(zh=t.dynCall_vijji=t.asm.Wg).apply(null,arguments)},Wh=t.dynCall_iiijii=function(){return(Wh=t.dynCall_iiijii=t.asm.Xg).apply(null,arguments)},Hh=t.dynCall_jiij=function(){return(Hh=t.dynCall_jiij=t.asm.Yg).apply(null,arguments)},Yh=t.dynCall_iiiijjii=function(){return(Yh=t.dynCall_iiiijjii=t.asm.Zg).apply(null,arguments)},$h=t.dynCall_iiiiijji=function(){return($h=t.dynCall_iiiiijji=t.asm._g).apply(null,arguments)},Gh=t.dynCall_viiiiji=function(){return(Gh=t.dynCall_viiiiji=t.asm.$g).apply(null,arguments)},Jh=t.dynCall_viiijjii=function(){return(Jh=t.dynCall_viiijjii=t.asm.ah).apply(null,arguments)},Kh=t.dynCall_viiiijji=function(){return(Kh=t.dynCall_viiiijji=t.asm.bh).apply(null,arguments)},Zh=t.dynCall_viiiijjii=function(){return(Zh=t.dynCall_viiiijjii=t.asm.ch).apply(null,arguments)},Xh=t.dynCall_viiiiijji=function(){return(Xh=t.dynCall_viiiiijji=t.asm.dh).apply(null,arguments)},Qh=t.dynCall_jiiiij=function(){return(Qh=t.dynCall_jiiiij=t.asm.eh).apply(null,arguments)},ep=t.dynCall_iijiji=function(){return(ep=t.dynCall_iijiji=t.asm.fh).apply(null,arguments)},tp=t.dynCall_viiijijiji=function(){return(tp=t.dynCall_viiijijiji=t.asm.gh).apply(null,arguments)},rp=t.dynCall_vjiiiji=function(){return(rp=t.dynCall_vjiiiji=t.asm.hh).apply(null,arguments)},ip=t.dynCall_viiijjij=function(){return(ip=t.dynCall_viiijjij=t.asm.ih).apply(null,arguments)},np=t.dynCall_vijijjiij=function(){return(np=t.dynCall_vijijjiij=t.asm.jh).apply(null,arguments)},sp=t.dynCall_viijjij=function(){return(sp=t.dynCall_viijjij=t.asm.kh).apply(null,arguments)},op=t.dynCall_viiijjiij=function(){return(op=t.dynCall_viiijjiij=t.asm.lh).apply(null,arguments)},ap=t.dynCall_viiiijjjj=function(){return(ap=t.dynCall_viiiijjjj=t.asm.mh).apply(null,arguments)},up=t.dynCall_jiijijii=function(){return(up=t.dynCall_jiijijii=t.asm.nh).apply(null,arguments)},cp=t.dynCall_viijiiiiij=function(){return(cp=t.dynCall_viijiiiiij=t.asm.oh).apply(null,arguments)},lp=t.dynCall_viijiiiijj=function(){return(lp=t.dynCall_viijiiiijj=t.asm.ph).apply(null,arguments)},dp=t.dynCall_viiijiiiijjj=function(){return(dp=t.dynCall_viiijiiiijjj=t.asm.qh).apply(null,arguments)},fp=t.dynCall_viijijiiiijjj=function(){return(fp=t.dynCall_viijijiiiijjj=t.asm.rh).apply(null,arguments)},hp=t.dynCall_iijjjj=function(){return(hp=t.dynCall_iijjjj=t.asm.sh).apply(null,arguments)},pp=t.dynCall_iiijji=function(){return(pp=t.dynCall_iiijji=t.asm.th).apply(null,arguments)},yp=t.dynCall_vijijiiiijjj=function(){return(yp=t.dynCall_vijijiiiijjj=t.asm.uh).apply(null,arguments)},mp=t.dynCall_iiiiiiji=function(){return(mp=t.dynCall_iiiiiiji=t.asm.vh).apply(null,arguments)},_p=t.dynCall_jijijjij=function(){return(_p=t.dynCall_jijijjij=t.asm.wh).apply(null,arguments)},bp=t.dynCall_vijjij=function(){return(bp=t.dynCall_vijjij=t.asm.xh).apply(null,arguments)},gp=t.dynCall_viijjj=function(){return(gp=t.dynCall_viijjj=t.asm.yh).apply(null,arguments)},vp=t.dynCall_jiiijj=function(){return(vp=t.dynCall_jiiijj=t.asm.zh).apply(null,arguments)},jp=t.dynCall_viijiiii=function(){return(jp=t.dynCall_viijiiii=t.asm.Ah).apply(null,arguments)},wp=t.dynCall_iiijij=function(){return(wp=t.dynCall_iiijij=t.asm.Bh).apply(null,arguments)},Bp=t.dynCall_viiijiii=function(){return(Bp=t.dynCall_viiijiii=t.asm.Ch).apply(null,arguments)},Tp=t.dynCall_viijjji=function(){return(Tp=t.dynCall_viijjji=t.asm.Dh).apply(null,arguments)},Ip=t.dynCall_iiiiiij=function(){return(Ip=t.dynCall_iiiiiij=t.asm.Eh).apply(null,arguments)},Sp=t.dynCall_iiiiiiiiiiji=function(){return(Sp=t.dynCall_iiiiiiiiiiji=t.asm.Fh).apply(null,arguments)},Dp=t.dynCall_jiiiiiii=function(){return(Dp=t.dynCall_jiiiiiii=t.asm.Gh).apply(null,arguments)},Op=t.dynCall_iidj=function(){return(Op=t.dynCall_iidj=t.asm.Hh).apply(null,arguments)},Ap=t.dynCall_jiiijii=function(){return(Ap=t.dynCall_jiiijii=t.asm.Ih).apply(null,arguments)},Fp=t.dynCall_ijji=function(){return(Fp=t.dynCall_ijji=t.asm.Jh).apply(null,arguments)},Mp=t.dynCall_iiiiiiiij=function(){return(Mp=t.dynCall_iiiiiiiij=t.asm.Kh).apply(null,arguments)},Vp=t.dynCall_iiiiiiij=function(){return(Vp=t.dynCall_iiiiiiij=t.asm.Lh).apply(null,arguments)},Up=t.dynCall_iiiiiiiiiiiij=function(){return(Up=t.dynCall_iiiiiiiiiiiij=t.asm.Mh).apply(null,arguments)},Cp=t.dynCall_iiiiiiiji=function(){return(Cp=t.dynCall_iiiiiiiji=t.asm.Nh).apply(null,arguments)},Pp=t.dynCall_iiiidjj=function(){return(Pp=t.dynCall_iiiidjj=t.asm.Oh).apply(null,arguments)},kp=t.dynCall_jiiiii=function(){return(kp=t.dynCall_jiiiii=t.asm.Ph).apply(null,arguments)},Rp=t.dynCall_jiiiiiijii=function(){return(Rp=t.dynCall_jiiiiiijii=t.asm.Qh).apply(null,arguments)},Np=t.dynCall_iiiijji=function(){return(Np=t.dynCall_iiiijji=t.asm.Rh).apply(null,arguments)},xp=t.dynCall_jiiiiii=function(){return(xp=t.dynCall_jiiiiii=t.asm.Sh).apply(null,arguments)},Ep=t.dynCall_jiiiijii=function(){return(Ep=t.dynCall_jiiiijii=t.asm.Th).apply(null,arguments)},Lp=t.dynCall_jiiiijiiiiiiii=function(){return(Lp=t.dynCall_jiiiijiiiiiiii=t.asm.Uh).apply(null,arguments)},qp=t.dynCall_jiiiiijiiii=function(){return(qp=t.dynCall_jiiiiijiiii=t.asm.Vh).apply(null,arguments)},zp=t.dynCall_jiiijiii=function(){return(zp=t.dynCall_jiiijiii=t.asm.Wh).apply(null,arguments)},Wp=t.dynCall_fiijii=function(){return(Wp=t.dynCall_fiijii=t.asm.Xh).apply(null,arguments)},Hp=t.dynCall_diijii=function(){return(Hp=t.dynCall_diijii=t.asm.Yh).apply(null,arguments)},Yp=t.dynCall_vijijj=function(){return(Yp=t.dynCall_vijijj=t.asm.Zh).apply(null,arguments)},$p=t.dynCall_jf=function(){return($p=t.dynCall_jf=t.asm._h).apply(null,arguments)},Gp=t.dynCall_jd=function(){return(Gp=t.dynCall_jd=t.asm.$h).apply(null,arguments)},Jp=t.dynCall_jiijiiiii=function(){return(Jp=t.dynCall_jiijiiiii=t.asm.ai).apply(null,arguments)},Kp=t.dynCall_jiijiijiii=function(){return(Kp=t.dynCall_jiijiijiii=t.asm.bi).apply(null,arguments)},Zp=t.dynCall_jiijjiii=function(){return(Zp=t.dynCall_jiijjiii=t.asm.ci).apply(null,arguments)},Xp=t.dynCall_iijiii=function(){return(Xp=t.dynCall_iijiii=t.asm.di).apply(null,arguments)},Qp=t.dynCall_jiiiiji=function(){return(Qp=t.dynCall_jiiiiji=t.asm.ei).apply(null,arguments)},ey=t.dynCall_vijiijj=function(){return(ey=t.dynCall_vijiijj=t.asm.fi).apply(null,arguments)},ty=t.dynCall_vifiijj=function(){return(ty=t.dynCall_vifiijj=t.asm.gi).apply(null,arguments)},ry=t.dynCall_vidiijj=function(){return(ry=t.dynCall_vidiijj=t.asm.hi).apply(null,arguments)},iy=t.dynCall_viiiiij=function(){return(iy=t.dynCall_viiiiij=t.asm.ii).apply(null,arguments)},ny=t.dynCall_ijj=function(){return(ny=t.dynCall_ijj=t.asm.ji).apply(null,arguments)},sy=t.dynCall_ijjiii=function(){return(sy=t.dynCall_ijjiii=t.asm.ki).apply(null,arguments)},oy=t.dynCall_vijijjji=function(){return(oy=t.dynCall_vijijjji=t.asm.li).apply(null,arguments)},ay=t.dynCall_viiiiijjji=function(){return(ay=t.dynCall_viiiiijjji=t.asm.mi).apply(null,arguments)},uy=t.dynCall_viijijj=function(){return(uy=t.dynCall_viijijj=t.asm.ni).apply(null,arguments)},cy=t.dynCall_iiijiijj=function(){return(cy=t.dynCall_iiijiijj=t.asm.oi).apply(null,arguments)},ly=t.dynCall_viiijijjj=function(){return(ly=t.dynCall_viiijijjj=t.asm.pi).apply(null,arguments)},dy=t.dynCall_iijiijj=function(){return(dy=t.dynCall_iijiijj=t.asm.qi).apply(null,arguments)},fy=t.dynCall_viiijjjji=function(){return(fy=t.dynCall_viiijjjji=t.asm.ri).apply(null,arguments)},hy=t.dynCall_viiiijiii=function(){return(hy=t.dynCall_viiiijiii=t.asm.si).apply(null,arguments)},py=t.dynCall_iijii=function(){return(py=t.dynCall_iijii=t.asm.ti).apply(null,arguments)},yy=t.dynCall_vijjiiii=function(){return(yy=t.dynCall_vijjiiii=t.asm.ui).apply(null,arguments)},my=t.dynCall_vijijjiiiii=function(){return(my=t.dynCall_vijijjiiiii=t.asm.vi).apply(null,arguments)},_y=t.dynCall_vijjiiiii=function(){return(_y=t.dynCall_vijjiiiii=t.asm.wi).apply(null,arguments)},by=t.dynCall_iiijjji=function(){return(by=t.dynCall_iiijjji=t.asm.xi).apply(null,arguments)},gy=t.dynCall_iiiiijjj=function(){return(gy=t.dynCall_iiiiijjj=t.asm.yi).apply(null,arguments)},vy=t.dynCall_jijiiii=function(){return(vy=t.dynCall_jijiiii=t.asm.zi).apply(null,arguments)},jy=t.dynCall_iiijjjii=function(){return(jy=t.dynCall_iiijjjii=t.asm.Ai).apply(null,arguments)},wy=t.dynCall_iiiiijjji=function(){return(wy=t.dynCall_iiiiijjji=t.asm.Bi).apply(null,arguments)},By=t.dynCall_iiiijjj=function(){return(By=t.dynCall_iiiijjj=t.asm.Ci).apply(null,arguments)},Ty=t.dynCall_viijiji=function(){return(Ty=t.dynCall_viijiji=t.asm.Di).apply(null,arguments)};function nw(o){var a=w();try{H.get(o)()}catch(u){if(B(a),u!==u+0&&u!=="longjmp")throw u;T(1,0)}}function sw(o,a,u){var l=w();try{H.get(o)(a,u)}catch(d){if(B(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function ow(o,a){var u=w();try{return H.get(o)(a)}catch(l){if(B(u),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function aw(o,a,u){var l=w();try{return H.get(o)(a,u)}catch(d){if(B(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function uw(o,a){var u=w();try{H.get(o)(a)}catch(l){if(B(u),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function cw(o,a,u,l){var d=w();try{return H.get(o)(a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function lw(o,a,u,l,d,f){var h=w();try{return H.get(o)(a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function dw(o,a,u,l,d){var f=w();try{H.get(o)(a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function fw(o,a,u,l,d){var f=w();try{return H.get(o)(a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function hw(o,a,u,l){var d=w();try{return H.get(o)(a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function pw(o,a,u,l){var d=w();try{return H.get(o)(a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function yw(o,a,u,l){var d=w();try{H.get(o)(a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function mw(o,a,u,l){var d=w();try{H.get(o)(a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function _w(o,a,u,l){var d=w();try{H.get(o)(a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function bw(o){var a=w();try{return H.get(o)()}catch(u){if(B(a),u!==u+0&&u!=="longjmp")throw u;T(1,0)}}function gw(o,a,u,l,d,f,h,p){var y=w();try{return H.get(o)(a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function vw(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{return H.get(o)(a,u,l,d,f,h,p,y,m,g)}catch(O){if(B(j),O!==O+0&&O!=="longjmp")throw O;T(1,0)}}function jw(o,a,u,l,d,f,h,p){var y=w();try{H.get(o)(a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function ww(o,a,u,l,d,f,h){var p=w();try{return H.get(o)(a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function Bw(o,a,u,l,d,f,h,p,y,m,g,j){var O=w();try{return H.get(o)(a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(B(O),M!==M+0&&M!=="longjmp")throw M;T(1,0)}}function Tw(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{H.get(o)(a,u,l,d,f,h,p,y,m,g)}catch(O){if(B(j),O!==O+0&&O!=="longjmp")throw O;T(1,0)}}function Iw(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x,ue){var _e=w();try{H.get(o)(a,u,l,d,f,h,p,y,m,g,j,O,M,x,ue)}catch(Be){if(B(_e),Be!==Be+0&&Be!=="longjmp")throw Be;T(1,0)}}function Sw(o,a,u,l,d,f,h){var p=w();try{H.get(o)(a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function Dw(o,a,u,l,d,f){var h=w();try{return H.get(o)(a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function Ow(o,a,u,l,d,f,h,p,y){var m=w();try{H.get(o)(a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function Aw(o,a){var u=w();try{return H.get(o)(a)}catch(l){if(B(u),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function Fw(o,a,u,l,d,f){var h=w();try{H.get(o)(a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function Mw(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x,ue,_e,Be,P,$){var Ae=w();try{return H.get(o)(a,u,l,d,f,h,p,y,m,g,j,O,M,x,ue,_e,Be,P,$)}catch(ye){if(B(Ae),ye!==ye+0&&ye!=="longjmp")throw ye;T(1,0)}}function Vw(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x,ue,_e,Be,P,$,Ae){var ye=w();try{return H.get(o)(a,u,l,d,f,h,p,y,m,g,j,O,M,x,ue,_e,Be,P,$,Ae)}catch(at){if(B(ye),at!==at+0&&at!=="longjmp")throw at;T(1,0)}}function Uw(o,a,u){var l=w();try{H.get(o)(a,u)}catch(d){if(B(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function Cw(o,a,u,l){var d=w();try{H.get(o)(a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function Pw(o,a,u,l){var d=w();try{H.get(o)(a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function kw(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x,ue){var _e=w();try{return H.get(o)(a,u,l,d,f,h,p,y,m,g,j,O,M,x,ue)}catch(Be){if(B(_e),Be!==Be+0&&Be!=="longjmp")throw Be;T(1,0)}}function Rw(o,a,u,l,d){var f=w();try{return H.get(o)(a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function Nw(o,a,u){var l=w();try{H.get(o)(a,u)}catch(d){if(B(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function xw(o,a,u,l,d,f,h,p,y,m){var g=w();try{H.get(o)(a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function Ew(o,a,u,l,d){var f=w();try{return H.get(o)(a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function Lw(o,a,u){var l=w();try{return H.get(o)(a,u)}catch(d){if(B(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function qw(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{H.get(o)(a,u,l,d,f,h,p,y,m,g)}catch(O){if(B(j),O!==O+0&&O!=="longjmp")throw O;T(1,0)}}function zw(o,a,u,l,d,f,h,p,y){var m=w();try{return H.get(o)(a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function Ww(o,a){var u=w();try{return H.get(o)(a)}catch(l){if(B(u),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function Hw(o,a,u,l,d,f){var h=w();try{H.get(o)(a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function Yw(o,a,u,l,d,f,h,p,y,m,g,j,O,M){var x=w();try{H.get(o)(a,u,l,d,f,h,p,y,m,g,j,O,M)}catch(ue){if(B(x),ue!==ue+0&&ue!=="longjmp")throw ue;T(1,0)}}function $w(o,a,u){var l=w();try{return H.get(o)(a,u)}catch(d){if(B(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function Gw(o,a,u){var l=w();try{return H.get(o)(a,u)}catch(d){if(B(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function Jw(o,a,u,l){var d=w();try{return H.get(o)(a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function Kw(o,a,u){var l=w();try{return H.get(o)(a,u)}catch(d){if(B(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function Zw(o,a,u){var l=w();try{return H.get(o)(a,u)}catch(d){if(B(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function Xw(o,a,u,l){var d=w();try{return H.get(o)(a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function Qw(o,a,u,l,d,f,h,p,y,m){var g=w();try{H.get(o)(a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function eB(o,a,u,l,d,f,h,p,y,m,g,j){var O=w();try{H.get(o)(a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(B(O),M!==M+0&&M!=="longjmp")throw M;T(1,0)}}function tB(o,a){var u=w();try{return H.get(o)(a)}catch(l){if(B(u),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function rB(o,a){var u=w();try{return H.get(o)(a)}catch(l){if(B(u),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function iB(o,a,u,l,d){var f=w();try{return df(o,a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function nB(o,a,u,l,d,f,h){var p=w();try{vf(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function sB(o,a){var u=w();try{return mf(o,a)}catch(l){if(B(u),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function oB(o,a,u){var l=w();try{return dh(o,a,u)}catch(d){if(B(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function aB(o,a,u,l,d,f,h){var p=w();try{pf(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function uB(o,a,u,l,d,f,h){var p=w();try{return ff(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function cB(o,a,u,l,d,f,h,p,y){var m=w();try{return hf(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function lB(o,a,u,l){var d=w();try{return _f(o,a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function dB(o,a,u,l,d,f){var h=w();try{wf(o,a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function fB(o){var a=w();try{return yf(o)}catch(u){if(B(a),u!==u+0&&u!=="longjmp")throw u;T(1,0)}}function hB(o,a,u,l,d){var f=w();try{bf(o,a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function pB(o,a,u,l,d,f,h,p){var y=w();try{Bf(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function yB(o,a,u,l,d,f,h){var p=w();try{return Tf(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function mB(o,a,u,l,d,f,h,p){var y=w();try{gf(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function _B(o,a,u,l){var d=w();try{Uf(o,a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function bB(o,a,u,l,d){var f=w();try{Df(o,a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function gB(o,a,u,l,d){var f=w();try{return kf(o,a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function vB(o,a,u,l,d,f){var h=w();try{return ah(o,a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function jB(o,a,u,l,d,f,h,p){var y=w();try{return wp(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function wB(o,a,u,l,d,f){var h=w();try{return ch(o,a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function BB(o,a,u,l,d,f){var h=w();try{return Wf(o,a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function TB(o,a,u,l,d,f,h,p){var y=w();try{return pp(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function IB(o,a,u,l,d,f){var h=w();try{If(o,a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function SB(o,a,u,l,d,f,h,p){var y=w();try{return Of(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function DB(o,a,u,l,d,f,h,p){var y=w();try{jf(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function OB(o,a,u,l,d,f,h,p,y){var m=w();try{Mf(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function AB(o,a,u,l,d,f,h,p,y,m,g,j){var O=w();try{Ff(o,a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(B(O),M!==M+0&&M!=="longjmp")throw M;T(1,0)}}function FB(o,a,u,l,d,f,h,p,y,m){var g=w();try{Af(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function MB(o,a,u,l,d,f,h,p,y){var m=w();try{oh(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function VB(o,a,u,l,d,f,h,p,y,m,g,j,O){var M=w();try{tp(o,a,u,l,d,f,h,p,y,m,g,j,O)}catch(x){if(B(M),x!==x+0&&x!=="longjmp")throw x;T(1,0)}}function UB(o,a,u,l,d,f,h,p,y){var m=w();try{ih(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function CB(o,a,u,l,d,f,h,p,y){var m=w();try{return Vf(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function PB(o,a,u,l,d,f,h){var p=w();try{Lf(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function kB(o,a,u,l){var d=w();try{return Cf(o,a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function RB(o,a,u,l,d,f){var h=w();try{return Pf(o,a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function NB(o,a,u,l,d,f,h,p,y){var m=w();try{Ef(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function xB(o,a,u,l,d,f,h){var p=w();try{$f(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function EB(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{xf(o,a,u,l,d,f,h,p,y,m,g)}catch(O){if(B(j),O!==O+0&&O!=="longjmp")throw O;T(1,0)}}function LB(o,a,u,l,d,f){var h=w();try{return rh(o,a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function qB(o,a,u,l,d,f,h,p,y,m,g,j){var O=w();try{Nf(o,a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(B(O),M!==M+0&&M!=="longjmp")throw M;T(1,0)}}function zB(o,a,u,l,d,f,h,p,y){var m=w();try{return zf(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function WB(o,a,u,l,d,f,h,p,y){var m=w();try{qf(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function HB(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x){var ue=w();try{return Rf(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x)}catch(_e){if(B(ue),_e!==_e+0&&_e!=="longjmp")throw _e;T(1,0)}}function YB(o,a,u,l,d,f,h,p,y){var m=w();try{return Hf(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function $B(o,a,u,l,d,f,h,p){var y=w();try{return Yf(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function GB(o,a,u,l,d,f,h,p){var y=w();try{Sf(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function JB(o,a,u,l,d,f){var h=w();try{Gf(o,a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function KB(o,a,u,l,d,f,h,p,y){var m=w();try{Jf(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function ZB(o,a,u,l,d,f){var h=w();try{Kf(o,a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function XB(o,a,u,l,d,f,h){var p=w();try{return Xf(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function QB(o,a,u,l,d,f,h,p,y,m){var g=w();try{eh(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function eT(o,a,u,l,d,f,h){var p=w();try{return Qf(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function tT(o,a,u,l,d,f,h,p,y,m){var g=w();try{th(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function rT(o,a,u,l,d,f,h,p,y){var m=w();try{return Zf(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function iT(o,a,u,l,d,f,h){var p=w();try{Vh(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function nT(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{return Uh(o,a,u,l,d,f,h,p,y,m,g)}catch(O){if(B(j),O!==O+0&&O!=="longjmp")throw O;T(1,0)}}function sT(o,a,u,l,d,f,h,p){var y=w();try{return uh(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function oT(o,a,u,l,d,f,h){var p=w();try{return lh(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function aT(o,a,u,l){var d=w();try{return fh(o,a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function uT(o,a,u,l,d,f,h){var p=w();try{Bh(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function cT(o,a,u,l,d,f,h,p){var y=w();try{Oh(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function lT(o,a,u,l,d,f,h,p){var y=w();try{return Ah(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function dT(o,a,u,l,d,f,h,p){var y=w();try{return gh(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function fT(o,a,u,l,d,f,h,p,y){var m=w();try{return vh(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function hT(o,a,u,l,d,f,h,p){var y=w();try{jh(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function pT(o,a,u,l,d,f,h,p,y){var m=w();try{return wh(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function yT(o,a,u,l,d,f,h,p,y){var m=w();try{return Th(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function mT(o,a,u,l,d,f,h,p,y,m){var g=w();try{return Ih(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function _T(o,a,u,l,d,f,h){var p=w();try{return Dh(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function bT(o,a,u,l,d){var f=w();try{return Sh(o,a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function gT(o,a,u,l,d,f,h,p,y){var m=w();try{_h(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function vT(o,a,u,l,d,f,h,p){var y=w();try{mh(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function jT(o,a,u,l,d,f,h,p,y,m){var g=w();try{bh(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function wT(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{return hh(o,a,u,l,d,f,h,p,y,m,g)}catch(O){if(B(j),O!==O+0&&O!=="longjmp")throw O;T(1,0)}}function BT(o,a,u,l,d,f,h,p,y,m,g,j){var O=w();try{ph(o,a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(B(O),M!==M+0&&M!=="longjmp")throw M;T(1,0)}}function TT(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{yh(o,a,u,l,d,f,h,p,y,m,g)}catch(O){if(B(j),O!==O+0&&O!=="longjmp")throw O;T(1,0)}}function IT(o,a,u,l,d,f,h){var p=w();try{Fh(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function ST(o,a,u,l,d,f,h,p,y){var m=w();try{return Mh(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function DT(o,a,u,l){var d=w();try{return xh(o,a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function OT(o,a,u,l,d){var f=w();try{return ny(o,a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function AT(o,a,u,l,d,f,h,p){var y=w();try{return sy(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function FT(o,a,u){var l=w();try{return kh(o,a,u)}catch(d){if(B(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function MT(o,a,u){var l=w();try{return Rh(o,a,u)}catch(d){if(B(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function VT(o,a,u,l,d){var f=w();try{return Hh(o,a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function UT(o,a,u,l,d,f,h){var p=w();try{Lh(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function CT(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x){var ue=w();try{Ph(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x)}catch(_e){if(B(ue),_e!==_e+0&&_e!=="longjmp")throw _e;T(1,0)}}function PT(o,a,u,l,d){var f=w();try{return Nh(o,a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function kT(o,a,u,l,d){var f=w();try{Eh(o,a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function RT(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{qh(o,a,u,l,d,f,h,p,y,m,g)}catch(O){if(B(j),O!==O+0&&O!=="longjmp")throw O;T(1,0)}}function NT(o,a,u,l,d,f,h){var p=w();try{return Wh(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function xT(o,a,u,l,d,f,h){var p=w();try{zh(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function ET(o,a,u,l,d,f,h,p,y,m){var g=w();try{return Yh(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function LT(o,a,u,l,d,f,h,p,y,m){var g=w();try{return $h(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function qT(o,a,u,l,d,f,h,p){var y=w();try{Gh(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function zT(o,a,u,l,d,f,h,p,y,m){var g=w();try{Jh(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function WT(o,a,u,l,d,f,h,p,y,m){var g=w();try{Kh(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function HT(o,a,u,l,d,f,h){var p=w();try{return Qh(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function YT(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{Zh(o,a,u,l,d,f,h,p,y,m,g)}catch(O){if(B(j),O!==O+0&&O!=="longjmp")throw O;T(1,0)}}function $T(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{Xh(o,a,u,l,d,f,h,p,y,m,g)}catch(O){if(B(j),O!==O+0&&O!=="longjmp")throw O;T(1,0)}}function GT(o,a,u,l,d,f,h,p){var y=w();try{return ep(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function JT(o,a,u,l,d,f,h,p,y){var m=w();try{rp(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function KT(o,a,u,l,d){var f=w();try{return lf(o,a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function ZT(o,a,u,l,d,f,h,p,y){var m=w();try{return mp(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function XT(o,a,u,l,d,f,h,p,y,m){var g=w();try{sh(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function QT(o,a,u,l,d,f,h,p,y,m){var g=w();try{return hp(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function eI(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{ip(o,a,u,l,d,f,h,p,y,m,g)}catch(O){if(B(j),O!==O+0&&O!=="longjmp")throw O;T(1,0)}}function tI(o,a,u,l,d,f,h,p,y,m,g,j,O){var M=w();try{np(o,a,u,l,d,f,h,p,y,m,g,j,O)}catch(x){if(B(M),x!==x+0&&x!=="longjmp")throw x;T(1,0)}}function rI(o,a,u,l,d,f,h,p,y,m){var g=w();try{sp(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function iI(o,a,u,l,d,f,h,p,y,m,g,j,O){var M=w();try{ap(o,a,u,l,d,f,h,p,y,m,g,j,O)}catch(x){if(B(M),x!==x+0&&x!=="longjmp")throw x;T(1,0)}}function nI(o,a,u,l,d,f,h,p,y,m){var g=w();try{return up(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function sI(o,a,u,l,d,f,h,p,y,m,g,j){var O=w();try{cp(o,a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(B(O),M!==M+0&&M!=="longjmp")throw M;T(1,0)}}function oI(o,a,u,l,d,f,h,p,y,m,g,j,O){var M=w();try{lp(o,a,u,l,d,f,h,p,y,m,g,j,O)}catch(x){if(B(M),x!==x+0&&x!=="longjmp")throw x;T(1,0)}}function aI(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x,ue){var _e=w();try{dp(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x,ue)}catch(Be){if(B(_e),Be!==Be+0&&Be!=="longjmp")throw Be;T(1,0)}}function uI(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x,ue,_e,Be){var P=w();try{fp(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x,ue,_e,Be)}catch($){if(B(P),$!==$+0&&$!=="longjmp")throw $;T(1,0)}}function cI(o,a,u,l,d,f,h,p,y,m,g,j){var O=w();try{op(o,a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(B(O),M!==M+0&&M!=="longjmp")throw M;T(1,0)}}function lI(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x,ue,_e){var Be=w();try{yp(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x,ue,_e)}catch(P){if(B(Be),P!==P+0&&P!=="longjmp")throw P;T(1,0)}}function dI(o,a,u,l,d,f,h,p,y,m,g,j){var O=w();try{return _p(o,a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(B(O),M!==M+0&&M!=="longjmp")throw M;T(1,0)}}function fI(o,a,u,l,d,f,h,p,y){var m=w();try{bp(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function hI(o,a,u,l,d,f,h,p,y){var m=w();try{gp(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function pI(o,a,u,l,d,f,h,p){var y=w();try{return vp(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function yI(o,a,u,l,d,f,h,p,y){var m=w();try{jp(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function mI(o,a,u,l,d,f,h,p,y){var m=w();try{Bp(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function _I(o,a,u,l,d,f){var h=w();try{return kp(o,a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function bI(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{return Rp(o,a,u,l,d,f,h,p,y,m,g)}catch(O){if(B(j),O!==O+0&&O!=="longjmp")throw O;T(1,0)}}function gI(o,a,u,l,d,f,h,p,y){var m=w();try{return Np(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function vI(o,a,u,l,d,f,h){var p=w();try{return xp(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function jI(o,a,u,l,d,f){var h=w();try{return Fp(o,a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function wI(o,a,u,l,d,f,h,p,y,m){var g=w();try{Tp(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function BI(o,a,u,l,d,f,h,p,y,m){var g=w();try{return Mp(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function TI(o,a,u,l,d,f,h,p){var y=w();try{return Ip(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function II(o,a,u,l,d,f,h,p,y,m,g,j,O){var M=w();try{return Sp(o,a,u,l,d,f,h,p,y,m,g,j,O)}catch(x){if(B(M),x!==x+0&&x!=="longjmp")throw x;T(1,0)}}function SI(o,a,u,l,d,f,h,p){var y=w();try{return Dp(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function DI(o,a,u,l,d,f,h,p,y){var m=w();try{return Vp(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function OI(o,a,u,l,d,f,h,p,y,m,g,j,O,M){var x=w();try{return Up(o,a,u,l,d,f,h,p,y,m,g,j,O,M)}catch(ue){if(B(x),ue!==ue+0&&ue!=="longjmp")throw ue;T(1,0)}}function AI(o,a,u,l,d){var f=w();try{return Op(o,a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function FI(o,a,u,l,d,f,h,p){var y=w();try{return Ap(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function MI(o,a,u,l,d,f,h,p,y,m){var g=w();try{return Cp(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function VI(o,a,u,l,d,f,h,p,y){var m=w();try{return Pp(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function UI(o,a,u,l,d,f,h,p,y){var m=w();try{return Ep(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function CI(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x){var ue=w();try{return Lp(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x)}catch(_e){if(B(ue),_e!==_e+0&&_e!=="longjmp")throw _e;T(1,0)}}function PI(o,a,u,l,d,f,h,p,y,m,g,j){var O=w();try{return qp(o,a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(B(O),M!==M+0&&M!=="longjmp")throw M;T(1,0)}}function kI(o,a,u,l,d,f,h,p,y){var m=w();try{return zp(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function RI(o,a,u,l,d,f,h,p,y){var m=w();try{Yp(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function NI(o,a){var u=w();try{return $p(o,a)}catch(l){if(B(u),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function xI(o,a){var u=w();try{return Gp(o,a)}catch(l){if(B(u),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function EI(o,a,u,l,d,f,h,p,y,m){var g=w();try{return Jp(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function LI(o,a,u,l,d,f,h,p,y,m,g,j){var O=w();try{return Kp(o,a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(B(O),M!==M+0&&M!=="longjmp")throw M;T(1,0)}}function qI(o,a,u,l,d,f,h,p,y,m){var g=w();try{return Zp(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function zI(o,a,u,l,d,f,h){var p=w();try{return Wp(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function WI(o,a,u,l,d,f,h){var p=w();try{return Hp(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function HI(o,a,u,l,d,f,h){var p=w();try{return Xp(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function YI(o,a,u,l,d,f,h,p){var y=w();try{return Qp(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function $I(o,a,u,l,d,f,h,p,y,m){var g=w();try{ey(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function GI(o,a,u,l,d,f,h,p,y){var m=w();try{ty(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function JI(o,a,u,l,d,f,h,p,y){var m=w();try{ry(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function KI(o,a,u,l,d,f,h,p){var y=w();try{iy(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function ZI(o,a,u,l,d,f,h,p,y,m,g,j){var O=w();try{oy(o,a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(B(O),M!==M+0&&M!=="longjmp")throw M;T(1,0)}}function XI(o,a,u,l,d,f){var h=w();try{return Ch(o,a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function QI(o,a,u,l,d,f,h,p,y,m){var g=w();try{uy(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function eS(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{return cy(o,a,u,l,d,f,h,p,y,m,g)}catch(O){if(B(j),O!==O+0&&O!=="longjmp")throw O;T(1,0)}}function tS(o,a,u,l,d,f,h,p,y,m,g,j,O){var M=w();try{ay(o,a,u,l,d,f,h,p,y,m,g,j,O)}catch(x){if(B(M),x!==x+0&&x!=="longjmp")throw x;T(1,0)}}function rS(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{nh(o,a,u,l,d,f,h,p,y,m,g)}catch(O){if(B(j),O!==O+0&&O!=="longjmp")throw O;T(1,0)}}function iS(o,a,u,l,d,f,h,p,y,m,g,j,O){var M=w();try{ly(o,a,u,l,d,f,h,p,y,m,g,j,O)}catch(x){if(B(M),x!==x+0&&x!=="longjmp")throw x;T(1,0)}}function nS(o,a,u,l,d,f,h,p,y,m){var g=w();try{return dy(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function sS(o,a,u,l,d,f,h,p,y,m){var g=w();try{return by(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function oS(o,a,u,l,d,f,h,p,y,m,g,j,O){var M=w();try{fy(o,a,u,l,d,f,h,p,y,m,g,j,O)}catch(x){if(B(M),x!==x+0&&x!=="longjmp")throw x;T(1,0)}}function aS(o,a,u,l,d,f,h,p,y,m){var g=w();try{hy(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function uS(o,a,u,l,d,f){var h=w();try{return py(o,a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function cS(o,a,u,l,d,f,h,p,y,m,g,j,O,M){var x=w();try{my(o,a,u,l,d,f,h,p,y,m,g,j,O,M)}catch(ue){if(B(x),ue!==ue+0&&ue!=="longjmp")throw ue;T(1,0)}}function lS(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{_y(o,a,u,l,d,f,h,p,y,m,g)}catch(O){if(B(j),O!==O+0&&O!=="longjmp")throw O;T(1,0)}}function dS(o,a,u,l,d,f,h,p,y,m){var g=w();try{yy(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function fS(o,a,u,l,d,f,h,p,y){var m=w();try{Ty(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function hS(o,a,u,l,d,f,h,p){var y=w();try{return vy(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function pS(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{return jy(o,a,u,l,d,f,h,p,y,m,g)}catch(O){if(B(j),O!==O+0&&O!=="longjmp")throw O;T(1,0)}}function yS(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{return gy(o,a,u,l,d,f,h,p,y,m,g)}catch(O){if(B(j),O!==O+0&&O!=="longjmp")throw O;T(1,0)}}function mS(o,a,u,l,d,f,h,p,y,m,g,j){var O=w();try{return wy(o,a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(B(O),M!==M+0&&M!=="longjmp")throw M;T(1,0)}}function _S(o,a,u,l,d,f,h,p,y,m){var g=w();try{return By(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}t.ccall=Vv;var ro;function mu(o){this.name="ExitStatus",this.message="Program terminated with exit("+o+")",this.status=o}var bS=!1;ts=function o(){ro||_u(),ro||(ts=o)};function gS(o){var a=t._main,u=0,l=0;try{var d=a(u,l);vS(d,!0)}catch(h){if(h instanceof mu||h=="unwind")return;var f=h;h&&typeof h=="object"&&h.stack&&(f=[h,h.stack]),Pr("exception thrown: "+f),S(1,h)}finally{bS=!0}}function _u(o){if(o=o||v,ji>0||(Yv(),ji>0))return;function a(){ro||(ro=!0,t.calledRun=!0,!uu&&($v(),Gv(),i(t),t.onRuntimeInitialized&&t.onRuntimeInitialized(),Iy&&gS(o),Kv()))}t.setStatus?(t.setStatus("Running..."),setTimeout(function(){setTimeout(function(){t.setStatus("")},1),a()},1)):a()}t.run=_u;function vS(o,a){Yd=o,nf()||(Jv(),t.onExit&&t.onExit(o),uu=!0),S(o,new mu(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),_u(),e.ready}}(),Tv=wU;var Wd=class extends ou{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 Sv=class extends Wd{constructor(e,t,i,n=null){super(e,t,i,n)}instantiateImpl(e){return Tv({...e,instantiateWasm:this.instantiateWasm.bind(this),locateFile:this.locateFile.bind(this)})}};var nt={fileInfoCache:new Map,getFileInfo(r,e){try{let t=nt.fileInfoCache.get(e);if(t)return t;let[i,n,s]=Se(r,"duckdb_web_fs_get_file_info",["number"],[e]);if(i!==je.SUCCESS)throw new Error(ve(r,n,s));let c=ve(r,n,s);He(r);let v=JSON.parse(c);if(v==null)return null;let I={...v,blob:null};return nt.fileInfoCache.set(e,I),I}catch(t){return We(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{nt.fileInfoCache.delete(e);let t=nt.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 We(r,`File does not support range requests: ${t.file_name}`),0;break}case Qe.NATIVE:{if(!nt._files?.get(t.file_name))return We(r,`No handle available for file: ${t.file_name}`),0;break}}}catch(t){We(r,t.toString())}return 0},glob:(r,e,t)=>{try{let i=ve(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 s=!1;if(n.status==206)s=!0;else if(n.status==200)s=n.getResponseHeader("Accept-Ranges")==="bytes";else{We(r,`HEAD request failed: ${i}`);return}if(!s){We(r,`File does not support range requests: ${i}`);return}r.ccall("duckdb_web_fs_glob_add_path",null,["string"],[i])}}catch(i){return We(r,i.toString()),0}},checkFile:(r,e,t)=>{try{let i=ve(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 s=!1;if(n.status==206)s=!0;else if(n.status==200)s=n.getResponseHeader("Accept-Ranges")==="bytes";else return!1;return!!s}}catch{return!1}return!1},syncFile:(r,e)=>{},closeFile:(r,e)=>{let t=nt.getFileInfo(r,e);switch(nt.fileInfoCache.delete(e),t?.data_protocol){case Qe.HTTP:break;case Qe.NATIVE:return}},truncateFile:(r,e,t)=>{switch(nt.getFileInfo(r,e)?.data_protocol){case Qe.HTTP:We(r,"Cannot truncate a http file");return;case Qe.NATIVE:We(r,"truncateFile not implemented");return}return 0},readFile(r,e,t,i,n){try{let s=nt.getFileInfo(r,e);switch(s?.data_protocol){case Qe.HTTP:{if(!s.data_url)return We(r,`Missing data URL for file ${e}`),0;let c=new XMLHttpRequest;if(c.open("GET",s.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 v=new Uint8Array(c.response,0,Math.min(c.response.byteLength,i));return r.HEAPU8.set(v,t),v.byteLength}else return c.status==200?(We(r,`Range request for ${s.data_url} did not return a partial response: ${c.status} "${c.statusText}"`),0):(We(r,`Range request for ${s.data_url} did returned non-success status: ${c.status} "${c.statusText}"`),0)}case Qe.NATIVE:{let c=nt._files?.get(s.file_name);if(!c)return We(r,`No handle available for file: ${s.file_name}`),0;let v=c.slice(n,n+i),I=new Uint8Array(new FileReaderSync().readAsArrayBuffer(v));return r.HEAPU8.set(I,t),I.byteLength}}return 0}catch(s){return We(r,s.toString()),0}},writeFile:(r,e,t,i,n)=>{switch(nt.getFileInfo(r,e)?.data_protocol){case Qe.HTTP:return We(r,"Cannot write to HTTP file"),0;case Qe.NATIVE:return We(r,"writefile not implemented"),0}return 0},getFileSize:(r,e)=>{try{let t=nt.getFileInfo(r,e);switch(t?.data_protocol){case Qe.NATIVE:{let i=nt._files?.get(t.file_name);return i?i.size:(We(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 We(r,t.toString()),0}},getLastFileModificationTime:(r,e)=>{let t=nt.getFileInfo(r,e);switch(t?.data_protocol){case Qe.NATIVE:{if(!nt._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 BU;})();
|
|
17
|
+
}`),this._dictionaries=[],this._recordBatches=[],super.close()}};dr.RecordBatchJSONWriter=Da;function _l(r,e){let t=e;e instanceof fl.Table&&(t=e.chunks,r.reset(void 0,e.schema));for(let i of t)r.write(i);return r.finish()}async function bl(r,e){for await(let t of e)r.write(t);return r.finish()}function Ob({name:r,type:e,nullable:t}){let i=new eF.JSONTypeAssembler;return{name:r,nullable:t,type:i.visit(e),children:(e.children||[]).map(Ob),dictionary:XA.DataType.isDictionary(e)?{id:e.id,isOrdered:e.isOrdered,indexType:i.visit(e.indices)}:void 0}}function iF(r,e,t=!1){let i=new QA.Field(`${e}`,r.type,r.nullCount>0),n=Db.JSONVectorAssembler.assemble(new ZA.Column(i,[r]));return JSON.stringify({id:e,isDelta:t,data:{count:r.length,columns:n}},null,2)}function nF(r){return JSON.stringify({count:r.length,columns:Db.JSONVectorAssembler.assemble(r)},null,2)}});var jl=V(fi=>{"use strict";Object.defineProperty(fi,"__esModule",{value:!0});fi.distributeVectorsIntoRecordBatches=fi.distributeColumnsIntoRecordBatches=fi.ensureSameLengthData=void 0;var Ab=Lt(),gl=Ke(),sF=ui(),oF=Fr(),vl=new Uint8Array(0),Fb=r=>[vl,vl,new Uint8Array(r),vl];function aF(r,e,t=e.reduce((i,n)=>Math.max(i,n.length),0)){let i,n,s=-1,c=e.length,v=[...r.fields],I=[],S=(t+63&~63)>>3;for(;++s<c;)(i=e[s])&&i.length===t?I[s]=i:((n=v[s]).nullable||(v[s]=v[s].clone({nullable:!0})),I[s]=i?i._changeLengthAndBackfillNullBitmap(t):Ab.Data.new(n.type,0,t,t,Fb(S)));return[new gl.Schema(v),t,I]}fi.ensureSameLengthData=aF;function uF(r){return Mb(new gl.Schema(r.map(({field:e})=>e)),r)}fi.distributeColumnsIntoRecordBatches=uF;function Mb(r,e){return cF(r,e.map(t=>t instanceof sF.Chunked?t.chunks.map(i=>i.data):[t.data]))}fi.distributeVectorsIntoRecordBatches=Mb;function cF(r,e){let t=[...r.fields],i=[],n={numBatches:e.reduce((G,_e)=>Math.max(G,_e.length),0)},s=0,c=0,v=-1,I=e.length,S,U=[];for(;n.numBatches-- >0;){for(c=Number.POSITIVE_INFINITY,v=-1;++v<I;)U[v]=S=e[v].shift(),c=Math.min(c,S?S.length:c);isFinite(c)&&(U=lF(t,c,U,e,n),c>0&&(i[s++]=[c,U.slice()]))}return[r=new gl.Schema(t,r.metadata),i.map(G=>new oF.RecordBatch(r,...G))]}function lF(r,e,t,i,n){let s,c,v=0,I=-1,S=i.length,U=(e+63&~63)>>3;for(;++I<S;)(s=t[I])&&(v=s.length)>=e?v===e?t[I]=s:(t[I]=s.slice(0,e),s=s.slice(e,v-e),n.numBatches=Math.max(n.numBatches,i[I].unshift(s))):((c=r[I]).nullable||(r[I]=c.clone({nullable:!0})),t[I]=s?s._changeLengthAndBackfillNullBitmap(e):Ab.Data.new(c.type,0,e,e,Fb(U)));return t}});var Ne=V(Aa=>{"use strict";Object.defineProperty(Aa,"__esModule",{value:!0});Aa.BaseVector=void 0;var dF=Te(),fF=ui(),hF=bs(),wl=Re(),Bl=class extends wl.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`${dF.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 wl.Vector.new(e,t)}concat(...e){return fF.Chunked.concat(this,...e)}slice(e,t){return hF.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]=wl.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){}};Aa.BaseVector=Bl;Bl.prototype[Symbol.isConcatSpreadable]=!0});var Tl=V(Fa=>{"use strict";Object.defineProperty(Fa,"__esModule",{value:!0});Fa.BinaryVector=void 0;var pF=Re(),yF=Ne(),mF=be(),Vb=class extends yF.BaseVector{asUtf8(){return pF.Vector.new(this.data.clone(new mF.Utf8))}};Fa.BinaryVector=Vb});var Il=V(Ma=>{"use strict";Object.defineProperty(Ma,"__esModule",{value:!0});Ma.BoolVector=void 0;var _F=be(),bF=Ne(),gF=fr(),Ub=class extends bF.BaseVector{static from(e){return gF.vectorFromValuesWithType(()=>new _F.Bool,e)}};Ma.BoolVector=Ub});var Dl=V(hi=>{"use strict";Object.defineProperty(hi,"__esModule",{value:!0});hi.DateMillisecondVector=hi.DateDayVector=hi.DateVector=void 0;var vF=Te(),jF=Ne(),Cb=fr(),Sl=be(),Va=class extends jF.BaseVector{static from(...e){return e.length===2?Cb.vectorFromValuesWithType(()=>e[1]===vF.DateUnit.DAY?new Sl.DateDay:new Sl.DateMillisecond,e[0]):Cb.vectorFromValuesWithType(()=>new Sl.DateMillisecond,e[0])}};hi.DateVector=Va;var Pb=class extends Va{};hi.DateDayVector=Pb;var kb=class extends Va{};hi.DateMillisecondVector=kb});var Ol=V(Ua=>{"use strict";Object.defineProperty(Ua,"__esModule",{value:!0});Ua.DecimalVector=void 0;var wF=Ne(),Rb=class extends wF.BaseVector{};Ua.DecimalVector=Rb});var Pa=V(Ca=>{"use strict";Object.defineProperty(Ca,"__esModule",{value:!0});Ca.DictionaryVector=void 0;var BF=Lt(),xb=Re(),TF=Ne(),IF=fr(),SF=be(),Al=class extends TF.BaseVector{constructor(e){super(e);this.indices=xb.Vector.new(e.clone(this.type.indices))}static from(...e){if(e.length===3){let[t,i,n]=e,s=new SF.Dictionary(t.type,i,null,null);return xb.Vector.new(BF.Data.Dictionary(s,0,n.length,0,null,n,t))}return IF.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)}};Ca.DictionaryVector=Al;Al.prototype.indices=null});var Fl=V(ka=>{"use strict";Object.defineProperty(ka,"__esModule",{value:!0});ka.FixedSizeBinaryVector=void 0;var DF=Ne(),Nb=class extends DF.BaseVector{};ka.FixedSizeBinaryVector=Nb});var Ml=V(Ra=>{"use strict";Object.defineProperty(Ra,"__esModule",{value:!0});Ra.FixedSizeListVector=void 0;var OF=Ne(),Eb=class extends OF.BaseVector{};Ra.FixedSizeListVector=Eb});var Pl=V(hr=>{"use strict";Object.defineProperty(hr,"__esModule",{value:!0});hr.Float64Vector=hr.Float32Vector=hr.Float16Vector=hr.FloatVector=void 0;var AF=Lt(),FF=Re(),MF=Ne(),VF=fr(),Wi=be(),Os=class extends MF.BaseVector{static from(e){let t=PF(this);if(e instanceof ArrayBuffer||ArrayBuffer.isView(e)){let i=CF(e.constructor)||t;if(t===null&&(t=i),t&&t===i){let n=new t,s=e.byteLength/n.ArrayType.BYTES_PER_ELEMENT;if(!UF(t,e.constructor))return FF.Vector.new(AF.Data.Float(n,0,s,0,null,e))}}if(t)return VF.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")}};hr.FloatVector=Os;var Vl=class extends Os{toFloat32Array(){return new Float32Array(this)}toFloat64Array(){return new Float64Array(this)}};hr.Float16Vector=Vl;var Ul=class extends Os{};hr.Float32Vector=Ul;var Cl=class extends Os{};hr.Float64Vector=Cl;var UF=(r,e)=>r===Wi.Float16&&e!==Uint16Array,CF=r=>{switch(r){case Uint16Array:return Wi.Float16;case Float32Array:return Wi.Float32;case Float64Array:return Wi.Float64;default:return null}},PF=r=>{switch(r){case Vl:return Wi.Float16;case Ul:return Wi.Float32;case Cl:return Wi.Float64;default:return null}}});var kl=V(pi=>{"use strict";Object.defineProperty(pi,"__esModule",{value:!0});pi.IntervalYearMonthVector=pi.IntervalDayTimeVector=pi.IntervalVector=void 0;var kF=Ne(),xa=class extends kF.BaseVector{};pi.IntervalVector=xa;var Lb=class extends xa{};pi.IntervalDayTimeVector=Lb;var qb=class extends xa{};pi.IntervalYearMonthVector=qb});var Na=V(ze=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});ze.Uint64Vector=ze.Uint32Vector=ze.Uint16Vector=ze.Uint8Vector=ze.Int64Vector=ze.Int32Vector=ze.Int16Vector=ze.Int8Vector=ze.IntVector=void 0;var RF=Lt(),xF=Re(),NF=Ne(),EF=fr(),zb=st(),Wb=Ye(),ke=be(),pr=class extends NF.BaseVector{static from(...e){let[t,i=!1]=e,n=zF(this,i);if(t instanceof ArrayBuffer||ArrayBuffer.isView(t)){let s=qF(t.constructor,i)||n;if(n===null&&(n=s),n&&n===s){let c=new n,v=t.byteLength/c.ArrayType.BYTES_PER_ELEMENT;return LF(n,t.constructor)&&(v*=.5),xF.Vector.new(RF.Data.Int(c,0,v,0,null,t))}}if(n)return EF.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")}};ze.IntVector=pr;var Rl=class extends pr{};ze.Int8Vector=Rl;var xl=class extends pr{};ze.Int16Vector=xl;var Nl=class extends pr{};ze.Int32Vector=Nl;var El=class extends pr{toBigInt64Array(){return Wb.toBigInt64Array(this.values)}get values64(){return this._values64||(this._values64=this.toBigInt64Array())}};ze.Int64Vector=El;var Ll=class extends pr{};ze.Uint8Vector=Ll;var ql=class extends pr{};ze.Uint16Vector=ql;var zl=class extends pr{};ze.Uint32Vector=zl;var Wl=class extends pr{toBigUint64Array(){return Wb.toBigUint64Array(this.values)}get values64(){return this._values64||(this._values64=this.toBigUint64Array())}};ze.Uint64Vector=Wl;var LF=(r,e)=>(r===ke.Int64||r===ke.Uint64)&&(e===Int32Array||e===Uint32Array),qF=(r,e)=>{switch(r){case Int8Array:return ke.Int8;case Int16Array:return ke.Int16;case Int32Array:return e?ke.Int64:ke.Int32;case zb.BigInt64Array:return ke.Int64;case Uint8Array:return ke.Uint8;case Uint16Array:return ke.Uint16;case Uint32Array:return e?ke.Uint64:ke.Uint32;case zb.BigUint64Array:return ke.Uint64;default:return null}},zF=(r,e)=>{switch(r){case Rl:return ke.Int8;case xl:return ke.Int16;case Nl:return e?ke.Int64:ke.Int32;case El:return ke.Int64;case Ll:return ke.Uint8;case ql:return ke.Uint16;case zl:return e?ke.Uint64:ke.Uint32;case Wl:return ke.Uint64;default:return null}}});var Hl=V(Ea=>{"use strict";Object.defineProperty(Ea,"__esModule",{value:!0});Ea.ListVector=void 0;var WF=Ne(),Hb=class extends WF.BaseVector{};Ea.ListVector=Hb});var Yl=V(La=>{"use strict";Object.defineProperty(La,"__esModule",{value:!0});La.MapVector=void 0;var HF=ms(),YF=Re(),$F=Ne(),GF=be(),Yb=class extends $F.BaseVector{asList(){let e=this.type.children[0];return YF.Vector.new(this.data.clone(new GF.List(e)))}bind(e){let t=this.getChildAt(0),{[e]:i,[e+1]:n}=this.valueOffsets;return new HF.MapRow(t.slice(i,n))}};La.MapVector=Yb});var $l=V(qa=>{"use strict";Object.defineProperty(qa,"__esModule",{value:!0});qa.NullVector=void 0;var JF=Ne(),$b=class extends JF.BaseVector{};qa.NullVector=$b});var Gl=V(za=>{"use strict";Object.defineProperty(za,"__esModule",{value:!0});za.StructVector=void 0;var KF=ms(),ZF=Ne(),XF=Symbol.for("rowIndex"),Gb=class extends ZF.BaseVector{bind(e){let t=this._row||(this._row=new KF.StructRow(this)),i=Object.create(t);return i[XF]=e,i}};za.StructVector=Gb});var Jl=V(Mt=>{"use strict";Object.defineProperty(Mt,"__esModule",{value:!0});Mt.TimestampNanosecondVector=Mt.TimestampMicrosecondVector=Mt.TimestampMillisecondVector=Mt.TimestampSecondVector=Mt.TimestampVector=void 0;var QF=Ne(),Pn=class extends QF.BaseVector{};Mt.TimestampVector=Pn;var Jb=class extends Pn{};Mt.TimestampSecondVector=Jb;var Kb=class extends Pn{};Mt.TimestampMillisecondVector=Kb;var Zb=class extends Pn{};Mt.TimestampMicrosecondVector=Zb;var Xb=class extends Pn{};Mt.TimestampNanosecondVector=Xb});var Kl=V(Vt=>{"use strict";Object.defineProperty(Vt,"__esModule",{value:!0});Vt.TimeNanosecondVector=Vt.TimeMicrosecondVector=Vt.TimeMillisecondVector=Vt.TimeSecondVector=Vt.TimeVector=void 0;var eM=Ne(),kn=class extends eM.BaseVector{};Vt.TimeVector=kn;var Qb=class extends kn{};Vt.TimeSecondVector=Qb;var eg=class extends kn{};Vt.TimeMillisecondVector=eg;var tg=class extends kn{};Vt.TimeMicrosecondVector=tg;var rg=class extends kn{};Vt.TimeNanosecondVector=rg});var Zl=V(yi=>{"use strict";Object.defineProperty(yi,"__esModule",{value:!0});yi.SparseUnionVector=yi.DenseUnionVector=yi.UnionVector=void 0;var tM=Ne(),Wa=class extends tM.BaseVector{get typeIdToChildIndex(){return this.data.type.typeIdToChildIndex}};yi.UnionVector=Wa;var ig=class extends Wa{get valueOffsets(){return this.data.valueOffsets}};yi.DenseUnionVector=ig;var ng=class extends Wa{};yi.SparseUnionVector=ng});var Xl=V(Ha=>{"use strict";Object.defineProperty(Ha,"__esModule",{value:!0});Ha.Utf8Vector=void 0;var rM=Re(),iM=Ne(),sg=be(),nM=fr(),og=class extends iM.BaseVector{static from(e){return nM.vectorFromValuesWithType(()=>new sg.Utf8,e)}asBinary(){return rM.Vector.new(this.data.clone(new sg.Binary))}};Ha.Utf8Vector=og});var ag=V(mi=>{"use strict";Object.defineProperty(mi,"__esModule",{value:!0});mi.partial2=mi.partial1=mi.partial0=void 0;function sM(r){return function(){return r(this)}}mi.partial0=sM;function oM(r){return function(e){return r(this,e)}}mi.partial1=oM;function aM(r){return function(e,t){return r(this,e,t)}}mi.partial2=aM});var td=V(Rn=>{"use strict";Object.defineProperty(Rn,"__esModule",{value:!0});Rn.instance=Rn.GetVisitor=void 0;var Ya=ls(),uM=tt(),cM=Ti(),lM=os(),Ut=Te(),K=class extends uM.Visitor{};Rn.GetVisitor=K;var dM=(r,e)=>864e5*r[e],Ql=(r,e)=>4294967296*r[e+1]+(r[e]>>>0),fM=(r,e)=>4294967296*(r[e+1]/1e3)+(r[e]>>>0)/1e3,hM=(r,e)=>4294967296*(r[e+1]/1e6)+(r[e]>>>0)/1e6,ug=r=>new Date(r),pM=(r,e)=>ug(dM(r,e)),yM=(r,e)=>ug(Ql(r,e)),mM=(r,e)=>null,cg=(r,e,t)=>{let{[t]:i,[t+1]:n}=e;return i!=null&&n!=null?r.subarray(i,n):null},_M=({offset:r,values:e},t)=>{let i=r+t;return(e[i>>3]&1<<i%8)!=0},lg=({values:r},e)=>pM(r,e),dg=({values:r},e)=>yM(r,e*2),yr=({stride:r,values:e},t)=>e[r*t],fg=({stride:r,values:e},t)=>lM.uint16ToFloat64(e[r*t]),ed=({stride:r,values:e,type:t},i)=>Ya.BN.new(e.subarray(r*i,r*(i+1)),t.isSigned),bM=({stride:r,values:e},t)=>e.subarray(r*t,r*(t+1)),gM=({values:r,valueOffsets:e},t)=>cg(r,e,t),vM=({values:r,valueOffsets:e},t)=>{let i=cg(r,e,t);return i!==null?cM.decodeUtf8(i):null},jM=(r,e)=>r.type.bitWidth<64?yr(r,e):ed(r,e),wM=(r,e)=>r.type.precision!==Ut.Precision.HALF?yr(r,e):fg(r,e),BM=(r,e)=>r.type.unit===Ut.DateUnit.DAY?lg(r,e):dg(r,e),hg=({values:r},e)=>1e3*Ql(r,e*2),pg=({values:r},e)=>Ql(r,e*2),yg=({values:r},e)=>fM(r,e*2),mg=({values:r},e)=>hM(r,e*2),TM=(r,e)=>{switch(r.type.unit){case Ut.TimeUnit.SECOND:return hg(r,e);case Ut.TimeUnit.MILLISECOND:return pg(r,e);case Ut.TimeUnit.MICROSECOND:return yg(r,e);case Ut.TimeUnit.NANOSECOND:return mg(r,e)}},_g=({values:r,stride:e},t)=>r[e*t],bg=({values:r,stride:e},t)=>r[e*t],gg=({values:r},e)=>Ya.BN.signed(r.subarray(2*e,2*(e+1))),vg=({values:r},e)=>Ya.BN.signed(r.subarray(2*e,2*(e+1))),IM=(r,e)=>{switch(r.type.unit){case Ut.TimeUnit.SECOND:return _g(r,e);case Ut.TimeUnit.MILLISECOND:return bg(r,e);case Ut.TimeUnit.MICROSECOND:return gg(r,e);case Ut.TimeUnit.NANOSECOND:return vg(r,e)}},SM=({values:r},e)=>Ya.BN.decimal(r.subarray(4*e,4*(e+1))),DM=(r,e)=>{let t=r.getChildAt(0),{valueOffsets:i,stride:n}=r;return t.slice(i[e*n],i[e*n+1])},OM=(r,e)=>r.bind(e),AM=(r,e)=>r.bind(e),FM=(r,e)=>r.type.mode===Ut.UnionMode.Dense?jg(r,e):wg(r,e),jg=(r,e)=>{let t=r.typeIdToChildIndex[r.typeIds[e]],i=r.getChildAt(t);return i?i.get(r.valueOffsets[e]):null},wg=(r,e)=>{let t=r.typeIdToChildIndex[r.typeIds[e]],i=r.getChildAt(t);return i?i.get(e):null},MM=(r,e)=>r.getValue(r.getKey(e)),VM=(r,e)=>r.type.unit===Ut.IntervalUnit.DAY_TIME?Bg(r,e):Tg(r,e),Bg=({values:r},e)=>r.subarray(2*e,2*(e+1)),Tg=({values:r},e)=>{let t=r[e],i=new Int32Array(2);return i[0]=t/12|0,i[1]=t%12|0,i},UM=(r,e)=>{let t=r.getChildAt(0),{stride:i}=r;return t.slice(e*i,(e+1)*i)};K.prototype.visitNull=mM;K.prototype.visitBool=_M;K.prototype.visitInt=jM;K.prototype.visitInt8=yr;K.prototype.visitInt16=yr;K.prototype.visitInt32=yr;K.prototype.visitInt64=ed;K.prototype.visitUint8=yr;K.prototype.visitUint16=yr;K.prototype.visitUint32=yr;K.prototype.visitUint64=ed;K.prototype.visitFloat=wM;K.prototype.visitFloat16=fg;K.prototype.visitFloat32=yr;K.prototype.visitFloat64=yr;K.prototype.visitUtf8=vM;K.prototype.visitBinary=gM;K.prototype.visitFixedSizeBinary=bM;K.prototype.visitDate=BM;K.prototype.visitDateDay=lg;K.prototype.visitDateMillisecond=dg;K.prototype.visitTimestamp=TM;K.prototype.visitTimestampSecond=hg;K.prototype.visitTimestampMillisecond=pg;K.prototype.visitTimestampMicrosecond=yg;K.prototype.visitTimestampNanosecond=mg;K.prototype.visitTime=IM;K.prototype.visitTimeSecond=_g;K.prototype.visitTimeMillisecond=bg;K.prototype.visitTimeMicrosecond=gg;K.prototype.visitTimeNanosecond=vg;K.prototype.visitDecimal=SM;K.prototype.visitList=DM;K.prototype.visitStruct=AM;K.prototype.visitUnion=FM;K.prototype.visitDenseUnion=jg;K.prototype.visitSparseUnion=wg;K.prototype.visitDictionary=MM;K.prototype.visitInterval=VM;K.prototype.visitIntervalDayTime=Bg;K.prototype.visitIntervalYearMonth=Tg;K.prototype.visitFixedSizeList=UM;K.prototype.visitMap=OM;Rn.instance=new K});var Og=V(xn=>{"use strict";Object.defineProperty(xn,"__esModule",{value:!0});xn.instance=xn.IndexOfVisitor=void 0;var CM=tt(),Ig=tr(),Sg=bs(),Z=class extends CM.Visitor{};xn.IndexOfVisitor=Z;function PM(r,e){return e===null&&r.length>0?0:-1}function kM(r,e){let{nullBitmap:t}=r.data;if(!t||r.nullCount<=0)return-1;let i=0;for(let n of new Ig.BitIterator(t,r.data.offset+(e||0),r.length,t,Ig.getBool)){if(!n)return i;++i}return-1}function ue(r,e,t){if(e===void 0)return-1;if(e===null)return kM(r,t);let i=Sg.createElementComparator(e);for(let n=(t||0)-1,s=r.length;++n<s;)if(i(r.get(n)))return n;return-1}function Dg(r,e,t){let i=Sg.createElementComparator(e);for(let n=(t||0)-1,s=r.length;++n<s;)if(i(r.get(n)))return n;return-1}Z.prototype.visitNull=PM;Z.prototype.visitBool=ue;Z.prototype.visitInt=ue;Z.prototype.visitInt8=ue;Z.prototype.visitInt16=ue;Z.prototype.visitInt32=ue;Z.prototype.visitInt64=ue;Z.prototype.visitUint8=ue;Z.prototype.visitUint16=ue;Z.prototype.visitUint32=ue;Z.prototype.visitUint64=ue;Z.prototype.visitFloat=ue;Z.prototype.visitFloat16=ue;Z.prototype.visitFloat32=ue;Z.prototype.visitFloat64=ue;Z.prototype.visitUtf8=ue;Z.prototype.visitBinary=ue;Z.prototype.visitFixedSizeBinary=ue;Z.prototype.visitDate=ue;Z.prototype.visitDateDay=ue;Z.prototype.visitDateMillisecond=ue;Z.prototype.visitTimestamp=ue;Z.prototype.visitTimestampSecond=ue;Z.prototype.visitTimestampMillisecond=ue;Z.prototype.visitTimestampMicrosecond=ue;Z.prototype.visitTimestampNanosecond=ue;Z.prototype.visitTime=ue;Z.prototype.visitTimeSecond=ue;Z.prototype.visitTimeMillisecond=ue;Z.prototype.visitTimeMicrosecond=ue;Z.prototype.visitTimeNanosecond=ue;Z.prototype.visitDecimal=ue;Z.prototype.visitList=ue;Z.prototype.visitStruct=ue;Z.prototype.visitUnion=ue;Z.prototype.visitDenseUnion=Dg;Z.prototype.visitSparseUnion=Dg;Z.prototype.visitDictionary=ue;Z.prototype.visitInterval=ue;Z.prototype.visitIntervalDayTime=ue;Z.prototype.visitIntervalYearMonth=ue;Z.prototype.visitFixedSizeList=ue;Z.prototype.visitMap=ue;xn.instance=new Z});var rd=V(Nn=>{"use strict";Object.defineProperty(Nn,"__esModule",{value:!0});Nn.instance=Nn.IteratorVisitor=void 0;var $a=Te(),RM=tt(),xM=tr(),Ag=td(),X=class extends RM.Visitor{};Nn.IteratorVisitor=X;function NM(r){let e=Ag.instance.getVisitFn(r);return new xM.BitIterator(r.data.nullBitmap,r.data.offset,r.length,r,(t,i,n,s)=>(n&1<<s)!=0?e(t,i):null)}var Fg=class{constructor(e,t){this.vector=e,this.getFn=t,this.index=0}next(){return this.index<this.vector.length?{value:this.getFn(this.vector,this.index++)}:{done:!0,value:null}}[Symbol.iterator](){return this}};function oe(r){if(r.nullCount>0)return NM(r);let{type:e,typeId:t,length:i}=r;return r.stride===1&&(t===$a.Type.Timestamp||t===$a.Type.Int&&e.bitWidth!==64||t===$a.Type.Time&&e.bitWidth!==64||t===$a.Type.Float&&e.precision>0)?r.data.values.subarray(0,i)[Symbol.iterator]():new Fg(r,Ag.instance.getVisitFn(r))}X.prototype.visitNull=oe;X.prototype.visitBool=oe;X.prototype.visitInt=oe;X.prototype.visitInt8=oe;X.prototype.visitInt16=oe;X.prototype.visitInt32=oe;X.prototype.visitInt64=oe;X.prototype.visitUint8=oe;X.prototype.visitUint16=oe;X.prototype.visitUint32=oe;X.prototype.visitUint64=oe;X.prototype.visitFloat=oe;X.prototype.visitFloat16=oe;X.prototype.visitFloat32=oe;X.prototype.visitFloat64=oe;X.prototype.visitUtf8=oe;X.prototype.visitBinary=oe;X.prototype.visitFixedSizeBinary=oe;X.prototype.visitDate=oe;X.prototype.visitDateDay=oe;X.prototype.visitDateMillisecond=oe;X.prototype.visitTimestamp=oe;X.prototype.visitTimestampSecond=oe;X.prototype.visitTimestampMillisecond=oe;X.prototype.visitTimestampMicrosecond=oe;X.prototype.visitTimestampNanosecond=oe;X.prototype.visitTime=oe;X.prototype.visitTimeSecond=oe;X.prototype.visitTimeMillisecond=oe;X.prototype.visitTimeMicrosecond=oe;X.prototype.visitTimeNanosecond=oe;X.prototype.visitDecimal=oe;X.prototype.visitList=oe;X.prototype.visitStruct=oe;X.prototype.visitUnion=oe;X.prototype.visitDenseUnion=oe;X.prototype.visitSparseUnion=oe;X.prototype.visitDictionary=oe;X.prototype.visitInterval=oe;X.prototype.visitIntervalDayTime=oe;X.prototype.visitIntervalYearMonth=oe;X.prototype.visitFixedSizeList=oe;X.prototype.visitMap=oe;Nn.instance=new X});var Mg=V(En=>{"use strict";Object.defineProperty(En,"__esModule",{value:!0});En.instance=En.ToArrayVisitor=void 0;var As=Te(),EM=tt(),LM=rd(),Q=class extends EM.Visitor{};En.ToArrayVisitor=Q;function ae(r){let{type:e,length:t,stride:i}=r;switch(e.typeId){case As.Type.Int:case As.Type.Float:case As.Type.Decimal:case As.Type.Time:case As.Type.Timestamp:return r.data.values.subarray(0,t*i)}return[...LM.instance.visit(r)]}Q.prototype.visitNull=ae;Q.prototype.visitBool=ae;Q.prototype.visitInt=ae;Q.prototype.visitInt8=ae;Q.prototype.visitInt16=ae;Q.prototype.visitInt32=ae;Q.prototype.visitInt64=ae;Q.prototype.visitUint8=ae;Q.prototype.visitUint16=ae;Q.prototype.visitUint32=ae;Q.prototype.visitUint64=ae;Q.prototype.visitFloat=ae;Q.prototype.visitFloat16=ae;Q.prototype.visitFloat32=ae;Q.prototype.visitFloat64=ae;Q.prototype.visitUtf8=ae;Q.prototype.visitBinary=ae;Q.prototype.visitFixedSizeBinary=ae;Q.prototype.visitDate=ae;Q.prototype.visitDateDay=ae;Q.prototype.visitDateMillisecond=ae;Q.prototype.visitTimestamp=ae;Q.prototype.visitTimestampSecond=ae;Q.prototype.visitTimestampMillisecond=ae;Q.prototype.visitTimestampMicrosecond=ae;Q.prototype.visitTimestampNanosecond=ae;Q.prototype.visitTime=ae;Q.prototype.visitTimeSecond=ae;Q.prototype.visitTimeMillisecond=ae;Q.prototype.visitTimeMicrosecond=ae;Q.prototype.visitTimeNanosecond=ae;Q.prototype.visitDecimal=ae;Q.prototype.visitList=ae;Q.prototype.visitStruct=ae;Q.prototype.visitUnion=ae;Q.prototype.visitDenseUnion=ae;Q.prototype.visitSparseUnion=ae;Q.prototype.visitDictionary=ae;Q.prototype.visitInterval=ae;Q.prototype.visitIntervalDayTime=ae;Q.prototype.visitIntervalYearMonth=ae;Q.prototype.visitFixedSizeList=ae;Q.prototype.visitMap=ae;En.instance=new Q});var Vg=V(Ln=>{"use strict";Object.defineProperty(Ln,"__esModule",{value:!0});Ln.instance=Ln.ByteWidthVisitor=void 0;var qM=tt(),zM=Te(),Fs=(r,e)=>r+e,id=r=>`Cannot compute the byte width of variable-width column ${r}`,nd=class extends qM.Visitor{visitNull(e){return 0}visitInt(e){return e.bitWidth/8}visitFloat(e){return e.ArrayType.BYTES_PER_ELEMENT}visitBinary(e){throw new Error(id(e))}visitUtf8(e){throw new Error(id(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===zM.TimeUnit.SECOND?4:8}visitInterval(e){return(e.unit+1)*4}visitList(e){throw new Error(id(e))}visitStruct(e){return this.visitFields(e.children).reduce(Fs,0)}visitUnion(e){return this.visitFields(e.children).reduce(Fs,0)}visitFixedSizeBinary(e){return e.byteWidth}visitFixedSizeList(e){return e.listSize*this.visitFields(e.children).reduce(Fs,0)}visitMap(e){return this.visitFields(e.children).reduce(Fs,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(Fs,0)}};Ln.ByteWidthVisitor=nd;Ln.instance=new nd});var Ug=V(qn=>{"use strict";Object.defineProperty(qn,"__esModule",{value:!0});qn.instance=qn.GetVectorConstructor=void 0;var WM=tt(),HM=Tl(),YM=Il(),sd=Dl(),$M=Ol(),GM=Pa(),JM=Fl(),KM=Ml(),Ga=Pl(),od=kl(),Mr=Na(),ZM=Hl(),XM=Yl(),QM=$l(),eV=Gl(),Ms=Jl(),Vs=Kl(),ad=Zl(),tV=Xl(),ud=class extends WM.Visitor{visitNull(){return QM.NullVector}visitBool(){return YM.BoolVector}visitInt(){return Mr.IntVector}visitInt8(){return Mr.Int8Vector}visitInt16(){return Mr.Int16Vector}visitInt32(){return Mr.Int32Vector}visitInt64(){return Mr.Int64Vector}visitUint8(){return Mr.Uint8Vector}visitUint16(){return Mr.Uint16Vector}visitUint32(){return Mr.Uint32Vector}visitUint64(){return Mr.Uint64Vector}visitFloat(){return Ga.FloatVector}visitFloat16(){return Ga.Float16Vector}visitFloat32(){return Ga.Float32Vector}visitFloat64(){return Ga.Float64Vector}visitUtf8(){return tV.Utf8Vector}visitBinary(){return HM.BinaryVector}visitFixedSizeBinary(){return JM.FixedSizeBinaryVector}visitDate(){return sd.DateVector}visitDateDay(){return sd.DateDayVector}visitDateMillisecond(){return sd.DateMillisecondVector}visitTimestamp(){return Ms.TimestampVector}visitTimestampSecond(){return Ms.TimestampSecondVector}visitTimestampMillisecond(){return Ms.TimestampMillisecondVector}visitTimestampMicrosecond(){return Ms.TimestampMicrosecondVector}visitTimestampNanosecond(){return Ms.TimestampNanosecondVector}visitTime(){return Vs.TimeVector}visitTimeSecond(){return Vs.TimeSecondVector}visitTimeMillisecond(){return Vs.TimeMillisecondVector}visitTimeMicrosecond(){return Vs.TimeMicrosecondVector}visitTimeNanosecond(){return Vs.TimeNanosecondVector}visitDecimal(){return $M.DecimalVector}visitList(){return ZM.ListVector}visitStruct(){return eV.StructVector}visitUnion(){return ad.UnionVector}visitDenseUnion(){return ad.DenseUnionVector}visitSparseUnion(){return ad.SparseUnionVector}visitDictionary(){return GM.DictionaryVector}visitInterval(){return od.IntervalVector}visitIntervalDayTime(){return od.IntervalDayTimeVector}visitIntervalYearMonth(){return od.IntervalYearMonthVector}visitFixedSizeList(){return KM.FixedSizeListVector}visitMap(){return XM.MapVector}};qn.GetVectorConstructor=ud;qn.instance=new ud});var fr=V(C=>{"use strict";Object.defineProperty(C,"__esModule",{value:!0});C.vectorFromValuesWithType=C.StructRow=C.MapRow=C.Utf8Vector=C.SparseUnionVector=C.DenseUnionVector=C.UnionVector=C.TimeNanosecondVector=C.TimeMicrosecondVector=C.TimeMillisecondVector=C.TimeSecondVector=C.TimeVector=C.TimestampNanosecondVector=C.TimestampMicrosecondVector=C.TimestampMillisecondVector=C.TimestampSecondVector=C.TimestampVector=C.StructVector=C.NullVector=C.MapVector=C.ListVector=C.Uint64Vector=C.Uint32Vector=C.Uint16Vector=C.Uint8Vector=C.Int64Vector=C.Int32Vector=C.Int16Vector=C.Int8Vector=C.IntVector=C.IntervalYearMonthVector=C.IntervalDayTimeVector=C.IntervalVector=C.Float64Vector=C.Float32Vector=C.Float16Vector=C.FloatVector=C.FixedSizeListVector=C.FixedSizeBinaryVector=C.DictionaryVector=C.DecimalVector=C.DateMillisecondVector=C.DateDayVector=C.DateVector=C.Chunked=C.BoolVector=C.BinaryVector=C.BaseVector=C.Vector=void 0;var rV=Re();Object.defineProperty(C,"Vector",{enumerable:!0,get:function(){return rV.Vector}});var iV=Ne();Object.defineProperty(C,"BaseVector",{enumerable:!0,get:function(){return iV.BaseVector}});var nV=Tl();Object.defineProperty(C,"BinaryVector",{enumerable:!0,get:function(){return nV.BinaryVector}});var sV=Il();Object.defineProperty(C,"BoolVector",{enumerable:!0,get:function(){return sV.BoolVector}});var oV=ui();Object.defineProperty(C,"Chunked",{enumerable:!0,get:function(){return oV.Chunked}});var cd=Dl();Object.defineProperty(C,"DateVector",{enumerable:!0,get:function(){return cd.DateVector}});Object.defineProperty(C,"DateDayVector",{enumerable:!0,get:function(){return cd.DateDayVector}});Object.defineProperty(C,"DateMillisecondVector",{enumerable:!0,get:function(){return cd.DateMillisecondVector}});var aV=Ol();Object.defineProperty(C,"DecimalVector",{enumerable:!0,get:function(){return aV.DecimalVector}});var uV=Pa();Object.defineProperty(C,"DictionaryVector",{enumerable:!0,get:function(){return uV.DictionaryVector}});var cV=Fl();Object.defineProperty(C,"FixedSizeBinaryVector",{enumerable:!0,get:function(){return cV.FixedSizeBinaryVector}});var lV=Ml();Object.defineProperty(C,"FixedSizeListVector",{enumerable:!0,get:function(){return lV.FixedSizeListVector}});var Ja=Pl();Object.defineProperty(C,"FloatVector",{enumerable:!0,get:function(){return Ja.FloatVector}});Object.defineProperty(C,"Float16Vector",{enumerable:!0,get:function(){return Ja.Float16Vector}});Object.defineProperty(C,"Float32Vector",{enumerable:!0,get:function(){return Ja.Float32Vector}});Object.defineProperty(C,"Float64Vector",{enumerable:!0,get:function(){return Ja.Float64Vector}});var ld=kl();Object.defineProperty(C,"IntervalVector",{enumerable:!0,get:function(){return ld.IntervalVector}});Object.defineProperty(C,"IntervalDayTimeVector",{enumerable:!0,get:function(){return ld.IntervalDayTimeVector}});Object.defineProperty(C,"IntervalYearMonthVector",{enumerable:!0,get:function(){return ld.IntervalYearMonthVector}});var Vr=Na();Object.defineProperty(C,"IntVector",{enumerable:!0,get:function(){return Vr.IntVector}});Object.defineProperty(C,"Int8Vector",{enumerable:!0,get:function(){return Vr.Int8Vector}});Object.defineProperty(C,"Int16Vector",{enumerable:!0,get:function(){return Vr.Int16Vector}});Object.defineProperty(C,"Int32Vector",{enumerable:!0,get:function(){return Vr.Int32Vector}});Object.defineProperty(C,"Int64Vector",{enumerable:!0,get:function(){return Vr.Int64Vector}});Object.defineProperty(C,"Uint8Vector",{enumerable:!0,get:function(){return Vr.Uint8Vector}});Object.defineProperty(C,"Uint16Vector",{enumerable:!0,get:function(){return Vr.Uint16Vector}});Object.defineProperty(C,"Uint32Vector",{enumerable:!0,get:function(){return Vr.Uint32Vector}});Object.defineProperty(C,"Uint64Vector",{enumerable:!0,get:function(){return Vr.Uint64Vector}});var dV=Hl();Object.defineProperty(C,"ListVector",{enumerable:!0,get:function(){return dV.ListVector}});var fV=Yl();Object.defineProperty(C,"MapVector",{enumerable:!0,get:function(){return fV.MapVector}});var hV=$l();Object.defineProperty(C,"NullVector",{enumerable:!0,get:function(){return hV.NullVector}});var pV=Gl();Object.defineProperty(C,"StructVector",{enumerable:!0,get:function(){return pV.StructVector}});var Us=Jl();Object.defineProperty(C,"TimestampVector",{enumerable:!0,get:function(){return Us.TimestampVector}});Object.defineProperty(C,"TimestampSecondVector",{enumerable:!0,get:function(){return Us.TimestampSecondVector}});Object.defineProperty(C,"TimestampMillisecondVector",{enumerable:!0,get:function(){return Us.TimestampMillisecondVector}});Object.defineProperty(C,"TimestampMicrosecondVector",{enumerable:!0,get:function(){return Us.TimestampMicrosecondVector}});Object.defineProperty(C,"TimestampNanosecondVector",{enumerable:!0,get:function(){return Us.TimestampNanosecondVector}});var Cs=Kl();Object.defineProperty(C,"TimeVector",{enumerable:!0,get:function(){return Cs.TimeVector}});Object.defineProperty(C,"TimeSecondVector",{enumerable:!0,get:function(){return Cs.TimeSecondVector}});Object.defineProperty(C,"TimeMillisecondVector",{enumerable:!0,get:function(){return Cs.TimeMillisecondVector}});Object.defineProperty(C,"TimeMicrosecondVector",{enumerable:!0,get:function(){return Cs.TimeMicrosecondVector}});Object.defineProperty(C,"TimeNanosecondVector",{enumerable:!0,get:function(){return Cs.TimeNanosecondVector}});var dd=Zl();Object.defineProperty(C,"UnionVector",{enumerable:!0,get:function(){return dd.UnionVector}});Object.defineProperty(C,"DenseUnionVector",{enumerable:!0,get:function(){return dd.DenseUnionVector}});Object.defineProperty(C,"SparseUnionVector",{enumerable:!0,get:function(){return dd.SparseUnionVector}});var yV=Xl();Object.defineProperty(C,"Utf8Vector",{enumerable:!0,get:function(){return yV.Utf8Vector}});var Cg=ms();Object.defineProperty(C,"MapRow",{enumerable:!0,get:function(){return Cg.MapRow}});Object.defineProperty(C,"StructRow",{enumerable:!0,get:function(){return Cg.StructRow}});var Ps=ag(),fd=Te(),zn=Re(),Pg=ui(),Hi=Ne(),mV=tr(),Ka=st(),kg=Ue(),Rg=td(),xg=Oc(),Ng=Og(),Eg=Mg(),Lg=rd(),qg=Vg(),zg=Ug();zn.Vector.new=_V;zn.Vector.from=gV;function _V(r,...e){return new(zg.instance.getVisitFn(r)())(r,...e)}function bV(r,e){if(Ka.isIterable(e))return zn.Vector.from({nullValues:[null,void 0],type:r(),values:e});if(Ka.isAsyncIterable(e))return zn.Vector.from({nullValues:[null,void 0],type:r(),values:e});let{values:t=[],type:i=r(),nullValues:n=[null,void 0]}={...e};return Ka.isIterable(t)?zn.Vector.from({nullValues:n,...e,type:i}):zn.Vector.from({nullValues:n,...e,type:i})}C.vectorFromValuesWithType=bV;function gV(r){let{values:e=[],...t}={nullValues:[null,void 0],...r};if(Ka.isIterable(e)){let i=[...kg.Builder.throughIterable(t)(e)];return i.length===1?i[0]:Pg.Chunked.concat(i)}return(async i=>{let n=kg.Builder.throughAsyncIterable(t);for await(let s of n(e))i.push(s);return i.length===1?i[0]:Pg.Chunked.concat(i)})([])}Hi.BaseVector.prototype.get=function(e){return Rg.instance.visit(this,e)};Hi.BaseVector.prototype.set=function(e,t){return xg.instance.visit(this,e,t)};Hi.BaseVector.prototype.indexOf=function(e,t){return Ng.instance.visit(this,e,t)};Hi.BaseVector.prototype.toArray=function(){return Eg.instance.visit(this)};Hi.BaseVector.prototype.getByteWidth=function(){return qg.instance.visit(this.type)};Hi.BaseVector.prototype[Symbol.iterator]=function(){return Lg.instance.visit(this)};Hi.BaseVector.prototype._bindDataAccessors=BV;Object.keys(fd.Type).map(r=>fd.Type[r]).filter(r=>typeof r=="number").filter(r=>r!==fd.Type.NONE).forEach(r=>{let e=zg.instance.visit(r);e.prototype.get=Ps.partial1(Rg.instance.getVisitFn(r)),e.prototype.set=Ps.partial2(xg.instance.getVisitFn(r)),e.prototype.indexOf=Ps.partial2(Ng.instance.getVisitFn(r)),e.prototype.toArray=Ps.partial0(Eg.instance.getVisitFn(r)),e.prototype.getByteWidth=vV(qg.instance.getVisitFn(r)),e.prototype[Symbol.iterator]=Ps.partial0(Lg.instance.getVisitFn(r))});function vV(r){return function(){return r(this.type)}}function jV(r){return function(e){return this.isValid(e)?r.call(this,e):null}}function wV(r){return function(e,t){mV.setBool(this.nullBitmap,this.offset+e,t!=null)&&r.call(this,e,t)}}function BV(){let r=this.nullBitmap;r&&r.byteLength>0&&(this.get=jV(this.get),this.set=wV(this.set))}});var Ds=V(Za=>{"use strict";Object.defineProperty(Za,"__esModule",{value:!0});Za.Table=void 0;var TV=An(),Wg=Ke(),hd=Fr(),IV=ks(),pd=be(),Hg=On(),yd=st(),Yg=Oa(),$g=jl(),md=fr(),Xe=class extends md.Chunked{constructor(...e){let t=null;e[0]instanceof Wg.Schema&&(t=e.shift());let i=Hg.selectArgs(hd.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 hd._InternalEmptyPlaceholderRecordBatch(t));super(new pd.Struct(t.fields),i);this._schema=t,this._chunks=i}static empty(e=new Wg.Schema([])){return new Xe(e,[])}static from(e){if(!e)return Xe.empty();if(typeof e=="object"){let i=yd.isIterable(e.values)?SV(e):yd.isAsyncIterable(e.values)?DV(e):null;if(i!==null)return i}let t=IV.RecordBatchReader.from(e);return yd.isPromise(t)?(async()=>await Xe.from(await t))():t.isSync()&&(t=t.open())?t.schema?new Xe(t.schema,[...t]):Xe.empty():(async i=>{let n=await i,s=n.schema,c=[];if(s){for await(let v of n)c.push(v);return new Xe(s,c)}return Xe.empty()})(t.open())}static async fromAsync(e){return await Xe.from(e)}static fromStruct(e){return Xe.new(e.data.childData,e.type.children)}static new(...e){return new Xe(...$g.distributeColumnsIntoRecordBatches(Hg.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 Xe(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,s=this._children||(this._children=[]);if(i=s[e])return i;if(t=n[e]){let c=this._chunks.map(v=>v.getChildAt(e)).filter(v=>v!=null);if(c.length>0)return s[e]=new TV.Column(t,c)}return null}serialize(e="binary",t=!0){return(t?Yg.RecordBatchStreamWriter:Yg.RecordBatchFileWriter).writeAll(this).toUint8Array(!0)}count(){return this._length}select(...e){let t=this._schema.fields.reduce((i,n,s)=>i.set(n.name,s),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 Xe(t,this._chunks.map(({length:i,data:{childData:n}})=>new hd.RecordBatch(t,i,e.map(s=>n[s]).filter(Boolean))))}assign(e){let t=this._schema.fields,[i,n]=e.schema.fields.reduce((v,I,S)=>{let[U,G]=v,_e=t.findIndex(fe=>fe.name===I.name);return~_e?G[_e]=S:U.push(S),v},[[],[]]),s=this._schema.assign(e.schema),c=[...t.map((v,I,S,U=n[I])=>U===void 0?this.getColumnAt(I):e.getColumnAt(U)),...i.map(v=>e.getColumnAt(v))].filter(Boolean);return new Xe(...$g.distributeVectorsIntoRecordBatches(s,c))}};Za.Table=Xe;function SV(r){let{type:e}=r;return e instanceof pd.Struct?Xe.fromStruct(md.StructVector.from(r)):null}function DV(r){let{type:e}=r;return e instanceof pd.Struct?md.StructVector.from(r).then(t=>Xe.fromStruct(t)):null}});var Fr=V(Wn=>{"use strict";Object.defineProperty(Wn,"__esModule",{value:!0});Wn._InternalEmptyPlaceholderRecordBatch=Wn.RecordBatch=void 0;var _d=Lt(),bd=Ds(),OV=Re(),AV=tt(),FV=Ke(),MV=st(),VV=ui(),UV=On(),gd=be(),CV=jl(),PV=fr(),_i=class extends PV.StructVector{constructor(...e){let t,i=e[0],n;if(e[1]instanceof _d.Data)[,t,n]=e;else{let s=i.fields,[,c,v]=e;t=_d.Data.Struct(new gd.Struct(s),0,c,0,null,v)}super(t,n);this._schema=i}static from(e){return MV.isIterable(e.values),bd.Table.from(e)}static new(...e){let[t,i]=UV.selectFieldArgs(e),n=i.filter(s=>s instanceof OV.Vector);return new _i(...CV.ensureSameLengthData(new FV.Schema(t),n.map(s=>s.data)))}clone(e,t=this._children){return new _i(this._schema,e,t)}concat(...e){let t=this._schema,i=VV.Chunked.flatten(this,...e);return new bd.Table(t,i.map(({data:n})=>new _i(t,n)))}get schema(){return this._schema}get numCols(){return this._schema.fields.length}get dictionaries(){return this._dictionaries||(this._dictionaries=Xa.collect(this))}select(...e){let t=this._schema.fields.reduce((i,n,s)=>i.set(n.name,s),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 _i(t,this.length,i)}};Wn.RecordBatch=_i;var Gg=class extends _i{constructor(e){super(e,0,e.fields.map(t=>_d.Data.new(t.type,0,0,0)))}};Wn._InternalEmptyPlaceholderRecordBatch=Gg;var Xa=class extends AV.Visitor{constructor(){super(...arguments);this.dictionaries=new Map}static collect(e){return new Xa().visit(e.data,new gd.Struct(e.schema.fields)).dictionaries}visit(e,t){return gd.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 ks=V(kt=>{"use strict";Object.defineProperty(kt,"__esModule",{value:!0});kt.AsyncRecordBatchFileReader=kt.RecordBatchFileReader=kt.AsyncRecordBatchStreamReader=kt.RecordBatchStreamReader=kt.RecordBatchReader=void 0;var Jg=Re(),Qa=Te(),Kg=Nc(),Zg=ns(),Xg=ni(),Rs=qc(),Qg=M_(),vd=Fr(),Yi=rn(),Ct=_a(),Pt=st(),mr=class extends Yi.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 Pt.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 Zg.default.toDOMStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this})}toNodeStream(){return Zg.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 mr?e:Pt.isArrowJSON(e)?kV(e):Pt.isFileHandle(e)?NV(e):Pt.isPromise(e)?(async()=>await mr.from(await e))():Pt.isFetchResponse(e)||Pt.isReadableDOMStream(e)||Pt.isReadableNodeStream(e)||Pt.isAsyncIterable(e)?xV(new Xg.AsyncByteStream(e)):RV(new Xg.ByteStream(e))}static readAll(e){return e instanceof mr?e.isSync()?iv(e):nv(e):Pt.isArrowJSON(e)||ArrayBuffer.isView(e)||Pt.isIterable(e)||Pt.isIteratorResult(e)?iv(e):nv(e)}};kt.RecordBatchReader=mr;var Hn=class extends mr{constructor(e){super(e);this._impl=e}[Symbol.iterator](){return this._impl[Symbol.iterator]()}async*[Symbol.asyncIterator](){yield*this[Symbol.iterator]()}};kt.RecordBatchStreamReader=Hn;var Yn=class extends mr{constructor(e){super(e);this._impl=e}[Symbol.iterator](){throw new Error("AsyncRecordBatchStreamReader is not Iterable")}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}};kt.AsyncRecordBatchStreamReader=Yn;var eu=class extends Hn{constructor(e){super(e);this._impl=e}};kt.RecordBatchFileReader=eu;var jd=class extends Yn{constructor(e){super(e);this._impl=e}};kt.AsyncRecordBatchFileReader=jd;var wd=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 vd.RecordBatch(this.schema,e.length,this._loadVectors(e,t,this.schema.fields))}_loadDictionaryBatch(e,t){let{id:i,isDelta:n,data:s}=e,{dictionaries:c,schema:v}=this,I=c.get(i);if(n||!I){let S=v.dictionaries.get(i);return I&&n?I.concat(Jg.Vector.new(this._loadVectors(s,t,[S])[0])):Jg.Vector.new(this._loadVectors(s,t,[S])[0])}return I}_loadVectors(e,t,i){return new Qg.VectorLoader(t,e.nodes,e.buffers,this.dictionaries).visitMany(i)}},xs=class extends wd{constructor(e,t){super(t);this._reader=Pt.isArrowJSON(e)?new Ct.JSONMessageReader(this._handle=e):new Ct.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=rv(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):Yi.ITERATOR_DONE}return(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(e):Yi.ITERATOR_DONE}next(){if(this.closed)return Yi.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),s=this._loadRecordBatch(i,n);return{done:!1,value:s}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;let i=e.header(),n=t.readMessageBody(e.bodyLength),s=this._loadDictionaryBatch(i,n);this.dictionaries.set(i.id,s)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new vd._InternalEmptyPlaceholderRecordBatch(this.schema)}):this.return()}_readNextMessageAndValidate(e){return this._reader.readMessage(e)}},Ns=class extends wd{constructor(e,t){super(t);this._reader=new Ct.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=rv(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):Yi.ITERATOR_DONE}async return(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?await this.reset()._reader.return(e):Yi.ITERATOR_DONE}async next(){if(this.closed)return Yi.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),s=this._loadRecordBatch(i,n);return{done:!1,value:s}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;let i=e.header(),n=await t.readMessageBody(e.bodyLength),s=this._loadDictionaryBatch(i,n);this.dictionaries.set(i.id,s)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new vd._InternalEmptyPlaceholderRecordBatch(this.schema)}):await this.return()}async _readNextMessageAndValidate(e){return await this._reader.readMessage(e)}},Bd=class extends xs{constructor(e,t){super(e instanceof Rs.RandomAccessFile?e:new Rs.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(Qa.MessageHeader.RecordBatch);if(i&&i.isRecordBatch()){let n=i.header(),s=this._reader.readMessageBody(i.bodyLength);return this._loadRecordBatch(n,s)}}return null}_readDictionaryBatch(e){let t=this._footer&&this._footer.getDictionaryBatch(e);if(t&&this._handle.seek(t.offset)){let i=this._reader.readMessage(Qa.MessageHeader.DictionaryBatch);if(i&&i.isDictionaryBatch()){let n=i.header(),s=this._reader.readMessageBody(i.bodyLength),c=this._loadDictionaryBatch(n,s);this.dictionaries.set(n.id,c)}}}_readFooter(){let{_handle:e}=this,t=e.size-Ct.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}},ev=class extends Ns{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 Rs.AsyncRandomAccessFile?e:new Rs.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(Qa.MessageHeader.RecordBatch);if(i&&i.isRecordBatch()){let n=i.header(),s=await this._reader.readMessageBody(i.bodyLength);return this._loadRecordBatch(n,s)}}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(Qa.MessageHeader.DictionaryBatch);if(i&&i.isDictionaryBatch()){let n=i.header(),s=await this._reader.readMessageBody(i.bodyLength),c=this._loadDictionaryBatch(n,s);this.dictionaries.set(n.id,c)}}}async _readFooter(){let{_handle:e}=this;e._pending&&await e._pending;let t=e.size-Ct.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}},tv=class extends xs{constructor(e,t){super(e,t)}_loadVectors(e,t,i){return new Qg.JSONVectorLoader(t,e.nodes,e.buffers,this.dictionaries).visitMany(i)}};function rv(r,e){return e&&typeof e.autoDestroy=="boolean"?e.autoDestroy:r.autoDestroy}function*iv(r){let e=mr.from(r);try{if(!e.open({autoDestroy:!1}).closed)do yield e;while(!e.reset().open().closed)}finally{e.cancel()}}async function*nv(r){let e=await mr.from(r);try{if(!(await e.open({autoDestroy:!1})).closed)do yield e;while(!(await e.reset().open()).closed)}finally{await e.cancel()}}function kV(r){return new Hn(new tv(r))}function RV(r){let e=r.peek(Ct.magicLength+7&~7);return e&&e.byteLength>=4?Ct.checkForMagicArrowString(e)?new eu(new Bd(r.read())):new Hn(new xs(r)):new Hn(new xs(function*(){}()))}async function xV(r){let e=await r.peek(Ct.magicLength+7&~7);return e&&e.byteLength>=4?Ct.checkForMagicArrowString(e)?new eu(new Bd(await r.read())):new Yn(new Ns(r)):new Yn(new Ns(async function*(){}()))}async function NV(r){let{size:e}=await r.stat(),t=new Rs.AsyncRandomAccessFile(r,e);return e>=Ct.magicX2AndPadding&&Ct.checkForMagicArrowString(await t.readAt(0,Ct.magicLength+7&~7))?new jd(new ev(t)):new Yn(new Ns(t))}});var av=V(tu=>{"use strict";Object.defineProperty(tu,"__esModule",{value:!0});tu.toDOMStream=void 0;var sv=Ye(),ov=st();function EV(r,e){if(ov.isAsyncIterable(r))return qV(r,e);if(ov.isIterable(r))return LV(r,e);throw new Error("toDOMStream() must be called with an Iterable or AsyncIterable")}tu.toDOMStream=EV;function LV(r,e){let t=null,i=e&&e.type==="bytes"||!1,n=e&&e.highWaterMark||2**24;return new ReadableStream({...e,start(c){s(c,t||(t=r[Symbol.iterator]()))},pull(c){t?s(c,t):c.close()},cancel(){(t&&t.return&&t.return()||!0)&&(t=null)}},{highWaterMark:i?n:void 0,...e});function s(c,v){let I,S=null,U=c.desiredSize||null;for(;!(S=v.next(i?U:null)).done;)if(ArrayBuffer.isView(S.value)&&(I=sv.toUint8Array(S.value))&&(U!=null&&i&&(U=U-I.byteLength+1),S.value=I),c.enqueue(S.value),U!=null&&--U<=0)return;c.close()}}function qV(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 s(c,t||(t=r[Symbol.asyncIterator]()))},async pull(c){t?await s(c,t):c.close()},async cancel(){(t&&t.return&&await t.return()||!0)&&(t=null)}},{highWaterMark:i?n:void 0,...e});async function s(c,v){let I,S=null,U=c.desiredSize||null;for(;!(S=await v.next(i?U:null)).done;)if(ArrayBuffer.isView(S.value)&&(I=sv.toUint8Array(S.value))&&(U!=null&&i&&(U=U-I.byteLength+1),S.value=I),c.enqueue(S.value),U!=null&&--U<=0)return;c.close()}}});var lv=V($n=>{"use strict";Object.defineProperty($n,"__esModule",{value:!0});$n.BuilderTransform=$n.builderThroughDOMStream=void 0;var zV=ia();function WV(r){return new Td(r)}$n.builderThroughDOMStream=WV;var Td=class{constructor(e){this._numChunks=0,this._finished=!1,this._bufferedSize=0;let{["readableStrategy"]:t,["writableStrategy"]:i,["queueingStrategy"]:n="count",...s}=e;this._controller=null,this._builder=zV.Builder.new(s),this._getSize=n!=="bytes"?uv:cv;let{["highWaterMark"]:c=n==="bytes"?2**14:1e3}={...t},{["highWaterMark"]:v=n==="bytes"?2**14:1e3}={...i};this.readable=new ReadableStream({cancel:()=>{this._builder.clear()},pull:I=>{this._maybeFlush(this._builder,this._controller=I)},start:I=>{this._maybeFlush(this._builder,this._controller=I)}},{highWaterMark:c,size:n!=="bytes"?uv:cv}),this.writable=new WritableStream({abort:()=>{this._builder.clear()},write:()=>{this._maybeFlush(this._builder,this._controller)},close:()=>{this._maybeFlush(this._builder.finish(),this._controller)}},{highWaterMark:v,size:I=>this._writeValueAndReturnChunkSize(I)})}_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)}};$n.BuilderTransform=Td;var uv=r=>r.length,cv=r=>r.byteLength});var dv=V(ru=>{"use strict";Object.defineProperty(ru,"__esModule",{value:!0});ru.recordBatchReaderThroughDOMStream=void 0;var HV=ni(),YV=ks();function $V(r,e){let t=new HV.AsyncByteQueue,i=null,n=new ReadableStream({async cancel(){await t.close()},async start(v){await c(v,i||(i=await s()))},async pull(v){i?await c(v,i):v.close()}});return{writable:new WritableStream(t,{highWaterMark:2**14,...r}),readable:n};async function s(){return await(await YV.RecordBatchReader.from(t)).open(e)}async function c(v,I){let S=v.desiredSize,U=null;for(;!(U=await I.next()).done;)if(v.enqueue(U.value),S!=null&&--S<=0)return;v.close()}}ru.recordBatchReaderThroughDOMStream=$V});var fv=V(iu=>{"use strict";Object.defineProperty(iu,"__esModule",{value:!0});iu.recordBatchWriterThroughDOMStream=void 0;var GV=ni();function JV(r,e){let t=new this(r),i=new GV.AsyncByteStream(t),n=new ReadableStream({type:"bytes",async cancel(){await i.cancel()},async pull(c){await s(c)},async start(c){await s(c)}},{highWaterMark:2**14,...e});return{writable:new WritableStream(t,r),readable:n};async function s(c){let v=null,I=c.desiredSize;for(;v=await i.read(I||null);)if(c.enqueue(v),I!=null&&(I-=v.byteLength)<=0)return;c.close()}}iu.recordBatchWriterThroughDOMStream=JV});var Fd=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 KV=Pa(),bi=class{eq(e){return e instanceof bi||(e=new Ur(e)),new Sd(this,e)}le(e){return e instanceof bi||(e=new Ur(e)),new Dd(this,e)}ge(e){return e instanceof bi||(e=new Ur(e)),new Od(this,e)}lt(e){return new Zn(this.ge(e))}gt(e){return new Zn(this.le(e))}ne(e){return new Zn(this.eq(e))}};le.Value=bi;var Ur=class extends bi{constructor(e){super();this.v=e}};le.Literal=Ur;var Id=class extends bi{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=Id;var Gn=class{and(...e){return new Jn(this,...e)}or(...e){return new Kn(this,...e)}not(){return new Zn(this)}};le.Predicate=Gn;var Es=class extends Gn{constructor(e,t){super();this.left=e,this.right=t}bind(e){return this.left instanceof Ur?this.right instanceof Ur?this._bindLitLit(e,this.left,this.right):this._bindLitCol(e,this.left,this.right):this.right instanceof Ur?this._bindColLit(e,this.left,this.right):this._bindColCol(e,this.left,this.right)}};le.ComparisonPredicate=Es;var Ls=class extends Gn{constructor(...e){super();this.children=e}};le.CombinationPredicate=Ls;Ls.prototype.children=Object.freeze([]);var Jn=class extends Ls{constructor(...e){e=e.reduce((t,i)=>t.concat(i instanceof Jn?i.children:i),[]);super(...e)}bind(e){let t=this.children.map(i=>i.bind(e));return(i,n)=>t.every(s=>s(i,n))}};le.And=Jn;var Kn=class extends Ls{constructor(...e){e=e.reduce((t,i)=>t.concat(i instanceof Kn?i.children:i),[]);super(...e)}bind(e){let t=this.children.map(i=>i.bind(e));return(i,n)=>t.some(s=>s(i,n))}};le.Or=Kn;var Sd=class extends Es{_bindLitLit(e,t,i){let n=t.v==i.v;return()=>n}_bindColCol(e,t,i){let n=t.bind(e),s=i.bind(e);return(c,v)=>n(c,v)==s(c,v)}_bindColLit(e,t,i){let n=t.bind(e);if(t.vector instanceof KV.DictionaryVector){let s,c=t.vector;return c.dictionary!==this.lastDictionary?(s=c.reverseLookup(i.v),this.lastDictionary=c.dictionary,this.lastKey=s):s=this.lastKey,s===-1?()=>!1:v=>c.getKey(v)===s}else return(s,c)=>n(s,c)==i.v}_bindLitCol(e,t,i){return this._bindColLit(e,i,t)}};le.Equals=Sd;var Dd=class extends Es{_bindLitLit(e,t,i){let n=t.v<=i.v;return()=>n}_bindColCol(e,t,i){let n=t.bind(e),s=i.bind(e);return(c,v)=>n(c,v)<=s(c,v)}_bindColLit(e,t,i){let n=t.bind(e);return(s,c)=>n(s,c)<=i.v}_bindLitCol(e,t,i){let n=i.bind(e);return(s,c)=>t.v<=n(s,c)}};le.LTeq=Dd;var Od=class extends Es{_bindLitLit(e,t,i){let n=t.v>=i.v;return()=>n}_bindColCol(e,t,i){let n=t.bind(e),s=i.bind(e);return(c,v)=>n(c,v)>=s(c,v)}_bindColLit(e,t,i){let n=t.bind(e);return(s,c)=>n(s,c)>=i.v}_bindLitCol(e,t,i){let n=i.bind(e);return(s,c)=>t.v>=n(s,c)}};le.GTeq=Od;var Zn=class extends Gn{constructor(e){super();this.child=e}bind(e){let t=this.child.bind(e);return(i,n)=>!t(i,n)}};le.Not=Zn;var Ad=class extends Gn{constructor(e,t){super();this.next=e,this.bind_=t}bind(e){return this.bind_(e),this.next}};le.CustomPredicate=Ad;function ZV(r){return new Ur(r)}le.lit=ZV;function XV(r){return new Id(r)}le.col=XV;function QV(...r){return new Jn(...r)}le.and=QV;function eU(...r){return new Kn(...r)}le.or=eU;function tU(r,e){return new Ad(r,e)}le.custom=tU});var _v=V(gi=>{"use strict";Object.defineProperty(gi,"__esModule",{value:!0});gi.FilteredDataFrame=gi.CountByResult=gi.DataFrame=void 0;var Xn=Ds(),hv=Na(),Md=Ke(),pv=Fd(),rU=Fr(),yv=be();Xn.Table.prototype.countBy=function(r){return new $i(this.chunks).countBy(r)};Xn.Table.prototype.scan=function(r,e){return new $i(this.chunks).scan(r,e)};Xn.Table.prototype.scanReverse=function(r,e){return new $i(this.chunks).scanReverse(r,e)};Xn.Table.prototype.filter=function(r){return new $i(this.chunks).filter(r)};var $i=class extends Xn.Table{filter(e){return new qs(this.chunks,e)}scan(e,t){let i=this.chunks,n=i.length;for(let s=-1;++s<n;){let c=i[s];t&&t(c);for(let v=-1,I=c.length;++v<I;)e(v,c)}}scanReverse(e,t){let i=this.chunks,n=i.length;for(let s=n;--s>=0;){let c=i[s];t&&t(c);for(let v=c.length;--v>=0;)e(v,c)}}countBy(e){let t=this.chunks,i=t.length,n=typeof e=="string"?new pv.Col(e):e;n.bind(t[i-1]);let s=n.vector;if(!yv.DataType.isDictionary(s.type))throw new Error("countBy currently only supports dictionary-encoded columns");let c=Math.ceil(Math.log(s.length)/Math.log(256)),v=c==4?Uint32Array:c>=2?Uint16Array:Uint8Array,I=new v(s.dictionary.length);for(let S=-1;++S<i;){let U=t[S];n.bind(U);let G=n.vector.indices;for(let _e=-1,fe=U.length;++_e<fe;){let $t=G.get(_e);$t!==null&&I[$t]++}}return new nu(s.dictionary,hv.IntVector.from(I))}};gi.DataFrame=$i;var nu=class extends Xn.Table{constructor(e,t){let i=new Md.Schema([new Md.Field("values",e.type),new Md.Field("counts",t.type)]);super(new rU.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}};gi.CountByResult=nu;var mv=class{constructor(e,t){this.batches=e,this.predicate=t,this.batchIndex=0,this.index=0,this.batch=this.batches[this.batchIndex],this.predicateFunc=this.predicate.bind(this.batch)}next(){for(;this.batchIndex<this.batches.length;){for(;this.index<this.batch.length;){if(this.predicateFunc(this.index,this.batch))return{value:this.batch.get(this.index++)};this.index++}++this.batchIndex<this.batches.length&&(this.index=0,this.batch=this.batches[this.batchIndex],this.predicateFunc=this.predicate.bind(this.batch))}return{done:!0,value:null}}[Symbol.iterator](){return this}},qs=class extends $i{constructor(e,t){super(e);this._predicate=t}scan(e,t){let i=this._chunks,n=i.length;for(let s=-1;++s<n;){let c=i[s],v=this._predicate.bind(c),I=!1;for(let S=-1,U=c.length;++S<U;)v(S,c)&&(t&&!I&&(t(c),I=!0),e(S,c))}}scanReverse(e,t){let i=this._chunks,n=i.length;for(let s=n;--s>=0;){let c=i[s],v=this._predicate.bind(c),I=!1;for(let S=c.length;--S>=0;)v(S,c)&&(t&&!I&&(t(c),I=!0),e(S,c))}}count(){let e=0,t=this._chunks,i=t.length;for(let n=-1;++n<i;){let s=t[n],c=this._predicate.bind(s);for(let v=-1,I=s.length;++v<I;)c(v,s)&&++e}return e}[Symbol.iterator](){return new mv(this._chunks,this._predicate)}filter(e){return new qs(this._chunks,this._predicate.and(e))}countBy(e){let t=this._chunks,i=t.length,n=typeof e=="string"?new pv.Col(e):e;n.bind(t[i-1]);let s=n.vector;if(!yv.DataType.isDictionary(s.type))throw new Error("countBy currently only supports dictionary-encoded columns");let c=Math.ceil(Math.log(s.length)/Math.log(256)),v=c==4?Uint32Array:c>=2?Uint16Array:Uint8Array,I=new v(s.dictionary.length);for(let S=-1;++S<i;){let U=t[S],G=this._predicate.bind(U);n.bind(U);let _e=n.vector.indices;for(let fe=-1,$t=U.length;++fe<$t;){let Cr=_e.get(fe);Cr!==null&&G(fe,U)&&I[Cr]++}}return new nu(s.dictionary,hv.IntVector.from(I))}};gi.FilteredDataFrame=qs});var vv=V(_=>{"use strict";Object.defineProperty(_,"__esModule",{value:!0});_.util=_.predicate=_.CountByResult=_.FilteredDataFrame=_.DataFrame=_.RecordBatch=_.Message=_.JSONMessageReader=_.AsyncMessageReader=_.MessageReader=_.RecordBatchJSONWriter=_.RecordBatchStreamWriter=_.RecordBatchFileWriter=_.RecordBatchWriter=_.AsyncRecordBatchStreamReader=_.AsyncRecordBatchFileReader=_.RecordBatchStreamReader=_.RecordBatchFileReader=_.RecordBatchReader=_.AsyncByteQueue=_.AsyncByteStream=_.ByteStream=_.Utf8Builder=_.SparseUnionBuilder=_.DenseUnionBuilder=_.UnionBuilder=_.TimeNanosecondBuilder=_.TimeMicrosecondBuilder=_.TimeMillisecondBuilder=_.TimeSecondBuilder=_.TimeBuilder=_.TimestampNanosecondBuilder=_.TimestampMicrosecondBuilder=_.TimestampMillisecondBuilder=_.TimestampSecondBuilder=_.TimestampBuilder=_.StructBuilder=_.NullBuilder=_.MapBuilder=_.ListBuilder=_.Uint64Builder=_.Uint32Builder=_.Uint16Builder=_.Uint8Builder=_.Int64Builder=_.Int32Builder=_.Int16Builder=_.Int8Builder=_.IntBuilder=_.IntervalYearMonthBuilder=_.IntervalDayTimeBuilder=_.IntervalBuilder=_.Float64Builder=_.Float32Builder=_.Float16Builder=_.FloatBuilder=_.FixedSizeListBuilder=_.FixedSizeBinaryBuilder=_.DictionaryBuilder=_.DecimalBuilder=_.DateMillisecondBuilder=_.DateDayBuilder=_.DateBuilder=_.BoolBuilder=_.BinaryBuilder=_.Builder=_.Utf8Vector=_.SparseUnionVector=_.DenseUnionVector=_.UnionVector=_.TimeNanosecondVector=_.TimeMicrosecondVector=_.TimeMillisecondVector=_.TimeSecondVector=_.TimeVector=_.TimestampNanosecondVector=_.TimestampMicrosecondVector=_.TimestampMillisecondVector=_.TimestampSecondVector=_.TimestampVector=_.StructVector=_.NullVector=_.MapVector=_.ListVector=_.Uint64Vector=_.Uint32Vector=_.Uint16Vector=_.Uint8Vector=_.Int64Vector=_.Int32Vector=_.Int16Vector=_.Int8Vector=_.IntVector=_.IntervalYearMonthVector=_.IntervalDayTimeVector=_.IntervalVector=_.Float64Vector=_.Float32Vector=_.Float16Vector=_.FloatVector=_.FixedSizeListVector=_.FixedSizeBinaryVector=_.DictionaryVector=_.DecimalVector=_.DateMillisecondVector=_.DateDayVector=_.DateVector=_.Chunked=_.BoolVector=_.BinaryVector=_.BaseVector=_.Vector=_.Field=_.Schema=_.Visitor=_.Column=_.Table=_.Map_=_.FixedSizeList=_.IntervalYearMonth=_.IntervalDayTime=_.Interval=_.Dictionary=_.SparseUnion=_.DenseUnion=_.Union=_.Struct=_.List=_.Decimal=_.TimeNanosecond=_.TimeMicrosecond=_.TimeMillisecond=_.TimeSecond=_.Time=_.TimestampNanosecond=_.TimestampMicrosecond=_.TimestampMillisecond=_.TimestampSecond=_.Timestamp=_.DateMillisecond=_.DateDay=_.Date_=_.FixedSizeBinary=_.Binary=_.Utf8=_.Float64=_.Float32=_.Float16=_.Float=_.Uint64=_.Uint32=_.Uint16=_.Uint8=_.Int64=_.Int32=_.Int16=_.Int8=_.Int=_.Bool=_.Null=_.DataType=_.Data=_.BufferType=_.Type=_.MessageHeader=_.MetadataVersion=_.IntervalUnit=_.UnionMode=_.Precision=_.TimeUnit=_.DateUnit=void 0;var Qn=Yr();Object.defineProperty(_,"DateUnit",{enumerable:!0,get:function(){return Qn.DateUnit}});Object.defineProperty(_,"TimeUnit",{enumerable:!0,get:function(){return Qn.TimeUnit}});Object.defineProperty(_,"Precision",{enumerable:!0,get:function(){return Qn.Precision}});Object.defineProperty(_,"UnionMode",{enumerable:!0,get:function(){return Qn.UnionMode}});Object.defineProperty(_,"IntervalUnit",{enumerable:!0,get:function(){return Qn.IntervalUnit}});Object.defineProperty(_,"MetadataVersion",{enumerable:!0,get:function(){return Qn.MetadataVersion}});var iU=_o();Object.defineProperty(_,"MessageHeader",{enumerable:!0,get:function(){return iU.MessageHeader}});var bv=Te();Object.defineProperty(_,"Type",{enumerable:!0,get:function(){return bv.Type}});Object.defineProperty(_,"BufferType",{enumerable:!0,get:function(){return bv.BufferType}});var nU=Lt();Object.defineProperty(_,"Data",{enumerable:!0,get:function(){return nU.Data}});var ne=be();Object.defineProperty(_,"DataType",{enumerable:!0,get:function(){return ne.DataType}});Object.defineProperty(_,"Null",{enumerable:!0,get:function(){return ne.Null}});Object.defineProperty(_,"Bool",{enumerable:!0,get:function(){return ne.Bool}});Object.defineProperty(_,"Int",{enumerable:!0,get:function(){return ne.Int}});Object.defineProperty(_,"Int8",{enumerable:!0,get:function(){return ne.Int8}});Object.defineProperty(_,"Int16",{enumerable:!0,get:function(){return ne.Int16}});Object.defineProperty(_,"Int32",{enumerable:!0,get:function(){return ne.Int32}});Object.defineProperty(_,"Int64",{enumerable:!0,get:function(){return ne.Int64}});Object.defineProperty(_,"Uint8",{enumerable:!0,get:function(){return ne.Uint8}});Object.defineProperty(_,"Uint16",{enumerable:!0,get:function(){return ne.Uint16}});Object.defineProperty(_,"Uint32",{enumerable:!0,get:function(){return ne.Uint32}});Object.defineProperty(_,"Uint64",{enumerable:!0,get:function(){return ne.Uint64}});Object.defineProperty(_,"Float",{enumerable:!0,get:function(){return ne.Float}});Object.defineProperty(_,"Float16",{enumerable:!0,get:function(){return ne.Float16}});Object.defineProperty(_,"Float32",{enumerable:!0,get:function(){return ne.Float32}});Object.defineProperty(_,"Float64",{enumerable:!0,get:function(){return ne.Float64}});Object.defineProperty(_,"Utf8",{enumerable:!0,get:function(){return ne.Utf8}});Object.defineProperty(_,"Binary",{enumerable:!0,get:function(){return ne.Binary}});Object.defineProperty(_,"FixedSizeBinary",{enumerable:!0,get:function(){return ne.FixedSizeBinary}});Object.defineProperty(_,"Date_",{enumerable:!0,get:function(){return ne.Date_}});Object.defineProperty(_,"DateDay",{enumerable:!0,get:function(){return ne.DateDay}});Object.defineProperty(_,"DateMillisecond",{enumerable:!0,get:function(){return ne.DateMillisecond}});Object.defineProperty(_,"Timestamp",{enumerable:!0,get:function(){return ne.Timestamp}});Object.defineProperty(_,"TimestampSecond",{enumerable:!0,get:function(){return ne.TimestampSecond}});Object.defineProperty(_,"TimestampMillisecond",{enumerable:!0,get:function(){return ne.TimestampMillisecond}});Object.defineProperty(_,"TimestampMicrosecond",{enumerable:!0,get:function(){return ne.TimestampMicrosecond}});Object.defineProperty(_,"TimestampNanosecond",{enumerable:!0,get:function(){return ne.TimestampNanosecond}});Object.defineProperty(_,"Time",{enumerable:!0,get:function(){return ne.Time}});Object.defineProperty(_,"TimeSecond",{enumerable:!0,get:function(){return ne.TimeSecond}});Object.defineProperty(_,"TimeMillisecond",{enumerable:!0,get:function(){return ne.TimeMillisecond}});Object.defineProperty(_,"TimeMicrosecond",{enumerable:!0,get:function(){return ne.TimeMicrosecond}});Object.defineProperty(_,"TimeNanosecond",{enumerable:!0,get:function(){return ne.TimeNanosecond}});Object.defineProperty(_,"Decimal",{enumerable:!0,get:function(){return ne.Decimal}});Object.defineProperty(_,"List",{enumerable:!0,get:function(){return ne.List}});Object.defineProperty(_,"Struct",{enumerable:!0,get:function(){return ne.Struct}});Object.defineProperty(_,"Union",{enumerable:!0,get:function(){return ne.Union}});Object.defineProperty(_,"DenseUnion",{enumerable:!0,get:function(){return ne.DenseUnion}});Object.defineProperty(_,"SparseUnion",{enumerable:!0,get:function(){return ne.SparseUnion}});Object.defineProperty(_,"Dictionary",{enumerable:!0,get:function(){return ne.Dictionary}});Object.defineProperty(_,"Interval",{enumerable:!0,get:function(){return ne.Interval}});Object.defineProperty(_,"IntervalDayTime",{enumerable:!0,get:function(){return ne.IntervalDayTime}});Object.defineProperty(_,"IntervalYearMonth",{enumerable:!0,get:function(){return ne.IntervalYearMonth}});Object.defineProperty(_,"FixedSizeList",{enumerable:!0,get:function(){return ne.FixedSizeList}});Object.defineProperty(_,"Map_",{enumerable:!0,get:function(){return ne.Map_}});var sU=Ds();Object.defineProperty(_,"Table",{enumerable:!0,get:function(){return sU.Table}});var oU=An();Object.defineProperty(_,"Column",{enumerable:!0,get:function(){return oU.Column}});var aU=tt();Object.defineProperty(_,"Visitor",{enumerable:!0,get:function(){return aU.Visitor}});var gv=Ke();Object.defineProperty(_,"Schema",{enumerable:!0,get:function(){return gv.Schema}});Object.defineProperty(_,"Field",{enumerable:!0,get:function(){return gv.Field}});var ee=fr();Object.defineProperty(_,"Vector",{enumerable:!0,get:function(){return ee.Vector}});Object.defineProperty(_,"BaseVector",{enumerable:!0,get:function(){return ee.BaseVector}});Object.defineProperty(_,"BinaryVector",{enumerable:!0,get:function(){return ee.BinaryVector}});Object.defineProperty(_,"BoolVector",{enumerable:!0,get:function(){return ee.BoolVector}});Object.defineProperty(_,"Chunked",{enumerable:!0,get:function(){return ee.Chunked}});Object.defineProperty(_,"DateVector",{enumerable:!0,get:function(){return ee.DateVector}});Object.defineProperty(_,"DateDayVector",{enumerable:!0,get:function(){return ee.DateDayVector}});Object.defineProperty(_,"DateMillisecondVector",{enumerable:!0,get:function(){return ee.DateMillisecondVector}});Object.defineProperty(_,"DecimalVector",{enumerable:!0,get:function(){return ee.DecimalVector}});Object.defineProperty(_,"DictionaryVector",{enumerable:!0,get:function(){return ee.DictionaryVector}});Object.defineProperty(_,"FixedSizeBinaryVector",{enumerable:!0,get:function(){return ee.FixedSizeBinaryVector}});Object.defineProperty(_,"FixedSizeListVector",{enumerable:!0,get:function(){return ee.FixedSizeListVector}});Object.defineProperty(_,"FloatVector",{enumerable:!0,get:function(){return ee.FloatVector}});Object.defineProperty(_,"Float16Vector",{enumerable:!0,get:function(){return ee.Float16Vector}});Object.defineProperty(_,"Float32Vector",{enumerable:!0,get:function(){return ee.Float32Vector}});Object.defineProperty(_,"Float64Vector",{enumerable:!0,get:function(){return ee.Float64Vector}});Object.defineProperty(_,"IntervalVector",{enumerable:!0,get:function(){return ee.IntervalVector}});Object.defineProperty(_,"IntervalDayTimeVector",{enumerable:!0,get:function(){return ee.IntervalDayTimeVector}});Object.defineProperty(_,"IntervalYearMonthVector",{enumerable:!0,get:function(){return ee.IntervalYearMonthVector}});Object.defineProperty(_,"IntVector",{enumerable:!0,get:function(){return ee.IntVector}});Object.defineProperty(_,"Int8Vector",{enumerable:!0,get:function(){return ee.Int8Vector}});Object.defineProperty(_,"Int16Vector",{enumerable:!0,get:function(){return ee.Int16Vector}});Object.defineProperty(_,"Int32Vector",{enumerable:!0,get:function(){return ee.Int32Vector}});Object.defineProperty(_,"Int64Vector",{enumerable:!0,get:function(){return ee.Int64Vector}});Object.defineProperty(_,"Uint8Vector",{enumerable:!0,get:function(){return ee.Uint8Vector}});Object.defineProperty(_,"Uint16Vector",{enumerable:!0,get:function(){return ee.Uint16Vector}});Object.defineProperty(_,"Uint32Vector",{enumerable:!0,get:function(){return ee.Uint32Vector}});Object.defineProperty(_,"Uint64Vector",{enumerable:!0,get:function(){return ee.Uint64Vector}});Object.defineProperty(_,"ListVector",{enumerable:!0,get:function(){return ee.ListVector}});Object.defineProperty(_,"MapVector",{enumerable:!0,get:function(){return ee.MapVector}});Object.defineProperty(_,"NullVector",{enumerable:!0,get:function(){return ee.NullVector}});Object.defineProperty(_,"StructVector",{enumerable:!0,get:function(){return ee.StructVector}});Object.defineProperty(_,"TimestampVector",{enumerable:!0,get:function(){return ee.TimestampVector}});Object.defineProperty(_,"TimestampSecondVector",{enumerable:!0,get:function(){return ee.TimestampSecondVector}});Object.defineProperty(_,"TimestampMillisecondVector",{enumerable:!0,get:function(){return ee.TimestampMillisecondVector}});Object.defineProperty(_,"TimestampMicrosecondVector",{enumerable:!0,get:function(){return ee.TimestampMicrosecondVector}});Object.defineProperty(_,"TimestampNanosecondVector",{enumerable:!0,get:function(){return ee.TimestampNanosecondVector}});Object.defineProperty(_,"TimeVector",{enumerable:!0,get:function(){return ee.TimeVector}});Object.defineProperty(_,"TimeSecondVector",{enumerable:!0,get:function(){return ee.TimeSecondVector}});Object.defineProperty(_,"TimeMillisecondVector",{enumerable:!0,get:function(){return ee.TimeMillisecondVector}});Object.defineProperty(_,"TimeMicrosecondVector",{enumerable:!0,get:function(){return ee.TimeMicrosecondVector}});Object.defineProperty(_,"TimeNanosecondVector",{enumerable:!0,get:function(){return ee.TimeNanosecondVector}});Object.defineProperty(_,"UnionVector",{enumerable:!0,get:function(){return ee.UnionVector}});Object.defineProperty(_,"DenseUnionVector",{enumerable:!0,get:function(){return ee.DenseUnionVector}});Object.defineProperty(_,"SparseUnionVector",{enumerable:!0,get:function(){return ee.SparseUnionVector}});Object.defineProperty(_,"Utf8Vector",{enumerable:!0,get:function(){return ee.Utf8Vector}});var se=ia();Object.defineProperty(_,"Builder",{enumerable:!0,get:function(){return se.Builder}});Object.defineProperty(_,"BinaryBuilder",{enumerable:!0,get:function(){return se.BinaryBuilder}});Object.defineProperty(_,"BoolBuilder",{enumerable:!0,get:function(){return se.BoolBuilder}});Object.defineProperty(_,"DateBuilder",{enumerable:!0,get:function(){return se.DateBuilder}});Object.defineProperty(_,"DateDayBuilder",{enumerable:!0,get:function(){return se.DateDayBuilder}});Object.defineProperty(_,"DateMillisecondBuilder",{enumerable:!0,get:function(){return se.DateMillisecondBuilder}});Object.defineProperty(_,"DecimalBuilder",{enumerable:!0,get:function(){return se.DecimalBuilder}});Object.defineProperty(_,"DictionaryBuilder",{enumerable:!0,get:function(){return se.DictionaryBuilder}});Object.defineProperty(_,"FixedSizeBinaryBuilder",{enumerable:!0,get:function(){return se.FixedSizeBinaryBuilder}});Object.defineProperty(_,"FixedSizeListBuilder",{enumerable:!0,get:function(){return se.FixedSizeListBuilder}});Object.defineProperty(_,"FloatBuilder",{enumerable:!0,get:function(){return se.FloatBuilder}});Object.defineProperty(_,"Float16Builder",{enumerable:!0,get:function(){return se.Float16Builder}});Object.defineProperty(_,"Float32Builder",{enumerable:!0,get:function(){return se.Float32Builder}});Object.defineProperty(_,"Float64Builder",{enumerable:!0,get:function(){return se.Float64Builder}});Object.defineProperty(_,"IntervalBuilder",{enumerable:!0,get:function(){return se.IntervalBuilder}});Object.defineProperty(_,"IntervalDayTimeBuilder",{enumerable:!0,get:function(){return se.IntervalDayTimeBuilder}});Object.defineProperty(_,"IntervalYearMonthBuilder",{enumerable:!0,get:function(){return se.IntervalYearMonthBuilder}});Object.defineProperty(_,"IntBuilder",{enumerable:!0,get:function(){return se.IntBuilder}});Object.defineProperty(_,"Int8Builder",{enumerable:!0,get:function(){return se.Int8Builder}});Object.defineProperty(_,"Int16Builder",{enumerable:!0,get:function(){return se.Int16Builder}});Object.defineProperty(_,"Int32Builder",{enumerable:!0,get:function(){return se.Int32Builder}});Object.defineProperty(_,"Int64Builder",{enumerable:!0,get:function(){return se.Int64Builder}});Object.defineProperty(_,"Uint8Builder",{enumerable:!0,get:function(){return se.Uint8Builder}});Object.defineProperty(_,"Uint16Builder",{enumerable:!0,get:function(){return se.Uint16Builder}});Object.defineProperty(_,"Uint32Builder",{enumerable:!0,get:function(){return se.Uint32Builder}});Object.defineProperty(_,"Uint64Builder",{enumerable:!0,get:function(){return se.Uint64Builder}});Object.defineProperty(_,"ListBuilder",{enumerable:!0,get:function(){return se.ListBuilder}});Object.defineProperty(_,"MapBuilder",{enumerable:!0,get:function(){return se.MapBuilder}});Object.defineProperty(_,"NullBuilder",{enumerable:!0,get:function(){return se.NullBuilder}});Object.defineProperty(_,"StructBuilder",{enumerable:!0,get:function(){return se.StructBuilder}});Object.defineProperty(_,"TimestampBuilder",{enumerable:!0,get:function(){return se.TimestampBuilder}});Object.defineProperty(_,"TimestampSecondBuilder",{enumerable:!0,get:function(){return se.TimestampSecondBuilder}});Object.defineProperty(_,"TimestampMillisecondBuilder",{enumerable:!0,get:function(){return se.TimestampMillisecondBuilder}});Object.defineProperty(_,"TimestampMicrosecondBuilder",{enumerable:!0,get:function(){return se.TimestampMicrosecondBuilder}});Object.defineProperty(_,"TimestampNanosecondBuilder",{enumerable:!0,get:function(){return se.TimestampNanosecondBuilder}});Object.defineProperty(_,"TimeBuilder",{enumerable:!0,get:function(){return se.TimeBuilder}});Object.defineProperty(_,"TimeSecondBuilder",{enumerable:!0,get:function(){return se.TimeSecondBuilder}});Object.defineProperty(_,"TimeMillisecondBuilder",{enumerable:!0,get:function(){return se.TimeMillisecondBuilder}});Object.defineProperty(_,"TimeMicrosecondBuilder",{enumerable:!0,get:function(){return se.TimeMicrosecondBuilder}});Object.defineProperty(_,"TimeNanosecondBuilder",{enumerable:!0,get:function(){return se.TimeNanosecondBuilder}});Object.defineProperty(_,"UnionBuilder",{enumerable:!0,get:function(){return se.UnionBuilder}});Object.defineProperty(_,"DenseUnionBuilder",{enumerable:!0,get:function(){return se.DenseUnionBuilder}});Object.defineProperty(_,"SparseUnionBuilder",{enumerable:!0,get:function(){return se.SparseUnionBuilder}});Object.defineProperty(_,"Utf8Builder",{enumerable:!0,get:function(){return se.Utf8Builder}});var Vd=ni();Object.defineProperty(_,"ByteStream",{enumerable:!0,get:function(){return Vd.ByteStream}});Object.defineProperty(_,"AsyncByteStream",{enumerable:!0,get:function(){return Vd.AsyncByteStream}});Object.defineProperty(_,"AsyncByteQueue",{enumerable:!0,get:function(){return Vd.AsyncByteQueue}});var zs=ks();Object.defineProperty(_,"RecordBatchReader",{enumerable:!0,get:function(){return zs.RecordBatchReader}});Object.defineProperty(_,"RecordBatchFileReader",{enumerable:!0,get:function(){return zs.RecordBatchFileReader}});Object.defineProperty(_,"RecordBatchStreamReader",{enumerable:!0,get:function(){return zs.RecordBatchStreamReader}});Object.defineProperty(_,"AsyncRecordBatchFileReader",{enumerable:!0,get:function(){return zs.AsyncRecordBatchFileReader}});Object.defineProperty(_,"AsyncRecordBatchStreamReader",{enumerable:!0,get:function(){return zs.AsyncRecordBatchStreamReader}});var su=Oa();Object.defineProperty(_,"RecordBatchWriter",{enumerable:!0,get:function(){return su.RecordBatchWriter}});Object.defineProperty(_,"RecordBatchFileWriter",{enumerable:!0,get:function(){return su.RecordBatchFileWriter}});Object.defineProperty(_,"RecordBatchStreamWriter",{enumerable:!0,get:function(){return su.RecordBatchStreamWriter}});Object.defineProperty(_,"RecordBatchJSONWriter",{enumerable:!0,get:function(){return su.RecordBatchJSONWriter}});var Ud=_a();Object.defineProperty(_,"MessageReader",{enumerable:!0,get:function(){return Ud.MessageReader}});Object.defineProperty(_,"AsyncMessageReader",{enumerable:!0,get:function(){return Ud.AsyncMessageReader}});Object.defineProperty(_,"JSONMessageReader",{enumerable:!0,get:function(){return Ud.JSONMessageReader}});var uU=Ei();Object.defineProperty(_,"Message",{enumerable:!0,get:function(){return uU.Message}});var cU=Fr();Object.defineProperty(_,"RecordBatch",{enumerable:!0,get:function(){return cU.RecordBatch}});var Cd=_v();Object.defineProperty(_,"DataFrame",{enumerable:!0,get:function(){return Cd.DataFrame}});Object.defineProperty(_,"FilteredDataFrame",{enumerable:!0,get:function(){return Cd.FilteredDataFrame}});Object.defineProperty(_,"CountByResult",{enumerable:!0,get:function(){return Cd.CountByResult}});var lU=ls(),dU=Wc(),fU=tr(),hU=os(),pU=Ye(),yU=bs(),mU=Fd();_.predicate=mU;var Pd=ol();_.util={...lU,...dU,...fU,...hU,...pU,...yU,compareSchemas:Pd.compareSchemas,compareFields:Pd.compareFields,compareTypes:Pd.compareTypes}});var Ed=V(b=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});b.Utf8Builder=b.SparseUnionBuilder=b.DenseUnionBuilder=b.UnionBuilder=b.TimeNanosecondBuilder=b.TimeMicrosecondBuilder=b.TimeMillisecondBuilder=b.TimeSecondBuilder=b.TimeBuilder=b.TimestampNanosecondBuilder=b.TimestampMicrosecondBuilder=b.TimestampMillisecondBuilder=b.TimestampSecondBuilder=b.TimestampBuilder=b.StructBuilder=b.NullBuilder=b.MapBuilder=b.ListBuilder=b.Uint64Builder=b.Uint32Builder=b.Uint16Builder=b.Uint8Builder=b.Int64Builder=b.Int32Builder=b.Int16Builder=b.Int8Builder=b.IntBuilder=b.IntervalYearMonthBuilder=b.IntervalDayTimeBuilder=b.IntervalBuilder=b.Float64Builder=b.Float32Builder=b.Float16Builder=b.FloatBuilder=b.FixedSizeListBuilder=b.FixedSizeBinaryBuilder=b.DictionaryBuilder=b.DecimalBuilder=b.DateMillisecondBuilder=b.DateDayBuilder=b.DateBuilder=b.BoolBuilder=b.BinaryBuilder=b.Builder=b.util=b.predicate=b.CountByResult=b.FilteredDataFrame=b.DataFrame=b.RecordBatch=b.Message=b.JSONMessageReader=b.AsyncMessageReader=b.MessageReader=b.RecordBatchJSONWriter=b.RecordBatchStreamWriter=b.RecordBatchFileWriter=b.RecordBatchWriter=b.AsyncRecordBatchStreamReader=b.AsyncRecordBatchFileReader=b.RecordBatchStreamReader=b.RecordBatchFileReader=b.RecordBatchReader=b.AsyncByteQueue=b.AsyncByteStream=b.ByteStream=b.Utf8Vector=b.SparseUnionVector=b.DenseUnionVector=b.UnionVector=b.TimeNanosecondVector=b.TimeMicrosecondVector=b.TimeMillisecondVector=b.TimeSecondVector=b.TimeVector=b.TimestampNanosecondVector=b.TimestampMicrosecondVector=b.TimestampMillisecondVector=b.TimestampSecondVector=b.TimestampVector=b.StructVector=b.NullVector=b.MapVector=b.ListVector=b.Uint64Vector=b.Uint32Vector=b.Uint16Vector=b.Uint8Vector=b.Int64Vector=b.Int32Vector=b.Int16Vector=b.Int8Vector=b.IntVector=b.IntervalYearMonthVector=b.IntervalDayTimeVector=b.IntervalVector=b.Float64Vector=b.Float32Vector=b.Float16Vector=b.FloatVector=b.FixedSizeListVector=b.FixedSizeBinaryVector=b.DictionaryVector=b.DecimalVector=b.DateMillisecondVector=b.DateDayVector=b.DateVector=b.Chunked=b.BoolVector=b.BinaryVector=b.BaseVector=b.Vector=b.Visitor=b.Field=b.Schema=b.Column=b.Table=b.Map_=b.FixedSizeList=b.IntervalYearMonth=b.IntervalDayTime=b.Interval=b.Dictionary=b.SparseUnion=b.DenseUnion=b.Union=b.Struct=b.List=b.Decimal=b.TimeNanosecond=b.TimeMicrosecond=b.TimeMillisecond=b.TimeSecond=b.Time=b.TimestampNanosecond=b.TimestampMicrosecond=b.TimestampMillisecond=b.TimestampSecond=b.Timestamp=b.DateMillisecond=b.DateDay=b.Date_=b.FixedSizeBinary=b.Binary=b.Utf8=b.Float64=b.Float32=b.Float16=b.Float=b.Uint64=b.Uint32=b.Uint16=b.Uint8=b.Int64=b.Int32=b.Int16=b.Int8=b.Int=b.Bool=b.Null=b.DataType=b.Data=b.BufferType=b.UnionMode=b.Type=b.TimeUnit=b.Precision=b.MetadataVersion=b.MessageHeader=b.IntervalUnit=b.DateUnit=void 0;var _U=ns(),bU=ia(),kd=ks(),Rd=Oa(),gU=av(),vU=lv(),xd=dv(),Nd=fv();_U.default.toDOMStream=gU.toDOMStream;bU.Builder.throughDOM=vU.builderThroughDOMStream;kd.RecordBatchReader.throughDOM=xd.recordBatchReaderThroughDOMStream;kd.RecordBatchFileReader.throughDOM=xd.recordBatchReaderThroughDOMStream;kd.RecordBatchStreamReader.throughDOM=xd.recordBatchReaderThroughDOMStream;Rd.RecordBatchWriter.throughDOM=Nd.recordBatchWriterThroughDOMStream;Rd.RecordBatchFileWriter.throughDOM=Nd.recordBatchWriterThroughDOMStream;Rd.RecordBatchStreamWriter.throughDOM=Nd.recordBatchWriterThroughDOMStream;var D=vv();Object.defineProperty(b,"DateUnit",{enumerable:!0,get:function(){return D.DateUnit}});Object.defineProperty(b,"IntervalUnit",{enumerable:!0,get:function(){return D.IntervalUnit}});Object.defineProperty(b,"MessageHeader",{enumerable:!0,get:function(){return D.MessageHeader}});Object.defineProperty(b,"MetadataVersion",{enumerable:!0,get:function(){return D.MetadataVersion}});Object.defineProperty(b,"Precision",{enumerable:!0,get:function(){return D.Precision}});Object.defineProperty(b,"TimeUnit",{enumerable:!0,get:function(){return D.TimeUnit}});Object.defineProperty(b,"Type",{enumerable:!0,get:function(){return D.Type}});Object.defineProperty(b,"UnionMode",{enumerable:!0,get:function(){return D.UnionMode}});Object.defineProperty(b,"BufferType",{enumerable:!0,get:function(){return D.BufferType}});Object.defineProperty(b,"Data",{enumerable:!0,get:function(){return D.Data}});Object.defineProperty(b,"DataType",{enumerable:!0,get:function(){return D.DataType}});Object.defineProperty(b,"Null",{enumerable:!0,get:function(){return D.Null}});Object.defineProperty(b,"Bool",{enumerable:!0,get:function(){return D.Bool}});Object.defineProperty(b,"Int",{enumerable:!0,get:function(){return D.Int}});Object.defineProperty(b,"Int8",{enumerable:!0,get:function(){return D.Int8}});Object.defineProperty(b,"Int16",{enumerable:!0,get:function(){return D.Int16}});Object.defineProperty(b,"Int32",{enumerable:!0,get:function(){return D.Int32}});Object.defineProperty(b,"Int64",{enumerable:!0,get:function(){return D.Int64}});Object.defineProperty(b,"Uint8",{enumerable:!0,get:function(){return D.Uint8}});Object.defineProperty(b,"Uint16",{enumerable:!0,get:function(){return D.Uint16}});Object.defineProperty(b,"Uint32",{enumerable:!0,get:function(){return D.Uint32}});Object.defineProperty(b,"Uint64",{enumerable:!0,get:function(){return D.Uint64}});Object.defineProperty(b,"Float",{enumerable:!0,get:function(){return D.Float}});Object.defineProperty(b,"Float16",{enumerable:!0,get:function(){return D.Float16}});Object.defineProperty(b,"Float32",{enumerable:!0,get:function(){return D.Float32}});Object.defineProperty(b,"Float64",{enumerable:!0,get:function(){return D.Float64}});Object.defineProperty(b,"Utf8",{enumerable:!0,get:function(){return D.Utf8}});Object.defineProperty(b,"Binary",{enumerable:!0,get:function(){return D.Binary}});Object.defineProperty(b,"FixedSizeBinary",{enumerable:!0,get:function(){return D.FixedSizeBinary}});Object.defineProperty(b,"Date_",{enumerable:!0,get:function(){return D.Date_}});Object.defineProperty(b,"DateDay",{enumerable:!0,get:function(){return D.DateDay}});Object.defineProperty(b,"DateMillisecond",{enumerable:!0,get:function(){return D.DateMillisecond}});Object.defineProperty(b,"Timestamp",{enumerable:!0,get:function(){return D.Timestamp}});Object.defineProperty(b,"TimestampSecond",{enumerable:!0,get:function(){return D.TimestampSecond}});Object.defineProperty(b,"TimestampMillisecond",{enumerable:!0,get:function(){return D.TimestampMillisecond}});Object.defineProperty(b,"TimestampMicrosecond",{enumerable:!0,get:function(){return D.TimestampMicrosecond}});Object.defineProperty(b,"TimestampNanosecond",{enumerable:!0,get:function(){return D.TimestampNanosecond}});Object.defineProperty(b,"Time",{enumerable:!0,get:function(){return D.Time}});Object.defineProperty(b,"TimeSecond",{enumerable:!0,get:function(){return D.TimeSecond}});Object.defineProperty(b,"TimeMillisecond",{enumerable:!0,get:function(){return D.TimeMillisecond}});Object.defineProperty(b,"TimeMicrosecond",{enumerable:!0,get:function(){return D.TimeMicrosecond}});Object.defineProperty(b,"TimeNanosecond",{enumerable:!0,get:function(){return D.TimeNanosecond}});Object.defineProperty(b,"Decimal",{enumerable:!0,get:function(){return D.Decimal}});Object.defineProperty(b,"List",{enumerable:!0,get:function(){return D.List}});Object.defineProperty(b,"Struct",{enumerable:!0,get:function(){return D.Struct}});Object.defineProperty(b,"Union",{enumerable:!0,get:function(){return D.Union}});Object.defineProperty(b,"DenseUnion",{enumerable:!0,get:function(){return D.DenseUnion}});Object.defineProperty(b,"SparseUnion",{enumerable:!0,get:function(){return D.SparseUnion}});Object.defineProperty(b,"Dictionary",{enumerable:!0,get:function(){return D.Dictionary}});Object.defineProperty(b,"Interval",{enumerable:!0,get:function(){return D.Interval}});Object.defineProperty(b,"IntervalDayTime",{enumerable:!0,get:function(){return D.IntervalDayTime}});Object.defineProperty(b,"IntervalYearMonth",{enumerable:!0,get:function(){return D.IntervalYearMonth}});Object.defineProperty(b,"FixedSizeList",{enumerable:!0,get:function(){return D.FixedSizeList}});Object.defineProperty(b,"Map_",{enumerable:!0,get:function(){return D.Map_}});Object.defineProperty(b,"Table",{enumerable:!0,get:function(){return D.Table}});Object.defineProperty(b,"Column",{enumerable:!0,get:function(){return D.Column}});Object.defineProperty(b,"Schema",{enumerable:!0,get:function(){return D.Schema}});Object.defineProperty(b,"Field",{enumerable:!0,get:function(){return D.Field}});Object.defineProperty(b,"Visitor",{enumerable:!0,get:function(){return D.Visitor}});Object.defineProperty(b,"Vector",{enumerable:!0,get:function(){return D.Vector}});Object.defineProperty(b,"BaseVector",{enumerable:!0,get:function(){return D.BaseVector}});Object.defineProperty(b,"BinaryVector",{enumerable:!0,get:function(){return D.BinaryVector}});Object.defineProperty(b,"BoolVector",{enumerable:!0,get:function(){return D.BoolVector}});Object.defineProperty(b,"Chunked",{enumerable:!0,get:function(){return D.Chunked}});Object.defineProperty(b,"DateVector",{enumerable:!0,get:function(){return D.DateVector}});Object.defineProperty(b,"DateDayVector",{enumerable:!0,get:function(){return D.DateDayVector}});Object.defineProperty(b,"DateMillisecondVector",{enumerable:!0,get:function(){return D.DateMillisecondVector}});Object.defineProperty(b,"DecimalVector",{enumerable:!0,get:function(){return D.DecimalVector}});Object.defineProperty(b,"DictionaryVector",{enumerable:!0,get:function(){return D.DictionaryVector}});Object.defineProperty(b,"FixedSizeBinaryVector",{enumerable:!0,get:function(){return D.FixedSizeBinaryVector}});Object.defineProperty(b,"FixedSizeListVector",{enumerable:!0,get:function(){return D.FixedSizeListVector}});Object.defineProperty(b,"FloatVector",{enumerable:!0,get:function(){return D.FloatVector}});Object.defineProperty(b,"Float16Vector",{enumerable:!0,get:function(){return D.Float16Vector}});Object.defineProperty(b,"Float32Vector",{enumerable:!0,get:function(){return D.Float32Vector}});Object.defineProperty(b,"Float64Vector",{enumerable:!0,get:function(){return D.Float64Vector}});Object.defineProperty(b,"IntervalVector",{enumerable:!0,get:function(){return D.IntervalVector}});Object.defineProperty(b,"IntervalDayTimeVector",{enumerable:!0,get:function(){return D.IntervalDayTimeVector}});Object.defineProperty(b,"IntervalYearMonthVector",{enumerable:!0,get:function(){return D.IntervalYearMonthVector}});Object.defineProperty(b,"IntVector",{enumerable:!0,get:function(){return D.IntVector}});Object.defineProperty(b,"Int8Vector",{enumerable:!0,get:function(){return D.Int8Vector}});Object.defineProperty(b,"Int16Vector",{enumerable:!0,get:function(){return D.Int16Vector}});Object.defineProperty(b,"Int32Vector",{enumerable:!0,get:function(){return D.Int32Vector}});Object.defineProperty(b,"Int64Vector",{enumerable:!0,get:function(){return D.Int64Vector}});Object.defineProperty(b,"Uint8Vector",{enumerable:!0,get:function(){return D.Uint8Vector}});Object.defineProperty(b,"Uint16Vector",{enumerable:!0,get:function(){return D.Uint16Vector}});Object.defineProperty(b,"Uint32Vector",{enumerable:!0,get:function(){return D.Uint32Vector}});Object.defineProperty(b,"Uint64Vector",{enumerable:!0,get:function(){return D.Uint64Vector}});Object.defineProperty(b,"ListVector",{enumerable:!0,get:function(){return D.ListVector}});Object.defineProperty(b,"MapVector",{enumerable:!0,get:function(){return D.MapVector}});Object.defineProperty(b,"NullVector",{enumerable:!0,get:function(){return D.NullVector}});Object.defineProperty(b,"StructVector",{enumerable:!0,get:function(){return D.StructVector}});Object.defineProperty(b,"TimestampVector",{enumerable:!0,get:function(){return D.TimestampVector}});Object.defineProperty(b,"TimestampSecondVector",{enumerable:!0,get:function(){return D.TimestampSecondVector}});Object.defineProperty(b,"TimestampMillisecondVector",{enumerable:!0,get:function(){return D.TimestampMillisecondVector}});Object.defineProperty(b,"TimestampMicrosecondVector",{enumerable:!0,get:function(){return D.TimestampMicrosecondVector}});Object.defineProperty(b,"TimestampNanosecondVector",{enumerable:!0,get:function(){return D.TimestampNanosecondVector}});Object.defineProperty(b,"TimeVector",{enumerable:!0,get:function(){return D.TimeVector}});Object.defineProperty(b,"TimeSecondVector",{enumerable:!0,get:function(){return D.TimeSecondVector}});Object.defineProperty(b,"TimeMillisecondVector",{enumerable:!0,get:function(){return D.TimeMillisecondVector}});Object.defineProperty(b,"TimeMicrosecondVector",{enumerable:!0,get:function(){return D.TimeMicrosecondVector}});Object.defineProperty(b,"TimeNanosecondVector",{enumerable:!0,get:function(){return D.TimeNanosecondVector}});Object.defineProperty(b,"UnionVector",{enumerable:!0,get:function(){return D.UnionVector}});Object.defineProperty(b,"DenseUnionVector",{enumerable:!0,get:function(){return D.DenseUnionVector}});Object.defineProperty(b,"SparseUnionVector",{enumerable:!0,get:function(){return D.SparseUnionVector}});Object.defineProperty(b,"Utf8Vector",{enumerable:!0,get:function(){return D.Utf8Vector}});Object.defineProperty(b,"ByteStream",{enumerable:!0,get:function(){return D.ByteStream}});Object.defineProperty(b,"AsyncByteStream",{enumerable:!0,get:function(){return D.AsyncByteStream}});Object.defineProperty(b,"AsyncByteQueue",{enumerable:!0,get:function(){return D.AsyncByteQueue}});Object.defineProperty(b,"RecordBatchReader",{enumerable:!0,get:function(){return D.RecordBatchReader}});Object.defineProperty(b,"RecordBatchFileReader",{enumerable:!0,get:function(){return D.RecordBatchFileReader}});Object.defineProperty(b,"RecordBatchStreamReader",{enumerable:!0,get:function(){return D.RecordBatchStreamReader}});Object.defineProperty(b,"AsyncRecordBatchFileReader",{enumerable:!0,get:function(){return D.AsyncRecordBatchFileReader}});Object.defineProperty(b,"AsyncRecordBatchStreamReader",{enumerable:!0,get:function(){return D.AsyncRecordBatchStreamReader}});Object.defineProperty(b,"RecordBatchWriter",{enumerable:!0,get:function(){return D.RecordBatchWriter}});Object.defineProperty(b,"RecordBatchFileWriter",{enumerable:!0,get:function(){return D.RecordBatchFileWriter}});Object.defineProperty(b,"RecordBatchStreamWriter",{enumerable:!0,get:function(){return D.RecordBatchStreamWriter}});Object.defineProperty(b,"RecordBatchJSONWriter",{enumerable:!0,get:function(){return D.RecordBatchJSONWriter}});Object.defineProperty(b,"MessageReader",{enumerable:!0,get:function(){return D.MessageReader}});Object.defineProperty(b,"AsyncMessageReader",{enumerable:!0,get:function(){return D.AsyncMessageReader}});Object.defineProperty(b,"JSONMessageReader",{enumerable:!0,get:function(){return D.JSONMessageReader}});Object.defineProperty(b,"Message",{enumerable:!0,get:function(){return D.Message}});Object.defineProperty(b,"RecordBatch",{enumerable:!0,get:function(){return D.RecordBatch}});Object.defineProperty(b,"DataFrame",{enumerable:!0,get:function(){return D.DataFrame}});Object.defineProperty(b,"FilteredDataFrame",{enumerable:!0,get:function(){return D.FilteredDataFrame}});Object.defineProperty(b,"CountByResult",{enumerable:!0,get:function(){return D.CountByResult}});Object.defineProperty(b,"predicate",{enumerable:!0,get:function(){return D.predicate}});Object.defineProperty(b,"util",{enumerable:!0,get:function(){return D.util}});Object.defineProperty(b,"Builder",{enumerable:!0,get:function(){return D.Builder}});Object.defineProperty(b,"BinaryBuilder",{enumerable:!0,get:function(){return D.BinaryBuilder}});Object.defineProperty(b,"BoolBuilder",{enumerable:!0,get:function(){return D.BoolBuilder}});Object.defineProperty(b,"DateBuilder",{enumerable:!0,get:function(){return D.DateBuilder}});Object.defineProperty(b,"DateDayBuilder",{enumerable:!0,get:function(){return D.DateDayBuilder}});Object.defineProperty(b,"DateMillisecondBuilder",{enumerable:!0,get:function(){return D.DateMillisecondBuilder}});Object.defineProperty(b,"DecimalBuilder",{enumerable:!0,get:function(){return D.DecimalBuilder}});Object.defineProperty(b,"DictionaryBuilder",{enumerable:!0,get:function(){return D.DictionaryBuilder}});Object.defineProperty(b,"FixedSizeBinaryBuilder",{enumerable:!0,get:function(){return D.FixedSizeBinaryBuilder}});Object.defineProperty(b,"FixedSizeListBuilder",{enumerable:!0,get:function(){return D.FixedSizeListBuilder}});Object.defineProperty(b,"FloatBuilder",{enumerable:!0,get:function(){return D.FloatBuilder}});Object.defineProperty(b,"Float16Builder",{enumerable:!0,get:function(){return D.Float16Builder}});Object.defineProperty(b,"Float32Builder",{enumerable:!0,get:function(){return D.Float32Builder}});Object.defineProperty(b,"Float64Builder",{enumerable:!0,get:function(){return D.Float64Builder}});Object.defineProperty(b,"IntervalBuilder",{enumerable:!0,get:function(){return D.IntervalBuilder}});Object.defineProperty(b,"IntervalDayTimeBuilder",{enumerable:!0,get:function(){return D.IntervalDayTimeBuilder}});Object.defineProperty(b,"IntervalYearMonthBuilder",{enumerable:!0,get:function(){return D.IntervalYearMonthBuilder}});Object.defineProperty(b,"IntBuilder",{enumerable:!0,get:function(){return D.IntBuilder}});Object.defineProperty(b,"Int8Builder",{enumerable:!0,get:function(){return D.Int8Builder}});Object.defineProperty(b,"Int16Builder",{enumerable:!0,get:function(){return D.Int16Builder}});Object.defineProperty(b,"Int32Builder",{enumerable:!0,get:function(){return D.Int32Builder}});Object.defineProperty(b,"Int64Builder",{enumerable:!0,get:function(){return D.Int64Builder}});Object.defineProperty(b,"Uint8Builder",{enumerable:!0,get:function(){return D.Uint8Builder}});Object.defineProperty(b,"Uint16Builder",{enumerable:!0,get:function(){return D.Uint16Builder}});Object.defineProperty(b,"Uint32Builder",{enumerable:!0,get:function(){return D.Uint32Builder}});Object.defineProperty(b,"Uint64Builder",{enumerable:!0,get:function(){return D.Uint64Builder}});Object.defineProperty(b,"ListBuilder",{enumerable:!0,get:function(){return D.ListBuilder}});Object.defineProperty(b,"MapBuilder",{enumerable:!0,get:function(){return D.MapBuilder}});Object.defineProperty(b,"NullBuilder",{enumerable:!0,get:function(){return D.NullBuilder}});Object.defineProperty(b,"StructBuilder",{enumerable:!0,get:function(){return D.StructBuilder}});Object.defineProperty(b,"TimestampBuilder",{enumerable:!0,get:function(){return D.TimestampBuilder}});Object.defineProperty(b,"TimestampSecondBuilder",{enumerable:!0,get:function(){return D.TimestampSecondBuilder}});Object.defineProperty(b,"TimestampMillisecondBuilder",{enumerable:!0,get:function(){return D.TimestampMillisecondBuilder}});Object.defineProperty(b,"TimestampMicrosecondBuilder",{enumerable:!0,get:function(){return D.TimestampMicrosecondBuilder}});Object.defineProperty(b,"TimestampNanosecondBuilder",{enumerable:!0,get:function(){return D.TimestampNanosecondBuilder}});Object.defineProperty(b,"TimeBuilder",{enumerable:!0,get:function(){return D.TimeBuilder}});Object.defineProperty(b,"TimeSecondBuilder",{enumerable:!0,get:function(){return D.TimeSecondBuilder}});Object.defineProperty(b,"TimeMillisecondBuilder",{enumerable:!0,get:function(){return D.TimeMillisecondBuilder}});Object.defineProperty(b,"TimeMicrosecondBuilder",{enumerable:!0,get:function(){return D.TimeMicrosecondBuilder}});Object.defineProperty(b,"TimeNanosecondBuilder",{enumerable:!0,get:function(){return D.TimeNanosecondBuilder}});Object.defineProperty(b,"UnionBuilder",{enumerable:!0,get:function(){return D.UnionBuilder}});Object.defineProperty(b,"DenseUnionBuilder",{enumerable:!0,get:function(){return D.DenseUnionBuilder}});Object.defineProperty(b,"SparseUnionBuilder",{enumerable:!0,get:function(){return D.SparseUnionBuilder}});Object.defineProperty(b,"Utf8Builder",{enumerable:!0,get:function(){return D.Utf8Builder}})});var cu=V(()=>{});var Hd=V(()=>{});var Bv=V(()=>{});var BU={};SS(BU,{BROWSER_RUNTIME:()=>nt,ConsoleLogger:()=>Ay,DEFAULT_RUNTIME:()=>wv,DuckDB:()=>Sv,DuckDBBindings:()=>uu,DuckDBConnection:()=>ou,DuckDBDataProtocol:()=>Qe,DuckDBFeature:()=>qd,FileStatistics:()=>au,InsertMode:()=>Wd,JSONTableShape:()=>zd,LogEvent:()=>br,LogLevel:()=>Rr,LogOrigin:()=>xr,LogTopic:()=>Bi,StatusCode:()=>je,VoidLogger:()=>Oy,callSRet:()=>Se,copyBuffer:()=>Gi,decodeText:()=>jv,dropResponseBuffers:()=>He,failWith:()=>We,getLogEventLabel:()=>AS,getLogLevelLabel:()=>OS,getLogOriginLabel:()=>MS,getLogTopicLabel:()=>FS,readString:()=>ve});var Rr;(function(s){s[s.NONE=0]="NONE",s[s.DEBUG=1]="DEBUG",s[s.INFO=2]="INFO",s[s.WARNING=3]="WARNING",s[s.ERROR=4]="ERROR"})(Rr||(Rr={}));var Bi;(function(s){s[s.NONE=0]="NONE",s[s.CONNECT=1]="CONNECT",s[s.DISCONNECT=2]="DISCONNECT",s[s.OPEN=3]="OPEN",s[s.QUERY=4]="QUERY"})(Bi||(Bi={}));var br;(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"})(br||(br={}));var xr;(function(s){s[s.NONE=0]="NONE",s[s.WEB_WORKER=1]="WEB_WORKER",s[s.NODE_WORKER=2]="NODE_WORKER",s[s.BINDINGS=3]="BINDINGS",s[s.ASYNC_DUCKDB=4]="ASYNC_DUCKDB"})(xr||(xr={}));var Oy=class{log(e){}},Ay=class{log(e){console.log(e)}};function OS(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 AS(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 FS(r){switch(r){case 1:return"CONNECT";case 2:return"DISCONNECT";case 3:return"OPEN";case 4:return"QUERY";default:return"?"}}function MS(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 je;(function(e){e[e.SUCCESS=0]="SUCCESS"})(je||(je={}));var Rt=Dy(Ed()),Ld=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}},ou=class{constructor(e,t){this._bindings=e,this._conn=t}get handle(){return this._conn}close(){this._bindings.disconnect(this._conn)}runQuery(e){let t=this._bindings.runQuery(this._conn,e),i=Rt.RecordBatchReader.from(t);return console.assert(i.isSync()),console.assert(i.isFile()),Rt.Table.from(i)}sendQuery(e){let t=this._bindings.sendQuery(this._conn,e),i=new Ld(this._bindings,this._conn,t),n=Rt.RecordBatchReader.from(i);return console.assert(n.isSync()),console.assert(n.isStream()),n}createPreparedStatement(e){return this._bindings.createPreparedStatement(this._conn,e)}closePreparedStatement(e){this._bindings.closePreparedStatement(this._conn,e)}runPreparedStatement(e,t){let i=this._bindings.runPreparedStatement(this._conn,e,t),n=Rt.RecordBatchReader.from(i);return console.assert(n.isSync()),console.assert(n.isFile()),Rt.Table.from(n)}sendPreparedStatement(e,t){let i=this._bindings.sendPreparedStatement(this._conn,e,t),n=new Ld(this._bindings,this._conn,i),s=Rt.RecordBatchReader.from(n);return console.assert(s.isSync()),console.assert(s.isStream()),s}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 Rt.AsyncByteQueue,s=new Rt.RecordBatchStreamWriter().reset(n,e);s.writeAll(t),s.close();let c=s.toUint8Array(!0);this._bindings.insertArrowFromIPCStream(this._conn,c,i)}insertCSVFromPath(e,t){this._bindings.insertCSVFromPath(this._conn,e,t)}insertJSONFromPath(e,t){this._bindings.insertJSONFromPath(this._conn,e,t)}};function jU(){let r=new TextDecoder;return e=>(typeof SharedArrayBuffer!="undefined"&&e.buffer instanceof SharedArrayBuffer&&(e=new Uint8Array(e)),r.decode(e))}var jv=jU();function We(r,e){console.error(e),r.ccall("duckdb_web_fail_with",null,["string"],[e])}function Gi(r,e,t){let i=r.HEAPU8.subarray(e,e+t),n=new Uint8Array(new ArrayBuffer(i.byteLength));return n.set(i),n}function ve(r,e,t){return jv(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 Se(r,e,t,i){let n=r.stackSave(),s=r.stackAlloc(3*8);t.unshift("number"),i.unshift(s),r.ccall(e,null,t,i);let c=r.HEAPF64[(s>>3)+0],v=r.HEAPF64[(s>>3)+1],I=r.HEAPF64[(s>>3)+2];return r.stackRestore(n),[c,v,I]}function He(r){r.ccall("duckdb_web_clear_response",null,[],[])}var wv={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 au=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=Dy(Ed());function Ws(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:[Ws(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=>Ws(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 qd;(function(s){s[s.WASM_EXCEPTIONS=1]="WASM_EXCEPTIONS",s[s.WASM_THREADS=2]="WASM_THREADS",s[s.WASM_SIMD=4]="WASM_SIMD",s[s.WASM_BULK_MEMORY=8]="WASM_BULK_MEMORY",s[s.EMIT_BIGINT=16]="EMIT_BIGINT"})(qd||(qd={}));var uu=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]=Se(this.mod,"duckdb_web_open",["string"],[JSON.stringify(e)]);if(t!==je.SUCCESS)throw new Error(ve(this.mod,i,n));He(this.mod)}reset(){let[e,t,i]=Se(this.mod,"duckdb_web_reset",[],[]);if(e!==je.SUCCESS)throw new Error(ve(this.mod,t,i));He(this.mod)}getVersion(){let[e,t,i]=Se(this.mod,"duckdb_web_get_version",[],[]);if(e!==je.SUCCESS)throw new Error(ve(this.mod,t,i));let n=ve(this.mod,t,i);return He(this.mod),n}getFeatureFlags(){return this.mod.ccall("duckdb_web_get_feature_flags","number",[],[])}tokenize(e){let[t,i,n]=Se(this.mod,"duckdb_web_tokenize",["string"],[e]);if(t!==je.SUCCESS)throw new Error(ve(this.mod,i,n));let s=ve(this.mod,i,n);return He(this.mod),JSON.parse(s)}connect(){let e=this.mod.ccall("duckdb_web_connect","number",[],[]);return new ou(this,e)}disconnect(e){this.mod.ccall("duckdb_web_disconnect",null,["number"],[e])}runQuery(e,t){let[i,n,s]=Se(this.mod,"duckdb_web_query_run",["number","string"],[e,t]);if(i!==je.SUCCESS)throw new Error(ve(this.mod,n,s));let c=Gi(this.mod,n,s);return He(this.mod),c}sendQuery(e,t){let[i,n,s]=Se(this.mod,"duckdb_web_query_send",["number","string"],[e,t]);if(i!==je.SUCCESS)throw new Error(ve(this.mod,n,s));let c=Gi(this.mod,n,s);return He(this.mod),c}fetchQueryResults(e){let[t,i,n]=Se(this.mod,"duckdb_web_query_fetch_results",["number"],[e]);if(t!==je.SUCCESS)throw new Error(ve(this.mod,i,n));let s=Gi(this.mod,i,n);return He(this.mod),s}createPreparedStatement(e,t){let[i,n,s]=Se(this.mod,"duckdb_web_prepared_statement_create",["number","string"],[e,t]);if(i!==je.SUCCESS)throw new Error(ve(this.mod,n,s));return He(this.mod),n}closePreparedStatement(e,t){let[i,n,s]=Se(this.mod,"duckdb_web_prepared_statement_close",["number","number"],[e,t]);if(i!==je.SUCCESS)throw new Error(ve(this.mod,n,s));He(this.mod)}runPreparedStatement(e,t,i){let[n,s,c]=Se(this.mod,"duckdb_web_prepared_statement_run",["number","number","string"],[e,t,JSON.stringify(i)]);if(n!==je.SUCCESS)throw new Error(ve(this.mod,s,c));let v=Gi(this.mod,s,c);return He(this.mod),v}sendPreparedStatement(e,t,i){let[n,s,c]=Se(this.mod,"duckdb_web_prepared_statement_send",["number","number","string"],[e,t,JSON.stringify(i)]);if(n!==je.SUCCESS)throw new Error(ve(this.mod,s,c));let v=Gi(this.mod,s,c);return He(this.mod),v}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):"",[v,I,S]=Se(this.mod,"duckdb_web_insert_arrow_from_ipc_stream",["number","number","number","string"],[e,n,t.length,c]);if(v!==je.SUCCESS)throw new Error(ve(this.mod,I,S))}insertCSVFromPath(e,t,i){if(i.columns!==void 0){i.columnsFlat=[];for(let S in i.columns)i.columnsFlat.push(Ws(S,i.columns[S]))}let n={...i};n.columns=n.columnsFlat,delete n.columnsFlat;let s=JSON.stringify(n),[c,v,I]=Se(this.mod,"duckdb_web_insert_csv_from_path",["number","string","string"],[e,t,s]);if(c!==je.SUCCESS)throw new Error(ve(this.mod,v,I))}insertJSONFromPath(e,t,i){if(i.columns!==void 0){i.columnsFlat=[];for(let S in i.columns)i.columnsFlat.push(Ws(S,i.columns[S]))}let n={...i};n.columns=n.columnsFlat,delete n.columnsFlat;let s=JSON.stringify(n),[c,v,I]=Se(this.mod,"duckdb_web_insert_json_from_path",["number","string","string"],[e,t,s]);if(c!==je.SUCCESS)throw new Error(ve(this.mod,v,I))}finishInsert(e,t){}registerFileURL(e,t){t===void 0&&(t=e);let[i,n,s]=Se(this.mod,"duckdb_web_fs_register_file_url",["string","string"],[e,t]);if(i!==je.SUCCESS)throw new Error(ve(this.mod,n,s));He(this.mod)}registerFileBuffer(e,t){let i=this.mod._malloc(t.length);this.mod.HEAPU8.subarray(i,i+t.length).set(t);let[s,c,v]=Se(this.mod,"duckdb_web_fs_register_file_buffer",["string","number","number"],[e,i,t.length]);if(s!==je.SUCCESS)throw new Error(ve(this.mod,c,v));He(this.mod)}registerFileHandle(e,t){let[i,n,s]=Se(this.mod,"duckdb_web_fs_register_file_url",["string","string"],[e,e]);if(i!==je.SUCCESS)throw new Error(ve(this.mod,n,s));if(He(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,s]=Se(this.mod,"duckdb_web_copy_file_to_path",["string","string"],[e,t]);if(i!==je.SUCCESS)throw new Error(ve(this.mod,n,s));He(this.mod)}copyFileToBuffer(e){let[t,i,n]=Se(this.mod,"duckdb_web_copy_file_to_buffer",["string"],[e]);if(t!==je.SUCCESS)throw new Error(ve(this.mod,i,n));let s=this.mod.HEAPU8.subarray(i,i+n),c=new Uint8Array(s.length);return c.set(s),He(this.mod),c}collectFileStatistics(e,t){let[i,n,s]=Se(this.mod,"duckdb_web_collect_file_stats",["string","boolean"],[e,t]);if(i!==je.SUCCESS)throw new Error(ve(this.mod,n,s))}exportFileStatistics(e){let[t,i,n]=Se(this.mod,"duckdb_web_export_file_stats",["string"],[e]);if(t!==je.SUCCESS)throw new Error(ve(this.mod,i,n));return new au(this.mod.HEAPU8.subarray(i,i+n))}};var zd;(function(t){t.ROW_ARRAY="row-array",t.COLUMN_OBJECT="column-object"})(zd||(zd={}));var Wd;(function(t){t[t.APPEND=0]="APPEND",t[t.IMPORT=1]="IMPORT"})(Wd||(Wd={}));var Iv={},wU=function(){var r=Iv.url;return function(e){e=e||{};var t=typeof e!="undefined"?e:{},i,n;t.ready=new Promise(function(o,a){i=o,n=a});var s={},c;for(c in t)t.hasOwnProperty(c)&&(s[c]=t[c]);var v=[],I="./this.program",S=function(o,a){throw a},U=typeof window=="object",G=typeof importScripts=="function",_e=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",fe="";function $t(o){return t.locateFile?t.locateFile(o,fe):fe+o}var Cr,_r,Ji,Dv;function Ov(o){if(!(o instanceof no)){var a=o;vi("exiting due to exception: "+a)}}var Ki,Zi;_e?(G?fe=cu().dirname(fe)+"/":fe=__dirname+"/",Cr=function(a,u){return Ki||(Ki=Hd()),Zi||(Zi=cu()),a=Zi.normalize(a),Ki.readFileSync(a,u?null:"utf8")},Ji=function(a){var u=Cr(a,!0);return u.buffer||(u=new Uint8Array(u)),Gd(u.buffer),u},_r=function(a,u,l){Ki||(Ki=Hd()),Zi||(Zi=cu()),a=Zi.normalize(a),Ki.readFile(a,function(d,f){d?l(d):u(f.buffer)})},process.argv.length>1&&(I=process.argv[1].replace(/\\/g,"/")),v=process.argv.slice(2),process.on("uncaughtException",function(o){if(!(o instanceof no))throw o}),process.on("unhandledRejection",function(o){throw o}),S=function(o,a){if(du())throw process.exitCode=o,a;Ov(a),process.exit(o)},t.inspect=function(){return"[Emscripten Module object]"}):(U||G)&&(G?fe=self.location.href:typeof document!="undefined"&&document.currentScript&&(fe=document.currentScript.src),r&&(fe=r),fe.indexOf("blob:")!==0?fe=fe.substr(0,fe.replace(/[?#].*/,"").lastIndexOf("/")+1):fe="",Cr=function(o){var a=new XMLHttpRequest;return a.open("GET",o,!1),a.send(null),a.responseText},G&&(Ji=function(o){var a=new XMLHttpRequest;return a.open("GET",o,!1),a.responseType="arraybuffer",a.send(null),new Uint8Array(a.response)}),_r=function(o,a,u){var l=new XMLHttpRequest;l.open("GET",o,!0),l.responseType="arraybuffer",l.onload=function(){if(l.status==200||l.status==0&&l.response){a(l.response);return}u()},l.onerror=u,l.send(null)},Dv=function(o){document.title=o});var Av=t.print||console.log.bind(console),vi=t.printErr||console.warn.bind(console);for(c in s)s.hasOwnProperty(c)&&(t[c]=s[c]);s=null,t.arguments&&(v=t.arguments),t.thisProgram&&(I=t.thisProgram),t.quit&&(S=t.quit);var $d=0,ht=function(o){$d=o},Fv=function(){return $d},es;t.wasmBinary&&(es=t.wasmBinary);var Mv=t.noExitRuntime||!0;typeof WebAssembly!="object"&&Jt("no native wasm support detected");var Hs,lu=!1,Ys;function Gd(o,a){o||Jt("Assertion failed: "+a)}function Vv(o){var a=t["_"+o];return Gd(a,"Cannot call unknown function "+o+", make sure it is exported"),a}function Uv(o,a,u,l,d){var f={string:function(x){var ie=0;if(x!=null&&x!==0){var ye=(x.length<<2)+1;ie=mu(ye),Cv(x,ie,ye)}return ie},array:function(x){var ie=mu(x.length);return Xd(x,ie),ie}};function h(x){return a==="string"?$s(x):a==="boolean"?Boolean(x):x}var p=Vv(o),y=[],m=0;if(l)for(var g=0;g<l.length;g++){var j=f[u[g]];j?(m===0&&(m=w()),y[g]=j(l[g])):y[g]=l[g]}var O=p.apply(null,y);function M(x){return m!==0&&B(m),h(x)}return O=M(O),O}var Jd=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):void 0;function Kd(o,a,u){for(var l=a+u,d=a;o[d]&&!(d>=l);)++d;if(d-a>16&&o.subarray&&Jd)return Jd.decode(o.subarray(a,d));for(var f="";a<d;){var h=o[a++];if(!(h&128)){f+=String.fromCharCode(h);continue}var p=o[a++]&63;if((h&224)==192){f+=String.fromCharCode((h&31)<<6|p);continue}var y=o[a++]&63;if((h&240)==224?h=(h&15)<<12|p<<6|y:h=(h&7)<<18|p<<12|y<<6|o[a++]&63,h<65536)f+=String.fromCharCode(h);else{var m=h-65536;f+=String.fromCharCode(55296|m>>10,56320|m&1023)}}return f}function $s(o,a){return o?Kd(Xi,o,a):""}function Zd(o,a,u,l){if(!(l>0))return 0;for(var d=u,f=u+l-1,h=0;h<o.length;++h){var p=o.charCodeAt(h);if(p>=55296&&p<=57343){var y=o.charCodeAt(++h);p=65536+((p&1023)<<10)|y&1023}if(p<=127){if(u>=f)break;a[u++]=p}else if(p<=2047){if(u+1>=f)break;a[u++]=192|p>>6,a[u++]=128|p&63}else if(p<=65535){if(u+2>=f)break;a[u++]=224|p>>12,a[u++]=128|p>>6&63,a[u++]=128|p&63}else{if(u+3>=f)break;a[u++]=240|p>>18,a[u++]=128|p>>12&63,a[u++]=128|p>>6&63,a[u++]=128|p&63}}return a[u]=0,u-d}function Cv(o,a,u){return Zd(o,Xi,a,u)}function Pv(o){for(var a=0,u=0;u<o.length;++u){var l=o.charCodeAt(u);l>=55296&&l<=57343&&(l=65536+((l&1023)<<10)|o.charCodeAt(++u)&1023),l<=127?++a:l<=2047?a+=2:l<=65535?a+=3:a+=4}return a}function Xd(o,a){Gt.set(o,a)}function kv(o,a,u){for(var l=0;l<o.length;++l)Gt[a++>>0]=o.charCodeAt(l);u||(Gt[a>>0]=0)}function Rv(o,a){return o%a>0&&(o+=a-o%a),o}var Qd,Gt,Xi,xv,Nv,ce,Ev,Lv,qv;function ef(o){Qd=o,t.HEAP8=Gt=new Int8Array(o),t.HEAP16=xv=new Int16Array(o),t.HEAP32=ce=new Int32Array(o),t.HEAPU8=Xi=new Uint8Array(o),t.HEAPU16=Nv=new Uint16Array(o),t.HEAPU32=Ev=new Uint32Array(o),t.HEAPF32=Lv=new Float32Array(o),t.HEAPF64=qv=new Float64Array(o)}var TU=t.INITIAL_MEMORY||16777216,H,tf=[],rf=[],zv=[],nf=[],Wv=!1,Hv=!1,Yv=0;function du(){return Mv||Yv>0}function $v(){if(t.preRun)for(typeof t.preRun=="function"&&(t.preRun=[t.preRun]);t.preRun.length;)Xv(t.preRun.shift());Gs(tf)}function Gv(){Wv=!0,Gs(rf)}function Jv(){Gs(zv)}function Kv(){Hv=!0}function Zv(){if(t.postRun)for(typeof t.postRun=="function"&&(t.postRun=[t.postRun]);t.postRun.length;)ej(t.postRun.shift());Gs(nf)}function Xv(o){tf.unshift(o)}function Qv(o){rf.unshift(o)}function ej(o){nf.unshift(o)}var ji=0,fu=null,ts=null;function tj(o){ji++,t.monitorRunDependencies&&t.monitorRunDependencies(ji)}function rj(o){if(ji--,t.monitorRunDependencies&&t.monitorRunDependencies(ji),ji==0&&(fu!==null&&(clearInterval(fu),fu=null),ts)){var a=ts;ts=null,a()}}t.preloadedImages={},t.preloadedAudios={};function Jt(o){t.onAbort&&t.onAbort(o),o="Aborted("+o+")",vi(o),lu=!0,Ys=1,o+=". Build with -s ASSERTIONS=1 for more info.";var a=new WebAssembly.RuntimeError(o);throw n(a),a}var ij="data:application/octet-stream;base64,";function sf(o){return o.startsWith(ij)}var _t;t.locateFile?(_t="duckdb_wasm.wasm",sf(_t)||(_t=$t(_t))):_t=new URL("duckdb_wasm.wasm",Iv.url).toString();function of(o){try{if(o==_t&&es)return new Uint8Array(es);if(Ji)return Ji(o);throw"both async and sync fetching of the wasm failed"}catch(a){Jt(a)}}function nj(){return!es&&(U||G)&&typeof fetch=="function"?fetch(_t,{credentials:"same-origin"}).then(function(o){if(!o.ok)throw"failed to load wasm binary file at '"+_t+"'";return o.arrayBuffer()}).catch(function(){return of(_t)}):Promise.resolve().then(function(){return of(_t)})}function sj(){var o={a:w0};function a(h,p){var y=h.exports;t.asm=y,Hs=t.asm.we,ef(Hs.buffer),H=t.asm.ze,Qv(t.asm.xe),rj("wasm-instantiate")}tj("wasm-instantiate");function u(h){a(h.instance)}function l(h){return nj().then(function(p){return WebAssembly.instantiate(p,o)}).then(function(p){return p}).then(h,function(p){vi("failed to asynchronously prepare wasm: "+p),Jt(p)})}function d(){return!es&&typeof WebAssembly.instantiateStreaming=="function"&&!sf(_t)&&typeof fetch=="function"?fetch(_t,{credentials:"same-origin"}).then(function(h){var p=WebAssembly.instantiateStreaming(h,o);return p.then(u,function(y){return vi("wasm streaming compile failed: "+y),vi("falling back to ArrayBuffer instantiation"),l(u)})}):l(u)}if(t.instantiateWasm)try{var f=t.instantiateWasm(o,a);return f}catch(h){return vi("Module.instantiateWasm callback failed with error: "+h),!1}return d().catch(n),{}}function Gs(o){for(;o.length>0;){var a=o.shift();if(typeof a=="function"){a(t);continue}var u=a.func;typeof u=="number"?a.arg===void 0?H.get(u)():H.get(u)(a.arg):u(a.arg===void 0?null:a.arg)}}function oj(o){if(o instanceof no||o=="unwind")return Ys;S(1,o)}function aj(o){return _u(o+16)+16}function Qi(o){this.excPtr=o,this.ptr=o-16,this.set_type=function(a){ce[this.ptr+4>>2]=a},this.get_type=function(){return ce[this.ptr+4>>2]},this.set_destructor=function(a){ce[this.ptr+8>>2]=a},this.get_destructor=function(){return ce[this.ptr+8>>2]},this.set_refcount=function(a){ce[this.ptr>>2]=a},this.set_caught=function(a){a=a?1:0,Gt[this.ptr+12>>0]=a},this.get_caught=function(){return Gt[this.ptr+12>>0]!=0},this.set_rethrown=function(a){a=a?1:0,Gt[this.ptr+13>>0]=a},this.get_rethrown=function(){return Gt[this.ptr+13>>0]!=0},this.init=function(a,u){this.set_type(a),this.set_destructor(u),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var a=ce[this.ptr>>2];ce[this.ptr>>2]=a+1},this.release_ref=function(){var a=ce[this.ptr>>2];return ce[this.ptr>>2]=a-1,a===1}}function rs(o){this.free=function(){bu(this.ptr),this.ptr=0},this.set_base_ptr=function(a){ce[this.ptr>>2]=a},this.get_base_ptr=function(){return ce[this.ptr>>2]},this.set_adjusted_ptr=function(a){ce[this.ptr+4>>2]=a},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 a=cf(this.get_exception_info().get_type());if(a)return ce[this.get_base_ptr()>>2];var u=this.get_adjusted_ptr();return u!==0?u:this.get_base_ptr()},this.get_exception_info=function(){return new Qi(this.get_base_ptr())},o===void 0?(this.ptr=_u(8),this.set_adjusted_ptr(0)):this.ptr=o}var Js=[];function uj(o){o.add_ref()}var Ks=0;function cj(o){var a=new rs(o),u=a.get_exception_info();return u.get_caught()||(u.set_caught(!0),Ks--),u.set_rethrown(!1),Js.push(a),uj(u),a.get_exception_ptr()}var Pr=0;function af(o){return bu(new Qi(o).ptr)}function lj(o){if(o.release_ref()&&!o.get_rethrown()){var a=o.get_destructor();a&&H.get(a)(o.excPtr),af(o.excPtr)}}function dj(){T(0);var o=Js.pop();lj(o.get_exception_info()),o.free(),Pr=0}function fj(o){var a=new rs(o),u=a.get_base_ptr();throw Pr||(Pr=u),a.free(),u}function hj(){var o=Pr;if(!o)return ht(0),0|0;var a=new Qi(o),u=a.get_type(),l=new rs;if(l.set_base_ptr(o),l.set_adjusted_ptr(o),!u)return ht(0),l.ptr|0;for(var d=Array.prototype.slice.call(arguments),f=0;f<d.length;f++){var h=d[f];if(h===0||h===u)break;if(ro(h,u,l.get_adjusted_ptr_addr()))return ht(h),l.ptr|0}return ht(u),l.ptr|0}function pj(){var o=Pr;if(!o)return ht(0),0|0;var a=new Qi(o),u=a.get_type(),l=new rs;if(l.set_base_ptr(o),l.set_adjusted_ptr(o),!u)return ht(0),l.ptr|0;for(var d=Array.prototype.slice.call(arguments),f=0;f<d.length;f++){var h=d[f];if(h===0||h===u)break;if(ro(h,u,l.get_adjusted_ptr_addr()))return ht(h),l.ptr|0}return ht(u),l.ptr|0}function yj(){var o=Pr;if(!o)return ht(0),0|0;var a=new Qi(o),u=a.get_type(),l=new rs;if(l.set_base_ptr(o),l.set_adjusted_ptr(o),!u)return ht(0),l.ptr|0;for(var d=Array.prototype.slice.call(arguments),f=0;f<d.length;f++){var h=d[f];if(h===0||h===u)break;if(ro(h,u,l.get_adjusted_ptr_addr()))return ht(h),l.ptr|0}return ht(u),l.ptr|0}function mj(){var o=Js.pop();o||Jt("no exception to throw");var a=o.get_exception_info(),u=o.get_base_ptr();throw a.get_rethrown()?o.free():(Js.push(o),a.set_rethrown(!0),a.set_caught(!1),Ks++),Pr=u,u}function _j(o,a,u){var l=new Qi(o);throw l.init(a,u),Pr=o,Ks++,o}function bj(){return Ks}var Je={mappings:{},buffers:[null,[],[]],printChar:function(o,a){var u=Je.buffers[o];a===0||a===10?((o===1?Av:vi)(Kd(u,0)),u.length=0):u.push(a)},varargs:void 0,get:function(){Je.varargs+=4;var o=ce[Je.varargs-4>>2];return o},getStr:function(o){var a=$s(o);return a},get64:function(o,a){return o}};function gj(o,a){return o=Je.getStr(o),Je.doAccess(o,a)}function vj(o){return ce[uf()>>2]=o,o}function jj(o,a,u){return Je.varargs=u,0}function wj(o,a){}function Bj(o,a,u,l){}function Tj(o,a,u){}function Ij(){return 42}function Sj(o,a,u){return Je.varargs=u,0}function Dj(o,a,u){return 0}function Oj(o,a){return o=Je.getStr(o),Je.doMkdir(o,a)}function Aj(o,a,u){Je.varargs=u}function Fj(o,a){}function Mj(o){}function Vj(o,a){}function Uj(o){}function Cj(o,a){Jt("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")}function Pj(o,a){Jt("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")}function kj(){Jt("")}var hu;_e?hu=function(){var o=process.hrtime();return o[0]*1e3+o[1]/1e6}:hu=function(){return performance.now()};var Rj=!0;function xj(o,a){var u;if(o===0)u=Date.now();else if((o===1||o===4)&&Rj)u=hu();else return vj(28),-1;return ce[a>>2]=u/1e3|0,ce[a+4>>2]=u%1e3*1e3*1e3|0,0}function Nj(o,a){return globalThis.DUCKDB_RUNTIME.createDirectory(t,o,a)}function Ej(o,a){return globalThis.DUCKDB_RUNTIME.checkDirectory(t,o,a)}function Lj(o,a){return globalThis.DUCKDB_RUNTIME.listDirectoryEntries(t,o,a)}function qj(o,a){return globalThis.DUCKDB_RUNTIME.removeDirectory(t,o,a)}function zj(o){return globalThis.DUCKDB_RUNTIME.closeFile(t,o)}function Wj(o,a){return globalThis.DUCKDB_RUNTIME.checkFile(t,o,a)}function Hj(o){return globalThis.DUCKDB_RUNTIME.getLastFileModificationTime(t,o)}function Yj(o){return globalThis.DUCKDB_RUNTIME.getFileSize(t,o)}function $j(o,a,u,l){return globalThis.DUCKDB_RUNTIME.moveFile(t,o,a,u,l)}function Gj(o){return globalThis.DUCKDB_RUNTIME.openFile(t,o)}function Jj(o,a,u,l){return globalThis.DUCKDB_RUNTIME.readFile(t,o,a,u,l)}function Kj(o,a){return globalThis.DUCKDB_RUNTIME.truncateFile(t,o,a)}function Zj(o,a,u,l){return globalThis.DUCKDB_RUNTIME.writeFile(t,o,a,u,l)}function Xj(o,a){return globalThis.DUCKDB_RUNTIME.glob(t,o,a)}function Qj(o){return globalThis.DUCKDB_RUNTIME.testPlatformFeature(t,o)}function e0(){return 2147483648}function t0(o,a,u){Xi.copyWithin(o,a,a+u)}function r0(o){try{return Hs.grow(o-Qd.byteLength+65535>>>16),ef(Hs.buffer),1}catch{}}function i0(o){var a=Xi.length;o=o>>>0;var u=2147483648;if(o>u)return!1;for(var l=1;l<=4;l*=2){var d=a*(1+.2/l);d=Math.min(d,o+100663296);var f=Math.min(u,Rv(Math.max(o,d),65536)),h=r0(f);if(h)return!0}return!1}var pu={};function n0(){return I||"./this.program"}function is(){if(!is.strings){var o=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:o,_:n0()};for(var u in pu)pu[u]===void 0?delete a[u]:a[u]=pu[u];var l=[];for(var u in a)l.push(u+"="+a[u]);is.strings=l}return is.strings}function s0(o,a){var u=0;return is().forEach(function(l,d){var f=a+u;ce[o+d*4>>2]=f,kv(l,f),u+=l.length+1}),0}function o0(o,a){var u=is();ce[o>>2]=u.length;var l=0;return u.forEach(function(d){l+=d.length+1}),ce[a>>2]=l,0}function a0(o){return 0}function u0(o,a){var u=o==1||o==2?2:Jt();return Gt[a>>0]=u,0}function c0(o,a,u,l,d,f){var h=Je.getStreamFromFD(o),p=Je.doReadv(h,a,u,l);return ce[f>>2]=p,0}function l0(o,a,u,l,d,f){var h=Je.getStreamFromFD(o),p=Je.doWritev(h,a,u,l);return ce[f>>2]=p,0}function d0(o,a,u,l){var d=Je.getStreamFromFD(o),f=Je.doReadv(d,a,u);return ce[l>>2]=f,0}function f0(o,a,u,l,d){}function h0(o){var a=Je.getStreamFromFD(o);return a.stream_ops&&a.stream_ops.fsync?-a.stream_ops.fsync(a):0}function p0(o,a,u,l){for(var d=0,f=0;f<u;f++){for(var h=ce[a+f*8>>2],p=ce[a+(f*8+4)>>2],y=0;y<p;y++)Je.printChar(o,Xi[h+y]);d+=p}return ce[l>>2]=d,0}function y0(){return Fv()}function m0(){if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function"){var o=new Uint8Array(1);return function(){return crypto.getRandomValues(o),o[0]}}else if(_e)try{var a=Bv();return function(){return a.randomBytes(1)[0]}}catch{}return function(){Jt("randomDevice")}}function Zs(o,a){Zs.randomDevice||(Zs.randomDevice=m0());for(var u=0;u<a;u++)Gt[o+u>>0]=Zs.randomDevice();return 0}function _0(o){return o}function b0(o){ht(o)}function Xs(o){return o%4==0&&(o%100!=0||o%400==0)}function yu(o,a){for(var u=0,l=0;l<=a;u+=o[l++]);return u}var Qs=[31,29,31,30,31,30,31,31,30,31,30,31],eo=[31,28,31,30,31,30,31,31,30,31,30,31];function to(o,a){for(var u=new Date(o.getTime());a>0;){var l=Xs(u.getFullYear()),d=u.getMonth(),f=(l?Qs:eo)[d];if(a>f-u.getDate())a-=f-u.getDate()+1,u.setDate(1),d<11?u.setMonth(d+1):(u.setMonth(0),u.setFullYear(u.getFullYear()+1));else return u.setDate(u.getDate()+a),u}return u}function g0(o,a,u,l){var d=ce[l+40>>2],f={tm_sec:ce[l>>2],tm_min:ce[l+4>>2],tm_hour:ce[l+8>>2],tm_mday:ce[l+12>>2],tm_mon:ce[l+16>>2],tm_year:ce[l+20>>2],tm_wday:ce[l+24>>2],tm_yday:ce[l+28>>2],tm_isdst:ce[l+32>>2],tm_gmtoff:ce[l+36>>2],tm_zone:d?$s(d):""},h=$s(u),p={"%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 y in p)h=h.replace(new RegExp(y,"g"),p[y]);var m=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],g=["January","February","March","April","May","June","July","August","September","October","November","December"];function j(P,$,Ae){for(var me=typeof P=="number"?P.toString():P||"";me.length<$;)me=Ae[0]+me;return me}function O(P,$){return j(P,$,"0")}function M(P,$){function Ae(at){return at<0?-1:at>0?1:0}var me;return(me=Ae(P.getFullYear()-$.getFullYear()))===0&&(me=Ae(P.getMonth()-$.getMonth()))===0&&(me=Ae(P.getDate()-$.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 ie(P){var $=to(new Date(P.tm_year+1900,0,1),P.tm_yday),Ae=new Date($.getFullYear(),0,4),me=new Date($.getFullYear()+1,0,4),at=x(Ae),kr=x(me);return M(at,$)<=0?M(kr,$)<=0?$.getFullYear()+1:$.getFullYear():$.getFullYear()-1}var ye={"%a":function(P){return m[P.tm_wday].substring(0,3)},"%A":function(P){return m[P.tm_wday]},"%b":function(P){return g[P.tm_mon].substring(0,3)},"%B":function(P){return g[P.tm_mon]},"%C":function(P){var $=P.tm_year+1900;return O($/100|0,2)},"%d":function(P){return O(P.tm_mday,2)},"%e":function(P){return j(P.tm_mday,2," ")},"%g":function(P){return ie(P).toString().substring(2)},"%G":function(P){return ie(P)},"%H":function(P){return O(P.tm_hour,2)},"%I":function(P){var $=P.tm_hour;return $==0?$=12:$>12&&($-=12),O($,2)},"%j":function(P){return O(P.tm_mday+yu(Xs(P.tm_year+1900)?Qs:eo,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 $=new Date(P.tm_year+1900,0,1),Ae=$.getDay()===0?$:to($,7-$.getDay()),me=new Date(P.tm_year+1900,P.tm_mon,P.tm_mday);if(M(Ae,me)<0){var at=yu(Xs(me.getFullYear())?Qs:eo,me.getMonth()-1)-31,kr=31-Ae.getDate(),wi=kr+at+me.getDate();return O(Math.ceil(wi/7),2)}return M(Ae,$)===0?"01":"00"},"%V":function(P){var $=new Date(P.tm_year+1900,0,4),Ae=new Date(P.tm_year+1901,0,4),me=x($),at=x(Ae),kr=to(new Date(P.tm_year+1900,0,1),P.tm_yday);if(M(kr,me)<0)return"53";if(M(at,kr)<=0)return"01";var wi;return me.getFullYear()<P.tm_year+1900?wi=P.tm_yday+32-me.getDate():wi=P.tm_yday+1-me.getDate(),O(Math.ceil(wi/7),2)},"%w":function(P){return P.tm_wday},"%W":function(P){var $=new Date(P.tm_year,0,1),Ae=$.getDay()===1?$:to($,$.getDay()===0?1:7-$.getDay()+1),me=new Date(P.tm_year+1900,P.tm_mon,P.tm_mday);if(M(Ae,me)<0){var at=yu(Xs(me.getFullYear())?Qs:eo,me.getMonth()-1)-31,kr=31-Ae.getDate(),wi=kr+at+me.getDate();return O(Math.ceil(wi/7),2)}return M(Ae,$)===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 $=P.tm_gmtoff,Ae=$>=0;return $=Math.abs($)/60,$=$/60*100+$%60,(Ae?"+":"-")+String("0000"+$).slice(-4)},"%Z":function(P){return P.tm_zone},"%%":function(){return"%"}};for(var y in ye)h.includes(y)&&(h=h.replace(new RegExp(y,"g"),ye[y](f)));var Be=j0(h,!1);return Be.length>a?0:(Xd(Be,o),Be.length-1)}function v0(o,a,u,l){return g0(o,a,u,l)}function j0(o,a,u){var l=u>0?u:Pv(o)+1,d=new Array(l),f=Zd(o,d,0,d.length);return a&&(d.length=f),d}var w0={i:aj,A:cj,G:dj,b:hj,n:pj,I:yj,j:af,ra:mj,u:_j,E:bj,c:fj,se:gj,ea:jj,La:wj,Ka:Bj,Ma:Tj,la:Ij,Oa:Sj,Ja:Dj,Na:Oj,oa:Aj,qe:Fj,ka:Mj,na:Vj,ma:Uj,va:Cj,ua:Pj,fa:kj,ja:xj,Ba:Nj,Ca:Ej,za:Lj,Aa:qj,Ta:zj,xa:Wj,Ea:Hj,Ga:Yj,ya:$j,Ha:Gj,da:Jj,Da:Kj,Fa:Zj,wa:Xj,oe:Qj,pb:e0,Ua:t0,Hc:i0,Qa:s0,Ra:o0,_:a0,Sa:u0,ce:c0,ob:l0,qa:d0,je:f0,re:h0,ga:p0,a:y0,Ia:Zs,W:$w,K:Ow,R:hw,wb:zI,X:Yw,M:zw,sa:fw,xb:qI,s:_w,U:tB,ue:Kw,Y:Nw,V:eB,ve:Jw,e:sw,aa:Ew,B:kw,Lb:OI,d:ow,$:Gw,ta:Zw,h:uw,Ib:MI,l:dw,pa:Sw,o:cw,z:jw,w:bw,Q:qw,x:gw,v:ww,p:Pw,L:Fw,J:Mw,Mb:DI,Pb:TI,Rb:wI,Nb:SI,Jb:FI,Qb:BI,qc:KT,he:aB,jd:nT,cd:dT,ge:uB,Ac:ET,xd:WB,Xa:pS,Wa:yS,Wd:gB,id:sT,Qc:IT,Qd:IB,Vb:bI,Bc:NT,Va:mS,Xd:bB,Ud:jB,Dc:RT,dd:lT,Id:UB,ad:hT,kb:QI,Vd:vB,$d:pB,Sd:BB,wd:HB,fb:nS,Ya:hS,kd:iT,fe:cB,Yc:_T,cb:aS,vb:WI,ed:cT,gb:iS,tc:$T,Td:wB,Zc:mT,vd:YB,$c:pT,_c:yT,Uc:jT,oc:XT,Mc:AT,Pc:ST,Oc:DT,Tb:vI,Nc:OT,de:dB,Cb:RI,Bb:xI,le:nB,ke:sB,hd:oT,ne:rB,Xb:mI,Ub:gI,Ob:II,Wb:_I,Fb:CI,wc:WT,ub:HI,Hb:VI,Gb:UI,Fd:kB,Kb:AI,Eb:PI,_b:hI,zd:qB,Kc:MT,Bd:EB,qd:ZB,Ab:NI,zb:EI,jc:iI,yb:LI,Gd:PB,rc:JT,od:QB,Za:fS,bc:lI,mb:ZI,md:tT,Lc:FT,Gc:CT,t:iw,k:aw,C:Vw,ba:Cw,rb:GI,D:Rw,ca:Uw,sb:$I,f:nw,T:yw,O:Ww,cc:pw,g:mw,m:lw,te:Xw,q:Aw,r:Iw,ia:Lw,y:vw,P:Dw,N:xw,S:Bw,pe:Qw,ha:Hw,Z:Tw,Xc:bT,qb:JI,yd:zB,Ec:kT,Nd:OB,pc:ZT,uc:YT,jb:eS,Dd:xB,zc:LT,db:oS,Sc:BT,Tc:wT,Ic:UT,Od:DB,xc:zT,vc:HT,kc:rI,Rd:TB,Rc:TT,Wc:gT,Yb:yI,gc:oI,Jd:VB,Kd:MB,hb:rS,Pd:SB,Ld:FB,yc:qT,ec:uI,nc:QT,Vc:vT,eb:sS,be:fB,ee:lB,ie:oB,bd:fT,Zb:pI,Md:AB,ic:nI,hc:sI,pd:XB,ib:tS,Ad:LB,ud:$B,_a:dS,fc:aI,lb:XI,me:iB,_d:yB,sd:JB,lc:tI,$b:fI,Sb:jI,Zd:mB,Yd:_B,td:GB,gd:aT,fd:uT,nd:eT,tb:YI,ld:rT,dc:cI,Db:kI,bb:uS,mc:eI,nb:KI,rd:KB,Cc:xT,$a:lS,ab:cS,ac:dI,ae:hB,Ed:RB,Fc:PT,Jc:VT,sc:GT,Hd:CB,Cd:NB,H:_0,F:b0,Pa:v0},IU=sj(),B0=t.___wasm_call_ctors=function(){return(B0=t.___wasm_call_ctors=t.asm.xe).apply(null,arguments)},T0=t._main=function(){return(T0=t._main=t.asm.ye).apply(null,arguments)},I0=t._duckdb_web_fs_glob_add_path=function(){return(I0=t._duckdb_web_fs_glob_add_path=t.asm.Ae).apply(null,arguments)},S0=t._duckdb_web_clear_response=function(){return(S0=t._duckdb_web_clear_response=t.asm.Be).apply(null,arguments)},D0=t._duckdb_web_fail_with=function(){return(D0=t._duckdb_web_fail_with=t.asm.Ce).apply(null,arguments)},O0=t._duckdb_web_reset=function(){return(O0=t._duckdb_web_reset=t.asm.De).apply(null,arguments)},A0=t._duckdb_web_connect=function(){return(A0=t._duckdb_web_connect=t.asm.Ee).apply(null,arguments)},F0=t._duckdb_web_disconnect=function(){return(F0=t._duckdb_web_disconnect=t.asm.Fe).apply(null,arguments)},M0=t._duckdb_web_flush_files=function(){return(M0=t._duckdb_web_flush_files=t.asm.Ge).apply(null,arguments)},V0=t._duckdb_web_flush_file=function(){return(V0=t._duckdb_web_flush_file=t.asm.He).apply(null,arguments)},U0=t._duckdb_web_open=function(){return(U0=t._duckdb_web_open=t.asm.Ie).apply(null,arguments)},C0=t._duckdb_web_collect_file_stats=function(){return(C0=t._duckdb_web_collect_file_stats=t.asm.Je).apply(null,arguments)},P0=t._duckdb_web_export_file_stats=function(){return(P0=t._duckdb_web_export_file_stats=t.asm.Ke).apply(null,arguments)},k0=t._duckdb_web_fs_drop_file=function(){return(k0=t._duckdb_web_fs_drop_file=t.asm.Le).apply(null,arguments)},R0=t._duckdb_web_fs_drop_files=function(){return(R0=t._duckdb_web_fs_drop_files=t.asm.Me).apply(null,arguments)},x0=t._duckdb_web_fs_get_file_info=function(){return(x0=t._duckdb_web_fs_get_file_info=t.asm.Ne).apply(null,arguments)},N0=t._duckdb_web_fs_set_file_descriptor=function(){return(N0=t._duckdb_web_fs_set_file_descriptor=t.asm.Oe).apply(null,arguments)},E0=t._duckdb_web_fs_register_file_url=function(){return(E0=t._duckdb_web_fs_register_file_url=t.asm.Pe).apply(null,arguments)},L0=t._duckdb_web_fs_register_file_buffer=function(){return(L0=t._duckdb_web_fs_register_file_buffer=t.asm.Qe).apply(null,arguments)},q0=t._duckdb_web_copy_file_to_buffer=function(){return(q0=t._duckdb_web_copy_file_to_buffer=t.asm.Re).apply(null,arguments)},z0=t._duckdb_web_copy_file_to_path=function(){return(z0=t._duckdb_web_copy_file_to_path=t.asm.Se).apply(null,arguments)},W0=t._duckdb_web_get_version=function(){return(W0=t._duckdb_web_get_version=t.asm.Te).apply(null,arguments)},H0=t._duckdb_web_get_feature_flags=function(){return(H0=t._duckdb_web_get_feature_flags=t.asm.Ue).apply(null,arguments)},Y0=t._duckdb_web_tokenize=function(){return(Y0=t._duckdb_web_tokenize=t.asm.Ve).apply(null,arguments)},$0=t._duckdb_web_prepared_statement_create=function(){return($0=t._duckdb_web_prepared_statement_create=t.asm.We).apply(null,arguments)},G0=t._duckdb_web_prepared_statement_close=function(){return(G0=t._duckdb_web_prepared_statement_close=t.asm.Xe).apply(null,arguments)},J0=t._duckdb_web_prepared_statement_run=function(){return(J0=t._duckdb_web_prepared_statement_run=t.asm.Ye).apply(null,arguments)},K0=t._duckdb_web_prepared_statement_send=function(){return(K0=t._duckdb_web_prepared_statement_send=t.asm.Ze).apply(null,arguments)},Z0=t._duckdb_web_query_run=function(){return(Z0=t._duckdb_web_query_run=t.asm._e).apply(null,arguments)},X0=t._duckdb_web_query_send=function(){return(X0=t._duckdb_web_query_send=t.asm.$e).apply(null,arguments)},Q0=t._duckdb_web_query_fetch_results=function(){return(Q0=t._duckdb_web_query_fetch_results=t.asm.af).apply(null,arguments)},ew=t._duckdb_web_insert_arrow_from_ipc_stream=function(){return(ew=t._duckdb_web_insert_arrow_from_ipc_stream=t.asm.bf).apply(null,arguments)},tw=t._duckdb_web_insert_csv_from_path=function(){return(tw=t._duckdb_web_insert_csv_from_path=t.asm.cf).apply(null,arguments)},rw=t._duckdb_web_insert_json_from_path=function(){return(rw=t._duckdb_web_insert_json_from_path=t.asm.df).apply(null,arguments)},uf=t.___errno_location=function(){return(uf=t.___errno_location=t.asm.ef).apply(null,arguments)},w=t.stackSave=function(){return(w=t.stackSave=t.asm.ff).apply(null,arguments)},B=t.stackRestore=function(){return(B=t.stackRestore=t.asm.gf).apply(null,arguments)},mu=t.stackAlloc=function(){return(mu=t.stackAlloc=t.asm.hf).apply(null,arguments)},T=t._setThrew=function(){return(T=t._setThrew=t.asm.jf).apply(null,arguments)},ro=t.___cxa_can_catch=function(){return(ro=t.___cxa_can_catch=t.asm.kf).apply(null,arguments)},cf=t.___cxa_is_pointer_type=function(){return(cf=t.___cxa_is_pointer_type=t.asm.lf).apply(null,arguments)},_u=t._malloc=function(){return(_u=t._malloc=t.asm.mf).apply(null,arguments)},bu=t._free=function(){return(bu=t._free=t.asm.nf).apply(null,arguments)},lf=t.dynCall_jiji=function(){return(lf=t.dynCall_jiji=t.asm.of).apply(null,arguments)},df=t.dynCall_jiiii=function(){return(df=t.dynCall_jiiii=t.asm.pf).apply(null,arguments)},ff=t.dynCall_iiiiij=function(){return(ff=t.dynCall_iiiiij=t.asm.qf).apply(null,arguments)},hf=t.dynCall_iiiiijj=function(){return(hf=t.dynCall_iiiiijj=t.asm.rf).apply(null,arguments)},pf=t.dynCall_viijii=function(){return(pf=t.dynCall_viijii=t.asm.sf).apply(null,arguments)},yf=t.dynCall_j=function(){return(yf=t.dynCall_j=t.asm.tf).apply(null,arguments)},mf=t.dynCall_ji=function(){return(mf=t.dynCall_ji=t.asm.uf).apply(null,arguments)},_f=t.dynCall_iij=function(){return(_f=t.dynCall_iij=t.asm.vf).apply(null,arguments)},bf=t.dynCall_viij=function(){return(bf=t.dynCall_viij=t.asm.wf).apply(null,arguments)},gf=t.dynCall_viijji=function(){return(gf=t.dynCall_viijji=t.asm.xf).apply(null,arguments)},vf=t.dynCall_viijj=function(){return(vf=t.dynCall_viijj=t.asm.yf).apply(null,arguments)},jf=t.dynCall_viiijj=function(){return(jf=t.dynCall_viiijj=t.asm.zf).apply(null,arguments)},wf=t.dynCall_viiji=function(){return(wf=t.dynCall_viiji=t.asm.Af).apply(null,arguments)},Bf=t.dynCall_vijjj=function(){return(Bf=t.dynCall_vijjj=t.asm.Bf).apply(null,arguments)},Tf=t.dynCall_iiijj=function(){return(Tf=t.dynCall_iiijj=t.asm.Cf).apply(null,arguments)},If=t.dynCall_viiij=function(){return(If=t.dynCall_viiij=t.asm.Df).apply(null,arguments)},Sf=t.dynCall_viijij=function(){return(Sf=t.dynCall_viijij=t.asm.Ef).apply(null,arguments)},Df=t.dynCall_viji=function(){return(Df=t.dynCall_viji=t.asm.Ff).apply(null,arguments)},Of=t.dynCall_iiiijj=function(){return(Of=t.dynCall_iiiijj=t.asm.Gf).apply(null,arguments)},Af=t.dynCall_viijiiiii=function(){return(Af=t.dynCall_viijiiiii=t.asm.Hf).apply(null,arguments)},Ff=t.dynCall_viiiiijiiii=function(){return(Ff=t.dynCall_viiiiijiiii=t.asm.If).apply(null,arguments)},Mf=t.dynCall_viiiijj=function(){return(Mf=t.dynCall_viiiijj=t.asm.Jf).apply(null,arguments)},Vf=t.dynCall_iiijiiii=function(){return(Vf=t.dynCall_iiijiiii=t.asm.Kf).apply(null,arguments)},Uf=t.dynCall_vij=function(){return(Uf=t.dynCall_vij=t.asm.Lf).apply(null,arguments)},Cf=t.dynCall_jij=function(){return(Cf=t.dynCall_jij=t.asm.Mf).apply(null,arguments)},Pf=t.dynCall_jiiij=function(){return(Pf=t.dynCall_jiiij=t.asm.Nf).apply(null,arguments)},kf=t.dynCall_iiij=function(){return(kf=t.dynCall_iiij=t.asm.Of).apply(null,arguments)},Rf=t.dynCall_iiiiijjiijj=function(){return(Rf=t.dynCall_iiiiijjiijj=t.asm.Pf).apply(null,arguments)},xf=t.dynCall_viijiijji=function(){return(xf=t.dynCall_viijiijji=t.asm.Qf).apply(null,arguments)},Nf=t.dynCall_vjjijij=function(){return(Nf=t.dynCall_vjjijij=t.asm.Rf).apply(null,arguments)},Ef=t.dynCall_vijjji=function(){return(Ef=t.dynCall_vijjji=t.asm.Sf).apply(null,arguments)},Lf=t.dynCall_vjjii=function(){return(Lf=t.dynCall_vjjii=t.asm.Tf).apply(null,arguments)},qf=t.dynCall_viiiiiji=function(){return(qf=t.dynCall_viiiiiji=t.asm.Uf).apply(null,arguments)},zf=t.dynCall_jiiijji=function(){return(zf=t.dynCall_jiiijji=t.asm.Vf).apply(null,arguments)},Wf=t.dynCall_iijj=function(){return(Wf=t.dynCall_iijj=t.asm.Wf).apply(null,arguments)},Hf=t.dynCall_iiijjii=function(){return(Hf=t.dynCall_iiijjii=t.asm.Xf).apply(null,arguments)},Yf=t.dynCall_iijjii=function(){return(Yf=t.dynCall_iijjii=t.asm.Yf).apply(null,arguments)},$f=t.dynCall_viiiij=function(){return($f=t.dynCall_viiiij=t.asm.Zf).apply(null,arguments)},Gf=t.dynCall_vijii=function(){return(Gf=t.dynCall_vijii=t.asm._f).apply(null,arguments)},Jf=t.dynCall_viijjii=function(){return(Jf=t.dynCall_viijjii=t.asm.$f).apply(null,arguments)},Kf=t.dynCall_vijj=function(){return(Kf=t.dynCall_vijj=t.asm.ag).apply(null,arguments)},Zf=t.dynCall_jijjij=function(){return(Zf=t.dynCall_jijjij=t.asm.bg).apply(null,arguments)},Xf=t.dynCall_jiijii=function(){return(Xf=t.dynCall_jiijii=t.asm.cg).apply(null,arguments)},Qf=t.dynCall_jijiii=function(){return(Qf=t.dynCall_jijiii=t.asm.dg).apply(null,arguments)},eh=t.dynCall_viijiiij=function(){return(eh=t.dynCall_viijiiij=t.asm.eg).apply(null,arguments)},th=t.dynCall_vijiiiji=function(){return(th=t.dynCall_vijiiiji=t.asm.fg).apply(null,arguments)},rh=t.dynCall_jiiji=function(){return(rh=t.dynCall_jiiji=t.asm.gg).apply(null,arguments)},ih=t.dynCall_viiijij=function(){return(ih=t.dynCall_viiijij=t.asm.hg).apply(null,arguments)},nh=t.dynCall_viijiijj=function(){return(nh=t.dynCall_viijiijj=t.asm.ig).apply(null,arguments)},sh=t.dynCall_viiiiijj=function(){return(sh=t.dynCall_viiiiijj=t.asm.jg).apply(null,arguments)},oh=t.dynCall_viiijji=function(){return(oh=t.dynCall_viiijji=t.asm.kg).apply(null,arguments)},ah=t.dynCall_iiiij=function(){return(ah=t.dynCall_iiiij=t.asm.lg).apply(null,arguments)},uh=t.dynCall_iiiiiji=function(){return(uh=t.dynCall_iiiiiji=t.asm.mg).apply(null,arguments)},ch=t.dynCall_iiiji=function(){return(ch=t.dynCall_iiiji=t.asm.ng).apply(null,arguments)},lh=t.dynCall_iiiiji=function(){return(lh=t.dynCall_iiiiji=t.asm.og).apply(null,arguments)},dh=t.dynCall_jii=function(){return(dh=t.dynCall_jii=t.asm.pg).apply(null,arguments)},fh=t.dynCall_jiii=function(){return(fh=t.dynCall_jiii=t.asm.qg).apply(null,arguments)},hh=t.dynCall_iijjijj=function(){return(hh=t.dynCall_iijjijj=t.asm.rg).apply(null,arguments)},ph=t.dynCall_viiiijiiiii=function(){return(ph=t.dynCall_viiiijiiiii=t.asm.sg).apply(null,arguments)},yh=t.dynCall_viiiijiiii=function(){return(yh=t.dynCall_viiiijiiii=t.asm.tg).apply(null,arguments)},mh=t.dynCall_viiijii=function(){return(mh=t.dynCall_viiijii=t.asm.ug).apply(null,arguments)},_h=t.dynCall_viiiiiij=function(){return(_h=t.dynCall_viiiiiij=t.asm.vg).apply(null,arguments)},bh=t.dynCall_viiijjj=function(){return(bh=t.dynCall_viiijjj=t.asm.wg).apply(null,arguments)},gh=t.dynCall_iiijiii=function(){return(gh=t.dynCall_iiijiii=t.asm.xg).apply(null,arguments)},vh=t.dynCall_iiiiijii=function(){return(vh=t.dynCall_iiiiijii=t.asm.yg).apply(null,arguments)},jh=t.dynCall_viijiii=function(){return(jh=t.dynCall_viijiii=t.asm.zg).apply(null,arguments)},wh=t.dynCall_iiijiij=function(){return(wh=t.dynCall_iiijiij=t.asm.Ag).apply(null,arguments)},Bh=t.dynCall_vijiii=function(){return(Bh=t.dynCall_vijiii=t.asm.Bg).apply(null,arguments)},Th=t.dynCall_iijjiii=function(){return(Th=t.dynCall_iijjiii=t.asm.Cg).apply(null,arguments)},Ih=t.dynCall_iijjiiii=function(){return(Ih=t.dynCall_iijjiiii=t.asm.Dg).apply(null,arguments)},Sh=t.dynCall_iiji=function(){return(Sh=t.dynCall_iiji=t.asm.Eg).apply(null,arguments)},Dh=t.dynCall_iijji=function(){return(Dh=t.dynCall_iijji=t.asm.Fg).apply(null,arguments)},Oh=t.dynCall_vijiiii=function(){return(Oh=t.dynCall_vijiiii=t.asm.Gg).apply(null,arguments)},Ah=t.dynCall_iijiiii=function(){return(Ah=t.dynCall_iijiiii=t.asm.Hg).apply(null,arguments)},Fh=t.dynCall_viiiji=function(){return(Fh=t.dynCall_viiiji=t.asm.Ig).apply(null,arguments)},Mh=t.dynCall_iiiijiii=function(){return(Mh=t.dynCall_iiiijiii=t.asm.Jg).apply(null,arguments)},Vh=t.dynCall_vijij=function(){return(Vh=t.dynCall_vijij=t.asm.Kg).apply(null,arguments)},Uh=t.dynCall_iiijjjj=function(){return(Uh=t.dynCall_iiijjjj=t.asm.Lg).apply(null,arguments)},Ch=t.dynCall_jijj=function(){return(Ch=t.dynCall_jijj=t.asm.Mg).apply(null,arguments)},Ph=t.dynCall_viiiijiiiiiiii=function(){return(Ph=t.dynCall_viiiijiiiiiiii=t.asm.Ng).apply(null,arguments)},kh=t.dynCall_ij=function(){return(kh=t.dynCall_ij=t.asm.Og).apply(null,arguments)},Rh=t.dynCall_jj=function(){return(Rh=t.dynCall_jj=t.asm.Pg).apply(null,arguments)},xh=t.dynCall_jjj=function(){return(xh=t.dynCall_jjj=t.asm.Qg).apply(null,arguments)},Nh=t.dynCall_iji=function(){return(Nh=t.dynCall_iji=t.asm.Rg).apply(null,arguments)},Eh=t.dynCall_vjii=function(){return(Eh=t.dynCall_vjii=t.asm.Sg).apply(null,arguments)},Lh=t.dynCall_vjiiii=function(){return(Lh=t.dynCall_vjiiii=t.asm.Tg).apply(null,arguments)},qh=t.dynCall_viiiiijiii=function(){return(qh=t.dynCall_viiiiijiii=t.asm.Ug).apply(null,arguments)},zh=t.dynCall_vijji=function(){return(zh=t.dynCall_vijji=t.asm.Vg).apply(null,arguments)},Wh=t.dynCall_iiijii=function(){return(Wh=t.dynCall_iiijii=t.asm.Wg).apply(null,arguments)},Hh=t.dynCall_jiij=function(){return(Hh=t.dynCall_jiij=t.asm.Xg).apply(null,arguments)},Yh=t.dynCall_iiiijjii=function(){return(Yh=t.dynCall_iiiijjii=t.asm.Yg).apply(null,arguments)},$h=t.dynCall_iiiiijji=function(){return($h=t.dynCall_iiiiijji=t.asm.Zg).apply(null,arguments)},Gh=t.dynCall_viiiiji=function(){return(Gh=t.dynCall_viiiiji=t.asm._g).apply(null,arguments)},Jh=t.dynCall_viiijjii=function(){return(Jh=t.dynCall_viiijjii=t.asm.$g).apply(null,arguments)},Kh=t.dynCall_viiiijji=function(){return(Kh=t.dynCall_viiiijji=t.asm.ah).apply(null,arguments)},Zh=t.dynCall_viiiijjii=function(){return(Zh=t.dynCall_viiiijjii=t.asm.bh).apply(null,arguments)},Xh=t.dynCall_viiiiijji=function(){return(Xh=t.dynCall_viiiiijji=t.asm.ch).apply(null,arguments)},Qh=t.dynCall_jiiiij=function(){return(Qh=t.dynCall_jiiiij=t.asm.dh).apply(null,arguments)},ep=t.dynCall_iijiji=function(){return(ep=t.dynCall_iijiji=t.asm.eh).apply(null,arguments)},tp=t.dynCall_viiijijiji=function(){return(tp=t.dynCall_viiijijiji=t.asm.fh).apply(null,arguments)},rp=t.dynCall_vjiiiji=function(){return(rp=t.dynCall_vjiiiji=t.asm.gh).apply(null,arguments)},ip=t.dynCall_viiijjij=function(){return(ip=t.dynCall_viiijjij=t.asm.hh).apply(null,arguments)},np=t.dynCall_vijijjiij=function(){return(np=t.dynCall_vijijjiij=t.asm.ih).apply(null,arguments)},sp=t.dynCall_viijjij=function(){return(sp=t.dynCall_viijjij=t.asm.jh).apply(null,arguments)},op=t.dynCall_viiijjiij=function(){return(op=t.dynCall_viiijjiij=t.asm.kh).apply(null,arguments)},ap=t.dynCall_viiiijjjj=function(){return(ap=t.dynCall_viiiijjjj=t.asm.lh).apply(null,arguments)},up=t.dynCall_jiijijii=function(){return(up=t.dynCall_jiijijii=t.asm.mh).apply(null,arguments)},cp=t.dynCall_viijiiiiij=function(){return(cp=t.dynCall_viijiiiiij=t.asm.nh).apply(null,arguments)},lp=t.dynCall_viijiiiijj=function(){return(lp=t.dynCall_viijiiiijj=t.asm.oh).apply(null,arguments)},dp=t.dynCall_viiijiiiijjj=function(){return(dp=t.dynCall_viiijiiiijjj=t.asm.ph).apply(null,arguments)},fp=t.dynCall_viijijiiiijjj=function(){return(fp=t.dynCall_viijijiiiijjj=t.asm.qh).apply(null,arguments)},hp=t.dynCall_iijjjj=function(){return(hp=t.dynCall_iijjjj=t.asm.rh).apply(null,arguments)},pp=t.dynCall_iiijji=function(){return(pp=t.dynCall_iiijji=t.asm.sh).apply(null,arguments)},yp=t.dynCall_vijijiiiijjj=function(){return(yp=t.dynCall_vijijiiiijjj=t.asm.th).apply(null,arguments)},mp=t.dynCall_iiiiiiji=function(){return(mp=t.dynCall_iiiiiiji=t.asm.uh).apply(null,arguments)},_p=t.dynCall_jijijjij=function(){return(_p=t.dynCall_jijijjij=t.asm.vh).apply(null,arguments)},bp=t.dynCall_vijjij=function(){return(bp=t.dynCall_vijjij=t.asm.wh).apply(null,arguments)},gp=t.dynCall_viijjj=function(){return(gp=t.dynCall_viijjj=t.asm.xh).apply(null,arguments)},vp=t.dynCall_jiiijj=function(){return(vp=t.dynCall_jiiijj=t.asm.yh).apply(null,arguments)},jp=t.dynCall_viijiiii=function(){return(jp=t.dynCall_viijiiii=t.asm.zh).apply(null,arguments)},wp=t.dynCall_iiijij=function(){return(wp=t.dynCall_iiijij=t.asm.Ah).apply(null,arguments)},Bp=t.dynCall_viiijiii=function(){return(Bp=t.dynCall_viiijiii=t.asm.Bh).apply(null,arguments)},Tp=t.dynCall_viijjji=function(){return(Tp=t.dynCall_viijjji=t.asm.Ch).apply(null,arguments)},Ip=t.dynCall_iiiiiij=function(){return(Ip=t.dynCall_iiiiiij=t.asm.Dh).apply(null,arguments)},Sp=t.dynCall_iiiiiiiiiiji=function(){return(Sp=t.dynCall_iiiiiiiiiiji=t.asm.Eh).apply(null,arguments)},Dp=t.dynCall_jiiiiiii=function(){return(Dp=t.dynCall_jiiiiiii=t.asm.Fh).apply(null,arguments)},Op=t.dynCall_iidj=function(){return(Op=t.dynCall_iidj=t.asm.Gh).apply(null,arguments)},Ap=t.dynCall_jiiijii=function(){return(Ap=t.dynCall_jiiijii=t.asm.Hh).apply(null,arguments)},Fp=t.dynCall_ijji=function(){return(Fp=t.dynCall_ijji=t.asm.Ih).apply(null,arguments)},Mp=t.dynCall_iiiiiiiij=function(){return(Mp=t.dynCall_iiiiiiiij=t.asm.Jh).apply(null,arguments)},Vp=t.dynCall_iiiiiiij=function(){return(Vp=t.dynCall_iiiiiiij=t.asm.Kh).apply(null,arguments)},Up=t.dynCall_iiiiiiiiiiiij=function(){return(Up=t.dynCall_iiiiiiiiiiiij=t.asm.Lh).apply(null,arguments)},Cp=t.dynCall_iiiiiiiji=function(){return(Cp=t.dynCall_iiiiiiiji=t.asm.Mh).apply(null,arguments)},Pp=t.dynCall_iiiidjj=function(){return(Pp=t.dynCall_iiiidjj=t.asm.Nh).apply(null,arguments)},kp=t.dynCall_jiiiii=function(){return(kp=t.dynCall_jiiiii=t.asm.Oh).apply(null,arguments)},Rp=t.dynCall_jiiiiiijii=function(){return(Rp=t.dynCall_jiiiiiijii=t.asm.Ph).apply(null,arguments)},xp=t.dynCall_iiiijji=function(){return(xp=t.dynCall_iiiijji=t.asm.Qh).apply(null,arguments)},Np=t.dynCall_jiiiiii=function(){return(Np=t.dynCall_jiiiiii=t.asm.Rh).apply(null,arguments)},Ep=t.dynCall_jiiiijii=function(){return(Ep=t.dynCall_jiiiijii=t.asm.Sh).apply(null,arguments)},Lp=t.dynCall_jiiiijiiiiiiii=function(){return(Lp=t.dynCall_jiiiijiiiiiiii=t.asm.Th).apply(null,arguments)},qp=t.dynCall_jiiiiijiiii=function(){return(qp=t.dynCall_jiiiiijiiii=t.asm.Uh).apply(null,arguments)},zp=t.dynCall_jiiijiii=function(){return(zp=t.dynCall_jiiijiii=t.asm.Vh).apply(null,arguments)},Wp=t.dynCall_fiijii=function(){return(Wp=t.dynCall_fiijii=t.asm.Wh).apply(null,arguments)},Hp=t.dynCall_diijii=function(){return(Hp=t.dynCall_diijii=t.asm.Xh).apply(null,arguments)},Yp=t.dynCall_vijijj=function(){return(Yp=t.dynCall_vijijj=t.asm.Yh).apply(null,arguments)},$p=t.dynCall_jd=function(){return($p=t.dynCall_jd=t.asm.Zh).apply(null,arguments)},Gp=t.dynCall_jf=function(){return(Gp=t.dynCall_jf=t.asm._h).apply(null,arguments)},Jp=t.dynCall_jiijiiiii=function(){return(Jp=t.dynCall_jiijiiiii=t.asm.$h).apply(null,arguments)},Kp=t.dynCall_jiijiijiii=function(){return(Kp=t.dynCall_jiijiijiii=t.asm.ai).apply(null,arguments)},Zp=t.dynCall_jiijjiii=function(){return(Zp=t.dynCall_jiijjiii=t.asm.bi).apply(null,arguments)},Xp=t.dynCall_iijiii=function(){return(Xp=t.dynCall_iijiii=t.asm.ci).apply(null,arguments)},Qp=t.dynCall_jiiiiji=function(){return(Qp=t.dynCall_jiiiiji=t.asm.di).apply(null,arguments)},ey=t.dynCall_vijiijj=function(){return(ey=t.dynCall_vijiijj=t.asm.ei).apply(null,arguments)},ty=t.dynCall_vifiijj=function(){return(ty=t.dynCall_vifiijj=t.asm.fi).apply(null,arguments)},ry=t.dynCall_vidiijj=function(){return(ry=t.dynCall_vidiijj=t.asm.gi).apply(null,arguments)},iy=t.dynCall_viiiiij=function(){return(iy=t.dynCall_viiiiij=t.asm.hi).apply(null,arguments)},ny=t.dynCall_ijj=function(){return(ny=t.dynCall_ijj=t.asm.ii).apply(null,arguments)},sy=t.dynCall_ijjiii=function(){return(sy=t.dynCall_ijjiii=t.asm.ji).apply(null,arguments)},oy=t.dynCall_vijijjji=function(){return(oy=t.dynCall_vijijjji=t.asm.ki).apply(null,arguments)},ay=t.dynCall_viiiiijjji=function(){return(ay=t.dynCall_viiiiijjji=t.asm.li).apply(null,arguments)},uy=t.dynCall_viijijj=function(){return(uy=t.dynCall_viijijj=t.asm.mi).apply(null,arguments)},cy=t.dynCall_iiijiijj=function(){return(cy=t.dynCall_iiijiijj=t.asm.ni).apply(null,arguments)},ly=t.dynCall_viiijijjj=function(){return(ly=t.dynCall_viiijijjj=t.asm.oi).apply(null,arguments)},dy=t.dynCall_iijiijj=function(){return(dy=t.dynCall_iijiijj=t.asm.pi).apply(null,arguments)},fy=t.dynCall_viiijjjji=function(){return(fy=t.dynCall_viiijjjji=t.asm.qi).apply(null,arguments)},hy=t.dynCall_viiiijiii=function(){return(hy=t.dynCall_viiiijiii=t.asm.ri).apply(null,arguments)},py=t.dynCall_iijii=function(){return(py=t.dynCall_iijii=t.asm.si).apply(null,arguments)},yy=t.dynCall_vijjiiii=function(){return(yy=t.dynCall_vijjiiii=t.asm.ti).apply(null,arguments)},my=t.dynCall_vijijjiiiii=function(){return(my=t.dynCall_vijijjiiiii=t.asm.ui).apply(null,arguments)},_y=t.dynCall_vijjiiiii=function(){return(_y=t.dynCall_vijjiiiii=t.asm.vi).apply(null,arguments)},by=t.dynCall_iiijjji=function(){return(by=t.dynCall_iiijjji=t.asm.wi).apply(null,arguments)},gy=t.dynCall_iiiiijjj=function(){return(gy=t.dynCall_iiiiijjj=t.asm.xi).apply(null,arguments)},vy=t.dynCall_jijiiii=function(){return(vy=t.dynCall_jijiiii=t.asm.yi).apply(null,arguments)},jy=t.dynCall_iiijjjii=function(){return(jy=t.dynCall_iiijjjii=t.asm.zi).apply(null,arguments)},wy=t.dynCall_iiiiijjji=function(){return(wy=t.dynCall_iiiiijjji=t.asm.Ai).apply(null,arguments)},By=t.dynCall_iiiijjj=function(){return(By=t.dynCall_iiiijjj=t.asm.Bi).apply(null,arguments)},Ty=t.dynCall_viijiji=function(){return(Ty=t.dynCall_viijiji=t.asm.Ci).apply(null,arguments)};function iw(o){var a=w();try{H.get(o)()}catch(u){if(B(a),u!==u+0&&u!=="longjmp")throw u;T(1,0)}}function nw(o,a,u){var l=w();try{H.get(o)(a,u)}catch(d){if(B(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function sw(o,a){var u=w();try{return H.get(o)(a)}catch(l){if(B(u),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function ow(o,a,u){var l=w();try{return H.get(o)(a,u)}catch(d){if(B(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function aw(o,a){var u=w();try{H.get(o)(a)}catch(l){if(B(u),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function uw(o,a,u,l){var d=w();try{return H.get(o)(a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function cw(o,a,u,l,d,f){var h=w();try{return H.get(o)(a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function lw(o,a,u,l,d){var f=w();try{H.get(o)(a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function dw(o,a,u,l,d){var f=w();try{return H.get(o)(a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function fw(o,a,u,l){var d=w();try{return H.get(o)(a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function hw(o,a,u,l){var d=w();try{return H.get(o)(a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function pw(o,a,u,l){var d=w();try{H.get(o)(a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function yw(o,a,u,l){var d=w();try{H.get(o)(a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function mw(o,a,u,l){var d=w();try{H.get(o)(a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function _w(o){var a=w();try{return H.get(o)()}catch(u){if(B(a),u!==u+0&&u!=="longjmp")throw u;T(1,0)}}function bw(o,a,u,l,d,f,h,p){var y=w();try{return H.get(o)(a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function gw(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{return H.get(o)(a,u,l,d,f,h,p,y,m,g)}catch(O){if(B(j),O!==O+0&&O!=="longjmp")throw O;T(1,0)}}function vw(o,a,u,l,d,f,h,p){var y=w();try{H.get(o)(a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function jw(o,a,u,l,d,f,h){var p=w();try{return H.get(o)(a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function ww(o,a,u,l,d,f,h,p,y,m,g,j){var O=w();try{return H.get(o)(a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(B(O),M!==M+0&&M!=="longjmp")throw M;T(1,0)}}function Bw(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{H.get(o)(a,u,l,d,f,h,p,y,m,g)}catch(O){if(B(j),O!==O+0&&O!=="longjmp")throw O;T(1,0)}}function Tw(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x,ie){var ye=w();try{H.get(o)(a,u,l,d,f,h,p,y,m,g,j,O,M,x,ie)}catch(Be){if(B(ye),Be!==Be+0&&Be!=="longjmp")throw Be;T(1,0)}}function Iw(o,a,u,l,d,f,h){var p=w();try{H.get(o)(a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function Sw(o,a,u,l,d,f){var h=w();try{return H.get(o)(a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function Dw(o,a,u,l,d,f,h,p,y){var m=w();try{H.get(o)(a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function Ow(o,a){var u=w();try{return H.get(o)(a)}catch(l){if(B(u),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function Aw(o,a,u,l,d,f){var h=w();try{H.get(o)(a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function Fw(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x,ie,ye,Be,P,$){var Ae=w();try{return H.get(o)(a,u,l,d,f,h,p,y,m,g,j,O,M,x,ie,ye,Be,P,$)}catch(me){if(B(Ae),me!==me+0&&me!=="longjmp")throw me;T(1,0)}}function Mw(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x,ie,ye,Be,P,$,Ae){var me=w();try{return H.get(o)(a,u,l,d,f,h,p,y,m,g,j,O,M,x,ie,ye,Be,P,$,Ae)}catch(at){if(B(me),at!==at+0&&at!=="longjmp")throw at;T(1,0)}}function Vw(o,a,u){var l=w();try{H.get(o)(a,u)}catch(d){if(B(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function Uw(o,a,u,l){var d=w();try{H.get(o)(a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function Cw(o,a,u,l){var d=w();try{H.get(o)(a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function Pw(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x,ie){var ye=w();try{return H.get(o)(a,u,l,d,f,h,p,y,m,g,j,O,M,x,ie)}catch(Be){if(B(ye),Be!==Be+0&&Be!=="longjmp")throw Be;T(1,0)}}function kw(o,a,u,l,d){var f=w();try{return H.get(o)(a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function Rw(o,a,u){var l=w();try{H.get(o)(a,u)}catch(d){if(B(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function xw(o,a,u,l,d,f,h,p,y,m){var g=w();try{H.get(o)(a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function Nw(o,a,u,l,d){var f=w();try{return H.get(o)(a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function Ew(o,a,u){var l=w();try{return H.get(o)(a,u)}catch(d){if(B(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function Lw(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{H.get(o)(a,u,l,d,f,h,p,y,m,g)}catch(O){if(B(j),O!==O+0&&O!=="longjmp")throw O;T(1,0)}}function qw(o,a,u,l,d,f,h,p,y){var m=w();try{return H.get(o)(a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function zw(o,a){var u=w();try{return H.get(o)(a)}catch(l){if(B(u),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function Ww(o,a,u,l,d,f){var h=w();try{H.get(o)(a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function Hw(o,a,u,l,d,f,h,p,y,m,g,j,O,M){var x=w();try{H.get(o)(a,u,l,d,f,h,p,y,m,g,j,O,M)}catch(ie){if(B(x),ie!==ie+0&&ie!=="longjmp")throw ie;T(1,0)}}function Yw(o,a,u){var l=w();try{return H.get(o)(a,u)}catch(d){if(B(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function $w(o,a,u){var l=w();try{return H.get(o)(a,u)}catch(d){if(B(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function Gw(o,a,u,l){var d=w();try{return H.get(o)(a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function Jw(o,a,u){var l=w();try{return H.get(o)(a,u)}catch(d){if(B(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function Kw(o,a,u){var l=w();try{return H.get(o)(a,u)}catch(d){if(B(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function Zw(o,a,u,l){var d=w();try{return H.get(o)(a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function Xw(o,a,u,l,d,f,h,p,y,m){var g=w();try{H.get(o)(a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function Qw(o,a,u,l,d,f,h,p,y,m,g,j){var O=w();try{H.get(o)(a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(B(O),M!==M+0&&M!=="longjmp")throw M;T(1,0)}}function eB(o,a){var u=w();try{return H.get(o)(a)}catch(l){if(B(u),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function tB(o,a){var u=w();try{return H.get(o)(a)}catch(l){if(B(u),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function rB(o,a,u,l,d){var f=w();try{return df(o,a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function iB(o,a,u,l,d,f,h){var p=w();try{vf(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function nB(o,a){var u=w();try{return mf(o,a)}catch(l){if(B(u),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function sB(o,a,u){var l=w();try{return dh(o,a,u)}catch(d){if(B(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function oB(o,a,u,l,d,f,h){var p=w();try{pf(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function aB(o,a,u,l,d,f,h){var p=w();try{return ff(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function uB(o,a,u,l,d,f,h,p,y){var m=w();try{return hf(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function cB(o,a,u,l){var d=w();try{return _f(o,a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function lB(o,a,u,l,d,f){var h=w();try{wf(o,a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function dB(o){var a=w();try{return yf(o)}catch(u){if(B(a),u!==u+0&&u!=="longjmp")throw u;T(1,0)}}function fB(o,a,u,l,d){var f=w();try{bf(o,a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function hB(o,a,u,l,d,f,h,p){var y=w();try{Bf(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function pB(o,a,u,l,d,f,h){var p=w();try{return Tf(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function yB(o,a,u,l,d,f,h,p){var y=w();try{gf(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function mB(o,a,u,l){var d=w();try{Uf(o,a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function _B(o,a,u,l,d){var f=w();try{Df(o,a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function bB(o,a,u,l,d){var f=w();try{return kf(o,a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function gB(o,a,u,l,d,f){var h=w();try{return ah(o,a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function vB(o,a,u,l,d,f,h,p){var y=w();try{return wp(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function jB(o,a,u,l,d,f){var h=w();try{return ch(o,a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function wB(o,a,u,l,d,f){var h=w();try{return Wf(o,a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function BB(o,a,u,l,d,f,h,p){var y=w();try{return pp(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function TB(o,a,u,l,d,f){var h=w();try{If(o,a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function IB(o,a,u,l,d,f,h,p){var y=w();try{return Of(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function SB(o,a,u,l,d,f,h,p){var y=w();try{jf(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function DB(o,a,u,l,d,f,h,p,y){var m=w();try{Mf(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function OB(o,a,u,l,d,f,h,p,y,m,g,j){var O=w();try{Ff(o,a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(B(O),M!==M+0&&M!=="longjmp")throw M;T(1,0)}}function AB(o,a,u,l,d,f,h,p,y,m){var g=w();try{Af(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function FB(o,a,u,l,d,f,h,p,y){var m=w();try{oh(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function MB(o,a,u,l,d,f,h,p,y,m,g,j,O){var M=w();try{tp(o,a,u,l,d,f,h,p,y,m,g,j,O)}catch(x){if(B(M),x!==x+0&&x!=="longjmp")throw x;T(1,0)}}function VB(o,a,u,l,d,f,h,p,y){var m=w();try{ih(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function UB(o,a,u,l,d,f,h,p,y){var m=w();try{return Vf(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function CB(o,a,u,l,d,f,h){var p=w();try{Lf(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function PB(o,a,u,l){var d=w();try{return Cf(o,a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function kB(o,a,u,l,d,f){var h=w();try{return Pf(o,a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function RB(o,a,u,l,d,f,h,p,y){var m=w();try{Ef(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function xB(o,a,u,l,d,f,h){var p=w();try{$f(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function NB(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{Nf(o,a,u,l,d,f,h,p,y,m,g)}catch(O){if(B(j),O!==O+0&&O!=="longjmp")throw O;T(1,0)}}function EB(o,a,u,l,d,f){var h=w();try{return rh(o,a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function LB(o,a,u,l,d,f,h,p,y,m,g,j){var O=w();try{xf(o,a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(B(O),M!==M+0&&M!=="longjmp")throw M;T(1,0)}}function qB(o,a,u,l,d,f,h,p,y){var m=w();try{return zf(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function zB(o,a,u,l,d,f,h,p,y){var m=w();try{qf(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function WB(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x){var ie=w();try{return Rf(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x)}catch(ye){if(B(ie),ye!==ye+0&&ye!=="longjmp")throw ye;T(1,0)}}function HB(o,a,u,l,d,f,h,p,y){var m=w();try{return Hf(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function YB(o,a,u,l,d,f,h,p){var y=w();try{return Yf(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function $B(o,a,u,l,d,f,h,p){var y=w();try{Sf(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function GB(o,a,u,l,d,f){var h=w();try{Gf(o,a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function JB(o,a,u,l,d,f,h,p,y){var m=w();try{Jf(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function KB(o,a,u,l,d,f){var h=w();try{Kf(o,a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function ZB(o,a,u,l,d,f,h){var p=w();try{return Xf(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function XB(o,a,u,l,d,f,h,p,y,m){var g=w();try{eh(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function QB(o,a,u,l,d,f,h){var p=w();try{return Qf(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function eT(o,a,u,l,d,f,h,p,y,m){var g=w();try{th(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function tT(o,a,u,l,d,f,h,p,y){var m=w();try{return Zf(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function rT(o,a,u,l,d,f,h){var p=w();try{Vh(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function iT(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{return Uh(o,a,u,l,d,f,h,p,y,m,g)}catch(O){if(B(j),O!==O+0&&O!=="longjmp")throw O;T(1,0)}}function nT(o,a,u,l,d,f,h,p){var y=w();try{return uh(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function sT(o,a,u,l,d,f,h){var p=w();try{return lh(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function oT(o,a,u,l){var d=w();try{return fh(o,a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function aT(o,a,u,l,d,f,h){var p=w();try{Bh(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function uT(o,a,u,l,d,f,h,p){var y=w();try{Oh(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function cT(o,a,u,l,d,f,h,p){var y=w();try{return Ah(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function lT(o,a,u,l,d,f,h,p){var y=w();try{return gh(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function dT(o,a,u,l,d,f,h,p,y){var m=w();try{return vh(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function fT(o,a,u,l,d,f,h,p){var y=w();try{jh(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function hT(o,a,u,l,d,f,h,p,y){var m=w();try{return wh(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function pT(o,a,u,l,d,f,h,p,y){var m=w();try{return Th(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function yT(o,a,u,l,d,f,h,p,y,m){var g=w();try{return Ih(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function mT(o,a,u,l,d,f,h){var p=w();try{return Dh(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function _T(o,a,u,l,d){var f=w();try{return Sh(o,a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function bT(o,a,u,l,d,f,h,p,y){var m=w();try{_h(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function gT(o,a,u,l,d,f,h,p){var y=w();try{mh(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function vT(o,a,u,l,d,f,h,p,y,m){var g=w();try{bh(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function jT(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{return hh(o,a,u,l,d,f,h,p,y,m,g)}catch(O){if(B(j),O!==O+0&&O!=="longjmp")throw O;T(1,0)}}function wT(o,a,u,l,d,f,h,p,y,m,g,j){var O=w();try{ph(o,a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(B(O),M!==M+0&&M!=="longjmp")throw M;T(1,0)}}function BT(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{yh(o,a,u,l,d,f,h,p,y,m,g)}catch(O){if(B(j),O!==O+0&&O!=="longjmp")throw O;T(1,0)}}function TT(o,a,u,l,d,f,h){var p=w();try{Fh(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function IT(o,a,u,l,d,f,h,p,y){var m=w();try{return Mh(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function ST(o,a,u,l){var d=w();try{return Nh(o,a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function DT(o,a,u,l,d){var f=w();try{return ny(o,a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function OT(o,a,u,l,d,f,h,p){var y=w();try{return sy(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function AT(o,a,u){var l=w();try{return kh(o,a,u)}catch(d){if(B(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function FT(o,a,u){var l=w();try{return Rh(o,a,u)}catch(d){if(B(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function MT(o,a,u,l,d){var f=w();try{return Hh(o,a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function VT(o,a,u,l,d,f,h){var p=w();try{Lh(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function UT(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x){var ie=w();try{Ph(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x)}catch(ye){if(B(ie),ye!==ye+0&&ye!=="longjmp")throw ye;T(1,0)}}function CT(o,a,u,l,d){var f=w();try{return xh(o,a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function PT(o,a,u,l,d){var f=w();try{Eh(o,a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function kT(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{qh(o,a,u,l,d,f,h,p,y,m,g)}catch(O){if(B(j),O!==O+0&&O!=="longjmp")throw O;T(1,0)}}function RT(o,a,u,l,d,f,h){var p=w();try{return Wh(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function xT(o,a,u,l,d,f,h){var p=w();try{zh(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function NT(o,a,u,l,d,f,h,p,y,m){var g=w();try{return Yh(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function ET(o,a,u,l,d,f,h,p,y,m){var g=w();try{return $h(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function LT(o,a,u,l,d,f,h,p){var y=w();try{Gh(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function qT(o,a,u,l,d,f,h,p,y,m){var g=w();try{Jh(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function zT(o,a,u,l,d,f,h,p,y,m){var g=w();try{Kh(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function WT(o,a,u,l,d,f,h){var p=w();try{return Qh(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function HT(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{Zh(o,a,u,l,d,f,h,p,y,m,g)}catch(O){if(B(j),O!==O+0&&O!=="longjmp")throw O;T(1,0)}}function YT(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{Xh(o,a,u,l,d,f,h,p,y,m,g)}catch(O){if(B(j),O!==O+0&&O!=="longjmp")throw O;T(1,0)}}function $T(o,a,u,l,d,f,h,p){var y=w();try{return ep(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function GT(o,a,u,l,d,f,h,p,y){var m=w();try{rp(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function JT(o,a,u,l,d){var f=w();try{return lf(o,a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function KT(o,a,u,l,d,f,h,p,y){var m=w();try{return mp(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function ZT(o,a,u,l,d,f,h,p,y,m){var g=w();try{sh(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function XT(o,a,u,l,d,f,h,p,y,m){var g=w();try{return hp(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function QT(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{ip(o,a,u,l,d,f,h,p,y,m,g)}catch(O){if(B(j),O!==O+0&&O!=="longjmp")throw O;T(1,0)}}function eI(o,a,u,l,d,f,h,p,y,m,g,j,O){var M=w();try{np(o,a,u,l,d,f,h,p,y,m,g,j,O)}catch(x){if(B(M),x!==x+0&&x!=="longjmp")throw x;T(1,0)}}function tI(o,a,u,l,d,f,h,p,y,m){var g=w();try{sp(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function rI(o,a,u,l,d,f,h,p,y,m,g,j,O){var M=w();try{ap(o,a,u,l,d,f,h,p,y,m,g,j,O)}catch(x){if(B(M),x!==x+0&&x!=="longjmp")throw x;T(1,0)}}function iI(o,a,u,l,d,f,h,p,y,m){var g=w();try{return up(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function nI(o,a,u,l,d,f,h,p,y,m,g,j){var O=w();try{cp(o,a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(B(O),M!==M+0&&M!=="longjmp")throw M;T(1,0)}}function sI(o,a,u,l,d,f,h,p,y,m,g,j,O){var M=w();try{lp(o,a,u,l,d,f,h,p,y,m,g,j,O)}catch(x){if(B(M),x!==x+0&&x!=="longjmp")throw x;T(1,0)}}function oI(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x,ie){var ye=w();try{dp(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x,ie)}catch(Be){if(B(ye),Be!==Be+0&&Be!=="longjmp")throw Be;T(1,0)}}function aI(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x,ie,ye,Be){var P=w();try{fp(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x,ie,ye,Be)}catch($){if(B(P),$!==$+0&&$!=="longjmp")throw $;T(1,0)}}function uI(o,a,u,l,d,f,h,p,y,m,g,j){var O=w();try{op(o,a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(B(O),M!==M+0&&M!=="longjmp")throw M;T(1,0)}}function cI(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x,ie,ye){var Be=w();try{yp(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x,ie,ye)}catch(P){if(B(Be),P!==P+0&&P!=="longjmp")throw P;T(1,0)}}function lI(o,a,u,l,d,f,h,p,y,m,g,j){var O=w();try{return _p(o,a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(B(O),M!==M+0&&M!=="longjmp")throw M;T(1,0)}}function dI(o,a,u,l,d,f,h,p,y){var m=w();try{bp(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function fI(o,a,u,l,d,f,h,p,y){var m=w();try{gp(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function hI(o,a,u,l,d,f,h,p){var y=w();try{return vp(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function pI(o,a,u,l,d,f,h,p,y){var m=w();try{jp(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function yI(o,a,u,l,d,f,h,p,y){var m=w();try{Bp(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function mI(o,a,u,l,d,f){var h=w();try{return kp(o,a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function _I(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{return Rp(o,a,u,l,d,f,h,p,y,m,g)}catch(O){if(B(j),O!==O+0&&O!=="longjmp")throw O;T(1,0)}}function bI(o,a,u,l,d,f,h,p,y){var m=w();try{return xp(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function gI(o,a,u,l,d,f,h){var p=w();try{return Np(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function vI(o,a,u,l,d,f){var h=w();try{return Fp(o,a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function jI(o,a,u,l,d,f,h,p,y,m){var g=w();try{Tp(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function wI(o,a,u,l,d,f,h,p,y,m){var g=w();try{return Mp(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function BI(o,a,u,l,d,f,h,p){var y=w();try{return Ip(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function TI(o,a,u,l,d,f,h,p,y,m,g,j,O){var M=w();try{return Sp(o,a,u,l,d,f,h,p,y,m,g,j,O)}catch(x){if(B(M),x!==x+0&&x!=="longjmp")throw x;T(1,0)}}function II(o,a,u,l,d,f,h,p){var y=w();try{return Dp(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function SI(o,a,u,l,d,f,h,p,y){var m=w();try{return Vp(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function DI(o,a,u,l,d,f,h,p,y,m,g,j,O,M){var x=w();try{return Up(o,a,u,l,d,f,h,p,y,m,g,j,O,M)}catch(ie){if(B(x),ie!==ie+0&&ie!=="longjmp")throw ie;T(1,0)}}function OI(o,a,u,l,d){var f=w();try{return Op(o,a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function AI(o,a,u,l,d,f,h,p){var y=w();try{return Ap(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function FI(o,a,u,l,d,f,h,p,y,m){var g=w();try{return Cp(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function MI(o,a,u,l,d,f,h,p,y){var m=w();try{return Pp(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function VI(o,a,u,l,d,f,h,p,y){var m=w();try{return Ep(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function UI(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x){var ie=w();try{return Lp(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x)}catch(ye){if(B(ie),ye!==ye+0&&ye!=="longjmp")throw ye;T(1,0)}}function CI(o,a,u,l,d,f,h,p,y,m,g,j){var O=w();try{return qp(o,a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(B(O),M!==M+0&&M!=="longjmp")throw M;T(1,0)}}function PI(o,a,u,l,d,f,h,p,y){var m=w();try{return zp(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function kI(o,a,u,l,d,f,h,p,y){var m=w();try{Yp(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function RI(o,a){var u=w();try{return $p(o,a)}catch(l){if(B(u),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function xI(o,a){var u=w();try{return Gp(o,a)}catch(l){if(B(u),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function NI(o,a,u,l,d,f,h,p,y,m){var g=w();try{return Jp(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function EI(o,a,u,l,d,f,h,p,y,m,g,j){var O=w();try{return Kp(o,a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(B(O),M!==M+0&&M!=="longjmp")throw M;T(1,0)}}function LI(o,a,u,l,d,f,h,p,y,m){var g=w();try{return Zp(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function qI(o,a,u,l,d,f,h){var p=w();try{return Wp(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function zI(o,a,u,l,d,f,h){var p=w();try{return Hp(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function WI(o,a,u,l,d,f,h){var p=w();try{return Xp(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function HI(o,a,u,l,d,f,h,p){var y=w();try{return Qp(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function YI(o,a,u,l,d,f,h,p,y,m){var g=w();try{ey(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function $I(o,a,u,l,d,f,h,p,y){var m=w();try{ty(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function GI(o,a,u,l,d,f,h,p,y){var m=w();try{ry(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function JI(o,a,u,l,d,f,h,p){var y=w();try{iy(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function KI(o,a,u,l,d,f,h,p,y,m,g,j){var O=w();try{oy(o,a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(B(O),M!==M+0&&M!=="longjmp")throw M;T(1,0)}}function ZI(o,a,u,l,d,f){var h=w();try{return Ch(o,a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function XI(o,a,u,l,d,f,h,p,y,m){var g=w();try{uy(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function QI(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{return cy(o,a,u,l,d,f,h,p,y,m,g)}catch(O){if(B(j),O!==O+0&&O!=="longjmp")throw O;T(1,0)}}function eS(o,a,u,l,d,f,h,p,y,m,g,j,O){var M=w();try{ay(o,a,u,l,d,f,h,p,y,m,g,j,O)}catch(x){if(B(M),x!==x+0&&x!=="longjmp")throw x;T(1,0)}}function tS(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{nh(o,a,u,l,d,f,h,p,y,m,g)}catch(O){if(B(j),O!==O+0&&O!=="longjmp")throw O;T(1,0)}}function rS(o,a,u,l,d,f,h,p,y,m,g,j,O){var M=w();try{ly(o,a,u,l,d,f,h,p,y,m,g,j,O)}catch(x){if(B(M),x!==x+0&&x!=="longjmp")throw x;T(1,0)}}function iS(o,a,u,l,d,f,h,p,y,m){var g=w();try{return dy(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function nS(o,a,u,l,d,f,h,p,y,m){var g=w();try{return by(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function sS(o,a,u,l,d,f,h,p,y,m,g,j,O){var M=w();try{fy(o,a,u,l,d,f,h,p,y,m,g,j,O)}catch(x){if(B(M),x!==x+0&&x!=="longjmp")throw x;T(1,0)}}function oS(o,a,u,l,d,f,h,p,y,m){var g=w();try{hy(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function aS(o,a,u,l,d,f){var h=w();try{return py(o,a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function uS(o,a,u,l,d,f,h,p,y,m,g,j,O,M){var x=w();try{my(o,a,u,l,d,f,h,p,y,m,g,j,O,M)}catch(ie){if(B(x),ie!==ie+0&&ie!=="longjmp")throw ie;T(1,0)}}function cS(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{_y(o,a,u,l,d,f,h,p,y,m,g)}catch(O){if(B(j),O!==O+0&&O!=="longjmp")throw O;T(1,0)}}function lS(o,a,u,l,d,f,h,p,y,m){var g=w();try{yy(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function dS(o,a,u,l,d,f,h,p,y){var m=w();try{Ty(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function fS(o,a,u,l,d,f,h,p){var y=w();try{return vy(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function hS(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{return jy(o,a,u,l,d,f,h,p,y,m,g)}catch(O){if(B(j),O!==O+0&&O!=="longjmp")throw O;T(1,0)}}function pS(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{return gy(o,a,u,l,d,f,h,p,y,m,g)}catch(O){if(B(j),O!==O+0&&O!=="longjmp")throw O;T(1,0)}}function yS(o,a,u,l,d,f,h,p,y,m,g,j){var O=w();try{return wy(o,a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(B(O),M!==M+0&&M!=="longjmp")throw M;T(1,0)}}function mS(o,a,u,l,d,f,h,p,y,m){var g=w();try{return By(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}t.ccall=Uv;var io;function no(o){this.name="ExitStatus",this.message="Program terminated with exit("+o+")",this.status=o}var _S=!1;ts=function o(){io||gu(),io||(ts=o)};function bS(o){var a=t._main,u=0,l=0;try{var d=a(u,l);return gS(d,!0),d}catch(f){return oj(f)}finally{_S=!0}}function gu(o){if(o=o||v,ji>0||($v(),ji>0))return;function a(){io||(io=!0,t.calledRun=!0,!lu&&(Gv(),Jv(),i(t),t.onRuntimeInitialized&&t.onRuntimeInitialized(),Iy&&bS(o),Zv()))}t.setStatus?(t.setStatus("Running..."),setTimeout(function(){setTimeout(function(){t.setStatus("")},1),a()},1)):a()}t.run=gu;function gS(o,a){Ys=o,du()||Kv(),vS(o)}function vS(o){Ys=o,du()||(t.onExit&&t.onExit(o),lu=!0),S(o,new no(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),gu(),e.ready}}(),Tv=wU;var Yd=class extends uu{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 Sv=class extends Yd{constructor(e,t,i,n=null){super(e,t,i,n)}instantiateImpl(e){return Tv({...e,instantiateWasm:this.instantiateWasm.bind(this),locateFile:this.locateFile.bind(this)})}};var nt={fileInfoCache:new Map,getFileInfo(r,e){try{let t=nt.fileInfoCache.get(e);if(t)return t;let[i,n,s]=Se(r,"duckdb_web_fs_get_file_info",["number"],[e]);if(i!==je.SUCCESS)throw new Error(ve(r,n,s));let c=ve(r,n,s);He(r);let v=JSON.parse(c);if(v==null)return null;let I={...v,blob:null};return nt.fileInfoCache.set(e,I),I}catch(t){return We(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{nt.fileInfoCache.delete(e);let t=nt.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 We(r,`File does not support range requests: ${t.file_name}`),0;break}case Qe.NATIVE:{if(!nt._files?.get(t.file_name))return We(r,`No handle available for file: ${t.file_name}`),0;break}}}catch(t){We(r,t.toString())}return 0},glob:(r,e,t)=>{try{let i=ve(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 s=!1;if(n.status==206)s=!0;else if(n.status==200)s=n.getResponseHeader("Accept-Ranges")==="bytes";else{We(r,`HEAD request failed: ${i}`);return}if(!s){We(r,`File does not support range requests: ${i}`);return}r.ccall("duckdb_web_fs_glob_add_path",null,["string"],[i])}}catch(i){return We(r,i.toString()),0}},checkFile:(r,e,t)=>{try{let i=ve(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 s=!1;if(n.status==206)s=!0;else if(n.status==200)s=n.getResponseHeader("Accept-Ranges")==="bytes";else return!1;return!!s}}catch{return!1}return!1},syncFile:(r,e)=>{},closeFile:(r,e)=>{let t=nt.getFileInfo(r,e);switch(nt.fileInfoCache.delete(e),t?.data_protocol){case Qe.HTTP:break;case Qe.NATIVE:return}},truncateFile:(r,e,t)=>{switch(nt.getFileInfo(r,e)?.data_protocol){case Qe.HTTP:We(r,"Cannot truncate a http file");return;case Qe.NATIVE:We(r,"truncateFile not implemented");return}return 0},readFile(r,e,t,i,n){try{let s=nt.getFileInfo(r,e);switch(s?.data_protocol){case Qe.HTTP:{if(!s.data_url)return We(r,`Missing data URL for file ${e}`),0;let c=new XMLHttpRequest;if(c.open("GET",s.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 v=new Uint8Array(c.response,0,Math.min(c.response.byteLength,i));return r.HEAPU8.set(v,t),v.byteLength}else return c.status==200?(We(r,`Range request for ${s.data_url} did not return a partial response: ${c.status} "${c.statusText}"`),0):(We(r,`Range request for ${s.data_url} did returned non-success status: ${c.status} "${c.statusText}"`),0)}case Qe.NATIVE:{let c=nt._files?.get(s.file_name);if(!c)return We(r,`No handle available for file: ${s.file_name}`),0;let v=c.slice(n,n+i),I=new Uint8Array(new FileReaderSync().readAsArrayBuffer(v));return r.HEAPU8.set(I,t),I.byteLength}}return 0}catch(s){return We(r,s.toString()),0}},writeFile:(r,e,t,i,n)=>{switch(nt.getFileInfo(r,e)?.data_protocol){case Qe.HTTP:return We(r,"Cannot write to HTTP file"),0;case Qe.NATIVE:return We(r,"writefile not implemented"),0}return 0},getFileSize:(r,e)=>{try{let t=nt.getFileInfo(r,e);switch(t?.data_protocol){case Qe.NATIVE:{let i=nt._files?.get(t.file_name);return i?i.size:(We(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 We(r,t.toString()),0}},getLastFileModificationTime:(r,e)=>{let t=nt.getFileInfo(r,e);switch(t?.data_protocol){case Qe.NATIVE:{if(!nt._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 BU;})();
|
|
19
19
|
//# sourceMappingURL=duckdb-browser-sync.js.map
|