@duckdb/duckdb-wasm 0.1.13-dev33.0 → 0.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -5
- package/dist/duckdb-browser-blocking.mjs +33 -0
- package/dist/duckdb-browser-blocking.mjs.map +7 -0
- package/dist/duckdb-browser.mjs +3 -3
- package/dist/duckdb-browser.mjs.map +1 -1
- package/dist/duckdb-node-blocking.cjs +36 -3
- package/dist/duckdb-node-blocking.cjs.map +3 -3
- package/dist/duckdb-node-next.worker.cjs +36 -3
- package/dist/duckdb-node-next.worker.cjs.map +3 -3
- package/dist/duckdb-node.cjs +1 -1
- package/dist/duckdb-node.cjs.map +3 -3
- package/dist/duckdb-node.worker.cjs +35 -2
- package/dist/duckdb-node.worker.cjs.map +3 -3
- package/dist/tests-browser.js +25 -56
- package/dist/tests-browser.js.map +1 -1
- package/dist/tests-node.cjs +14734 -106
- package/dist/tests-node.cjs.map +3 -3
- package/package.json +13 -43
- package/dist/duckdb-browser-blocking.js +0 -20509
- package/dist/duckdb-browser-blocking.js.map +0 -7
- package/dist/duckdb-browser.js +0 -32
- package/dist/duckdb-browser.js.map +0 -7
- package/dist/duckdb-node.mjs +0 -32
- package/dist/duckdb-node.mjs.map +0 -7
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var sS=Object.create;var _o=Object.defineProperty,oS=Object.defineProperties,aS=Object.getOwnPropertyDescriptor,uS=Object.getOwnPropertyDescriptors,cS=Object.getOwnPropertyNames,Ny=Object.getOwnPropertySymbols,lS=Object.getPrototypeOf,Py=Object.prototype.hasOwnProperty,dS=Object.prototype.propertyIsEnumerable;var xy=(i,e,t)=>e in i?_o(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Ar=(i,e)=>{for(var t in e||(e={}))Py.call(e,t)&&xy(i,t,e[t]);if(Ny)for(var t of Ny(e))dS.call(e,t)&&xy(i,t,e[t]);return i},mo=(i,e)=>oS(i,uS(e)),fS=i=>_o(i,"__esModule",{value:!0});var hS=(i=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(i,{get:(e,t)=>(typeof require!="undefined"?require:e)[t]}):i)(function(i){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+i+'" is not supported')});var C=(i,e)=>()=>(e||i((e={exports:{}}).exports,e),e.exports);var pS=(i,e,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of cS(e))!Py.call(i,r)&&r!=="default"&&_o(i,r,{get:()=>e[r],enumerable:!(t=aS(e,r))||t.enumerable});return i},wi=i=>pS(fS(_o(i!=null?sS(lS(i)):{},"default",i&&i.__esModule&&"default"in i?{get:()=>i.default,enumerable:!0}:{value:i,enumerable:!0})),i);var at=C((mV,vo)=>{var Ly,qy,zy,Wy,Hy,Yy,$y,Gy,Jy,bo,Mu,Ky,Zy,Xy,an,Qy,e_,t_,i_,r_,n_,s_,o_,go;(function(i){var e=typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:{};typeof define=="function"&&define.amd?define("tslib",["exports"],function(r){i(t(e,t(r)))}):typeof vo=="object"&&typeof vo.exports=="object"?i(t(e,t(vo.exports))):i(t(e));function t(r,n){return r!==e&&(typeof Object.create=="function"?Object.defineProperty(r,"__esModule",{value:!0}):r.__esModule=!0),function(s,c){return r[s]=n?n(s,c):c}}})(function(i){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(r[s]=n[s])};Ly=function(r,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(r,n);function s(){this.constructor=r}r.prototype=n===null?Object.create(n):(s.prototype=n.prototype,new s)},qy=Object.assign||function(r){for(var n,s=1,c=arguments.length;s<c;s++){n=arguments[s];for(var _ in n)Object.prototype.hasOwnProperty.call(n,_)&&(r[_]=n[_])}return r},zy=function(r,n){var s={};for(var c in r)Object.prototype.hasOwnProperty.call(r,c)&&n.indexOf(c)<0&&(s[c]=r[c]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _=0,c=Object.getOwnPropertySymbols(r);_<c.length;_++)n.indexOf(c[_])<0&&Object.prototype.propertyIsEnumerable.call(r,c[_])&&(s[c[_]]=r[c[_]]);return s},Wy=function(r,n,s,c){var _=arguments.length,v=_<3?n:c===null?c=Object.getOwnPropertyDescriptor(n,s):c,T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(r,n,s,c);else for(var A=r.length-1;A>=0;A--)(T=r[A])&&(v=(_<3?T(v):_>3?T(n,s,v):T(n,s))||v);return _>3&&v&&Object.defineProperty(n,s,v),v},Hy=function(r,n){return function(s,c){n(s,c,r)}},Yy=function(r,n){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(r,n)},$y=function(r,n,s,c){function _(v){return v instanceof s?v:new s(function(T){T(v)})}return new(s||(s=Promise))(function(v,T){function A(J){try{q(c.next(J))}catch(Ce){T(Ce)}}function P(J){try{q(c.throw(J))}catch(Ce){T(Ce)}}function q(J){J.done?v(J.value):_(J.value).then(A,P)}q((c=c.apply(r,n||[])).next())})},Gy=function(r,n){var s={label:0,sent:function(){if(v[0]&1)throw v[1];return v[1]},trys:[],ops:[]},c,_,v,T;return T={next:A(0),throw:A(1),return:A(2)},typeof Symbol=="function"&&(T[Symbol.iterator]=function(){return this}),T;function A(q){return function(J){return P([q,J])}}function P(q){if(c)throw new TypeError("Generator is already executing.");for(;s;)try{if(c=1,_&&(v=q[0]&2?_.return:q[0]?_.throw||((v=_.return)&&v.call(_),0):_.next)&&!(v=v.call(_,q[1])).done)return v;switch(_=0,v&&(q=[q[0]&2,v.value]),q[0]){case 0:case 1:v=q;break;case 4:return s.label++,{value:q[1],done:!1};case 5:s.label++,_=q[1],q=[0];continue;case 7:q=s.ops.pop(),s.trys.pop();continue;default:if(v=s.trys,!(v=v.length>0&&v[v.length-1])&&(q[0]===6||q[0]===2)){s=0;continue}if(q[0]===3&&(!v||q[1]>v[0]&&q[1]<v[3])){s.label=q[1];break}if(q[0]===6&&s.label<v[1]){s.label=v[1],v=q;break}if(v&&s.label<v[2]){s.label=v[2],s.ops.push(q);break}v[2]&&s.ops.pop(),s.trys.pop();continue}q=n.call(r,s)}catch(J){q=[6,J],_=0}finally{c=v=0}if(q[0]&5)throw q[1];return{value:q[0]?q[1]:void 0,done:!0}}},Jy=function(r,n){for(var s in r)s!=="default"&&!Object.prototype.hasOwnProperty.call(n,s)&&go(n,r,s)},go=Object.create?function(r,n,s,c){c===void 0&&(c=s),Object.defineProperty(r,c,{enumerable:!0,get:function(){return n[s]}})}:function(r,n,s,c){c===void 0&&(c=s),r[c]=n[s]},bo=function(r){var n=typeof Symbol=="function"&&Symbol.iterator,s=n&&r[n],c=0;if(s)return s.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&c>=r.length&&(r=void 0),{value:r&&r[c++],done:!r}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},Mu=function(r,n){var s=typeof Symbol=="function"&&r[Symbol.iterator];if(!s)return r;var c=s.call(r),_,v=[],T;try{for(;(n===void 0||n-- >0)&&!(_=c.next()).done;)v.push(_.value)}catch(A){T={error:A}}finally{try{_&&!_.done&&(s=c.return)&&s.call(c)}finally{if(T)throw T.error}}return v},Ky=function(){for(var r=[],n=0;n<arguments.length;n++)r=r.concat(Mu(arguments[n]));return r},Zy=function(){for(var r=0,n=0,s=arguments.length;n<s;n++)r+=arguments[n].length;for(var c=Array(r),_=0,n=0;n<s;n++)for(var v=arguments[n],T=0,A=v.length;T<A;T++,_++)c[_]=v[T];return c},Xy=function(r,n,s){if(s||arguments.length===2)for(var c=0,_=n.length,v;c<_;c++)(v||!(c in n))&&(v||(v=Array.prototype.slice.call(n,0,c)),v[c]=n[c]);return r.concat(v||Array.prototype.slice.call(n))},an=function(r){return this instanceof an?(this.v=r,this):new an(r)},Qy=function(r,n,s){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var c=s.apply(r,n||[]),_,v=[];return _={},T("next"),T("throw"),T("return"),_[Symbol.asyncIterator]=function(){return this},_;function T(Te){c[Te]&&(_[Te]=function(qt){return new Promise(function(lt,cs){v.push([Te,qt,lt,cs])>1||A(Te,qt)})})}function A(Te,qt){try{P(c[Te](qt))}catch(lt){Ce(v[0][3],lt)}}function P(Te){Te.value instanceof an?Promise.resolve(Te.value.v).then(q,J):Ce(v[0][2],Te)}function q(Te){A("next",Te)}function J(Te){A("throw",Te)}function Ce(Te,qt){Te(qt),v.shift(),v.length&&A(v[0][0],v[0][1])}},e_=function(r){var n,s;return n={},c("next"),c("throw",function(_){throw _}),c("return"),n[Symbol.iterator]=function(){return this},n;function c(_,v){n[_]=r[_]?function(T){return(s=!s)?{value:an(r[_](T)),done:_==="return"}:v?v(T):T}:v}},t_=function(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r[Symbol.asyncIterator],s;return n?n.call(r):(r=typeof bo=="function"?bo(r):r[Symbol.iterator](),s={},c("next"),c("throw"),c("return"),s[Symbol.asyncIterator]=function(){return this},s);function c(v){s[v]=r[v]&&function(T){return new Promise(function(A,P){T=r[v](T),_(A,P,T.done,T.value)})}}function _(v,T,A,P){Promise.resolve(P).then(function(q){v({value:q,done:A})},T)}},i_=function(r,n){return Object.defineProperty?Object.defineProperty(r,"raw",{value:n}):r.raw=n,r};var t=Object.create?function(r,n){Object.defineProperty(r,"default",{enumerable:!0,value:n})}:function(r,n){r.default=n};r_=function(r){if(r&&r.__esModule)return r;var n={};if(r!=null)for(var s in r)s!=="default"&&Object.prototype.hasOwnProperty.call(r,s)&&go(n,r,s);return t(n,r),n},n_=function(r){return r&&r.__esModule?r:{default:r}},s_=function(r,n,s,c){if(s==="a"&&!c)throw new TypeError("Private accessor was defined without a getter");if(typeof n=="function"?r!==n||!c:!n.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return s==="m"?c:s==="a"?c.call(r):c?c.value:n.get(r)},o_=function(r,n,s,c,_){if(c==="m")throw new TypeError("Private method is not writable");if(c==="a"&&!_)throw new TypeError("Private accessor was defined without a setter");if(typeof n=="function"?r!==n||!_:!n.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return c==="a"?_.call(r,s):_?_.value=s:n.set(r,s),s},i("__extends",Ly),i("__assign",qy),i("__rest",zy),i("__decorate",Wy),i("__param",Hy),i("__metadata",Yy),i("__awaiter",$y),i("__generator",Gy),i("__exportStar",Jy),i("__createBinding",go),i("__values",bo),i("__read",Mu),i("__spread",Ky),i("__spreadArrays",Zy),i("__spreadArray",Xy),i("__await",an),i("__asyncGenerator",Qy),i("__asyncDelegator",e_),i("__asyncValues",t_),i("__makeTemplateObject",i_),i("__importStar",r_),i("__importDefault",n_),i("__classPrivateFieldGet",s_),i("__classPrivateFieldSet",o_)})});var Bi=C(a_=>{var O={};O.Offset;O.Table;O.SIZEOF_SHORT=2;O.SIZEOF_INT=4;O.FILE_IDENTIFIER_LENGTH=4;O.SIZE_PREFIX_LENGTH=4;O.Encoding={UTF8_BYTES:1,UTF16_STRING:2};O.int32=new Int32Array(2);O.float32=new Float32Array(O.int32.buffer);O.float64=new Float64Array(O.int32.buffer);O.isLittleEndian=new Uint16Array(new Uint8Array([1,0]).buffer)[0]===1;O.Long=function(i,e){this.low=i|0,this.high=e|0};O.Long.create=function(i,e){return i==0&&e==0?O.Long.ZERO:new O.Long(i,e)};O.Long.prototype.toFloat64=function(){return(this.low>>>0)+this.high*4294967296};O.Long.prototype.equals=function(i){return this.low==i.low&&this.high==i.high};O.Long.ZERO=new O.Long(0,0);O.Builder=function(i){if(i)var e=i;else var e=1024;this.bb=O.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};O.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};O.Builder.prototype.forceDefaults=function(i){this.force_defaults=i};O.Builder.prototype.dataBuffer=function(){return this.bb};O.Builder.prototype.asUint8Array=function(){return this.bb.bytes().subarray(this.bb.position(),this.bb.position()+this.offset())};O.Builder.prototype.prep=function(i,e){i>this.minalign&&(this.minalign=i);for(var t=~(this.bb.capacity()-this.space+e)+1&i-1;this.space<t+i+e;){var r=this.bb.capacity();this.bb=O.Builder.growByteBuffer(this.bb),this.space+=this.bb.capacity()-r}this.pad(t)};O.Builder.prototype.pad=function(i){for(var e=0;e<i;e++)this.bb.writeInt8(--this.space,0)};O.Builder.prototype.writeInt8=function(i){this.bb.writeInt8(this.space-=1,i)};O.Builder.prototype.writeInt16=function(i){this.bb.writeInt16(this.space-=2,i)};O.Builder.prototype.writeInt32=function(i){this.bb.writeInt32(this.space-=4,i)};O.Builder.prototype.writeInt64=function(i){this.bb.writeInt64(this.space-=8,i)};O.Builder.prototype.writeFloat32=function(i){this.bb.writeFloat32(this.space-=4,i)};O.Builder.prototype.writeFloat64=function(i){this.bb.writeFloat64(this.space-=8,i)};O.Builder.prototype.addInt8=function(i){this.prep(1,0),this.writeInt8(i)};O.Builder.prototype.addInt16=function(i){this.prep(2,0),this.writeInt16(i)};O.Builder.prototype.addInt32=function(i){this.prep(4,0),this.writeInt32(i)};O.Builder.prototype.addInt64=function(i){this.prep(8,0),this.writeInt64(i)};O.Builder.prototype.addFloat32=function(i){this.prep(4,0),this.writeFloat32(i)};O.Builder.prototype.addFloat64=function(i){this.prep(8,0),this.writeFloat64(i)};O.Builder.prototype.addFieldInt8=function(i,e,t){(this.force_defaults||e!=t)&&(this.addInt8(e),this.slot(i))};O.Builder.prototype.addFieldInt16=function(i,e,t){(this.force_defaults||e!=t)&&(this.addInt16(e),this.slot(i))};O.Builder.prototype.addFieldInt32=function(i,e,t){(this.force_defaults||e!=t)&&(this.addInt32(e),this.slot(i))};O.Builder.prototype.addFieldInt64=function(i,e,t){(this.force_defaults||!e.equals(t))&&(this.addInt64(e),this.slot(i))};O.Builder.prototype.addFieldFloat32=function(i,e,t){(this.force_defaults||e!=t)&&(this.addFloat32(e),this.slot(i))};O.Builder.prototype.addFieldFloat64=function(i,e,t){(this.force_defaults||e!=t)&&(this.addFloat64(e),this.slot(i))};O.Builder.prototype.addFieldOffset=function(i,e,t){(this.force_defaults||e!=t)&&(this.addOffset(e),this.slot(i))};O.Builder.prototype.addFieldStruct=function(i,e,t){e!=t&&(this.nested(e),this.slot(i))};O.Builder.prototype.nested=function(i){if(i!=this.offset())throw new Error("FlatBuffers: struct must be serialized inline.")};O.Builder.prototype.notNested=function(){if(this.isNested)throw new Error("FlatBuffers: object serialization must not be nested.")};O.Builder.prototype.slot=function(i){this.vtable[i]=this.offset()};O.Builder.prototype.offset=function(){return this.bb.capacity()-this.space};O.Builder.growByteBuffer=function(i){var e=i.capacity();if(e&3221225472)throw new Error("FlatBuffers: cannot grow buffer beyond 2 gigabytes.");var t=e<<1,r=O.ByteBuffer.allocate(t);return r.setPosition(t-e),r.bytes().set(i.bytes(),t-e),r};O.Builder.prototype.addOffset=function(i){this.prep(O.SIZEOF_INT,0),this.writeInt32(this.offset()-i+O.SIZEOF_INT)};O.Builder.prototype.startObject=function(i){this.notNested(),this.vtable==null&&(this.vtable=[]),this.vtable_in_use=i;for(var e=0;e<i;e++)this.vtable[e]=0;this.isNested=!0,this.object_start=this.offset()};O.Builder.prototype.endObject=function(){if(this.vtable==null||!this.isNested)throw new Error("FlatBuffers: endObject called without startObject");this.addInt32(0);for(var i=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?i-this.vtable[e]:0);var r=2;this.addInt16(i-this.object_start);var n=(t+r)*O.SIZEOF_SHORT;this.addInt16(n);var s=0,c=this.space;e:for(e=0;e<this.vtables.length;e++){var _=this.bb.capacity()-this.vtables[e];if(n==this.bb.readInt16(_)){for(var v=O.SIZEOF_SHORT;v<n;v+=O.SIZEOF_SHORT)if(this.bb.readInt16(c+v)!=this.bb.readInt16(_+v))continue e;s=this.vtables[e];break}}return s?(this.space=this.bb.capacity()-i,this.bb.writeInt32(this.space,s-i)):(this.vtables.push(this.offset()),this.bb.writeInt32(this.bb.capacity()-i,this.offset()-i)),this.isNested=!1,i};O.Builder.prototype.finish=function(i,e,t){var r=t?O.SIZE_PREFIX_LENGTH:0;if(e){var n=e;if(this.prep(this.minalign,O.SIZEOF_INT+O.FILE_IDENTIFIER_LENGTH+r),n.length!=O.FILE_IDENTIFIER_LENGTH)throw new Error("FlatBuffers: file identifier must be length "+O.FILE_IDENTIFIER_LENGTH);for(var s=O.FILE_IDENTIFIER_LENGTH-1;s>=0;s--)this.writeInt8(n.charCodeAt(s))}this.prep(this.minalign,O.SIZEOF_INT+r),this.addOffset(i),r&&this.addInt32(this.bb.capacity()-this.space),this.bb.setPosition(this.space)};O.Builder.prototype.finishSizePrefixed=function(i,e){this.finish(i,e,!0)};O.Builder.prototype.requiredField=function(i,e){var t=this.bb.capacity()-i,r=t-this.bb.readInt32(t),n=this.bb.readInt16(r+e)!=0;if(!n)throw new Error("FlatBuffers: field "+e+" must be set")};O.Builder.prototype.startVector=function(i,e,t){this.notNested(),this.vector_num_elems=e,this.prep(O.SIZEOF_INT,i*e),this.prep(t,i*e)};O.Builder.prototype.endVector=function(){return this.writeInt32(this.vector_num_elems),this.offset()};O.Builder.prototype.createString=function(i){if(i instanceof Uint8Array)var e=i;else for(var e=[],t=0;t<i.length;){var r,n=i.charCodeAt(t++);if(n<55296||n>=56320)r=n;else{var s=i.charCodeAt(t++);r=(n<<10)+s+(65536-(55296<<10)-56320)}r<128?e.push(r):(r<2048?e.push(r>>6&31|192):(r<65536?e.push(r>>12&15|224):e.push(r>>18&7|240,r>>12&63|128),e.push(r>>6&63|128)),e.push(r&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,_=this.bb.bytes();t<e.length;t++)_[c++]=e[t];return this.endVector()};O.Builder.prototype.createLong=function(i,e){return O.Long.create(i,e)};O.ByteBuffer=function(i){this.bytes_=i,this.position_=0};O.ByteBuffer.allocate=function(i){return new O.ByteBuffer(new Uint8Array(i))};O.ByteBuffer.prototype.clear=function(){this.position_=0};O.ByteBuffer.prototype.bytes=function(){return this.bytes_};O.ByteBuffer.prototype.position=function(){return this.position_};O.ByteBuffer.prototype.setPosition=function(i){this.position_=i};O.ByteBuffer.prototype.capacity=function(){return this.bytes_.length};O.ByteBuffer.prototype.readInt8=function(i){return this.readUint8(i)<<24>>24};O.ByteBuffer.prototype.readUint8=function(i){return this.bytes_[i]};O.ByteBuffer.prototype.readInt16=function(i){return this.readUint16(i)<<16>>16};O.ByteBuffer.prototype.readUint16=function(i){return this.bytes_[i]|this.bytes_[i+1]<<8};O.ByteBuffer.prototype.readInt32=function(i){return this.bytes_[i]|this.bytes_[i+1]<<8|this.bytes_[i+2]<<16|this.bytes_[i+3]<<24};O.ByteBuffer.prototype.readUint32=function(i){return this.readInt32(i)>>>0};O.ByteBuffer.prototype.readInt64=function(i){return new O.Long(this.readInt32(i),this.readInt32(i+4))};O.ByteBuffer.prototype.readUint64=function(i){return new O.Long(this.readUint32(i),this.readUint32(i+4))};O.ByteBuffer.prototype.readFloat32=function(i){return O.int32[0]=this.readInt32(i),O.float32[0]};O.ByteBuffer.prototype.readFloat64=function(i){return O.int32[O.isLittleEndian?0:1]=this.readInt32(i),O.int32[O.isLittleEndian?1:0]=this.readInt32(i+4),O.float64[0]};O.ByteBuffer.prototype.writeInt8=function(i,e){this.bytes_[i]=e};O.ByteBuffer.prototype.writeUint8=function(i,e){this.bytes_[i]=e};O.ByteBuffer.prototype.writeInt16=function(i,e){this.bytes_[i]=e,this.bytes_[i+1]=e>>8};O.ByteBuffer.prototype.writeUint16=function(i,e){this.bytes_[i]=e,this.bytes_[i+1]=e>>8};O.ByteBuffer.prototype.writeInt32=function(i,e){this.bytes_[i]=e,this.bytes_[i+1]=e>>8,this.bytes_[i+2]=e>>16,this.bytes_[i+3]=e>>24};O.ByteBuffer.prototype.writeUint32=function(i,e){this.bytes_[i]=e,this.bytes_[i+1]=e>>8,this.bytes_[i+2]=e>>16,this.bytes_[i+3]=e>>24};O.ByteBuffer.prototype.writeInt64=function(i,e){this.writeInt32(i,e.low),this.writeInt32(i+4,e.high)};O.ByteBuffer.prototype.writeUint64=function(i,e){this.writeUint32(i,e.low),this.writeUint32(i+4,e.high)};O.ByteBuffer.prototype.writeFloat32=function(i,e){O.float32[0]=e,this.writeInt32(i,O.int32[0])};O.ByteBuffer.prototype.writeFloat64=function(i,e){O.float64[0]=e,this.writeInt32(i,O.int32[O.isLittleEndian?0:1]),this.writeInt32(i+4,O.int32[O.isLittleEndian?1:0])};O.ByteBuffer.prototype.getBufferIdentifier=function(){if(this.bytes_.length<this.position_+O.SIZEOF_INT+O.FILE_IDENTIFIER_LENGTH)throw new Error("FlatBuffers: ByteBuffer is too short to contain an identifier.");for(var i="",e=0;e<O.FILE_IDENTIFIER_LENGTH;e++)i+=String.fromCharCode(this.readInt8(this.position_+O.SIZEOF_INT+e));return i};O.ByteBuffer.prototype.__offset=function(i,e){var t=i-this.readInt32(i);return e<this.readInt16(t)?this.readInt16(t+e):0};O.ByteBuffer.prototype.__union=function(i,e){return i.bb_pos=e+this.readInt32(e),i.bb=this,i};O.ByteBuffer.prototype.__string=function(i,e){i+=this.readInt32(i);var t=this.readInt32(i),r="",n=0;if(i+=O.SIZEOF_INT,e===O.Encoding.UTF8_BYTES)return this.bytes_.subarray(i,i+t);for(;n<t;){var s,c=this.readUint8(i+n++);if(c<192)s=c;else{var _=this.readUint8(i+n++);if(c<224)s=(c&31)<<6|_&63;else{var v=this.readUint8(i+n++);if(c<240)s=(c&15)<<12|(_&63)<<6|v&63;else{var T=this.readUint8(i+n++);s=(c&7)<<18|(_&63)<<12|(v&63)<<6|T&63}}}s<65536?r+=String.fromCharCode(s):(s-=65536,r+=String.fromCharCode((s>>10)+55296,(s&(1<<10)-1)+56320))}return r};O.ByteBuffer.prototype.__indirect=function(i){return i+this.readInt32(i)};O.ByteBuffer.prototype.__vector=function(i){return i+this.readInt32(i)+O.SIZEOF_INT};O.ByteBuffer.prototype.__vector_len=function(i){return this.readInt32(i+this.readInt32(i))};O.ByteBuffer.prototype.__has_identifier=function(i){if(i.length!=O.FILE_IDENTIFIER_LENGTH)throw new Error("FlatBuffers: file identifier must be length "+O.FILE_IDENTIFIER_LENGTH);for(var e=0;e<O.FILE_IDENTIFIER_LENGTH;e++)if(i.charCodeAt(e)!=this.readInt8(this.position_+O.SIZEOF_INT+e))return!1;return!0};O.ByteBuffer.prototype.createLong=function(i,e){return O.Long.create(i,e)};a_.flatbuffers=O});var Mr=C(un=>{"use strict";Object.defineProperty(un,"__esModule",{value:!0});un.encodeUtf8=un.decodeUtf8=void 0;var mS=new TextDecoder("utf-8");un.decodeUtf8=i=>mS.decode(i);var bS=new TextEncoder;un.encodeUtf8=i=>bS.encode(i)});var cn=C(yt=>{"use strict";Object.defineProperty(yt,"__esModule",{value:!0});yt.AsyncQueue=yt.ReadableInterop=yt.ArrowJSON=yt.ITERATOR_DONE=void 0;var ps=at(),u_=ys();yt.ITERATOR_DONE=Object.freeze({done:!0,value:void 0});var c_=class{constructor(e){this._json=e}get schema(){return this._json.schema}get batches(){return this._json.batches||[]}get dictionaries(){return this._json.dictionaries||[]}};yt.ArrowJSON=c_;var Cu=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())}};yt.ReadableInterop=Cu;var l_=class extends Cu{constructor(){super();this._values=[],this.resolvers=[],this._closedPromise=new Promise(e=>this._closedPromiseResolve=e)}get closed(){return this._closedPromise}cancel(e){return ps.__awaiter(this,void 0,void 0,function*(){yield 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(yt.ITERATOR_DONE);this._closedPromiseResolve(),this._closedPromiseResolve=void 0}}[Symbol.asyncIterator](){return this}toDOMStream(e){return u_.default.toDOMStream(this._closedPromiseResolve||this._error?this:this._values,e)}toNodeStream(e){return u_.default.toNodeStream(this._closedPromiseResolve||this._error?this:this._values,e)}throw(e){return ps.__awaiter(this,void 0,void 0,function*(){return yield this.abort(e),yt.ITERATOR_DONE})}return(e){return ps.__awaiter(this,void 0,void 0,function*(){return yield this.close(),yt.ITERATOR_DONE})}read(e){return ps.__awaiter(this,void 0,void 0,function*(){return(yield this.next(e,"read")).value})}peek(e){return ps.__awaiter(this,void 0,void 0,function*(){return(yield 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,r)=>{this.resolvers.push({resolve:t,reject:r})}):Promise.resolve(yt.ITERATOR_DONE)}_ensureOpen(){if(this._closedPromiseResolve)return!0;throw new Error("AsyncQueue is closed")}};yt.AsyncQueue=l_});var ut=C(z=>{"use strict";Object.defineProperty(z,"__esModule",{value:!0});z.isReadableNodeStream=z.isWritableNodeStream=z.isReadableDOMStream=z.isWritableDOMStream=z.isFetchResponse=z.isFSReadStream=z.isFileHandle=z.isUnderlyingSink=z.isIteratorResult=z.isArrayLike=z.isArrowJSON=z.isAsyncIterable=z.isIterable=z.isObservable=z.isPromise=z.isObject=z.BigUint64ArrayAvailable=z.BigUint64Array=z.BigInt64ArrayAvailable=z.BigInt64Array=z.BigIntAvailable=z.BigInt=void 0;var jo=cn(),[gS,vS]=(()=>{let i=()=>{throw new Error("BigInt is not available in this environment")};function e(){throw i()}return e.asIntN=()=>{throw i()},e.asUintN=()=>{throw i()},typeof BigInt!="undefined"?[BigInt,!0]:[e,!1]})();z.BigInt=gS;z.BigIntAvailable=vS;var[jS,wS]=(()=>{let i=()=>{throw new Error("BigInt64Array is not available in this environment")};class e{static get BYTES_PER_ELEMENT(){return 8}static of(){throw i()}static from(){throw i()}constructor(){throw i()}}return typeof BigInt64Array!="undefined"?[BigInt64Array,!0]:[e,!1]})();z.BigInt64Array=jS;z.BigInt64ArrayAvailable=wS;var[BS,IS]=(()=>{let i=()=>{throw new Error("BigUint64Array is not available in this environment")};class e{static get BYTES_PER_ELEMENT(){return 8}static of(){throw i()}static from(){throw i()}constructor(){throw i()}}return typeof BigUint64Array!="undefined"?[BigUint64Array,!0]:[e,!1]})();z.BigUint64Array=BS;z.BigUint64ArrayAvailable=IS;var Uu=i=>typeof i=="number",d_=i=>typeof i=="boolean",rt=i=>typeof i=="function";z.isObject=i=>i!=null&&Object(i)===i;z.isPromise=i=>z.isObject(i)&&rt(i.then);z.isObservable=i=>z.isObject(i)&&rt(i.subscribe);z.isIterable=i=>z.isObject(i)&&rt(i[Symbol.iterator]);z.isAsyncIterable=i=>z.isObject(i)&&rt(i[Symbol.asyncIterator]);z.isArrowJSON=i=>z.isObject(i)&&z.isObject(i.schema);z.isArrayLike=i=>z.isObject(i)&&Uu(i.length);z.isIteratorResult=i=>z.isObject(i)&&"done"in i&&"value"in i;z.isUnderlyingSink=i=>z.isObject(i)&&rt(i.abort)&&rt(i.close)&&rt(i.start)&&rt(i.write);z.isFileHandle=i=>z.isObject(i)&&rt(i.stat)&&Uu(i.fd);z.isFSReadStream=i=>z.isReadableNodeStream(i)&&Uu(i.bytesRead);z.isFetchResponse=i=>z.isObject(i)&&z.isReadableDOMStream(i.body);z.isWritableDOMStream=i=>z.isObject(i)&&rt(i.abort)&&rt(i.getWriter)&&!(i instanceof jo.ReadableInterop);z.isReadableDOMStream=i=>z.isObject(i)&&rt(i.cancel)&&rt(i.getReader)&&!(i instanceof jo.ReadableInterop);z.isWritableNodeStream=i=>z.isObject(i)&&rt(i.end)&&rt(i.write)&&d_(i.writable)&&!(i instanceof jo.ReadableInterop);z.isReadableNodeStream=i=>z.isObject(i)&&rt(i.read)&&rt(i.pipe)&&d_(i.readable)&&!(i instanceof jo.ReadableInterop)});var Ge=C(x=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0});x.compareArrayLike=x.rebaseValueOffsets=x.toUint8ClampedArrayAsyncIterator=x.toFloat64ArrayAsyncIterator=x.toFloat32ArrayAsyncIterator=x.toUint32ArrayAsyncIterator=x.toUint16ArrayAsyncIterator=x.toUint8ArrayAsyncIterator=x.toInt32ArrayAsyncIterator=x.toInt16ArrayAsyncIterator=x.toInt8ArrayAsyncIterator=x.toArrayBufferViewAsyncIterator=x.toUint8ClampedArrayIterator=x.toFloat64ArrayIterator=x.toFloat32ArrayIterator=x.toUint32ArrayIterator=x.toUint16ArrayIterator=x.toUint8ArrayIterator=x.toInt32ArrayIterator=x.toInt16ArrayIterator=x.toInt8ArrayIterator=x.toArrayBufferViewIterator=x.toUint8ClampedArray=x.toFloat64Array=x.toFloat32Array=x.toBigUint64Array=x.toUint32Array=x.toUint16Array=x.toUint8Array=x.toBigInt64Array=x.toInt32Array=x.toInt16Array=x.toInt8Array=x.toArrayBufferView=x.joinUint8Arrays=x.memcpy=void 0;var ze=at(),TS=Bi(),SS=Mr(),DS=TS.flatbuffers.ByteBuffer,Cr=ut(),Vu=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:ArrayBuffer;function AS(i){let e=i[0]?[i[0]]:[],t,r,n,s;for(let c,_,v=0,T=0,A=i.length;++v<A;){if(c=e[T],_=i[v],!c||!_||c.buffer!==_.buffer||_.byteOffset<c.byteOffset){_&&(e[++T]=_);continue}if({byteOffset:t,byteLength:n}=c,{byteOffset:r,byteLength:s}=_,t+n<r||r+s<t){_&&(e[++T]=_);continue}e[T]=new Uint8Array(c.buffer,t,r-t+s)}return e}function ku(i,e,t=0,r=e.byteLength){let n=i.byteLength,s=new Uint8Array(i.buffer,i.byteOffset,n),c=new Uint8Array(e.buffer,e.byteOffset,Math.min(r,n));return s.set(c,t),i}x.memcpy=ku;function OS(i,e){let t=AS(i),r=t.reduce((A,P)=>A+P.byteLength,0),n,s,c,_=0,v=-1,T=Math.min(e||1/0,r);for(let A=t.length;++v<A;){if(n=t[v],s=n.subarray(0,Math.min(n.length,T-_)),T<=_+s.length){s.length<n.length?t[v]=n.subarray(s.length):s.length===n.length&&v++,c?ku(c,s,_):c=s;break}ku(c||(c=new Uint8Array(T)),s,_),_+=s.length}return[c||new Uint8Array(0),t.slice(v),r-(c?c.byteLength:0)]}x.joinUint8Arrays=OS;function ft(i,e){let t=Cr.isIteratorResult(e)?e.value:e;return t instanceof i?i===Uint8Array?new i(t.buffer,t.byteOffset,t.byteLength):t:t?(typeof t=="string"&&(t=SS.encodeUtf8(t)),t instanceof ArrayBuffer?new i(t):t instanceof Vu?new i(t):t instanceof DS?ft(i,t.bytes()):ArrayBuffer.isView(t)?t.byteLength<=0?new i(0):new i(t.buffer,t.byteOffset,t.byteLength/i.BYTES_PER_ELEMENT):i.from(t)):new i(0)}x.toArrayBufferView=ft;x.toInt8Array=i=>ft(Int8Array,i);x.toInt16Array=i=>ft(Int16Array,i);x.toInt32Array=i=>ft(Int32Array,i);x.toBigInt64Array=i=>ft(Cr.BigInt64Array,i);x.toUint8Array=i=>ft(Uint8Array,i);x.toUint16Array=i=>ft(Uint16Array,i);x.toUint32Array=i=>ft(Uint32Array,i);x.toBigUint64Array=i=>ft(Cr.BigUint64Array,i);x.toFloat32Array=i=>ft(Float32Array,i);x.toFloat64Array=i=>ft(Float64Array,i);x.toUint8ClampedArray=i=>ft(Uint8ClampedArray,i);var Ru=i=>(i.next(),i);function*ei(i,e){let t=function*(n){yield n},r=typeof e=="string"||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof Vu?t(e):Cr.isIterable(e)?e:t(e);return yield*Ru(function*(n){let s=null;do s=n.next(yield ft(i,s));while(!s.done)}(r[Symbol.iterator]())),new i}x.toArrayBufferViewIterator=ei;x.toInt8ArrayIterator=i=>ei(Int8Array,i);x.toInt16ArrayIterator=i=>ei(Int16Array,i);x.toInt32ArrayIterator=i=>ei(Int32Array,i);x.toUint8ArrayIterator=i=>ei(Uint8Array,i);x.toUint16ArrayIterator=i=>ei(Uint16Array,i);x.toUint32ArrayIterator=i=>ei(Uint32Array,i);x.toFloat32ArrayIterator=i=>ei(Float32Array,i);x.toFloat64ArrayIterator=i=>ei(Float64Array,i);x.toUint8ClampedArrayIterator=i=>ei(Uint8ClampedArray,i);function zt(i,e){return ze.__asyncGenerator(this,arguments,function*(){if(Cr.isPromise(e))return yield ze.__await(yield ze.__await(yield*ze.__asyncDelegator(ze.__asyncValues(zt(i,yield ze.__await(e))))));let r=function(c){return ze.__asyncGenerator(this,arguments,function*(){yield yield ze.__await(yield ze.__await(c))})},n=function(c){return ze.__asyncGenerator(this,arguments,function*(){yield ze.__await(yield*ze.__asyncDelegator(ze.__asyncValues(Ru(function*(_){let v=null;do v=_.next(yield v==null?void 0:v.value);while(!v.done)}(c[Symbol.iterator]())))))})},s=typeof e=="string"||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof Vu?r(e):Cr.isIterable(e)?n(e):Cr.isAsyncIterable(e)?e:r(e);return yield ze.__await(yield*ze.__asyncDelegator(ze.__asyncValues(Ru(function(c){return ze.__asyncGenerator(this,arguments,function*(){let _=null;do _=yield ze.__await(c.next(yield yield ze.__await(ft(i,_))));while(!_.done)})}(s[Symbol.asyncIterator]()))))),yield ze.__await(new i)})}x.toArrayBufferViewAsyncIterator=zt;x.toInt8ArrayAsyncIterator=i=>zt(Int8Array,i);x.toInt16ArrayAsyncIterator=i=>zt(Int16Array,i);x.toInt32ArrayAsyncIterator=i=>zt(Int32Array,i);x.toUint8ArrayAsyncIterator=i=>zt(Uint8Array,i);x.toUint16ArrayAsyncIterator=i=>zt(Uint16Array,i);x.toUint32ArrayAsyncIterator=i=>zt(Uint32Array,i);x.toFloat32ArrayAsyncIterator=i=>zt(Float32Array,i);x.toFloat64ArrayAsyncIterator=i=>zt(Float64Array,i);x.toUint8ClampedArrayAsyncIterator=i=>zt(Uint8ClampedArray,i);function FS(i,e,t){if(i!==0){t=t.slice(0,e+1);for(let r=-1;++r<=e;)t[r]+=i}return t}x.rebaseValueOffsets=FS;function MS(i,e){let t=0,r=i.length;if(r!==e.length)return!1;if(r>0)do if(i[t]!==e[t])return!1;while(++t<r);return!0}x.compareArrayLike=MS});var ys=C(Nu=>{"use strict";Object.defineProperty(Nu,"__esModule",{value:!0});var ve=at(),ht=Ge();Nu.default={fromIterable(i){return wo(CS(i))},fromAsyncIterable(i){return wo(US(i))},fromDOMStream(i){return wo(VS(i))},fromNodeStream(i){return wo(kS(i))},toDOMStream(i,e){throw new Error('"toDOMStream" not available in this environment')},toNodeStream(i,e){throw new Error('"toNodeStream" not available in this environment')}};var wo=i=>(i.next(),i);function*CS(i){let e,t=!1,r=[],n,s,c,_=0;function v(){return s==="peek"?ht.joinUint8Arrays(r,c)[0]:([n,r,_]=ht.joinUint8Arrays(r,c),n)}({cmd:s,size:c}=yield null);let T=ht.toUint8ArrayIterator(i)[Symbol.iterator]();try{do if({done:e,value:n}=isNaN(c-_)?T.next(void 0):T.next(c-_),!e&&n.byteLength>0&&(r.push(n),_+=n.byteLength),e||c<=_)do({cmd:s,size:c}=yield v());while(c<_);while(!e)}catch(A){(t=!0)&&typeof T.throw=="function"&&T.throw(A)}finally{t===!1&&typeof T.return=="function"&&T.return(null)}return null}function US(i){return ve.__asyncGenerator(this,arguments,function*(){let t,r=!1,n=[],s,c,_,v=0;function T(){return c==="peek"?ht.joinUint8Arrays(n,_)[0]:([s,n,v]=ht.joinUint8Arrays(n,_),s)}({cmd:c,size:_}=yield yield ve.__await(null));let A=ht.toUint8ArrayAsyncIterator(i)[Symbol.asyncIterator]();try{do if({done:t,value:s}=isNaN(_-v)?yield ve.__await(A.next(void 0)):yield ve.__await(A.next(_-v)),!t&&s.byteLength>0&&(n.push(s),v+=s.byteLength),t||_<=v)do({cmd:c,size:_}=yield yield ve.__await(T()));while(_<v);while(!t)}catch(P){(r=!0)&&typeof A.throw=="function"&&(yield ve.__await(A.throw(P)))}finally{r===!1&&typeof A.return=="function"&&(yield ve.__await(A.return(new Uint8Array(0))))}return yield ve.__await(null)})}function VS(i){return ve.__asyncGenerator(this,arguments,function*(){let t=!1,r=!1,n=[],s,c,_,v=0;function T(){return c==="peek"?ht.joinUint8Arrays(n,_)[0]:([s,n,v]=ht.joinUint8Arrays(n,_),s)}({cmd:c,size:_}=yield yield ve.__await(null));let A=new f_(i);try{do if({done:t,value:s}=isNaN(_-v)?yield ve.__await(A.read(void 0)):yield ve.__await(A.read(_-v)),!t&&s.byteLength>0&&(n.push(ht.toUint8Array(s)),v+=s.byteLength),t||_<=v)do({cmd:c,size:_}=yield yield ve.__await(T()));while(_<v);while(!t)}catch(P){(r=!0)&&(yield ve.__await(A.cancel(P)))}finally{r===!1?yield ve.__await(A.cancel()):i.locked&&A.releaseLock()}return yield ve.__await(null)})}var f_=class{constructor(e){this.source=e,this.byobReader=null,this.defaultReader=null;try{this.supportsBYOB=!!(this.reader=this.getBYOBReader())}catch(t){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}cancel(e){return ve.__awaiter(this,void 0,void 0,function*(){let{reader:t,source:r}=this;t&&(yield t.cancel(e).catch(()=>{})),r&&r.locked&&this.releaseLock()})}read(e){return ve.__awaiter(this,void 0,void 0,function*(){if(e===0)return{done:this.reader==null,value:new Uint8Array(0)};let t=!this.supportsBYOB||typeof e!="number"?yield this.getDefaultReader().read():yield this.readFromBYOBReader(e);return!t.done&&(t.value=ht.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}readFromBYOBReader(e){return ve.__awaiter(this,void 0,void 0,function*(){return yield h_(this.getBYOBReader(),new ArrayBuffer(e),0,e)})}};function h_(i,e,t,r){return ve.__awaiter(this,void 0,void 0,function*(){if(t>=r)return{done:!1,value:new Uint8Array(e,0,r)};let{done:n,value:s}=yield i.read(new Uint8Array(e,t,r-t));return(t+=s.byteLength)<r&&!n?yield h_(i,s.buffer,t,r):{done:n,value:new Uint8Array(s.buffer,0,t)}})}var Eu=(i,e)=>{let t=n=>r([e,n]),r;return[e,t,new Promise(n=>(r=n)&&i.once(e,t))]};function kS(i){return ve.__asyncGenerator(this,arguments,function*(){let t=[],r="error",n=!1,s=null,c,_,v=0,T=[],A;function P(){return c==="peek"?ht.joinUint8Arrays(T,_)[0]:([A,T,v]=ht.joinUint8Arrays(T,_),A)}if({cmd:c,size:_}=yield yield ve.__await(null),i.isTTY)return yield yield ve.__await(new Uint8Array(0)),yield ve.__await(null);try{t[0]=Eu(i,"end"),t[1]=Eu(i,"error");do{if(t[2]=Eu(i,"readable"),[r,s]=yield ve.__await(Promise.race(t.map(J=>J[2]))),r==="error")break;if((n=r==="end")||(isFinite(_-v)?(A=ht.toUint8Array(i.read(_-v)),A.byteLength<_-v&&(A=ht.toUint8Array(i.read(void 0)))):A=ht.toUint8Array(i.read(void 0)),A.byteLength>0&&(T.push(A),v+=A.byteLength)),n||_<=v)do({cmd:c,size:_}=yield yield ve.__await(P()));while(_<v)}while(!n)}finally{yield ve.__await(q(t,r==="error"?s:null))}return yield ve.__await(null);function q(J,Ce){return A=T=null,new Promise((Te,qt)=>{for(let[lt,cs]of J)i.off(lt,cs);try{let lt=i.destroy;lt&<.call(i,Ce),Ce=void 0}catch(lt){Ce=lt||Ce}finally{Ce!=null?qt(Ce):Te()}})}})}});var Pe=C(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.Vector=ln.AbstractVector=void 0;var Bo=class{};ln.AbstractVector=Bo;ln.Vector=Bo;Bo.prototype.data=null});var Gi=C(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 Se=Bi(),RS;(function(i){i[i.V1=0]="V1",i[i.V2=1]="V2",i[i.V3=2]="V3",i[i.V4=3]="V4",i[i.V5=4]="V5"})(RS=N.MetadataVersion||(N.MetadataVersion={}));var ES;(function(i){i[i.UNUSED=0]="UNUSED",i[i.DICTIONARY_REPLACEMENT=1]="DICTIONARY_REPLACEMENT",i[i.COMPRESSED_BODY=2]="COMPRESSED_BODY"})(ES=N.Feature||(N.Feature={}));var Pu;(function(i){i[i.Sparse=0]="Sparse",i[i.Dense=1]="Dense"})(Pu=N.UnionMode||(N.UnionMode={}));var xu;(function(i){i[i.HALF=0]="HALF",i[i.SINGLE=1]="SINGLE",i[i.DOUBLE=2]="DOUBLE"})(xu=N.Precision||(N.Precision={}));var Lu;(function(i){i[i.DAY=0]="DAY",i[i.MILLISECOND=1]="MILLISECOND"})(Lu=N.DateUnit||(N.DateUnit={}));var Ur;(function(i){i[i.SECOND=0]="SECOND",i[i.MILLISECOND=1]="MILLISECOND",i[i.MICROSECOND=2]="MICROSECOND",i[i.NANOSECOND=3]="NANOSECOND"})(Ur=N.TimeUnit||(N.TimeUnit={}));var qu;(function(i){i[i.YEAR_MONTH=0]="YEAR_MONTH",i[i.DAY_TIME=1]="DAY_TIME"})(qu=N.IntervalUnit||(N.IntervalUnit={}));var zu;(function(i){i[i.NONE=0]="NONE",i[i.Null=1]="Null",i[i.Int=2]="Int",i[i.FloatingPoint=3]="FloatingPoint",i[i.Binary=4]="Binary",i[i.Utf8=5]="Utf8",i[i.Bool=6]="Bool",i[i.Decimal=7]="Decimal",i[i.Date=8]="Date",i[i.Time=9]="Time",i[i.Timestamp=10]="Timestamp",i[i.Interval=11]="Interval",i[i.List=12]="List",i[i.Struct_=13]="Struct_",i[i.Union=14]="Union",i[i.FixedSizeBinary=15]="FixedSizeBinary",i[i.FixedSizeList=16]="FixedSizeList",i[i.Map=17]="Map",i[i.Duration=18]="Duration",i[i.LargeBinary=19]="LargeBinary",i[i.LargeUtf8=20]="LargeUtf8",i[i.LargeList=21]="LargeList"})(zu=N.Type||(N.Type={}));var Wu;(function(i){i[i.DenseArray=0]="DenseArray"})(Wu=N.DictionaryKind||(N.DictionaryKind={}));var Hu;(function(i){i[i.Little=0]="Little",i[i.Big=1]="Big"})(Hu=N.Endianness||(N.Endianness={}));var Vr=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 Vr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsNull(e,t){return e.setPosition(e.position()+Se.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Vr).__init(e.readInt32(e.position())+e.position(),e)}static startNull(e){e.startObject(0)}static endNull(e){return e.endObject()}static createNull(e){return Vr.startNull(e),Vr.endNull(e)}};N.Null=Vr;var kr=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 kr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsStruct_(e,t){return e.setPosition(e.position()+Se.flatbuffers.SIZE_PREFIX_LENGTH),(t||new kr).__init(e.readInt32(e.position())+e.position(),e)}static startStruct_(e){e.startObject(0)}static endStruct_(e){return e.endObject()}static createStruct_(e){return kr.startStruct_(e),kr.endStruct_(e)}};N.Struct_=kr;var Rr=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 Rr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsList(e,t){return e.setPosition(e.position()+Se.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Rr).__init(e.readInt32(e.position())+e.position(),e)}static startList(e){e.startObject(0)}static endList(e){return e.endObject()}static createList(e){return Rr.startList(e),Rr.endList(e)}};N.List=Rr;var Er=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 Er).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsLargeList(e,t){return e.setPosition(e.position()+Se.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Er).__init(e.readInt32(e.position())+e.position(),e)}static startLargeList(e){e.startObject(0)}static endLargeList(e){return e.endObject()}static createLargeList(e){return Er.startLargeList(e),Er.endLargeList(e)}};N.LargeList=Er;var Li=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 Li).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFixedSizeList(e,t){return e.setPosition(e.position()+Se.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Li).__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 Li.startFixedSizeList(e),Li.addListSize(e,t),Li.endFixedSizeList(e)}};N.FixedSizeList=Li;var qi=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 qi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsMap(e,t){return e.setPosition(e.position()+Se.flatbuffers.SIZE_PREFIX_LENGTH),(t||new qi).__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 qi.startMap(e),qi.addKeysSorted(e,t),qi.endMap(e)}};N.Map=qi;var Ii=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 Ii).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsUnion(e,t){return e.setPosition(e.position()+Se.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Ii).__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):Pu.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,Pu.Sparse)}static addTypeIds(e,t){e.addFieldOffset(1,t,0)}static createTypeIdsVector(e,t){e.startVector(4,t.length,4);for(let r=t.length-1;r>=0;r--)e.addInt32(t[r]);return e.endVector()}static startTypeIdsVector(e,t){e.startVector(4,t,4)}static endUnion(e){return e.endObject()}static createUnion(e,t,r){return Ii.startUnion(e),Ii.addMode(e,t),Ii.addTypeIds(e,r),Ii.endUnion(e)}};N.Union=Ii;var ti=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 ti).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsInt(e,t){return e.setPosition(e.position()+Se.flatbuffers.SIZE_PREFIX_LENGTH),(t||new ti).__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,r){return ti.startInt(e),ti.addBitWidth(e,t),ti.addIsSigned(e,r),ti.endInt(e)}};N.Int=ti;var zi=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 zi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFloatingPoint(e,t){return e.setPosition(e.position()+Se.flatbuffers.SIZE_PREFIX_LENGTH),(t||new zi).__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):xu.HALF}static startFloatingPoint(e){e.startObject(1)}static addPrecision(e,t){e.addFieldInt16(0,t,xu.HALF)}static endFloatingPoint(e){return e.endObject()}static createFloatingPoint(e,t){return zi.startFloatingPoint(e),zi.addPrecision(e,t),zi.endFloatingPoint(e)}};N.FloatingPoint=zi;var Nr=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 Nr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsUtf8(e,t){return e.setPosition(e.position()+Se.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Nr).__init(e.readInt32(e.position())+e.position(),e)}static startUtf8(e){e.startObject(0)}static endUtf8(e){return e.endObject()}static createUtf8(e){return Nr.startUtf8(e),Nr.endUtf8(e)}};N.Utf8=Nr;var Pr=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 Pr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBinary(e,t){return e.setPosition(e.position()+Se.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Pr).__init(e.readInt32(e.position())+e.position(),e)}static startBinary(e){e.startObject(0)}static endBinary(e){return e.endObject()}static createBinary(e){return Pr.startBinary(e),Pr.endBinary(e)}};N.Binary=Pr;var xr=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 xr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsLargeUtf8(e,t){return e.setPosition(e.position()+Se.flatbuffers.SIZE_PREFIX_LENGTH),(t||new xr).__init(e.readInt32(e.position())+e.position(),e)}static startLargeUtf8(e){e.startObject(0)}static endLargeUtf8(e){return e.endObject()}static createLargeUtf8(e){return xr.startLargeUtf8(e),xr.endLargeUtf8(e)}};N.LargeUtf8=xr;var Lr=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 Lr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsLargeBinary(e,t){return e.setPosition(e.position()+Se.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Lr).__init(e.readInt32(e.position())+e.position(),e)}static startLargeBinary(e){e.startObject(0)}static endLargeBinary(e){return e.endObject()}static createLargeBinary(e){return Lr.startLargeBinary(e),Lr.endLargeBinary(e)}};N.LargeBinary=Lr;var Wi=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 Wi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFixedSizeBinary(e,t){return e.setPosition(e.position()+Se.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Wi).__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 Wi.startFixedSizeBinary(e),Wi.addByteWidth(e,t),Wi.endFixedSizeBinary(e)}};N.FixedSizeBinary=Wi;var qr=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 qr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBool(e,t){return e.setPosition(e.position()+Se.flatbuffers.SIZE_PREFIX_LENGTH),(t||new qr).__init(e.readInt32(e.position())+e.position(),e)}static startBool(e){e.startObject(0)}static endBool(e){return e.endObject()}static createBool(e){return qr.startBool(e),qr.endBool(e)}};N.Bool=qr;var ii=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 ii).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDecimal(e,t){return e.setPosition(e.position()+Se.flatbuffers.SIZE_PREFIX_LENGTH),(t||new ii).__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,r,n){return ii.startDecimal(e),ii.addPrecision(e,t),ii.addScale(e,r),ii.addBitWidth(e,n),ii.endDecimal(e)}};N.Decimal=ii;var Hi=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 Hi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDate(e,t){return e.setPosition(e.position()+Se.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Hi).__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):Lu.MILLISECOND}static startDate(e){e.startObject(1)}static addUnit(e,t){e.addFieldInt16(0,t,Lu.MILLISECOND)}static endDate(e){return e.endObject()}static createDate(e,t){return Hi.startDate(e),Hi.addUnit(e,t),Hi.endDate(e)}};N.Date=Hi;var Ti=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 Ti).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsTime(e,t){return e.setPosition(e.position()+Se.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Ti).__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):Ur.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,Ur.MILLISECOND)}static addBitWidth(e,t){e.addFieldInt32(1,t,32)}static endTime(e){return e.endObject()}static createTime(e,t,r){return Ti.startTime(e),Ti.addUnit(e,t),Ti.addBitWidth(e,r),Ti.endTime(e)}};N.Time=Ti;var Si=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 Si).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsTimestamp(e,t){return e.setPosition(e.position()+Se.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Si).__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):Ur.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,Ur.SECOND)}static addTimezone(e,t){e.addFieldOffset(1,t,0)}static endTimestamp(e){return e.endObject()}static createTimestamp(e,t,r){return Si.startTimestamp(e),Si.addUnit(e,t),Si.addTimezone(e,r),Si.endTimestamp(e)}};N.Timestamp=Si;var Yi=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 Yi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsInterval(e,t){return e.setPosition(e.position()+Se.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Yi).__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):qu.YEAR_MONTH}static startInterval(e){e.startObject(1)}static addUnit(e,t){e.addFieldInt16(0,t,qu.YEAR_MONTH)}static endInterval(e){return e.endObject()}static createInterval(e,t){return Yi.startInterval(e),Yi.addUnit(e,t),Yi.endInterval(e)}};N.Interval=Yi;var $i=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 $i).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDuration(e,t){return e.setPosition(e.position()+Se.flatbuffers.SIZE_PREFIX_LENGTH),(t||new $i).__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):Ur.MILLISECOND}static startDuration(e){e.startObject(1)}static addUnit(e,t){e.addFieldInt16(0,t,Ur.MILLISECOND)}static endDuration(e){return e.endObject()}static createDuration(e,t){return $i.startDuration(e),$i.addUnit(e,t),$i.endDuration(e)}};N.Duration=$i;var Wt=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 Wt).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsKeyValue(e,t){return e.setPosition(e.position()+Se.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Wt).__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,r){return Wt.startKeyValue(e),Wt.addKey(e,t),Wt.addValue(e,r),Wt.endKeyValue(e)}};N.KeyValue=Wt;var wt=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 wt).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDictionaryEncoding(e,t){return e.setPosition(e.position()+Se.flatbuffers.SIZE_PREFIX_LENGTH),(t||new wt).__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 ti).__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):Wu.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,Wu.DenseArray)}static endDictionaryEncoding(e){return e.endObject()}static createDictionaryEncoding(e,t,r,n,s){return wt.startDictionaryEncoding(e),wt.addId(e,t),wt.addIndexType(e,r),wt.addIsOrdered(e,n),wt.addDictionaryKind(e,s),wt.endDictionaryEncoding(e)}};N.DictionaryEncoding=wt;var ct=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 ct).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsField(e,t){return e.setPosition(e.position()+Se.flatbuffers.SIZE_PREFIX_LENGTH),(t||new ct).__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):zu.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 wt).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}children(e,t){let r=this.bb.__offset(this.bb_pos,14);return r?(t||new ct).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+r)+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 r=this.bb.__offset(this.bb_pos,16);return r?(t||new Wt).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+r)+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,zu.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 r=t.length-1;r>=0;r--)e.addOffset(t[r]);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 r=t.length-1;r>=0;r--)e.addOffset(t[r]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static endField(e){return e.endObject()}static createField(e,t,r,n,s,c,_,v){return ct.startField(e),ct.addName(e,t),ct.addNullable(e,r),ct.addTypeType(e,n),ct.addType(e,s),ct.addDictionary(e,c),ct.addChildren(e,_),ct.addCustomMetadata(e,v),ct.endField(e)}};N.Field=ct;var p_=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,r){return e.prep(8,16),e.writeInt64(r),e.writeInt64(t),e.offset()}};N.Buffer=p_;var Ht=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 Ht).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsSchema(e,t){return e.setPosition(e.position()+Se.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Ht).__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):Hu.Little}fields(e,t){let r=this.bb.__offset(this.bb_pos,6);return r?(t||new ct).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+r)+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 r=this.bb.__offset(this.bb_pos,8);return r?(t||new Wt).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+r)+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,Hu.Little)}static addFields(e,t){e.addFieldOffset(1,t,0)}static createFieldsVector(e,t){e.startVector(4,t.length,4);for(let r=t.length-1;r>=0;r--)e.addOffset(t[r]);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 r=t.length-1;r>=0;r--)e.addOffset(t[r]);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 r=t.length-1;r>=0;r--)e.addInt64(t[r]);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,r,n,s){return Ht.startSchema(e),Ht.addEndianness(e,t),Ht.addFields(e,r),Ht.addCustomMetadata(e,n),Ht.addFeatures(e,s),Ht.endSchema(e)}};N.Schema=Ht});var So=C(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 Io=Bi(),To=Gi(),Yu;(function(i){i[i.LZ4_FRAME=0]="LZ4_FRAME",i[i.ZSTD=1]="ZSTD"})(Yu=xe.CompressionType||(xe.CompressionType={}));var $u;(function(i){i[i.BUFFER=0]="BUFFER"})($u=xe.BodyCompressionMethod||(xe.BodyCompressionMethod={}));var Gu;(function(i){i[i.NONE=0]="NONE",i[i.Schema=1]="Schema",i[i.DictionaryBatch=2]="DictionaryBatch",i[i.RecordBatch=3]="RecordBatch",i[i.Tensor=4]="Tensor",i[i.SparseTensor=5]="SparseTensor"})(Gu=xe.MessageHeader||(xe.MessageHeader={}));var Ju=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,r){return e.prep(8,16),e.writeInt64(r),e.writeInt64(t),e.offset()}};xe.FieldNode=Ju;var ri=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 ri).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBodyCompression(e,t){return e.setPosition(e.position()+Io.flatbuffers.SIZE_PREFIX_LENGTH),(t||new ri).__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):Yu.LZ4_FRAME}method(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt8(this.bb_pos+e):$u.BUFFER}static startBodyCompression(e){e.startObject(2)}static addCodec(e,t){e.addFieldInt8(0,t,Yu.LZ4_FRAME)}static addMethod(e,t){e.addFieldInt8(1,t,$u.BUFFER)}static endBodyCompression(e){return e.endObject()}static createBodyCompression(e,t,r){return ri.startBodyCompression(e),ri.addCodec(e,t),ri.addMethod(e,r),ri.endBodyCompression(e)}};xe.BodyCompression=ri;var Bt=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 Bt).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsRecordBatch(e,t){return e.setPosition(e.position()+Io.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Bt).__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 r=this.bb.__offset(this.bb_pos,6);return r?(t||new Ju).__init(this.bb.__vector(this.bb_pos+r)+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 r=this.bb.__offset(this.bb_pos,8);return r?(t||new To.Buffer).__init(this.bb.__vector(this.bb_pos+r)+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 ri).__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,r,n,s){return Bt.startRecordBatch(e),Bt.addLength(e,t),Bt.addNodes(e,r),Bt.addBuffers(e,n),Bt.addCompression(e,s),Bt.endRecordBatch(e)}};xe.RecordBatch=Bt;var ni=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 ni).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDictionaryBatch(e,t){return e.setPosition(e.position()+Io.flatbuffers.SIZE_PREFIX_LENGTH),(t||new ni).__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 Bt).__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,r,n){return ni.startDictionaryBatch(e),ni.addId(e,t),ni.addData(e,r),ni.addIsDelta(e,n),ni.endDictionaryBatch(e)}};xe.DictionaryBatch=ni;var It=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 It).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsMessage(e,t){return e.setPosition(e.position()+Io.flatbuffers.SIZE_PREFIX_LENGTH),(t||new It).__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):To.MetadataVersion.V1}headerType(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readUint8(this.bb_pos+e):Gu.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 r=this.bb.__offset(this.bb_pos,12);return r?(t||new To.KeyValue).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+r)+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,To.MetadataVersion.V1)}static addHeaderType(e,t){e.addFieldInt8(1,t,Gu.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 r=t.length-1;r>=0;r--)e.addOffset(t[r]);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,r,n,s,c){return It.startMessage(e),It.addVersion(e,t),It.addHeaderType(e,r),It.addHeader(e,n),It.addBodyLength(e,s),It.addCustomMetadata(e,c),It.endMessage(e)}};xe.Message=It});var Be=C(Ue=>{"use strict";Object.defineProperty(Ue,"__esModule",{value:!0});Ue.BufferType=Ue.Type=Ue.MessageHeader=Ue.MetadataVersion=Ue.IntervalUnit=Ue.UnionMode=Ue.Precision=Ue.TimeUnit=Ue.DateUnit=void 0;var dn=Gi();Object.defineProperty(Ue,"DateUnit",{enumerable:!0,get:function(){return dn.DateUnit}});Object.defineProperty(Ue,"TimeUnit",{enumerable:!0,get:function(){return dn.TimeUnit}});Object.defineProperty(Ue,"Precision",{enumerable:!0,get:function(){return dn.Precision}});Object.defineProperty(Ue,"UnionMode",{enumerable:!0,get:function(){return dn.UnionMode}});Object.defineProperty(Ue,"IntervalUnit",{enumerable:!0,get:function(){return dn.IntervalUnit}});Object.defineProperty(Ue,"MetadataVersion",{enumerable:!0,get:function(){return dn.MetadataVersion}});var NS=So();Object.defineProperty(Ue,"MessageHeader",{enumerable:!0,get:function(){return NS.MessageHeader}});var PS;(function(i){i[i.NONE=0]="NONE",i[i.Null=1]="Null",i[i.Int=2]="Int",i[i.Float=3]="Float",i[i.Binary=4]="Binary",i[i.Utf8=5]="Utf8",i[i.Bool=6]="Bool",i[i.Decimal=7]="Decimal",i[i.Date=8]="Date",i[i.Time=9]="Time",i[i.Timestamp=10]="Timestamp",i[i.Interval=11]="Interval",i[i.List=12]="List",i[i.Struct=13]="Struct",i[i.Union=14]="Union",i[i.FixedSizeBinary=15]="FixedSizeBinary",i[i.FixedSizeList=16]="FixedSizeList",i[i.Map=17]="Map",i[i.Dictionary=-1]="Dictionary",i[i.Int8=-2]="Int8",i[i.Int16=-3]="Int16",i[i.Int32=-4]="Int32",i[i.Int64=-5]="Int64",i[i.Uint8=-6]="Uint8",i[i.Uint16=-7]="Uint16",i[i.Uint32=-8]="Uint32",i[i.Uint64=-9]="Uint64",i[i.Float16=-10]="Float16",i[i.Float32=-11]="Float32",i[i.Float64=-12]="Float64",i[i.DateDay=-13]="DateDay",i[i.DateMillisecond=-14]="DateMillisecond",i[i.TimestampSecond=-15]="TimestampSecond",i[i.TimestampMillisecond=-16]="TimestampMillisecond",i[i.TimestampMicrosecond=-17]="TimestampMicrosecond",i[i.TimestampNanosecond=-18]="TimestampNanosecond",i[i.TimeSecond=-19]="TimeSecond",i[i.TimeMillisecond=-20]="TimeMillisecond",i[i.TimeMicrosecond=-21]="TimeMicrosecond",i[i.TimeNanosecond=-22]="TimeNanosecond",i[i.DenseUnion=-23]="DenseUnion",i[i.SparseUnion=-24]="SparseUnion",i[i.IntervalDayTime=-25]="IntervalDayTime",i[i.IntervalYearMonth=-26]="IntervalYearMonth"})(PS=Ue.Type||(Ue.Type={}));var xS;(function(i){i[i.OFFSET=0]="OFFSET",i[i.DATA=1]="DATA",i[i.VALIDITY=2]="VALIDITY",i[i.TYPE=3]="TYPE"})(xS=Ue.BufferType||(Ue.BufferType={}))});var si=C(We=>{"use strict";Object.defineProperty(We,"__esModule",{value:!0});We.popcnt_uint32=We.popcnt_array=We.popcnt_bit_range=We.BitIterator=We.packBools=We.truncateBitmap=We.setBool=We.getBit=We.getBool=void 0;function y_(i,e,t,r){return(t&1<<r)!=0}We.getBool=y_;function __(i,e,t,r){return(t&1<<r)>>r}We.getBit=__;function LS(i,e,t){return t?!!(i[e>>3]|=1<<e%8)||!0:!(i[e>>3]&=~(1<<e%8))&&!1}We.setBool=LS;function qS(i,e,t){let r=t.byteLength+7&~7;if(i>0||t.byteLength<r){let n=new Uint8Array(r);return n.set(i%8==0?t.subarray(i>>3):m_(new Do(t,i,e,null,y_)).subarray(0,r)),n}return t}We.truncateBitmap=qS;function m_(i){let e=[],t=0,r=0,n=0;for(let c of i)c&&(n|=1<<r),++r==8&&(e[t++]=n,n=r=0);(t===0||r>0)&&(e[t++]=n);let s=new Uint8Array(e.length+7&~7);return s.set(e),s}We.packBools=m_;var Do=class{constructor(e,t,r,n,s){this.bytes=e,this.length=r,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}};We.BitIterator=Do;function Ku(i,e,t){if(t-e<=0)return 0;if(t-e<8){let s=0;for(let c of new Do(i,e,t-e,i,__))s+=c;return s}let r=t>>3<<3,n=e+(e%8==0?0:8-e%8);return Ku(i,e,n)+Ku(i,r,t)+b_(i,n>>3,r-n>>3)}We.popcnt_bit_range=Ku;function b_(i,e,t){let r=0,n=e|0,s=new DataView(i.buffer,i.byteOffset,i.byteLength),c=t===void 0?i.byteLength:n+t;for(;c-n>=4;)r+=Ao(s.getUint32(n)),n+=4;for(;c-n>=2;)r+=Ao(s.getUint16(n)),n+=2;for(;c-n>=1;)r+=Ao(s.getUint8(n)),n+=1;return r}We.popcnt_array=b_;function Ao(i){let e=i|0;return e=e-(e>>>1&1431655765),e=(e&858993459)+(e>>>2&858993459),(e+(e>>>4)&252645135)*16843009>>>24}We.popcnt_uint32=Ao});var me=C(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=Be(),Ve=class{static isNull(e){return(e==null?void 0:e.typeId)===L.Type.Null}static isInt(e){return(e==null?void 0:e.typeId)===L.Type.Int}static isFloat(e){return(e==null?void 0:e.typeId)===L.Type.Float}static isBinary(e){return(e==null?void 0:e.typeId)===L.Type.Binary}static isUtf8(e){return(e==null?void 0:e.typeId)===L.Type.Utf8}static isBool(e){return(e==null?void 0:e.typeId)===L.Type.Bool}static isDecimal(e){return(e==null?void 0:e.typeId)===L.Type.Decimal}static isDate(e){return(e==null?void 0:e.typeId)===L.Type.Date}static isTime(e){return(e==null?void 0:e.typeId)===L.Type.Time}static isTimestamp(e){return(e==null?void 0:e.typeId)===L.Type.Timestamp}static isInterval(e){return(e==null?void 0:e.typeId)===L.Type.Interval}static isList(e){return(e==null?void 0:e.typeId)===L.Type.List}static isStruct(e){return(e==null?void 0:e.typeId)===L.Type.Struct}static isUnion(e){return(e==null?void 0:e.typeId)===L.Type.Union}static isFixedSizeBinary(e){return(e==null?void 0:e.typeId)===L.Type.FixedSizeBinary}static isFixedSizeList(e){return(e==null?void 0:e.typeId)===L.Type.FixedSizeList}static isMap(e){return(e==null?void 0:e.typeId)===L.Type.Map}static isDictionary(e){return(e==null?void 0:e.typeId)===L.Type.Dictionary}get typeId(){return L.Type.NONE}};k.DataType=Ve;Ve[Symbol.toStringTag]=(i=>(i.children=null,i.ArrayType=Array,i[Symbol.toStringTag]="DataType"))(Ve.prototype);var Oo=class extends Ve{toString(){return"Null"}get typeId(){return L.Type.Null}};k.Null=Oo;Oo[Symbol.toStringTag]=(i=>i[Symbol.toStringTag]="Null")(Oo.prototype);var Tt=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=Tt;Tt[Symbol.toStringTag]=(i=>(i.isSigned=null,i.bitWidth=null,i[Symbol.toStringTag]="Int"))(Tt.prototype);var Zu=class extends Tt{constructor(){super(!0,8)}};k.Int8=Zu;var Xu=class extends Tt{constructor(){super(!0,16)}};k.Int16=Xu;var Qu=class extends Tt{constructor(){super(!0,32)}};k.Int32=Qu;var ec=class extends Tt{constructor(){super(!0,64)}};k.Int64=ec;var tc=class extends Tt{constructor(){super(!1,8)}};k.Uint8=tc;var ic=class extends Tt{constructor(){super(!1,16)}};k.Uint16=ic;var rc=class extends Tt{constructor(){super(!1,32)}};k.Uint32=rc;var nc=class extends Tt{constructor(){super(!1,64)}};k.Uint64=nc;Object.defineProperty(Zu.prototype,"ArrayType",{value:Int8Array});Object.defineProperty(Xu.prototype,"ArrayType",{value:Int16Array});Object.defineProperty(Qu.prototype,"ArrayType",{value:Int32Array});Object.defineProperty(ec.prototype,"ArrayType",{value:Int32Array});Object.defineProperty(tc.prototype,"ArrayType",{value:Uint8Array});Object.defineProperty(ic.prototype,"ArrayType",{value:Uint16Array});Object.defineProperty(rc.prototype,"ArrayType",{value:Uint32Array});Object.defineProperty(nc.prototype,"ArrayType",{value:Uint32Array});var zr=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=zr;zr[Symbol.toStringTag]=(i=>(i.precision=null,i[Symbol.toStringTag]="Float"))(zr.prototype);var sc=class extends zr{constructor(){super(L.Precision.HALF)}};k.Float16=sc;var oc=class extends zr{constructor(){super(L.Precision.SINGLE)}};k.Float32=oc;var ac=class extends zr{constructor(){super(L.Precision.DOUBLE)}};k.Float64=ac;Object.defineProperty(sc.prototype,"ArrayType",{value:Uint16Array});Object.defineProperty(oc.prototype,"ArrayType",{value:Float32Array});Object.defineProperty(ac.prototype,"ArrayType",{value:Float64Array});var Fo=class extends Ve{constructor(){super()}get typeId(){return L.Type.Binary}toString(){return"Binary"}};k.Binary=Fo;Fo[Symbol.toStringTag]=(i=>(i.ArrayType=Uint8Array,i[Symbol.toStringTag]="Binary"))(Fo.prototype);var Mo=class extends Ve{constructor(){super()}get typeId(){return L.Type.Utf8}toString(){return"Utf8"}};k.Utf8=Mo;Mo[Symbol.toStringTag]=(i=>(i.ArrayType=Uint8Array,i[Symbol.toStringTag]="Utf8"))(Mo.prototype);var Co=class extends Ve{constructor(){super()}get typeId(){return L.Type.Bool}toString(){return"Bool"}};k.Bool=Co;Co[Symbol.toStringTag]=(i=>(i.ArrayType=Uint8Array,i[Symbol.toStringTag]="Bool"))(Co.prototype);var Uo=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=Uo;Uo[Symbol.toStringTag]=(i=>(i.scale=null,i.precision=null,i.ArrayType=Uint32Array,i[Symbol.toStringTag]="Decimal"))(Uo.prototype);var fn=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_=fn;fn[Symbol.toStringTag]=(i=>(i.unit=null,i.ArrayType=Int32Array,i[Symbol.toStringTag]="Date"))(fn.prototype);var g_=class extends fn{constructor(){super(L.DateUnit.DAY)}};k.DateDay=g_;var v_=class extends fn{constructor(){super(L.DateUnit.MILLISECOND)}};k.DateMillisecond=v_;var Ji=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=Ji;Ji[Symbol.toStringTag]=(i=>(i.unit=null,i.bitWidth=null,i.ArrayType=Int32Array,i[Symbol.toStringTag]="Time"))(Ji.prototype);var j_=class extends Ji{constructor(){super(L.TimeUnit.SECOND,32)}};k.TimeSecond=j_;var w_=class extends Ji{constructor(){super(L.TimeUnit.MILLISECOND,32)}};k.TimeMillisecond=w_;var B_=class extends Ji{constructor(){super(L.TimeUnit.MICROSECOND,64)}};k.TimeMicrosecond=B_;var I_=class extends Ji{constructor(){super(L.TimeUnit.NANOSECOND,64)}};k.TimeNanosecond=I_;var Ki=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=Ki;Ki[Symbol.toStringTag]=(i=>(i.unit=null,i.timezone=null,i.ArrayType=Int32Array,i[Symbol.toStringTag]="Timestamp"))(Ki.prototype);var T_=class extends Ki{constructor(e){super(L.TimeUnit.SECOND,e)}};k.TimestampSecond=T_;var S_=class extends Ki{constructor(e){super(L.TimeUnit.MILLISECOND,e)}};k.TimestampMillisecond=S_;var D_=class extends Ki{constructor(e){super(L.TimeUnit.MICROSECOND,e)}};k.TimestampMicrosecond=D_;var A_=class extends Ki{constructor(e){super(L.TimeUnit.NANOSECOND,e)}};k.TimestampNanosecond=A_;var hn=class extends Ve{constructor(e){super();this.unit=e}get typeId(){return L.Type.Interval}toString(){return`Interval<${L.IntervalUnit[this.unit]}>`}};k.Interval=hn;hn[Symbol.toStringTag]=(i=>(i.unit=null,i.ArrayType=Int32Array,i[Symbol.toStringTag]="Interval"))(hn.prototype);var O_=class extends hn{constructor(){super(L.IntervalUnit.DAY_TIME)}};k.IntervalDayTime=O_;var F_=class extends hn{constructor(){super(L.IntervalUnit.YEAR_MONTH)}};k.IntervalYearMonth=F_;var Vo=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=Vo;Vo[Symbol.toStringTag]=(i=>(i.children=null,i[Symbol.toStringTag]="List"))(Vo.prototype);var ko=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=ko;ko[Symbol.toStringTag]=(i=>(i.children=null,i[Symbol.toStringTag]="Struct"))(ko.prototype);var pn=class extends Ve{constructor(e,t,r){super();this.mode=e,this.children=r,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=pn;pn[Symbol.toStringTag]=(i=>(i.mode=null,i.typeIds=null,i.children=null,i.typeIdToChildIndex=null,i.ArrayType=Int8Array,i[Symbol.toStringTag]="Union"))(pn.prototype);var M_=class extends pn{constructor(e,t){super(L.UnionMode.Dense,e,t)}};k.DenseUnion=M_;var C_=class extends pn{constructor(e,t){super(L.UnionMode.Sparse,e,t)}};k.SparseUnion=C_;var Ro=class extends Ve{constructor(e){super();this.byteWidth=e}get typeId(){return L.Type.FixedSizeBinary}toString(){return`FixedSizeBinary[${this.byteWidth}]`}};k.FixedSizeBinary=Ro;Ro[Symbol.toStringTag]=(i=>(i.byteWidth=null,i.ArrayType=Uint8Array,i[Symbol.toStringTag]="FixedSizeBinary"))(Ro.prototype);var Eo=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=Eo;Eo[Symbol.toStringTag]=(i=>(i.children=null,i.listSize=null,i[Symbol.toStringTag]="FixedSizeList"))(Eo.prototype);var No=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_=No;No[Symbol.toStringTag]=(i=>(i.children=null,i.keysSorted=null,i[Symbol.toStringTag]="Map_"))(No.prototype);var zS=(i=>()=>++i)(-1),Po=class extends Ve{constructor(e,t,r,n){super();this.indices=t,this.dictionary=e,this.isOrdered=n||!1,this.id=r==null?zS():typeof r=="number"?r:r.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=Po;Po[Symbol.toStringTag]=(i=>(i.id=null,i.indices=null,i.isOrdered=null,i.dictionary=null,i[Symbol.toStringTag]="Dictionary"))(Po.prototype);function WS(i){let e=i;switch(i.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=WS});var Yt=C(Wr=>{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});Wr.Data=Wr.kUnknownNullCount=void 0;var HS=si(),YS=si(),W=Be(),$S=me(),fe=Ge();Wr.kUnknownNullCount=-1;var ie=class{constructor(e,t,r,n,s,c,_){this.type=e,this.dictionary=_,this.offset=Math.floor(Math.max(t||0,0)),this.length=Math.floor(Math.max(r||0,0)),this._nullCount=Math.floor(Math.max(n||0,-1)),this.childData=(c||[]).map(T=>T instanceof ie?T:T.data);let v;s instanceof ie?(this.stride=s.stride,this.values=s.values,this.typeIds=s.typeIds,this.nullBitmap=s.nullBitmap,this.valueOffsets=s.valueOffsets):(this.stride=$S.strideForType(e),s&&((v=s[0])&&(this.valueOffsets=v),(v=s[1])&&(this.values=v),(v=s[2])&&(this.nullBitmap=v),(v=s[3])&&(this.typeIds=v)))}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:r,nullBitmap:n,typeIds:s}=this;return t&&(e+=t.byteLength),r&&(e+=r.byteLength),n&&(e+=n.byteLength),s&&(e+=s.byteLength),this.childData.reduce((c,_)=>c+_.byteLength,e)}get nullCount(){let e=this._nullCount,t;return e<=Wr.kUnknownNullCount&&(t=this.nullBitmap)&&(this._nullCount=e=this.length-YS.popcnt_bit_range(t,this.offset,this.offset+this.length)),e}clone(e,t=this.offset,r=this.length,n=this._nullCount,s=this,c=this.childData){return new ie(e,t,r,n,s,c,this.dictionary)}slice(e,t){let{stride:r,typeId:n,childData:s}=this,c=+(this._nullCount===0)-1,_=n===16?r:1,v=this._sliceBuffers(e,t,r,n);return this.clone(this.type,this.offset+e,t,c,v,!s.length||this.valueOffsets?s:this._sliceChildren(s,_*e,_*t))}_changeLengthAndBackfillNullBitmap(e){if(this.typeId===W.Type.Null)return this.clone(this.type,0,e,0);let{length:t,nullCount:r}=this,n=new Uint8Array((e+63&~63)>>3).fill(255,0,t>>3);n[t>>3]=(1<<t-(t&~7))-1,r>0&&n.set(HS.truncateBitmap(this.offset,t,this.nullBitmap),0);let s=this.buffers;return s[W.BufferType.VALIDITY]=n,this.clone(this.type,0,e,r+(e-t),s)}_sliceBuffers(e,t,r,n){let s,{buffers:c}=this;return(s=c[W.BufferType.TYPE])&&(c[W.BufferType.TYPE]=s.subarray(e,e+t)),(s=c[W.BufferType.OFFSET])&&(c[W.BufferType.OFFSET]=s.subarray(e,e+t+1))||(s=c[W.BufferType.DATA])&&(c[W.BufferType.DATA]=n===6?s:s.subarray(r*e,r*(e+t))),c}_sliceChildren(e,t,r){return e.map(n=>n.slice(t,r))}static new(e,t,r,n,s,c,_){switch(s instanceof ie?s=s.buffers:s||(s=[]),e.typeId){case W.Type.Null:return ie.Null(e,t,r);case W.Type.Int:return ie.Int(e,t,r,n||0,s[W.BufferType.VALIDITY],s[W.BufferType.DATA]||[]);case W.Type.Dictionary:return ie.Dictionary(e,t,r,n||0,s[W.BufferType.VALIDITY],s[W.BufferType.DATA]||[],_);case W.Type.Float:return ie.Float(e,t,r,n||0,s[W.BufferType.VALIDITY],s[W.BufferType.DATA]||[]);case W.Type.Bool:return ie.Bool(e,t,r,n||0,s[W.BufferType.VALIDITY],s[W.BufferType.DATA]||[]);case W.Type.Decimal:return ie.Decimal(e,t,r,n||0,s[W.BufferType.VALIDITY],s[W.BufferType.DATA]||[]);case W.Type.Date:return ie.Date(e,t,r,n||0,s[W.BufferType.VALIDITY],s[W.BufferType.DATA]||[]);case W.Type.Time:return ie.Time(e,t,r,n||0,s[W.BufferType.VALIDITY],s[W.BufferType.DATA]||[]);case W.Type.Timestamp:return ie.Timestamp(e,t,r,n||0,s[W.BufferType.VALIDITY],s[W.BufferType.DATA]||[]);case W.Type.Interval:return ie.Interval(e,t,r,n||0,s[W.BufferType.VALIDITY],s[W.BufferType.DATA]||[]);case W.Type.FixedSizeBinary:return ie.FixedSizeBinary(e,t,r,n||0,s[W.BufferType.VALIDITY],s[W.BufferType.DATA]||[]);case W.Type.Binary:return ie.Binary(e,t,r,n||0,s[W.BufferType.VALIDITY],s[W.BufferType.OFFSET]||[],s[W.BufferType.DATA]||[]);case W.Type.Utf8:return ie.Utf8(e,t,r,n||0,s[W.BufferType.VALIDITY],s[W.BufferType.OFFSET]||[],s[W.BufferType.DATA]||[]);case W.Type.List:return ie.List(e,t,r,n||0,s[W.BufferType.VALIDITY],s[W.BufferType.OFFSET]||[],(c||[])[0]);case W.Type.FixedSizeList:return ie.FixedSizeList(e,t,r,n||0,s[W.BufferType.VALIDITY],(c||[])[0]);case W.Type.Struct:return ie.Struct(e,t,r,n||0,s[W.BufferType.VALIDITY],c||[]);case W.Type.Map:return ie.Map(e,t,r,n||0,s[W.BufferType.VALIDITY],s[W.BufferType.OFFSET]||[],(c||[])[0]);case W.Type.Union:return ie.Union(e,t,r,n||0,s[W.BufferType.VALIDITY],s[W.BufferType.TYPE]||[],s[W.BufferType.OFFSET]||c,c)}throw new Error(`Unrecognized typeId ${e.typeId}`)}static Null(e,t,r){return new ie(e,t,r,0)}static Int(e,t,r,n,s,c){return new ie(e,t,r,n,[void 0,fe.toArrayBufferView(e.ArrayType,c),fe.toUint8Array(s)])}static Dictionary(e,t,r,n,s,c,_){return new ie(e,t,r,n,[void 0,fe.toArrayBufferView(e.indices.ArrayType,c),fe.toUint8Array(s)],[],_)}static Float(e,t,r,n,s,c){return new ie(e,t,r,n,[void 0,fe.toArrayBufferView(e.ArrayType,c),fe.toUint8Array(s)])}static Bool(e,t,r,n,s,c){return new ie(e,t,r,n,[void 0,fe.toArrayBufferView(e.ArrayType,c),fe.toUint8Array(s)])}static Decimal(e,t,r,n,s,c){return new ie(e,t,r,n,[void 0,fe.toArrayBufferView(e.ArrayType,c),fe.toUint8Array(s)])}static Date(e,t,r,n,s,c){return new ie(e,t,r,n,[void 0,fe.toArrayBufferView(e.ArrayType,c),fe.toUint8Array(s)])}static Time(e,t,r,n,s,c){return new ie(e,t,r,n,[void 0,fe.toArrayBufferView(e.ArrayType,c),fe.toUint8Array(s)])}static Timestamp(e,t,r,n,s,c){return new ie(e,t,r,n,[void 0,fe.toArrayBufferView(e.ArrayType,c),fe.toUint8Array(s)])}static Interval(e,t,r,n,s,c){return new ie(e,t,r,n,[void 0,fe.toArrayBufferView(e.ArrayType,c),fe.toUint8Array(s)])}static FixedSizeBinary(e,t,r,n,s,c){return new ie(e,t,r,n,[void 0,fe.toArrayBufferView(e.ArrayType,c),fe.toUint8Array(s)])}static Binary(e,t,r,n,s,c,_){return new ie(e,t,r,n,[fe.toInt32Array(c),fe.toUint8Array(_),fe.toUint8Array(s)])}static Utf8(e,t,r,n,s,c,_){return new ie(e,t,r,n,[fe.toInt32Array(c),fe.toUint8Array(_),fe.toUint8Array(s)])}static List(e,t,r,n,s,c,_){return new ie(e,t,r,n,[fe.toInt32Array(c),void 0,fe.toUint8Array(s)],_?[_]:[])}static FixedSizeList(e,t,r,n,s,c){return new ie(e,t,r,n,[void 0,void 0,fe.toUint8Array(s)],c?[c]:[])}static Struct(e,t,r,n,s,c){return new ie(e,t,r,n,[void 0,void 0,fe.toUint8Array(s)],c)}static Map(e,t,r,n,s,c,_){return new ie(e,t,r,n,[fe.toInt32Array(c),void 0,fe.toUint8Array(s)],_?[_]:[])}static Union(e,t,r,n,s,c,_,v){let T=[void 0,void 0,fe.toUint8Array(s),fe.toArrayBufferView(e.ArrayType,c)];return e.mode===W.UnionMode.Sparse?new ie(e,t,r,n,T,_):(T[W.BufferType.OFFSET]=fe.toInt32Array(_),new ie(e,t,r,n,T,v))}};Wr.Data=ie;ie.prototype.childData=Object.freeze([])});var uc=C(xo=>{"use strict";Object.defineProperty(xo,"__esModule",{value:!0});xo.valueToString=void 0;var GS=void 0;function JS(i){if(i===null)return"null";if(i===GS)return"undefined";switch(typeof i){case"number":return`${i}`;case"bigint":return`${i}`;case"string":return`"${i}"`}return typeof i[Symbol.toPrimitive]=="function"?i[Symbol.toPrimitive]("string"):ArrayBuffer.isView(i)?`[${i}]`:JSON.stringify(i)}xo.valueToString=JS});var U_=C(Lo=>{"use strict";Object.defineProperty(Lo,"__esModule",{value:!0});Lo.createIsValidFunction=void 0;var cc=uc(),KS=ut();function ZS(i){if(!i||i.length<=0)return function(n){return!0};let e="",t=i.filter(r=>r===r);return t.length>0&&(e=`
|
|
2
|
+
switch (x) {${t.map(r=>`
|
|
3
|
+
case ${XS(r)}:`).join("")}
|
|
4
|
+
return false;
|
|
5
|
+
}`),i.length!==t.length&&(e=`if (x !== x) return false;
|
|
6
|
+
${e}`),new Function("x",`${e}
|
|
7
|
+
return true;`)}Lo.createIsValidFunction=ZS;function XS(i){return typeof i!="bigint"?cc.valueToString(i):KS.BigIntAvailable?`${cc.valueToString(i)}n`:`"${cc.valueToString(i)}"`}});var Zi=C(St=>{"use strict";Object.defineProperty(St,"__esModule",{value:!0});St.WideBufferBuilder=St.OffsetsBufferBuilder=St.BitmapBufferBuilder=St.DataBufferBuilder=St.BufferBuilder=void 0;var V_=Ge(),lc=ut(),dc=(i,e)=>(i*e+63&~63||64)/e,QS=(i,e=0)=>i.length>=e?i.subarray(0,e):V_.memcpy(new i.constructor(e),i,0),_s=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,r=this.length*t,n=this.buffer.length;r>=n&&this._resize(n===0?dc(r*1,this.BYTES_PER_ELEMENT):dc(r*2,this.BYTES_PER_ELEMENT))}return this}flush(e=this.length){e=dc(e*this.stride,this.BYTES_PER_ELEMENT);let t=QS(this.buffer,e);return this.clear(),t}clear(){return this.length=0,this._resize(0),this}_resize(e){return this.buffer=V_.memcpy(new this.ArrayType(e),this.buffer)}};St.BufferBuilder=_s;_s.prototype.offset=0;var qo=class extends _s{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}};St.DataBufferBuilder=qo;var k_=class extends qo{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:r}=this.reserve(e-this.length+1),n=e>>3,s=e%8,c=r[n]>>s&1;return t?c===0&&(r[n]|=1<<s,++this.numValid):c===1&&(r[n]&=~(1<<s),--this.numValid),this}clear(){return this.numValid=0,super.clear()}};St.BitmapBufferBuilder=k_;var R_=class extends qo{constructor(e=new Int32Array(1)){super(e,1)}append(e){return this.set(this.length-1,e)}set(e,t){let r=this.length-1,n=this.reserve(e-r+1).buffer;return r<e++&&n.fill(n[r],r,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)}};St.OffsetsBufferBuilder=R_;var E_=class extends _s{get ArrayType64(){return this._ArrayType64||(this._ArrayType64=this.buffer instanceof Int32Array?lc.BigInt64Array:lc.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),r=t.byteLength/(this.BYTES_PER_ELEMENT*this.stride);return lc.BigIntAvailable&&(this.buffer64=new this.ArrayType64(t.buffer,t.byteOffset,r)),t}};St.WideBufferBuilder=E_});var ke=C(Xi=>{"use strict";Object.defineProperty(Xi,"__esModule",{value:!0});Xi.VariableWidthBuilder=Xi.FixedWidthBuilder=Xi.Builder=void 0;var yn=at(),eD=Pe(),_n=Be(),tD=Yt(),iD=U_(),fc=Zi(),rD=me(),Dt=class{constructor({type:e,nullValues:t}){this.length=0,this.finished=!1,this.type=e,this.children=[],this.nullValues=t,this.stride=rD.strideForType(e),this._nulls=new fc.BitmapBufferBuilder,t&&t.length>0&&(this._isValid=iD.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 nD(e)}static throughAsyncIterable(e){return sD(e)}toVector(){return eD.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,r)=>t+r.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,r)=>t+r.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,r=this._offsets,n=this._typeIds,{length:s,nullCount:c}=this;n?(e[_n.BufferType.TYPE]=n.flush(s),r&&(e[_n.BufferType.OFFSET]=r.flush(s))):r?(t&&(e[_n.BufferType.DATA]=t.flush(r.last())),e[_n.BufferType.OFFSET]=r.flush(s)):t&&(e[_n.BufferType.DATA]=t.flush(s)),c>0&&(e[_n.BufferType.VALIDITY]=this._nulls.flush(s));let _=tD.Data.new(this.type,0,s,c,e,this.children.map(v=>v.flush()));return this.clear(),_}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}};Xi.Builder=Dt;Dt.prototype.length=1;Dt.prototype.stride=1;Dt.prototype.children=null;Dt.prototype.finished=!1;Dt.prototype.nullValues=null;Dt.prototype._isValid=()=>!0;var N_=class extends Dt{constructor(e){super(e);this._values=new fc.DataBufferBuilder(new this.ArrayType(0),this.stride)}setValue(e,t){let r=this._values;return r.reserve(e-r.length+1),super.setValue(e,t)}};Xi.FixedWidthBuilder=N_;var P_=class extends Dt{constructor(e){super(e);this._pendingLength=0,this._offsets=new fc.OffsetsBufferBuilder}setValue(e,t){let r=this._pending||(this._pending=new Map),n=r.get(e);n&&(this._pendingLength-=n.length),this._pendingLength+=t.length,r.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}};Xi.VariableWidthBuilder=P_;function nD(i){let{["queueingStrategy"]:e="count"}=i,{["highWaterMark"]:t=e!=="bytes"?1e3:Math.pow(2,14)}=i,r=e!=="bytes"?"length":"byteLength";return function*(n){let s=0,c=Dt.new(i);for(let _ of n)c.append(_)[r]>=t&&++s&&(yield c.toVector());(c.finish().length>0||s===0)&&(yield c.toVector())}}function sD(i){let{["queueingStrategy"]:e="count"}=i,{["highWaterMark"]:t=e!=="bytes"?1e3:Math.pow(2,14)}=i,r=e!=="bytes"?"length":"byteLength";return function(n){return yn.__asyncGenerator(this,arguments,function*(){var s,c;let _=0,v=Dt.new(i);try{for(var T=yn.__asyncValues(n),A;A=yield yn.__await(T.next()),!A.done;){let P=A.value;v.append(P)[r]>=t&&++_&&(yield yield yn.__await(v.toVector()))}}catch(P){s={error:P}}finally{try{A&&!A.done&&(c=T.return)&&(yield yn.__await(c.call(T)))}finally{if(s)throw s.error}}(v.finish().length>0||_===0)&&(yield yield yn.__await(v.toVector()))})}}});var hc=C(zo=>{"use strict";Object.defineProperty(zo,"__esModule",{value:!0});zo.BoolBuilder=void 0;var oD=Zi(),aD=ke(),x_=class extends aD.Builder{constructor(e){super(e);this._values=new oD.BitmapBufferBuilder}setValue(e,t){this._values.set(e,+t)}};zo.BoolBuilder=x_});var pc=C(Wo=>{"use strict";Object.defineProperty(Wo,"__esModule",{value:!0});Wo.NullBuilder=void 0;var uD=ke(),L_=class extends uD.Builder{setValue(e,t){}setValid(e,t){return this.length=Math.max(e+1,this.length),t}};Wo.NullBuilder=L_});var yc=C(Qi=>{"use strict";Object.defineProperty(Qi,"__esModule",{value:!0});Qi.DateMillisecondBuilder=Qi.DateDayBuilder=Qi.DateBuilder=void 0;var cD=ke(),Ho=class extends cD.FixedWidthBuilder{};Qi.DateBuilder=Ho;var q_=class extends Ho{};Qi.DateDayBuilder=q_;var z_=class extends Ho{};Qi.DateMillisecondBuilder=z_});var _c=C(Yo=>{"use strict";Object.defineProperty(Yo,"__esModule",{value:!0});Yo.DecimalBuilder=void 0;var lD=ke(),W_=class extends lD.FixedWidthBuilder{};Yo.DecimalBuilder=W_});var bc=C($o=>{"use strict";Object.defineProperty($o,"__esModule",{value:!0});$o.DictionaryBuilder=void 0;var dD=me(),mc=ke(),H_=class extends mc.Builder{constructor({type:e,nullValues:t,dictionaryHashFunction:r}){super({type:new dD.Dictionary(e.dictionary,e.indices,e.id,e.isOrdered)});this._nulls=null,this._dictionaryOffset=0,this._keysToIndices=Object.create(null),this.indices=mc.Builder.new({type:this.type.indices,nullValues:t}),this.dictionary=mc.Builder.new({type:this.type.dictionary,nullValues:null}),typeof r=="function"&&(this.valueToKey=r)}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 r=this.indices;return t=r.setValid(e,t),this.length=r.length,t}setValue(e,t){let r=this._keysToIndices,n=this.valueToKey(t),s=r[n];return s===void 0&&(r[n]=s=this._dictionaryOffset+this.dictionary.append(t).length-1),this.indices.setValue(e,s)}flush(){let e=this.type,t=this._dictionary,r=this.dictionary.toVector(),n=this.indices.flush().clone(e);return n.dictionary=t?t.concat(r):r,this.finished||(this._dictionaryOffset+=r.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}`}};$o.DictionaryBuilder=H_});var gc=C(Go=>{"use strict";Object.defineProperty(Go,"__esModule",{value:!0});Go.FixedSizeBinaryBuilder=void 0;var fD=ke(),Y_=class extends fD.FixedWidthBuilder{};Go.FixedSizeBinaryBuilder=Y_});var ms=C(bn=>{"use strict";Object.defineProperty(bn,"__esModule",{value:!0});bn.float64ToUint16=bn.uint16ToFloat64=void 0;var $_=new Float64Array(1),mn=new Uint32Array($_.buffer);function hD(i){let e=(i&31744)>>10,t=(i&1023)/1024,r=Math.pow(-1,(i&32768)>>15);switch(e){case 31:return r*(t?NaN:1/0);case 0:return r*(t?6103515625e-14*t:0)}return r*Math.pow(2,e-15)*(1+t)}bn.uint16ToFloat64=hD;function pD(i){if(i!==i)return 32256;$_[0]=i;let e=(mn[1]&2147483648)>>16&65535,t=mn[1]&2146435072,r=0;return t>=1089470464?mn[0]>0?t=31744:(t=(t&2080374784)>>16,r=(mn[1]&1048575)>>10):t<=1056964608?(r=1048576+(mn[1]&1048575),r=1048576+(r<<(t>>20)-998)>>21,t=0):(t=t-1056964608>>10,r=(mn[1]&1048575)+512>>10),e|t|r&65535}bn.float64ToUint16=pD});var vc=C(oi=>{"use strict";Object.defineProperty(oi,"__esModule",{value:!0});oi.Float64Builder=oi.Float32Builder=oi.Float16Builder=oi.FloatBuilder=void 0;var yD=ms(),_D=ke(),bs=class extends _D.FixedWidthBuilder{};oi.FloatBuilder=bs;var G_=class extends bs{setValue(e,t){this._values.set(e,yD.float64ToUint16(t))}};oi.Float16Builder=G_;var J_=class extends bs{setValue(e,t){this._values.set(e,t)}};oi.Float32Builder=J_;var K_=class extends bs{setValue(e,t){this._values.set(e,t)}};oi.Float64Builder=K_});var js=C(Je=>{"use strict";Object.defineProperty(Je,"__esModule",{value:!0});Je.BN=Je.bignumToBigInt=Je.bignumToString=Je.isArrowBigNumSymbol=void 0;var mD=Ge(),gs=ut();Je.isArrowBigNumSymbol=Symbol.for("isArrowBigNum");function $t(i,...e){return e.length===0?Object.setPrototypeOf(mD.toArrayBufferView(this.TypedArray,i),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(i,...e),this.constructor.prototype)}$t.prototype[Je.isArrowBigNumSymbol]=!0;$t.prototype.toJSON=function(){return`"${Je.bignumToString(this)}"`};$t.prototype.valueOf=function(){return Z_(this)};$t.prototype.toString=function(){return Je.bignumToString(this)};$t.prototype[Symbol.toPrimitive]=function(i="default"){switch(i){case"number":return Z_(this);case"string":return Je.bignumToString(this);case"default":return Je.bignumToBigInt(this)}return Je.bignumToString(this)};function gn(...i){return $t.apply(this,i)}function vn(...i){return $t.apply(this,i)}function vs(...i){return $t.apply(this,i)}Object.setPrototypeOf(gn.prototype,Object.create(Int32Array.prototype));Object.setPrototypeOf(vn.prototype,Object.create(Uint32Array.prototype));Object.setPrototypeOf(vs.prototype,Object.create(Uint32Array.prototype));Object.assign(gn.prototype,$t.prototype,{constructor:gn,signed:!0,TypedArray:Int32Array,BigIntArray:gs.BigInt64Array});Object.assign(vn.prototype,$t.prototype,{constructor:vn,signed:!1,TypedArray:Uint32Array,BigIntArray:gs.BigUint64Array});Object.assign(vs.prototype,$t.prototype,{constructor:vs,signed:!0,TypedArray:Uint32Array,BigIntArray:gs.BigUint64Array});function Z_(i){let{buffer:e,byteOffset:t,length:r,signed:n}=i,s=new Int32Array(e,t,r),c=0,_=0,v=s.length,T,A;for(;_<v;)A=s[_++],T=s[_++],n||(T=T>>>0),c+=(A>>>0)+T*Math.pow(_,32);return c}gs.BigIntAvailable?(Je.bignumToBigInt=i=>i.byteLength===8?new i.BigIntArray(i.buffer,i.byteOffset,1)[0]:jc(i),Je.bignumToString=i=>i.byteLength===8?`${new i.BigIntArray(i.buffer,i.byteOffset,1)[0]}`:jc(i)):(Je.bignumToString=jc,Je.bignumToBigInt=Je.bignumToString);function jc(i){let e="",t=new Uint32Array(2),r=new Uint16Array(i.buffer,i.byteOffset,i.byteLength/2),n=new Uint32Array((r=new Uint16Array(r).reverse()).buffer),s=-1,c=r.length-1;do{for(t[0]=r[s=0];s<c;)r[s++]=t[1]=t[0]/10,t[0]=(t[0]-t[1]*10<<16)+r[s];r[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 Jo=class{static new(e,t){switch(t){case!0:return new gn(e);case!1:return new vn(e)}switch(e.constructor){case Int8Array:case Int16Array:case Int32Array:case gs.BigInt64Array:return new gn(e)}return e.byteLength===16?new vs(e):new vn(e)}static signed(e){return new gn(e)}static unsigned(e){return new vn(e)}static decimal(e){return new vs(e)}constructor(e,t){return Jo.new(e,t)}};Je.BN=Jo});var wc=C(He=>{"use strict";Object.defineProperty(He,"__esModule",{value:!0});He.Uint64Builder=He.Uint32Builder=He.Uint16Builder=He.Uint8Builder=He.Int64Builder=He.Int32Builder=He.Int16Builder=He.Int8Builder=He.IntBuilder=void 0;var bD=js(),X_=Zi(),gD=ut(),vD=ke(),ai=class extends vD.FixedWidthBuilder{setValue(e,t){this._values.set(e,t)}};He.IntBuilder=ai;var Q_=class extends ai{};He.Int8Builder=Q_;var em=class extends ai{};He.Int16Builder=em;var tm=class extends ai{};He.Int32Builder=tm;var im=class extends ai{constructor(e){e.nullValues&&(e.nullValues=e.nullValues.map(Ko));super(e);this._values=new X_.WideBufferBuilder(new Int32Array(0),2)}get values64(){return this._values.buffer64}isValid(e){return super.isValid(Ko(e))}};He.Int64Builder=im;var rm=class extends ai{};He.Uint8Builder=rm;var nm=class extends ai{};He.Uint16Builder=nm;var sm=class extends ai{};He.Uint32Builder=sm;var om=class extends ai{constructor(e){e.nullValues&&(e.nullValues=e.nullValues.map(Ko));super(e);this._values=new X_.WideBufferBuilder(new Uint32Array(0),2)}get values64(){return this._values.buffer64}isValid(e){return super.isValid(Ko(e))}};He.Uint64Builder=om;var Ko=(i=>e=>(ArrayBuffer.isView(e)&&(i.buffer=e.buffer,i.byteOffset=e.byteOffset,i.byteLength=e.byteLength,e=bD.bignumToBigInt(i),i.buffer=null),e))({BigIntArray:gD.BigInt64Array})});var Bc=C(At=>{"use strict";Object.defineProperty(At,"__esModule",{value:!0});At.TimeNanosecondBuilder=At.TimeMicrosecondBuilder=At.TimeMillisecondBuilder=At.TimeSecondBuilder=At.TimeBuilder=void 0;var jD=ke(),jn=class extends jD.FixedWidthBuilder{};At.TimeBuilder=jn;var am=class extends jn{};At.TimeSecondBuilder=am;var um=class extends jn{};At.TimeMillisecondBuilder=um;var cm=class extends jn{};At.TimeMicrosecondBuilder=cm;var lm=class extends jn{};At.TimeNanosecondBuilder=lm});var Ic=C(Ot=>{"use strict";Object.defineProperty(Ot,"__esModule",{value:!0});Ot.TimestampNanosecondBuilder=Ot.TimestampMicrosecondBuilder=Ot.TimestampMillisecondBuilder=Ot.TimestampSecondBuilder=Ot.TimestampBuilder=void 0;var wD=ke(),wn=class extends wD.FixedWidthBuilder{};Ot.TimestampBuilder=wn;var dm=class extends wn{};Ot.TimestampSecondBuilder=dm;var fm=class extends wn{};Ot.TimestampMillisecondBuilder=fm;var hm=class extends wn{};Ot.TimestampMicrosecondBuilder=hm;var pm=class extends wn{};Ot.TimestampNanosecondBuilder=pm});var Tc=C(er=>{"use strict";Object.defineProperty(er,"__esModule",{value:!0});er.IntervalYearMonthBuilder=er.IntervalDayTimeBuilder=er.IntervalBuilder=void 0;var BD=ke(),Zo=class extends BD.FixedWidthBuilder{};er.IntervalBuilder=Zo;var ym=class extends Zo{};er.IntervalDayTimeBuilder=ym;var _m=class extends Zo{};er.IntervalYearMonthBuilder=_m});var Qo=C(Xo=>{"use strict";Object.defineProperty(Xo,"__esModule",{value:!0});Xo.BinaryBuilder=void 0;var ID=Ge(),TD=Zi(),SD=ke(),mm=class extends SD.VariableWidthBuilder{constructor(e){super(e);this._values=new TD.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,ID.toUint8Array(t))}_flushPending(e,t){let r=this._offsets,n=this._values.reserve(t).buffer,s=0,c=0,_=0,v;for([s,v]of e)v===void 0?r.set(s,0):(c=v.length,n.set(v,_),r.set(s,c),_+=c)}};Xo.BinaryBuilder=mm});var ta=C(ea=>{"use strict";Object.defineProperty(ea,"__esModule",{value:!0});ea.Utf8Builder=void 0;var DD=Mr(),AD=Qo(),OD=Zi(),FD=ke(),Sc=class extends FD.VariableWidthBuilder{constructor(e){super(e);this._values=new OD.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,DD.encodeUtf8(t))}_flushPending(e,t){}};ea.Utf8Builder=Sc;Sc.prototype._flushPending=AD.BinaryBuilder.prototype._flushPending});var Dc=C(ia=>{"use strict";Object.defineProperty(ia,"__esModule",{value:!0});ia.Run=void 0;var MD=Pe(),bm=class{get length(){return this._values.length}get(e){return this._values[e]}clear(){return this._values=null,this}bind(e){return e instanceof MD.Vector?e:(this._values=e,this)}};ia.Run=bm});var Qe=C(Bn=>{"use strict";Object.defineProperty(Bn,"__esModule",{value:!0});Bn.Field=Bn.Schema=void 0;var CD=me(),Ft=class{constructor(e=[],t,r){this.fields=e||[],this.metadata=t||new Map,r||(r=Ac(e)),this.dictionaries=r}get[Symbol.toStringTag](){return"Schema"}toString(){return`Schema<{ ${this.fields.map((e,t)=>`${t}: ${e}`).join(", ")} }>`}select(...e){let t=e.reduce((r,n)=>(r[n]=!0)&&r,Object.create(null));return new Ft(this.fields.filter(r=>t[r.name]),this.metadata)}selectAt(...e){return new Ft(e.map(t=>this.fields[t]).filter(Boolean),this.metadata)}assign(...e){let t=e[0]instanceof Ft?e[0]:Array.isArray(e[0])?new Ft(e[0]):new Ft(e),r=[...this.fields],n=ra(ra(new Map,this.metadata),t.metadata),s=t.fields.filter(_=>{let v=r.findIndex(T=>T.name===_.name);return~v?(r[v]=_.clone({metadata:ra(ra(new Map,r[v].metadata),_.metadata)}))&&!1:!0}),c=Ac(s,new Map);return new Ft([...r,...s],n,new Map([...this.dictionaries,...c]))}};Bn.Schema=Ft;var Di=class{constructor(e,t,r=!1,n){this.name=e,this.type=t,this.nullable=r,this.metadata=n||new Map}static new(...e){let[t,r,n,s]=e;return e[0]&&typeof e[0]=="object"&&({name:t}=e[0],r===void 0&&(r=e[0].type),n===void 0&&(n=e[0].nullable),s===void 0&&(s=e[0].metadata)),new Di(`${t}`,r,n,s)}get typeId(){return this.type.typeId}get[Symbol.toStringTag](){return"Field"}toString(){return`${this.name}: ${this.type}`}clone(...e){let[t,r,n,s]=e;return!e[0]||typeof e[0]!="object"?[t=this.name,r=this.type,n=this.nullable,s=this.metadata]=e:{name:t=this.name,type:r=this.type,nullable:n=this.nullable,metadata:s=this.metadata}=e[0],Di.new(t,r,n,s)}};Bn.Field=Di;function ra(i,e){return new Map([...i||new Map,...e||new Map])}function Ac(i,e=new Map){for(let t=-1,r=i.length;++t<r;){let s=i[t].type;if(CD.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&&Ac(s.children,e)}return e}Ft.prototype.fields=null;Ft.prototype.metadata=null;Ft.prototype.dictionaries=null;Di.prototype.type=null;Di.prototype.name=null;Di.prototype.nullable=null;Di.prototype.metadata=null});var Oc=C(na=>{"use strict";Object.defineProperty(na,"__esModule",{value:!0});na.ListBuilder=void 0;var UD=Dc(),VD=Qe(),kD=me(),RD=Zi(),ED=ke(),gm=class extends ED.VariableWidthBuilder{constructor(e){super(e);this._run=new UD.Run,this._offsets=new RD.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 kD.List(new VD.Field(t,e.type,!0)),this.numChildren-1}clear(){return this._run.clear(),super.clear()}_flushPending(e){let t=this._run,r=this._offsets,n=this._setValue,s=0,c;for([s,c]of e)c===void 0?r.set(s,0):(r.set(s,c.length),n(this,s,t.bind(c)))}};na.ListBuilder=gm});var Fc=C(sa=>{"use strict";Object.defineProperty(sa,"__esModule",{value:!0});sa.FixedSizeListBuilder=void 0;var ND=Dc(),PD=Qe(),xD=ke(),LD=me(),vm=class extends xD.Builder{constructor(){super(...arguments);this._run=new ND.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 r=this.children.push(e);return this.type=new LD.FixedSizeList(this.type.listSize,new PD.Field(t,e.type,!0)),r}clear(){return this._run.clear(),super.clear()}};sa.FixedSizeListBuilder=vm});var Mc=C(oa=>{"use strict";Object.defineProperty(oa,"__esModule",{value:!0});oa.MapBuilder=void 0;var qD=Qe(),zD=me(),WD=ke(),jm=class extends WD.VariableWidthBuilder{set(e,t){return super.set(e,t)}setValue(e,t){t=t instanceof Map?t:new Map(Object.entries(t));let r=this._pending||(this._pending=new Map),n=r.get(e);n&&(this._pendingLength-=n.size),this._pendingLength+=t.size,r.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 zD.Map_(new qD.Field(t,e.type,!0),this.type.keysSorted),this.numChildren-1}_flushPending(e){let t=this._offsets,r=this._setValue;e.forEach((n,s)=>{n===void 0?t.set(s,0):(t.set(s,n.size),r(this,s,n))})}};oa.MapBuilder=jm});var Cc=C(aa=>{"use strict";Object.defineProperty(aa,"__esModule",{value:!0});aa.StructBuilder=void 0;var HD=Qe(),YD=ke(),$D=me(),wm=class extends YD.Builder{addChild(e,t=`${this.numChildren}`){let r=this.children.push(e);return this.type=new $D.Struct([...this.type.children,new HD.Field(t,e.type,!0)]),r}};aa.StructBuilder=wm});var Uc=C(tr=>{"use strict";Object.defineProperty(tr,"__esModule",{value:!0});tr.DenseUnionBuilder=tr.SparseUnionBuilder=tr.UnionBuilder=void 0;var GD=Qe(),Bm=Zi(),JD=ke(),KD=me(),ua=class extends JD.Builder{constructor(e){super(e);this._typeIds=new Bm.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,r){return r===void 0&&(r=this._valueToChildTypeId(this,t,e)),this.setValid(e,this.isValid(t))&&this.setValue(e,t,r),this}setValue(e,t,r){this._typeIds.set(e,r),super.setValue(e,t)}addChild(e,t=`${this.children.length}`){let r=this.children.push(e),{type:{children:n,mode:s,typeIds:c}}=this,_=[...n,new GD.Field(t,e.type)];return this.type=new KD.Union(s,[...c,r],_),r}_valueToChildTypeId(e,t,r){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.")}};tr.UnionBuilder=ua;var Im=class extends ua{};tr.SparseUnionBuilder=Im;var Tm=class extends ua{constructor(e){super(e);this._offsets=new Bm.DataBufferBuilder(new Int32Array(0))}setValue(e,t,r){let n=this.type.typeIdToChildIndex[r];return this._offsets.set(e,this.getChildAt(n).length),super.setValue(e,t,r)}};tr.DenseUnionBuilder=Tm});var nt=C(ca=>{"use strict";Object.defineProperty(ca,"__esModule",{value:!0});ca.Visitor=void 0;var ZD=Yt(),XD=Pe(),F=Be(),QD=me(),je=class{visitMany(e,...t){return e.map((r,n)=>this.visit(r,...t.map(s=>s[n])))}visit(...e){return this.getVisitFn(e[0],!1).apply(this,e)}getVisitFn(e,t=!0){return eA(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}};ca.Visitor=je;function eA(i,e,t=!0){let r=null,n=F.Type.NONE;switch(e instanceof ZD.Data||e instanceof XD.Vector?n=Vc(e.type):e instanceof QD.DataType?n=Vc(e):typeof(n=e)!="number"&&(n=F.Type[e]),n){case F.Type.Null:r=i.visitNull;break;case F.Type.Bool:r=i.visitBool;break;case F.Type.Int:r=i.visitInt;break;case F.Type.Int8:r=i.visitInt8||i.visitInt;break;case F.Type.Int16:r=i.visitInt16||i.visitInt;break;case F.Type.Int32:r=i.visitInt32||i.visitInt;break;case F.Type.Int64:r=i.visitInt64||i.visitInt;break;case F.Type.Uint8:r=i.visitUint8||i.visitInt;break;case F.Type.Uint16:r=i.visitUint16||i.visitInt;break;case F.Type.Uint32:r=i.visitUint32||i.visitInt;break;case F.Type.Uint64:r=i.visitUint64||i.visitInt;break;case F.Type.Float:r=i.visitFloat;break;case F.Type.Float16:r=i.visitFloat16||i.visitFloat;break;case F.Type.Float32:r=i.visitFloat32||i.visitFloat;break;case F.Type.Float64:r=i.visitFloat64||i.visitFloat;break;case F.Type.Utf8:r=i.visitUtf8;break;case F.Type.Binary:r=i.visitBinary;break;case F.Type.FixedSizeBinary:r=i.visitFixedSizeBinary;break;case F.Type.Date:r=i.visitDate;break;case F.Type.DateDay:r=i.visitDateDay||i.visitDate;break;case F.Type.DateMillisecond:r=i.visitDateMillisecond||i.visitDate;break;case F.Type.Timestamp:r=i.visitTimestamp;break;case F.Type.TimestampSecond:r=i.visitTimestampSecond||i.visitTimestamp;break;case F.Type.TimestampMillisecond:r=i.visitTimestampMillisecond||i.visitTimestamp;break;case F.Type.TimestampMicrosecond:r=i.visitTimestampMicrosecond||i.visitTimestamp;break;case F.Type.TimestampNanosecond:r=i.visitTimestampNanosecond||i.visitTimestamp;break;case F.Type.Time:r=i.visitTime;break;case F.Type.TimeSecond:r=i.visitTimeSecond||i.visitTime;break;case F.Type.TimeMillisecond:r=i.visitTimeMillisecond||i.visitTime;break;case F.Type.TimeMicrosecond:r=i.visitTimeMicrosecond||i.visitTime;break;case F.Type.TimeNanosecond:r=i.visitTimeNanosecond||i.visitTime;break;case F.Type.Decimal:r=i.visitDecimal;break;case F.Type.List:r=i.visitList;break;case F.Type.Struct:r=i.visitStruct;break;case F.Type.Union:r=i.visitUnion;break;case F.Type.DenseUnion:r=i.visitDenseUnion||i.visitUnion;break;case F.Type.SparseUnion:r=i.visitSparseUnion||i.visitUnion;break;case F.Type.Dictionary:r=i.visitDictionary;break;case F.Type.Interval:r=i.visitInterval;break;case F.Type.IntervalDayTime:r=i.visitIntervalDayTime||i.visitInterval;break;case F.Type.IntervalYearMonth:r=i.visitIntervalYearMonth||i.visitInterval;break;case F.Type.FixedSizeList:r=i.visitFixedSizeList;break;case F.Type.Map:r=i.visitMap;break}if(typeof r=="function")return r;if(!t)return()=>null;throw new Error(`Unrecognized type '${F.Type[n]}'`)}function Vc(i){switch(i.typeId){case F.Type.Null:return F.Type.Null;case F.Type.Int:{let{bitWidth:e,isSigned:t}=i;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(i.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(i.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(i.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(i.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(i.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(i.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[i.typeId]}'`)}je.prototype.visitInt8=null;je.prototype.visitInt16=null;je.prototype.visitInt32=null;je.prototype.visitInt64=null;je.prototype.visitUint8=null;je.prototype.visitUint16=null;je.prototype.visitUint32=null;je.prototype.visitUint64=null;je.prototype.visitFloat16=null;je.prototype.visitFloat32=null;je.prototype.visitFloat64=null;je.prototype.visitDateDay=null;je.prototype.visitDateMillisecond=null;je.prototype.visitTimestampSecond=null;je.prototype.visitTimestampMillisecond=null;je.prototype.visitTimestampMicrosecond=null;je.prototype.visitTimestampNanosecond=null;je.prototype.visitTimeSecond=null;je.prototype.visitTimeMillisecond=null;je.prototype.visitTimeMicrosecond=null;je.prototype.visitTimeNanosecond=null;je.prototype.visitDenseUnion=null;je.prototype.visitSparseUnion=null;je.prototype.visitIntervalDayTime=null;je.prototype.visitIntervalYearMonth=null});var Ec=C(In=>{"use strict";Object.defineProperty(In,"__esModule",{value:!0});In.instance=In.SetVisitor=void 0;var tA=Pe(),iA=nt(),rA=Mr(),nA=ms(),sA=Ge(),Mt=Be(),re=class extends iA.Visitor{};In.SetVisitor=re;var oA=(i,e,t)=>{i[e]=t/864e5|0},kc=(i,e,t)=>{i[e]=t%4294967296|0,i[e+1]=t/4294967296|0},aA=(i,e,t)=>{i[e]=t*1e3%4294967296|0,i[e+1]=t*1e3/4294967296|0},uA=(i,e,t)=>{i[e]=t*1e6%4294967296|0,i[e+1]=t*1e6/4294967296|0},Sm=(i,e,t,r)=>{let{[t]:n,[t+1]:s}=e;n!=null&&s!=null&&i.set(r.subarray(0,s-n),n)},cA=({offset:i,values:e},t,r)=>{let n=i+t;r?e[n>>3]|=1<<n%8:e[n>>3]&=~(1<<n%8)},Dm=({values:i},e,t)=>{oA(i,e,t.valueOf())},Am=({values:i},e,t)=>{kc(i,e*2,t.valueOf())},ui=({stride:i,values:e},t,r)=>{e[i*t]=r},Om=({stride:i,values:e},t,r)=>{e[i*t]=nA.float64ToUint16(r)},Rc=(i,e,t)=>{switch(typeof t){case"bigint":i.values64[e]=t;break;case"number":i.values[e*i.stride]=t;break;default:{let r=t,{stride:n,ArrayType:s}=i,c=sA.toArrayBufferView(s,r);i.values.set(c.subarray(0,n),n*e)}}},lA=({stride:i,values:e},t,r)=>{e.set(r.subarray(0,i),i*t)},dA=({values:i,valueOffsets:e},t,r)=>Sm(i,e,t,r),fA=({values:i,valueOffsets:e},t,r)=>{Sm(i,e,t,rA.encodeUtf8(r))},hA=(i,e,t)=>{i.type.bitWidth<64?ui(i,e,t):Rc(i,e,t)},pA=(i,e,t)=>{i.type.precision!==Mt.Precision.HALF?ui(i,e,t):Om(i,e,t)},yA=(i,e,t)=>{i.type.unit===Mt.DateUnit.DAY?Dm(i,e,t):Am(i,e,t)},Fm=({values:i},e,t)=>kc(i,e*2,t/1e3),Mm=({values:i},e,t)=>kc(i,e*2,t),Cm=({values:i},e,t)=>aA(i,e*2,t),Um=({values:i},e,t)=>uA(i,e*2,t),_A=(i,e,t)=>{switch(i.type.unit){case Mt.TimeUnit.SECOND:return Fm(i,e,t);case Mt.TimeUnit.MILLISECOND:return Mm(i,e,t);case Mt.TimeUnit.MICROSECOND:return Cm(i,e,t);case Mt.TimeUnit.NANOSECOND:return Um(i,e,t)}},Vm=({values:i,stride:e},t,r)=>{i[e*t]=r},km=({values:i,stride:e},t,r)=>{i[e*t]=r},Rm=({values:i},e,t)=>{i.set(t.subarray(0,2),2*e)},Em=({values:i},e,t)=>{i.set(t.subarray(0,2),2*e)},mA=(i,e,t)=>{switch(i.type.unit){case Mt.TimeUnit.SECOND:return Vm(i,e,t);case Mt.TimeUnit.MILLISECOND:return km(i,e,t);case Mt.TimeUnit.MICROSECOND:return Rm(i,e,t);case Mt.TimeUnit.NANOSECOND:return Em(i,e,t)}},bA=({values:i},e,t)=>{i.set(t.subarray(0,4),4*e)},gA=(i,e,t)=>{let r=i.getChildAt(0),n=i.valueOffsets;for(let s=-1,c=n[e],_=n[e+1];c<_;)r.set(c++,t.get(++s))},vA=(i,e,t)=>{let r=i.getChildAt(0),n=i.valueOffsets,s=t instanceof Map?[...t]:Object.entries(t);for(let c=-1,_=n[e],v=n[e+1];_<v;)r.set(_++,s[++c])},jA=(i,e)=>(t,r,n)=>t==null?void 0:t.set(i,e[n]),wA=(i,e)=>(t,r,n)=>t==null?void 0:t.set(i,e.get(n)),BA=(i,e)=>(t,r,n)=>t==null?void 0:t.set(i,e.get(r.name)),IA=(i,e)=>(t,r,n)=>t==null?void 0:t.set(i,e[r.name]),TA=(i,e,t)=>{let r=t instanceof Map?BA(e,t):t instanceof tA.Vector?wA(e,t):Array.isArray(t)?jA(e,t):IA(e,t);i.type.children.forEach((n,s)=>r(i.getChildAt(s),n,s))},SA=(i,e,t)=>{i.type.mode===Mt.UnionMode.Dense?Nm(i,e,t):Pm(i,e,t)},Nm=(i,e,t)=>{let r=i.typeIdToChildIndex[i.typeIds[e]],n=i.getChildAt(r);n&&n.set(i.valueOffsets[e],t)},Pm=(i,e,t)=>{let r=i.typeIdToChildIndex[i.typeIds[e]],n=i.getChildAt(r);n&&n.set(e,t)},DA=(i,e,t)=>{let r=i.getKey(e);r!==null&&i.setValue(r,t)},AA=(i,e,t)=>{i.type.unit===Mt.IntervalUnit.DAY_TIME?xm(i,e,t):Lm(i,e,t)},xm=({values:i},e,t)=>{i.set(t.subarray(0,2),2*e)},Lm=({values:i},e,t)=>{i[e]=t[0]*12+t[1]%12},OA=(i,e,t)=>{let r=i.getChildAt(0),{stride:n}=i;for(let s=-1,c=e*n;++s<n;)r.set(c+s,t.get(s))};re.prototype.visitBool=cA;re.prototype.visitInt=hA;re.prototype.visitInt8=ui;re.prototype.visitInt16=ui;re.prototype.visitInt32=ui;re.prototype.visitInt64=Rc;re.prototype.visitUint8=ui;re.prototype.visitUint16=ui;re.prototype.visitUint32=ui;re.prototype.visitUint64=Rc;re.prototype.visitFloat=pA;re.prototype.visitFloat16=Om;re.prototype.visitFloat32=ui;re.prototype.visitFloat64=ui;re.prototype.visitUtf8=fA;re.prototype.visitBinary=dA;re.prototype.visitFixedSizeBinary=lA;re.prototype.visitDate=yA;re.prototype.visitDateDay=Dm;re.prototype.visitDateMillisecond=Am;re.prototype.visitTimestamp=_A;re.prototype.visitTimestampSecond=Fm;re.prototype.visitTimestampMillisecond=Mm;re.prototype.visitTimestampMicrosecond=Cm;re.prototype.visitTimestampNanosecond=Um;re.prototype.visitTime=mA;re.prototype.visitTimeSecond=Vm;re.prototype.visitTimeMillisecond=km;re.prototype.visitTimeMicrosecond=Rm;re.prototype.visitTimeNanosecond=Em;re.prototype.visitDecimal=bA;re.prototype.visitList=gA;re.prototype.visitStruct=TA;re.prototype.visitUnion=SA;re.prototype.visitDenseUnion=Nm;re.prototype.visitSparseUnion=Pm;re.prototype.visitDictionary=DA;re.prototype.visitInterval=AA;re.prototype.visitIntervalDayTime=xm;re.prototype.visitIntervalYearMonth=Lm;re.prototype.visitFixedSizeList=OA;re.prototype.visitMap=vA;In.instance=new re});var qm=C(Tn=>{"use strict";Object.defineProperty(Tn,"__esModule",{value:!0});Tn.instance=Tn.GetBuilderCtor=void 0;var FA=nt(),MA=Qo(),CA=hc(),Nc=yc(),UA=_c(),VA=bc(),kA=gc(),RA=Fc(),la=vc(),Pc=Tc(),Ai=wc(),EA=Oc(),NA=Mc(),PA=pc(),xA=Cc(),ws=Ic(),Bs=Bc(),xc=Uc(),LA=ta(),Lc=class extends FA.Visitor{visitNull(){return PA.NullBuilder}visitBool(){return CA.BoolBuilder}visitInt(){return Ai.IntBuilder}visitInt8(){return Ai.Int8Builder}visitInt16(){return Ai.Int16Builder}visitInt32(){return Ai.Int32Builder}visitInt64(){return Ai.Int64Builder}visitUint8(){return Ai.Uint8Builder}visitUint16(){return Ai.Uint16Builder}visitUint32(){return Ai.Uint32Builder}visitUint64(){return Ai.Uint64Builder}visitFloat(){return la.FloatBuilder}visitFloat16(){return la.Float16Builder}visitFloat32(){return la.Float32Builder}visitFloat64(){return la.Float64Builder}visitUtf8(){return LA.Utf8Builder}visitBinary(){return MA.BinaryBuilder}visitFixedSizeBinary(){return kA.FixedSizeBinaryBuilder}visitDate(){return Nc.DateBuilder}visitDateDay(){return Nc.DateDayBuilder}visitDateMillisecond(){return Nc.DateMillisecondBuilder}visitTimestamp(){return ws.TimestampBuilder}visitTimestampSecond(){return ws.TimestampSecondBuilder}visitTimestampMillisecond(){return ws.TimestampMillisecondBuilder}visitTimestampMicrosecond(){return ws.TimestampMicrosecondBuilder}visitTimestampNanosecond(){return ws.TimestampNanosecondBuilder}visitTime(){return Bs.TimeBuilder}visitTimeSecond(){return Bs.TimeSecondBuilder}visitTimeMillisecond(){return Bs.TimeMillisecondBuilder}visitTimeMicrosecond(){return Bs.TimeMicrosecondBuilder}visitTimeNanosecond(){return Bs.TimeNanosecondBuilder}visitDecimal(){return UA.DecimalBuilder}visitList(){return EA.ListBuilder}visitStruct(){return xA.StructBuilder}visitUnion(){return xc.UnionBuilder}visitDenseUnion(){return xc.DenseUnionBuilder}visitSparseUnion(){return xc.SparseUnionBuilder}visitDictionary(){return VA.DictionaryBuilder}visitInterval(){return Pc.IntervalBuilder}visitIntervalDayTime(){return Pc.IntervalDayTimeBuilder}visitIntervalYearMonth(){return Pc.IntervalYearMonthBuilder}visitFixedSizeList(){return RA.FixedSizeListBuilder}visitMap(){return NA.MapBuilder}};Tn.GetBuilderCtor=Lc;Tn.instance=new Lc});var fa=C(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 qA=ke();Object.defineProperty(R,"Builder",{enumerable:!0,get:function(){return qA.Builder}});var zA=hc();Object.defineProperty(R,"BoolBuilder",{enumerable:!0,get:function(){return zA.BoolBuilder}});var WA=pc();Object.defineProperty(R,"NullBuilder",{enumerable:!0,get:function(){return WA.NullBuilder}});var qc=yc();Object.defineProperty(R,"DateBuilder",{enumerable:!0,get:function(){return qc.DateBuilder}});Object.defineProperty(R,"DateDayBuilder",{enumerable:!0,get:function(){return qc.DateDayBuilder}});Object.defineProperty(R,"DateMillisecondBuilder",{enumerable:!0,get:function(){return qc.DateMillisecondBuilder}});var HA=_c();Object.defineProperty(R,"DecimalBuilder",{enumerable:!0,get:function(){return HA.DecimalBuilder}});var YA=bc();Object.defineProperty(R,"DictionaryBuilder",{enumerable:!0,get:function(){return YA.DictionaryBuilder}});var $A=gc();Object.defineProperty(R,"FixedSizeBinaryBuilder",{enumerable:!0,get:function(){return $A.FixedSizeBinaryBuilder}});var da=vc();Object.defineProperty(R,"FloatBuilder",{enumerable:!0,get:function(){return da.FloatBuilder}});Object.defineProperty(R,"Float16Builder",{enumerable:!0,get:function(){return da.Float16Builder}});Object.defineProperty(R,"Float32Builder",{enumerable:!0,get:function(){return da.Float32Builder}});Object.defineProperty(R,"Float64Builder",{enumerable:!0,get:function(){return da.Float64Builder}});var Oi=wc();Object.defineProperty(R,"IntBuilder",{enumerable:!0,get:function(){return Oi.IntBuilder}});Object.defineProperty(R,"Int8Builder",{enumerable:!0,get:function(){return Oi.Int8Builder}});Object.defineProperty(R,"Int16Builder",{enumerable:!0,get:function(){return Oi.Int16Builder}});Object.defineProperty(R,"Int32Builder",{enumerable:!0,get:function(){return Oi.Int32Builder}});Object.defineProperty(R,"Int64Builder",{enumerable:!0,get:function(){return Oi.Int64Builder}});Object.defineProperty(R,"Uint8Builder",{enumerable:!0,get:function(){return Oi.Uint8Builder}});Object.defineProperty(R,"Uint16Builder",{enumerable:!0,get:function(){return Oi.Uint16Builder}});Object.defineProperty(R,"Uint32Builder",{enumerable:!0,get:function(){return Oi.Uint32Builder}});Object.defineProperty(R,"Uint64Builder",{enumerable:!0,get:function(){return Oi.Uint64Builder}});var Is=Bc();Object.defineProperty(R,"TimeBuilder",{enumerable:!0,get:function(){return Is.TimeBuilder}});Object.defineProperty(R,"TimeSecondBuilder",{enumerable:!0,get:function(){return Is.TimeSecondBuilder}});Object.defineProperty(R,"TimeMillisecondBuilder",{enumerable:!0,get:function(){return Is.TimeMillisecondBuilder}});Object.defineProperty(R,"TimeMicrosecondBuilder",{enumerable:!0,get:function(){return Is.TimeMicrosecondBuilder}});Object.defineProperty(R,"TimeNanosecondBuilder",{enumerable:!0,get:function(){return Is.TimeNanosecondBuilder}});var Ts=Ic();Object.defineProperty(R,"TimestampBuilder",{enumerable:!0,get:function(){return Ts.TimestampBuilder}});Object.defineProperty(R,"TimestampSecondBuilder",{enumerable:!0,get:function(){return Ts.TimestampSecondBuilder}});Object.defineProperty(R,"TimestampMillisecondBuilder",{enumerable:!0,get:function(){return Ts.TimestampMillisecondBuilder}});Object.defineProperty(R,"TimestampMicrosecondBuilder",{enumerable:!0,get:function(){return Ts.TimestampMicrosecondBuilder}});Object.defineProperty(R,"TimestampNanosecondBuilder",{enumerable:!0,get:function(){return Ts.TimestampNanosecondBuilder}});var zc=Tc();Object.defineProperty(R,"IntervalBuilder",{enumerable:!0,get:function(){return zc.IntervalBuilder}});Object.defineProperty(R,"IntervalDayTimeBuilder",{enumerable:!0,get:function(){return zc.IntervalDayTimeBuilder}});Object.defineProperty(R,"IntervalYearMonthBuilder",{enumerable:!0,get:function(){return zc.IntervalYearMonthBuilder}});var GA=ta();Object.defineProperty(R,"Utf8Builder",{enumerable:!0,get:function(){return GA.Utf8Builder}});var JA=Qo();Object.defineProperty(R,"BinaryBuilder",{enumerable:!0,get:function(){return JA.BinaryBuilder}});var KA=Oc();Object.defineProperty(R,"ListBuilder",{enumerable:!0,get:function(){return KA.ListBuilder}});var ZA=Fc();Object.defineProperty(R,"FixedSizeListBuilder",{enumerable:!0,get:function(){return ZA.FixedSizeListBuilder}});var XA=Mc();Object.defineProperty(R,"MapBuilder",{enumerable:!0,get:function(){return XA.MapBuilder}});var QA=Cc();Object.defineProperty(R,"StructBuilder",{enumerable:!0,get:function(){return QA.StructBuilder}});var Wc=Uc();Object.defineProperty(R,"UnionBuilder",{enumerable:!0,get:function(){return Wc.UnionBuilder}});Object.defineProperty(R,"SparseUnionBuilder",{enumerable:!0,get:function(){return Wc.SparseUnionBuilder}});Object.defineProperty(R,"DenseUnionBuilder",{enumerable:!0,get:function(){return Wc.DenseUnionBuilder}});var Hc=Be(),eO=ta(),tO=ke(),zm=Ec(),Wm=qm();tO.Builder.new=Hm;function Hm(i){let e=i.type,t=new(Wm.instance.getVisitFn(e)())(i);if(e.children&&e.children.length>0){let r=i.children||[],n={nullValues:i.nullValues},s=Array.isArray(r)?(c,_)=>r[_]||n:({name:c})=>r[c]||n;e.children.forEach((c,_)=>{let{type:v}=c,T=s(c,_);t.children.push(Hm(Object.assign(Object.assign({},T),{type:v})))})}return t}Object.keys(Hc.Type).map(i=>Hc.Type[i]).filter(i=>typeof i=="number"&&i!==Hc.Type.NONE).forEach(i=>{let e=Wm.instance.visit(i);e.prototype._setValue=zm.instance.getVisitFn(i)});eO.Utf8Builder.prototype._setValue=zm.instance.visitBinary});var Ym=C(Sn=>{"use strict";Object.defineProperty(Sn,"__esModule",{value:!0});Sn.Block=Sn.Footer=void 0;var iO=Bi(),ha=Gi(),Ct=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 Ct).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFooter(e,t){return e.setPosition(e.position()+iO.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Ct).__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):ha.MetadataVersion.V1}schema(e){let t=this.bb.__offset(this.bb_pos,6);return t?(e||new ha.Schema).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}dictionaries(e,t){let r=this.bb.__offset(this.bb_pos,8);return r?(t||new pa).__init(this.bb.__vector(this.bb_pos+r)+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 r=this.bb.__offset(this.bb_pos,10);return r?(t||new pa).__init(this.bb.__vector(this.bb_pos+r)+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 r=this.bb.__offset(this.bb_pos,12);return r?(t||new ha.KeyValue).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+r)+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,ha.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 r=t.length-1;r>=0;r--)e.addOffset(t[r]);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,r,n,s,c){return Ct.startFooter(e),Ct.addVersion(e,t),Ct.addSchema(e,r),Ct.addDictionaries(e,n),Ct.addRecordBatches(e,s),Ct.addCustomMetadata(e,c),Ct.endFooter(e)}};Sn.Footer=Ct;var pa=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,r,n){return e.prep(8,24),e.writeInt64(n),e.pad(4),e.writeInt32(r),e.writeInt64(t),e.offset()}};Sn.Block=pa});var Gc=C(Dn=>{"use strict";Object.defineProperty(Dn,"__esModule",{value:!0});Dn.FileBlock=Dn.Footer=void 0;var Gt=Ym(),Yc=Bi(),$m=Yc.flatbuffers.Long,rO=Yc.flatbuffers.Builder,nO=Yc.flatbuffers.ByteBuffer,Gm=Qe(),Jm=Be(),sO=Ge(),$c=class{constructor(e,t=Jm.MetadataVersion.V4,r,n){this.schema=e,this.version=t,r&&(this._recordBatches=r),n&&(this._dictionaryBatches=n)}static decode(e){e=new nO(sO.toUint8Array(e));let t=Gt.Footer.getRootAsFooter(e),r=Gm.Schema.decode(t.schema());return new Km(r,t)}static encode(e){let t=new rO,r=Gm.Schema.encode(t,e.schema);Gt.Footer.startRecordBatchesVector(t,e.numRecordBatches),[...e.recordBatches()].slice().reverse().forEach(c=>ir.encode(t,c));let n=t.endVector();Gt.Footer.startDictionariesVector(t,e.numDictionaries),[...e.dictionaryBatches()].slice().reverse().forEach(c=>ir.encode(t,c));let s=t.endVector();return Gt.Footer.startFooter(t),Gt.Footer.addSchema(t,r),Gt.Footer.addVersion(t,Jm.MetadataVersion.V4),Gt.Footer.addRecordBatches(t,n),Gt.Footer.addDictionaries(t,s),Gt.Footer.finishFooterBuffer(t,Gt.Footer.endFooter(t)),t.asUint8Array()}get numRecordBatches(){return this._recordBatches.length}get numDictionaries(){return this._dictionaryBatches.length}*recordBatches(){for(let e,t=-1,r=this.numRecordBatches;++t<r;)(e=this.getRecordBatch(t))&&(yield e)}*dictionaryBatches(){for(let e,t=-1,r=this.numDictionaries;++t<r;)(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}};Dn.Footer=$c;var Km=class extends $c{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 ir.decode(t)}return null}getDictionaryBatch(e){if(e>=0&&e<this.numDictionaries){let t=this._footer.dictionaries(e);if(t)return ir.decode(t)}return null}},ir=class{constructor(e,t,r){this.metaDataLength=e,this.offset=typeof r=="number"?r:r.low,this.bodyLength=typeof t=="number"?t:t.low}static decode(e){return new ir(e.metaDataLength(),e.bodyLength(),e.offset())}static encode(e,t){let{metaDataLength:r}=t,n=new $m(t.offset,0),s=new $m(t.bodyLength,0);return Gt.Block.createBlock(e,n,r,s)}};Dn.FileBlock=ir});var ar=C(or=>{"use strict";Object.defineProperty(or,"__esModule",{value:!0});or.AsyncByteStream=or.ByteStream=or.AsyncByteQueue=void 0;var rr=at(),nr=ys(),Zm=Mr(),Ss=cn(),Jc=Ge(),An=ut(),Kc=class extends Ss.AsyncQueue{write(e){if((e=Jc.toUint8Array(e)).byteLength>0)return super.write(e)}toString(e=!1){return e?Zm.decodeUtf8(this.toUint8Array(!0)):this.toUint8Array(!1).then(Zm.decodeUtf8)}toUint8Array(e=!1){return e?Jc.joinUint8Arrays(this._values)[0]:(()=>rr.__awaiter(this,void 0,void 0,function*(){var t,r;let n=[],s=0;try{for(var c=rr.__asyncValues(this),_;_=yield c.next(),!_.done;){let v=_.value;n.push(v),s+=v.byteLength}}catch(v){t={error:v}}finally{try{_&&!_.done&&(r=c.return)&&(yield r.call(c))}finally{if(t)throw t.error}}return Jc.joinUint8Arrays(n,s)[0]}))()}};or.AsyncByteQueue=Kc;var Xm=class{constructor(e){e&&(this.source=new Qm(nr.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)}};or.ByteStream=Xm;var ya=class{constructor(e){e instanceof ya?this.source=e.source:e instanceof Kc?this.source=new sr(nr.default.fromAsyncIterable(e)):An.isReadableNodeStream(e)?this.source=new sr(nr.default.fromNodeStream(e)):An.isReadableDOMStream(e)?this.source=new sr(nr.default.fromDOMStream(e)):An.isFetchResponse(e)?this.source=new sr(nr.default.fromDOMStream(e.body)):An.isIterable(e)?this.source=new sr(nr.default.fromIterable(e)):An.isPromise(e)?this.source=new sr(nr.default.fromAsyncIterable(e)):An.isAsyncIterable(e)&&(this.source=new sr(nr.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)}};or.AsyncByteStream=ya;var Qm=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)||Ss.ITERATOR_DONE)}return(e){return Object.create(this.source.return&&this.source.return(e)||Ss.ITERATOR_DONE)}},sr=class{constructor(e){this.source=e,this._closedPromise=new Promise(t=>this._closedPromiseResolve=t)}cancel(e){return rr.__awaiter(this,void 0,void 0,function*(){yield this.return(e)})}get closed(){return this._closedPromise}read(e){return rr.__awaiter(this,void 0,void 0,function*(){return(yield this.next(e,"read")).value})}peek(e){return rr.__awaiter(this,void 0,void 0,function*(){return(yield this.next(e,"peek")).value})}next(e,t="read"){return rr.__awaiter(this,void 0,void 0,function*(){return yield this.source.next({cmd:t,size:e})})}throw(e){return rr.__awaiter(this,void 0,void 0,function*(){let t=this.source.throw&&(yield this.source.throw(e))||Ss.ITERATOR_DONE;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(t)})}return(e){return rr.__awaiter(this,void 0,void 0,function*(){let t=this.source.return&&(yield this.source.return(e))||Ss.ITERATOR_DONE;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(t)})}}});var Zc=C(On=>{"use strict";Object.defineProperty(On,"__esModule",{value:!0});On.AsyncRandomAccessFile=On.RandomAccessFile=void 0;var ur=at(),eb=ar(),oO=Ge(),tb=class extends eb.ByteStream{constructor(e,t){super();this.position=0,this.buffer=oO.toUint8Array(e),this.size=typeof t=="undefined"?this.buffer.byteLength:t}readInt32(e){let{buffer:t,byteOffset:r}=this.readAt(e,4);return new DataView(t,r).getInt32(0,!0)}seek(e){return this.position=Math.min(e,this.size),e<this.size}read(e){let{buffer:t,size:r,position:n}=this;return t&&n<r?(typeof e!="number"&&(e=1/0),this.position=Math.min(r,n+Math.min(r-n,e)),t.subarray(n,this.position)):null}readAt(e,t){let r=this.buffer,n=Math.min(this.size,e+t);return r?r.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}}};On.RandomAccessFile=tb;var ib=class extends eb.AsyncByteStream{constructor(e,t){super();this.position=0,this._handle=e,typeof t=="number"?this.size=t:this._pending=(()=>ur.__awaiter(this,void 0,void 0,function*(){this.size=(yield e.stat()).size,delete this._pending}))()}readInt32(e){return ur.__awaiter(this,void 0,void 0,function*(){let{buffer:t,byteOffset:r}=yield this.readAt(e,4);return new DataView(t,r).getInt32(0,!0)})}seek(e){return ur.__awaiter(this,void 0,void 0,function*(){return this._pending&&(yield this._pending),this.position=Math.min(e,this.size),e<this.size})}read(e){return ur.__awaiter(this,void 0,void 0,function*(){this._pending&&(yield this._pending);let{_handle:t,size:r,position:n}=this;if(t&&n<r){typeof e!="number"&&(e=1/0);let s=n,c=0,_=0,v=Math.min(r,s+Math.min(r-s,e)),T=new Uint8Array(Math.max(0,(this.position=v)-s));for(;(s+=_)<v&&(c+=_)<T.byteLength;)({bytesRead:_}=yield t.read(T,c,T.byteLength-c,s));return T}return null})}readAt(e,t){return ur.__awaiter(this,void 0,void 0,function*(){this._pending&&(yield this._pending);let{_handle:r,size:n}=this;if(r&&e+t<n){let s=Math.min(n,e+t),c=new Uint8Array(s-e);return(yield r.read(c,0,t,e)).buffer}return new Uint8Array(t)})}close(){return ur.__awaiter(this,void 0,void 0,function*(){let e=this._handle;this._handle=null,e&&(yield e.close())})}throw(e){return ur.__awaiter(this,void 0,void 0,function*(){return yield this.close(),{done:!0,value:e}})}return(e){return ur.__awaiter(this,void 0,void 0,function*(){return yield this.close(),{done:!0,value:e}})}};On.AsyncRandomAccessFile=ib});var Qc=C(ci=>{"use strict";Object.defineProperty(ci,"__esModule",{value:!0});ci.Int128=ci.Int64=ci.Uint64=ci.BaseInt64=void 0;var aO=1<<16;function Fn(i){return i<0&&(i=4294967295+i+1),`0x${i.toString(16)}`}var Mn=8,Xc=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8],_a=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]),r=new Uint32Array([e.buffer[1]>>>16,e.buffer[1]&65535,e.buffer[0]>>>16,e.buffer[0]&65535]),n=t[3]*r[3];this.buffer[0]=n&65535;let s=n>>>16;return n=t[2]*r[3],s+=n,n=t[3]*r[2]>>>0,s+=n,this.buffer[0]+=s<<16,this.buffer[1]=s>>>0<n?aO:0,this.buffer[1]+=s>>>16,this.buffer[1]+=t[1]*r[3]+t[2]*r[2]+t[3]*r[1],this.buffer[1]+=t[0]*r[3]+t[1]*r[2]+t[2]*r[1]+t[3]*r[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`${Fn(this.buffer[1])} ${Fn(this.buffer[0])}`}};ci.BaseInt64=_a;var be=class extends _a{times(e){return this._times(e),this}plus(e){return this._plus(e),this}static from(e,t=new Uint32Array(2)){return be.fromString(typeof e=="string"?e:e.toString(),t)}static fromNumber(e,t=new Uint32Array(2)){return be.fromString(e.toString(),t)}static fromString(e,t=new Uint32Array(2)){let r=e.length,n=new be(t);for(let s=0;s<r;){let c=Mn<r-s?Mn:r-s,_=new be(new Uint32Array([parseInt(e.substr(s,c),10),0])),v=new be(new Uint32Array([Xc[c],0]));n.times(v),n.plus(_),s+=c}return n}static convertArray(e){let t=new Uint32Array(e.length*2);for(let r=-1,n=e.length;++r<n;)be.from(e[r],new Uint32Array(t.buffer,t.byteOffset+2*r*4,2));return t}static multiply(e,t){return new be(new Uint32Array(e.buffer)).times(t)}static add(e,t){return new be(new Uint32Array(e.buffer)).plus(t)}};ci.Uint64=be;var bt=class extends _a{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,r=e.buffer[1]<<0;return t<r||t===r&&this.buffer[0]<e.buffer[0]}static from(e,t=new Uint32Array(2)){return bt.fromString(typeof e=="string"?e:e.toString(),t)}static fromNumber(e,t=new Uint32Array(2)){return bt.fromString(e.toString(),t)}static fromString(e,t=new Uint32Array(2)){let r=e.startsWith("-"),n=e.length,s=new bt(t);for(let c=r?1:0;c<n;){let _=Mn<n-c?Mn:n-c,v=new bt(new Uint32Array([parseInt(e.substr(c,_),10),0])),T=new bt(new Uint32Array([Xc[_],0]));s.times(T),s.plus(v),c+=_}return r?s.negate():s}static convertArray(e){let t=new Uint32Array(e.length*2);for(let r=-1,n=e.length;++r<n;)bt.from(e[r],new Uint32Array(t.buffer,t.byteOffset+2*r*4,2));return t}static multiply(e,t){return new bt(new Uint32Array(e.buffer)).times(t)}static add(e,t){return new bt(new Uint32Array(e.buffer)).plus(t)}};ci.Int64=bt;var Jt=class{constructor(e){this.buffer=e}high(){return new bt(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset+8,2))}low(){return new bt(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset,2))}negate(){return this.buffer[0]=~this.buffer[0]+1,this.buffer[1]=~this.buffer[1],this.buffer[2]=~this.buffer[2],this.buffer[3]=~this.buffer[3],this.buffer[0]==0&&++this.buffer[1],this.buffer[1]==0&&++this.buffer[2],this.buffer[2]==0&&++this.buffer[3],this}times(e){let t=new be(new Uint32Array([this.buffer[3],0])),r=new be(new Uint32Array([this.buffer[2],0])),n=new be(new Uint32Array([this.buffer[1],0])),s=new be(new Uint32Array([this.buffer[0],0])),c=new be(new Uint32Array([e.buffer[3],0])),_=new be(new Uint32Array([e.buffer[2],0])),v=new be(new Uint32Array([e.buffer[1],0])),T=new be(new Uint32Array([e.buffer[0],0])),A=be.multiply(s,T);this.buffer[0]=A.low();let P=new be(new Uint32Array([A.high(),0]));return A=be.multiply(n,T),P.plus(A),A=be.multiply(s,v),P.plus(A),this.buffer[1]=P.low(),this.buffer[3]=P.lessThan(A)?1:0,this.buffer[2]=P.high(),new be(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset+8,2)).plus(be.multiply(r,T)).plus(be.multiply(n,v)).plus(be.multiply(s,_)),this.buffer[3]+=be.multiply(t,T).plus(be.multiply(r,v)).plus(be.multiply(n,_)).plus(be.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`${Fn(this.buffer[3])} ${Fn(this.buffer[2])} ${Fn(this.buffer[1])} ${Fn(this.buffer[0])}`}static multiply(e,t){return new Jt(new Uint32Array(e.buffer)).times(t)}static add(e,t){return new Jt(new Uint32Array(e.buffer)).plus(t)}static from(e,t=new Uint32Array(4)){return Jt.fromString(typeof e=="string"?e:e.toString(),t)}static fromNumber(e,t=new Uint32Array(4)){return Jt.fromString(e.toString(),t)}static fromString(e,t=new Uint32Array(4)){let r=e.startsWith("-"),n=e.length,s=new Jt(t);for(let c=r?1:0;c<n;){let _=Mn<n-c?Mn:n-c,v=new Jt(new Uint32Array([parseInt(e.substr(c,_),10),0,0,0])),T=new Jt(new Uint32Array([Xc[_],0,0,0]));s.times(T),s.plus(v),c+=_}return r?s.negate():s}static convertArray(e){let t=new Uint32Array(e.length*4);for(let r=-1,n=e.length;++r<n;)Jt.from(e[r],new Uint32Array(t.buffer,t.byteOffset+4*4*r,4));return t}};ci.Int128=Jt});var ob=C(Cn=>{"use strict";Object.defineProperty(Cn,"__esModule",{value:!0});Cn.JSONVectorLoader=Cn.VectorLoader=void 0;var Ke=Yt(),uO=Qe(),Fi=me(),cO=nt(),rb=si(),lO=Mr(),ma=Qc(),nb=Be(),li=Ge(),el=class extends cO.Visitor{constructor(e,t,r,n){super();this.nodesIndex=-1,this.buffersIndex=-1,this.bytes=e,this.nodes=t,this.buffers=r,this.dictionaries=n}visit(e){return super.visit(e instanceof uO.Field?e.type:e)}visitNull(e,{length:t}=this.nextFieldNode()){return Ke.Data.Null(e,0,t)}visitBool(e,{length:t,nullCount:r}=this.nextFieldNode()){return Ke.Data.Bool(e,0,t,r,this.readNullBitmap(e,r),this.readData(e))}visitInt(e,{length:t,nullCount:r}=this.nextFieldNode()){return Ke.Data.Int(e,0,t,r,this.readNullBitmap(e,r),this.readData(e))}visitFloat(e,{length:t,nullCount:r}=this.nextFieldNode()){return Ke.Data.Float(e,0,t,r,this.readNullBitmap(e,r),this.readData(e))}visitUtf8(e,{length:t,nullCount:r}=this.nextFieldNode()){return Ke.Data.Utf8(e,0,t,r,this.readNullBitmap(e,r),this.readOffsets(e),this.readData(e))}visitBinary(e,{length:t,nullCount:r}=this.nextFieldNode()){return Ke.Data.Binary(e,0,t,r,this.readNullBitmap(e,r),this.readOffsets(e),this.readData(e))}visitFixedSizeBinary(e,{length:t,nullCount:r}=this.nextFieldNode()){return Ke.Data.FixedSizeBinary(e,0,t,r,this.readNullBitmap(e,r),this.readData(e))}visitDate(e,{length:t,nullCount:r}=this.nextFieldNode()){return Ke.Data.Date(e,0,t,r,this.readNullBitmap(e,r),this.readData(e))}visitTimestamp(e,{length:t,nullCount:r}=this.nextFieldNode()){return Ke.Data.Timestamp(e,0,t,r,this.readNullBitmap(e,r),this.readData(e))}visitTime(e,{length:t,nullCount:r}=this.nextFieldNode()){return Ke.Data.Time(e,0,t,r,this.readNullBitmap(e,r),this.readData(e))}visitDecimal(e,{length:t,nullCount:r}=this.nextFieldNode()){return Ke.Data.Decimal(e,0,t,r,this.readNullBitmap(e,r),this.readData(e))}visitList(e,{length:t,nullCount:r}=this.nextFieldNode()){return Ke.Data.List(e,0,t,r,this.readNullBitmap(e,r),this.readOffsets(e),this.visit(e.children[0]))}visitStruct(e,{length:t,nullCount:r}=this.nextFieldNode()){return Ke.Data.Struct(e,0,t,r,this.readNullBitmap(e,r),this.visitMany(e.children))}visitUnion(e){return e.mode===nb.UnionMode.Sparse?this.visitSparseUnion(e):this.visitDenseUnion(e)}visitDenseUnion(e,{length:t,nullCount:r}=this.nextFieldNode()){return Ke.Data.Union(e,0,t,r,this.readNullBitmap(e,r),this.readTypeIds(e),this.readOffsets(e),this.visitMany(e.children))}visitSparseUnion(e,{length:t,nullCount:r}=this.nextFieldNode()){return Ke.Data.Union(e,0,t,r,this.readNullBitmap(e,r),this.readTypeIds(e),this.visitMany(e.children))}visitDictionary(e,{length:t,nullCount:r}=this.nextFieldNode()){return Ke.Data.Dictionary(e,0,t,r,this.readNullBitmap(e,r),this.readData(e.indices),this.readDictionary(e))}visitInterval(e,{length:t,nullCount:r}=this.nextFieldNode()){return Ke.Data.Interval(e,0,t,r,this.readNullBitmap(e,r),this.readData(e))}visitFixedSizeList(e,{length:t,nullCount:r}=this.nextFieldNode()){return Ke.Data.FixedSizeList(e,0,t,r,this.readNullBitmap(e,r),this.visit(e.children[0]))}visitMap(e,{length:t,nullCount:r}=this.nextFieldNode()){return Ke.Data.Map(e,0,t,r,this.readNullBitmap(e,r),this.readOffsets(e),this.visit(e.children[0]))}nextFieldNode(){return this.nodes[++this.nodesIndex]}nextBufferRange(){return this.buffers[++this.buffersIndex]}readNullBitmap(e,t,r=this.nextBufferRange()){return t>0&&this.readData(e,r)||new Uint8Array(0)}readOffsets(e,t){return this.readData(e,t)}readTypeIds(e,t){return this.readData(e,t)}readData(e,{length:t,offset:r}=this.nextBufferRange()){return this.bytes.subarray(r,r+t)}readDictionary(e){return this.dictionaries.get(e.id)}};Cn.VectorLoader=el;var sb=class extends el{constructor(e,t,r,n){super(new Uint8Array(0),t,r,n);this.sources=e}readNullBitmap(e,t,{offset:r}=this.nextBufferRange()){return t<=0?new Uint8Array(0):rb.packBools(this.sources[r])}readOffsets(e,{offset:t}=this.nextBufferRange()){return li.toArrayBufferView(Uint8Array,li.toArrayBufferView(Int32Array,this.sources[t]))}readTypeIds(e,{offset:t}=this.nextBufferRange()){return li.toArrayBufferView(Uint8Array,li.toArrayBufferView(e.ArrayType,this.sources[t]))}readData(e,{offset:t}=this.nextBufferRange()){let{sources:r}=this;return Fi.DataType.isTimestamp(e)||(Fi.DataType.isInt(e)||Fi.DataType.isTime(e))&&e.bitWidth===64||Fi.DataType.isDate(e)&&e.unit===nb.DateUnit.MILLISECOND?li.toArrayBufferView(Uint8Array,ma.Int64.convertArray(r[t])):Fi.DataType.isDecimal(e)?li.toArrayBufferView(Uint8Array,ma.Int128.convertArray(r[t])):Fi.DataType.isBinary(e)||Fi.DataType.isFixedSizeBinary(e)?dO(r[t]):Fi.DataType.isBool(e)?rb.packBools(r[t]):Fi.DataType.isUtf8(e)?lO.encodeUtf8(r[t].join("")):li.toArrayBufferView(Uint8Array,li.toArrayBufferView(e.ArrayType,r[t].map(n=>+n)))}};Cn.JSONVectorLoader=sb;function dO(i){let e=i.join(""),t=new Uint8Array(e.length/2);for(let r=0;r<e.length;r+=2)t[r>>1]=parseInt(e.substr(r,2),16);return t}});var Ds=C(Vn=>{"use strict";Object.defineProperty(Vn,"__esModule",{value:!0});Vn.StructRow=Vn.MapRow=void 0;var ab=uc(),st=Symbol.for("parent"),Un=Symbol.for("rowIndex"),gt=Symbol.for("keyToIdx"),vt=Symbol.for("idxToVal"),tl=Symbol.for("nodejs.util.inspect.custom"),di=class{constructor(e,t){this[st]=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 r=this[gt]||(this[gt]=new Map),n=r.get(e);if(n!==void 0){let s=this[vt]||(this[vt]=new Array(this.size));(t=s[n])!==void 0||(s[n]=t=this.getValue(n))}else if((n=this.getIndex(e))>-1){r.set(e,n);let s=this[vt]||(this[vt]=new Array(this.size));(t=s[n])!==void 0||(s[n]=t=this.getValue(n))}}return t}set(e,t){if(e!=null){let r=this[gt]||(this[gt]=new Map),n=r.get(e);if(n===void 0&&r.set(e,n=this.getIndex(e)),n>-1){let s=this[vt]||(this[vt]=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(),r=this[gt]||(this[gt]=new Map),n=this[vt]||(this[vt]=new Array(this.size));for(let s,c,_=0,v,T;!((v=e.next()).done||(T=t.next()).done);++_)s=v.value,c=T.value,n[_]=c,r.has(s)||r.set(s,_),yield[s,c]}forEach(e,t){let r=this.keys(),n=this.values(),s=t===void 0?e:(v,T,A)=>e.call(t,v,T,A),c=this[gt]||(this[gt]=new Map),_=this[vt]||(this[vt]=new Array(this.size));for(let v,T,A=0,P,q;!((P=r.next()).done||(q=n.next()).done);++A)v=P.value,T=q.value,_[A]=T,c.has(v)||c.set(v,A),s(T,v,this)}toArray(){return[...this.values()]}toJSON(){let e={};return this.forEach((t,r)=>e[r]=t),e}inspect(){return this.toString()}[tl](){return this.toString()}toString(){let e=[];return this.forEach((t,r)=>{r=ab.valueToString(r),t=ab.valueToString(t),e.push(`${r}: ${t}`)}),`{ ${e.join(", ")} }`}};di[Symbol.toStringTag]=(i=>(Object.defineProperties(i,{size:{writable:!0,enumerable:!1,configurable:!1,value:0},[st]:{writable:!0,enumerable:!1,configurable:!1,value:null},[Un]:{writable:!0,enumerable:!1,configurable:!1,value:-1}}),i[Symbol.toStringTag]="Row"))(di.prototype);var ub=class extends di{constructor(e){super(e,e.length);return fO(this)}keys(){return this[st].getChildAt(0)[Symbol.iterator]()}values(){return this[st].getChildAt(1)[Symbol.iterator]()}getKey(e){return this[st].getChildAt(0).get(e)}getIndex(e){return this[st].getChildAt(0).indexOf(e)}getValue(e){return this[st].getChildAt(1).get(e)}setValue(e,t){this[st].getChildAt(1).set(e,t)}};Vn.MapRow=ub;var cb=class extends di{constructor(e){super(e,e.type.children.length);return lb(this)}*keys(){for(let e of this[st].type.children)yield e.name}*values(){for(let e of this[st].type.children)yield this[e.name]}getKey(e){return this[st].type.children[e].name}getIndex(e){return this[st].type.children.findIndex(t=>t.name===e)}getValue(e){return this[st].getChildAt(e).get(this[Un])}setValue(e,t){return this[st].getChildAt(e).set(this[Un],t)}};Vn.StructRow=cb;Object.setPrototypeOf(di.prototype,Map.prototype);var lb=(()=>{let i={enumerable:!0,configurable:!1,get:null,set:null};return e=>{let t=-1,r=e[gt]||(e[gt]=new Map),n=c=>function(){return this.get(c)},s=c=>function(_){return this.set(c,_)};for(let c of e.keys())r.set(c,++t),i.get=n(c),i.set=s(c),Object.prototype.hasOwnProperty.call(e,c)||(i.enumerable=!0,Object.defineProperty(e,c,i)),Object.prototype.hasOwnProperty.call(e,t)||(i.enumerable=!1,Object.defineProperty(e,t,i));return i.get=i.set=null,e}})(),fO=(()=>{if(typeof Proxy=="undefined")return lb;let i=di.prototype.has,e=di.prototype.get,t=di.prototype.set,r=di.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 st:case Un:case vt:case gt:case tl:return!0}return typeof c=="number"&&!s.has(c)&&(c=s.getKey(c)),s.has(c)},get(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 st:case Un:case vt:case gt:case tl:return Reflect.get(s,c,_)}return typeof c=="number"&&!i.call(_,c)&&(c=r.call(_,c)),e.call(_,c)},set(s,c,_,v){switch(c){case st:case Un:case vt:case gt:return Reflect.set(s,c,_,v);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"&&!i.call(v,c)&&(c=r.call(v,c)),i.call(v,c)?!!t.call(v,c,_):!1}};return s=>new Proxy(s,n)})()});var Os=C(cr=>{"use strict";Object.defineProperty(cr,"__esModule",{value:!0});cr.createElementComparator=cr.clampRange=cr.clampIndex=void 0;var db=Pe(),fb=Ds(),hO=Ge(),hb=ut();function pO(i,e,t){let r=i.length,n=e>-1?e:r+e%r;return t?t(i,n):n}cr.clampIndex=pO;var pb;function yO(i,e,t,r){let{length:n=0}=i,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&&(pb=s,s=c,c=pb),c>n&&(c=n),r?r(i,s,c):[s,c]}cr.clampRange=yO;var _O=hb.BigIntAvailable?hb.BigInt(0):0,yb=i=>i!==i;function As(i){let e=typeof i;if(e!=="object"||i===null)return yb(i)?yb:e!=="bigint"?t=>t===i:t=>_O+t===i;if(i instanceof Date){let t=i.valueOf();return r=>r instanceof Date?r.valueOf()===t:!1}return ArrayBuffer.isView(i)?t=>t?hO.compareArrayLike(i,t):!1:i instanceof Map?bO(i):Array.isArray(i)?mO(i):i instanceof db.Vector?gO(i):vO(i)}cr.createElementComparator=As;function mO(i){let e=[];for(let t=-1,r=i.length;++t<r;)e[t]=As(i[t]);return ba(e)}function bO(i){let e=-1,t=[];return i.forEach(r=>t[++e]=As(r)),ba(t)}function gO(i){let e=[];for(let t=-1,r=i.length;++t<r;)e[t]=As(i.get(t));return ba(e)}function vO(i){let e=Object.keys(i);if(e.length===0)return()=>!1;let t=[];for(let r=-1,n=e.length;++r<n;)t[r]=As(i[e[r]]);return ba(t,e)}function ba(i,e){return t=>{if(!t||typeof t!="object")return!1;switch(t.constructor){case Array:return jO(i,t);case Map:case fb.MapRow:case fb.StructRow:return _b(i,t,t.keys());case Object:case void 0:return _b(i,t,e||Object.keys(t))}return t instanceof db.Vector?wO(i,t):!1}}function jO(i,e){let t=i.length;if(e.length!==t)return!1;for(let r=-1;++r<t;)if(!i[r](e[r]))return!1;return!0}function wO(i,e){let t=i.length;if(e.length!==t)return!1;for(let r=-1;++r<t;)if(!i[r](e.get(r)))return!1;return!0}function _b(i,e,t){let r=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,_=i.length,v=s.next(),T=r.next(),A=n.next();for(;c<_&&!T.done&&!A.done&&!v.done&&!(T.value!==A.value||!i[c](v.value));++c,T=r.next(),A=n.next(),v=s.next());return c===_&&T.done&&A.done&&v.done?!0:(r.return&&r.return(),n.return&&n.return(),s.return&&s.return(),!1)}});var Hr=C(et=>{"use strict";Object.defineProperty(et,"__esModule",{value:!0});et.selectColumnChildrenArgs=et.selectVectorChildrenArgs=et.selectChunkArgs=et.selectFieldArgs=et.selectColumnArgs=et.selectArgs=et.arrayTypeToDataType=et.isTypedArray=void 0;var il=Yt(),mb=Qe(),Mi=Rn(),kn=Pe(),Ut=me(),BO=dr(),lr=Array.isArray;function rl(i){return ArrayBuffer.isView(i)&&"BYTES_PER_ELEMENT"in i}et.isTypedArray=rl;function bb(i){switch(i){case Int8Array:return Ut.Int8;case Int16Array:return Ut.Int16;case Int32Array:return Ut.Int32;case BigInt64Array:return Ut.Int64;case Uint8Array:return Ut.Uint8;case Uint16Array:return Ut.Uint16;case Uint32Array:return Ut.Uint32;case BigUint64Array:return Ut.Uint64;case Float32Array:return Ut.Float32;case Float64Array:return Ut.Float64;default:return null}}et.arrayTypeToDataType=bb;function IO(i){let e=bb(i.constructor);if(!e)throw new TypeError("Unrecognized Array input");let t=new e,r=il.Data.new(t,0,i.length,0,[void 0,i]);return kn.Vector.new(r)}et.selectArgs=(i,e)=>ga(i,e,[],0);et.selectColumnArgs=i=>{let[e,t]=sl(i,[[],[]]);return t.map((r,n)=>r instanceof Mi.Column?Mi.Column.new(r.field.clone(e[n]),r):r instanceof kn.Vector?Mi.Column.new(e[n],r):rl(r)?Mi.Column.new(e[n],IO(r)):Mi.Column.new(e[n],[]))};et.selectFieldArgs=i=>sl(i,[[],[]]);et.selectChunkArgs=(i,e)=>nl(i,e,[],0);et.selectVectorChildrenArgs=(i,e)=>gb(i,e,[],0);et.selectColumnChildrenArgs=(i,e)=>vb(i,e,[],0);function ga(i,e,t,r){let n,s=r,c=-1,_=e.length;for(;++c<_;)lr(n=e[c])?s=ga(i,n,t,s).length:n instanceof i&&(t[s++]=n);return t}function nl(i,e,t,r){let n,s=r,c=-1,_=e.length;for(;++c<_;)lr(n=e[c])?s=nl(i,n,t,s).length:n instanceof BO.Chunked?s=nl(i,n.chunks,t,s).length:n instanceof i&&(t[s++]=n);return t}function gb(i,e,t,r){let n,s=r,c=-1,_=e.length;for(;++c<_;)lr(n=e[c])?s=gb(i,n,t,s).length:n instanceof i?s=ga(kn.Vector,n.schema.fields.map((v,T)=>n.getChildAt(T)),t,s).length:n instanceof kn.Vector&&(t[s++]=n);return t}function vb(i,e,t,r){let n,s=r,c=-1,_=e.length;for(;++c<_;)lr(n=e[c])?s=vb(i,n,t,s).length:n instanceof i?s=ga(Mi.Column,n.schema.fields.map((v,T)=>Mi.Column.new(v,n.getChildAt(T))),t,s).length:n instanceof Mi.Column&&(t[s++]=n);return t}var TO=(i,[e,t],r)=>(i[0][r]=e,i[1][r]=t,i);function sl(i,e){let t,r;switch(r=i.length){case 0:return e;case 1:if(t=e[0],!i[0])return e;if(lr(i[0]))return sl(i[0],e);i[0]instanceof il.Data||i[0]instanceof kn.Vector||rl(i[0])||i[0]instanceof Ut.DataType||([t,i]=Object.entries(i[0]).reduce(TO,e));break;default:lr(t=i[r-1])?i=lr(i[0])?i[0]:i.slice(0,r-1):(i=lr(i[0])?i[0]:i,t=[])}let n=-1,s=-1,c=-1,_=i.length,v,T,[A,P]=e;for(;++c<_;)T=i[c],T instanceof Mi.Column&&(P[++s]=T)?A[++n]=T.field.clone(t[c],T.type,!0):({[c]:v=c}=t,T instanceof Ut.DataType&&(P[++s]=T)?A[++n]=mb.Field.new(v,T,!0):(T==null?void 0:T.type)&&(P[++s]=T)&&(T instanceof il.Data&&(P[s]=T=kn.Vector.new(T)),A[++n]=mb.Field.new(v,T.type,!0)));return e}});var dr=C(va=>{"use strict";Object.defineProperty(va,"__esModule",{value:!0});va.Chunked=void 0;var SO=Os(),jb=me(),DO=Hr(),wb=Pe(),Bb=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}},Ci=class extends wb.AbstractVector{constructor(e,t=[],r=AO(t)){super();this._nullCount=-1,this._type=e,this._chunks=t,this._chunkOffsets=r,this._length=r[r.length-1],this._numChildren=(this._type.children||[]).length}static flatten(...e){return DO.selectChunkArgs(wb.Vector,e)}static concat(...e){let t=Ci.flatten(...e);return new Ci(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:r})=>t+r,0)),e}get indices(){if(jb.DataType.isDictionary(this._type)){if(!this._indices){let e=this._chunks;this._indices=e.length===1?e[0].indices:Ci.concat(...e.map(t=>t.indices))}return this._indices}return null}get dictionary(){return jb.DataType.isDictionary(this._type)?this._chunks[this._chunks.length-1].data.dictionary:null}[Symbol.iterator](){return new Bb(this._chunks)}clone(e=this._chunks){return new Ci(this._type,e)}concat(...e){return this.clone(Ci.flatten(this,...e))}slice(e,t){return SO.clampRange(this,e,t,this._sliceInternal)}getChildAt(e){if(e<0||e>=this._numChildren)return null;let t=this._children||(this._children=[]),r,n,s;return(r=t[e])?r:(n=(this._type.children||[])[e])&&(s=this._chunks.map(c=>c.getChildAt(e)).filter(c=>c!=null),s.length>0)?t[e]=new Ci(n.type,s):null}search(e,t){let r=e,n=this._chunkOffsets,s=n.length-1;if(r<0||r>=n[s])return null;if(s<=1)return t?t(this,0,r):[0,r];let c=0,_=0,v=0;do{if(c+1===s)return t?t(this,c,r-_):[c,r-_];v=c+(s-c)/2|0,r>=n[v]?c=v:s=v}while(r<n[s]&&r>=(_=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:r},n,s)=>r[n].set(s,t))}indexOf(e,t){return t&&typeof t=="number"?this.search(t,(r,n,s)=>this.indexOfInternal(r,n,s,e)):this.indexOfInternal(this,0,Math.max(0,t||0),e)}toArray(){let{chunks:e}=this,t=e.length,r=this._type.ArrayType;if(t<=0)return new r(0);if(t<=1)return e[0].toArray();let n=0,s=new Array(t);for(let v=-1;++v<t;)n+=(s[v]=e[v].toArray()).length;r!==s[0].constructor&&(r=s[0].constructor);let c=new r(n),_=r===Array?FO:OO;for(let v=-1,T=0;++v<t;)T=_(s[v],c,T);return c}getInternal({_chunks:e},t,r){return e[t].get(r)}isValidInternal({_chunks:e},t,r){return e[t].isValid(r)}indexOfInternal({_chunks:e},t,r,n){let s=t-1,c=e.length,_=r,v=0,T=-1;for(;++s<c;){if(~(T=e[s].indexOf(n,_)))return v+T;_=0,v+=e[s].length}return-1}_sliceInternal(e,t,r){let n=[],{chunks:s,_chunkOffsets:c}=e;for(let _=-1,v=s.length;++_<v;){let T=s[_],A=T.length,P=c[_];if(P>=r)break;if(t>=P+A)continue;if(P>=t&&P+A<=r){n.push(T);continue}let q=Math.max(0,t-P),J=Math.min(r-P,A);n.push(T.slice(q,J))}return e.clone(n)}};va.Chunked=Ci;function AO(i){let e=new Uint32Array((i||[]).length+1),t=e[0]=0,r=e.length;for(let n=0;++n<r;)e[n]=t+=i[n-1].length;return e}var OO=(i,e,t)=>(e.set(i,t),t+i.length),FO=(i,e,t)=>{let r=t;for(let n=-1,s=i.length;++n<s;)e[r++]=i[n];return r}});var Rn=C(ja=>{"use strict";Object.defineProperty(ja,"__esModule",{value:!0});ja.Column=void 0;var Ib=Qe(),Tb=Pe(),ol=dr(),Yr=class extends ol.Chunked{constructor(e,t=[],r){t=ol.Chunked.flatten(...t);super(e.type,t,r);if(this._field=e,t.length===1&&!(this instanceof al))return new al(e,t[0],this._chunkOffsets)}static new(...e){let[t,r,...n]=e;typeof t!="string"&&!(t instanceof Ib.Field)&&(r=t,t="");let s=ol.Chunked.flatten(Array.isArray(r)?[...r,...n]:r instanceof Tb.Vector?[r,...n]:[Tb.Vector.new(r,...n)]);if(typeof t=="string"){let c=s[0].data.type;t=new Ib.Field(t,c,!0)}else!t.nullable&&s.some(({nullCount:c})=>c>0)&&(t=t.clone({nullable:!0}));return new Yr(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 Yr(this._field,e)}getChildAt(e){if(e<0||e>=this.numChildren)return null;let t=this._children||(this._children=[]),r,n,s;return(r=t[e])?r:(n=(this.type.children||[])[e])&&(s=this._chunks.map(c=>c.getChildAt(e)).filter(c=>c!=null),s.length>0)?t[e]=new Yr(n,s):null}};ja.Column=Yr;var al=class extends Yr{constructor(e,t,r){super(e,[t],r);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 Sb=C(En=>{"use strict";Object.defineProperty(En,"__esModule",{value:!0});En.instance=En.TypeAssembler=void 0;var MO=Bi(),CO=MO.flatbuffers.Long,UO=nt(),$=Gi(),ul=class extends UO.Visitor{visit(e,t){return e==null||t==null?void 0:super.visit(e,t)}visitNull(e,t){return $.Null.startNull(t),$.Null.endNull(t)}visitInt(e,t){return $.Int.startInt(t),$.Int.addBitWidth(t,e.bitWidth),$.Int.addIsSigned(t,e.isSigned),$.Int.endInt(t)}visitFloat(e,t){return $.FloatingPoint.startFloatingPoint(t),$.FloatingPoint.addPrecision(t,e.precision),$.FloatingPoint.endFloatingPoint(t)}visitBinary(e,t){return $.Binary.startBinary(t),$.Binary.endBinary(t)}visitBool(e,t){return $.Bool.startBool(t),$.Bool.endBool(t)}visitUtf8(e,t){return $.Utf8.startUtf8(t),$.Utf8.endUtf8(t)}visitDecimal(e,t){return $.Decimal.startDecimal(t),$.Decimal.addScale(t,e.scale),$.Decimal.addPrecision(t,e.precision),$.Decimal.endDecimal(t)}visitDate(e,t){return $.Date.startDate(t),$.Date.addUnit(t,e.unit),$.Date.endDate(t)}visitTime(e,t){return $.Time.startTime(t),$.Time.addUnit(t,e.unit),$.Time.addBitWidth(t,e.bitWidth),$.Time.endTime(t)}visitTimestamp(e,t){let r=e.timezone&&t.createString(e.timezone)||void 0;return $.Timestamp.startTimestamp(t),$.Timestamp.addUnit(t,e.unit),r!==void 0&&$.Timestamp.addTimezone(t,r),$.Timestamp.endTimestamp(t)}visitInterval(e,t){return $.Interval.startInterval(t),$.Interval.addUnit(t,e.unit),$.Interval.endInterval(t)}visitList(e,t){return $.List.startList(t),$.List.endList(t)}visitStruct(e,t){return $.Struct_.startStruct_(t),$.Struct_.endStruct_(t)}visitUnion(e,t){$.Union.startTypeIdsVector(t,e.typeIds.length);let r=$.Union.createTypeIdsVector(t,e.typeIds);return $.Union.startUnion(t),$.Union.addMode(t,e.mode),$.Union.addTypeIds(t,r),$.Union.endUnion(t)}visitDictionary(e,t){let r=this.visit(e.indices,t);return $.DictionaryEncoding.startDictionaryEncoding(t),$.DictionaryEncoding.addId(t,new CO(e.id,0)),$.DictionaryEncoding.addIsOrdered(t,e.isOrdered),r!==void 0&&$.DictionaryEncoding.addIndexType(t,r),$.DictionaryEncoding.endDictionaryEncoding(t)}visitFixedSizeBinary(e,t){return $.FixedSizeBinary.startFixedSizeBinary(t),$.FixedSizeBinary.addByteWidth(t,e.byteWidth),$.FixedSizeBinary.endFixedSizeBinary(t)}visitFixedSizeList(e,t){return $.FixedSizeList.startFixedSizeList(t),$.FixedSizeList.addListSize(t,e.listSize),$.FixedSizeList.endFixedSizeList(t)}visitMap(e,t){return $.Map.startMap(t),$.Map.addKeysSorted(t,e.keysSorted),$.Map.endMap(t)}};En.TypeAssembler=ul;En.instance=new ul});var Ub=C(fi=>{"use strict";Object.defineProperty(fi,"__esModule",{value:!0});fi.fieldFromJSON=fi.dictionaryBatchFromJSON=fi.recordBatchFromJSON=fi.schemaFromJSON=void 0;var Nn=Qe(),Ae=me(),$r=Gr(),Pn=Be();function VO(i,e=new Map){return new Nn.Schema(RO(i,e),wa(i.customMetadata),e)}fi.schemaFromJSON=VO;function Db(i){return new $r.RecordBatch(i.count,Ob(i.columns),Fb(i.columns))}fi.recordBatchFromJSON=Db;function kO(i){return new $r.DictionaryBatch(Db(i.data),i.id,i.isDelta)}fi.dictionaryBatchFromJSON=kO;function RO(i,e){return(i.fields||[]).filter(Boolean).map(t=>Nn.Field.fromJSON(t,e))}function Ab(i,e){return(i.children||[]).filter(Boolean).map(t=>Nn.Field.fromJSON(t,e))}function Ob(i){return(i||[]).reduce((e,t)=>[...e,new $r.FieldNode(t.count,EO(t.VALIDITY)),...Ob(t.children)],[])}function Fb(i,e=[]){for(let t=-1,r=(i||[]).length;++t<r;){let n=i[t];n.VALIDITY&&e.push(new $r.BufferRegion(e.length,n.VALIDITY.length)),n.TYPE&&e.push(new $r.BufferRegion(e.length,n.TYPE.length)),n.OFFSET&&e.push(new $r.BufferRegion(e.length,n.OFFSET.length)),n.DATA&&e.push(new $r.BufferRegion(e.length,n.DATA.length)),e=Fb(n.children,e)}return e}function EO(i){return(i||[]).reduce((e,t)=>e+ +(t===0),0)}function NO(i,e){let t,r,n,s,c,_;return!e||!(s=i.dictionary)?(c=Cb(i,Ab(i,e)),n=new Nn.Field(i.name,c,i.nullable,wa(i.customMetadata))):e.has(t=s.id)?(r=(r=s.indexType)?Mb(r):new Ae.Int32,_=new Ae.Dictionary(e.get(t),r,t,s.isOrdered),n=new Nn.Field(i.name,_,i.nullable,wa(i.customMetadata))):(r=(r=s.indexType)?Mb(r):new Ae.Int32,e.set(t,c=Cb(i,Ab(i,e))),_=new Ae.Dictionary(c,r,t,s.isOrdered),n=new Nn.Field(i.name,_,i.nullable,wa(i.customMetadata))),n||null}fi.fieldFromJSON=NO;function wa(i){return new Map(Object.entries(i||{}))}function Mb(i){return new Ae.Int(i.isSigned,i.bitWidth)}function Cb(i,e){let t=i.type.name;switch(t){case"NONE":return new Ae.Null;case"null":return new Ae.Null;case"binary":return new Ae.Binary;case"utf8":return new Ae.Utf8;case"bool":return new Ae.Bool;case"list":return new Ae.List((e||[])[0]);case"struct":return new Ae.Struct(e||[]);case"struct_":return new Ae.Struct(e||[])}switch(t){case"int":{let r=i.type;return new Ae.Int(r.isSigned,r.bitWidth)}case"floatingpoint":{let r=i.type;return new Ae.Float(Pn.Precision[r.precision])}case"decimal":{let r=i.type;return new Ae.Decimal(r.scale,r.precision)}case"date":{let r=i.type;return new Ae.Date_(Pn.DateUnit[r.unit])}case"time":{let r=i.type;return new Ae.Time(Pn.TimeUnit[r.unit],r.bitWidth)}case"timestamp":{let r=i.type;return new Ae.Timestamp(Pn.TimeUnit[r.unit],r.timezone)}case"interval":{let r=i.type;return new Ae.Interval(Pn.IntervalUnit[r.unit])}case"union":{let r=i.type;return new Ae.Union(Pn.UnionMode[r.mode],r.typeIds||[],e||[])}case"fixedsizebinary":{let r=i.type;return new Ae.FixedSizeBinary(r.byteWidth)}case"fixedsizelist":{let r=i.type;return new Ae.FixedSizeList(r.listSize,(e||[])[0])}case"map":{let r=i.type;return new Ae.Map_((e||[])[0],r.keysSorted)}}throw new Error(`Unrecognized type: "${t}"`)}});var Gr=C(kt=>{"use strict";Object.defineProperty(kt,"__esModule",{value:!0});kt.FieldNode=kt.BufferRegion=kt.DictionaryBatch=kt.RecordBatch=kt.Message=void 0;var cl=Bi(),H=Gi(),Me=So(),tt=Qe(),PO=Ge(),Re=Be(),ll=Sb(),Ba=Ub(),Jr=cl.flatbuffers.Long,xO=cl.flatbuffers.Builder,LO=cl.flatbuffers.ByteBuffer,Oe=me(),fr=class{constructor(e,t,r,n){this._version=t,this._headerType=r,this.body=new Uint8Array(0),n&&(this._createHeader=()=>n),this._bodyLength=typeof e=="number"?e:e.low}static fromJSON(e,t){let r=new fr(0,Re.MetadataVersion.V4,t);return r._createHeader=qO(e,t),r}static decode(e){e=new LO(PO.toUint8Array(e));let t=Me.Message.getRootAsMessage(e),r=t.bodyLength(),n=t.version(),s=t.headerType(),c=new fr(r,n,s);return c._createHeader=zO(t,s),c}static encode(e){let t=new xO,r=-1;return e.isSchema()?r=tt.Schema.encode(t,e.header()):e.isRecordBatch()?r=Vt.encode(t,e.header()):e.isDictionaryBatch()&&(r=hi.encode(t,e.header())),Me.Message.startMessage(t),Me.Message.addVersion(t,Re.MetadataVersion.V4),Me.Message.addHeader(t,r),Me.Message.addHeaderType(t,e.headerType),Me.Message.addBodyLength(t,new Jr(e.bodyLength,0)),Me.Message.finishMessageBuffer(t,Me.Message.endMessage(t)),t.asUint8Array()}static from(e,t=0){if(e instanceof tt.Schema)return new fr(0,Re.MetadataVersion.V4,Re.MessageHeader.Schema,e);if(e instanceof Vt)return new fr(t,Re.MetadataVersion.V4,Re.MessageHeader.RecordBatch,e);if(e instanceof hi)return new fr(t,Re.MetadataVersion.V4,Re.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===Re.MessageHeader.Schema}isRecordBatch(){return this.headerType===Re.MessageHeader.RecordBatch}isDictionaryBatch(){return this.headerType===Re.MessageHeader.DictionaryBatch}};kt.Message=fr;var Vt=class{constructor(e,t,r){this._nodes=t,this._buffers=r,this._length=typeof e=="number"?e:e.low}get nodes(){return this._nodes}get length(){return this._length}get buffers(){return this._buffers}};kt.RecordBatch=Vt;var hi=class{constructor(e,t,r=!1){this._data=e,this._isDelta=r,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}};kt.DictionaryBatch=hi;var Kr=class{constructor(e,t){this.offset=typeof e=="number"?e:e.low,this.length=typeof t=="number"?t:t.low}};kt.BufferRegion=Kr;var Zr=class{constructor(e,t){this.length=typeof e=="number"?e:e.low,this.nullCount=typeof t=="number"?t:t.low}};kt.FieldNode=Zr;function qO(i,e){return()=>{switch(e){case Re.MessageHeader.Schema:return tt.Schema.fromJSON(i);case Re.MessageHeader.RecordBatch:return Vt.fromJSON(i);case Re.MessageHeader.DictionaryBatch:return hi.fromJSON(i)}throw new Error(`Unrecognized Message type: { name: ${Re.MessageHeader[e]}, type: ${e} }`)}}function zO(i,e){return()=>{switch(e){case Re.MessageHeader.Schema:return tt.Schema.decode(i.header(new H.Schema));case Re.MessageHeader.RecordBatch:return Vt.decode(i.header(new Me.RecordBatch),i.version());case Re.MessageHeader.DictionaryBatch:return hi.decode(i.header(new Me.DictionaryBatch),i.version())}throw new Error(`Unrecognized Message type: { name: ${Re.MessageHeader[e]}, type: ${e} }`)}}tt.Field.encode=eF;tt.Field.decode=XO;tt.Field.fromJSON=Ba.fieldFromJSON;tt.Schema.encode=QO;tt.Schema.decode=WO;tt.Schema.fromJSON=Ba.schemaFromJSON;Vt.encode=tF;Vt.decode=HO;Vt.fromJSON=Ba.recordBatchFromJSON;hi.encode=iF;hi.decode=YO;hi.fromJSON=Ba.dictionaryBatchFromJSON;Zr.encode=rF;Zr.decode=GO;Kr.encode=nF;Kr.decode=$O;function WO(i,e=new Map){let t=ZO(i,e);return new tt.Schema(t,Ia(i),e)}function HO(i,e=Re.MetadataVersion.V4){return new Vt(i.length(),JO(i),KO(i,e))}function YO(i,e=Re.MetadataVersion.V4){return new hi(Vt.decode(i.data(),e),i.id(),i.isDelta())}function $O(i){return new Kr(i.offset(),i.length())}function GO(i){return new Zr(i.length(),i.nullCount())}function JO(i){let e=[];for(let t,r=-1,n=-1,s=i.nodesLength();++r<s;)(t=i.nodes(r))&&(e[++n]=Zr.decode(t));return e}function KO(i,e){let t=[];for(let r,n=-1,s=-1,c=i.buffersLength();++n<c;)(r=i.buffers(n))&&(e<Re.MetadataVersion.V4&&(r.bb_pos+=8*(n+1)),t[++s]=Kr.decode(r));return t}function ZO(i,e){let t=[];for(let r,n=-1,s=-1,c=i.fieldsLength();++n<c;)(r=i.fields(n))&&(t[++s]=tt.Field.decode(r,e));return t}function Vb(i,e){let t=[];for(let r,n=-1,s=-1,c=i.childrenLength();++n<c;)(r=i.children(n))&&(t[++s]=tt.Field.decode(r,e));return t}function XO(i,e){let t,r,n,s,c,_;return!e||!(_=i.dictionary())?(n=Rb(i,Vb(i,e)),r=new tt.Field(i.name(),n,i.nullable(),Ia(i))):e.has(t=_.id().low)?(s=(s=_.indexType())?kb(s):new Oe.Int32,c=new Oe.Dictionary(e.get(t),s,t,_.isOrdered()),r=new tt.Field(i.name(),c,i.nullable(),Ia(i))):(s=(s=_.indexType())?kb(s):new Oe.Int32,e.set(t,n=Rb(i,Vb(i,e))),c=new Oe.Dictionary(n,s,t,_.isOrdered()),r=new tt.Field(i.name(),c,i.nullable(),Ia(i))),r||null}function Ia(i){let e=new Map;if(i)for(let t,r,n=-1,s=i.customMetadataLength()|0;++n<s;)(t=i.customMetadata(n))&&(r=t.key())!=null&&e.set(r,t.value());return e}function kb(i){return new Oe.Int(i.isSigned(),i.bitWidth())}function Rb(i,e){let t=i.typeType();switch(t){case H.Type.NONE:return new Oe.Null;case H.Type.Null:return new Oe.Null;case H.Type.Binary:return new Oe.Binary;case H.Type.Utf8:return new Oe.Utf8;case H.Type.Bool:return new Oe.Bool;case H.Type.List:return new Oe.List((e||[])[0]);case H.Type.Struct_:return new Oe.Struct(e||[])}switch(t){case H.Type.Int:{let r=i.type(new H.Int);return new Oe.Int(r.isSigned(),r.bitWidth())}case H.Type.FloatingPoint:{let r=i.type(new H.FloatingPoint);return new Oe.Float(r.precision())}case H.Type.Decimal:{let r=i.type(new H.Decimal);return new Oe.Decimal(r.scale(),r.precision())}case H.Type.Date:{let r=i.type(new H.Date);return new Oe.Date_(r.unit())}case H.Type.Time:{let r=i.type(new H.Time);return new Oe.Time(r.unit(),r.bitWidth())}case H.Type.Timestamp:{let r=i.type(new H.Timestamp);return new Oe.Timestamp(r.unit(),r.timezone())}case H.Type.Interval:{let r=i.type(new H.Interval);return new Oe.Interval(r.unit())}case H.Type.Union:{let r=i.type(new H.Union);return new Oe.Union(r.mode(),r.typeIdsArray()||[],e||[])}case H.Type.FixedSizeBinary:{let r=i.type(new H.FixedSizeBinary);return new Oe.FixedSizeBinary(r.byteWidth())}case H.Type.FixedSizeList:{let r=i.type(new H.FixedSizeList);return new Oe.FixedSizeList(r.listSize(),(e||[])[0])}case H.Type.Map:{let r=i.type(new H.Map);return new Oe.Map_((e||[])[0],r.keysSorted())}}throw new Error(`Unrecognized type: "${H.Type[t]}" (${t})`)}function QO(i,e){let t=e.fields.map(s=>tt.Field.encode(i,s));H.Schema.startFieldsVector(i,t.length);let r=H.Schema.createFieldsVector(i,t),n=e.metadata&&e.metadata.size>0?H.Schema.createCustomMetadataVector(i,[...e.metadata].map(([s,c])=>{let _=i.createString(`${s}`),v=i.createString(`${c}`);return H.KeyValue.startKeyValue(i),H.KeyValue.addKey(i,_),H.KeyValue.addValue(i,v),H.KeyValue.endKeyValue(i)})):-1;return H.Schema.startSchema(i),H.Schema.addFields(i,r),H.Schema.addEndianness(i,sF?H.Endianness.Little:H.Endianness.Big),n!==-1&&H.Schema.addCustomMetadata(i,n),H.Schema.endSchema(i)}function eF(i,e){let t=-1,r=-1,n=-1,s=e.type,c=e.typeId;Oe.DataType.isDictionary(s)?(c=s.dictionary.typeId,n=ll.instance.visit(s,i),r=ll.instance.visit(s.dictionary,i)):r=ll.instance.visit(s,i);let _=(s.children||[]).map(A=>tt.Field.encode(i,A)),v=H.Field.createChildrenVector(i,_),T=e.metadata&&e.metadata.size>0?H.Field.createCustomMetadataVector(i,[...e.metadata].map(([A,P])=>{let q=i.createString(`${A}`),J=i.createString(`${P}`);return H.KeyValue.startKeyValue(i),H.KeyValue.addKey(i,q),H.KeyValue.addValue(i,J),H.KeyValue.endKeyValue(i)})):-1;return e.name&&(t=i.createString(e.name)),H.Field.startField(i),H.Field.addType(i,r),H.Field.addTypeType(i,c),H.Field.addChildren(i,v),H.Field.addNullable(i,!!e.nullable),t!==-1&&H.Field.addName(i,t),n!==-1&&H.Field.addDictionary(i,n),T!==-1&&H.Field.addCustomMetadata(i,T),H.Field.endField(i)}function tF(i,e){let t=e.nodes||[],r=e.buffers||[];Me.RecordBatch.startNodesVector(i,t.length),t.slice().reverse().forEach(c=>Zr.encode(i,c));let n=i.endVector();Me.RecordBatch.startBuffersVector(i,r.length),r.slice().reverse().forEach(c=>Kr.encode(i,c));let s=i.endVector();return Me.RecordBatch.startRecordBatch(i),Me.RecordBatch.addLength(i,new Jr(e.length,0)),Me.RecordBatch.addNodes(i,n),Me.RecordBatch.addBuffers(i,s),Me.RecordBatch.endRecordBatch(i)}function iF(i,e){let t=Vt.encode(i,e.data);return Me.DictionaryBatch.startDictionaryBatch(i),Me.DictionaryBatch.addId(i,new Jr(e.id,0)),Me.DictionaryBatch.addIsDelta(i,e.isDelta),Me.DictionaryBatch.addData(i,t),Me.DictionaryBatch.endDictionaryBatch(i)}function rF(i,e){return Me.FieldNode.createFieldNode(i,new Jr(e.length,0),new Jr(e.nullCount,0))}function nF(i,e){return H.Buffer.createBuffer(i,new Jr(e.offset,0),new Jr(e.length,0))}var sF=function(){let i=new ArrayBuffer(2);return new DataView(i).setInt16(0,256,!0),new Int16Array(i)[0]===256}()});var Sa=C(he=>{"use strict";Object.defineProperty(he,"__esModule",{value:!0});he.magicX2AndPadding=he.magicAndPadding=he.magicLength=he.checkForMagicArrowString=he.MAGIC=he.MAGIC_STR=he.PADDING=he.JSONMessageReader=he.AsyncMessageReader=he.MessageReader=void 0;var hr=at(),pr=Be(),oF=Bi(),Eb=oF.flatbuffers.ByteBuffer,Fs=Gr(),aF=ut(),uF=Zc(),Nb=Ge(),Ta=ar(),Kt=cn(),dl=i=>`Expected ${pr.MessageHeader[i]} Message in stream, but was null or length 0.`,fl=i=>`Header pointer of flatbuffer-encoded ${pr.MessageHeader[i]} Message is null or length 0.`,Pb=(i,e)=>`Expected to read ${i} metadata bytes, but only read ${e}.`,xb=(i,e)=>`Expected to read ${i} bytes for message body, but only read ${e}.`,hl=class{constructor(e){this.source=e instanceof Ta.ByteStream?e:new Ta.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?Kt.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(dl(e));return t.value}readMessageBody(e){if(e<=0)return new Uint8Array(0);let t=Nb.toUint8Array(this.source.read(e));if(t.byteLength<e)throw new Error(xb(e,t.byteLength));return t.byteOffset%8==0&&t.byteOffset+t.byteLength<=t.buffer.byteLength?t:t.slice()}readSchema(e=!1){let t=pr.MessageHeader.Schema,r=this.readMessage(t),n=r==null?void 0:r.header();if(e&&!n)throw new Error(fl(t));return n}readMetadataLength(){let e=this.source.read(he.PADDING),t=e&&new Eb(e),r=(t==null?void 0:t.readInt32(0))||0;return{done:r===0,value:r}}readMetadata(e){let t=this.source.read(e);if(!t)return Kt.ITERATOR_DONE;if(t.byteLength<e)throw new Error(Pb(e,t.byteLength));return{done:!1,value:Fs.Message.decode(t)}}};he.MessageReader=hl;var Lb=class{constructor(e,t){this.source=e instanceof Ta.AsyncByteStream?e:aF.isFileHandle(e)?new uF.AsyncRandomAccessFile(e,t):new Ta.AsyncByteStream(e)}[Symbol.asyncIterator](){return this}next(){return hr.__awaiter(this,void 0,void 0,function*(){let e;return(e=yield this.readMetadataLength()).done||e.value===-1&&(e=yield this.readMetadataLength()).done||(e=yield this.readMetadata(e.value)).done?Kt.ITERATOR_DONE:e})}throw(e){return hr.__awaiter(this,void 0,void 0,function*(){return yield this.source.throw(e)})}return(e){return hr.__awaiter(this,void 0,void 0,function*(){return yield this.source.return(e)})}readMessage(e){return hr.__awaiter(this,void 0,void 0,function*(){let t;if((t=yield this.next()).done)return null;if(e!=null&&t.value.headerType!==e)throw new Error(dl(e));return t.value})}readMessageBody(e){return hr.__awaiter(this,void 0,void 0,function*(){if(e<=0)return new Uint8Array(0);let t=Nb.toUint8Array(yield this.source.read(e));if(t.byteLength<e)throw new Error(xb(e,t.byteLength));return t.byteOffset%8==0&&t.byteOffset+t.byteLength<=t.buffer.byteLength?t:t.slice()})}readSchema(e=!1){return hr.__awaiter(this,void 0,void 0,function*(){let t=pr.MessageHeader.Schema,r=yield this.readMessage(t),n=r==null?void 0:r.header();if(e&&!n)throw new Error(fl(t));return n})}readMetadataLength(){return hr.__awaiter(this,void 0,void 0,function*(){let e=yield this.source.read(he.PADDING),t=e&&new Eb(e),r=(t==null?void 0:t.readInt32(0))||0;return{done:r===0,value:r}})}readMetadata(e){return hr.__awaiter(this,void 0,void 0,function*(){let t=yield this.source.read(e);if(!t)return Kt.ITERATOR_DONE;if(t.byteLength<e)throw new Error(Pb(e,t.byteLength));return{done:!1,value:Fs.Message.decode(t)}})}};he.AsyncMessageReader=Lb;var qb=class extends hl{constructor(e){super(new Uint8Array(0));this._schema=!1,this._body=[],this._batchIndex=0,this._dictionaryIndex=0,this._json=e instanceof Kt.ArrowJSON?e:new Kt.ArrowJSON(e)}next(){let{_json:e}=this;if(!this._schema){this._schema=!0;let t=Fs.Message.fromJSON(e.schema,pr.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 r=Fs.Message.fromJSON(t,pr.MessageHeader.DictionaryBatch);return{done:!1,value:r}}if(this._batchIndex<e.batches.length){let t=e.batches[this._batchIndex++];this._body=t.columns;let r=Fs.Message.fromJSON(t,pr.MessageHeader.RecordBatch);return{done:!1,value:r}}return this._body=[],Kt.ITERATOR_DONE}readMessageBody(e){return t(this._body);function t(r){return(r||[]).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(dl(e));return t.value}readSchema(){let e=pr.MessageHeader.Schema,t=this.readMessage(e),r=t==null?void 0:t.header();if(!t||!r)throw new Error(fl(e));return r}};he.JSONMessageReader=qb;he.PADDING=4;he.MAGIC_STR="ARROW1";he.MAGIC=new Uint8Array(he.MAGIC_STR.length);for(let i=0;i<he.MAGIC_STR.length;i+=1|0)he.MAGIC[i]=he.MAGIC_STR.charCodeAt(i);function cF(i,e=0){for(let t=-1,r=he.MAGIC.length;++t<r;)if(he.MAGIC[t]!==i[e+t])return!1;return!0}he.checkForMagicArrowString=cF;he.magicLength=he.MAGIC.length;he.magicAndPadding=he.magicLength+he.PADDING;he.magicX2AndPadding=he.magicLength*2+he.PADDING});var ml=C(Ee=>{"use strict";Object.defineProperty(Ee,"__esModule",{value:!0});Ee.compareTypes=Ee.compareFields=Ee.compareSchemas=Ee.instance=Ee.TypeComparator=void 0;var lF=nt(),K=class extends lF.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((r,n)=>this.compareFields(r,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)}};Ee.TypeComparator=K;function _t(i,e){return e instanceof i.constructor}function Ms(i,e){return i===e||_t(i,e)}function Ui(i,e){return i===e||_t(i,e)&&i.bitWidth===e.bitWidth&&i.isSigned===e.isSigned}function Da(i,e){return i===e||_t(i,e)&&i.precision===e.precision}function dF(i,e){return i===e||_t(i,e)&&i.byteWidth===e.byteWidth}function pl(i,e){return i===e||_t(i,e)&&i.unit===e.unit}function Cs(i,e){return i===e||_t(i,e)&&i.unit===e.unit&&i.timezone===e.timezone}function Us(i,e){return i===e||_t(i,e)&&i.unit===e.unit&&i.bitWidth===e.bitWidth}function fF(i,e){return i===e||_t(i,e)&&i.children.length===e.children.length&&Ee.instance.compareManyFields(i.children,e.children)}function hF(i,e){return i===e||_t(i,e)&&i.children.length===e.children.length&&Ee.instance.compareManyFields(i.children,e.children)}function yl(i,e){return i===e||_t(i,e)&&i.mode===e.mode&&i.typeIds.every((t,r)=>t===e.typeIds[r])&&Ee.instance.compareManyFields(i.children,e.children)}function pF(i,e){return i===e||_t(i,e)&&i.id===e.id&&i.isOrdered===e.isOrdered&&Ee.instance.visit(i.indices,e.indices)&&Ee.instance.visit(i.dictionary,e.dictionary)}function _l(i,e){return i===e||_t(i,e)&&i.unit===e.unit}function yF(i,e){return i===e||_t(i,e)&&i.listSize===e.listSize&&i.children.length===e.children.length&&Ee.instance.compareManyFields(i.children,e.children)}function _F(i,e){return i===e||_t(i,e)&&i.keysSorted===e.keysSorted&&i.children.length===e.children.length&&Ee.instance.compareManyFields(i.children,e.children)}K.prototype.visitNull=Ms;K.prototype.visitBool=Ms;K.prototype.visitInt=Ui;K.prototype.visitInt8=Ui;K.prototype.visitInt16=Ui;K.prototype.visitInt32=Ui;K.prototype.visitInt64=Ui;K.prototype.visitUint8=Ui;K.prototype.visitUint16=Ui;K.prototype.visitUint32=Ui;K.prototype.visitUint64=Ui;K.prototype.visitFloat=Da;K.prototype.visitFloat16=Da;K.prototype.visitFloat32=Da;K.prototype.visitFloat64=Da;K.prototype.visitUtf8=Ms;K.prototype.visitBinary=Ms;K.prototype.visitFixedSizeBinary=dF;K.prototype.visitDate=pl;K.prototype.visitDateDay=pl;K.prototype.visitDateMillisecond=pl;K.prototype.visitTimestamp=Cs;K.prototype.visitTimestampSecond=Cs;K.prototype.visitTimestampMillisecond=Cs;K.prototype.visitTimestampMicrosecond=Cs;K.prototype.visitTimestampNanosecond=Cs;K.prototype.visitTime=Us;K.prototype.visitTimeSecond=Us;K.prototype.visitTimeMillisecond=Us;K.prototype.visitTimeMicrosecond=Us;K.prototype.visitTimeNanosecond=Us;K.prototype.visitDecimal=Ms;K.prototype.visitList=fF;K.prototype.visitStruct=hF;K.prototype.visitUnion=yl;K.prototype.visitDenseUnion=yl;K.prototype.visitSparseUnion=yl;K.prototype.visitDictionary=pF;K.prototype.visitInterval=_l;K.prototype.visitIntervalDayTime=_l;K.prototype.visitIntervalYearMonth=_l;K.prototype.visitFixedSizeList=yF;K.prototype.visitMap=_F;Ee.instance=new K;function mF(i,e){return Ee.instance.compareSchemas(i,e)}Ee.compareSchemas=mF;function bF(i,e){return Ee.instance.compareFields(i,e)}Ee.compareFields=bF;function gF(i,e){return Ee.instance.visit(i,e)}Ee.compareTypes=gF});var $b=C(Aa=>{"use strict";Object.defineProperty(Aa,"__esModule",{value:!0});Aa.VectorAssembler=void 0;var vF=nt(),zb=Be(),jF=Vi(),bl=Ge(),gl=si(),wF=Hr(),Wb=Gr(),Hb=me(),Ye=class extends vF.Visitor{constructor(){super();this._byteLength=0,this._nodes=[],this._buffers=[],this._bufferRegions=[]}static assemble(...e){let t=new Ye,r=wF.selectVectorChildrenArgs(jF.RecordBatch,e),[n=t]=t.visitMany(r);return n}visit(e){if(!Hb.DataType.isDictionary(e.type)){let{data:t,length:r,nullCount:n}=e;if(r>2147483647)throw new RangeError("Cannot write arrays larger than 2^31 - 1 in length");Hb.DataType.isNull(e.type)||Zt.call(this,n<=0?new Uint8Array(0):gl.truncateBitmap(t.offset,r,t.nullBitmap)),this.nodes.push(new Wb.FieldNode(r,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}};Aa.VectorAssembler=Ye;function Zt(i){let e=i.byteLength+7&~7;return this.buffers.push(i),this.bufferRegions.push(new Wb.BufferRegion(this._byteLength,e)),this._byteLength+=e,this}function BF(i){let{type:e,length:t,typeIds:r,valueOffsets:n}=i;if(Zt.call(this,r),e.mode===zb.UnionMode.Sparse)return jl.call(this,i);if(e.mode===zb.UnionMode.Dense){if(i.offset<=0)return Zt.call(this,n),jl.call(this,i);{let s=r.reduce((A,P)=>Math.max(A,P),r[0]),c=new Int32Array(s+1),_=new Int32Array(s+1).fill(-1),v=new Int32Array(t),T=bl.rebaseValueOffsets(-n[0],t,n);for(let A,P,q=-1;++q<t;)(P=_[A=r[q]])===-1&&(P=_[A]=T[A]),v[q]=T[q]-P,++c[A];Zt.call(this,v);for(let A,P=-1,q=e.children.length;++P<q;)if(A=i.getChildAt(P)){let J=e.typeIds[P],Ce=Math.min(t,c[J]);this.visit(A.slice(_[J],Ce))}}}return this}function IF(i){let e;return i.nullCount>=i.length?Zt.call(this,new Uint8Array(0)):(e=i.values)instanceof Uint8Array?Zt.call(this,gl.truncateBitmap(i.offset,i.length,e)):Zt.call(this,gl.packBools(i))}function yr(i){return Zt.call(this,i.values.subarray(0,i.length*i.stride))}function Yb(i){let{length:e,values:t,valueOffsets:r}=i,n=r[0],s=r[e],c=Math.min(s-n,t.byteLength-n);return Zt.call(this,bl.rebaseValueOffsets(-r[0],e,r)),Zt.call(this,t.subarray(n,n+c)),this}function vl(i){let{length:e,valueOffsets:t}=i;return t&&Zt.call(this,bl.rebaseValueOffsets(t[0],e,t)),this.visit(i.getChildAt(0))}function jl(i){return this.visitMany(i.type.children.map((e,t)=>i.getChildAt(t)).filter(Boolean))[0]}Ye.prototype.visitBool=IF;Ye.prototype.visitInt=yr;Ye.prototype.visitFloat=yr;Ye.prototype.visitUtf8=Yb;Ye.prototype.visitBinary=Yb;Ye.prototype.visitFixedSizeBinary=yr;Ye.prototype.visitDate=yr;Ye.prototype.visitTimestamp=yr;Ye.prototype.visitTime=yr;Ye.prototype.visitDecimal=yr;Ye.prototype.visitList=vl;Ye.prototype.visitStruct=jl;Ye.prototype.visitUnion=BF;Ye.prototype.visitInterval=yr;Ye.prototype.visitFixedSizeList=vl;Ye.prototype.visitMap=vl});var Jb=C(Oa=>{"use strict";Object.defineProperty(Oa,"__esModule",{value:!0});Oa.JSONTypeAssembler=void 0;var TF=nt(),ot=Gi(),xn=Be(),Gb=class extends TF.Visitor{visit(e){return e==null?void 0:super.visit(e)}visitNull({typeId:e}){return{name:ot.Type[e].toLowerCase()}}visitInt({typeId:e,bitWidth:t,isSigned:r}){return{name:ot.Type[e].toLowerCase(),bitWidth:t,isSigned:r}}visitFloat({typeId:e,precision:t}){return{name:ot.Type[e].toLowerCase(),precision:xn.Precision[t]}}visitBinary({typeId:e}){return{name:ot.Type[e].toLowerCase()}}visitBool({typeId:e}){return{name:ot.Type[e].toLowerCase()}}visitUtf8({typeId:e}){return{name:ot.Type[e].toLowerCase()}}visitDecimal({typeId:e,scale:t,precision:r}){return{name:ot.Type[e].toLowerCase(),scale:t,precision:r}}visitDate({typeId:e,unit:t}){return{name:ot.Type[e].toLowerCase(),unit:xn.DateUnit[t]}}visitTime({typeId:e,unit:t,bitWidth:r}){return{name:ot.Type[e].toLowerCase(),unit:xn.TimeUnit[t],bitWidth:r}}visitTimestamp({typeId:e,timezone:t,unit:r}){return{name:ot.Type[e].toLowerCase(),unit:xn.TimeUnit[r],timezone:t}}visitInterval({typeId:e,unit:t}){return{name:ot.Type[e].toLowerCase(),unit:xn.IntervalUnit[t]}}visitList({typeId:e}){return{name:ot.Type[e].toLowerCase()}}visitStruct({typeId:e}){return{name:ot.Type[e].toLowerCase()}}visitUnion({typeId:e,mode:t,typeIds:r}){return{name:ot.Type[e].toLowerCase(),mode:xn.UnionMode[t],typeIds:[...r]}}visitDictionary(e){return this.visit(e.dictionary)}visitFixedSizeBinary({typeId:e,byteWidth:t}){return{name:ot.Type[e].toLowerCase(),byteWidth:t}}visitFixedSizeList({typeId:e,listSize:t}){return{name:ot.Type[e].toLowerCase(),listSize:t}}visitMap({typeId:e,keysSorted:t}){return{name:ot.Type[e].toLowerCase(),keysSorted:t}}};Oa.JSONTypeAssembler=Gb});var Xb=C(Ca=>{"use strict";Object.defineProperty(Ca,"__esModule",{value:!0});Ca.JSONVectorAssembler=void 0;var SF=js(),Vs=Rn(),DF=Pe(),AF=nt(),OF=Be(),FF=Vi(),wl=Be(),Fa=si(),MF=Hr(),Kb=me(),Ma=class extends AF.Visitor{static assemble(...e){return new Ma().visitMany(MF.selectColumnChildrenArgs(FF.RecordBatch,e))}visit(e){let{data:t,name:r,length:n}=e,{offset:s,nullCount:c,nullBitmap:_}=t,v=Kb.DataType.isDictionary(e.type)?e.type.indices:e.type,T=Object.assign([],t.buffers,{[OF.BufferType.VALIDITY]:void 0});return Object.assign({name:r,count:n,VALIDITY:Kb.DataType.isNull(v)?void 0:c<=0?Array.from({length:n},()=>1):[...new Fa.BitIterator(_,s,n,null,Fa.getBit)]},super.visit(DF.Vector.new(t.clone(v,s,n,0,T))))}visitNull(){return{}}visitBool({values:e,offset:t,length:r}){return{DATA:[...new Fa.BitIterator(e,t,r,null,Fa.getBool)]}}visitInt(e){return{DATA:e.type.bitWidth<64?[...e.values]:[...ks(e.values,2)]}}visitFloat(e){return{DATA:[...e.values]}}visitUtf8(e){return{DATA:[...e],OFFSET:[...e.valueOffsets]}}visitBinary(e){return{DATA:[...Zb(e)],OFFSET:[...e.valueOffsets]}}visitFixedSizeBinary(e){return{DATA:[...Zb(e)]}}visitDate(e){return{DATA:e.type.unit===wl.DateUnit.DAY?[...e.values]:[...ks(e.values,2)]}}visitTimestamp(e){return{DATA:[...ks(e.values,2)]}}visitTime(e){return{DATA:e.type.unit<wl.TimeUnit.MICROSECOND?[...e.values]:[...ks(e.values,2)]}}visitDecimal(e){return{DATA:[...ks(e.values,4)]}}visitList(e){return{OFFSET:[...e.valueOffsets],children:e.type.children.map((t,r)=>this.visit(new Vs.Column(t,[e.getChildAt(r)])))}}visitStruct(e){return{children:e.type.children.map((t,r)=>this.visit(new Vs.Column(t,[e.getChildAt(r)])))}}visitUnion(e){return{TYPE:[...e.typeIds],OFFSET:e.type.mode===wl.UnionMode.Dense?[...e.valueOffsets]:void 0,children:e.type.children.map((t,r)=>this.visit(new Vs.Column(t,[e.getChildAt(r)])))}}visitInterval(e){return{DATA:[...e.values]}}visitFixedSizeList(e){return{children:e.type.children.map((t,r)=>this.visit(new Vs.Column(t,[e.getChildAt(r)])))}}visitMap(e){return{OFFSET:[...e.valueOffsets],children:e.type.children.map((t,r)=>this.visit(new Vs.Column(t,[e.getChildAt(r)])))}}};Ca.JSONVectorAssembler=Ma;function*Zb(i){for(let e of i)yield e.reduce((t,r)=>`${t}${("0"+(r&255).toString(16)).slice(-2)}`,"").toUpperCase()}function*ks(i,e){for(let t=-1,r=i.length/e;++t<r;)yield`${SF.BN.new(i.subarray((t+0)*e,(t+1)*e),!1)}`}});var Ea=C(yi=>{"use strict";Object.defineProperty(yi,"__esModule",{value:!0});yi.RecordBatchJSONWriter=yi.RecordBatchFileWriter=yi.RecordBatchStreamWriter=yi.RecordBatchWriter=void 0;var Qb=at(),Bl=Es(),CF=Sa(),UF=Rn(),VF=me(),kF=Qe(),Ua=Gr(),Il=Gr(),Ln=Gc(),Tl=Be(),eg=ml(),Sl=ar(),tg=$b(),RF=Jb(),ig=Xb(),EF=Ge(),Dl=Vi(),NF=cn(),pi=ut(),Rs=class extends NF.ReadableInterop{constructor(e){super();this._position=0,this._started=!1,this._sink=new Sl.AsyncByteQueue,this._schema=null,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._dictionaryDeltaOffsets=new Map,pi.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 pi.isPromise(e)?e.then(t=>this.writeAll(t)):pi.isAsyncIterable(e)?Ol(this,e):Al(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 Sl.AsyncByteQueue?this._sink=e:(this._sink=new Sl.AsyncByteQueue,e&&pi.isWritableDOMStream(e)?this.toDOMStream({type:"bytes"}).pipeTo(e):e&&pi.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||!eg.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 Bl.Table&&!(t=e.schema))return this.finish()&&void 0;if(e instanceof Dl.RecordBatch&&!(t=e.schema))return this.finish()&&void 0}else throw new Error("RecordBatchWriter is closed");if(t&&!eg.compareSchemas(t,this._schema)){if(this._started&&this._autoDestroy)return this.close();this.reset(this._sink,t)}e instanceof Dl.RecordBatch?e instanceof Dl._InternalEmptyPlaceholderRecordBatch||this._writeRecordBatch(e):e instanceof Bl.Table?this.writeAll(e.chunks):pi.isIterable(e)&&this.writeAll(e)}_writeMessage(e,t=8){let r=t-1,n=Ua.Message.encode(e),s=n.byteLength,c=this._writeLegacyIpcFormat?4:8,_=s+c+r&~r,v=_-s-c;return e.headerType===Tl.MessageHeader.RecordBatch?this._recordBatchBlocks.push(new Ln.FileBlock(_,e.bodyLength,this._position)):e.headerType===Tl.MessageHeader.DictionaryBatch&&this._dictionaryBlocks.push(new Ln.FileBlock(_,e.bodyLength,this._position)),this._writeLegacyIpcFormat||this._write(Int32Array.of(-1)),this._write(Int32Array.of(_-c)),s>0&&this._write(n),this._writePadding(v)}_write(e){if(this._started){let t=EF.toUint8Array(e);t&&t.byteLength>0&&(this._sink.write(t),this._position+=t.byteLength)}return this}_writeSchema(e){return this._writeMessage(Ua.Message.from(e))}_writeFooter(e){return this._writeLegacyIpcFormat?this._write(Int32Array.of(0)):this._write(Int32Array.of(-1,0))}_writeMagic(){return this._write(CF.MAGIC)}_writePadding(e){return e>0?this._write(new Uint8Array(e)):this}_writeRecordBatch(e){let{byteLength:t,nodes:r,bufferRegions:n,buffers:s}=tg.VectorAssembler.assemble(e),c=new Il.RecordBatch(e.length,r,n),_=Ua.Message.from(c,t);return this._writeDictionaries(e)._writeMessage(_)._writeBodyBuffers(s)}_writeDictionaryBatch(e,t,r=!1){this._dictionaryDeltaOffsets.set(t,e.length+(this._dictionaryDeltaOffsets.get(t)||0));let{byteLength:n,nodes:s,bufferRegions:c,buffers:_}=tg.VectorAssembler.assemble(e),v=new Il.RecordBatch(e.length,s,c),T=new Il.DictionaryBatch(v,t,r),A=Ua.Message.from(T,n);return this._writeMessage(A)._writeBodyBuffers(_)}_writeBodyBuffers(e){let t,r,n;for(let s=-1,c=e.length;++s<c;)(t=e[s])&&(r=t.byteLength)>0&&(this._write(t),(n=(r+7&~7)-r)>0&&this._writePadding(n));return this}_writeDictionaries(e){for(let[t,r]of e.dictionaries){let n=this._dictionaryDeltaOffsets.get(t)||0;if(n===0||(r=r.slice(n)).length>0){let s="chunks"in r?r.chunks:[r];for(let c of s)this._writeDictionaryBatch(c,t,n>0),n+=c.length}}return this}};yi.RecordBatchWriter=Rs;var Va=class extends Rs{static writeAll(e,t){let r=new Va(t);return pi.isPromise(e)?e.then(n=>r.writeAll(n)):pi.isAsyncIterable(e)?Ol(r,e):Al(r,e)}};yi.RecordBatchStreamWriter=Va;var ka=class extends Rs{static writeAll(e){let t=new ka;return pi.isPromise(e)?e.then(r=>t.writeAll(r)):pi.isAsyncIterable(e)?Ol(t,e):Al(t,e)}constructor(){super();this._autoDestroy=!0}_writeSchema(e){return this._writeMagic()._writePadding(2)}_writeFooter(e){let t=Ln.Footer.encode(new Ln.Footer(e,Tl.MetadataVersion.V4,this._recordBatchBlocks,this._dictionaryBlocks));return super._writeFooter(e)._write(t)._write(Int32Array.of(t.byteLength))._writeMagic()}};yi.RecordBatchFileWriter=ka;var Ra=class extends Rs{constructor(){super();this._autoDestroy=!0,this._recordBatches=[],this._dictionaries=[]}static writeAll(e){return new Ra().writeAll(e)}_writeMessage(){return this}_writeFooter(e){return this}_writeSchema(e){return this._write(`{
|
|
8
|
+
"schema": ${JSON.stringify({fields:e.fields.map(rg)},null,2)}`)}_writeDictionaries(e){return e.dictionaries.size>0&&this._dictionaries.push(e),this}_writeDictionaryBatch(e,t,r=!1){return this._dictionaryDeltaOffsets.set(t,e.length+(this._dictionaryDeltaOffsets.get(t)||0)),this._write(this._dictionaryBlocks.length===0?" ":`,
|
|
9
|
+
`),this._write(`${PF(e,t,r)}`),this._dictionaryBlocks.push(new Ln.FileBlock(0,0,0)),this}_writeRecordBatch(e){return this._writeDictionaries(e),this._recordBatches.push(e),this}close(){if(this._dictionaries.length>0){this._write(`,
|
|
10
|
+
"dictionaries": [
|
|
11
|
+
`);for(let e of this._dictionaries)super._writeDictionaries(e);this._write(`
|
|
12
|
+
]`)}if(this._recordBatches.length>0){for(let e=-1,t=this._recordBatches.length;++e<t;)this._write(e===0?`,
|
|
13
|
+
"batches": [
|
|
14
|
+
`:`,
|
|
15
|
+
`),this._write(`${xF(this._recordBatches[e])}`),this._recordBatchBlocks.push(new Ln.FileBlock(0,0,0));this._write(`
|
|
16
|
+
]`)}return this._schema&&this._write(`
|
|
17
|
+
}`),this._dictionaries=[],this._recordBatches=[],super.close()}};yi.RecordBatchJSONWriter=Ra;function Al(i,e){let t=e;e instanceof Bl.Table&&(t=e.chunks,i.reset(void 0,e.schema));for(let r of t)i.write(r);return i.finish()}function Ol(i,e){var t,r,n,s;return Qb.__awaiter(this,void 0,void 0,function*(){try{for(t=Qb.__asyncValues(e);r=yield t.next(),!r.done;){let c=r.value;i.write(c)}}catch(c){n={error:c}}finally{try{r&&!r.done&&(s=t.return)&&(yield s.call(t))}finally{if(n)throw n.error}}return i.finish()})}function rg({name:i,type:e,nullable:t}){let r=new RF.JSONTypeAssembler;return{name:i,nullable:t,type:r.visit(e),children:(e.children||[]).map(rg),dictionary:VF.DataType.isDictionary(e)?{id:e.id,isOrdered:e.isOrdered,indexType:r.visit(e.indices)}:void 0}}function PF(i,e,t=!1){let r=new kF.Field(`${e}`,i.type,i.nullCount>0),n=ig.JSONVectorAssembler.assemble(new UF.Column(r,[i]));return JSON.stringify({id:e,isDelta:t,data:{count:i.length,columns:n}},null,2)}function xF(i){return JSON.stringify({count:i.length,columns:ig.JSONVectorAssembler.assemble(i)},null,2)}});var Cl=C(_r=>{"use strict";Object.defineProperty(_r,"__esModule",{value:!0});_r.distributeVectorsIntoRecordBatches=_r.distributeColumnsIntoRecordBatches=_r.ensureSameLengthData=void 0;var ng=Yt(),Fl=Qe(),LF=dr(),qF=Vi(),Ml=new Uint8Array(0),sg=i=>[Ml,Ml,new Uint8Array(i),Ml];function zF(i,e,t=e.reduce((r,n)=>Math.max(r,n.length),0)){let r,n,s=-1,c=e.length,_=[...i.fields],v=[],T=(t+63&~63)>>3;for(;++s<c;)(r=e[s])&&r.length===t?v[s]=r:((n=_[s]).nullable||(_[s]=_[s].clone({nullable:!0})),v[s]=r?r._changeLengthAndBackfillNullBitmap(t):ng.Data.new(n.type,0,t,t,sg(T)));return[new Fl.Schema(_),t,v]}_r.ensureSameLengthData=zF;function WF(i){return og(new Fl.Schema(i.map(({field:e})=>e)),i)}_r.distributeColumnsIntoRecordBatches=WF;function og(i,e){return HF(i,e.map(t=>t instanceof LF.Chunked?t.chunks.map(r=>r.data):[t.data]))}_r.distributeVectorsIntoRecordBatches=og;function HF(i,e){let t=[...i.fields],r=[],n={numBatches:e.reduce((P,q)=>Math.max(P,q.length),0)},s=0,c=0,_=-1,v=e.length,T,A=[];for(;n.numBatches-- >0;){for(c=Number.POSITIVE_INFINITY,_=-1;++_<v;)A[_]=T=e[_].shift(),c=Math.min(c,T?T.length:c);isFinite(c)&&(A=YF(t,c,A,e,n),c>0&&(r[s++]=[c,A.slice()]))}return[i=new Fl.Schema(t,i.metadata),r.map(P=>new qF.RecordBatch(i,...P))]}function YF(i,e,t,r,n){let s,c,_=0,v=-1,T=r.length,A=(e+63&~63)>>3;for(;++v<T;)(s=t[v])&&(_=s.length)>=e?_===e?t[v]=s:(t[v]=s.slice(0,e),s=s.slice(e,_-e),n.numBatches=Math.max(n.numBatches,r[v].unshift(s))):((c=i[v]).nullable||(i[v]=c.clone({nullable:!0})),t[v]=s?s._changeLengthAndBackfillNullBitmap(e):ng.Data.new(c.type,0,e,e,sg(A)));return t}});var Le=C(Na=>{"use strict";Object.defineProperty(Na,"__esModule",{value:!0});Na.BaseVector=void 0;var $F=Be(),GF=dr(),JF=Os(),Ul=Pe(),Vl=class extends Ul.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`${$F.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 Ul.Vector.new(e,t)}concat(...e){return GF.Chunked.concat(this,...e)}slice(e,t){return JF.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]=Ul.Vector.new(this.data.childData[e]))}toJSON(){return[...this]}_sliceInternal(e,t,r){return e.clone(e.data.slice(t,r-t),null)}_bindDataAccessors(e){}};Na.BaseVector=Vl;Vl.prototype[Symbol.isConcatSpreadable]=!0});var kl=C(Pa=>{"use strict";Object.defineProperty(Pa,"__esModule",{value:!0});Pa.BinaryVector=void 0;var KF=Pe(),ZF=Le(),XF=me(),ag=class extends ZF.BaseVector{asUtf8(){return KF.Vector.new(this.data.clone(new XF.Utf8))}};Pa.BinaryVector=ag});var Rl=C(xa=>{"use strict";Object.defineProperty(xa,"__esModule",{value:!0});xa.BoolVector=void 0;var QF=me(),eM=Le(),tM=_i(),ug=class extends eM.BaseVector{static from(e){return tM.vectorFromValuesWithType(()=>new QF.Bool,e)}};xa.BoolVector=ug});var Nl=C(mr=>{"use strict";Object.defineProperty(mr,"__esModule",{value:!0});mr.DateMillisecondVector=mr.DateDayVector=mr.DateVector=void 0;var iM=Be(),rM=Le(),cg=_i(),El=me(),La=class extends rM.BaseVector{static from(...e){return e.length===2?cg.vectorFromValuesWithType(()=>e[1]===iM.DateUnit.DAY?new El.DateDay:new El.DateMillisecond,e[0]):cg.vectorFromValuesWithType(()=>new El.DateMillisecond,e[0])}};mr.DateVector=La;var lg=class extends La{};mr.DateDayVector=lg;var dg=class extends La{};mr.DateMillisecondVector=dg});var Pl=C(qa=>{"use strict";Object.defineProperty(qa,"__esModule",{value:!0});qa.DecimalVector=void 0;var nM=Le(),fg=class extends nM.BaseVector{};qa.DecimalVector=fg});var Wa=C(za=>{"use strict";Object.defineProperty(za,"__esModule",{value:!0});za.DictionaryVector=void 0;var sM=Yt(),hg=Pe(),oM=Le(),aM=_i(),uM=me(),xl=class extends oM.BaseVector{constructor(e){super(e);this.indices=hg.Vector.new(e.clone(this.type.indices))}static from(...e){if(e.length===3){let[t,r,n]=e,s=new uM.Dictionary(t.type,r,null,null);return hg.Vector.new(sM.Data.Dictionary(s,0,n.length,0,null,n,t))}return aM.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)}};za.DictionaryVector=xl;xl.prototype.indices=null});var Ll=C(Ha=>{"use strict";Object.defineProperty(Ha,"__esModule",{value:!0});Ha.FixedSizeBinaryVector=void 0;var cM=Le(),pg=class extends cM.BaseVector{};Ha.FixedSizeBinaryVector=pg});var ql=C(Ya=>{"use strict";Object.defineProperty(Ya,"__esModule",{value:!0});Ya.FixedSizeListVector=void 0;var lM=Le(),yg=class extends lM.BaseVector{};Ya.FixedSizeListVector=yg});var Yl=C(mi=>{"use strict";Object.defineProperty(mi,"__esModule",{value:!0});mi.Float64Vector=mi.Float32Vector=mi.Float16Vector=mi.FloatVector=void 0;var dM=Yt(),fM=Pe(),hM=Le(),pM=_i(),Xr=me(),Ns=class extends hM.BaseVector{static from(e){let t=mM(this);if(e instanceof ArrayBuffer||ArrayBuffer.isView(e)){let r=_M(e.constructor)||t;if(t===null&&(t=r),t&&t===r){let n=new t,s=e.byteLength/n.ArrayType.BYTES_PER_ELEMENT;if(!yM(t,e.constructor))return fM.Vector.new(dM.Data.Float(n,0,s,0,null,e))}}if(t)return pM.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")}};mi.FloatVector=Ns;var zl=class extends Ns{toFloat32Array(){return new Float32Array(this)}toFloat64Array(){return new Float64Array(this)}};mi.Float16Vector=zl;var Wl=class extends Ns{};mi.Float32Vector=Wl;var Hl=class extends Ns{};mi.Float64Vector=Hl;var yM=(i,e)=>i===Xr.Float16&&e!==Uint16Array,_M=i=>{switch(i){case Uint16Array:return Xr.Float16;case Float32Array:return Xr.Float32;case Float64Array:return Xr.Float64;default:return null}},mM=i=>{switch(i){case zl:return Xr.Float16;case Wl:return Xr.Float32;case Hl:return Xr.Float64;default:return null}}});var $l=C(br=>{"use strict";Object.defineProperty(br,"__esModule",{value:!0});br.IntervalYearMonthVector=br.IntervalDayTimeVector=br.IntervalVector=void 0;var bM=Le(),$a=class extends bM.BaseVector{};br.IntervalVector=$a;var _g=class extends $a{};br.IntervalDayTimeVector=_g;var mg=class extends $a{};br.IntervalYearMonthVector=mg});var Ga=C($e=>{"use strict";Object.defineProperty($e,"__esModule",{value:!0});$e.Uint64Vector=$e.Uint32Vector=$e.Uint16Vector=$e.Uint8Vector=$e.Int64Vector=$e.Int32Vector=$e.Int16Vector=$e.Int8Vector=$e.IntVector=void 0;var gM=Yt(),vM=Pe(),jM=Le(),wM=_i(),bg=ut(),gg=Ge(),Ne=me(),bi=class extends jM.BaseVector{static from(...e){let[t,r=!1]=e,n=TM(this,r);if(t instanceof ArrayBuffer||ArrayBuffer.isView(t)){let s=IM(t.constructor,r)||n;if(n===null&&(n=s),n&&n===s){let c=new n,_=t.byteLength/c.ArrayType.BYTES_PER_ELEMENT;return BM(n,t.constructor)&&(_*=.5),vM.Vector.new(gM.Data.Int(c,0,_,0,null,t))}}if(n)return wM.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")}};$e.IntVector=bi;var Gl=class extends bi{};$e.Int8Vector=Gl;var Jl=class extends bi{};$e.Int16Vector=Jl;var Kl=class extends bi{};$e.Int32Vector=Kl;var Zl=class extends bi{toBigInt64Array(){return gg.toBigInt64Array(this.values)}get values64(){return this._values64||(this._values64=this.toBigInt64Array())}};$e.Int64Vector=Zl;var Xl=class extends bi{};$e.Uint8Vector=Xl;var Ql=class extends bi{};$e.Uint16Vector=Ql;var ed=class extends bi{};$e.Uint32Vector=ed;var td=class extends bi{toBigUint64Array(){return gg.toBigUint64Array(this.values)}get values64(){return this._values64||(this._values64=this.toBigUint64Array())}};$e.Uint64Vector=td;var BM=(i,e)=>(i===Ne.Int64||i===Ne.Uint64)&&(e===Int32Array||e===Uint32Array),IM=(i,e)=>{switch(i){case Int8Array:return Ne.Int8;case Int16Array:return Ne.Int16;case Int32Array:return e?Ne.Int64:Ne.Int32;case bg.BigInt64Array:return Ne.Int64;case Uint8Array:return Ne.Uint8;case Uint16Array:return Ne.Uint16;case Uint32Array:return e?Ne.Uint64:Ne.Uint32;case bg.BigUint64Array:return Ne.Uint64;default:return null}},TM=(i,e)=>{switch(i){case Gl:return Ne.Int8;case Jl:return Ne.Int16;case Kl:return e?Ne.Int64:Ne.Int32;case Zl:return Ne.Int64;case Xl:return Ne.Uint8;case Ql:return Ne.Uint16;case ed:return e?Ne.Uint64:Ne.Uint32;case td:return Ne.Uint64;default:return null}}});var id=C(Ja=>{"use strict";Object.defineProperty(Ja,"__esModule",{value:!0});Ja.ListVector=void 0;var SM=Le(),vg=class extends SM.BaseVector{};Ja.ListVector=vg});var rd=C(Ka=>{"use strict";Object.defineProperty(Ka,"__esModule",{value:!0});Ka.MapVector=void 0;var DM=Ds(),AM=Pe(),OM=Le(),FM=me(),jg=class extends OM.BaseVector{asList(){let e=this.type.children[0];return AM.Vector.new(this.data.clone(new FM.List(e)))}bind(e){let t=this.getChildAt(0),{[e]:r,[e+1]:n}=this.valueOffsets;return new DM.MapRow(t.slice(r,n))}};Ka.MapVector=jg});var nd=C(Za=>{"use strict";Object.defineProperty(Za,"__esModule",{value:!0});Za.NullVector=void 0;var MM=Le(),wg=class extends MM.BaseVector{};Za.NullVector=wg});var sd=C(Xa=>{"use strict";Object.defineProperty(Xa,"__esModule",{value:!0});Xa.StructVector=void 0;var CM=Ds(),UM=Le(),VM=Symbol.for("rowIndex"),Bg=class extends UM.BaseVector{bind(e){let t=this._row||(this._row=new CM.StructRow(this)),r=Object.create(t);return r[VM]=e,r}};Xa.StructVector=Bg});var od=C(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.TimestampNanosecondVector=Rt.TimestampMicrosecondVector=Rt.TimestampMillisecondVector=Rt.TimestampSecondVector=Rt.TimestampVector=void 0;var kM=Le(),qn=class extends kM.BaseVector{};Rt.TimestampVector=qn;var Ig=class extends qn{};Rt.TimestampSecondVector=Ig;var Tg=class extends qn{};Rt.TimestampMillisecondVector=Tg;var Sg=class extends qn{};Rt.TimestampMicrosecondVector=Sg;var Dg=class extends qn{};Rt.TimestampNanosecondVector=Dg});var ad=C(Et=>{"use strict";Object.defineProperty(Et,"__esModule",{value:!0});Et.TimeNanosecondVector=Et.TimeMicrosecondVector=Et.TimeMillisecondVector=Et.TimeSecondVector=Et.TimeVector=void 0;var RM=Le(),zn=class extends RM.BaseVector{};Et.TimeVector=zn;var Ag=class extends zn{};Et.TimeSecondVector=Ag;var Og=class extends zn{};Et.TimeMillisecondVector=Og;var Fg=class extends zn{};Et.TimeMicrosecondVector=Fg;var Mg=class extends zn{};Et.TimeNanosecondVector=Mg});var ud=C(gr=>{"use strict";Object.defineProperty(gr,"__esModule",{value:!0});gr.SparseUnionVector=gr.DenseUnionVector=gr.UnionVector=void 0;var EM=Le(),Qa=class extends EM.BaseVector{get typeIdToChildIndex(){return this.data.type.typeIdToChildIndex}};gr.UnionVector=Qa;var Cg=class extends Qa{get valueOffsets(){return this.data.valueOffsets}};gr.DenseUnionVector=Cg;var Ug=class extends Qa{};gr.SparseUnionVector=Ug});var cd=C(eu=>{"use strict";Object.defineProperty(eu,"__esModule",{value:!0});eu.Utf8Vector=void 0;var NM=Pe(),PM=Le(),Vg=me(),xM=_i(),kg=class extends PM.BaseVector{static from(e){return xM.vectorFromValuesWithType(()=>new Vg.Utf8,e)}asBinary(){return NM.Vector.new(this.data.clone(new Vg.Binary))}};eu.Utf8Vector=kg});var Rg=C(vr=>{"use strict";Object.defineProperty(vr,"__esModule",{value:!0});vr.partial2=vr.partial1=vr.partial0=void 0;function LM(i){return function(){return i(this)}}vr.partial0=LM;function qM(i){return function(e){return i(this,e)}}vr.partial1=qM;function zM(i){return function(e,t){return i(this,e,t)}}vr.partial2=zM});var fd=C(Wn=>{"use strict";Object.defineProperty(Wn,"__esModule",{value:!0});Wn.instance=Wn.GetVisitor=void 0;var tu=js(),WM=nt(),HM=Mr(),YM=ms(),Nt=Be(),Z=class extends WM.Visitor{};Wn.GetVisitor=Z;var $M=(i,e)=>864e5*i[e],ld=(i,e)=>4294967296*i[e+1]+(i[e]>>>0),GM=(i,e)=>4294967296*(i[e+1]/1e3)+(i[e]>>>0)/1e3,JM=(i,e)=>4294967296*(i[e+1]/1e6)+(i[e]>>>0)/1e6,Eg=i=>new Date(i),KM=(i,e)=>Eg($M(i,e)),ZM=(i,e)=>Eg(ld(i,e)),XM=(i,e)=>null,Ng=(i,e,t)=>{let{[t]:r,[t+1]:n}=e;return r!=null&&n!=null?i.subarray(r,n):null},QM=({offset:i,values:e},t)=>{let r=i+t;return(e[r>>3]&1<<r%8)!=0},Pg=({values:i},e)=>KM(i,e),xg=({values:i},e)=>ZM(i,e*2),gi=({stride:i,values:e},t)=>e[i*t],Lg=({stride:i,values:e},t)=>YM.uint16ToFloat64(e[i*t]),dd=({stride:i,values:e,type:t},r)=>tu.BN.new(e.subarray(i*r,i*(r+1)),t.isSigned),eC=({stride:i,values:e},t)=>e.subarray(i*t,i*(t+1)),tC=({values:i,valueOffsets:e},t)=>Ng(i,e,t),iC=({values:i,valueOffsets:e},t)=>{let r=Ng(i,e,t);return r!==null?HM.decodeUtf8(r):null},rC=(i,e)=>i.type.bitWidth<64?gi(i,e):dd(i,e),nC=(i,e)=>i.type.precision!==Nt.Precision.HALF?gi(i,e):Lg(i,e),sC=(i,e)=>i.type.unit===Nt.DateUnit.DAY?Pg(i,e):xg(i,e),qg=({values:i},e)=>1e3*ld(i,e*2),zg=({values:i},e)=>ld(i,e*2),Wg=({values:i},e)=>GM(i,e*2),Hg=({values:i},e)=>JM(i,e*2),oC=(i,e)=>{switch(i.type.unit){case Nt.TimeUnit.SECOND:return qg(i,e);case Nt.TimeUnit.MILLISECOND:return zg(i,e);case Nt.TimeUnit.MICROSECOND:return Wg(i,e);case Nt.TimeUnit.NANOSECOND:return Hg(i,e)}},Yg=({values:i,stride:e},t)=>i[e*t],$g=({values:i,stride:e},t)=>i[e*t],Gg=({values:i},e)=>tu.BN.signed(i.subarray(2*e,2*(e+1))),Jg=({values:i},e)=>tu.BN.signed(i.subarray(2*e,2*(e+1))),aC=(i,e)=>{switch(i.type.unit){case Nt.TimeUnit.SECOND:return Yg(i,e);case Nt.TimeUnit.MILLISECOND:return $g(i,e);case Nt.TimeUnit.MICROSECOND:return Gg(i,e);case Nt.TimeUnit.NANOSECOND:return Jg(i,e)}},uC=({values:i},e)=>tu.BN.decimal(i.subarray(4*e,4*(e+1))),cC=(i,e)=>{let t=i.getChildAt(0),{valueOffsets:r,stride:n}=i;return t.slice(r[e*n],r[e*n+1])},lC=(i,e)=>i.bind(e),dC=(i,e)=>i.bind(e),fC=(i,e)=>i.type.mode===Nt.UnionMode.Dense?Kg(i,e):Zg(i,e),Kg=(i,e)=>{let t=i.typeIdToChildIndex[i.typeIds[e]],r=i.getChildAt(t);return r?r.get(i.valueOffsets[e]):null},Zg=(i,e)=>{let t=i.typeIdToChildIndex[i.typeIds[e]],r=i.getChildAt(t);return r?r.get(e):null},hC=(i,e)=>i.getValue(i.getKey(e)),pC=(i,e)=>i.type.unit===Nt.IntervalUnit.DAY_TIME?Xg(i,e):Qg(i,e),Xg=({values:i},e)=>i.subarray(2*e,2*(e+1)),Qg=({values:i},e)=>{let t=i[e],r=new Int32Array(2);return r[0]=t/12|0,r[1]=t%12|0,r},yC=(i,e)=>{let t=i.getChildAt(0),{stride:r}=i;return t.slice(e*r,(e+1)*r)};Z.prototype.visitNull=XM;Z.prototype.visitBool=QM;Z.prototype.visitInt=rC;Z.prototype.visitInt8=gi;Z.prototype.visitInt16=gi;Z.prototype.visitInt32=gi;Z.prototype.visitInt64=dd;Z.prototype.visitUint8=gi;Z.prototype.visitUint16=gi;Z.prototype.visitUint32=gi;Z.prototype.visitUint64=dd;Z.prototype.visitFloat=nC;Z.prototype.visitFloat16=Lg;Z.prototype.visitFloat32=gi;Z.prototype.visitFloat64=gi;Z.prototype.visitUtf8=iC;Z.prototype.visitBinary=tC;Z.prototype.visitFixedSizeBinary=eC;Z.prototype.visitDate=sC;Z.prototype.visitDateDay=Pg;Z.prototype.visitDateMillisecond=xg;Z.prototype.visitTimestamp=oC;Z.prototype.visitTimestampSecond=qg;Z.prototype.visitTimestampMillisecond=zg;Z.prototype.visitTimestampMicrosecond=Wg;Z.prototype.visitTimestampNanosecond=Hg;Z.prototype.visitTime=aC;Z.prototype.visitTimeSecond=Yg;Z.prototype.visitTimeMillisecond=$g;Z.prototype.visitTimeMicrosecond=Gg;Z.prototype.visitTimeNanosecond=Jg;Z.prototype.visitDecimal=uC;Z.prototype.visitList=cC;Z.prototype.visitStruct=dC;Z.prototype.visitUnion=fC;Z.prototype.visitDenseUnion=Kg;Z.prototype.visitSparseUnion=Zg;Z.prototype.visitDictionary=hC;Z.prototype.visitInterval=pC;Z.prototype.visitIntervalDayTime=Xg;Z.prototype.visitIntervalYearMonth=Qg;Z.prototype.visitFixedSizeList=yC;Z.prototype.visitMap=lC;Wn.instance=new Z});var rv=C(Hn=>{"use strict";Object.defineProperty(Hn,"__esModule",{value:!0});Hn.instance=Hn.IndexOfVisitor=void 0;var _C=nt(),ev=si(),tv=Os(),X=class extends _C.Visitor{};Hn.IndexOfVisitor=X;function mC(i,e){return e===null&&i.length>0?0:-1}function bC(i,e){let{nullBitmap:t}=i.data;if(!t||i.nullCount<=0)return-1;let r=0;for(let n of new ev.BitIterator(t,i.data.offset+(e||0),i.length,t,ev.getBool)){if(!n)return r;++r}return-1}function ce(i,e,t){if(e===void 0)return-1;if(e===null)return bC(i,t);let r=tv.createElementComparator(e);for(let n=(t||0)-1,s=i.length;++n<s;)if(r(i.get(n)))return n;return-1}function iv(i,e,t){let r=tv.createElementComparator(e);for(let n=(t||0)-1,s=i.length;++n<s;)if(r(i.get(n)))return n;return-1}X.prototype.visitNull=mC;X.prototype.visitBool=ce;X.prototype.visitInt=ce;X.prototype.visitInt8=ce;X.prototype.visitInt16=ce;X.prototype.visitInt32=ce;X.prototype.visitInt64=ce;X.prototype.visitUint8=ce;X.prototype.visitUint16=ce;X.prototype.visitUint32=ce;X.prototype.visitUint64=ce;X.prototype.visitFloat=ce;X.prototype.visitFloat16=ce;X.prototype.visitFloat32=ce;X.prototype.visitFloat64=ce;X.prototype.visitUtf8=ce;X.prototype.visitBinary=ce;X.prototype.visitFixedSizeBinary=ce;X.prototype.visitDate=ce;X.prototype.visitDateDay=ce;X.prototype.visitDateMillisecond=ce;X.prototype.visitTimestamp=ce;X.prototype.visitTimestampSecond=ce;X.prototype.visitTimestampMillisecond=ce;X.prototype.visitTimestampMicrosecond=ce;X.prototype.visitTimestampNanosecond=ce;X.prototype.visitTime=ce;X.prototype.visitTimeSecond=ce;X.prototype.visitTimeMillisecond=ce;X.prototype.visitTimeMicrosecond=ce;X.prototype.visitTimeNanosecond=ce;X.prototype.visitDecimal=ce;X.prototype.visitList=ce;X.prototype.visitStruct=ce;X.prototype.visitUnion=ce;X.prototype.visitDenseUnion=iv;X.prototype.visitSparseUnion=iv;X.prototype.visitDictionary=ce;X.prototype.visitInterval=ce;X.prototype.visitIntervalDayTime=ce;X.prototype.visitIntervalYearMonth=ce;X.prototype.visitFixedSizeList=ce;X.prototype.visitMap=ce;Hn.instance=new X});var hd=C(Yn=>{"use strict";Object.defineProperty(Yn,"__esModule",{value:!0});Yn.instance=Yn.IteratorVisitor=void 0;var iu=Be(),gC=nt(),vC=si(),nv=fd(),Q=class extends gC.Visitor{};Yn.IteratorVisitor=Q;function jC(i){let e=nv.instance.getVisitFn(i);return new vC.BitIterator(i.data.nullBitmap,i.data.offset,i.length,i,(t,r,n,s)=>(n&1<<s)!=0?e(t,r):null)}var sv=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 ae(i){if(i.nullCount>0)return jC(i);let{type:e,typeId:t,length:r}=i;return i.stride===1&&(t===iu.Type.Timestamp||t===iu.Type.Int&&e.bitWidth!==64||t===iu.Type.Time&&e.bitWidth!==64||t===iu.Type.Float&&e.precision>0)?i.data.values.subarray(0,r)[Symbol.iterator]():new sv(i,nv.instance.getVisitFn(i))}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;Yn.instance=new Q});var ov=C($n=>{"use strict";Object.defineProperty($n,"__esModule",{value:!0});$n.instance=$n.ToArrayVisitor=void 0;var Ps=Be(),wC=nt(),BC=hd(),ee=class extends wC.Visitor{};$n.ToArrayVisitor=ee;function ue(i){let{type:e,length:t,stride:r}=i;switch(e.typeId){case Ps.Type.Int:case Ps.Type.Float:case Ps.Type.Decimal:case Ps.Type.Time:case Ps.Type.Timestamp:return i.data.values.subarray(0,t*r)}return[...BC.instance.visit(i)]}ee.prototype.visitNull=ue;ee.prototype.visitBool=ue;ee.prototype.visitInt=ue;ee.prototype.visitInt8=ue;ee.prototype.visitInt16=ue;ee.prototype.visitInt32=ue;ee.prototype.visitInt64=ue;ee.prototype.visitUint8=ue;ee.prototype.visitUint16=ue;ee.prototype.visitUint32=ue;ee.prototype.visitUint64=ue;ee.prototype.visitFloat=ue;ee.prototype.visitFloat16=ue;ee.prototype.visitFloat32=ue;ee.prototype.visitFloat64=ue;ee.prototype.visitUtf8=ue;ee.prototype.visitBinary=ue;ee.prototype.visitFixedSizeBinary=ue;ee.prototype.visitDate=ue;ee.prototype.visitDateDay=ue;ee.prototype.visitDateMillisecond=ue;ee.prototype.visitTimestamp=ue;ee.prototype.visitTimestampSecond=ue;ee.prototype.visitTimestampMillisecond=ue;ee.prototype.visitTimestampMicrosecond=ue;ee.prototype.visitTimestampNanosecond=ue;ee.prototype.visitTime=ue;ee.prototype.visitTimeSecond=ue;ee.prototype.visitTimeMillisecond=ue;ee.prototype.visitTimeMicrosecond=ue;ee.prototype.visitTimeNanosecond=ue;ee.prototype.visitDecimal=ue;ee.prototype.visitList=ue;ee.prototype.visitStruct=ue;ee.prototype.visitUnion=ue;ee.prototype.visitDenseUnion=ue;ee.prototype.visitSparseUnion=ue;ee.prototype.visitDictionary=ue;ee.prototype.visitInterval=ue;ee.prototype.visitIntervalDayTime=ue;ee.prototype.visitIntervalYearMonth=ue;ee.prototype.visitFixedSizeList=ue;ee.prototype.visitMap=ue;$n.instance=new ee});var av=C(Gn=>{"use strict";Object.defineProperty(Gn,"__esModule",{value:!0});Gn.instance=Gn.ByteWidthVisitor=void 0;var IC=nt(),TC=Be(),xs=(i,e)=>i+e,pd=i=>`Cannot compute the byte width of variable-width column ${i}`,yd=class extends IC.Visitor{visitNull(e){return 0}visitInt(e){return e.bitWidth/8}visitFloat(e){return e.ArrayType.BYTES_PER_ELEMENT}visitBinary(e){throw new Error(pd(e))}visitUtf8(e){throw new Error(pd(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===TC.TimeUnit.SECOND?4:8}visitInterval(e){return(e.unit+1)*4}visitList(e){throw new Error(pd(e))}visitStruct(e){return this.visitFields(e.children).reduce(xs,0)}visitUnion(e){return this.visitFields(e.children).reduce(xs,0)}visitFixedSizeBinary(e){return e.byteWidth}visitFixedSizeList(e){return e.listSize*this.visitFields(e.children).reduce(xs,0)}visitMap(e){return this.visitFields(e.children).reduce(xs,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(xs,0)}};Gn.ByteWidthVisitor=yd;Gn.instance=new yd});var uv=C(Jn=>{"use strict";Object.defineProperty(Jn,"__esModule",{value:!0});Jn.instance=Jn.GetVectorConstructor=void 0;var SC=nt(),DC=kl(),AC=Rl(),_d=Nl(),OC=Pl(),FC=Wa(),MC=Ll(),CC=ql(),ru=Yl(),md=$l(),ki=Ga(),UC=id(),VC=rd(),kC=nd(),RC=sd(),Ls=od(),qs=ad(),bd=ud(),EC=cd(),gd=class extends SC.Visitor{visitNull(){return kC.NullVector}visitBool(){return AC.BoolVector}visitInt(){return ki.IntVector}visitInt8(){return ki.Int8Vector}visitInt16(){return ki.Int16Vector}visitInt32(){return ki.Int32Vector}visitInt64(){return ki.Int64Vector}visitUint8(){return ki.Uint8Vector}visitUint16(){return ki.Uint16Vector}visitUint32(){return ki.Uint32Vector}visitUint64(){return ki.Uint64Vector}visitFloat(){return ru.FloatVector}visitFloat16(){return ru.Float16Vector}visitFloat32(){return ru.Float32Vector}visitFloat64(){return ru.Float64Vector}visitUtf8(){return EC.Utf8Vector}visitBinary(){return DC.BinaryVector}visitFixedSizeBinary(){return MC.FixedSizeBinaryVector}visitDate(){return _d.DateVector}visitDateDay(){return _d.DateDayVector}visitDateMillisecond(){return _d.DateMillisecondVector}visitTimestamp(){return Ls.TimestampVector}visitTimestampSecond(){return Ls.TimestampSecondVector}visitTimestampMillisecond(){return Ls.TimestampMillisecondVector}visitTimestampMicrosecond(){return Ls.TimestampMicrosecondVector}visitTimestampNanosecond(){return Ls.TimestampNanosecondVector}visitTime(){return qs.TimeVector}visitTimeSecond(){return qs.TimeSecondVector}visitTimeMillisecond(){return qs.TimeMillisecondVector}visitTimeMicrosecond(){return qs.TimeMicrosecondVector}visitTimeNanosecond(){return qs.TimeNanosecondVector}visitDecimal(){return OC.DecimalVector}visitList(){return UC.ListVector}visitStruct(){return RC.StructVector}visitUnion(){return bd.UnionVector}visitDenseUnion(){return bd.DenseUnionVector}visitSparseUnion(){return bd.SparseUnionVector}visitDictionary(){return FC.DictionaryVector}visitInterval(){return md.IntervalVector}visitIntervalDayTime(){return md.IntervalDayTimeVector}visitIntervalYearMonth(){return md.IntervalYearMonthVector}visitFixedSizeList(){return CC.FixedSizeListVector}visitMap(){return VC.MapVector}};Jn.GetVectorConstructor=gd;Jn.instance=new gd});var _i=C(U=>{"use strict";Object.defineProperty(U,"__esModule",{value:!0});U.vectorFromValuesWithType=U.StructRow=U.MapRow=U.Utf8Vector=U.SparseUnionVector=U.DenseUnionVector=U.UnionVector=U.TimeNanosecondVector=U.TimeMicrosecondVector=U.TimeMillisecondVector=U.TimeSecondVector=U.TimeVector=U.TimestampNanosecondVector=U.TimestampMicrosecondVector=U.TimestampMillisecondVector=U.TimestampSecondVector=U.TimestampVector=U.StructVector=U.NullVector=U.MapVector=U.ListVector=U.Uint64Vector=U.Uint32Vector=U.Uint16Vector=U.Uint8Vector=U.Int64Vector=U.Int32Vector=U.Int16Vector=U.Int8Vector=U.IntVector=U.IntervalYearMonthVector=U.IntervalDayTimeVector=U.IntervalVector=U.Float64Vector=U.Float32Vector=U.Float16Vector=U.FloatVector=U.FixedSizeListVector=U.FixedSizeBinaryVector=U.DictionaryVector=U.DecimalVector=U.DateMillisecondVector=U.DateDayVector=U.DateVector=U.Chunked=U.BoolVector=U.BinaryVector=U.BaseVector=U.Vector=void 0;var vd=at(),NC=Pe();Object.defineProperty(U,"Vector",{enumerable:!0,get:function(){return NC.Vector}});var PC=Le();Object.defineProperty(U,"BaseVector",{enumerable:!0,get:function(){return PC.BaseVector}});var xC=kl();Object.defineProperty(U,"BinaryVector",{enumerable:!0,get:function(){return xC.BinaryVector}});var LC=Rl();Object.defineProperty(U,"BoolVector",{enumerable:!0,get:function(){return LC.BoolVector}});var qC=dr();Object.defineProperty(U,"Chunked",{enumerable:!0,get:function(){return qC.Chunked}});var jd=Nl();Object.defineProperty(U,"DateVector",{enumerable:!0,get:function(){return jd.DateVector}});Object.defineProperty(U,"DateDayVector",{enumerable:!0,get:function(){return jd.DateDayVector}});Object.defineProperty(U,"DateMillisecondVector",{enumerable:!0,get:function(){return jd.DateMillisecondVector}});var zC=Pl();Object.defineProperty(U,"DecimalVector",{enumerable:!0,get:function(){return zC.DecimalVector}});var WC=Wa();Object.defineProperty(U,"DictionaryVector",{enumerable:!0,get:function(){return WC.DictionaryVector}});var HC=Ll();Object.defineProperty(U,"FixedSizeBinaryVector",{enumerable:!0,get:function(){return HC.FixedSizeBinaryVector}});var YC=ql();Object.defineProperty(U,"FixedSizeListVector",{enumerable:!0,get:function(){return YC.FixedSizeListVector}});var nu=Yl();Object.defineProperty(U,"FloatVector",{enumerable:!0,get:function(){return nu.FloatVector}});Object.defineProperty(U,"Float16Vector",{enumerable:!0,get:function(){return nu.Float16Vector}});Object.defineProperty(U,"Float32Vector",{enumerable:!0,get:function(){return nu.Float32Vector}});Object.defineProperty(U,"Float64Vector",{enumerable:!0,get:function(){return nu.Float64Vector}});var wd=$l();Object.defineProperty(U,"IntervalVector",{enumerable:!0,get:function(){return wd.IntervalVector}});Object.defineProperty(U,"IntervalDayTimeVector",{enumerable:!0,get:function(){return wd.IntervalDayTimeVector}});Object.defineProperty(U,"IntervalYearMonthVector",{enumerable:!0,get:function(){return wd.IntervalYearMonthVector}});var Ri=Ga();Object.defineProperty(U,"IntVector",{enumerable:!0,get:function(){return Ri.IntVector}});Object.defineProperty(U,"Int8Vector",{enumerable:!0,get:function(){return Ri.Int8Vector}});Object.defineProperty(U,"Int16Vector",{enumerable:!0,get:function(){return Ri.Int16Vector}});Object.defineProperty(U,"Int32Vector",{enumerable:!0,get:function(){return Ri.Int32Vector}});Object.defineProperty(U,"Int64Vector",{enumerable:!0,get:function(){return Ri.Int64Vector}});Object.defineProperty(U,"Uint8Vector",{enumerable:!0,get:function(){return Ri.Uint8Vector}});Object.defineProperty(U,"Uint16Vector",{enumerable:!0,get:function(){return Ri.Uint16Vector}});Object.defineProperty(U,"Uint32Vector",{enumerable:!0,get:function(){return Ri.Uint32Vector}});Object.defineProperty(U,"Uint64Vector",{enumerable:!0,get:function(){return Ri.Uint64Vector}});var $C=id();Object.defineProperty(U,"ListVector",{enumerable:!0,get:function(){return $C.ListVector}});var GC=rd();Object.defineProperty(U,"MapVector",{enumerable:!0,get:function(){return GC.MapVector}});var JC=nd();Object.defineProperty(U,"NullVector",{enumerable:!0,get:function(){return JC.NullVector}});var KC=sd();Object.defineProperty(U,"StructVector",{enumerable:!0,get:function(){return KC.StructVector}});var zs=od();Object.defineProperty(U,"TimestampVector",{enumerable:!0,get:function(){return zs.TimestampVector}});Object.defineProperty(U,"TimestampSecondVector",{enumerable:!0,get:function(){return zs.TimestampSecondVector}});Object.defineProperty(U,"TimestampMillisecondVector",{enumerable:!0,get:function(){return zs.TimestampMillisecondVector}});Object.defineProperty(U,"TimestampMicrosecondVector",{enumerable:!0,get:function(){return zs.TimestampMicrosecondVector}});Object.defineProperty(U,"TimestampNanosecondVector",{enumerable:!0,get:function(){return zs.TimestampNanosecondVector}});var Ws=ad();Object.defineProperty(U,"TimeVector",{enumerable:!0,get:function(){return Ws.TimeVector}});Object.defineProperty(U,"TimeSecondVector",{enumerable:!0,get:function(){return Ws.TimeSecondVector}});Object.defineProperty(U,"TimeMillisecondVector",{enumerable:!0,get:function(){return Ws.TimeMillisecondVector}});Object.defineProperty(U,"TimeMicrosecondVector",{enumerable:!0,get:function(){return Ws.TimeMicrosecondVector}});Object.defineProperty(U,"TimeNanosecondVector",{enumerable:!0,get:function(){return Ws.TimeNanosecondVector}});var Bd=ud();Object.defineProperty(U,"UnionVector",{enumerable:!0,get:function(){return Bd.UnionVector}});Object.defineProperty(U,"DenseUnionVector",{enumerable:!0,get:function(){return Bd.DenseUnionVector}});Object.defineProperty(U,"SparseUnionVector",{enumerable:!0,get:function(){return Bd.SparseUnionVector}});var ZC=cd();Object.defineProperty(U,"Utf8Vector",{enumerable:!0,get:function(){return ZC.Utf8Vector}});var cv=Ds();Object.defineProperty(U,"MapRow",{enumerable:!0,get:function(){return cv.MapRow}});Object.defineProperty(U,"StructRow",{enumerable:!0,get:function(){return cv.StructRow}});var Hs=Rg(),Id=Be(),Kn=Pe(),lv=dr(),Qr=Le(),XC=si(),su=ut(),dv=ke(),fv=fd(),hv=Ec(),pv=rv(),yv=ov(),_v=hd(),mv=av(),bv=uv();Kn.Vector.new=QC;Kn.Vector.from=tU;function QC(i,...e){return new(bv.instance.getVisitFn(i)())(i,...e)}function eU(i,e){if(su.isIterable(e))return Kn.Vector.from({nullValues:[null,void 0],type:i(),values:e});if(su.isAsyncIterable(e))return Kn.Vector.from({nullValues:[null,void 0],type:i(),values:e});let{values:t=[],type:r=i(),nullValues:n=[null,void 0]}=Object.assign({},e);return su.isIterable(t)?Kn.Vector.from(Object.assign(Object.assign({nullValues:n},e),{type:r})):Kn.Vector.from(Object.assign(Object.assign({nullValues:n},e),{type:r}))}U.vectorFromValuesWithType=eU;function tU(i){let e=Object.assign({nullValues:[null,void 0]},i),{values:t=[]}=e,r=vd.__rest(e,["values"]);if(su.isIterable(t)){let n=[...dv.Builder.throughIterable(r)(t)];return n.length===1?n[0]:lv.Chunked.concat(n)}return(n=>vd.__awaiter(this,void 0,void 0,function*(){var s,c;let _=dv.Builder.throughAsyncIterable(r);try{for(var v=vd.__asyncValues(_(t)),T;T=yield v.next(),!T.done;){let A=T.value;n.push(A)}}catch(A){s={error:A}}finally{try{T&&!T.done&&(c=v.return)&&(yield c.call(v))}finally{if(s)throw s.error}}return n.length===1?n[0]:lv.Chunked.concat(n)}))([])}Qr.BaseVector.prototype.get=function(e){return fv.instance.visit(this,e)};Qr.BaseVector.prototype.set=function(e,t){return hv.instance.visit(this,e,t)};Qr.BaseVector.prototype.indexOf=function(e,t){return pv.instance.visit(this,e,t)};Qr.BaseVector.prototype.toArray=function(){return yv.instance.visit(this)};Qr.BaseVector.prototype.getByteWidth=function(){return mv.instance.visit(this.type)};Qr.BaseVector.prototype[Symbol.iterator]=function(){return _v.instance.visit(this)};Qr.BaseVector.prototype._bindDataAccessors=sU;Object.keys(Id.Type).map(i=>Id.Type[i]).filter(i=>typeof i=="number").filter(i=>i!==Id.Type.NONE).forEach(i=>{let e=bv.instance.visit(i);e.prototype.get=Hs.partial1(fv.instance.getVisitFn(i)),e.prototype.set=Hs.partial2(hv.instance.getVisitFn(i)),e.prototype.indexOf=Hs.partial2(pv.instance.getVisitFn(i)),e.prototype.toArray=Hs.partial0(yv.instance.getVisitFn(i)),e.prototype.getByteWidth=iU(mv.instance.getVisitFn(i)),e.prototype[Symbol.iterator]=Hs.partial0(_v.instance.getVisitFn(i))});function iU(i){return function(){return i(this.type)}}function rU(i){return function(e){return this.isValid(e)?i.call(this,e):null}}function nU(i){return function(e,t){XC.setBool(this.nullBitmap,this.offset+e,t!=null)&&i.call(this,e,t)}}function sU(){let i=this.nullBitmap;i&&i.byteLength>0&&(this.get=rU(this.get),this.set=nU(this.set))}});var Es=C(au=>{"use strict";Object.defineProperty(au,"__esModule",{value:!0});au.Table=void 0;var ou=at(),oU=Rn(),aU=Ys(),gv=Ea(),Td=Vi(),vv=Qe(),Sd=me(),jv=Hr(),Dd=ut(),wv=Cl(),Ad=_i(),Ze=class extends Ad.Chunked{constructor(...e){var t;let r=null;e[0]instanceof vv.Schema&&(r=e[0]);let n=e[0]instanceof Ze?e[0].chunks:jv.selectArgs(Td.RecordBatch,e);if(!r&&!(r=(t=n[0])===null||t===void 0?void 0:t.schema))throw new TypeError("Table must be initialized with a Schema or at least one RecordBatch");n[0]||(n[0]=new Td._InternalEmptyPlaceholderRecordBatch(r));super(new Sd.Struct(r.fields),n);this._schema=r,this._chunks=n}static empty(e=new vv.Schema([])){return new Ze(e,[])}static from(e){if(!e)return Ze.empty();if(typeof e=="object"){let r=Dd.isIterable(e.values)?uU(e):Dd.isAsyncIterable(e.values)?cU(e):null;if(r!==null)return r}let t=aU.RecordBatchReader.from(e);return Dd.isPromise(t)?(()=>ou.__awaiter(this,void 0,void 0,function*(){return yield Ze.from(yield t)}))():t.isSync()&&(t=t.open())?t.schema?new Ze(t.schema,[...t]):Ze.empty():(r=>ou.__awaiter(this,void 0,void 0,function*(){var n,s;let c=yield r,_=c.schema,v=[];if(_){try{for(var T=ou.__asyncValues(c),A;A=yield T.next(),!A.done;){let P=A.value;v.push(P)}}catch(P){n={error:P}}finally{try{A&&!A.done&&(s=T.return)&&(yield s.call(T))}finally{if(n)throw n.error}}return new Ze(_,v)}return Ze.empty()}))(t.open())}static fromAsync(e){return ou.__awaiter(this,void 0,void 0,function*(){return yield Ze.from(e)})}static fromStruct(e){return Ze.new(e.data.childData,e.type.children)}static new(...e){return new Ze(...wv.distributeColumnsIntoRecordBatches(jv.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 Ze(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,r,n=this._schema.fields,s=this._children||(this._children=[]);if(r=s[e])return r;if(t=n[e]){let c=this._chunks.map(_=>_.getChildAt(e)).filter(_=>_!=null);if(c.length>0)return s[e]=new oU.Column(t,c)}return null}serialize(e="binary",t=!0){return(t?gv.RecordBatchStreamWriter:gv.RecordBatchFileWriter).writeAll(this).toUint8Array(!0)}count(){return this._length}select(...e){let t=this._schema.fields.reduce((r,n,s)=>r.set(n.name,s),new Map);return this.selectAt(...e.map(r=>t.get(r)).filter(r=>r>-1))}selectAt(...e){let t=this._schema.selectAt(...e);return new Ze(t,this._chunks.map(({length:r,data:{childData:n}})=>new Td.RecordBatch(t,r,e.map(s=>n[s]).filter(Boolean))))}assign(e){let t=this._schema.fields,[r,n]=e.schema.fields.reduce((_,v,T)=>{let[A,P]=_,q=t.findIndex(J=>J.name===v.name);return~q?P[q]=T:A.push(T),_},[[],[]]),s=this._schema.assign(e.schema),c=[...t.map((_,v,T,A=n[v])=>A===void 0?this.getColumnAt(v):e.getColumnAt(A)),...r.map(_=>e.getColumnAt(_))].filter(Boolean);return new Ze(...wv.distributeVectorsIntoRecordBatches(s,c))}};au.Table=Ze;function uU(i){let{type:e}=i;return e instanceof Sd.Struct?Ze.fromStruct(Ad.StructVector.from(i)):null}function cU(i){let{type:e}=i;return e instanceof Sd.Struct?Ad.StructVector.from(i).then(t=>Ze.fromStruct(t)):null}});var Vi=C(Zn=>{"use strict";Object.defineProperty(Zn,"__esModule",{value:!0});Zn._InternalEmptyPlaceholderRecordBatch=Zn.RecordBatch=void 0;var Od=Yt(),Fd=Es(),lU=Pe(),dU=nt(),fU=Qe(),hU=ut(),pU=dr(),yU=Hr(),Md=me(),_U=Cl(),mU=_i(),jr=class extends mU.StructVector{constructor(...e){let t,r=e[0],n;if(e[1]instanceof Od.Data)[,t,n]=e;else{let s=r.fields,[,c,_]=e;t=Od.Data.Struct(new Md.Struct(s),0,c,0,null,_)}super(t,n);this._schema=r}static from(e){return hU.isIterable(e.values),Fd.Table.from(e)}static new(...e){let[t,r]=yU.selectFieldArgs(e),n=r.filter(s=>s instanceof lU.Vector);return new jr(..._U.ensureSameLengthData(new fU.Schema(t),n.map(s=>s.data)))}clone(e,t=this._children){return new jr(this._schema,e,t)}concat(...e){let t=this._schema,r=pU.Chunked.flatten(this,...e);return new Fd.Table(t,r.map(({data:n})=>new jr(t,n)))}get schema(){return this._schema}get numCols(){return this._schema.fields.length}get dictionaries(){return this._dictionaries||(this._dictionaries=uu.collect(this))}select(...e){let t=this._schema.fields.reduce((r,n,s)=>r.set(n.name,s),new Map);return this.selectAt(...e.map(r=>t.get(r)).filter(r=>r>-1))}selectAt(...e){let t=this._schema.selectAt(...e),r=e.map(n=>this.data.childData[n]).filter(Boolean);return new jr(t,this.length,r)}};Zn.RecordBatch=jr;var Bv=class extends jr{constructor(e){super(e,0,e.fields.map(t=>Od.Data.new(t.type,0,0,0)))}};Zn._InternalEmptyPlaceholderRecordBatch=Bv;var uu=class extends dU.Visitor{constructor(){super(...arguments);this.dictionaries=new Map}static collect(e){return new uu().visit(e.data,new Md.Struct(e.schema.fields)).dictionaries}visit(e,t){return Md.DataType.isDictionary(t)?this.visitDictionary(e,t):(e.childData.forEach((r,n)=>this.visit(r,t.children[n].type)),this)}visitDictionary(e,t){let r=e.dictionary;return r&&r.length>0&&this.dictionaries.set(t.id,r),this}}});var Ys=C(Lt=>{"use strict";Object.defineProperty(Lt,"__esModule",{value:!0});Lt.AsyncRecordBatchFileReader=Lt.RecordBatchFileReader=Lt.AsyncRecordBatchStreamReader=Lt.RecordBatchStreamReader=Lt.RecordBatchReader=void 0;var De=at(),Iv=Pe(),cu=Be(),Tv=Gc(),Sv=ys(),Dv=ar(),$s=Zc(),Av=ob(),Cd=Vi(),en=cn(),Pt=Sa(),xt=ut(),vi=class extends en.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 xt.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 Sv.default.toDOMStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this})}toNodeStream(){return Sv.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 vi?e:xt.isArrowJSON(e)?bU(e):xt.isFileHandle(e)?jU(e):xt.isPromise(e)?(()=>De.__awaiter(this,void 0,void 0,function*(){return yield vi.from(yield e)}))():xt.isFetchResponse(e)||xt.isReadableDOMStream(e)||xt.isReadableNodeStream(e)||xt.isAsyncIterable(e)?vU(new Dv.AsyncByteStream(e)):gU(new Dv.ByteStream(e))}static readAll(e){return e instanceof vi?e.isSync()?Cv(e):Uv(e):xt.isArrowJSON(e)||ArrayBuffer.isView(e)||xt.isIterable(e)||xt.isIteratorResult(e)?Cv(e):Uv(e)}};Lt.RecordBatchReader=vi;var Xn=class extends vi{constructor(e){super(e);this._impl=e}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return De.__asyncGenerator(this,arguments,function*(){yield De.__await(yield*De.__asyncDelegator(De.__asyncValues(this[Symbol.iterator]())))})}};Lt.RecordBatchStreamReader=Xn;var Qn=class extends vi{constructor(e){super(e);this._impl=e}[Symbol.iterator](){throw new Error("AsyncRecordBatchStreamReader is not Iterable")}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}};Lt.AsyncRecordBatchStreamReader=Qn;var lu=class extends Xn{constructor(e){super(e);this._impl=e}};Lt.RecordBatchFileReader=lu;var Ud=class extends Qn{constructor(e){super(e);this._impl=e}};Lt.AsyncRecordBatchFileReader=Ud;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 Cd.RecordBatch(this.schema,e.length,this._loadVectors(e,t,this.schema.fields))}_loadDictionaryBatch(e,t){let{id:r,isDelta:n,data:s}=e,{dictionaries:c,schema:_}=this,v=c.get(r);if(n||!v){let T=_.dictionaries.get(r);return v&&n?v.concat(Iv.Vector.new(this._loadVectors(s,t,[T])[0])):Iv.Vector.new(this._loadVectors(s,t,[T])[0])}return v}_loadVectors(e,t,r){return new Av.VectorLoader(t,e.nodes,e.buffers,this.dictionaries).visitMany(r)}},Gs=class extends Vd{constructor(e,t){super(t);this._reader=xt.isArrowJSON(e)?new Pt.JSONMessageReader(this._handle=e):new Pt.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=Mv(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):en.ITERATOR_DONE}return(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(e):en.ITERATOR_DONE}next(){if(this.closed)return en.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 r=e.header(),n=t.readMessageBody(e.bodyLength),s=this._loadRecordBatch(r,n);return{done:!1,value:s}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;let r=e.header(),n=t.readMessageBody(e.bodyLength),s=this._loadDictionaryBatch(r,n);this.dictionaries.set(r.id,s)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new Cd._InternalEmptyPlaceholderRecordBatch(this.schema)}):this.return()}_readNextMessageAndValidate(e){return this._reader.readMessage(e)}},Js=class extends Vd{constructor(e,t){super(t);this._reader=new Pt.AsyncMessageReader(this._handle=e)}isAsync(){return!0}isStream(){return!0}[Symbol.asyncIterator](){return this}cancel(){return De.__awaiter(this,void 0,void 0,function*(){!this.closed&&(this.closed=!0)&&(yield this.reset()._reader.return(),this._reader=null,this.dictionaries=null)})}open(e){return De.__awaiter(this,void 0,void 0,function*(){return this.closed||(this.autoDestroy=Mv(this,e),this.schema||(this.schema=yield this._reader.readSchema())||(yield this.cancel())),this})}throw(e){return De.__awaiter(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.throw(e):en.ITERATOR_DONE})}return(e){return De.__awaiter(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.return(e):en.ITERATOR_DONE})}next(){return De.__awaiter(this,void 0,void 0,function*(){if(this.closed)return en.ITERATOR_DONE;let e,{_reader:t}=this;for(;e=yield this._readNextMessageAndValidate();)if(e.isSchema())yield this.reset(e.header());else if(e.isRecordBatch()){this._recordBatchIndex++;let r=e.header(),n=yield t.readMessageBody(e.bodyLength),s=this._loadRecordBatch(r,n);return{done:!1,value:s}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;let r=e.header(),n=yield t.readMessageBody(e.bodyLength),s=this._loadDictionaryBatch(r,n);this.dictionaries.set(r.id,s)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new Cd._InternalEmptyPlaceholderRecordBatch(this.schema)}):yield this.return()})}_readNextMessageAndValidate(e){return De.__awaiter(this,void 0,void 0,function*(){return yield this._reader.readMessage(e)})}},kd=class extends Gs{constructor(e,t){super(e instanceof $s.RandomAccessFile?e:new $s.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 r=this._reader.readMessage(cu.MessageHeader.RecordBatch);if(r==null?void 0:r.isRecordBatch()){let n=r.header(),s=this._reader.readMessageBody(r.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 r=this._reader.readMessage(cu.MessageHeader.DictionaryBatch);if(r==null?void 0:r.isDictionaryBatch()){let n=r.header(),s=this._reader.readMessageBody(r.bodyLength),c=this._loadDictionaryBatch(n,s);this.dictionaries.set(n.id,c)}}}_readFooter(){let{_handle:e}=this,t=e.size-Pt.magicAndPadding,r=e.readInt32(t),n=e.readAt(t-r,r);return Tv.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}},Ov=class extends Js{constructor(e,...t){let r=typeof t[0]!="number"?t.shift():void 0,n=t[0]instanceof Map?t.shift():void 0;super(e instanceof $s.AsyncRandomAccessFile?e:new $s.AsyncRandomAccessFile(e,r),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}open(e){let t=Object.create(null,{open:{get:()=>super.open}});return De.__awaiter(this,void 0,void 0,function*(){if(!this.closed&&!this._footer){this.schema=(this._footer=yield this._readFooter()).schema;for(let r of this._footer.dictionaryBatches())r&&(yield this._readDictionaryBatch(this._dictionaryIndex++))}return yield t.open.call(this,e)})}readRecordBatch(e){return De.__awaiter(this,void 0,void 0,function*(){if(this.closed)return null;this._footer||(yield this.open());let t=this._footer&&this._footer.getRecordBatch(e);if(t&&(yield this._handle.seek(t.offset))){let r=yield this._reader.readMessage(cu.MessageHeader.RecordBatch);if(r==null?void 0:r.isRecordBatch()){let n=r.header(),s=yield this._reader.readMessageBody(r.bodyLength);return this._loadRecordBatch(n,s)}}return null})}_readDictionaryBatch(e){return De.__awaiter(this,void 0,void 0,function*(){let t=this._footer&&this._footer.getDictionaryBatch(e);if(t&&(yield this._handle.seek(t.offset))){let r=yield this._reader.readMessage(cu.MessageHeader.DictionaryBatch);if(r==null?void 0:r.isDictionaryBatch()){let n=r.header(),s=yield this._reader.readMessageBody(r.bodyLength),c=this._loadDictionaryBatch(n,s);this.dictionaries.set(n.id,c)}}})}_readFooter(){return De.__awaiter(this,void 0,void 0,function*(){let{_handle:e}=this;e._pending&&(yield e._pending);let t=e.size-Pt.magicAndPadding,r=yield e.readInt32(t),n=yield e.readAt(t-r,r);return Tv.Footer.decode(n)})}_readNextMessageAndValidate(e){return De.__awaiter(this,void 0,void 0,function*(){if(this._footer||(yield this.open()),this._footer&&this._recordBatchIndex<this.numRecordBatches){let t=this._footer.getRecordBatch(this._recordBatchIndex);if(t&&(yield this._handle.seek(t.offset)))return yield this._reader.readMessage(e)}return null})}},Fv=class extends Gs{constructor(e,t){super(e,t)}_loadVectors(e,t,r){return new Av.JSONVectorLoader(t,e.nodes,e.buffers,this.dictionaries).visitMany(r)}};function Mv(i,e){return e&&typeof e.autoDestroy=="boolean"?e.autoDestroy:i.autoDestroy}function*Cv(i){let e=vi.from(i);try{if(!e.open({autoDestroy:!1}).closed)do yield e;while(!e.reset().open().closed)}finally{e.cancel()}}function Uv(i){return De.__asyncGenerator(this,arguments,function*(){let t=yield De.__await(vi.from(i));try{if(!(yield De.__await(t.open({autoDestroy:!1}))).closed)do yield yield De.__await(t);while(!(yield De.__await(t.reset().open())).closed)}finally{yield De.__await(t.cancel())}})}function bU(i){return new Xn(new Fv(i))}function gU(i){let e=i.peek(Pt.magicLength+7&~7);return e&&e.byteLength>=4?Pt.checkForMagicArrowString(e)?new lu(new kd(i.read())):new Xn(new Gs(i)):new Xn(new Gs(function*(){}()))}function vU(i){return De.__awaiter(this,void 0,void 0,function*(){let e=yield i.peek(Pt.magicLength+7&~7);return e&&e.byteLength>=4?Pt.checkForMagicArrowString(e)?new lu(new kd(yield i.read())):new Qn(new Js(i)):new Qn(new Js(function(){return De.__asyncGenerator(this,arguments,function*(){})}()))})}function jU(i){return De.__awaiter(this,void 0,void 0,function*(){let{size:e}=yield i.stat(),t=new $s.AsyncRandomAccessFile(i,e);return e>=Pt.magicX2AndPadding&&Pt.checkForMagicArrowString(yield t.readAt(0,Pt.magicLength+7&~7))?new Ud(new Ov(t)):new Qn(new Js(t))})}});var Rv=C(fu=>{"use strict";Object.defineProperty(fu,"__esModule",{value:!0});fu.toDOMStream=void 0;var du=at(),Vv=Ge(),kv=ut();function wU(i,e){if(kv.isAsyncIterable(i))return IU(i,e);if(kv.isIterable(i))return BU(i,e);throw new Error("toDOMStream() must be called with an Iterable or AsyncIterable")}fu.toDOMStream=wU;function BU(i,e){let t=null,r=(e==null?void 0:e.type)==="bytes"||!1,n=(e==null?void 0:e.highWaterMark)||Math.pow(2,24);return new ReadableStream(Object.assign(Object.assign({},e),{start(c){s(c,t||(t=i[Symbol.iterator]()))},pull(c){t?s(c,t):c.close()},cancel(){((t==null?void 0:t.return)&&t.return()||!0)&&(t=null)}}),Object.assign({highWaterMark:r?n:void 0},e));function s(c,_){let v,T=null,A=c.desiredSize||null;for(;!(T=_.next(r?A:null)).done;)if(ArrayBuffer.isView(T.value)&&(v=Vv.toUint8Array(T.value))&&(A!=null&&r&&(A=A-v.byteLength+1),T.value=v),c.enqueue(T.value),A!=null&&--A<=0)return;c.close()}}function IU(i,e){let t=null,r=(e==null?void 0:e.type)==="bytes"||!1,n=(e==null?void 0:e.highWaterMark)||Math.pow(2,24);return new ReadableStream(Object.assign(Object.assign({},e),{start(c){return du.__awaiter(this,void 0,void 0,function*(){yield s(c,t||(t=i[Symbol.asyncIterator]()))})},pull(c){return du.__awaiter(this,void 0,void 0,function*(){t?yield s(c,t):c.close()})},cancel(){return du.__awaiter(this,void 0,void 0,function*(){((t==null?void 0:t.return)&&(yield t.return())||!0)&&(t=null)})}}),Object.assign({highWaterMark:r?n:void 0},e));function s(c,_){return du.__awaiter(this,void 0,void 0,function*(){let v,T=null,A=c.desiredSize||null;for(;!(T=yield _.next(r?A:null)).done;)if(ArrayBuffer.isView(T.value)&&(v=Vv.toUint8Array(T.value))&&(A!=null&&r&&(A=A-v.byteLength+1),T.value=v),c.enqueue(T.value),A!=null&&--A<=0)return;c.close()})}}});var Pv=C(es=>{"use strict";Object.defineProperty(es,"__esModule",{value:!0});es.BuilderTransform=es.builderThroughDOMStream=void 0;var TU=at(),SU=fa();function DU(i){return new Rd(i)}es.builderThroughDOMStream=DU;var Rd=class{constructor(e){this._numChunks=0,this._finished=!1,this._bufferedSize=0;let{["readableStrategy"]:t,["writableStrategy"]:r,["queueingStrategy"]:n="count"}=e,s=TU.__rest(e,["readableStrategy","writableStrategy","queueingStrategy"]);this._controller=null,this._builder=SU.Builder.new(s),this._getSize=n!=="bytes"?Ev:Nv;let{["highWaterMark"]:c=n==="bytes"?Math.pow(2,14):1e3}=Object.assign({},t),{["highWaterMark"]:_=n==="bytes"?Math.pow(2,14):1e3}=Object.assign({},r);this.readable=new ReadableStream({cancel:()=>{this._builder.clear()},pull:v=>{this._maybeFlush(this._builder,this._controller=v)},start:v=>{this._maybeFlush(this._builder,this._controller=v)}},{highWaterMark:c,size:n!=="bytes"?Ev:Nv}),this.writable=new WritableStream({abort:()=>{this._builder.clear()},write:()=>{this._maybeFlush(this._builder,this._controller)},close:()=>{this._maybeFlush(this._builder.finish(),this._controller)}},{highWaterMark:_,size:v=>this._writeValueAndReturnChunkSize(v)})}_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)}};es.BuilderTransform=Rd;var Ev=i=>i.length,Nv=i=>i.byteLength});var xv=C(hu=>{"use strict";Object.defineProperty(hu,"__esModule",{value:!0});hu.recordBatchReaderThroughDOMStream=void 0;var Ks=at(),AU=ar(),OU=Ys();function FU(i,e){let t=new AU.AsyncByteQueue,r=null,n=new ReadableStream({cancel(){return Ks.__awaiter(this,void 0,void 0,function*(){yield t.close()})},start(_){return Ks.__awaiter(this,void 0,void 0,function*(){yield c(_,r||(r=yield s()))})},pull(_){return Ks.__awaiter(this,void 0,void 0,function*(){r?yield c(_,r):_.close()})}});return{writable:new WritableStream(t,Object.assign({highWaterMark:Math.pow(2,14)},i)),readable:n};function s(){return Ks.__awaiter(this,void 0,void 0,function*(){return yield(yield OU.RecordBatchReader.from(t)).open(e)})}function c(_,v){return Ks.__awaiter(this,void 0,void 0,function*(){let T=_.desiredSize,A=null;for(;!(A=yield v.next()).done;)if(_.enqueue(A.value),T!=null&&--T<=0)return;_.close()})}}hu.recordBatchReaderThroughDOMStream=FU});var Lv=C(yu=>{"use strict";Object.defineProperty(yu,"__esModule",{value:!0});yu.recordBatchWriterThroughDOMStream=void 0;var pu=at(),MU=ar();function CU(i,e){let t=new this(i),r=new MU.AsyncByteStream(t),n=new ReadableStream({type:"bytes",cancel(){return pu.__awaiter(this,void 0,void 0,function*(){yield r.cancel()})},pull(c){return pu.__awaiter(this,void 0,void 0,function*(){yield s(c)})},start(c){return pu.__awaiter(this,void 0,void 0,function*(){yield s(c)})}},Object.assign({highWaterMark:Math.pow(2,14)},e));return{writable:new WritableStream(t,i),readable:n};function s(c){return pu.__awaiter(this,void 0,void 0,function*(){let _=null,v=c.desiredSize;for(;_=yield r.read(v||null);)if(c.enqueue(_),v!=null&&(v-=_.byteLength)<=0)return;c.close()})}}yu.recordBatchWriterThroughDOMStream=CU});var qd=C(de=>{"use strict";Object.defineProperty(de,"__esModule",{value:!0});de.custom=de.or=de.and=de.col=de.lit=de.CustomPredicate=de.Not=de.GTeq=de.LTeq=de.Equals=de.Or=de.And=de.CombinationPredicate=de.ComparisonPredicate=de.Predicate=de.Col=de.Literal=de.Value=void 0;var UU=Wa(),wr=class{eq(e){return e instanceof wr||(e=new Ei(e)),new Nd(this,e)}le(e){return e instanceof wr||(e=new Ei(e)),new Pd(this,e)}ge(e){return e instanceof wr||(e=new Ei(e)),new xd(this,e)}lt(e){return new ns(this.ge(e))}gt(e){return new ns(this.le(e))}ne(e){return new ns(this.eq(e))}};de.Value=wr;var Ei=class extends wr{constructor(e){super();this.v=e}};de.Literal=Ei;var Ed=class extends wr{constructor(e){super();this.name=e}bind(e){if(!this.colidx){this.colidx=-1;let r=e.schema.fields;for(let n=-1;++n<r.length;)if(r[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 r=>t.get(r)}};de.Col=Ed;var ts=class{and(...e){return new is(this,...e)}or(...e){return new rs(this,...e)}not(){return new ns(this)}};de.Predicate=ts;var Zs=class extends ts{constructor(e,t){super();this.left=e,this.right=t}bind(e){return this.left instanceof Ei?this.right instanceof Ei?this._bindLitLit(e,this.left,this.right):this._bindLitCol(e,this.left,this.right):this.right instanceof Ei?this._bindColLit(e,this.left,this.right):this._bindColCol(e,this.left,this.right)}};de.ComparisonPredicate=Zs;var Xs=class extends ts{constructor(...e){super();this.children=e}};de.CombinationPredicate=Xs;Xs.prototype.children=Object.freeze([]);var is=class extends Xs{constructor(...e){e=e.reduce((t,r)=>t.concat(r instanceof is?r.children:r),[]);super(...e)}bind(e){let t=this.children.map(r=>r.bind(e));return(r,n)=>t.every(s=>s(r,n))}};de.And=is;var rs=class extends Xs{constructor(...e){e=e.reduce((t,r)=>t.concat(r instanceof rs?r.children:r),[]);super(...e)}bind(e){let t=this.children.map(r=>r.bind(e));return(r,n)=>t.some(s=>s(r,n))}};de.Or=rs;var Nd=class extends Zs{_bindLitLit(e,t,r){let n=t.v==r.v;return()=>n}_bindColCol(e,t,r){let n=t.bind(e),s=r.bind(e);return(c,_)=>n(c,_)==s(c,_)}_bindColLit(e,t,r){let n=t.bind(e);if(t.vector instanceof UU.DictionaryVector){let s,c=t.vector;return c.dictionary!==this.lastDictionary?(s=c.reverseLookup(r.v),this.lastDictionary=c.dictionary,this.lastKey=s):s=this.lastKey,s===-1?()=>!1:_=>c.getKey(_)===s}else return(s,c)=>n(s,c)==r.v}_bindLitCol(e,t,r){return this._bindColLit(e,r,t)}};de.Equals=Nd;var Pd=class extends Zs{_bindLitLit(e,t,r){let n=t.v<=r.v;return()=>n}_bindColCol(e,t,r){let n=t.bind(e),s=r.bind(e);return(c,_)=>n(c,_)<=s(c,_)}_bindColLit(e,t,r){let n=t.bind(e);return(s,c)=>n(s,c)<=r.v}_bindLitCol(e,t,r){let n=r.bind(e);return(s,c)=>t.v<=n(s,c)}};de.LTeq=Pd;var xd=class extends Zs{_bindLitLit(e,t,r){let n=t.v>=r.v;return()=>n}_bindColCol(e,t,r){let n=t.bind(e),s=r.bind(e);return(c,_)=>n(c,_)>=s(c,_)}_bindColLit(e,t,r){let n=t.bind(e);return(s,c)=>n(s,c)>=r.v}_bindLitCol(e,t,r){let n=r.bind(e);return(s,c)=>t.v>=n(s,c)}};de.GTeq=xd;var ns=class extends ts{constructor(e){super();this.child=e}bind(e){let t=this.child.bind(e);return(r,n)=>!t(r,n)}};de.Not=ns;var Ld=class extends ts{constructor(e,t){super();this.next=e,this.bind_=t}bind(e){return this.bind_(e),this.next}};de.CustomPredicate=Ld;function VU(i){return new Ei(i)}de.lit=VU;function kU(i){return new Ed(i)}de.col=kU;function RU(...i){return new is(...i)}de.and=RU;function EU(...i){return new rs(...i)}de.or=EU;function NU(i,e){return new Ld(i,e)}de.custom=NU});var $v=C(Br=>{"use strict";Object.defineProperty(Br,"__esModule",{value:!0});Br.FilteredDataFrame=Br.CountByResult=Br.DataFrame=void 0;var qv=Es(),zv=Ga(),zd=Qe(),Wv=qd(),PU=Vi(),Hv=me(),Wd=class extends qv.Table{filter(e){return new Qs(this.chunks,e)}scan(e,t){let r=this.chunks,n=r.length;for(let s=-1;++s<n;){let c=r[s];t&&t(c);for(let _=-1,v=c.length;++_<v;)e(_,c)}}scanReverse(e,t){let r=this.chunks,n=r.length;for(let s=n;--s>=0;){let c=r[s];t&&t(c);for(let _=c.length;--_>=0;)e(_,c)}}countBy(e){let t=this.chunks,r=t.length,n=typeof e=="string"?new Wv.Col(e):e;n.bind(t[r-1]);let s=n.vector;if(!Hv.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)),_=c==4?Uint32Array:c>=2?Uint16Array:Uint8Array,v=new _(s.dictionary.length);for(let T=-1;++T<r;){let A=t[T];n.bind(A);let P=n.vector.indices;for(let q=-1,J=A.length;++q<J;){let Ce=P.get(q);Ce!==null&&v[Ce]++}}return new _u(s.dictionary,zv.IntVector.from(v))}};Br.DataFrame=Wd;var _u=class extends qv.Table{constructor(e,t){let r=new zd.Schema([new zd.Field("values",e.type),new zd.Field("counts",t.type)]);super(new PU.RecordBatch(r,t.length,[e,t]))}toJSON(){let e=this.getColumnAt(0),t=this.getColumnAt(1),r={};for(let n=-1;++n<this.length;)r[e.get(n)]=t.get(n);return r}};Br.CountByResult=_u;var Yv=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 Wd{constructor(e,t){super(e);this._predicate=t}scan(e,t){let r=this._chunks,n=r.length;for(let s=-1;++s<n;){let c=r[s],_=this._predicate.bind(c),v=!1;for(let T=-1,A=c.length;++T<A;)_(T,c)&&(t&&!v&&(t(c),v=!0),e(T,c))}}scanReverse(e,t){let r=this._chunks,n=r.length;for(let s=n;--s>=0;){let c=r[s],_=this._predicate.bind(c),v=!1;for(let T=c.length;--T>=0;)_(T,c)&&(t&&!v&&(t(c),v=!0),e(T,c))}}count(){let e=0,t=this._chunks,r=t.length;for(let n=-1;++n<r;){let s=t[n],c=this._predicate.bind(s);for(let _=-1,v=s.length;++_<v;)c(_,s)&&++e}return e}[Symbol.iterator](){return new Yv(this._chunks,this._predicate)}filter(e){return new Qs(this._chunks,this._predicate.and(e))}countBy(e){let t=this._chunks,r=t.length,n=typeof e=="string"?new Wv.Col(e):e;n.bind(t[r-1]);let s=n.vector;if(!Hv.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)),_=c==4?Uint32Array:c>=2?Uint16Array:Uint8Array,v=new _(s.dictionary.length);for(let T=-1;++T<r;){let A=t[T],P=this._predicate.bind(A);n.bind(A);let q=n.vector.indices;for(let J=-1,Ce=A.length;++J<Ce;){let Te=q.get(J);Te!==null&&P(J,A)&&v[Te]++}}return new _u(s.dictionary,zv.IntVector.from(v))}};Br.FilteredDataFrame=Qs});var Kv=C(b=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});b.isTypedArray=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.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.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.Field=b.Schema=b.Visitor=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.Type=b.MessageHeader=b.MetadataVersion=b.IntervalUnit=b.UnionMode=b.Precision=b.TimeUnit=b.DateUnit=void 0;var ss=Gi();Object.defineProperty(b,"DateUnit",{enumerable:!0,get:function(){return ss.DateUnit}});Object.defineProperty(b,"TimeUnit",{enumerable:!0,get:function(){return ss.TimeUnit}});Object.defineProperty(b,"Precision",{enumerable:!0,get:function(){return ss.Precision}});Object.defineProperty(b,"UnionMode",{enumerable:!0,get:function(){return ss.UnionMode}});Object.defineProperty(b,"IntervalUnit",{enumerable:!0,get:function(){return ss.IntervalUnit}});Object.defineProperty(b,"MetadataVersion",{enumerable:!0,get:function(){return ss.MetadataVersion}});var xU=So();Object.defineProperty(b,"MessageHeader",{enumerable:!0,get:function(){return xU.MessageHeader}});var Gv=Be();Object.defineProperty(b,"Type",{enumerable:!0,get:function(){return Gv.Type}});Object.defineProperty(b,"BufferType",{enumerable:!0,get:function(){return Gv.BufferType}});var LU=Yt();Object.defineProperty(b,"Data",{enumerable:!0,get:function(){return LU.Data}});var se=me();Object.defineProperty(b,"DataType",{enumerable:!0,get:function(){return se.DataType}});Object.defineProperty(b,"Null",{enumerable:!0,get:function(){return se.Null}});Object.defineProperty(b,"Bool",{enumerable:!0,get:function(){return se.Bool}});Object.defineProperty(b,"Int",{enumerable:!0,get:function(){return se.Int}});Object.defineProperty(b,"Int8",{enumerable:!0,get:function(){return se.Int8}});Object.defineProperty(b,"Int16",{enumerable:!0,get:function(){return se.Int16}});Object.defineProperty(b,"Int32",{enumerable:!0,get:function(){return se.Int32}});Object.defineProperty(b,"Int64",{enumerable:!0,get:function(){return se.Int64}});Object.defineProperty(b,"Uint8",{enumerable:!0,get:function(){return se.Uint8}});Object.defineProperty(b,"Uint16",{enumerable:!0,get:function(){return se.Uint16}});Object.defineProperty(b,"Uint32",{enumerable:!0,get:function(){return se.Uint32}});Object.defineProperty(b,"Uint64",{enumerable:!0,get:function(){return se.Uint64}});Object.defineProperty(b,"Float",{enumerable:!0,get:function(){return se.Float}});Object.defineProperty(b,"Float16",{enumerable:!0,get:function(){return se.Float16}});Object.defineProperty(b,"Float32",{enumerable:!0,get:function(){return se.Float32}});Object.defineProperty(b,"Float64",{enumerable:!0,get:function(){return se.Float64}});Object.defineProperty(b,"Utf8",{enumerable:!0,get:function(){return se.Utf8}});Object.defineProperty(b,"Binary",{enumerable:!0,get:function(){return se.Binary}});Object.defineProperty(b,"FixedSizeBinary",{enumerable:!0,get:function(){return se.FixedSizeBinary}});Object.defineProperty(b,"Date_",{enumerable:!0,get:function(){return se.Date_}});Object.defineProperty(b,"DateDay",{enumerable:!0,get:function(){return se.DateDay}});Object.defineProperty(b,"DateMillisecond",{enumerable:!0,get:function(){return se.DateMillisecond}});Object.defineProperty(b,"Timestamp",{enumerable:!0,get:function(){return se.Timestamp}});Object.defineProperty(b,"TimestampSecond",{enumerable:!0,get:function(){return se.TimestampSecond}});Object.defineProperty(b,"TimestampMillisecond",{enumerable:!0,get:function(){return se.TimestampMillisecond}});Object.defineProperty(b,"TimestampMicrosecond",{enumerable:!0,get:function(){return se.TimestampMicrosecond}});Object.defineProperty(b,"TimestampNanosecond",{enumerable:!0,get:function(){return se.TimestampNanosecond}});Object.defineProperty(b,"Time",{enumerable:!0,get:function(){return se.Time}});Object.defineProperty(b,"TimeSecond",{enumerable:!0,get:function(){return se.TimeSecond}});Object.defineProperty(b,"TimeMillisecond",{enumerable:!0,get:function(){return se.TimeMillisecond}});Object.defineProperty(b,"TimeMicrosecond",{enumerable:!0,get:function(){return se.TimeMicrosecond}});Object.defineProperty(b,"TimeNanosecond",{enumerable:!0,get:function(){return se.TimeNanosecond}});Object.defineProperty(b,"Decimal",{enumerable:!0,get:function(){return se.Decimal}});Object.defineProperty(b,"List",{enumerable:!0,get:function(){return se.List}});Object.defineProperty(b,"Struct",{enumerable:!0,get:function(){return se.Struct}});Object.defineProperty(b,"Union",{enumerable:!0,get:function(){return se.Union}});Object.defineProperty(b,"DenseUnion",{enumerable:!0,get:function(){return se.DenseUnion}});Object.defineProperty(b,"SparseUnion",{enumerable:!0,get:function(){return se.SparseUnion}});Object.defineProperty(b,"Dictionary",{enumerable:!0,get:function(){return se.Dictionary}});Object.defineProperty(b,"Interval",{enumerable:!0,get:function(){return se.Interval}});Object.defineProperty(b,"IntervalDayTime",{enumerable:!0,get:function(){return se.IntervalDayTime}});Object.defineProperty(b,"IntervalYearMonth",{enumerable:!0,get:function(){return se.IntervalYearMonth}});Object.defineProperty(b,"FixedSizeList",{enumerable:!0,get:function(){return se.FixedSizeList}});Object.defineProperty(b,"Map_",{enumerable:!0,get:function(){return se.Map_}});var qU=Es();Object.defineProperty(b,"Table",{enumerable:!0,get:function(){return qU.Table}});var zU=Rn();Object.defineProperty(b,"Column",{enumerable:!0,get:function(){return zU.Column}});var WU=nt();Object.defineProperty(b,"Visitor",{enumerable:!0,get:function(){return WU.Visitor}});var Jv=Qe();Object.defineProperty(b,"Schema",{enumerable:!0,get:function(){return Jv.Schema}});Object.defineProperty(b,"Field",{enumerable:!0,get:function(){return Jv.Field}});var te=_i();Object.defineProperty(b,"Vector",{enumerable:!0,get:function(){return te.Vector}});Object.defineProperty(b,"BaseVector",{enumerable:!0,get:function(){return te.BaseVector}});Object.defineProperty(b,"BinaryVector",{enumerable:!0,get:function(){return te.BinaryVector}});Object.defineProperty(b,"BoolVector",{enumerable:!0,get:function(){return te.BoolVector}});Object.defineProperty(b,"Chunked",{enumerable:!0,get:function(){return te.Chunked}});Object.defineProperty(b,"DateVector",{enumerable:!0,get:function(){return te.DateVector}});Object.defineProperty(b,"DateDayVector",{enumerable:!0,get:function(){return te.DateDayVector}});Object.defineProperty(b,"DateMillisecondVector",{enumerable:!0,get:function(){return te.DateMillisecondVector}});Object.defineProperty(b,"DecimalVector",{enumerable:!0,get:function(){return te.DecimalVector}});Object.defineProperty(b,"DictionaryVector",{enumerable:!0,get:function(){return te.DictionaryVector}});Object.defineProperty(b,"FixedSizeBinaryVector",{enumerable:!0,get:function(){return te.FixedSizeBinaryVector}});Object.defineProperty(b,"FixedSizeListVector",{enumerable:!0,get:function(){return te.FixedSizeListVector}});Object.defineProperty(b,"FloatVector",{enumerable:!0,get:function(){return te.FloatVector}});Object.defineProperty(b,"Float16Vector",{enumerable:!0,get:function(){return te.Float16Vector}});Object.defineProperty(b,"Float32Vector",{enumerable:!0,get:function(){return te.Float32Vector}});Object.defineProperty(b,"Float64Vector",{enumerable:!0,get:function(){return te.Float64Vector}});Object.defineProperty(b,"IntervalVector",{enumerable:!0,get:function(){return te.IntervalVector}});Object.defineProperty(b,"IntervalDayTimeVector",{enumerable:!0,get:function(){return te.IntervalDayTimeVector}});Object.defineProperty(b,"IntervalYearMonthVector",{enumerable:!0,get:function(){return te.IntervalYearMonthVector}});Object.defineProperty(b,"IntVector",{enumerable:!0,get:function(){return te.IntVector}});Object.defineProperty(b,"Int8Vector",{enumerable:!0,get:function(){return te.Int8Vector}});Object.defineProperty(b,"Int16Vector",{enumerable:!0,get:function(){return te.Int16Vector}});Object.defineProperty(b,"Int32Vector",{enumerable:!0,get:function(){return te.Int32Vector}});Object.defineProperty(b,"Int64Vector",{enumerable:!0,get:function(){return te.Int64Vector}});Object.defineProperty(b,"Uint8Vector",{enumerable:!0,get:function(){return te.Uint8Vector}});Object.defineProperty(b,"Uint16Vector",{enumerable:!0,get:function(){return te.Uint16Vector}});Object.defineProperty(b,"Uint32Vector",{enumerable:!0,get:function(){return te.Uint32Vector}});Object.defineProperty(b,"Uint64Vector",{enumerable:!0,get:function(){return te.Uint64Vector}});Object.defineProperty(b,"ListVector",{enumerable:!0,get:function(){return te.ListVector}});Object.defineProperty(b,"MapVector",{enumerable:!0,get:function(){return te.MapVector}});Object.defineProperty(b,"NullVector",{enumerable:!0,get:function(){return te.NullVector}});Object.defineProperty(b,"StructVector",{enumerable:!0,get:function(){return te.StructVector}});Object.defineProperty(b,"TimestampVector",{enumerable:!0,get:function(){return te.TimestampVector}});Object.defineProperty(b,"TimestampSecondVector",{enumerable:!0,get:function(){return te.TimestampSecondVector}});Object.defineProperty(b,"TimestampMillisecondVector",{enumerable:!0,get:function(){return te.TimestampMillisecondVector}});Object.defineProperty(b,"TimestampMicrosecondVector",{enumerable:!0,get:function(){return te.TimestampMicrosecondVector}});Object.defineProperty(b,"TimestampNanosecondVector",{enumerable:!0,get:function(){return te.TimestampNanosecondVector}});Object.defineProperty(b,"TimeVector",{enumerable:!0,get:function(){return te.TimeVector}});Object.defineProperty(b,"TimeSecondVector",{enumerable:!0,get:function(){return te.TimeSecondVector}});Object.defineProperty(b,"TimeMillisecondVector",{enumerable:!0,get:function(){return te.TimeMillisecondVector}});Object.defineProperty(b,"TimeMicrosecondVector",{enumerable:!0,get:function(){return te.TimeMicrosecondVector}});Object.defineProperty(b,"TimeNanosecondVector",{enumerable:!0,get:function(){return te.TimeNanosecondVector}});Object.defineProperty(b,"UnionVector",{enumerable:!0,get:function(){return te.UnionVector}});Object.defineProperty(b,"DenseUnionVector",{enumerable:!0,get:function(){return te.DenseUnionVector}});Object.defineProperty(b,"SparseUnionVector",{enumerable:!0,get:function(){return te.SparseUnionVector}});Object.defineProperty(b,"Utf8Vector",{enumerable:!0,get:function(){return te.Utf8Vector}});var oe=fa();Object.defineProperty(b,"Builder",{enumerable:!0,get:function(){return oe.Builder}});Object.defineProperty(b,"BinaryBuilder",{enumerable:!0,get:function(){return oe.BinaryBuilder}});Object.defineProperty(b,"BoolBuilder",{enumerable:!0,get:function(){return oe.BoolBuilder}});Object.defineProperty(b,"DateBuilder",{enumerable:!0,get:function(){return oe.DateBuilder}});Object.defineProperty(b,"DateDayBuilder",{enumerable:!0,get:function(){return oe.DateDayBuilder}});Object.defineProperty(b,"DateMillisecondBuilder",{enumerable:!0,get:function(){return oe.DateMillisecondBuilder}});Object.defineProperty(b,"DecimalBuilder",{enumerable:!0,get:function(){return oe.DecimalBuilder}});Object.defineProperty(b,"DictionaryBuilder",{enumerable:!0,get:function(){return oe.DictionaryBuilder}});Object.defineProperty(b,"FixedSizeBinaryBuilder",{enumerable:!0,get:function(){return oe.FixedSizeBinaryBuilder}});Object.defineProperty(b,"FixedSizeListBuilder",{enumerable:!0,get:function(){return oe.FixedSizeListBuilder}});Object.defineProperty(b,"FloatBuilder",{enumerable:!0,get:function(){return oe.FloatBuilder}});Object.defineProperty(b,"Float16Builder",{enumerable:!0,get:function(){return oe.Float16Builder}});Object.defineProperty(b,"Float32Builder",{enumerable:!0,get:function(){return oe.Float32Builder}});Object.defineProperty(b,"Float64Builder",{enumerable:!0,get:function(){return oe.Float64Builder}});Object.defineProperty(b,"IntervalBuilder",{enumerable:!0,get:function(){return oe.IntervalBuilder}});Object.defineProperty(b,"IntervalDayTimeBuilder",{enumerable:!0,get:function(){return oe.IntervalDayTimeBuilder}});Object.defineProperty(b,"IntervalYearMonthBuilder",{enumerable:!0,get:function(){return oe.IntervalYearMonthBuilder}});Object.defineProperty(b,"IntBuilder",{enumerable:!0,get:function(){return oe.IntBuilder}});Object.defineProperty(b,"Int8Builder",{enumerable:!0,get:function(){return oe.Int8Builder}});Object.defineProperty(b,"Int16Builder",{enumerable:!0,get:function(){return oe.Int16Builder}});Object.defineProperty(b,"Int32Builder",{enumerable:!0,get:function(){return oe.Int32Builder}});Object.defineProperty(b,"Int64Builder",{enumerable:!0,get:function(){return oe.Int64Builder}});Object.defineProperty(b,"Uint8Builder",{enumerable:!0,get:function(){return oe.Uint8Builder}});Object.defineProperty(b,"Uint16Builder",{enumerable:!0,get:function(){return oe.Uint16Builder}});Object.defineProperty(b,"Uint32Builder",{enumerable:!0,get:function(){return oe.Uint32Builder}});Object.defineProperty(b,"Uint64Builder",{enumerable:!0,get:function(){return oe.Uint64Builder}});Object.defineProperty(b,"ListBuilder",{enumerable:!0,get:function(){return oe.ListBuilder}});Object.defineProperty(b,"MapBuilder",{enumerable:!0,get:function(){return oe.MapBuilder}});Object.defineProperty(b,"NullBuilder",{enumerable:!0,get:function(){return oe.NullBuilder}});Object.defineProperty(b,"StructBuilder",{enumerable:!0,get:function(){return oe.StructBuilder}});Object.defineProperty(b,"TimestampBuilder",{enumerable:!0,get:function(){return oe.TimestampBuilder}});Object.defineProperty(b,"TimestampSecondBuilder",{enumerable:!0,get:function(){return oe.TimestampSecondBuilder}});Object.defineProperty(b,"TimestampMillisecondBuilder",{enumerable:!0,get:function(){return oe.TimestampMillisecondBuilder}});Object.defineProperty(b,"TimestampMicrosecondBuilder",{enumerable:!0,get:function(){return oe.TimestampMicrosecondBuilder}});Object.defineProperty(b,"TimestampNanosecondBuilder",{enumerable:!0,get:function(){return oe.TimestampNanosecondBuilder}});Object.defineProperty(b,"TimeBuilder",{enumerable:!0,get:function(){return oe.TimeBuilder}});Object.defineProperty(b,"TimeSecondBuilder",{enumerable:!0,get:function(){return oe.TimeSecondBuilder}});Object.defineProperty(b,"TimeMillisecondBuilder",{enumerable:!0,get:function(){return oe.TimeMillisecondBuilder}});Object.defineProperty(b,"TimeMicrosecondBuilder",{enumerable:!0,get:function(){return oe.TimeMicrosecondBuilder}});Object.defineProperty(b,"TimeNanosecondBuilder",{enumerable:!0,get:function(){return oe.TimeNanosecondBuilder}});Object.defineProperty(b,"UnionBuilder",{enumerable:!0,get:function(){return oe.UnionBuilder}});Object.defineProperty(b,"DenseUnionBuilder",{enumerable:!0,get:function(){return oe.DenseUnionBuilder}});Object.defineProperty(b,"SparseUnionBuilder",{enumerable:!0,get:function(){return oe.SparseUnionBuilder}});Object.defineProperty(b,"Utf8Builder",{enumerable:!0,get:function(){return oe.Utf8Builder}});var Hd=ar();Object.defineProperty(b,"ByteStream",{enumerable:!0,get:function(){return Hd.ByteStream}});Object.defineProperty(b,"AsyncByteStream",{enumerable:!0,get:function(){return Hd.AsyncByteStream}});Object.defineProperty(b,"AsyncByteQueue",{enumerable:!0,get:function(){return Hd.AsyncByteQueue}});var eo=Ys();Object.defineProperty(b,"RecordBatchReader",{enumerable:!0,get:function(){return eo.RecordBatchReader}});Object.defineProperty(b,"RecordBatchFileReader",{enumerable:!0,get:function(){return eo.RecordBatchFileReader}});Object.defineProperty(b,"RecordBatchStreamReader",{enumerable:!0,get:function(){return eo.RecordBatchStreamReader}});Object.defineProperty(b,"AsyncRecordBatchFileReader",{enumerable:!0,get:function(){return eo.AsyncRecordBatchFileReader}});Object.defineProperty(b,"AsyncRecordBatchStreamReader",{enumerable:!0,get:function(){return eo.AsyncRecordBatchStreamReader}});var mu=Ea();Object.defineProperty(b,"RecordBatchWriter",{enumerable:!0,get:function(){return mu.RecordBatchWriter}});Object.defineProperty(b,"RecordBatchFileWriter",{enumerable:!0,get:function(){return mu.RecordBatchFileWriter}});Object.defineProperty(b,"RecordBatchStreamWriter",{enumerable:!0,get:function(){return mu.RecordBatchStreamWriter}});Object.defineProperty(b,"RecordBatchJSONWriter",{enumerable:!0,get:function(){return mu.RecordBatchJSONWriter}});var Yd=Sa();Object.defineProperty(b,"MessageReader",{enumerable:!0,get:function(){return Yd.MessageReader}});Object.defineProperty(b,"AsyncMessageReader",{enumerable:!0,get:function(){return Yd.AsyncMessageReader}});Object.defineProperty(b,"JSONMessageReader",{enumerable:!0,get:function(){return Yd.JSONMessageReader}});var HU=Gr();Object.defineProperty(b,"Message",{enumerable:!0,get:function(){return HU.Message}});var YU=Vi();Object.defineProperty(b,"RecordBatch",{enumerable:!0,get:function(){return YU.RecordBatch}});var $d=$v();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}});var $U=js(),GU=Qc(),JU=si(),KU=ms(),ZU=Ge(),XU=Os(),QU=qd();b.predicate=QU;var Gd=ml();b.util=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},$U),GU),JU),KU),ZU),XU),{compareSchemas:Gd.compareSchemas,compareFields:Gd.compareFields,compareTypes:Gd.compareTypes});var eV=Hr();Object.defineProperty(b,"isTypedArray",{enumerable:!0,get:function(){return eV.isTypedArray}})});var vu=C(()=>{});var Qd=C(()=>{});var Or;(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"})(Or||(Or={}));var on;(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"})(on||(on={}));var xi;(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"})(xi||(xi={}));var Fr;(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"})(Fr||(Fr={}));var yS=class{log(e){}},_S=class{log(e){console.log(e)}};function lV(i){switch(i){case 0:return"NONE";case 1:return"DEBUG";case 2:return"INFO";case 3:return"WARNING";case 4:return"ERROR";default:return"?"}}function dV(i){switch(i){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 fV(i){switch(i){case 1:return"CONNECT";case 2:return"DISCONNECT";case 3:return"OPEN";case 4:return"QUERY";default:return"?"}}function hV(i){switch(i){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 ge;(function(e){e[e.SUCCESS=0]="SUCCESS"})(ge||(ge={}));var Zv=wi(ys()),Xv=wi(fa()),os=wi(Ys()),as=wi(Ea()),Qv=wi(Rv()),ej=wi(Pv()),bu=wi(xv()),gu=wi(Lv()),S=wi(Kv());Zv.default.toDOMStream=Qv.toDOMStream;Xv.Builder.throughDOM=ej.builderThroughDOMStream;os.RecordBatchReader.throughDOM=bu.recordBatchReaderThroughDOMStream;os.RecordBatchFileReader.throughDOM=bu.recordBatchReaderThroughDOMStream;os.RecordBatchStreamReader.throughDOM=bu.recordBatchReaderThroughDOMStream;as.RecordBatchWriter.throughDOM=gu.recordBatchWriterThroughDOMStream;as.RecordBatchFileWriter.throughDOM=gu.recordBatchWriterThroughDOMStream;as.RecordBatchStreamWriter.throughDOM=gu.recordBatchWriterThroughDOMStream;var Jd=class{constructor(e,t){this._bindings=e,this._conn=t}close(){this._bindings.disconnect(this._conn)}useUnsafe(e){return e(this._bindings,this._conn)}query(e){let t=this._bindings.runQuery(this._conn,e),r=S.RecordBatchReader.from(t);return console.assert(r.isSync()),console.assert(r.isFile()),S.Table.from(r)}send(e){let t=this._bindings.sendQuery(this._conn,e),r=new Kd(this._bindings,this._conn,t),n=S.RecordBatchReader.from(r);return console.assert(n.isSync()),console.assert(n.isStream()),n}prepare(e){let t=this._bindings.createPrepared(this._conn,e);return new tj(this._bindings,this._conn,t)}insertArrowTable(e,t){let r=e.serialize("binary",!0);this.insertArrowFromIPCStream(r,t)}insertArrowFromIPCStream(e,t){this._bindings.insertArrowFromIPCStream(this._conn,e,t)}insertCSVFromPath(e,t){this._bindings.insertCSVFromPath(this._conn,e,t)}insertJSONFromPath(e,t){this._bindings.insertJSONFromPath(this._conn,e,t)}},Kd=class{constructor(e,t,r){this.bindings=e;this.conn=t;this.header=r;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}},tj=class{constructor(e,t,r){this.bindings=e,this.connectionId=t,this.statementId=r}close(){this.bindings.closePrepared(this.connectionId,this.statementId)}query(...e){let t=this.bindings.runPrepared(this.connectionId,this.statementId,e),r=S.RecordBatchReader.from(t);return console.assert(r.isSync()),console.assert(r.isFile()),S.Table.from(r)}send(...e){let t=this.bindings.sendPrepared(this.connectionId,this.statementId,e),r=new Kd(this.bindings,this.connectionId,t),n=S.RecordBatchReader.from(r);return console.assert(n.isSync()),console.assert(n.isStream()),n}};function tV(){let i=new TextDecoder;return e=>(typeof SharedArrayBuffer!="undefined"&&e.buffer instanceof SharedArrayBuffer&&(e=new Uint8Array(e)),i.decode(e))}var iV=tV();function Ni(i,e){i.ccall("duckdb_web_fail_with",null,["string"],[e])}function us(i,e,t){let r=i.HEAPU8.subarray(e,e+t),n=new Uint8Array(new ArrayBuffer(r.byteLength));return n.set(r),n}function pe(i,e,t){return iV(i.HEAPU8.subarray(e,e+t))}var pt;(function(r){r[r.BUFFER=0]="BUFFER",r[r.NATIVE=1]="NATIVE",r[r.HTTP=3]="HTTP"})(pt||(pt={}));function Ie(i,e,t,r){let n=i.stackSave(),s=i.stackAlloc(3*8);t.unshift("number"),r.unshift(s),i.ccall(e,null,t,r);let c=i.HEAPF64[(s>>3)+0],_=i.HEAPF64[(s>>3)+1],v=i.HEAPF64[(s>>3)+2];return i.stackRestore(n),[c,_,v]}function qe(i){i.ccall("duckdb_web_clear_response",null,[],[])}var rV={testPlatformFeature:(i,e)=>!1,openFile:(i,e)=>{},syncFile:(i,e)=>{},closeFile:(i,e)=>{},getLastFileModificationTime:(i,e)=>0,truncateFile:(i,e,t)=>{},readFile:(i,e,t,r,n)=>0,writeFile:(i,e,t,r,n)=>0,removeDirectory:(i,e,t)=>{},checkDirectory:(i,e,t)=>!1,createDirectory:(i,e,t)=>{},listDirectoryEntries:(i,e,t)=>!1,glob:(i,e,t)=>{},moveFile:(i,e,t,r,n)=>{},checkFile:(i,e,t)=>!1,removeFile:(i,e,t)=>{}};var Zd=class{constructor(e){let t=new Float64Array(e.buffer,e.byteOffset,e.byteLength/8),r=new Uint8Array(new ArrayBuffer(e.byteLength));r.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=r}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}};function to(i,e){switch(e.typeId){case S.Type.Binary:return{name:i,type:"binary"};case S.Type.Bool:return{name:i,type:"bool"};case S.Type.Date:return{name:i,type:"date"};case S.Type.DateDay:return{name:i,type:"date32[d]"};case S.Type.DateMillisecond:return{name:i,type:"date64[ms]"};case S.Type.Decimal:{let t=e;return{name:i,type:"decimal",precision:t.precision,scale:t.scale}}case S.Type.Float:return{name:i,type:"float"};case S.Type.Float16:return{name:i,type:"float16"};case S.Type.Float32:return{name:i,type:"float32"};case S.Type.Float64:return{name:i,type:"float64"};case S.Type.Int:return{name:i,type:"int32"};case S.Type.Int16:return{name:i,type:"int16"};case S.Type.Int32:return{name:i,type:"int32"};case S.Type.Int64:return{name:i,type:"int64"};case S.Type.Uint16:return{name:i,type:"uint16"};case S.Type.Uint32:return{name:i,type:"uint32"};case S.Type.Uint64:return{name:i,type:"uint64"};case S.Type.Uint8:return{name:i,type:"uint8"};case S.Type.IntervalDayTime:return{name:i,type:"interval[dt]"};case S.Type.IntervalYearMonth:return{name:i,type:"interval[m]"};case S.Type.List:{let t=e;return{name:i,type:"list",children:[to(t.valueField.name,t.valueField.type)]}}case S.Type.FixedSizeBinary:return{name:i,type:"fixedsizebinary",byteWidth:e.byteWidth};case S.Type.Null:return{name:i,type:"null"};case S.Type.Utf8:return{name:i,type:"utf8"};case S.Type.Struct:return{name:i,type:"struct",children:e.children.map(r=>to(r.name,r.type))};case S.Type.Time:return{name:i,type:"time[s]"};case S.Type.TimeMicrosecond:return{name:i,type:"time[us]"};case S.Type.TimeMillisecond:return{name:i,type:"time[ms]"};case S.Type.TimeNanosecond:return{name:i,type:"time[ns]"};case S.Type.TimeSecond:return{name:i,type:"time[s]"};case S.Type.Timestamp:return{name:i,type:"timestamp",timezone:e.timezone||void 0};case S.Type.TimestampSecond:return{name:i,type:"timestamp[s]",timezone:e.timezone||void 0};case S.Type.TimestampMicrosecond:return{name:i,type:"timestamp[us]",timezone:e.timezone||void 0};case S.Type.TimestampNanosecond:return{name:i,type:"timestamp[ns]",timezone:e.timezone||void 0};case S.Type.TimestampMillisecond:return{name:i,type:"timestamp[ms]",timezone:e.timezone||void 0}}throw new Error(`unsupported arrow type: ${e.toString()}`)}var nV=new TextEncoder,ij;(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"})(ij||(ij={}));var Xd=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,r,n]=Ie(this.mod,"duckdb_web_open",["string"],[JSON.stringify(e)]);if(t!==ge.SUCCESS)throw new Error(pe(this.mod,r,n));qe(this.mod)}reset(){let[e,t,r]=Ie(this.mod,"duckdb_web_reset",[],[]);if(e!==ge.SUCCESS)throw new Error(pe(this.mod,t,r));qe(this.mod)}getVersion(){let[e,t,r]=Ie(this.mod,"duckdb_web_get_version",[],[]);if(e!==ge.SUCCESS)throw new Error(pe(this.mod,t,r));let n=pe(this.mod,t,r);return qe(this.mod),n}getFeatureFlags(){return this.mod.ccall("duckdb_web_get_feature_flags","number",[],[])}tokenize(e){let[t,r,n]=Ie(this.mod,"duckdb_web_tokenize",["string"],[e]);if(t!==ge.SUCCESS)throw new Error(pe(this.mod,r,n));let s=pe(this.mod,r,n);return qe(this.mod),JSON.parse(s)}connect(){let e=this.mod.ccall("duckdb_web_connect","number",[],[]);return new Jd(this,e)}disconnect(e){this.mod.ccall("duckdb_web_disconnect",null,["number"],[e])}runQuery(e,t){let[r,n,s]=Ie(this.mod,"duckdb_web_query_run",["number","string"],[e,t]);if(r!==ge.SUCCESS)throw new Error(pe(this.mod,n,s));let c=us(this.mod,n,s);return qe(this.mod),c}sendQuery(e,t){let[r,n,s]=Ie(this.mod,"duckdb_web_query_send",["number","string"],[e,t]);if(r!==ge.SUCCESS)throw new Error(pe(this.mod,n,s));let c=us(this.mod,n,s);return qe(this.mod),c}fetchQueryResults(e){let[t,r,n]=Ie(this.mod,"duckdb_web_query_fetch_results",["number"],[e]);if(t!==ge.SUCCESS)throw new Error(pe(this.mod,r,n));let s=us(this.mod,r,n);return qe(this.mod),s}createPrepared(e,t){let[r,n,s]=Ie(this.mod,"duckdb_web_prepared_create",["number","string"],[e,t]);if(r!==ge.SUCCESS)throw new Error(pe(this.mod,n,s));return qe(this.mod),n}closePrepared(e,t){let[r,n,s]=Ie(this.mod,"duckdb_web_prepared_close",["number","number"],[e,t]);if(r!==ge.SUCCESS)throw new Error(pe(this.mod,n,s));qe(this.mod)}runPrepared(e,t,r){let[n,s,c]=Ie(this.mod,"duckdb_web_prepared_run",["number","number","string"],[e,t,JSON.stringify(r)]);if(n!==ge.SUCCESS)throw new Error(pe(this.mod,s,c));let _=us(this.mod,s,c);return qe(this.mod),_}sendPrepared(e,t,r){let[n,s,c]=Ie(this.mod,"duckdb_web_prepared_send",["number","number","string"],[e,t,JSON.stringify(r)]);if(n!==ge.SUCCESS)throw new Error(pe(this.mod,s,c));let _=us(this.mod,s,c);return qe(this.mod),_}insertArrowFromIPCStream(e,t,r){if(t.length==0)return;let n=this.mod._malloc(t.length);this.mod.HEAPU8.subarray(n,n+t.length).set(t);let c=r?JSON.stringify(r):"",[_,v,T]=Ie(this.mod,"duckdb_web_insert_arrow_from_ipc_stream",["number","number","number","string"],[e,n,t.length,c]);if(_!==ge.SUCCESS)throw new Error(pe(this.mod,v,T))}insertCSVFromPath(e,t,r){if(r.columns!==void 0){r.columnsFlat=[];for(let T in r.columns)r.columnsFlat.push(to(T,r.columns[T]))}let n=Ar({},r);n.columns=n.columnsFlat,delete n.columnsFlat;let s=JSON.stringify(n),[c,_,v]=Ie(this.mod,"duckdb_web_insert_csv_from_path",["number","string","string"],[e,t,s]);if(c!==ge.SUCCESS)throw new Error(pe(this.mod,_,v))}insertJSONFromPath(e,t,r){if(r.columns!==void 0){r.columnsFlat=[];for(let T in r.columns)r.columnsFlat.push(to(T,r.columns[T]))}let n=Ar({},r);n.columns=n.columnsFlat,delete n.columnsFlat;let s=JSON.stringify(n),[c,_,v]=Ie(this.mod,"duckdb_web_insert_json_from_path",["number","string","string"],[e,t,s]);if(c!==ge.SUCCESS)throw new Error(pe(this.mod,_,v))}globFiles(e){let[t,r,n]=Ie(this.mod,"duckdb_web_fs_glob_file_infos",["string"],[e]);if(t!==ge.SUCCESS)throw new Error(pe(this.mod,r,n));let s=pe(this.mod,r,n);qe(this.mod);let c=JSON.parse(s);return c==null?[]:c}registerFileURL(e,t){t===void 0&&(t=e);let[r,n,s]=Ie(this.mod,"duckdb_web_fs_register_file_url",["string","string"],[e,t]);if(r!==ge.SUCCESS)throw new Error(pe(this.mod,n,s));qe(this.mod)}registerFileText(e,t){let r=nV.encode(t);this.registerFileBuffer(e,r)}registerFileBuffer(e,t){let r=this.mod._malloc(t.length);this.mod.HEAPU8.subarray(r,r+t.length).set(t);let[s,c,_]=Ie(this.mod,"duckdb_web_fs_register_file_buffer",["string","number","number"],[e,r,t.length]);if(s!==ge.SUCCESS)throw new Error(pe(this.mod,c,_));qe(this.mod)}registerFileHandle(e,t){let[r,n,s]=Ie(this.mod,"duckdb_web_fs_register_file_url",["string","string"],[e,e]);if(r!==ge.SUCCESS)throw new Error(pe(this.mod,n,s));if(qe(this.mod),globalThis.DUCKDB_RUNTIME._files=(globalThis.DUCKDB_RUNTIME._files||new Map).set(e,t),this.pthread){for(let c of this.pthread.runningWorkers)c.postMessage({cmd:"registerFileHandle",fileName:e,fileHandle:t});for(let c of this.pthread.unusedWorkers)c.postMessage({cmd:"dropFileHandle",fileName:e})}}dropFile(e){return this.mod.ccall("duckdb_web_fs_drop_file","boolean",["string"],[e])}dropFiles(){let[e,t,r]=Ie(this.mod,"duckdb_web_fs_drop_files",[],[]);if(e!==ge.SUCCESS)throw new Error(pe(this.mod,t,r));qe(this.mod)}flushFiles(){this.mod.ccall("duckdb_web_flush_files",null,[],[])}copyFileToPath(e,t){let[r,n,s]=Ie(this.mod,"duckdb_web_copy_file_to_path",["string","string"],[e,t]);if(r!==ge.SUCCESS)throw new Error(pe(this.mod,n,s));qe(this.mod)}copyFileToBuffer(e){let[t,r,n]=Ie(this.mod,"duckdb_web_copy_file_to_buffer",["string"],[e]);if(t!==ge.SUCCESS)throw new Error(pe(this.mod,r,n));let s=this.mod.HEAPU8.subarray(r,r+n),c=new Uint8Array(s.length);return c.set(s),qe(this.mod),c}collectFileStatistics(e,t){let[r,n,s]=Ie(this.mod,"duckdb_web_collect_file_stats",["string","boolean"],[e,t]);if(r!==ge.SUCCESS)throw new Error(pe(this.mod,n,s))}exportFileStatistics(e){let[t,r,n]=Ie(this.mod,"duckdb_web_export_file_stats",["string"],[e]);if(t!==ge.SUCCESS)throw new Error(pe(this.mod,r,n));return new Zd(this.mod.HEAPU8.subarray(r,r+n))}};var rj;(function(t){t.ROW_ARRAY="row-array",t.COLUMN_OBJECT="column-object"})(rj||(rj={}));var nj;(function(t){t[t.APPEND=0]="APPEND",t[t.IMPORT=1]="IMPORT"})(nj||(nj={}));var sV=function(){var i=import.meta.url;return function(e){e=e||{};var t=typeof e!="undefined"?e:{},r,n;t.ready=new Promise(function(o,a){r=o,n=a});var s={},c;for(c in t)t.hasOwnProperty(c)&&(s[c]=t[c]);var _=[],v="./this.program",T=function(o,a){throw a},A=typeof window=="object",P=typeof importScripts=="function",q=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",J="";function Ce(o){return t.locateFile?t.locateFile(o,J):J+o}var Te,qt,lt,cs;function oj(o){if(!(o instanceof yo)){var a=o;Ir("exiting due to exception: "+a)}}var tn,rn;q?(P?J=vu().dirname(J)+"/":J=__dirname+"/",Te=function(a,u){return tn||(tn=Qd()),rn||(rn=vu()),a=rn.normalize(a),tn.readFileSync(a,u?null:"utf8")},lt=function(a){var u=Te(a,!0);return u.buffer||(u=new Uint8Array(u)),rf(u.buffer),u},qt=function(a,u,l){tn||(tn=Qd()),rn||(rn=vu()),a=rn.normalize(a),tn.readFile(a,function(d,f){d?l(d):u(f.buffer)})},process.argv.length>1&&(v=process.argv[1].replace(/\\/g,"/")),_=process.argv.slice(2),process.on("uncaughtException",function(o){if(!(o instanceof yo))throw o}),process.on("unhandledRejection",function(o){throw o}),T=function(o,a){if(wu())throw process.exitCode=o,a;oj(a),process.exit(o)},t.inspect=function(){return"[Emscripten Module object]"}):(A||P)&&(P?J=self.location.href:typeof document!="undefined"&&document.currentScript&&(J=document.currentScript.src),i&&(J=i),J.indexOf("blob:")!==0?J=J.substr(0,J.replace(/[?#].*/,"").lastIndexOf("/")+1):J="",Te=function(o){var a=new XMLHttpRequest;return a.open("GET",o,!1),a.send(null),a.responseText},P&&(lt=function(o){var a=new XMLHttpRequest;return a.open("GET",o,!1),a.responseType="arraybuffer",a.send(null),new Uint8Array(a.response)}),qt=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)},cs=function(o){document.title=o});var aj=t.print||console.log.bind(console),Ir=t.printErr||console.warn.bind(console);for(c in s)s.hasOwnProperty(c)&&(t[c]=s[c]);s=null,t.arguments&&(_=t.arguments),t.thisProgram&&(v=t.thisProgram),t.quit&&(T=t.quit);var tf=0,it=function(o){tf=o},uj=function(){return tf},ls;t.wasmBinary&&(ls=t.wasmBinary);var cj=t.noExitRuntime||!0;typeof WebAssembly!="object"&&Qt("no native wasm support detected");var io,ju=!1,ro;function rf(o,a){o||Qt("Assertion failed: "+a)}function lj(o){var a=t["_"+o];return rf(a,"Cannot call unknown function "+o+", make sure it is exported"),a}function dj(o,a,u,l,d){var f={string:function(E){var ne=0;if(E!=null&&E!==0){var ye=(E.length<<2)+1;ne=Du(ye),fj(E,ne,ye)}return ne},array:function(E){var ne=Du(E.length);return af(E,ne),ne}};function h(E){return a==="string"?no(E):a==="boolean"?Boolean(E):E}var p=lj(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 D=p.apply(null,y);function M(E){return m!==0&&B(m),h(E)}return D=M(D),D}var nf=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):void 0;function sf(o,a,u){for(var l=a+u,d=a;o[d]&&!(d>=l);)++d;if(d-a>16&&o.subarray&&nf)return nf.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 no(o,a){return o?sf(nn,o,a):""}function of(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 fj(o,a,u){return of(o,nn,a,u)}function hj(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 af(o,a){Xt.set(o,a)}function pj(o,a,u){for(var l=0;l<o.length;++l)Xt[a++>>0]=o.charCodeAt(l);u||(Xt[a>>0]=0)}function yj(o,a){return o%a>0&&(o+=a-o%a),o}var uf,Xt,nn,_j,mj,le,bj,gj,vj;function cf(o){uf=o,t.HEAP8=Xt=new Int8Array(o),t.HEAP16=_j=new Int16Array(o),t.HEAP32=le=new Int32Array(o),t.HEAPU8=nn=new Uint8Array(o),t.HEAPU16=mj=new Uint16Array(o),t.HEAPU32=bj=new Uint32Array(o),t.HEAPF32=gj=new Float32Array(o),t.HEAPF64=vj=new Float64Array(o)}var aV=t.INITIAL_MEMORY||16777216,Y,lf=[],df=[],jj=[],ff=[],wj=!1,Bj=!1,Ij=0;function wu(){return cj||Ij>0}function Tj(){if(t.preRun)for(typeof t.preRun=="function"&&(t.preRun=[t.preRun]);t.preRun.length;)Fj(t.preRun.shift());so(lf)}function Sj(){wj=!0,so(df)}function Dj(){so(jj)}function Aj(){Bj=!0}function Oj(){if(t.postRun)for(typeof t.postRun=="function"&&(t.postRun=[t.postRun]);t.postRun.length;)Cj(t.postRun.shift());so(ff)}function Fj(o){lf.unshift(o)}function Mj(o){df.unshift(o)}function Cj(o){ff.unshift(o)}var Tr=0,Bu=null,ds=null;function Uj(o){Tr++,t.monitorRunDependencies&&t.monitorRunDependencies(Tr)}function Vj(o){if(Tr--,t.monitorRunDependencies&&t.monitorRunDependencies(Tr),Tr==0&&(Bu!==null&&(clearInterval(Bu),Bu=null),ds)){var a=ds;ds=null,a()}}t.preloadedImages={},t.preloadedAudios={};function Qt(o){t.onAbort&&t.onAbort(o),o="Aborted("+o+")",Ir(o),ju=!0,ro=1,o+=". Build with -s ASSERTIONS=1 for more info.";var a=new WebAssembly.RuntimeError(o);throw n(a),a}var kj="data:application/octet-stream;base64,";function hf(o){return o.startsWith(kj)}var jt;t.locateFile?(jt="./duckdb-wasm.wasm",hf(jt)||(jt=Ce(jt))):jt=new URL("duckdb_wasm.wasm",import.meta.url).toString();function pf(o){try{if(o==jt&&ls)return new Uint8Array(ls);if(lt)return lt(o);throw"both async and sync fetching of the wasm failed"}catch(a){Qt(a)}}function Rj(){return!ls&&(A||P)&&typeof fetch=="function"?fetch(jt,{credentials:"same-origin"}).then(function(o){if(!o.ok)throw"failed to load wasm binary file at '"+jt+"'";return o.arrayBuffer()}).catch(function(){return pf(jt)}):Promise.resolve().then(function(){return pf(jt)})}function Ej(){var o={a:ew};function a(h,p){var y=h.exports;t.asm=y,io=t.asm.Ae,cf(io.buffer),Y=t.asm.De,Mj(t.asm.Be),Vj("wasm-instantiate")}Uj("wasm-instantiate");function u(h){a(h.instance)}function l(h){return Rj().then(function(p){return WebAssembly.instantiate(p,o)}).then(function(p){return p}).then(h,function(p){Ir("failed to asynchronously prepare wasm: "+p),Qt(p)})}function d(){return!ls&&typeof WebAssembly.instantiateStreaming=="function"&&!hf(jt)&&typeof fetch=="function"?fetch(jt,{credentials:"same-origin"}).then(function(h){var p=WebAssembly.instantiateStreaming(h,o);return p.then(u,function(y){return Ir("wasm streaming compile failed: "+y),Ir("falling back to ArrayBuffer instantiation"),l(u)})}):l(u)}if(t.instantiateWasm)try{var f=t.instantiateWasm(o,a);return f}catch(h){return Ir("Module.instantiateWasm callback failed with error: "+h),!1}return d().catch(n),{}}function so(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?Y.get(u)():Y.get(u)(a.arg):u(a.arg===void 0?null:a.arg)}}function Nj(o){if(o instanceof yo||o=="unwind")return ro;T(1,o)}function Pj(o){return Au(o+16)+16}function Sr(o){this.excPtr=o,this.ptr=o-16,this.set_type=function(a){le[this.ptr+4>>2]=a},this.get_type=function(){return le[this.ptr+4>>2]},this.set_destructor=function(a){le[this.ptr+8>>2]=a},this.get_destructor=function(){return le[this.ptr+8>>2]},this.set_refcount=function(a){le[this.ptr>>2]=a},this.set_caught=function(a){a=a?1:0,Xt[this.ptr+12>>0]=a},this.get_caught=function(){return Xt[this.ptr+12>>0]!=0},this.set_rethrown=function(a){a=a?1:0,Xt[this.ptr+13>>0]=a},this.get_rethrown=function(){return Xt[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=le[this.ptr>>2];le[this.ptr>>2]=a+1},this.release_ref=function(){var a=le[this.ptr>>2];return le[this.ptr>>2]=a-1,a===1}}function sn(o){this.free=function(){Ou(this.ptr),this.ptr=0},this.set_base_ptr=function(a){le[this.ptr>>2]=a},this.get_base_ptr=function(){return le[this.ptr>>2]},this.set_adjusted_ptr=function(a){le[this.ptr+4>>2]=a},this.get_adjusted_ptr_addr=function(){return this.ptr+4},this.get_adjusted_ptr=function(){return le[this.ptr+4>>2]},this.get_exception_ptr=function(){var a=mf(this.get_exception_info().get_type());if(a)return le[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 Sr(this.get_base_ptr())},o===void 0?(this.ptr=Au(8),this.set_adjusted_ptr(0)):this.ptr=o}var oo=[];function xj(o){o.add_ref()}var ao=0;function Lj(o){var a=new sn(o),u=a.get_exception_info();return u.get_caught()||(u.set_caught(!0),ao--),u.set_rethrown(!1),oo.push(a),xj(u),a.get_exception_ptr()}var ji=0;function yf(o){return Ou(new Sr(o).ptr)}function qj(o){if(o.release_ref()&&!o.get_rethrown()){var a=o.get_destructor();a&&Y.get(a)(o.excPtr),yf(o.excPtr)}}function zj(){I(0);var o=oo.pop();qj(o.get_exception_info()),o.free(),ji=0}function Wj(o){var a=new sn(o),u=a.get_base_ptr();throw ji||(ji=u),a.free(),u}function Hj(){var o=ji;if(!o)return it(0),0|0;var a=new Sr(o),u=a.get_type(),l=new sn;if(l.set_base_ptr(o),l.set_adjusted_ptr(o),!u)return it(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(hs(h,u,l.get_adjusted_ptr_addr()))return it(h),l.ptr|0}return it(u),l.ptr|0}function Yj(){var o=ji;if(!o)return it(0),0|0;var a=new Sr(o),u=a.get_type(),l=new sn;if(l.set_base_ptr(o),l.set_adjusted_ptr(o),!u)return it(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(hs(h,u,l.get_adjusted_ptr_addr()))return it(h),l.ptr|0}return it(u),l.ptr|0}function $j(){var o=ji;if(!o)return it(0),0|0;var a=new Sr(o),u=a.get_type(),l=new sn;if(l.set_base_ptr(o),l.set_adjusted_ptr(o),!u)return it(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(hs(h,u,l.get_adjusted_ptr_addr()))return it(h),l.ptr|0}return it(u),l.ptr|0}function Gj(){var o=ji;if(!o)return it(0),0|0;var a=new Sr(o),u=a.get_type(),l=new sn;if(l.set_base_ptr(o),l.set_adjusted_ptr(o),!u)return it(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(hs(h,u,l.get_adjusted_ptr_addr()))return it(h),l.ptr|0}return it(u),l.ptr|0}function Jj(){var o=oo.pop();o||Qt("no exception to throw");var a=o.get_exception_info(),u=o.get_base_ptr();throw a.get_rethrown()?o.free():(oo.push(o),a.set_rethrown(!0),a.set_caught(!1),ao++),ji=u,u}function Kj(o,a,u){var l=new Sr(o);throw l.init(a,u),ji=o,ao++,o}function Zj(){return ao}var Xe={mappings:{},buffers:[null,[],[]],printChar:function(o,a){var u=Xe.buffers[o];a===0||a===10?((o===1?aj:Ir)(sf(u,0)),u.length=0):u.push(a)},varargs:void 0,get:function(){Xe.varargs+=4;var o=le[Xe.varargs-4>>2];return o},getStr:function(o){var a=no(o);return a},get64:function(o,a){return o}};function Xj(o,a){return o=Xe.getStr(o),Xe.doAccess(o,a)}function Qj(o){return le[_f()>>2]=o,o}function e0(o,a,u){return Xe.varargs=u,0}function t0(o,a){}function i0(o,a,u,l){}function r0(o,a,u){}function n0(){return 42}function s0(o,a,u){return Xe.varargs=u,0}function o0(o,a,u){return 0}function a0(o,a){return o=Xe.getStr(o),Xe.doMkdir(o,a)}function u0(o,a,u){Xe.varargs=u}function c0(o,a){}function l0(o){}function d0(o,a){}function f0(o){}function h0(o,a){Qt("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")}function p0(o,a){Qt("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")}function y0(){Qt("")}var Iu;q?Iu=function(){var o=process.hrtime();return o[0]*1e3+o[1]/1e6}:Iu=function(){return performance.now()};var _0=!0;function m0(o,a){var u;if(o===0)u=Date.now();else if((o===1||o===4)&&_0)u=Iu();else return Qj(28),-1;return le[a>>2]=u/1e3|0,le[a+4>>2]=u%1e3*1e3*1e3|0,0}function b0(o,a){return globalThis.DUCKDB_RUNTIME.createDirectory(t,o,a)}function g0(o,a){return globalThis.DUCKDB_RUNTIME.checkDirectory(t,o,a)}function v0(o,a){return globalThis.DUCKDB_RUNTIME.listDirectoryEntries(t,o,a)}function j0(o,a){return globalThis.DUCKDB_RUNTIME.removeDirectory(t,o,a)}function w0(o){return globalThis.DUCKDB_RUNTIME.closeFile(t,o)}function B0(o,a){return globalThis.DUCKDB_RUNTIME.checkFile(t,o,a)}function I0(o){return globalThis.DUCKDB_RUNTIME.getLastFileModificationTime(t,o)}function T0(o,a,u,l){return globalThis.DUCKDB_RUNTIME.moveFile(t,o,a,u,l)}function S0(o){return globalThis.DUCKDB_RUNTIME.openFile(t,o)}function D0(o,a,u,l){return globalThis.DUCKDB_RUNTIME.readFile(t,o,a,u,l)}function A0(o,a){return globalThis.DUCKDB_RUNTIME.truncateFile(t,o,a)}function O0(o,a,u,l){return globalThis.DUCKDB_RUNTIME.writeFile(t,o,a,u,l)}function F0(o,a){return globalThis.DUCKDB_RUNTIME.glob(t,o,a)}function M0(o){return globalThis.DUCKDB_RUNTIME.testPlatformFeature(t,o)}function C0(){return 2147483648}function U0(o,a,u){nn.copyWithin(o,a,a+u)}function V0(o){try{return io.grow(o-uf.byteLength+65535>>>16),cf(io.buffer),1}catch(a){}}function k0(o){var a=nn.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,yj(Math.max(o,d),65536)),h=V0(f);if(h)return!0}return!1}var Tu={};function R0(){return v||"./this.program"}function fs(){if(!fs.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 Tu)Tu[u]===void 0?delete a[u]:a[u]=Tu[u];var l=[];for(var u in a)l.push(u+"="+a[u]);fs.strings=l}return fs.strings}function E0(o,a){var u=0;return fs().forEach(function(l,d){var f=a+u;le[o+d*4>>2]=f,pj(l,f),u+=l.length+1}),0}function N0(o,a){var u=fs();le[o>>2]=u.length;var l=0;return u.forEach(function(d){l+=d.length+1}),le[a>>2]=l,0}function P0(o){return 0}function x0(o,a){var u=o==1||o==2?2:Qt();return Xt[a>>0]=u,0}function L0(o,a,u,l,d,f){var h=Xe.getStreamFromFD(o),p=Xe.doReadv(h,a,u,l);return le[f>>2]=p,0}function q0(o,a,u,l,d,f){var h=Xe.getStreamFromFD(o),p=Xe.doWritev(h,a,u,l);return le[f>>2]=p,0}function z0(o,a,u,l){var d=Xe.getStreamFromFD(o),f=Xe.doReadv(d,a,u);return le[l>>2]=f,0}function W0(o,a,u,l,d){}function H0(o){var a=Xe.getStreamFromFD(o);return a.stream_ops&&a.stream_ops.fsync?-a.stream_ops.fsync(a):0}function Y0(o,a,u,l){for(var d=0,f=0;f<u;f++){for(var h=le[a+f*8>>2],p=le[a+(f*8+4)>>2],y=0;y<p;y++)Xe.printChar(o,nn[h+y]);d+=p}return le[l>>2]=d,0}function $0(){return uj()}function G0(){if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function"){var o=new Uint8Array(1);return function(){return crypto.getRandomValues(o),o[0]}}else if(q)try{var a=hS("crypto");return function(){return a.randomBytes(1)[0]}}catch(u){}return function(){Qt("randomDevice")}}function uo(o,a){uo.randomDevice||(uo.randomDevice=G0());for(var u=0;u<a;u++)Xt[o+u>>0]=uo.randomDevice();return 0}function J0(o){return o}function K0(o){it(o)}function co(o){return o%4==0&&(o%100!=0||o%400==0)}function Su(o,a){for(var u=0,l=0;l<=a;u+=o[l++]);return u}var lo=[31,29,31,30,31,30,31,31,30,31,30,31],fo=[31,28,31,30,31,30,31,31,30,31,30,31];function ho(o,a){for(var u=new Date(o.getTime());a>0;){var l=co(u.getFullYear()),d=u.getMonth(),f=(l?lo:fo)[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 Z0(o,a,u,l){var d=le[l+40>>2],f={tm_sec:le[l>>2],tm_min:le[l+4>>2],tm_hour:le[l+8>>2],tm_mday:le[l+12>>2],tm_mon:le[l+16>>2],tm_year:le[l+20>>2],tm_wday:le[l+24>>2],tm_yday:le[l+28>>2],tm_isdst:le[l+32>>2],tm_gmtoff:le[l+36>>2],tm_zone:d?no(d):""},h=no(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(V,G,Fe){for(var _e=typeof V=="number"?V.toString():V||"";_e.length<G;)_e=Fe[0]+_e;return _e}function D(V,G){return j(V,G,"0")}function M(V,G){function Fe(dt){return dt<0?-1:dt>0?1:0}var _e;return(_e=Fe(V.getFullYear()-G.getFullYear()))===0&&(_e=Fe(V.getMonth()-G.getMonth()))===0&&(_e=Fe(V.getDate()-G.getDate())),_e}function E(V){switch(V.getDay()){case 0:return new Date(V.getFullYear()-1,11,29);case 1:return V;case 2:return new Date(V.getFullYear(),0,3);case 3:return new Date(V.getFullYear(),0,2);case 4:return new Date(V.getFullYear(),0,1);case 5:return new Date(V.getFullYear()-1,11,31);case 6:return new Date(V.getFullYear()-1,11,30)}}function ne(V){var G=ho(new Date(V.tm_year+1900,0,1),V.tm_yday),Fe=new Date(G.getFullYear(),0,4),_e=new Date(G.getFullYear()+1,0,4),dt=E(Fe),Pi=E(_e);return M(dt,G)<=0?M(Pi,G)<=0?G.getFullYear()+1:G.getFullYear():G.getFullYear()-1}var ye={"%a":function(V){return m[V.tm_wday].substring(0,3)},"%A":function(V){return m[V.tm_wday]},"%b":function(V){return g[V.tm_mon].substring(0,3)},"%B":function(V){return g[V.tm_mon]},"%C":function(V){var G=V.tm_year+1900;return D(G/100|0,2)},"%d":function(V){return D(V.tm_mday,2)},"%e":function(V){return j(V.tm_mday,2," ")},"%g":function(V){return ne(V).toString().substring(2)},"%G":function(V){return ne(V)},"%H":function(V){return D(V.tm_hour,2)},"%I":function(V){var G=V.tm_hour;return G==0?G=12:G>12&&(G-=12),D(G,2)},"%j":function(V){return D(V.tm_mday+Su(co(V.tm_year+1900)?lo:fo,V.tm_mon-1),3)},"%m":function(V){return D(V.tm_mon+1,2)},"%M":function(V){return D(V.tm_min,2)},"%n":function(){return`
|
|
18
|
+
`},"%p":function(V){return V.tm_hour>=0&&V.tm_hour<12?"AM":"PM"},"%S":function(V){return D(V.tm_sec,2)},"%t":function(){return" "},"%u":function(V){return V.tm_wday||7},"%U":function(V){var G=new Date(V.tm_year+1900,0,1),Fe=G.getDay()===0?G:ho(G,7-G.getDay()),_e=new Date(V.tm_year+1900,V.tm_mon,V.tm_mday);if(M(Fe,_e)<0){var dt=Su(co(_e.getFullYear())?lo:fo,_e.getMonth()-1)-31,Pi=31-Fe.getDate(),Dr=Pi+dt+_e.getDate();return D(Math.ceil(Dr/7),2)}return M(Fe,G)===0?"01":"00"},"%V":function(V){var G=new Date(V.tm_year+1900,0,4),Fe=new Date(V.tm_year+1901,0,4),_e=E(G),dt=E(Fe),Pi=ho(new Date(V.tm_year+1900,0,1),V.tm_yday);if(M(Pi,_e)<0)return"53";if(M(dt,Pi)<=0)return"01";var Dr;return _e.getFullYear()<V.tm_year+1900?Dr=V.tm_yday+32-_e.getDate():Dr=V.tm_yday+1-_e.getDate(),D(Math.ceil(Dr/7),2)},"%w":function(V){return V.tm_wday},"%W":function(V){var G=new Date(V.tm_year,0,1),Fe=G.getDay()===1?G:ho(G,G.getDay()===0?1:7-G.getDay()+1),_e=new Date(V.tm_year+1900,V.tm_mon,V.tm_mday);if(M(Fe,_e)<0){var dt=Su(co(_e.getFullYear())?lo:fo,_e.getMonth()-1)-31,Pi=31-Fe.getDate(),Dr=Pi+dt+_e.getDate();return D(Math.ceil(Dr/7),2)}return M(Fe,G)===0?"01":"00"},"%y":function(V){return(V.tm_year+1900).toString().substring(2)},"%Y":function(V){return V.tm_year+1900},"%z":function(V){var G=V.tm_gmtoff,Fe=G>=0;return G=Math.abs(G)/60,G=G/60*100+G%60,(Fe?"+":"-")+String("0000"+G).slice(-4)},"%Z":function(V){return V.tm_zone},"%%":function(){return"%"}};for(var y in ye)h.includes(y)&&(h=h.replace(new RegExp(y,"g"),ye[y](f)));var we=Q0(h,!1);return we.length>a?0:(af(we,o),we.length-1)}function X0(o,a,u,l){return Z0(o,a,u,l)}function Q0(o,a,u){var l=u>0?u:hj(o)+1,d=new Array(l),f=of(o,d,0,d.length);return a&&(d.length=f),d}var ew={i:Pj,A:Lj,G:zj,b:Hj,n:Yj,I:$j,pa:Gj,j:yf,ua:Jj,u:Kj,E:Zj,c:Wj,Ga:Xj,ea:e0,Ia:t0,Ha:i0,Ea:r0,ia:n0,Na:s0,Aa:o0,Fa:a0,sa:u0,Ca:c0,ja:l0,la:d0,ka:f0,La:h0,Ka:p0,ga:y0,qa:m0,xe:b0,ye:g0,ve:v0,we:j0,ha:w0,te:B0,wa:I0,ue:T0,ya:S0,$:D0,ze:A0,xa:O0,se:F0,re:M0,Oa:C0,Sa:U0,Kc:k0,Qa:E0,Ra:N0,Y:P0,Ma:x0,mb:L0,lb:q0,ra:z0,Md:W0,Da:H0,da:Y0,a:$0,Ja:uo,W:FB,K:yB,R:$w,sc:CT,X:OB,M:AB,va:Yw,tc:MT,t:nB,U:kB,rb:Xw,Z:lB,V:VB,Cb:Zw,e:Pw,aa:SB,C:dB,Hb:_1,d:xw,fa:_B,ma:MB,h:qw,Fb:b1,l:Hw,ta:bB,o:zw,z:tB,w:iB,Q:eB,x:sB,v:aB,p:jB,L:TB,J:IB,Vb:i1,Yb:QT,$b:KT,hc:zT,Wb:t1,Gb:m1,rc:UT,Zb:XT,ic:qT,ne:PB,Kd:yI,Dd:wI,be:ZB,Mb:d1,cd:JI,Ua:Q1,Ta:eS,Ud:oI,Jd:_I,vb:D1,Sc:aT,Td:aI,yc:ST,Nb:l1,Eb:g1,ie:WB,Qd:lI,uc:FT,Ed:jI,od:EI,Bd:II,hb:N1,Rd:cI,ec:HT,Od:fI,bd:KI,cb:z1,Va:X1,ed:$I,Vd:sI,xd:AI,$a:Y1,tb:O1,Fd:vI,db:q1,Db:v1,Pd:dI,yd:DI,ad:ZI,Ad:TI,zd:SI,ud:MI,dc:YT,Tb:n1,ge:YB,_d:eI,jc:LT,Zd:tI,Ld:pI,mc:NT,lc:PT,fe:$B,$d:QB,Id:mI,qe:RB,Ac:IT,kc:xT,Xb:e1,zc:TT,pc:kT,Pc:lT,sb:F1,vc:OT,qc:VT,ld:xI,xc:DT,oc:RT,xb:T1,gd:HI,Sb:s1,id:zI,Yc:tT,Jc:yT,Ic:_T,Gc:bT,Hc:mT,md:PI,Ab:w1,Vc:nT,Wa:Z1,bc:GT,jb:R1,Tc:oT,nc:ET,Pb:u1,s:Ew,k:Lw,B:pB,ba:vB,ob:U1,D:hB,ca:gB,pb:C1,f:Nw,T:Jw,P:fB,fc:Gw,g:Kw,m:Ww,Ba:CB,q:rB,r:Qw,na:DB,y:oB,O:mB,N:BB,S:uB,za:UB,oa:wB,_:cB,wd:OI,nb:V1,dd:GI,Ub:r1,wc:AT,gc:WT,Ib:y1,gb:P1,le:LB,Sd:uI,ub:A1,ab:H1,sd:UI,td:CI,Qb:a1,pd:RI,Kb:h1,Jb:p1,Lc:pT,ke:qB,qd:kI,vd:FI,Rc:uT,Dc:jT,yb:I1,zb:B1,eb:L1,ee:GB,nd:NI,Lb:f1,Bc:BT,Oc:dT,je:zB,bb:W1,oe:NB,Xd:rI,Yd:iI,Cd:BI,wb:S1,Xc:iT,Fc:gT,Ec:vT,Wc:rT,fb:x1,hd:WI,$c:XI,Xa:K1,Cc:wT,ib:E1,pe:EB,Nd:hI,Zc:eT,Mc:hT,ce:KB,_b:ZT,me:xB,ae:XB,_c:QI,Hd:bI,Gd:gI,Uc:sT,qb:M1,fd:YI,cc:$T,he:HB,_a:$1,Nc:fT,kb:k1,Wd:nI,Qc:cT,Ya:J1,Za:G1,ac:JT,de:JB,kd:LI,Ob:c1,Rb:o1,Bb:j1,rd:VI,jd:qI,H:J0,F:K0,Pa:X0},uV=Ej(),tw=t.___wasm_call_ctors=function(){return(tw=t.___wasm_call_ctors=t.asm.Be).apply(null,arguments)},iw=t._main=function(){return(iw=t._main=t.asm.Ce).apply(null,arguments)},rw=t._duckdb_web_fs_glob_add_path=function(){return(rw=t._duckdb_web_fs_glob_add_path=t.asm.Ee).apply(null,arguments)},nw=t._duckdb_web_clear_response=function(){return(nw=t._duckdb_web_clear_response=t.asm.Fe).apply(null,arguments)},sw=t._duckdb_web_fail_with=function(){return(sw=t._duckdb_web_fail_with=t.asm.Ge).apply(null,arguments)},ow=t._duckdb_web_reset=function(){return(ow=t._duckdb_web_reset=t.asm.He).apply(null,arguments)},aw=t._duckdb_web_connect=function(){return(aw=t._duckdb_web_connect=t.asm.Ie).apply(null,arguments)},uw=t._duckdb_web_disconnect=function(){return(uw=t._duckdb_web_disconnect=t.asm.Je).apply(null,arguments)},cw=t._duckdb_web_flush_files=function(){return(cw=t._duckdb_web_flush_files=t.asm.Ke).apply(null,arguments)},lw=t._duckdb_web_flush_file=function(){return(lw=t._duckdb_web_flush_file=t.asm.Le).apply(null,arguments)},dw=t._duckdb_web_open=function(){return(dw=t._duckdb_web_open=t.asm.Me).apply(null,arguments)},fw=t._duckdb_web_collect_file_stats=function(){return(fw=t._duckdb_web_collect_file_stats=t.asm.Ne).apply(null,arguments)},hw=t._duckdb_web_export_file_stats=function(){return(hw=t._duckdb_web_export_file_stats=t.asm.Oe).apply(null,arguments)},pw=t._duckdb_web_fs_drop_file=function(){return(pw=t._duckdb_web_fs_drop_file=t.asm.Pe).apply(null,arguments)},yw=t._duckdb_web_fs_drop_files=function(){return(yw=t._duckdb_web_fs_drop_files=t.asm.Qe).apply(null,arguments)},_w=t._duckdb_web_fs_glob_file_infos=function(){return(_w=t._duckdb_web_fs_glob_file_infos=t.asm.Re).apply(null,arguments)},mw=t._duckdb_web_fs_get_file_info_by_id=function(){return(mw=t._duckdb_web_fs_get_file_info_by_id=t.asm.Se).apply(null,arguments)},bw=t._duckdb_web_fs_get_file_info_by_name=function(){return(bw=t._duckdb_web_fs_get_file_info_by_name=t.asm.Te).apply(null,arguments)},gw=t._duckdb_web_fs_set_file_descriptor=function(){return(gw=t._duckdb_web_fs_set_file_descriptor=t.asm.Ue).apply(null,arguments)},vw=t._duckdb_web_fs_register_file_url=function(){return(vw=t._duckdb_web_fs_register_file_url=t.asm.Ve).apply(null,arguments)},jw=t._duckdb_web_fs_register_file_buffer=function(){return(jw=t._duckdb_web_fs_register_file_buffer=t.asm.We).apply(null,arguments)},ww=t._duckdb_web_copy_file_to_buffer=function(){return(ww=t._duckdb_web_copy_file_to_buffer=t.asm.Xe).apply(null,arguments)},Bw=t._duckdb_web_copy_file_to_path=function(){return(Bw=t._duckdb_web_copy_file_to_path=t.asm.Ye).apply(null,arguments)},Iw=t._duckdb_web_get_version=function(){return(Iw=t._duckdb_web_get_version=t.asm.Ze).apply(null,arguments)},Tw=t._duckdb_web_get_feature_flags=function(){return(Tw=t._duckdb_web_get_feature_flags=t.asm._e).apply(null,arguments)},Sw=t._duckdb_web_tokenize=function(){return(Sw=t._duckdb_web_tokenize=t.asm.$e).apply(null,arguments)},Dw=t._duckdb_web_prepared_create=function(){return(Dw=t._duckdb_web_prepared_create=t.asm.af).apply(null,arguments)},Aw=t._duckdb_web_prepared_close=function(){return(Aw=t._duckdb_web_prepared_close=t.asm.bf).apply(null,arguments)},Ow=t._duckdb_web_prepared_run=function(){return(Ow=t._duckdb_web_prepared_run=t.asm.cf).apply(null,arguments)},Fw=t._duckdb_web_prepared_send=function(){return(Fw=t._duckdb_web_prepared_send=t.asm.df).apply(null,arguments)},Mw=t._duckdb_web_query_run=function(){return(Mw=t._duckdb_web_query_run=t.asm.ef).apply(null,arguments)},Cw=t._duckdb_web_query_send=function(){return(Cw=t._duckdb_web_query_send=t.asm.ff).apply(null,arguments)},Uw=t._duckdb_web_query_fetch_results=function(){return(Uw=t._duckdb_web_query_fetch_results=t.asm.gf).apply(null,arguments)},Vw=t._duckdb_web_insert_arrow_from_ipc_stream=function(){return(Vw=t._duckdb_web_insert_arrow_from_ipc_stream=t.asm.hf).apply(null,arguments)},kw=t._duckdb_web_insert_csv_from_path=function(){return(kw=t._duckdb_web_insert_csv_from_path=t.asm.jf).apply(null,arguments)},Rw=t._duckdb_web_insert_json_from_path=function(){return(Rw=t._duckdb_web_insert_json_from_path=t.asm.kf).apply(null,arguments)},_f=t.___errno_location=function(){return(_f=t.___errno_location=t.asm.lf).apply(null,arguments)},w=t.stackSave=function(){return(w=t.stackSave=t.asm.mf).apply(null,arguments)},B=t.stackRestore=function(){return(B=t.stackRestore=t.asm.nf).apply(null,arguments)},Du=t.stackAlloc=function(){return(Du=t.stackAlloc=t.asm.of).apply(null,arguments)},I=t._setThrew=function(){return(I=t._setThrew=t.asm.pf).apply(null,arguments)},hs=t.___cxa_can_catch=function(){return(hs=t.___cxa_can_catch=t.asm.qf).apply(null,arguments)},mf=t.___cxa_is_pointer_type=function(){return(mf=t.___cxa_is_pointer_type=t.asm.rf).apply(null,arguments)},Au=t._malloc=function(){return(Au=t._malloc=t.asm.sf).apply(null,arguments)},Ou=t._free=function(){return(Ou=t._free=t.asm.tf).apply(null,arguments)},bf=t.dynCall_viiij=function(){return(bf=t.dynCall_viiij=t.asm.uf).apply(null,arguments)},gf=t.dynCall_viiijjj=function(){return(gf=t.dynCall_viiijjj=t.asm.vf).apply(null,arguments)},vf=t.dynCall_iiij=function(){return(vf=t.dynCall_iiij=t.asm.wf).apply(null,arguments)},jf=t.dynCall_vijijj=function(){return(jf=t.dynCall_vijijj=t.asm.xf).apply(null,arguments)},wf=t.dynCall_iji=function(){return(wf=t.dynCall_iji=t.asm.yf).apply(null,arguments)},Bf=t.dynCall_vij=function(){return(Bf=t.dynCall_vij=t.asm.zf).apply(null,arguments)},If=t.dynCall_viijj=function(){return(If=t.dynCall_viijj=t.asm.Af).apply(null,arguments)},Tf=t.dynCall_ji=function(){return(Tf=t.dynCall_ji=t.asm.Bf).apply(null,arguments)},Sf=t.dynCall_viiijj=function(){return(Sf=t.dynCall_viiijj=t.asm.Cf).apply(null,arguments)},Df=t.dynCall_vijjj=function(){return(Df=t.dynCall_vijjj=t.asm.Df).apply(null,arguments)},Af=t.dynCall_jii=function(){return(Af=t.dynCall_jii=t.asm.Ef).apply(null,arguments)},Of=t.dynCall_jiiii=function(){return(Of=t.dynCall_jiiii=t.asm.Ff).apply(null,arguments)},Ff=t.dynCall_iiiiij=function(){return(Ff=t.dynCall_iiiiij=t.asm.Gf).apply(null,arguments)},Mf=t.dynCall_iiiiijj=function(){return(Mf=t.dynCall_iiiiijj=t.asm.Hf).apply(null,arguments)},Cf=t.dynCall_viijii=function(){return(Cf=t.dynCall_viijii=t.asm.If).apply(null,arguments)},Uf=t.dynCall_viiji=function(){return(Uf=t.dynCall_viiji=t.asm.Jf).apply(null,arguments)},Vf=t.dynCall_vijj=function(){return(Vf=t.dynCall_vijj=t.asm.Kf).apply(null,arguments)},kf=t.dynCall_viji=function(){return(kf=t.dynCall_viji=t.asm.Lf).apply(null,arguments)},Rf=t.dynCall_iij=function(){return(Rf=t.dynCall_iij=t.asm.Mf).apply(null,arguments)},Ef=t.dynCall_viij=function(){return(Ef=t.dynCall_viij=t.asm.Nf).apply(null,arguments)},Nf=t.dynCall_jiji=function(){return(Nf=t.dynCall_jiji=t.asm.Of).apply(null,arguments)},Pf=t.dynCall_viiiij=function(){return(Pf=t.dynCall_viiiij=t.asm.Pf).apply(null,arguments)},xf=t.dynCall_iiiij=function(){return(xf=t.dynCall_iiiij=t.asm.Qf).apply(null,arguments)},Lf=t.dynCall_iiiiiji=function(){return(Lf=t.dynCall_iiiiiji=t.asm.Rf).apply(null,arguments)},qf=t.dynCall_iiiji=function(){return(qf=t.dynCall_iiiji=t.asm.Sf).apply(null,arguments)},zf=t.dynCall_iiiiji=function(){return(zf=t.dynCall_iiiiji=t.asm.Tf).apply(null,arguments)},Wf=t.dynCall_jiii=function(){return(Wf=t.dynCall_jiii=t.asm.Uf).apply(null,arguments)},Hf=t.dynCall_jij=function(){return(Hf=t.dynCall_jij=t.asm.Vf).apply(null,arguments)},Yf=t.dynCall_j=function(){return(Yf=t.dynCall_j=t.asm.Wf).apply(null,arguments)},$f=t.dynCall_viijij=function(){return($f=t.dynCall_viijij=t.asm.Xf).apply(null,arguments)},Gf=t.dynCall_iijjijj=function(){return(Gf=t.dynCall_iijjijj=t.asm.Yf).apply(null,arguments)},Jf=t.dynCall_viiiijiiiii=function(){return(Jf=t.dynCall_viiiijiiiii=t.asm.Zf).apply(null,arguments)},Kf=t.dynCall_viiiijiiii=function(){return(Kf=t.dynCall_viiiijiiii=t.asm._f).apply(null,arguments)},Zf=t.dynCall_viiijii=function(){return(Zf=t.dynCall_viiijii=t.asm.$f).apply(null,arguments)},Xf=t.dynCall_viiiiiij=function(){return(Xf=t.dynCall_viiiiiij=t.asm.ag).apply(null,arguments)},Qf=t.dynCall_iiijiii=function(){return(Qf=t.dynCall_iiijiii=t.asm.bg).apply(null,arguments)},eh=t.dynCall_iiiiijii=function(){return(eh=t.dynCall_iiiiijii=t.asm.cg).apply(null,arguments)},th=t.dynCall_viijiii=function(){return(th=t.dynCall_viijiii=t.asm.dg).apply(null,arguments)},ih=t.dynCall_iiijiij=function(){return(ih=t.dynCall_iiijiij=t.asm.eg).apply(null,arguments)},rh=t.dynCall_vijiii=function(){return(rh=t.dynCall_vijiii=t.asm.fg).apply(null,arguments)},nh=t.dynCall_iijjiii=function(){return(nh=t.dynCall_iijjiii=t.asm.gg).apply(null,arguments)},sh=t.dynCall_iijjiiii=function(){return(sh=t.dynCall_iijjiiii=t.asm.hg).apply(null,arguments)},oh=t.dynCall_iiji=function(){return(oh=t.dynCall_iiji=t.asm.ig).apply(null,arguments)},ah=t.dynCall_iijji=function(){return(ah=t.dynCall_iijji=t.asm.jg).apply(null,arguments)},uh=t.dynCall_vijiiii=function(){return(uh=t.dynCall_vijiiii=t.asm.kg).apply(null,arguments)},ch=t.dynCall_iijiiii=function(){return(ch=t.dynCall_iijiiii=t.asm.lg).apply(null,arguments)},lh=t.dynCall_vijij=function(){return(lh=t.dynCall_vijij=t.asm.mg).apply(null,arguments)},dh=t.dynCall_iiijjjj=function(){return(dh=t.dynCall_iiijjjj=t.asm.ng).apply(null,arguments)},fh=t.dynCall_iiijiiii=function(){return(fh=t.dynCall_iiijiiii=t.asm.og).apply(null,arguments)},hh=t.dynCall_jiiij=function(){return(hh=t.dynCall_jiiij=t.asm.pg).apply(null,arguments)},ph=t.dynCall_iiiiijjiijj=function(){return(ph=t.dynCall_iiiiijjiijj=t.asm.qg).apply(null,arguments)},yh=t.dynCall_viijiijji=function(){return(yh=t.dynCall_viijiijji=t.asm.rg).apply(null,arguments)},_h=t.dynCall_vjjijij=function(){return(_h=t.dynCall_vjjijij=t.asm.sg).apply(null,arguments)},mh=t.dynCall_vijjji=function(){return(mh=t.dynCall_vijjji=t.asm.tg).apply(null,arguments)},bh=t.dynCall_vjjii=function(){return(bh=t.dynCall_vjjii=t.asm.ug).apply(null,arguments)},gh=t.dynCall_viiiiiji=function(){return(gh=t.dynCall_viiiiiji=t.asm.vg).apply(null,arguments)},vh=t.dynCall_jiiijji=function(){return(vh=t.dynCall_jiiijji=t.asm.wg).apply(null,arguments)},jh=t.dynCall_iijj=function(){return(jh=t.dynCall_iijj=t.asm.xg).apply(null,arguments)},wh=t.dynCall_iiijjii=function(){return(wh=t.dynCall_iiijjii=t.asm.yg).apply(null,arguments)},Bh=t.dynCall_iijjii=function(){return(Bh=t.dynCall_iijjii=t.asm.zg).apply(null,arguments)},Ih=t.dynCall_vijii=function(){return(Ih=t.dynCall_vijii=t.asm.Ag).apply(null,arguments)},Th=t.dynCall_viijjii=function(){return(Th=t.dynCall_viijjii=t.asm.Bg).apply(null,arguments)},Sh=t.dynCall_viiiijj=function(){return(Sh=t.dynCall_viiiijj=t.asm.Cg).apply(null,arguments)},Dh=t.dynCall_jijjij=function(){return(Dh=t.dynCall_jijjij=t.asm.Dg).apply(null,arguments)},Ah=t.dynCall_jiijii=function(){return(Ah=t.dynCall_jiijii=t.asm.Eg).apply(null,arguments)},Oh=t.dynCall_jijiii=function(){return(Oh=t.dynCall_jijiii=t.asm.Fg).apply(null,arguments)},Fh=t.dynCall_viijiiiii=function(){return(Fh=t.dynCall_viijiiiii=t.asm.Gg).apply(null,arguments)},Mh=t.dynCall_viijiiij=function(){return(Mh=t.dynCall_viijiiij=t.asm.Hg).apply(null,arguments)},Ch=t.dynCall_vijiiiji=function(){return(Ch=t.dynCall_vijiiiji=t.asm.Ig).apply(null,arguments)},Uh=t.dynCall_jiiji=function(){return(Uh=t.dynCall_jiiji=t.asm.Jg).apply(null,arguments)},Vh=t.dynCall_viiijij=function(){return(Vh=t.dynCall_viiijij=t.asm.Kg).apply(null,arguments)},kh=t.dynCall_viijiijj=function(){return(kh=t.dynCall_viijiijj=t.asm.Lg).apply(null,arguments)},Rh=t.dynCall_viiiiijj=function(){return(Rh=t.dynCall_viiiiijj=t.asm.Mg).apply(null,arguments)},Eh=t.dynCall_viiijji=function(){return(Eh=t.dynCall_viiijji=t.asm.Ng).apply(null,arguments)},Nh=t.dynCall_viiiji=function(){return(Nh=t.dynCall_viiiji=t.asm.Og).apply(null,arguments)},Ph=t.dynCall_iiiijiii=function(){return(Ph=t.dynCall_iiiijiii=t.asm.Pg).apply(null,arguments)},xh=t.dynCall_iiijij=function(){return(xh=t.dynCall_iiijij=t.asm.Qg).apply(null,arguments)},Lh=t.dynCall_iiijji=function(){return(Lh=t.dynCall_iiijji=t.asm.Rg).apply(null,arguments)},qh=t.dynCall_viijji=function(){return(qh=t.dynCall_viijji=t.asm.Sg).apply(null,arguments)},zh=t.dynCall_iiiijj=function(){return(zh=t.dynCall_iiiijj=t.asm.Tg).apply(null,arguments)},Wh=t.dynCall_viiijiii=function(){return(Wh=t.dynCall_viiijiii=t.asm.Ug).apply(null,arguments)},Hh=t.dynCall_vijji=function(){return(Hh=t.dynCall_vijji=t.asm.Vg).apply(null,arguments)},Yh=t.dynCall_jiiiij=function(){return(Yh=t.dynCall_jiiiij=t.asm.Wg).apply(null,arguments)},$h=t.dynCall_jiijiiiii=function(){return($h=t.dynCall_jiijiiiii=t.asm.Xg).apply(null,arguments)},Gh=t.dynCall_jiijiijiii=function(){return(Gh=t.dynCall_jiijiijiii=t.asm.Yg).apply(null,arguments)},Jh=t.dynCall_jiijjiii=function(){return(Jh=t.dynCall_jiijjiii=t.asm.Zg).apply(null,arguments)},Kh=t.dynCall_jiijijii=function(){return(Kh=t.dynCall_jiijijii=t.asm._g).apply(null,arguments)},Zh=t.dynCall_viiijjij=function(){return(Zh=t.dynCall_viiijjij=t.asm.$g).apply(null,arguments)},Xh=t.dynCall_vijijjiij=function(){return(Xh=t.dynCall_vijijjiij=t.asm.ah).apply(null,arguments)},Qh=t.dynCall_viijjij=function(){return(Qh=t.dynCall_viijjij=t.asm.bh).apply(null,arguments)},ep=t.dynCall_viiijjiij=function(){return(ep=t.dynCall_viiijjiij=t.asm.ch).apply(null,arguments)},tp=t.dynCall_viiiijjjj=function(){return(tp=t.dynCall_viiiijjjj=t.asm.dh).apply(null,arguments)},ip=t.dynCall_viijiiiiij=function(){return(ip=t.dynCall_viijiiiiij=t.asm.eh).apply(null,arguments)},rp=t.dynCall_viijiiiijj=function(){return(rp=t.dynCall_viijiiiijj=t.asm.fh).apply(null,arguments)},np=t.dynCall_viiijiiiijjj=function(){return(np=t.dynCall_viiijiiiijjj=t.asm.gh).apply(null,arguments)},sp=t.dynCall_viijijiiiijjj=function(){return(sp=t.dynCall_viijijiiiijjj=t.asm.hh).apply(null,arguments)},op=t.dynCall_jiiijii=function(){return(op=t.dynCall_jiiijii=t.asm.ih).apply(null,arguments)},ap=t.dynCall_viiiiijiiii=function(){return(ap=t.dynCall_viiiiijiiii=t.asm.jh).apply(null,arguments)},up=t.dynCall_iiijii=function(){return(up=t.dynCall_iiijii=t.asm.kh).apply(null,arguments)},cp=t.dynCall_fiijii=function(){return(cp=t.dynCall_fiijii=t.asm.lh).apply(null,arguments)},lp=t.dynCall_diijii=function(){return(lp=t.dynCall_diijii=t.asm.mh).apply(null,arguments)},dp=t.dynCall_iiiiiiijii=function(){return(dp=t.dynCall_iiiiiiijii=t.asm.nh).apply(null,arguments)},fp=t.dynCall_viiiiji=function(){return(fp=t.dynCall_viiiiji=t.asm.oh).apply(null,arguments)},hp=t.dynCall_jiiiijii=function(){return(hp=t.dynCall_jiiiijii=t.asm.ph).apply(null,arguments)},pp=t.dynCall_jiiiijiiiiiiii=function(){return(pp=t.dynCall_jiiiijiiiiiiii=t.asm.qh).apply(null,arguments)},yp=t.dynCall_jiiiiijiiii=function(){return(yp=t.dynCall_jiiiiijiiii=t.asm.rh).apply(null,arguments)},_p=t.dynCall_jiiijiii=function(){return(_p=t.dynCall_jiiijiii=t.asm.sh).apply(null,arguments)},mp=t.dynCall_jj=function(){return(mp=t.dynCall_jj=t.asm.th).apply(null,arguments)},bp=t.dynCall_jd=function(){return(bp=t.dynCall_jd=t.asm.uh).apply(null,arguments)},gp=t.dynCall_jf=function(){return(gp=t.dynCall_jf=t.asm.vh).apply(null,arguments)},vp=t.dynCall_iijjjj=function(){return(vp=t.dynCall_iijjjj=t.asm.wh).apply(null,arguments)},jp=t.dynCall_iiijj=function(){return(jp=t.dynCall_iiijj=t.asm.xh).apply(null,arguments)},wp=t.dynCall_vijijiiiijjj=function(){return(wp=t.dynCall_vijijiiiijjj=t.asm.yh).apply(null,arguments)},Bp=t.dynCall_iiiiiiji=function(){return(Bp=t.dynCall_iiiiiiji=t.asm.zh).apply(null,arguments)},Ip=t.dynCall_iiiiiiiiji=function(){return(Ip=t.dynCall_iiiiiiiiji=t.asm.Ah).apply(null,arguments)},Tp=t.dynCall_jijijjij=function(){return(Tp=t.dynCall_jijijjij=t.asm.Bh).apply(null,arguments)},Sp=t.dynCall_vijjij=function(){return(Sp=t.dynCall_vijjij=t.asm.Ch).apply(null,arguments)},Dp=t.dynCall_viijjj=function(){return(Dp=t.dynCall_viijjj=t.asm.Dh).apply(null,arguments)},Ap=t.dynCall_viijjji=function(){return(Ap=t.dynCall_viijjji=t.asm.Eh).apply(null,arguments)},Op=t.dynCall_iiiiiij=function(){return(Op=t.dynCall_iiiiiij=t.asm.Fh).apply(null,arguments)},Fp=t.dynCall_iiiiiiiiiiji=function(){return(Fp=t.dynCall_iiiiiiiiiiji=t.asm.Gh).apply(null,arguments)},Mp=t.dynCall_jiiiiiii=function(){return(Mp=t.dynCall_jiiiiiii=t.asm.Hh).apply(null,arguments)},Cp=t.dynCall_jijj=function(){return(Cp=t.dynCall_jijj=t.asm.Ih).apply(null,arguments)},Up=t.dynCall_viiiijiiiiiiii=function(){return(Up=t.dynCall_viiiijiiiiiiii=t.asm.Jh).apply(null,arguments)},Vp=t.dynCall_ij=function(){return(Vp=t.dynCall_ij=t.asm.Kh).apply(null,arguments)},kp=t.dynCall_jjj=function(){return(kp=t.dynCall_jjj=t.asm.Lh).apply(null,arguments)},Rp=t.dynCall_vjii=function(){return(Rp=t.dynCall_vjii=t.asm.Mh).apply(null,arguments)},Ep=t.dynCall_vjiiii=function(){return(Ep=t.dynCall_vjiiii=t.asm.Nh).apply(null,arguments)},Np=t.dynCall_viiiiijiii=function(){return(Np=t.dynCall_viiiiijiii=t.asm.Oh).apply(null,arguments)},Pp=t.dynCall_jiij=function(){return(Pp=t.dynCall_jiij=t.asm.Ph).apply(null,arguments)},xp=t.dynCall_iiiijjii=function(){return(xp=t.dynCall_iiiijjii=t.asm.Qh).apply(null,arguments)},Lp=t.dynCall_iiiiijji=function(){return(Lp=t.dynCall_iiiiijji=t.asm.Rh).apply(null,arguments)},qp=t.dynCall_viiijjii=function(){return(qp=t.dynCall_viiijjii=t.asm.Sh).apply(null,arguments)},zp=t.dynCall_viiiijji=function(){return(zp=t.dynCall_viiiijji=t.asm.Th).apply(null,arguments)},Wp=t.dynCall_viiiijjii=function(){return(Wp=t.dynCall_viiiijjii=t.asm.Uh).apply(null,arguments)},Hp=t.dynCall_viiiiijji=function(){return(Hp=t.dynCall_viiiiijji=t.asm.Vh).apply(null,arguments)},Yp=t.dynCall_iidj=function(){return(Yp=t.dynCall_iidj=t.asm.Wh).apply(null,arguments)},$p=t.dynCall_ijji=function(){return($p=t.dynCall_ijji=t.asm.Xh).apply(null,arguments)},Gp=t.dynCall_iiiiiiiij=function(){return(Gp=t.dynCall_iiiiiiiij=t.asm.Yh).apply(null,arguments)},Jp=t.dynCall_iiiiiiij=function(){return(Jp=t.dynCall_iiiiiiij=t.asm.Zh).apply(null,arguments)},Kp=t.dynCall_iiiiiiiiiiiij=function(){return(Kp=t.dynCall_iiiiiiiiiiiij=t.asm._h).apply(null,arguments)},Zp=t.dynCall_iiiiiiiji=function(){return(Zp=t.dynCall_iiiiiiiji=t.asm.$h).apply(null,arguments)},Xp=t.dynCall_iiiidjj=function(){return(Xp=t.dynCall_iiiidjj=t.asm.ai).apply(null,arguments)},Qp=t.dynCall_iiiijjj=function(){return(Qp=t.dynCall_iiiijjj=t.asm.bi).apply(null,arguments)},ey=t.dynCall_jiiiii=function(){return(ey=t.dynCall_jiiiii=t.asm.ci).apply(null,arguments)},ty=t.dynCall_jiiiiiijii=function(){return(ty=t.dynCall_jiiiiiijii=t.asm.di).apply(null,arguments)},iy=t.dynCall_iiiijji=function(){return(iy=t.dynCall_iiiijji=t.asm.ei).apply(null,arguments)},ry=t.dynCall_jiiiiii=function(){return(ry=t.dynCall_jiiiiii=t.asm.fi).apply(null,arguments)},ny=t.dynCall_iijiji=function(){return(ny=t.dynCall_iijiji=t.asm.gi).apply(null,arguments)},sy=t.dynCall_vjiiiji=function(){return(sy=t.dynCall_vjiiiji=t.asm.hi).apply(null,arguments)},oy=t.dynCall_viiijijiji=function(){return(oy=t.dynCall_viiijijiji=t.asm.ii).apply(null,arguments)},ay=t.dynCall_jiiijj=function(){return(ay=t.dynCall_jiiijj=t.asm.ji).apply(null,arguments)},uy=t.dynCall_viijiiii=function(){return(uy=t.dynCall_viijiiii=t.asm.ki).apply(null,arguments)},cy=t.dynCall_iiiijii=function(){return(cy=t.dynCall_iiiijii=t.asm.li).apply(null,arguments)},ly=t.dynCall_viiiijii=function(){return(ly=t.dynCall_viiiijii=t.asm.mi).apply(null,arguments)},dy=t.dynCall_iijiii=function(){return(dy=t.dynCall_iijiii=t.asm.ni).apply(null,arguments)},fy=t.dynCall_jiiiiji=function(){return(fy=t.dynCall_jiiiiji=t.asm.oi).apply(null,arguments)},hy=t.dynCall_vijiijj=function(){return(hy=t.dynCall_vijiijj=t.asm.pi).apply(null,arguments)},py=t.dynCall_vifiijj=function(){return(py=t.dynCall_vifiijj=t.asm.qi).apply(null,arguments)},yy=t.dynCall_vidiijj=function(){return(yy=t.dynCall_vidiijj=t.asm.ri).apply(null,arguments)},_y=t.dynCall_viiiiij=function(){return(_y=t.dynCall_viiiiij=t.asm.si).apply(null,arguments)},my=t.dynCall_ijj=function(){return(my=t.dynCall_ijj=t.asm.ti).apply(null,arguments)},by=t.dynCall_ijjiii=function(){return(by=t.dynCall_ijjiii=t.asm.ui).apply(null,arguments)},gy=t.dynCall_vijijjji=function(){return(gy=t.dynCall_vijijjji=t.asm.vi).apply(null,arguments)},vy=t.dynCall_viiiiijjji=function(){return(vy=t.dynCall_viiiiijjji=t.asm.wi).apply(null,arguments)},jy=t.dynCall_viijijj=function(){return(jy=t.dynCall_viijijj=t.asm.xi).apply(null,arguments)},wy=t.dynCall_iiijiijj=function(){return(wy=t.dynCall_iiijiijj=t.asm.yi).apply(null,arguments)},By=t.dynCall_viiijijjj=function(){return(By=t.dynCall_viiijijjj=t.asm.zi).apply(null,arguments)},Iy=t.dynCall_iijiijj=function(){return(Iy=t.dynCall_iijiijj=t.asm.Ai).apply(null,arguments)},Ty=t.dynCall_viiijjjji=function(){return(Ty=t.dynCall_viiijjjji=t.asm.Bi).apply(null,arguments)},Sy=t.dynCall_viiiijiii=function(){return(Sy=t.dynCall_viiiijiii=t.asm.Ci).apply(null,arguments)},Dy=t.dynCall_iijii=function(){return(Dy=t.dynCall_iijii=t.asm.Di).apply(null,arguments)},Ay=t.dynCall_vijjiiii=function(){return(Ay=t.dynCall_vijjiiii=t.asm.Ei).apply(null,arguments)},Oy=t.dynCall_vijijjiiiii=function(){return(Oy=t.dynCall_vijijjiiiii=t.asm.Fi).apply(null,arguments)},Fy=t.dynCall_vijjiiiii=function(){return(Fy=t.dynCall_vijjiiiii=t.asm.Gi).apply(null,arguments)},My=t.dynCall_iiijjji=function(){return(My=t.dynCall_iiijjji=t.asm.Hi).apply(null,arguments)},Cy=t.dynCall_iiiiijjj=function(){return(Cy=t.dynCall_iiiiijjj=t.asm.Ii).apply(null,arguments)},Uy=t.dynCall_jijiiii=function(){return(Uy=t.dynCall_jijiiii=t.asm.Ji).apply(null,arguments)},Vy=t.dynCall_iiijjjii=function(){return(Vy=t.dynCall_iiijjjii=t.asm.Ki).apply(null,arguments)},ky=t.dynCall_iiiiijjji=function(){return(ky=t.dynCall_iiiiijjji=t.asm.Li).apply(null,arguments)},Ry=t.dynCall_viijiji=function(){return(Ry=t.dynCall_viijiji=t.asm.Mi).apply(null,arguments)};function Ew(o){var a=w();try{Y.get(o)()}catch(u){if(B(a),u!==u+0&&u!=="longjmp")throw u;I(1,0)}}function Nw(o,a,u){var l=w();try{Y.get(o)(a,u)}catch(d){if(B(l),d!==d+0&&d!=="longjmp")throw d;I(1,0)}}function Pw(o,a){var u=w();try{return Y.get(o)(a)}catch(l){if(B(u),l!==l+0&&l!=="longjmp")throw l;I(1,0)}}function xw(o,a,u){var l=w();try{return Y.get(o)(a,u)}catch(d){if(B(l),d!==d+0&&d!=="longjmp")throw d;I(1,0)}}function Lw(o,a){var u=w();try{Y.get(o)(a)}catch(l){if(B(u),l!==l+0&&l!=="longjmp")throw l;I(1,0)}}function qw(o,a,u,l){var d=w();try{return Y.get(o)(a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function zw(o,a,u,l,d,f){var h=w();try{return Y.get(o)(a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function Ww(o,a,u,l,d){var f=w();try{Y.get(o)(a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function Hw(o,a,u,l,d){var f=w();try{return Y.get(o)(a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function Yw(o,a,u,l){var d=w();try{return Y.get(o)(a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function $w(o,a,u,l){var d=w();try{return Y.get(o)(a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function Gw(o,a,u,l){var d=w();try{Y.get(o)(a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function Jw(o,a,u,l){var d=w();try{Y.get(o)(a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function Kw(o,a,u,l){var d=w();try{Y.get(o)(a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function Zw(o,a,u){var l=w();try{return Y.get(o)(a,u)}catch(d){if(B(l),d!==d+0&&d!=="longjmp")throw d;I(1,0)}}function Xw(o,a,u){var l=w();try{return Y.get(o)(a,u)}catch(d){if(B(l),d!==d+0&&d!=="longjmp")throw d;I(1,0)}}function Qw(o,a,u,l,d,f,h){var p=w();try{Y.get(o)(a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function eB(o,a,u,l,d,f,h,p,y){var m=w();try{return Y.get(o)(a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function tB(o,a,u,l,d,f,h){var p=w();try{return Y.get(o)(a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function iB(o,a,u,l,d,f,h,p){var y=w();try{return Y.get(o)(a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function rB(o,a,u,l,d,f){var h=w();try{Y.get(o)(a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function nB(o){var a=w();try{return Y.get(o)()}catch(u){if(B(a),u!==u+0&&u!=="longjmp")throw u;I(1,0)}}function sB(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{return Y.get(o)(a,u,l,d,f,h,p,y,m,g)}catch(D){if(B(j),D!==D+0&&D!=="longjmp")throw D;I(1,0)}}function oB(o,a,u,l,d,f,h,p){var y=w();try{Y.get(o)(a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function aB(o,a,u,l,d,f,h,p,y,m,g,j){var D=w();try{return Y.get(o)(a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(B(D),M!==M+0&&M!=="longjmp")throw M;I(1,0)}}function uB(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{Y.get(o)(a,u,l,d,f,h,p,y,m,g)}catch(D){if(B(j),D!==D+0&&D!=="longjmp")throw D;I(1,0)}}function cB(o,a,u,l,d,f,h,p,y,m,g,j,D,M,E,ne){var ye=w();try{Y.get(o)(a,u,l,d,f,h,p,y,m,g,j,D,M,E,ne)}catch(we){if(B(ye),we!==we+0&&we!=="longjmp")throw we;I(1,0)}}function lB(o,a,u,l,d){var f=w();try{return Y.get(o)(a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function dB(o,a,u,l,d){var f=w();try{return Y.get(o)(a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function fB(o,a,u,l,d,f){var h=w();try{Y.get(o)(a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function hB(o,a,u){var l=w();try{Y.get(o)(a,u)}catch(d){if(B(l),d!==d+0&&d!=="longjmp")throw d;I(1,0)}}function pB(o,a,u){var l=w();try{Y.get(o)(a,u)}catch(d){if(B(l),d!==d+0&&d!=="longjmp")throw d;I(1,0)}}function yB(o,a){var u=w();try{return Y.get(o)(a)}catch(l){if(B(u),l!==l+0&&l!=="longjmp")throw l;I(1,0)}}function _B(o,a,u,l){var d=w();try{return Y.get(o)(a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function mB(o,a,u,l,d,f,h,p,y){var m=w();try{Y.get(o)(a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function bB(o,a,u,l,d,f){var h=w();try{return Y.get(o)(a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function gB(o,a,u,l){var d=w();try{Y.get(o)(a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function vB(o,a,u,l){var d=w();try{Y.get(o)(a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function jB(o,a,u,l,d,f,h,p,y,m,g,j,D,M,E,ne){var ye=w();try{return Y.get(o)(a,u,l,d,f,h,p,y,m,g,j,D,M,E,ne)}catch(we){if(B(ye),we!==we+0&&we!=="longjmp")throw we;I(1,0)}}function wB(o,a,u,l,d,f,h,p,y,m,g,j,D,M){var E=w();try{Y.get(o)(a,u,l,d,f,h,p,y,m,g,j,D,M)}catch(ne){if(B(E),ne!==ne+0&&ne!=="longjmp")throw ne;I(1,0)}}function BB(o,a,u,l,d,f,h,p,y,m){var g=w();try{Y.get(o)(a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function IB(o,a,u,l,d,f,h,p,y,m,g,j,D,M,E,ne,ye,we,V,G,Fe){var _e=w();try{return Y.get(o)(a,u,l,d,f,h,p,y,m,g,j,D,M,E,ne,ye,we,V,G,Fe)}catch(dt){if(B(_e),dt!==dt+0&&dt!=="longjmp")throw dt;I(1,0)}}function TB(o,a,u,l,d,f,h,p,y,m,g,j,D,M,E,ne,ye,we,V,G){var Fe=w();try{return Y.get(o)(a,u,l,d,f,h,p,y,m,g,j,D,M,E,ne,ye,we,V,G)}catch(_e){if(B(Fe),_e!==_e+0&&_e!=="longjmp")throw _e;I(1,0)}}function SB(o,a,u){var l=w();try{return Y.get(o)(a,u)}catch(d){if(B(l),d!==d+0&&d!=="longjmp")throw d;I(1,0)}}function DB(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{Y.get(o)(a,u,l,d,f,h,p,y,m,g)}catch(D){if(B(j),D!==D+0&&D!=="longjmp")throw D;I(1,0)}}function AB(o,a){var u=w();try{return Y.get(o)(a)}catch(l){if(B(u),l!==l+0&&l!=="longjmp")throw l;I(1,0)}}function OB(o,a,u){var l=w();try{return Y.get(o)(a,u)}catch(d){if(B(l),d!==d+0&&d!=="longjmp")throw d;I(1,0)}}function FB(o,a,u){var l=w();try{return Y.get(o)(a,u)}catch(d){if(B(l),d!==d+0&&d!=="longjmp")throw d;I(1,0)}}function MB(o,a,u,l){var d=w();try{return Y.get(o)(a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function CB(o,a,u,l,d,f,h,p,y,m){var g=w();try{Y.get(o)(a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function UB(o,a,u,l,d,f,h,p,y,m,g,j){var D=w();try{Y.get(o)(a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(B(D),M!==M+0&&M!=="longjmp")throw M;I(1,0)}}function VB(o,a){var u=w();try{return Y.get(o)(a)}catch(l){if(B(u),l!==l+0&&l!=="longjmp")throw l;I(1,0)}}function kB(o,a){var u=w();try{return Y.get(o)(a)}catch(l){if(B(u),l!==l+0&&l!=="longjmp")throw l;I(1,0)}}function RB(o,a,u,l,d){var f=w();try{return Of(o,a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function EB(o,a,u,l,d,f,h){var p=w();try{If(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function NB(o,a,u,l,d){var f=w();try{Ef(o,a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function PB(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;I(1,0)}}function xB(o,a,u,l){var d=w();try{Bf(o,a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function LB(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;I(1,0)}}function qB(o,a,u,l,d,f){var h=w();try{bf(o,a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function zB(o,a,u,l,d,f,h,p,y,m){var g=w();try{gf(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function WB(o,a,u,l,d){var f=w();try{return vf(o,a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function HB(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;I(1,0)}}function YB(o,a,u,l){var d=w();try{return wf(o,a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function $B(o,a){var u=w();try{return Tf(o,a)}catch(l){if(B(u),l!==l+0&&l!=="longjmp")throw l;I(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;I(1,0)}}function JB(o,a,u,l,d,f,h,p){var y=w();try{Df(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function KB(o,a,u,l,d,f,h,p,y){var m=w();try{Dp(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function ZB(o,a,u,l,d,f,h,p,y){var m=w();try{return Mf(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function XB(o,a,u,l,d){var f=w();try{kf(o,a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function QB(o,a,u){var l=w();try{return Af(o,a,u)}catch(d){if(B(l),d!==d+0&&d!=="longjmp")throw d;I(1,0)}}function eI(o,a,u,l,d){var f=w();try{return my(o,a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function tI(o,a,u,l,d,f,h,p){var y=w();try{return by(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function iI(o,a,u,l,d,f,h){var p=w();try{Cf(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function rI(o,a,u,l,d,f){var h=w();try{Uf(o,a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function nI(o,a,u,l,d,f){var h=w();try{Vf(o,a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function sI(o,a,u,l){var d=w();try{return Rf(o,a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function oI(o,a,u,l,d,f){var h=w();try{return xf(o,a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function aI(o,a,u,l,d,f,h,p){var y=w();try{return zh(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function uI(o,a,u,l,d,f,h,p){var y=w();try{fp(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function cI(o,a,u,l,d,f,h,p){var y=w();try{return xh(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function lI(o,a,u,l,d,f){var h=w();try{return qf(o,a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function dI(o,a,u,l,d,f){var h=w();try{return jh(o,a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function fI(o,a,u,l,d,f,h,p){var y=w();try{return Lh(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function hI(o,a,u,l,d,f,h,p){var y=w();try{qh(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function pI(o){var a=w();try{return Yf(o)}catch(u){if(B(a),u!==u+0&&u!=="longjmp")throw u;I(1,0)}}function yI(o,a,u,l,d,f,h,p){var y=w();try{return Lf(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function _I(o,a,u,l,d,f,h){var p=w();try{return zf(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function mI(o,a,u,l){var d=w();try{return Wf(o,a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function bI(o,a,u,l,d,f,h){var p=w();try{rh(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function gI(o,a,u,l,d,f,h,p){var y=w();try{uh(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function vI(o,a,u,l,d,f,h,p){var y=w();try{return ch(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function jI(o,a,u,l,d,f,h,p){var y=w();try{return Qf(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function wI(o,a,u,l,d,f,h,p,y){var m=w();try{return eh(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function BI(o,a,u,l,d,f,h,p){var y=w();try{th(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function II(o,a,u,l,d,f,h,p,y){var m=w();try{return ih(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function TI(o,a,u,l,d,f,h,p,y){var m=w();try{return nh(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function SI(o,a,u,l,d,f,h,p,y,m){var g=w();try{return sh(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function DI(o,a,u,l,d,f,h){var p=w();try{return ah(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function AI(o,a,u,l,d){var f=w();try{return oh(o,a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function OI(o,a,u,l,d,f,h,p,y){var m=w();try{Xf(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function FI(o,a,u,l,d,f,h,p){var y=w();try{Zf(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function MI(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{return Gf(o,a,u,l,d,f,h,p,y,m,g)}catch(D){if(B(j),D!==D+0&&D!=="longjmp")throw D;I(1,0)}}function CI(o,a,u,l,d,f,h,p,y,m,g,j){var D=w();try{Jf(o,a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(B(D),M!==M+0&&M!=="longjmp")throw M;I(1,0)}}function UI(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{Kf(o,a,u,l,d,f,h,p,y,m,g)}catch(D){if(B(j),D!==D+0&&D!=="longjmp")throw D;I(1,0)}}function VI(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;I(1,0)}}function kI(o,a,u,l,d,f,h){var p=w();try{Nh(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function RI(o,a,u,l,d,f,h,p,y){var m=w();try{Sh(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function EI(o,a,u,l,d,f,h,p,y){var m=w();try{return fh(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function NI(o,a,u,l,d,f,h,p,y){var m=w();try{Eh(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function PI(o,a,u,l){var d=w();try{return Hf(o,a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function xI(o,a,u,l,d,f){var h=w();try{return hh(o,a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function LI(o,a,u,l,d,f,h,p,y){var m=w();try{mh(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function qI(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{_h(o,a,u,l,d,f,h,p,y,m,g)}catch(D){if(B(j),D!==D+0&&D!=="longjmp")throw D;I(1,0)}}function zI(o,a,u,l,d,f){var h=w();try{return Uh(o,a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function WI(o,a,u,l,d,f,h,p,y,m,g,j){var D=w();try{yh(o,a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(B(D),M!==M+0&&M!=="longjmp")throw M;I(1,0)}}function HI(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;I(1,0)}}function YI(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;I(1,0)}}function $I(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{return dh(o,a,u,l,d,f,h,p,y,m,g)}catch(D){if(B(j),D!==D+0&&D!=="longjmp")throw D;I(1,0)}}function GI(o,a,u,l,d,f,h,p,y){var m=w();try{gh(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function JI(o,a,u,l,d,f,h,p,y,m,g,j,D,M,E){var ne=w();try{return ph(o,a,u,l,d,f,h,p,y,m,g,j,D,M,E)}catch(ye){if(B(ne),ye!==ye+0&&ye!=="longjmp")throw ye;I(1,0)}}function KI(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;I(1,0)}}function ZI(o,a,u,l,d,f,h,p){var y=w();try{return Bh(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function XI(o,a,u,l,d,f,h,p){var y=w();try{$f(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function QI(o,a,u,l,d,f){var h=w();try{Ih(o,a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function eT(o,a,u,l,d,f,h,p,y){var m=w();try{Th(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function tT(o,a,u,l,d,f,h){var p=w();try{return Ah(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function iT(o,a,u,l,d,f,h,p,y,m){var g=w();try{Fh(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function rT(o,a,u,l,d,f,h,p,y,m){var g=w();try{Mh(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function nT(o,a,u,l,d,f,h){var p=w();try{return Oh(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function sT(o,a,u,l,d,f,h,p,y,m){var g=w();try{Ch(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function oT(o,a,u,l,d,f,h,p,y){var m=w();try{return Dh(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function aT(o,a,u,l,d,f,h,p,y){var m=w();try{return Ph(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function uT(o,a,u,l,d,f,h,p,y){var m=w();try{Wh(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function cT(o,a,u,l,d,f,h){var p=w();try{Hh(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function lT(o,a,u,l,d,f,h){var p=w();try{return Yh(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function dT(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(D){if(B(j),D!==D+0&&D!=="longjmp")throw D;I(1,0)}}function fT(o,a,u,l,d,f,h,p,y,m,g,j,D){var M=w();try{Xh(o,a,u,l,d,f,h,p,y,m,g,j,D)}catch(E){if(B(M),E!==E+0&&E!=="longjmp")throw E;I(1,0)}}function hT(o,a,u,l,d,f,h,p,y,m){var g=w();try{Qh(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function pT(o,a,u,l,d,f,h,p,y,m,g,j,D){var M=w();try{tp(o,a,u,l,d,f,h,p,y,m,g,j,D)}catch(E){if(B(M),E!==E+0&&E!=="longjmp")throw E;I(1,0)}}function yT(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;I(1,0)}}function _T(o,a,u,l,d,f,h,p,y,m,g,j){var D=w();try{return Gh(o,a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(B(D),M!==M+0&&M!=="longjmp")throw M;I(1,0)}}function mT(o,a,u,l,d,f,h,p,y,m){var g=w();try{return Jh(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function bT(o,a,u,l,d,f,h,p,y,m){var g=w();try{return Kh(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function gT(o,a,u,l,d,f,h,p,y,m,g,j){var D=w();try{ip(o,a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(B(D),M!==M+0&&M!=="longjmp")throw M;I(1,0)}}function vT(o,a,u,l,d,f,h,p,y,m,g,j,D){var M=w();try{rp(o,a,u,l,d,f,h,p,y,m,g,j,D)}catch(E){if(B(M),E!==E+0&&E!=="longjmp")throw E;I(1,0)}}function jT(o,a,u,l,d,f,h,p,y,m,g,j,D,M,E,ne){var ye=w();try{np(o,a,u,l,d,f,h,p,y,m,g,j,D,M,E,ne)}catch(we){if(B(ye),we!==we+0&&we!=="longjmp")throw we;I(1,0)}}function wT(o,a,u,l,d,f,h,p,y,m,g,j,D,M,E,ne,ye,we){var V=w();try{sp(o,a,u,l,d,f,h,p,y,m,g,j,D,M,E,ne,ye,we)}catch(G){if(B(V),G!==G+0&&G!=="longjmp")throw G;I(1,0)}}function BT(o,a,u,l,d,f,h,p,y,m,g,j){var D=w();try{ep(o,a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(B(D),M!==M+0&&M!=="longjmp")throw M;I(1,0)}}function IT(o,a,u,l,d,f){var h=w();try{return ey(o,a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function TT(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{return ty(o,a,u,l,d,f,h,p,y,m,g)}catch(D){if(B(j),D!==D+0&&D!=="longjmp")throw D;I(1,0)}}function ST(o,a,u,l,d,f,h,p,y){var m=w();try{return iy(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function DT(o,a,u,l,d,f,h,p){var y=w();try{return op(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function AT(o,a,u,l,d,f,h,p,y,m,g,j){var D=w();try{ap(o,a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(B(D),M!==M+0&&M!=="longjmp")throw M;I(1,0)}}function OT(o,a,u,l,d,f,h,p,y){var m=w();try{return hp(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function FT(o,a,u,l,d,f,h){var p=w();try{return up(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function MT(o,a,u,l,d,f,h){var p=w();try{return cp(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function CT(o,a,u,l,d,f,h){var p=w();try{return lp(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function UT(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{return dp(o,a,u,l,d,f,h,p,y,m,g)}catch(D){if(B(j),D!==D+0&&D!=="longjmp")throw D;I(1,0)}}function VT(o,a,u,l,d,f,h,p,y,m,g,j,D,M,E){var ne=w();try{return pp(o,a,u,l,d,f,h,p,y,m,g,j,D,M,E)}catch(ye){if(B(ne),ye!==ye+0&&ye!=="longjmp")throw ye;I(1,0)}}function kT(o,a,u,l,d,f,h,p,y,m,g,j){var D=w();try{return yp(o,a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(B(D),M!==M+0&&M!=="longjmp")throw M;I(1,0)}}function RT(o,a,u,l,d,f,h,p,y){var m=w();try{return _p(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function ET(o,a,u){var l=w();try{return mp(o,a,u)}catch(d){if(B(l),d!==d+0&&d!=="longjmp")throw d;I(1,0)}}function NT(o,a){var u=w();try{return bp(o,a)}catch(l){if(B(u),l!==l+0&&l!=="longjmp")throw l;I(1,0)}}function PT(o,a){var u=w();try{return gp(o,a)}catch(l){if(B(u),l!==l+0&&l!=="longjmp")throw l;I(1,0)}}function xT(o,a,u,l,d,f,h){var p=w();try{return ry(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function LT(o,a,u,l,d,f){var h=w();try{return $p(o,a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function qT(o,a,u,l,d,f,h,p,y){var m=w();try{return Bp(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function zT(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{return Ip(o,a,u,l,d,f,h,p,y,m,g)}catch(D){if(B(j),D!==D+0&&D!=="longjmp")throw D;I(1,0)}}function WT(o,a,u,l,d,f,h,p,y,m){var g=w();try{Rh(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function HT(o,a,u,l,d,f,h){var p=w();try{return jp(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function YT(o,a,u,l,d,f,h,p,y,m){var g=w();try{return vp(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function $T(o,a,u,l,d,f,h,p,y,m,g,j,D,M,E,ne,ye){var we=w();try{wp(o,a,u,l,d,f,h,p,y,m,g,j,D,M,E,ne,ye)}catch(V){if(B(we),V!==V+0&&V!=="longjmp")throw V;I(1,0)}}function GT(o,a,u,l,d,f,h,p,y,m,g,j){var D=w();try{return Tp(o,a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(B(D),M!==M+0&&M!=="longjmp")throw M;I(1,0)}}function JT(o,a,u,l,d,f,h,p,y){var m=w();try{Sp(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function KT(o,a,u,l,d,f,h,p,y,m){var g=w();try{return Gp(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function ZT(o,a,u,l,d,f,h,p,y,m){var g=w();try{Ap(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function XT(o,a,u,l,d,f,h,p){var y=w();try{return Op(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function QT(o,a,u,l,d,f,h,p,y,m,g,j,D){var M=w();try{return Fp(o,a,u,l,d,f,h,p,y,m,g,j,D)}catch(E){if(B(M),E!==E+0&&E!=="longjmp")throw E;I(1,0)}}function e1(o,a,u,l,d,f,h,p){var y=w();try{return Mp(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function t1(o,a,u,l,d,f,h,p,y){var m=w();try{return Jp(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function i1(o,a,u,l,d,f,h,p,y,m,g,j,D,M){var E=w();try{return Kp(o,a,u,l,d,f,h,p,y,m,g,j,D,M)}catch(ne){if(B(E),ne!==ne+0&&ne!=="longjmp")throw ne;I(1,0)}}function r1(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{Np(o,a,u,l,d,f,h,p,y,m,g)}catch(D){if(B(j),D!==D+0&&D!=="longjmp")throw D;I(1,0)}}function n1(o,a,u){var l=w();try{return Vp(o,a,u)}catch(d){if(B(l),d!==d+0&&d!=="longjmp")throw d;I(1,0)}}function s1(o,a,u,l,d){var f=w();try{return Pp(o,a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function o1(o,a,u,l,d,f,h){var p=w();try{Ep(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function a1(o,a,u,l,d,f,h,p,y,m,g,j,D,M,E){var ne=w();try{Up(o,a,u,l,d,f,h,p,y,m,g,j,D,M,E)}catch(ye){if(B(ne),ye!==ye+0&&ye!=="longjmp")throw ye;I(1,0)}}function u1(o,a,u,l,d){var f=w();try{return kp(o,a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function c1(o,a,u,l,d){var f=w();try{Rp(o,a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function l1(o,a,u,l,d,f,h,p,y,m){var g=w();try{return xp(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function d1(o,a,u,l,d,f,h,p,y,m){var g=w();try{return Lp(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function f1(o,a,u,l,d,f,h,p,y,m){var g=w();try{qp(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function h1(o,a,u,l,d,f,h,p,y,m){var g=w();try{zp(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function p1(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{Wp(o,a,u,l,d,f,h,p,y,m,g)}catch(D){if(B(j),D!==D+0&&D!=="longjmp")throw D;I(1,0)}}function y1(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{Hp(o,a,u,l,d,f,h,p,y,m,g)}catch(D){if(B(j),D!==D+0&&D!=="longjmp")throw D;I(1,0)}}function _1(o,a,u,l,d){var f=w();try{return Yp(o,a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function m1(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;I(1,0)}}function b1(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;I(1,0)}}function g1(o,a,u,l,d,f,h,p,y,m){var g=w();try{return Qp(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function v1(o,a,u,l,d,f,h,p){var y=w();try{return ny(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function j1(o,a,u,l,d,f,h,p,y){var m=w();try{sy(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function w1(o,a,u,l,d){var f=w();try{return Nf(o,a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function B1(o,a,u,l,d,f,h,p,y,m,g,j,D){var M=w();try{oy(o,a,u,l,d,f,h,p,y,m,g,j,D)}catch(E){if(B(M),E!==E+0&&E!=="longjmp")throw E;I(1,0)}}function I1(o,a,u,l,d,f,h,p,y){var m=w();try{Vh(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function T1(o,a,u,l,d,f,h,p){var y=w();try{return ay(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function S1(o,a,u,l,d,f,h,p,y){var m=w();try{uy(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function D1(o,a,u,l,d,f,h,p){var y=w();try{return cy(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function A1(o,a,u,l,d,f,h,p,y){var m=w();try{ly(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function O1(o,a,u,l,d,f,h){var p=w();try{return dy(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function F1(o,a,u,l,d,f,h,p){var y=w();try{return fy(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function M1(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;I(1,0)}}function C1(o,a,u,l,d,f,h,p,y){var m=w();try{py(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function U1(o,a,u,l,d,f,h,p,y){var m=w();try{yy(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function V1(o,a,u,l,d,f,h,p){var y=w();try{_y(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function k1(o,a,u,l,d,f,h,p,y,m,g,j){var D=w();try{gy(o,a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(B(D),M!==M+0&&M!=="longjmp")throw M;I(1,0)}}function R1(o,a,u,l,d,f){var h=w();try{return Cp(o,a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function E1(o,a,u,l,d,f,h,p,y,m){var g=w();try{jy(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function N1(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{return wy(o,a,u,l,d,f,h,p,y,m,g)}catch(D){if(B(j),D!==D+0&&D!=="longjmp")throw D;I(1,0)}}function P1(o,a,u,l,d,f,h,p,y,m,g,j,D){var M=w();try{vy(o,a,u,l,d,f,h,p,y,m,g,j,D)}catch(E){if(B(M),E!==E+0&&E!=="longjmp")throw E;I(1,0)}}function x1(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{kh(o,a,u,l,d,f,h,p,y,m,g)}catch(D){if(B(j),D!==D+0&&D!=="longjmp")throw D;I(1,0)}}function L1(o,a,u,l,d,f,h,p,y,m,g,j,D){var M=w();try{By(o,a,u,l,d,f,h,p,y,m,g,j,D)}catch(E){if(B(M),E!==E+0&&E!=="longjmp")throw E;I(1,0)}}function q1(o,a,u,l,d,f,h,p,y,m){var g=w();try{return Iy(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function z1(o,a,u,l,d,f,h,p,y,m){var g=w();try{return My(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function W1(o,a,u,l,d,f,h,p,y,m,g,j,D){var M=w();try{Ty(o,a,u,l,d,f,h,p,y,m,g,j,D)}catch(E){if(B(M),E!==E+0&&E!=="longjmp")throw E;I(1,0)}}function H1(o,a,u,l,d,f,h,p,y,m){var g=w();try{Sy(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function Y1(o,a,u,l,d,f){var h=w();try{return Dy(o,a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function $1(o,a,u,l,d,f,h,p,y,m,g,j,D,M){var E=w();try{Oy(o,a,u,l,d,f,h,p,y,m,g,j,D,M)}catch(ne){if(B(E),ne!==ne+0&&ne!=="longjmp")throw ne;I(1,0)}}function G1(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{Fy(o,a,u,l,d,f,h,p,y,m,g)}catch(D){if(B(j),D!==D+0&&D!=="longjmp")throw D;I(1,0)}}function J1(o,a,u,l,d,f,h,p,y,m){var g=w();try{Ay(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function K1(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;I(1,0)}}function Z1(o,a,u,l,d,f,h,p){var y=w();try{return Uy(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function X1(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{return Vy(o,a,u,l,d,f,h,p,y,m,g)}catch(D){if(B(j),D!==D+0&&D!=="longjmp")throw D;I(1,0)}}function Q1(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(D){if(B(j),D!==D+0&&D!=="longjmp")throw D;I(1,0)}}function eS(o,a,u,l,d,f,h,p,y,m,g,j){var D=w();try{return ky(o,a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(B(D),M!==M+0&&M!=="longjmp")throw M;I(1,0)}}t.ccall=dj;var po;function yo(o){this.name="ExitStatus",this.message="Program terminated with exit("+o+")",this.status=o}var tS=!1;ds=function o(){po||Fu(),po||(ds=o)};function iS(o){var a=t._main,u=0,l=0;try{var d=a(u,l);return rS(d,!0),d}catch(f){return Nj(f)}finally{tS=!0}}function Fu(o){if(o=o||_,Tr>0||(Tj(),Tr>0))return;function a(){po||(po=!0,t.calledRun=!0,!ju&&(Sj(),Dj(),r(t),t.onRuntimeInitialized&&t.onRuntimeInitialized(),Ey&&iS(o),Oj()))}t.setStatus?(t.setStatus("Running..."),setTimeout(function(){setTimeout(function(){t.setStatus("")},1),a()},1)):a()}t.run=Fu;function rS(o,a){ro=o,wu()||Aj(),nS(o)}function nS(o){ro=o,wu()||(t.onExit&&t.onExit(o),ju=!0),T(o,new yo(o))}if(t.preInit)for(typeof t.preInit=="function"&&(t.preInit=[t.preInit]);t.preInit.length>0;)t.preInit.pop()();var Ey=!0;return t.noInitialRun&&(Ey=!1),Fu(),e.ready}}(),sj=sV;var ef=class extends Xd{constructor(e,t,r,n){super(e,t);this.mainModuleURL=r,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(r=>{t(r.instance,r.module)}):fetch(this.mainModuleURL).then(r=>r.arrayBuffer()).then(r=>WebAssembly.instantiate(r,e).then(n=>{t(n.instance,n.module)})).catch(r=>{console.error("Failed to instantiate WASM:",r)}),[]}};var oV=class extends ef{constructor(e,t,r,n=null){super(e,t,r,n)}instantiateImpl(e){return sj(mo(Ar({},e),{instantiateWasm:this.instantiateWasm.bind(this),locateFile:this.locateFile.bind(this)}))}};var mt={fileInfoCache:new Map,getFileInfo(i,e){try{let t=mt.fileInfoCache.get(e);if(t)return t;let[r,n,s]=Ie(i,"duckdb_web_fs_get_file_info_by_id",["number"],[e]);if(r!==ge.SUCCESS)return null;let c=pe(i,n,s);qe(i);let _=JSON.parse(c);if(_==null)return null;let v=mo(Ar({},_),{blob:null});return mt.fileInfoCache.set(e,v),v}catch(t){return null}},testPlatformFeature:(i,e)=>{switch(e){case 1:return typeof BigInt64Array!="undefined";default:return console.warn(`test for unknown feature: ${e}`),!1}},openFile:(i,e)=>{var t;try{mt.fileInfoCache.delete(e);let r=mt.getFileInfo(i,e);switch(r==null?void 0:r.dataProtocol){case pt.HTTP:{let n=null;try{let s=new XMLHttpRequest;s.open("HEAD",r.dataUrl,!1),s.setRequestHeader("Range","bytes=0-"),s.send(null);let c=s.getResponseHeader("Content-Length");if(s.status==206&&c!==null){let _=i._malloc(2*8);return i.HEAPF64[(_>>3)+0]=+c,i.HEAPF64[(_>>3)+1]=0,_}}catch(s){n=s,console.warn(`HEAD request with range header failed: ${s}`)}if(r.allowFullHttpReads){console.warn(`falling back to full HTTP read for: ${r.dataUrl}`);let s=new XMLHttpRequest;if(s.open("GET",r.dataUrl,!1),s.responseType="arraybuffer",s.send(null),s.status==200){let c=i._malloc(s.response.byteLength),_=new Uint8Array(s.response,0,s.response.byteLength);i.HEAPU8.set(_,c);let v=i._malloc(2*8);return i.HEAPF64[(v>>3)+0]=s.response.byteLength,i.HEAPF64[(v>>3)+1]=c,v}}if(n!=null)throw new Error(`Reading file ${r.fileName} failed with error: ${n}`);return 0}case pt.NATIVE:{let n=(t=mt._files)==null?void 0:t.get(r.fileName);if(n){let _=i._malloc(2*8);return i.HEAPF64[(_>>3)+0]=n.size,i.HEAPF64[(_>>3)+1]=0,_}console.warn(`Buffering missing file: ${r.fileName}`);let s=i._malloc(2*8),c=i._malloc(1);return i.HEAPF64[(s>>3)+0]=1,i.HEAPF64[(s>>3)+1]=c,s}}}catch(r){console.error(r.toString()),Ni(i,r.toString())}return 0},glob:(i,e,t)=>{try{let r=pe(i,e,t);if(r.startsWith("http")){let n=new XMLHttpRequest;if(n.open("HEAD",r,!1),n.send(null),n.status!=200&&n.status!==206){Ni(i,`HEAD request failed: ${r}`);return}i.ccall("duckdb_web_fs_glob_add_path",null,["string"],[r])}}catch(r){return Ni(i,r.toString()),0}},checkFile:(i,e,t)=>{try{let r=pe(i,e,t);if(r.startsWith("http")){let n=new XMLHttpRequest;n.open("HEAD",r,!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(r){return!1}return!1},syncFile:(i,e)=>{},closeFile:(i,e)=>{let t=mt.getFileInfo(i,e);switch(mt.fileInfoCache.delete(e),t==null?void 0:t.dataProtocol){case pt.HTTP:break;case pt.NATIVE:return}},truncateFile:(i,e,t)=>{let r=mt.getFileInfo(i,e);switch(r==null?void 0:r.dataProtocol){case pt.HTTP:Ni(i,"Cannot truncate a http file");return;case pt.NATIVE:Ni(i,"truncateFile not implemented");return}return 0},readFile(i,e,t,r,n){var s;try{let c=mt.getFileInfo(i,e);switch(c==null?void 0:c.dataProtocol){case pt.HTTP:{if(!c.dataUrl)throw new Error(`Missing data URL for file ${e}`);try{let _=new XMLHttpRequest;if(_.open("GET",c.dataUrl,!1),_.responseType="arraybuffer",_.setRequestHeader("Range",`bytes=${n}-${n+r-1}`),_.send(null),_.status==206||_.status==200&&r==_.response.byteLength&&n==0){let v=new Uint8Array(_.response,0,Math.min(_.response.byteLength,r));return i.HEAPU8.set(v,t),v.byteLength}else throw _.status==200?new Error(`Range request for ${c.dataUrl} did not return a partial response: ${_.status} "${_.statusText}"`):new Error(`Range request for ${c.dataUrl} did returned non-success status: ${_.status} "${_.statusText}"`)}catch(_){throw new Error(`Range request for ${c.dataUrl} failed with error: ${_}"`)}}case pt.NATIVE:{let _=(s=mt._files)==null?void 0:s.get(c.fileName);if(!_)throw new Error(`No handle available for file: ${c.fileName}`);let v=_.slice(n,n+r),T=new Uint8Array(new FileReaderSync().readAsArrayBuffer(v));return i.HEAPU8.set(T,t),T.byteLength}}return 0}catch(c){return Ni(i,c.toString()),0}},writeFile:(i,e,t,r,n)=>{let s=mt.getFileInfo(i,e);switch(s==null?void 0:s.dataProtocol){case pt.HTTP:return Ni(i,"Cannot write to HTTP file"),0;case pt.NATIVE:return Ni(i,"writefile not implemented"),0}return 0},getLastFileModificationTime:(i,e)=>{var r;let t=mt.getFileInfo(i,e);switch(t==null?void 0:t.dataProtocol){case pt.NATIVE:{if(!((r=mt._files)==null?void 0:r.get(t.fileName)))throw Error(`No handle available for file: ${t.fileName}`);return 0}case pt.HTTP:return new Date().getTime()}return 0},checkDirectory:(i,e,t)=>{let r=pe(i,e,t);return console.log(`checkDirectory: ${r}`),!1},createDirectory:(i,e,t)=>{let r=pe(i,e,t);console.log(`createDirectory: ${r}`)},removeDirectory:(i,e,t)=>{let r=pe(i,e,t);console.log(`removeDirectory: ${r}`)},listDirectoryEntries:(i,e,t)=>{let r=pe(i,e,t);return console.log(`listDirectoryEntries: ${r}`),!1},moveFile:(i,e,t,r,n)=>{},removeFile:(i,e,t)=>{}};export{mt as BROWSER_RUNTIME,_S as ConsoleLogger,rV as DEFAULT_RUNTIME,oV as DuckDB,Xd as DuckDBBindingsBase,Jd as DuckDBConnection,pt as DuckDBDataProtocol,ij as DuckDBFeature,Zd as FileStatistics,nj as InsertMode,rj as JSONTableShape,xi as LogEvent,Or as LogLevel,Fr as LogOrigin,on as LogTopic,tj as PreparedStatement,Kd as ResultStreamIterator,ge as StatusCode,yS as VoidLogger,Ie as callSRet,us as copyBuffer,iV as decodeText,qe as dropResponseBuffers,Ni as failWith,dV as getLogEventLabel,lV as getLogLevelLabel,hV as getLogOriginLabel,fV as getLogTopicLabel,pe as readString};
|
|
19
|
+
/*! *****************************************************************************
|
|
20
|
+
Copyright (c) Microsoft Corporation.
|
|
21
|
+
|
|
22
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
23
|
+
purpose with or without fee is hereby granted.
|
|
24
|
+
|
|
25
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
26
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
27
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
28
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
29
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
30
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
31
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
32
|
+
***************************************************************************** */
|
|
33
|
+
//# sourceMappingURL=duckdb-browser-blocking.mjs.map
|