diff --git "a/custom_component/frontend/build/static/js/2.6704e1cc.chunk.js" "b/custom_component/frontend/build/static/js/2.6704e1cc.chunk.js" new file mode 100644--- /dev/null +++ "b/custom_component/frontend/build/static/js/2.6704e1cc.chunk.js" @@ -0,0 +1,3 @@ +/*! For license information please see 2.6704e1cc.chunk.js.LICENSE.txt */ +(this.webpackJsonpstreamlit_component_template=this.webpackJsonpstreamlit_component_template||[]).push([[2],[function(e,t,n){"use strict";function r(e,t){for(var n=0;n=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)},i={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},a=n(13),o=/[A-Z]|^ms/g,u=/_EMO_([^_]+?)_([^]*?)_EMO_/g,s=function(e){return 45===e.charCodeAt(1)},c=function(e){return null!=e&&"boolean"!==typeof e},l=Object(a.a)((function(e){return s(e)?e:e.replace(o,"-$&").toLowerCase()})),f=function(e,t){switch(e){case"animation":case"animationName":if("string"===typeof t)return t.replace(u,(function(e,t,n){return d={name:t,styles:n,next:d},t}))}return 1===i[e]||s(e)||"number"!==typeof t||0===t?t:t+"px"};function h(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return d={name:n.name,styles:n.styles,next:d},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)d={name:r.name,styles:r.styles,next:d},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i0){for(var e=new Array(arguments.length),t=0;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,i,a=!0,o=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function D(e,t,n,r,i,a,o){try{var u=e[a](o),s=u.value}catch(c){return void n(c)}u.done?t(s):Promise.resolve(s).then(r,i)}function C(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function o(e){D(a,r,i,o,u,"next",e)}function u(e){D(a,r,i,o,u,"throw",e)}o(void 0)}))}}var L=n(1),F=n(0),M=n(4);function N(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,a=void 0;try{for(var o,u=e[Symbol.iterator]();!(r=(o=u.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(s){i=!0,a=s}finally{try{r||null==u.return||u.return()}finally{if(i)throw a}}return n}}(e,t)||A(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function P(e){this.wrapped=e}function U(e){return new P(e)}function R(e){var t,n;function r(t,n){try{var a=e[t](n),o=a.value,u=o instanceof P;Promise.resolve(u?o.wrapped:o).then((function(e){u?r("return"===t?"return":"next",e):i(a.done?"return":"normal",e)}),(function(e){r("throw",e)}))}catch(s){i("throw",s)}}function i(e,i){switch(e){case"return":t.resolve({value:i,done:!0});break;case"throw":t.reject(i);break;default:t.resolve({value:i,done:!1})}(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise((function(a,o){var u={key:e,arg:i,resolve:a,reject:o,next:null};n?n=n.next=u:(t=n=u,r(e,i))}))},"function"!==typeof e.return&&(this.return=void 0)}function z(e){return function(){return new R(e.apply(this,arguments))}}function V(e,t){var n={},r=!1;function i(n,i){return r=!0,i=new Promise((function(t){t(e[n](i))})),{done:!1,value:t(i)}}return"function"===typeof Symbol&&Symbol.iterator&&(n[Symbol.iterator]=function(){return this}),n.next=function(e){return r?(r=!1,e):i("next",e)},"function"===typeof e.throw&&(n.throw=function(e){if(r)throw r=!1,e;return i("throw",e)}),"function"===typeof e.return&&(n.return=function(e){return r?(r=!1,e):i("return",e)}),n}"function"===typeof Symbol&&Symbol.asyncIterator&&(R.prototype[Symbol.asyncIterator]=function(){return this}),R.prototype.next=function(e){return this._invoke("next",e)},R.prototype.throw=function(e){return this._invoke("throw",e)},R.prototype.return=function(e){return this._invoke("return",e)};var W={};function $(e,t,n){return t<=e&&e<=n}function H(e){if(void 0===e)return{};if(e===Object(e))return e;throw TypeError("Could not convert argument to dictionary")}W.Offset,W.Table,W.SIZEOF_SHORT=2,W.SIZEOF_INT=4,W.FILE_IDENTIFIER_LENGTH=4,W.Encoding={UTF8_BYTES:1,UTF16_STRING:2},W.int32=new Int32Array(2),W.float32=new Float32Array(W.int32.buffer),W.float64=new Float64Array(W.int32.buffer),W.isLittleEndian=1===new Uint16Array(new Uint8Array([1,0]).buffer)[0],W.Long=function(e,t){this.low=0|e,this.high=0|t},W.Long.create=function(e,t){return 0==e&&0==t?W.Long.ZERO:new W.Long(e,t)},W.Long.prototype.toFloat64=function(){return(this.low>>>0)+4294967296*this.high},W.Long.prototype.equals=function(e){return this.low==e.low&&this.high==e.high},W.Long.ZERO=new W.Long(0,0),W.Builder=function(e){if(e)t=e;else var t=1024;this.bb=W.ByteBuffer.allocate(t),this.space=t,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},W.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},W.Builder.prototype.forceDefaults=function(e){this.force_defaults=e},W.Builder.prototype.dataBuffer=function(){return this.bb},W.Builder.prototype.asUint8Array=function(){return this.bb.bytes().subarray(this.bb.position(),this.bb.position()+this.offset())},W.Builder.prototype.prep=function(e,t){e>this.minalign&&(this.minalign=e);for(var n=1+~(this.bb.capacity()-this.space+t)&e-1;this.space=0&&0==this.vtable[t];t--);for(var n=t+1;t>=0;t--)this.addInt16(0!=this.vtable[t]?e-this.vtable[t]:0);this.addInt16(e-this.object_start);var r=(n+2)*W.SIZEOF_SHORT;this.addInt16(r);var i=0,a=this.space;e:for(t=0;t=0;r--)this.writeInt8(n.charCodeAt(r))}this.prep(this.minalign,W.SIZEOF_INT),this.addOffset(e),this.bb.setPosition(this.space)},W.Builder.prototype.requiredField=function(e,t){var n=this.bb.capacity()-e,r=n-this.bb.readInt32(n);if(!(0!=this.bb.readInt16(r+t)))throw new Error("FlatBuffers: field "+t+" must be set")},W.Builder.prototype.startVector=function(e,t,n){this.notNested(),this.vector_num_elems=t,this.prep(W.SIZEOF_INT,e*t),this.prep(n,e*t)},W.Builder.prototype.endVector=function(){return this.writeInt32(this.vector_num_elems),this.offset()},W.Builder.prototype.createString=function(e){if(e instanceof Uint8Array)var t=e;else{t=[];for(var n=0;n=56320)r=i;else r=(i<<10)+e.charCodeAt(n++)+-56613888;r<128?t.push(r):(r<2048?t.push(r>>6&31|192):(r<65536?t.push(r>>12&15|224):t.push(r>>18&7|240,r>>12&63|128),t.push(r>>6&63|128)),t.push(63&r|128))}}this.addInt8(0),this.startVector(1,t.length,1),this.bb.setPosition(this.space-=t.length);n=0;for(var a=this.space,o=this.bb.bytes();n>24},W.ByteBuffer.prototype.readUint8=function(e){return this.bytes_[e]},W.ByteBuffer.prototype.readInt16=function(e){return this.readUint16(e)<<16>>16},W.ByteBuffer.prototype.readUint16=function(e){return this.bytes_[e]|this.bytes_[e+1]<<8},W.ByteBuffer.prototype.readInt32=function(e){return this.bytes_[e]|this.bytes_[e+1]<<8|this.bytes_[e+2]<<16|this.bytes_[e+3]<<24},W.ByteBuffer.prototype.readUint32=function(e){return this.readInt32(e)>>>0},W.ByteBuffer.prototype.readInt64=function(e){return new W.Long(this.readInt32(e),this.readInt32(e+4))},W.ByteBuffer.prototype.readUint64=function(e){return new W.Long(this.readUint32(e),this.readUint32(e+4))},W.ByteBuffer.prototype.readFloat32=function(e){return W.int32[0]=this.readInt32(e),W.float32[0]},W.ByteBuffer.prototype.readFloat64=function(e){return W.int32[W.isLittleEndian?0:1]=this.readInt32(e),W.int32[W.isLittleEndian?1:0]=this.readInt32(e+4),W.float64[0]},W.ByteBuffer.prototype.writeInt8=function(e,t){this.bytes_[e]=t},W.ByteBuffer.prototype.writeUint8=function(e,t){this.bytes_[e]=t},W.ByteBuffer.prototype.writeInt16=function(e,t){this.bytes_[e]=t,this.bytes_[e+1]=t>>8},W.ByteBuffer.prototype.writeUint16=function(e,t){this.bytes_[e]=t,this.bytes_[e+1]=t>>8},W.ByteBuffer.prototype.writeInt32=function(e,t){this.bytes_[e]=t,this.bytes_[e+1]=t>>8,this.bytes_[e+2]=t>>16,this.bytes_[e+3]=t>>24},W.ByteBuffer.prototype.writeUint32=function(e,t){this.bytes_[e]=t,this.bytes_[e+1]=t>>8,this.bytes_[e+2]=t>>16,this.bytes_[e+3]=t>>24},W.ByteBuffer.prototype.writeInt64=function(e,t){this.writeInt32(e,t.low),this.writeInt32(e+4,t.high)},W.ByteBuffer.prototype.writeUint64=function(e,t){this.writeUint32(e,t.low),this.writeUint32(e+4,t.high)},W.ByteBuffer.prototype.writeFloat32=function(e,t){W.float32[0]=t,this.writeInt32(e,W.int32[0])},W.ByteBuffer.prototype.writeFloat64=function(e,t){W.float64[0]=t,this.writeInt32(e,W.int32[W.isLittleEndian?0:1]),this.writeInt32(e+4,W.int32[W.isLittleEndian?1:0])},W.ByteBuffer.prototype.getBufferIdentifier=function(){if(this.bytes_.length>10),56320+(1023&a)))}return r},W.ByteBuffer.prototype.__indirect=function(e){return e+this.readInt32(e)},W.ByteBuffer.prototype.__vector=function(e){return e+this.readInt32(e)+W.SIZEOF_INT},W.ByteBuffer.prototype.__vector_len=function(e){return this.readInt32(e+this.readInt32(e))},W.ByteBuffer.prototype.__has_identifier=function(e){if(e.length!=W.FILE_IDENTIFIER_LENGTH)throw new Error("FlatBuffers: file identifier must be length "+W.FILE_IDENTIFIER_LENGTH);for(var t=0;t>6*n)+r];n>0;){var a=t>>6*(n-1);i.push(128|63&a),n-=1}return i}}Q.prototype={decode:function(e,t){var n;n="object"===typeof e&&e instanceof ArrayBuffer?new Uint8Array(e):"object"===typeof e&&"buffer"in e&&e.buffer instanceof ArrayBuffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(0),t=H(t),this._streaming||(this._decoder=new G({fatal:this._fatal}),this._BOMseen=!1),this._streaming=Boolean(t.stream);for(var r,i=new Y(n),a=[];!i.endOfStream()&&-1!==(r=this._decoder.handler(i,i.read()));)null!==r&&(Array.isArray(r)?a.push.apply(a,r):a.push(r));if(!this._streaming){do{if(-1===(r=this._decoder.handler(i,i.read())))break;null!==r&&(Array.isArray(r)?a.push.apply(a,r):a.push(r))}while(!i.endOfStream());this._decoder=null}return a.length&&(-1===["utf-8"].indexOf(this.encoding)||this._ignoreBOM||this._BOMseen||(65279===a[0]?(this._BOMseen=!0,a.shift()):this._BOMseen=!0)),function(e){for(var t="",n=0;n>10),56320+(1023&r)))}return t}(a)}},q.prototype={encode:function(e,t){e=e?String(e):"",t=H(t),this._streaming||(this._encoder=new J(this._options)),this._streaming=Boolean(t.stream);for(var n,r=[],i=new Y(function(e){for(var t=String(e),n=t.length,r=0,i=[];r57343)i.push(a);else if(56320<=a&&a<=57343)i.push(65533);else if(55296<=a&&a<=56319)if(r===n-1)i.push(65533);else{var o=e.charCodeAt(r+1);if(56320<=o&&o<=57343){var u=1023&a,s=1023&o;i.push(65536+(u<<10)+s),r+=1}else i.push(65533)}r+=1}return i}(e));!i.endOfStream()&&-1!==(n=this._encoder.handler(i,i.read()));)Array.isArray(n)?r.push.apply(r,n):r.push(n);if(!this._streaming){for(;-1!==(n=this._encoder.handler(i,i.read()));)Array.isArray(n)?r.push.apply(r,n):r.push(n);this._encoder=null}return new Uint8Array(r)}};var X="function"===typeof Buffer?Buffer:null,Z="function"===typeof TextDecoder&&"function"===typeof TextEncoder,ee=function(e){if(Z||!X){var t=new e("utf-8");return function(e){return t.decode(e)}}return function(e){var t=Ve(e),n=t.buffer,r=t.byteOffset,i=t.length;return X.from(n,r,i).toString()}}("undefined"!==typeof TextDecoder?TextDecoder:Q),te=function(e){if(Z||!X){var t=new e;return function(e){return t.encode(e)}}return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Ve(X.from(e,"utf8"))}}("undefined"!==typeof TextEncoder?TextEncoder:q),ne=n(2),re=n(3),ie=Object.freeze({done:!0,value:void 0}),ae=function(){function e(t){Object(L.a)(this,e),this._json=t}return Object(F.a)(e,[{key:"schema",get:function(){return this._json.schema}},{key:"batches",get:function(){return this._json.batches||[]}},{key:"dictionaries",get:function(){return this._json.dictionaries||[]}}]),e}(),oe=function(){function e(){Object(L.a)(this,e)}return Object(F.a)(e,[{key:"tee",value:function(){return this._getDOMStream().tee()}},{key:"pipe",value:function(e,t){return this._getNodeStream().pipe(e,t)}},{key:"pipeTo",value:function(e,t){return this._getDOMStream().pipeTo(e,t)}},{key:"pipeThrough",value:function(e,t){return this._getDOMStream().pipeThrough(e,t)}},{key:"_getDOMStream",value:function(){return this._DOMStream||(this._DOMStream=this.toDOMStream())}},{key:"_getNodeStream",value:function(){return this._nodeStream||(this._nodeStream=this.toNodeStream())}}]),e}(),ue=function(e,t){Object(ne.a)(r,e);var n=Object(re.a)(r);function r(){var e;return Object(L.a)(this,r),(e=n.call(this))._values=[],e.resolvers=[],e._closedPromise=new Promise((function(t){return e._closedPromiseResolve=t})),e}return Object(F.a)(r,[{key:"closed",get:function(){return this._closedPromise}},{key:"cancel",value:function(){var e=C(M.mark((function e(t){return M.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.return(t);case 2:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"write",value:function(e){this._ensureOpen()&&(this.resolvers.length<=0?this._values.push(e):this.resolvers.shift().resolve({done:!1,value:e}))}},{key:"abort",value:function(e){this._closedPromiseResolve&&(this.resolvers.length<=0?this._error={error:e}:this.resolvers.shift().reject({done:!0,value:e}))}},{key:"close",value:function(){if(this._closedPromiseResolve){for(var e=this.resolvers;e.length>0;)e.shift().resolve(ie);this._closedPromiseResolve(),this._closedPromiseResolve=void 0}}},{key:t,value:function(){return this}},{key:"toDOMStream",value:function(e){return kt.toDOMStream(this._closedPromiseResolve||this._error?this:this._values,e)}},{key:"toNodeStream",value:function(e){return kt.toNodeStream(this._closedPromiseResolve||this._error?this:this._values,e)}},{key:"throw",value:function(){var e=C(M.mark((function e(t){return M.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.abort(t);case 2:return e.abrupt("return",ie);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"return",value:function(){var e=C(M.mark((function e(t){return M.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.close();case 2:return e.abrupt("return",ie);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"read",value:function(){var e=C(M.mark((function e(t){return M.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.next(t,"read");case 2:return e.abrupt("return",e.sent.value);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"peek",value:function(){var e=C(M.mark((function e(t){return M.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.next(t,"peek");case 2:return e.abrupt("return",e.sent.value);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"next",value:function(){var e=this;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((function(t,n){e.resolvers.push({resolve:t,reject:n})})):Promise.resolve(ie)}},{key:"_ensureOpen",value:function(){if(this._closedPromiseResolve)return!0;throw new Error("".concat(this," is closed"))}}]),r}(oe,Symbol.asyncIterator),se=N(function(){var e=function(){throw new Error("BigInt is not available in this environment")};function t(){throw e()}return t.asIntN=function(){throw e()},t.asUintN=function(){throw e()},"undefined"!==typeof BigInt?[BigInt,!0]:[t,!1]}(),2),ce=se[0],le=se[1],fe=N(function(){var e=function(){throw new Error("BigInt64Array is not available in this environment")};return"undefined"!==typeof BigInt64Array?[BigInt64Array,!0]:[function(){function t(){throw Object(L.a)(this,t),e()}return Object(F.a)(t,null,[{key:"BYTES_PER_ELEMENT",get:function(){return 8}},{key:"of",value:function(){throw e()}},{key:"from",value:function(){throw e()}}]),t}(),!1]}(),2),he=fe[0],de=(fe[1],N(function(){var e=function(){throw new Error("BigUint64Array is not available in this environment")};return"undefined"!==typeof BigUint64Array?[BigUint64Array,!0]:[function(){function t(){throw Object(L.a)(this,t),e()}return Object(F.a)(t,null,[{key:"BYTES_PER_ELEMENT",get:function(){return 8}},{key:"of",value:function(){throw e()}},{key:"from",value:function(){throw e()}}]),t}(),!1]}(),2)),pe=de[0],ye=(de[1],function(e){return"number"===typeof e}),ve=function(e){return"boolean"===typeof e},be=function(e){return"function"===typeof e},me=function(e){return null!=e&&Object(e)===e},ge=function(e){return me(e)&&be(e.then)},ke=function(e){return me(e)&&be(e[Symbol.iterator])},we=function(e){return me(e)&&be(e[Symbol.asyncIterator])},_e=function(e){return me(e)&&me(e.schema)},Oe=function(e){return me(e)&&"done"in e&&"value"in e},xe=function(e){return me(e)&&be(e.stat)&&ye(e.fd)},je=function(e){return me(e)&&Te(e.body)},Se=function(e){return me(e)&&be(e.abort)&&be(e.getWriter)&&!(e instanceof oe)},Te=function(e){return me(e)&&be(e.cancel)&&be(e.getReader)&&!(e instanceof oe)},Ie=function(e){return me(e)&&be(e.end)&&be(e.write)&&ve(e.writable)&&!(e instanceof oe)},Ee=function(e){return me(e)&&be(e.read)&&be(e.pipe)&&ve(e.readable)&&!(e instanceof oe)},Ae=M.mark(Ge);function Be(e){var t,n,r,i=2;for("undefined"!=typeof Symbol&&(n=Symbol.asyncIterator,r=Symbol.iterator);i--;){if(n&&null!=(t=e[n]))return t.call(e);if(r&&null!=(t=e[r]))return new De(t.call(e));n="@@asyncIterator",r="@@iterator"}throw new TypeError("Object is not async iterable")}function De(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then((function(e){return{value:e,done:t}}))}return(De=function(e){this.s=e,this.n=e.next}).prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return void 0===n?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return void 0===n?Promise.reject(e):t(n.apply(this.s,arguments))}},new De(e)}var Ce=W.ByteBuffer,Le="undefined"!==typeof SharedArrayBuffer?SharedArrayBuffer:ArrayBuffer;function Fe(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.byteLength,i=e.byteLength,a=new Uint8Array(e.buffer,e.byteOffset,i),o=new Uint8Array(t.buffer,t.byteOffset,Math.min(r,i));return a.set(o,n),e}function Me(e,t){for(var n,r,i,a=function(e){for(var t,n,r,i,a,o,u=e[0]?[e[0]]:[],s=0,c=0,l=e.length;++s0)do{if(e[n]!==t[n])return!1}while(++n0&&(r.push(i),u+=i.byteLength),!(t||o<=u)){d.next=22;break}case 16:return d.next=18,s();case 18:h=d.sent,a=h.cmd,o=h.size;case 21:if(o0&&(i.push(a),s+=a.byteLength),!(n||u<=s)){e.next=31;break}case 25:return e.next=27,c();case 27:d=e.sent,o=d.cmd,u=d.size;case 30:if(u0&&(i.push(Ve(a)),s+=a.byteLength),!(n||u<=s)){e.next=31;break}case 25:return e.next=27,c();case 27:d=e.sent,o=d.cmd,u=d.size;case 30:if(u=i)){e.next=2;break}return e.abrupt("return",{done:!1,value:new Uint8Array(n,0,i)});case 2:return e.next=4,t.read(new Uint8Array(n,r,i-r));case 4:if(a=e.sent,o=a.done,u=a.value,!((r+=u.byteLength)0&&(c.push(l),s+=l.byteLength)),!(i||u<=s)){e.next=36;break}case 30:return e.next=32,f();case 32:y=e.sent,o=y.cmd,u=y.size;case 35:if(u=0;n--)e.addInt32(t[n]);return e.endVector()}},{key:"startTypeIdsVector",value:function(e,t){e.startVector(4,t,4)}},{key:"endUnion",value:function(e){return e.endObject()}},{key:"createUnion",value:function(e,n,r){return t.startUnion(e),t.addMode(e,n),t.addTypeIds(e,r),t.endUnion(e)}}]),t}();t.Union=n}(t.flatbuf||(t.flatbuf={}))}(t.arrow||(t.arrow={}))}(e.apache||(e.apache={}))}(Ft||(Ft={})),function(e){!function(e){!function(e){!function(e){var t=function(){function e(){Object(L.a)(this,e),this.bb=null,this.bb_pos=0}return Object(F.a)(e,[{key:"__init",value:function(e,t){return this.bb_pos=e,this.bb=t,this}},{key:"bitWidth",value:function(){var e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}},{key:"isSigned",value:function(){var e=this.bb.__offset(this.bb_pos,6);return!!e&&!!this.bb.readInt8(this.bb_pos+e)}}],[{key:"getRootAsInt",value:function(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}},{key:"startInt",value:function(e){e.startObject(2)}},{key:"addBitWidth",value:function(e,t){e.addFieldInt32(0,t,0)}},{key:"addIsSigned",value:function(e,t){e.addFieldInt8(1,+t,0)}},{key:"endInt",value:function(e){return e.endObject()}},{key:"createInt",value:function(t,n,r){return e.startInt(t),e.addBitWidth(t,n),e.addIsSigned(t,r),e.endInt(t)}}]),e}();e.Int=t}(e.flatbuf||(e.flatbuf={}))}(e.arrow||(e.arrow={}))}(e.apache||(e.apache={}))}(Ft||(Ft={})),function(e){!function(t){!function(t){!function(t){var n=function(){function t(){Object(L.a)(this,t),this.bb=null,this.bb_pos=0}return Object(F.a)(t,[{key:"__init",value:function(e,t){return this.bb_pos=e,this.bb=t,this}},{key:"precision",value:function(){var t=this.bb.__offset(this.bb_pos,4);return t?this.bb.readInt16(this.bb_pos+t):e.apache.arrow.flatbuf.Precision.HALF}}],[{key:"getRootAsFloatingPoint",value:function(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}},{key:"startFloatingPoint",value:function(e){e.startObject(1)}},{key:"addPrecision",value:function(t,n){t.addFieldInt16(0,n,e.apache.arrow.flatbuf.Precision.HALF)}},{key:"endFloatingPoint",value:function(e){return e.endObject()}},{key:"createFloatingPoint",value:function(e,n){return t.startFloatingPoint(e),t.addPrecision(e,n),t.endFloatingPoint(e)}}]),t}();t.FloatingPoint=n}(t.flatbuf||(t.flatbuf={}))}(t.arrow||(t.arrow={}))}(e.apache||(e.apache={}))}(Ft||(Ft={})),function(e){!function(e){!function(e){!function(e){var t=function(){function e(){Object(L.a)(this,e),this.bb=null,this.bb_pos=0}return Object(F.a)(e,[{key:"__init",value:function(e,t){return this.bb_pos=e,this.bb=t,this}}],[{key:"getRootAsUtf8",value:function(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}},{key:"startUtf8",value:function(e){e.startObject(0)}},{key:"endUtf8",value:function(e){return e.endObject()}},{key:"createUtf8",value:function(t){return e.startUtf8(t),e.endUtf8(t)}}]),e}();e.Utf8=t}(e.flatbuf||(e.flatbuf={}))}(e.arrow||(e.arrow={}))}(e.apache||(e.apache={}))}(Ft||(Ft={})),function(e){!function(e){!function(e){!function(e){var t=function(){function e(){Object(L.a)(this,e),this.bb=null,this.bb_pos=0}return Object(F.a)(e,[{key:"__init",value:function(e,t){return this.bb_pos=e,this.bb=t,this}}],[{key:"getRootAsBinary",value:function(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}},{key:"startBinary",value:function(e){e.startObject(0)}},{key:"endBinary",value:function(e){return e.endObject()}},{key:"createBinary",value:function(t){return e.startBinary(t),e.endBinary(t)}}]),e}();e.Binary=t}(e.flatbuf||(e.flatbuf={}))}(e.arrow||(e.arrow={}))}(e.apache||(e.apache={}))}(Ft||(Ft={})),function(e){!function(e){!function(e){!function(e){var t=function(){function e(){Object(L.a)(this,e),this.bb=null,this.bb_pos=0}return Object(F.a)(e,[{key:"__init",value:function(e,t){return this.bb_pos=e,this.bb=t,this}}],[{key:"getRootAsLargeUtf8",value:function(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}},{key:"startLargeUtf8",value:function(e){e.startObject(0)}},{key:"endLargeUtf8",value:function(e){return e.endObject()}},{key:"createLargeUtf8",value:function(t){return e.startLargeUtf8(t),e.endLargeUtf8(t)}}]),e}();e.LargeUtf8=t}(e.flatbuf||(e.flatbuf={}))}(e.arrow||(e.arrow={}))}(e.apache||(e.apache={}))}(Ft||(Ft={})),function(e){!function(e){!function(e){!function(e){var t=function(){function e(){Object(L.a)(this,e),this.bb=null,this.bb_pos=0}return Object(F.a)(e,[{key:"__init",value:function(e,t){return this.bb_pos=e,this.bb=t,this}}],[{key:"getRootAsLargeBinary",value:function(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}},{key:"startLargeBinary",value:function(e){e.startObject(0)}},{key:"endLargeBinary",value:function(e){return e.endObject()}},{key:"createLargeBinary",value:function(t){return e.startLargeBinary(t),e.endLargeBinary(t)}}]),e}();e.LargeBinary=t}(e.flatbuf||(e.flatbuf={}))}(e.arrow||(e.arrow={}))}(e.apache||(e.apache={}))}(Ft||(Ft={})),function(e){!function(e){!function(e){!function(e){var t=function(){function e(){Object(L.a)(this,e),this.bb=null,this.bb_pos=0}return Object(F.a)(e,[{key:"__init",value:function(e,t){return this.bb_pos=e,this.bb=t,this}},{key:"byteWidth",value:function(){var e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}}],[{key:"getRootAsFixedSizeBinary",value:function(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}},{key:"startFixedSizeBinary",value:function(e){e.startObject(1)}},{key:"addByteWidth",value:function(e,t){e.addFieldInt32(0,t,0)}},{key:"endFixedSizeBinary",value:function(e){return e.endObject()}},{key:"createFixedSizeBinary",value:function(t,n){return e.startFixedSizeBinary(t),e.addByteWidth(t,n),e.endFixedSizeBinary(t)}}]),e}();e.FixedSizeBinary=t}(e.flatbuf||(e.flatbuf={}))}(e.arrow||(e.arrow={}))}(e.apache||(e.apache={}))}(Ft||(Ft={})),function(e){!function(e){!function(e){!function(e){var t=function(){function e(){Object(L.a)(this,e),this.bb=null,this.bb_pos=0}return Object(F.a)(e,[{key:"__init",value:function(e,t){return this.bb_pos=e,this.bb=t,this}}],[{key:"getRootAsBool",value:function(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}},{key:"startBool",value:function(e){e.startObject(0)}},{key:"endBool",value:function(e){return e.endObject()}},{key:"createBool",value:function(t){return e.startBool(t),e.endBool(t)}}]),e}();e.Bool=t}(e.flatbuf||(e.flatbuf={}))}(e.arrow||(e.arrow={}))}(e.apache||(e.apache={}))}(Ft||(Ft={})),function(e){!function(e){!function(e){!function(e){var t=function(){function e(){Object(L.a)(this,e),this.bb=null,this.bb_pos=0}return Object(F.a)(e,[{key:"__init",value:function(e,t){return this.bb_pos=e,this.bb=t,this}},{key:"precision",value:function(){var e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}},{key:"scale",value:function(){var e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt32(this.bb_pos+e):0}}],[{key:"getRootAsDecimal",value:function(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}},{key:"startDecimal",value:function(e){e.startObject(2)}},{key:"addPrecision",value:function(e,t){e.addFieldInt32(0,t,0)}},{key:"addScale",value:function(e,t){e.addFieldInt32(1,t,0)}},{key:"endDecimal",value:function(e){return e.endObject()}},{key:"createDecimal",value:function(t,n,r){return e.startDecimal(t),e.addPrecision(t,n),e.addScale(t,r),e.endDecimal(t)}}]),e}();e.Decimal=t}(e.flatbuf||(e.flatbuf={}))}(e.arrow||(e.arrow={}))}(e.apache||(e.apache={}))}(Ft||(Ft={})),function(e){!function(t){!function(t){!function(t){var n=function(){function t(){Object(L.a)(this,t),this.bb=null,this.bb_pos=0}return Object(F.a)(t,[{key:"__init",value:function(e,t){return this.bb_pos=e,this.bb=t,this}},{key:"unit",value:function(){var t=this.bb.__offset(this.bb_pos,4);return t?this.bb.readInt16(this.bb_pos+t):e.apache.arrow.flatbuf.DateUnit.MILLISECOND}}],[{key:"getRootAsDate",value:function(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}},{key:"startDate",value:function(e){e.startObject(1)}},{key:"addUnit",value:function(t,n){t.addFieldInt16(0,n,e.apache.arrow.flatbuf.DateUnit.MILLISECOND)}},{key:"endDate",value:function(e){return e.endObject()}},{key:"createDate",value:function(e,n){return t.startDate(e),t.addUnit(e,n),t.endDate(e)}}]),t}();t.Date=n}(t.flatbuf||(t.flatbuf={}))}(t.arrow||(t.arrow={}))}(e.apache||(e.apache={}))}(Ft||(Ft={})),function(e){!function(t){!function(t){!function(t){var n=function(){function t(){Object(L.a)(this,t),this.bb=null,this.bb_pos=0}return Object(F.a)(t,[{key:"__init",value:function(e,t){return this.bb_pos=e,this.bb=t,this}},{key:"unit",value:function(){var t=this.bb.__offset(this.bb_pos,4);return t?this.bb.readInt16(this.bb_pos+t):e.apache.arrow.flatbuf.TimeUnit.MILLISECOND}},{key:"bitWidth",value:function(){var e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt32(this.bb_pos+e):32}}],[{key:"getRootAsTime",value:function(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}},{key:"startTime",value:function(e){e.startObject(2)}},{key:"addUnit",value:function(t,n){t.addFieldInt16(0,n,e.apache.arrow.flatbuf.TimeUnit.MILLISECOND)}},{key:"addBitWidth",value:function(e,t){e.addFieldInt32(1,t,32)}},{key:"endTime",value:function(e){return e.endObject()}},{key:"createTime",value:function(e,n,r){return t.startTime(e),t.addUnit(e,n),t.addBitWidth(e,r),t.endTime(e)}}]),t}();t.Time=n}(t.flatbuf||(t.flatbuf={}))}(t.arrow||(t.arrow={}))}(e.apache||(e.apache={}))}(Ft||(Ft={})),function(e){!function(t){!function(t){!function(t){var n=function(){function t(){Object(L.a)(this,t),this.bb=null,this.bb_pos=0}return Object(F.a)(t,[{key:"__init",value:function(e,t){return this.bb_pos=e,this.bb=t,this}},{key:"unit",value:function(){var t=this.bb.__offset(this.bb_pos,4);return t?this.bb.readInt16(this.bb_pos+t):e.apache.arrow.flatbuf.TimeUnit.SECOND}},{key:"timezone",value:function(e){var t=this.bb.__offset(this.bb_pos,6);return t?this.bb.__string(this.bb_pos+t,e):null}}],[{key:"getRootAsTimestamp",value:function(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}},{key:"startTimestamp",value:function(e){e.startObject(2)}},{key:"addUnit",value:function(t,n){t.addFieldInt16(0,n,e.apache.arrow.flatbuf.TimeUnit.SECOND)}},{key:"addTimezone",value:function(e,t){e.addFieldOffset(1,t,0)}},{key:"endTimestamp",value:function(e){return e.endObject()}},{key:"createTimestamp",value:function(e,n,r){return t.startTimestamp(e),t.addUnit(e,n),t.addTimezone(e,r),t.endTimestamp(e)}}]),t}();t.Timestamp=n}(t.flatbuf||(t.flatbuf={}))}(t.arrow||(t.arrow={}))}(e.apache||(e.apache={}))}(Ft||(Ft={})),function(e){!function(t){!function(t){!function(t){var n=function(){function t(){Object(L.a)(this,t),this.bb=null,this.bb_pos=0}return Object(F.a)(t,[{key:"__init",value:function(e,t){return this.bb_pos=e,this.bb=t,this}},{key:"unit",value:function(){var t=this.bb.__offset(this.bb_pos,4);return t?this.bb.readInt16(this.bb_pos+t):e.apache.arrow.flatbuf.IntervalUnit.YEAR_MONTH}}],[{key:"getRootAsInterval",value:function(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}},{key:"startInterval",value:function(e){e.startObject(1)}},{key:"addUnit",value:function(t,n){t.addFieldInt16(0,n,e.apache.arrow.flatbuf.IntervalUnit.YEAR_MONTH)}},{key:"endInterval",value:function(e){return e.endObject()}},{key:"createInterval",value:function(e,n){return t.startInterval(e),t.addUnit(e,n),t.endInterval(e)}}]),t}();t.Interval=n}(t.flatbuf||(t.flatbuf={}))}(t.arrow||(t.arrow={}))}(e.apache||(e.apache={}))}(Ft||(Ft={})),function(e){!function(t){!function(t){!function(t){var n=function(){function t(){Object(L.a)(this,t),this.bb=null,this.bb_pos=0}return Object(F.a)(t,[{key:"__init",value:function(e,t){return this.bb_pos=e,this.bb=t,this}},{key:"unit",value:function(){var t=this.bb.__offset(this.bb_pos,4);return t?this.bb.readInt16(this.bb_pos+t):e.apache.arrow.flatbuf.TimeUnit.MILLISECOND}}],[{key:"getRootAsDuration",value:function(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}},{key:"startDuration",value:function(e){e.startObject(1)}},{key:"addUnit",value:function(t,n){t.addFieldInt16(0,n,e.apache.arrow.flatbuf.TimeUnit.MILLISECOND)}},{key:"endDuration",value:function(e){return e.endObject()}},{key:"createDuration",value:function(e,n){return t.startDuration(e),t.addUnit(e,n),t.endDuration(e)}}]),t}();t.Duration=n}(t.flatbuf||(t.flatbuf={}))}(t.arrow||(t.arrow={}))}(e.apache||(e.apache={}))}(Ft||(Ft={})),function(e){!function(e){!function(e){!function(e){var t=function(){function e(){Object(L.a)(this,e),this.bb=null,this.bb_pos=0}return Object(F.a)(e,[{key:"__init",value:function(e,t){return this.bb_pos=e,this.bb=t,this}},{key:"key",value:function(e){var t=this.bb.__offset(this.bb_pos,4);return t?this.bb.__string(this.bb_pos+t,e):null}},{key:"value",value:function(e){var t=this.bb.__offset(this.bb_pos,6);return t?this.bb.__string(this.bb_pos+t,e):null}}],[{key:"getRootAsKeyValue",value:function(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}},{key:"startKeyValue",value:function(e){e.startObject(2)}},{key:"addKey",value:function(e,t){e.addFieldOffset(0,t,0)}},{key:"addValue",value:function(e,t){e.addFieldOffset(1,t,0)}},{key:"endKeyValue",value:function(e){return e.endObject()}},{key:"createKeyValue",value:function(t,n,r){return e.startKeyValue(t),e.addKey(t,n),e.addValue(t,r),e.endKeyValue(t)}}]),e}();e.KeyValue=t}(e.flatbuf||(e.flatbuf={}))}(e.arrow||(e.arrow={}))}(e.apache||(e.apache={}))}(Ft||(Ft={})),function(e){!function(t){!function(t){!function(t){var n=function(){function t(){Object(L.a)(this,t),this.bb=null,this.bb_pos=0}return Object(F.a)(t,[{key:"__init",value:function(e,t){return this.bb_pos=e,this.bb=t,this}},{key:"id",value:function(){var e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt64(this.bb_pos+e):this.bb.createLong(0,0)}},{key:"indexType",value:function(t){var n=this.bb.__offset(this.bb_pos,6);return n?(t||new e.apache.arrow.flatbuf.Int).__init(this.bb.__indirect(this.bb_pos+n),this.bb):null}},{key:"isOrdered",value:function(){var e=this.bb.__offset(this.bb_pos,8);return!!e&&!!this.bb.readInt8(this.bb_pos+e)}}],[{key:"getRootAsDictionaryEncoding",value:function(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}},{key:"startDictionaryEncoding",value:function(e){e.startObject(3)}},{key:"addId",value:function(e,t){e.addFieldInt64(0,t,e.createLong(0,0))}},{key:"addIndexType",value:function(e,t){e.addFieldOffset(1,t,0)}},{key:"addIsOrdered",value:function(e,t){e.addFieldInt8(2,+t,0)}},{key:"endDictionaryEncoding",value:function(e){return e.endObject()}},{key:"createDictionaryEncoding",value:function(e,n,r,i){return t.startDictionaryEncoding(e),t.addId(e,n),t.addIndexType(e,r),t.addIsOrdered(e,i),t.endDictionaryEncoding(e)}}]),t}();t.DictionaryEncoding=n}(t.flatbuf||(t.flatbuf={}))}(t.arrow||(t.arrow={}))}(e.apache||(e.apache={}))}(Ft||(Ft={})),function(e){!function(t){!function(t){!function(t){var n=function(){function t(){Object(L.a)(this,t),this.bb=null,this.bb_pos=0}return Object(F.a)(t,[{key:"__init",value:function(e,t){return this.bb_pos=e,this.bb=t,this}},{key:"name",value:function(e){var t=this.bb.__offset(this.bb_pos,4);return t?this.bb.__string(this.bb_pos+t,e):null}},{key:"nullable",value:function(){var e=this.bb.__offset(this.bb_pos,6);return!!e&&!!this.bb.readInt8(this.bb_pos+e)}},{key:"typeType",value:function(){var t=this.bb.__offset(this.bb_pos,8);return t?this.bb.readUint8(this.bb_pos+t):e.apache.arrow.flatbuf.Type.NONE}},{key:"type",value:function(e){var t=this.bb.__offset(this.bb_pos,10);return t?this.bb.__union(e,this.bb_pos+t):null}},{key:"dictionary",value:function(t){var n=this.bb.__offset(this.bb_pos,12);return n?(t||new e.apache.arrow.flatbuf.DictionaryEncoding).__init(this.bb.__indirect(this.bb_pos+n),this.bb):null}},{key:"children",value:function(t,n){var r=this.bb.__offset(this.bb_pos,14);return r?(n||new e.apache.arrow.flatbuf.Field).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+r)+4*t),this.bb):null}},{key:"childrenLength",value:function(){var e=this.bb.__offset(this.bb_pos,14);return e?this.bb.__vector_len(this.bb_pos+e):0}},{key:"customMetadata",value:function(t,n){var r=this.bb.__offset(this.bb_pos,16);return r?(n||new e.apache.arrow.flatbuf.KeyValue).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+r)+4*t),this.bb):null}},{key:"customMetadataLength",value:function(){var e=this.bb.__offset(this.bb_pos,16);return e?this.bb.__vector_len(this.bb_pos+e):0}}],[{key:"getRootAsField",value:function(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}},{key:"startField",value:function(e){e.startObject(7)}},{key:"addName",value:function(e,t){e.addFieldOffset(0,t,0)}},{key:"addNullable",value:function(e,t){e.addFieldInt8(1,+t,0)}},{key:"addTypeType",value:function(t,n){t.addFieldInt8(2,n,e.apache.arrow.flatbuf.Type.NONE)}},{key:"addType",value:function(e,t){e.addFieldOffset(3,t,0)}},{key:"addDictionary",value:function(e,t){e.addFieldOffset(4,t,0)}},{key:"addChildren",value:function(e,t){e.addFieldOffset(5,t,0)}},{key:"createChildrenVector",value:function(e,t){e.startVector(4,t.length,4);for(var n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}},{key:"startChildrenVector",value:function(e,t){e.startVector(4,t,4)}},{key:"addCustomMetadata",value:function(e,t){e.addFieldOffset(6,t,0)}},{key:"createCustomMetadataVector",value:function(e,t){e.startVector(4,t.length,4);for(var n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}},{key:"startCustomMetadataVector",value:function(e,t){e.startVector(4,t,4)}},{key:"endField",value:function(e){return e.endObject()}},{key:"createField",value:function(e,n,r,i,a,o,u,s){return t.startField(e),t.addName(e,n),t.addNullable(e,r),t.addTypeType(e,i),t.addType(e,a),t.addDictionary(e,o),t.addChildren(e,u),t.addCustomMetadata(e,s),t.endField(e)}}]),t}();t.Field=n}(t.flatbuf||(t.flatbuf={}))}(t.arrow||(t.arrow={}))}(e.apache||(e.apache={}))}(Ft||(Ft={})),function(e){!function(e){!function(e){!function(e){var t=function(){function e(){Object(L.a)(this,e),this.bb=null,this.bb_pos=0}return Object(F.a)(e,[{key:"__init",value:function(e,t){return this.bb_pos=e,this.bb=t,this}},{key:"offset",value:function(){return this.bb.readInt64(this.bb_pos)}},{key:"length",value:function(){return this.bb.readInt64(this.bb_pos+8)}}],[{key:"createBuffer",value:function(e,t,n){return e.prep(8,16),e.writeInt64(n),e.writeInt64(t),e.offset()}}]),e}();e.Buffer=t}(e.flatbuf||(e.flatbuf={}))}(e.arrow||(e.arrow={}))}(e.apache||(e.apache={}))}(Ft||(Ft={})),function(e){!function(t){!function(t){!function(t){var n=function(){function t(){Object(L.a)(this,t),this.bb=null,this.bb_pos=0}return Object(F.a)(t,[{key:"__init",value:function(e,t){return this.bb_pos=e,this.bb=t,this}},{key:"endianness",value:function(){var t=this.bb.__offset(this.bb_pos,4);return t?this.bb.readInt16(this.bb_pos+t):e.apache.arrow.flatbuf.Endianness.Little}},{key:"fields",value:function(t,n){var r=this.bb.__offset(this.bb_pos,6);return r?(n||new e.apache.arrow.flatbuf.Field).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+r)+4*t),this.bb):null}},{key:"fieldsLength",value:function(){var e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}},{key:"customMetadata",value:function(t,n){var r=this.bb.__offset(this.bb_pos,8);return r?(n||new e.apache.arrow.flatbuf.KeyValue).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+r)+4*t),this.bb):null}},{key:"customMetadataLength",value:function(){var e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}}],[{key:"getRootAsSchema",value:function(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}},{key:"startSchema",value:function(e){e.startObject(3)}},{key:"addEndianness",value:function(t,n){t.addFieldInt16(0,n,e.apache.arrow.flatbuf.Endianness.Little)}},{key:"addFields",value:function(e,t){e.addFieldOffset(1,t,0)}},{key:"createFieldsVector",value:function(e,t){e.startVector(4,t.length,4);for(var n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}},{key:"startFieldsVector",value:function(e,t){e.startVector(4,t,4)}},{key:"addCustomMetadata",value:function(e,t){e.addFieldOffset(2,t,0)}},{key:"createCustomMetadataVector",value:function(e,t){e.startVector(4,t.length,4);for(var n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}},{key:"startCustomMetadataVector",value:function(e,t){e.startVector(4,t,4)}},{key:"endSchema",value:function(e){return e.endObject()}},{key:"finishSchemaBuffer",value:function(e,t){e.finish(t)}},{key:"createSchema",value:function(e,n,r,i){return t.startSchema(e),t.addEndianness(e,n),t.addFields(e,r),t.addCustomMetadata(e,i),t.endSchema(e)}}]),t}();t.Schema=n}(t.flatbuf||(t.flatbuf={}))}(t.arrow||(t.arrow={}))}(e.apache||(e.apache={}))}(Ft||(Ft={})),function(e){!function(e){!function(e){!function(e){e.Schema=Ft.apache.arrow.flatbuf.Schema}(e.flatbuf||(e.flatbuf={}))}(e.arrow||(e.arrow={}))}(e.apache||(e.apache={}))}(Rt||(Rt={})),function(e){!function(e){!function(e){!function(e){!function(e){e[e.NONE=0]="NONE",e[e.Schema=1]="Schema",e[e.DictionaryBatch=2]="DictionaryBatch",e[e.RecordBatch=3]="RecordBatch",e[e.Tensor=4]="Tensor",e[e.SparseTensor=5]="SparseTensor"}(e.MessageHeader||(e.MessageHeader={}))}(e.flatbuf||(e.flatbuf={}))}(e.arrow||(e.arrow={}))}(e.apache||(e.apache={}))}(Rt||(Rt={})),function(e){!function(e){!function(e){!function(e){var t=function(){function e(){Object(L.a)(this,e),this.bb=null,this.bb_pos=0}return Object(F.a)(e,[{key:"__init",value:function(e,t){return this.bb_pos=e,this.bb=t,this}},{key:"length",value:function(){return this.bb.readInt64(this.bb_pos)}},{key:"nullCount",value:function(){return this.bb.readInt64(this.bb_pos+8)}}],[{key:"createFieldNode",value:function(e,t,n){return e.prep(8,16),e.writeInt64(n),e.writeInt64(t),e.offset()}}]),e}();e.FieldNode=t}(e.flatbuf||(e.flatbuf={}))}(e.arrow||(e.arrow={}))}(e.apache||(e.apache={}))}(Rt||(Rt={})),function(e){!function(t){!function(t){!function(t){var n=function(){function t(){Object(L.a)(this,t),this.bb=null,this.bb_pos=0}return Object(F.a)(t,[{key:"__init",value:function(e,t){return this.bb_pos=e,this.bb=t,this}},{key:"length",value:function(){var e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt64(this.bb_pos+e):this.bb.createLong(0,0)}},{key:"nodes",value:function(t,n){var r=this.bb.__offset(this.bb_pos,6);return r?(n||new e.apache.arrow.flatbuf.FieldNode).__init(this.bb.__vector(this.bb_pos+r)+16*t,this.bb):null}},{key:"nodesLength",value:function(){var e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}},{key:"buffers",value:function(e,t){var n=this.bb.__offset(this.bb_pos,8);return n?(t||new Ft.apache.arrow.flatbuf.Buffer).__init(this.bb.__vector(this.bb_pos+n)+16*e,this.bb):null}},{key:"buffersLength",value:function(){var e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}}],[{key:"getRootAsRecordBatch",value:function(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}},{key:"startRecordBatch",value:function(e){e.startObject(3)}},{key:"addLength",value:function(e,t){e.addFieldInt64(0,t,e.createLong(0,0))}},{key:"addNodes",value:function(e,t){e.addFieldOffset(1,t,0)}},{key:"startNodesVector",value:function(e,t){e.startVector(16,t,8)}},{key:"addBuffers",value:function(e,t){e.addFieldOffset(2,t,0)}},{key:"startBuffersVector",value:function(e,t){e.startVector(16,t,8)}},{key:"endRecordBatch",value:function(e){return e.endObject()}},{key:"createRecordBatch",value:function(e,n,r,i){return t.startRecordBatch(e),t.addLength(e,n),t.addNodes(e,r),t.addBuffers(e,i),t.endRecordBatch(e)}}]),t}();t.RecordBatch=n}(t.flatbuf||(t.flatbuf={}))}(t.arrow||(t.arrow={}))}(e.apache||(e.apache={}))}(Rt||(Rt={})),function(e){!function(t){!function(t){!function(t){var n=function(){function t(){Object(L.a)(this,t),this.bb=null,this.bb_pos=0}return Object(F.a)(t,[{key:"__init",value:function(e,t){return this.bb_pos=e,this.bb=t,this}},{key:"id",value:function(){var e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt64(this.bb_pos+e):this.bb.createLong(0,0)}},{key:"data",value:function(t){var n=this.bb.__offset(this.bb_pos,6);return n?(t||new e.apache.arrow.flatbuf.RecordBatch).__init(this.bb.__indirect(this.bb_pos+n),this.bb):null}},{key:"isDelta",value:function(){var e=this.bb.__offset(this.bb_pos,8);return!!e&&!!this.bb.readInt8(this.bb_pos+e)}}],[{key:"getRootAsDictionaryBatch",value:function(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}},{key:"startDictionaryBatch",value:function(e){e.startObject(3)}},{key:"addId",value:function(e,t){e.addFieldInt64(0,t,e.createLong(0,0))}},{key:"addData",value:function(e,t){e.addFieldOffset(1,t,0)}},{key:"addIsDelta",value:function(e,t){e.addFieldInt8(2,+t,0)}},{key:"endDictionaryBatch",value:function(e){return e.endObject()}},{key:"createDictionaryBatch",value:function(e,n,r,i){return t.startDictionaryBatch(e),t.addId(e,n),t.addData(e,r),t.addIsDelta(e,i),t.endDictionaryBatch(e)}}]),t}();t.DictionaryBatch=n}(t.flatbuf||(t.flatbuf={}))}(t.arrow||(t.arrow={}))}(e.apache||(e.apache={}))}(Rt||(Rt={})),function(e){!function(t){!function(t){!function(t){var n=function(){function t(){Object(L.a)(this,t),this.bb=null,this.bb_pos=0}return Object(F.a)(t,[{key:"__init",value:function(e,t){return this.bb_pos=e,this.bb=t,this}},{key:"version",value:function(){var e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Ft.apache.arrow.flatbuf.MetadataVersion.V1}},{key:"headerType",value:function(){var t=this.bb.__offset(this.bb_pos,6);return t?this.bb.readUint8(this.bb_pos+t):e.apache.arrow.flatbuf.MessageHeader.NONE}},{key:"header",value:function(e){var t=this.bb.__offset(this.bb_pos,8);return t?this.bb.__union(e,this.bb_pos+t):null}},{key:"bodyLength",value:function(){var e=this.bb.__offset(this.bb_pos,10);return e?this.bb.readInt64(this.bb_pos+e):this.bb.createLong(0,0)}},{key:"customMetadata",value:function(e,t){var n=this.bb.__offset(this.bb_pos,12);return n?(t||new Ft.apache.arrow.flatbuf.KeyValue).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+4*e),this.bb):null}},{key:"customMetadataLength",value:function(){var e=this.bb.__offset(this.bb_pos,12);return e?this.bb.__vector_len(this.bb_pos+e):0}}],[{key:"getRootAsMessage",value:function(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}},{key:"startMessage",value:function(e){e.startObject(5)}},{key:"addVersion",value:function(e,t){e.addFieldInt16(0,t,Ft.apache.arrow.flatbuf.MetadataVersion.V1)}},{key:"addHeaderType",value:function(t,n){t.addFieldInt8(1,n,e.apache.arrow.flatbuf.MessageHeader.NONE)}},{key:"addHeader",value:function(e,t){e.addFieldOffset(2,t,0)}},{key:"addBodyLength",value:function(e,t){e.addFieldInt64(3,t,e.createLong(0,0))}},{key:"addCustomMetadata",value:function(e,t){e.addFieldOffset(4,t,0)}},{key:"createCustomMetadataVector",value:function(e,t){e.startVector(4,t.length,4);for(var n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}},{key:"startCustomMetadataVector",value:function(e,t){e.startVector(4,t,4)}},{key:"endMessage",value:function(e){return e.endObject()}},{key:"finishMessageBuffer",value:function(e,t){e.finish(t)}},{key:"createMessage",value:function(e,n,r,i,a,o){return t.startMessage(e),t.addVersion(e,n),t.addHeaderType(e,r),t.addHeader(e,i),t.addBodyLength(e,a),t.addCustomMetadata(e,o),t.endMessage(e)}}]),t}();t.Message=n}(t.flatbuf||(t.flatbuf={}))}(t.arrow||(t.arrow={}))}(e.apache||(e.apache={}))}(Rt||(Rt={}));Ft.apache.arrow.flatbuf.Type;var Vt,Wt,$t=Ft.apache.arrow.flatbuf.DateUnit,Ht=Ft.apache.arrow.flatbuf.TimeUnit,Yt=Ft.apache.arrow.flatbuf.Precision,Kt=Ft.apache.arrow.flatbuf.UnionMode,Qt=Ft.apache.arrow.flatbuf.IntervalUnit,qt=Rt.apache.arrow.flatbuf.MessageHeader,Gt=Ft.apache.arrow.flatbuf.MetadataVersion;!function(e){e[e.NONE=0]="NONE",e[e.Null=1]="Null",e[e.Int=2]="Int",e[e.Float=3]="Float",e[e.Binary=4]="Binary",e[e.Utf8=5]="Utf8",e[e.Bool=6]="Bool",e[e.Decimal=7]="Decimal",e[e.Date=8]="Date",e[e.Time=9]="Time",e[e.Timestamp=10]="Timestamp",e[e.Interval=11]="Interval",e[e.List=12]="List",e[e.Struct=13]="Struct",e[e.Union=14]="Union",e[e.FixedSizeBinary=15]="FixedSizeBinary",e[e.FixedSizeList=16]="FixedSizeList",e[e.Map=17]="Map",e[e.Dictionary=-1]="Dictionary",e[e.Int8=-2]="Int8",e[e.Int16=-3]="Int16",e[e.Int32=-4]="Int32",e[e.Int64=-5]="Int64",e[e.Uint8=-6]="Uint8",e[e.Uint16=-7]="Uint16",e[e.Uint32=-8]="Uint32",e[e.Uint64=-9]="Uint64",e[e.Float16=-10]="Float16",e[e.Float32=-11]="Float32",e[e.Float64=-12]="Float64",e[e.DateDay=-13]="DateDay",e[e.DateMillisecond=-14]="DateMillisecond",e[e.TimestampSecond=-15]="TimestampSecond",e[e.TimestampMillisecond=-16]="TimestampMillisecond",e[e.TimestampMicrosecond=-17]="TimestampMicrosecond",e[e.TimestampNanosecond=-18]="TimestampNanosecond",e[e.TimeSecond=-19]="TimeSecond",e[e.TimeMillisecond=-20]="TimeMillisecond",e[e.TimeMicrosecond=-21]="TimeMicrosecond",e[e.TimeNanosecond=-22]="TimeNanosecond",e[e.DenseUnion=-23]="DenseUnion",e[e.SparseUnion=-24]="SparseUnion",e[e.IntervalDayTime=-25]="IntervalDayTime",e[e.IntervalYearMonth=-26]="IntervalYearMonth"}(Vt||(Vt={})),function(e){e[e.OFFSET=0]="OFFSET",e[e.DATA=1]="DATA",e[e.VALIDITY=2]="VALIDITY",e[e.TYPE=3]="TYPE"}(Wt||(Wt={}));var Jt=M.mark(rn);function Xt(e,t,n,r){return 0!==(n&1<>r}function en(e,t,n){return n?!!(e[t>>3]|=1<>3]&=~(1<0||n.byteLength>3):nn(rn(n,e,t,null,Xt)).subarray(0,r)),i}return n}function nn(e){var t,n=[],r=0,i=0,a=0,o=B(e);try{for(o.s();!(t=o.n()).done;){t.value&&(a|=1<0)&&(n[r++]=a);var u=new Uint8Array(n.length+7&-8);return u.set(n),u}function rn(e,t,n,r,i){var a,o,u,s,c;return M.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:a=t%8,o=t>>3,u=0,s=n;case 3:if(!(s>0)){l.next=11;break}c=e[o++];case 5:return l.next=7,i(r,u++,c,a);case 7:if(--s>0&&++a<8){l.next=5;break}case 8:a=0,l.next=3;break;case 11:case"end":return l.stop()}}),Jt)}function an(e,t,n){if(n-t<=0)return 0;if(n-t<8){var r,i=0,a=B(rn(e,t,n-t,e,Zt));try{for(a.s();!(r=a.n()).done;){i+=r.value}}catch(s){a.e(s)}finally{a.f()}return i}var o=n>>3<<3,u=t+(t%8===0?0:8-t%8);return an(e,t,u)+an(e,o,n)+on(e,u>>3,o-u>>3)}function on(e,t,n){for(var r=0,i=0|t,a=new DataView(e.buffer,e.byteOffset,e.byteLength),o=void 0===n?e.byteLength:i+n;o-i>=4;)r+=un(a.getUint32(i)),i+=4;for(;o-i>=2;)r+=un(a.getUint16(i)),i+=2;for(;o-i>=1;)r+=un(a.getUint8(i)),i+=1;return r}function un(e){var t=0|e;return 16843009*((t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135)>>>24}function sn(e){return function(e){if(Array.isArray(e))return E(e)}(e)||function(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||A(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var cn=function(){function e(){Object(L.a)(this,e)}return Object(F.a)(e,[{key:"visitMany",value:function(e){for(var t=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i1&&void 0!==arguments[1])||arguments[1];return ln(this,e,t)}},{key:"visitNull",value:function(e){return null}},{key:"visitBool",value:function(e){return null}},{key:"visitInt",value:function(e){return null}},{key:"visitFloat",value:function(e){return null}},{key:"visitUtf8",value:function(e){return null}},{key:"visitBinary",value:function(e){return null}},{key:"visitFixedSizeBinary",value:function(e){return null}},{key:"visitDate",value:function(e){return null}},{key:"visitTimestamp",value:function(e){return null}},{key:"visitTime",value:function(e){return null}},{key:"visitDecimal",value:function(e){return null}},{key:"visitList",value:function(e){return null}},{key:"visitStruct",value:function(e){return null}},{key:"visitUnion",value:function(e){return null}},{key:"visitDictionary",value:function(e){return null}},{key:"visitInterval",value:function(e){return null}},{key:"visitFixedSizeList",value:function(e){return null}},{key:"visitMap",value:function(e){return null}}]),e}();function ln(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=null,i=Vt.NONE;switch(t instanceof ar||t instanceof zt?i=fn(t.type):t instanceof xn?i=fn(t):"number"!==typeof(i=t)&&(i=Vt[t]),i){case Vt.Null:r=e.visitNull;break;case Vt.Bool:r=e.visitBool;break;case Vt.Int:r=e.visitInt;break;case Vt.Int8:r=e.visitInt8||e.visitInt;break;case Vt.Int16:r=e.visitInt16||e.visitInt;break;case Vt.Int32:r=e.visitInt32||e.visitInt;break;case Vt.Int64:r=e.visitInt64||e.visitInt;break;case Vt.Uint8:r=e.visitUint8||e.visitInt;break;case Vt.Uint16:r=e.visitUint16||e.visitInt;break;case Vt.Uint32:r=e.visitUint32||e.visitInt;break;case Vt.Uint64:r=e.visitUint64||e.visitInt;break;case Vt.Float:r=e.visitFloat;break;case Vt.Float16:r=e.visitFloat16||e.visitFloat;break;case Vt.Float32:r=e.visitFloat32||e.visitFloat;break;case Vt.Float64:r=e.visitFloat64||e.visitFloat;break;case Vt.Utf8:r=e.visitUtf8;break;case Vt.Binary:r=e.visitBinary;break;case Vt.FixedSizeBinary:r=e.visitFixedSizeBinary;break;case Vt.Date:r=e.visitDate;break;case Vt.DateDay:r=e.visitDateDay||e.visitDate;break;case Vt.DateMillisecond:r=e.visitDateMillisecond||e.visitDate;break;case Vt.Timestamp:r=e.visitTimestamp;break;case Vt.TimestampSecond:r=e.visitTimestampSecond||e.visitTimestamp;break;case Vt.TimestampMillisecond:r=e.visitTimestampMillisecond||e.visitTimestamp;break;case Vt.TimestampMicrosecond:r=e.visitTimestampMicrosecond||e.visitTimestamp;break;case Vt.TimestampNanosecond:r=e.visitTimestampNanosecond||e.visitTimestamp;break;case Vt.Time:r=e.visitTime;break;case Vt.TimeSecond:r=e.visitTimeSecond||e.visitTime;break;case Vt.TimeMillisecond:r=e.visitTimeMillisecond||e.visitTime;break;case Vt.TimeMicrosecond:r=e.visitTimeMicrosecond||e.visitTime;break;case Vt.TimeNanosecond:r=e.visitTimeNanosecond||e.visitTime;break;case Vt.Decimal:r=e.visitDecimal;break;case Vt.List:r=e.visitList;break;case Vt.Struct:r=e.visitStruct;break;case Vt.Union:r=e.visitUnion;break;case Vt.DenseUnion:r=e.visitDenseUnion||e.visitUnion;break;case Vt.SparseUnion:r=e.visitSparseUnion||e.visitUnion;break;case Vt.Dictionary:r=e.visitDictionary;break;case Vt.Interval:r=e.visitInterval;break;case Vt.IntervalDayTime:r=e.visitIntervalDayTime||e.visitInterval;break;case Vt.IntervalYearMonth:r=e.visitIntervalYearMonth||e.visitInterval;break;case Vt.FixedSizeList:r=e.visitFixedSizeList;break;case Vt.Map:r=e.visitMap}if("function"===typeof r)return r;if(!n)return function(){return null};throw new Error("Unrecognized type '".concat(Vt[i],"'"))}function fn(e){switch(e.typeId){case Vt.Null:return Vt.Null;case Vt.Int:var t=e.bitWidth,n=e.isSigned;switch(t){case 8:return n?Vt.Int8:Vt.Uint8;case 16:return n?Vt.Int16:Vt.Uint16;case 32:return n?Vt.Int32:Vt.Uint32;case 64:return n?Vt.Int64:Vt.Uint64}return Vt.Int;case Vt.Float:switch(e.precision){case Yt.HALF:return Vt.Float16;case Yt.SINGLE:return Vt.Float32;case Yt.DOUBLE:return Vt.Float64}return Vt.Float;case Vt.Binary:return Vt.Binary;case Vt.Utf8:return Vt.Utf8;case Vt.Bool:return Vt.Bool;case Vt.Decimal:return Vt.Decimal;case Vt.Time:switch(e.unit){case Ht.SECOND:return Vt.TimeSecond;case Ht.MILLISECOND:return Vt.TimeMillisecond;case Ht.MICROSECOND:return Vt.TimeMicrosecond;case Ht.NANOSECOND:return Vt.TimeNanosecond}return Vt.Time;case Vt.Timestamp:switch(e.unit){case Ht.SECOND:return Vt.TimestampSecond;case Ht.MILLISECOND:return Vt.TimestampMillisecond;case Ht.MICROSECOND:return Vt.TimestampMicrosecond;case Ht.NANOSECOND:return Vt.TimestampNanosecond}return Vt.Timestamp;case Vt.Date:switch(e.unit){case $t.DAY:return Vt.DateDay;case $t.MILLISECOND:return Vt.DateMillisecond}return Vt.Date;case Vt.Interval:switch(e.unit){case Qt.DAY_TIME:return Vt.IntervalDayTime;case Qt.YEAR_MONTH:return Vt.IntervalYearMonth}return Vt.Interval;case Vt.Map:return Vt.Map;case Vt.List:return Vt.List;case Vt.Struct:return Vt.Struct;case Vt.Union:switch(e.mode){case Kt.Dense:return Vt.DenseUnion;case Kt.Sparse:return Vt.SparseUnion}return Vt.Union;case Vt.FixedSizeBinary:return Vt.FixedSizeBinary;case Vt.FixedSizeList:return Vt.FixedSizeList;case Vt.Dictionary:return Vt.Dictionary}throw new Error("Unrecognized type '".concat(Vt[e.typeId],"'"))}cn.prototype.visitInt8=null,cn.prototype.visitInt16=null,cn.prototype.visitInt32=null,cn.prototype.visitInt64=null,cn.prototype.visitUint8=null,cn.prototype.visitUint16=null,cn.prototype.visitUint32=null,cn.prototype.visitUint64=null,cn.prototype.visitFloat16=null,cn.prototype.visitFloat32=null,cn.prototype.visitFloat64=null,cn.prototype.visitDateDay=null,cn.prototype.visitDateMillisecond=null,cn.prototype.visitTimestampSecond=null,cn.prototype.visitTimestampMillisecond=null,cn.prototype.visitTimestampMicrosecond=null,cn.prototype.visitTimestampNanosecond=null,cn.prototype.visitTimeSecond=null,cn.prototype.visitTimeMillisecond=null,cn.prototype.visitTimeMicrosecond=null,cn.prototype.visitTimeNanosecond=null,cn.prototype.visitDenseUnion=null,cn.prototype.visitSparseUnion=null,cn.prototype.visitIntervalDayTime=null,cn.prototype.visitIntervalYearMonth=null;var hn=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.apply(this,arguments)}return Object(F.a)(n,[{key:"compareSchemas",value:function(e,t){return e===t||t instanceof e.constructor&&On.compareFields(e.fields,t.fields)}},{key:"compareFields",value:function(e,t){return e===t||Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&e.every((function(e,n){return On.compareField(e,t[n])}))}},{key:"compareField",value:function(e,t){return e===t||t instanceof e.constructor&&e.name===t.name&&e.nullable===t.nullable&&On.visit(e.type,t.type)}}]),n}(cn);function dn(e,t){return t instanceof e.constructor}function pn(e,t){return e===t||dn(e,t)}function yn(e,t){return e===t||dn(e,t)&&e.bitWidth===t.bitWidth&&e.isSigned===t.isSigned}function vn(e,t){return e===t||dn(e,t)&&e.precision===t.precision}function bn(e,t){return e===t||dn(e,t)&&e.unit===t.unit}function mn(e,t){return e===t||dn(e,t)&&e.unit===t.unit&&e.timezone===t.timezone}function gn(e,t){return e===t||dn(e,t)&&e.unit===t.unit&&e.bitWidth===t.bitWidth}function kn(e,t){return e===t||dn(e,t)&&e.mode===t.mode&&e.typeIds.every((function(e,n){return e===t.typeIds[n]}))&&On.compareFields(e.children,t.children)}function wn(e,t){return e===t||dn(e,t)&&e.unit===t.unit}hn.prototype.visitNull=pn,hn.prototype.visitBool=pn,hn.prototype.visitInt=yn,hn.prototype.visitInt8=yn,hn.prototype.visitInt16=yn,hn.prototype.visitInt32=yn,hn.prototype.visitInt64=yn,hn.prototype.visitUint8=yn,hn.prototype.visitUint16=yn,hn.prototype.visitUint32=yn,hn.prototype.visitUint64=yn,hn.prototype.visitFloat=vn,hn.prototype.visitFloat16=vn,hn.prototype.visitFloat32=vn,hn.prototype.visitFloat64=vn,hn.prototype.visitUtf8=pn,hn.prototype.visitBinary=pn,hn.prototype.visitFixedSizeBinary=function(e,t){return e===t||dn(e,t)&&e.byteWidth===t.byteWidth},hn.prototype.visitDate=bn,hn.prototype.visitDateDay=bn,hn.prototype.visitDateMillisecond=bn,hn.prototype.visitTimestamp=mn,hn.prototype.visitTimestampSecond=mn,hn.prototype.visitTimestampMillisecond=mn,hn.prototype.visitTimestampMicrosecond=mn,hn.prototype.visitTimestampNanosecond=mn,hn.prototype.visitTime=gn,hn.prototype.visitTimeSecond=gn,hn.prototype.visitTimeMillisecond=gn,hn.prototype.visitTimeMicrosecond=gn,hn.prototype.visitTimeNanosecond=gn,hn.prototype.visitDecimal=pn,hn.prototype.visitList=function(e,t){return e===t||dn(e,t)&&e.children.length===t.children.length&&On.compareFields(e.children,t.children)},hn.prototype.visitStruct=function(e,t){return e===t||dn(e,t)&&e.children.length===t.children.length&&On.compareFields(e.children,t.children)},hn.prototype.visitUnion=kn,hn.prototype.visitDenseUnion=kn,hn.prototype.visitSparseUnion=kn,hn.prototype.visitDictionary=function(e,t){return e===t||dn(e,t)&&e.id===t.id&&e.isOrdered===t.isOrdered&&On.visit(e.indices,t.indices)&&On.visit(e.dictionary,t.dictionary)},hn.prototype.visitInterval=wn,hn.prototype.visitIntervalDayTime=wn,hn.prototype.visitIntervalYearMonth=wn,hn.prototype.visitFixedSizeList=function(e,t){return e===t||dn(e,t)&&e.listSize===t.listSize&&e.children.length===t.children.length&&On.compareFields(e.children,t.children)},hn.prototype.visitMap=function(e,t){return e===t||dn(e,t)&&e.keysSorted===t.keysSorted&&e.children.length===t.children.length&&On.compareFields(e.children,t.children)};var _n,On=new hn,xn=function(){function e(){Object(L.a)(this,e)}return Object(F.a)(e,[{key:"typeId",get:function(){return Vt.NONE}},{key:"compareTo",value:function(e){return On.visit(this,e)}}],[{key:"isNull",value:function(e){return e&&e.typeId===Vt.Null}},{key:"isInt",value:function(e){return e&&e.typeId===Vt.Int}},{key:"isFloat",value:function(e){return e&&e.typeId===Vt.Float}},{key:"isBinary",value:function(e){return e&&e.typeId===Vt.Binary}},{key:"isUtf8",value:function(e){return e&&e.typeId===Vt.Utf8}},{key:"isBool",value:function(e){return e&&e.typeId===Vt.Bool}},{key:"isDecimal",value:function(e){return e&&e.typeId===Vt.Decimal}},{key:"isDate",value:function(e){return e&&e.typeId===Vt.Date}},{key:"isTime",value:function(e){return e&&e.typeId===Vt.Time}},{key:"isTimestamp",value:function(e){return e&&e.typeId===Vt.Timestamp}},{key:"isInterval",value:function(e){return e&&e.typeId===Vt.Interval}},{key:"isList",value:function(e){return e&&e.typeId===Vt.List}},{key:"isStruct",value:function(e){return e&&e.typeId===Vt.Struct}},{key:"isUnion",value:function(e){return e&&e.typeId===Vt.Union}},{key:"isFixedSizeBinary",value:function(e){return e&&e.typeId===Vt.FixedSizeBinary}},{key:"isFixedSizeList",value:function(e){return e&&e.typeId===Vt.FixedSizeList}},{key:"isMap",value:function(e){return e&&e.typeId===Vt.Map}},{key:"isDictionary",value:function(e){return e&&e.typeId===Vt.Dictionary}}]),e}();xn[Symbol.toStringTag]=((_n=xn.prototype).children=null,_n.ArrayType=Array,_n[Symbol.toStringTag]="DataType");var jn=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.apply(this,arguments)}return Object(F.a)(n,[{key:"toString",value:function(){return"Null"}},{key:"typeId",get:function(){return Vt.Null}}]),n}(xn);jn[Symbol.toStringTag]=function(e){return e[Symbol.toStringTag]="Null"}(jn.prototype);var Sn=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(e,r){var i;return Object(L.a)(this,n),(i=t.call(this)).isSigned=e,i.bitWidth=r,i}return Object(F.a)(n,[{key:"typeId",get:function(){return Vt.Int}},{key:"ArrayType",get:function(){switch(this.bitWidth){case 8:return this.isSigned?Int8Array:Uint8Array;case 16:return this.isSigned?Int16Array:Uint16Array;case 32:case 64:return this.isSigned?Int32Array:Uint32Array}throw new Error("Unrecognized ".concat(this[Symbol.toStringTag]," type"))}},{key:"toString",value:function(){return"".concat(this.isSigned?"I":"Ui","nt").concat(this.bitWidth)}}]),n}(xn);Sn[Symbol.toStringTag]=function(e){return e.isSigned=null,e.bitWidth=null,e[Symbol.toStringTag]="Int"}(Sn.prototype);var Tn=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.call(this,!0,8)}return Object(F.a)(n)}(Sn),In=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.call(this,!0,16)}return Object(F.a)(n)}(Sn),En=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.call(this,!0,32)}return Object(F.a)(n)}(Sn),An=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.call(this,!0,64)}return Object(F.a)(n)}(Sn),Bn=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.call(this,!1,8)}return Object(F.a)(n)}(Sn),Dn=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.call(this,!1,16)}return Object(F.a)(n)}(Sn),Cn=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.call(this,!1,32)}return Object(F.a)(n)}(Sn),Ln=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.call(this,!1,64)}return Object(F.a)(n)}(Sn);Object.defineProperty(Tn.prototype,"ArrayType",{value:Int8Array}),Object.defineProperty(In.prototype,"ArrayType",{value:Int16Array}),Object.defineProperty(En.prototype,"ArrayType",{value:Int32Array}),Object.defineProperty(An.prototype,"ArrayType",{value:Int32Array}),Object.defineProperty(Bn.prototype,"ArrayType",{value:Uint8Array}),Object.defineProperty(Dn.prototype,"ArrayType",{value:Uint16Array}),Object.defineProperty(Cn.prototype,"ArrayType",{value:Uint32Array}),Object.defineProperty(Ln.prototype,"ArrayType",{value:Uint32Array});var Fn=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(e){var r;return Object(L.a)(this,n),(r=t.call(this)).precision=e,r}return Object(F.a)(n,[{key:"typeId",get:function(){return Vt.Float}},{key:"ArrayType",get:function(){switch(this.precision){case Yt.HALF:return Uint16Array;case Yt.SINGLE:return Float32Array;case Yt.DOUBLE:return Float64Array}throw new Error("Unrecognized ".concat(this[Symbol.toStringTag]," type"))}},{key:"toString",value:function(){return"Float".concat(this.precision<<5||16)}}]),n}(xn);Fn[Symbol.toStringTag]=function(e){return e.precision=null,e[Symbol.toStringTag]="Float"}(Fn.prototype);var Mn=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.call(this,Yt.HALF)}return Object(F.a)(n)}(Fn),Nn=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.call(this,Yt.SINGLE)}return Object(F.a)(n)}(Fn),Pn=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.call(this,Yt.DOUBLE)}return Object(F.a)(n)}(Fn);Object.defineProperty(Mn.prototype,"ArrayType",{value:Uint16Array}),Object.defineProperty(Nn.prototype,"ArrayType",{value:Float32Array}),Object.defineProperty(Pn.prototype,"ArrayType",{value:Float64Array});var Un=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.call(this)}return Object(F.a)(n,[{key:"typeId",get:function(){return Vt.Binary}},{key:"toString",value:function(){return"Binary"}}]),n}(xn);Un[Symbol.toStringTag]=function(e){return e.ArrayType=Uint8Array,e[Symbol.toStringTag]="Binary"}(Un.prototype);var Rn=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.call(this)}return Object(F.a)(n,[{key:"typeId",get:function(){return Vt.Utf8}},{key:"toString",value:function(){return"Utf8"}}]),n}(xn);Rn[Symbol.toStringTag]=function(e){return e.ArrayType=Uint8Array,e[Symbol.toStringTag]="Utf8"}(Rn.prototype);var zn=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.call(this)}return Object(F.a)(n,[{key:"typeId",get:function(){return Vt.Bool}},{key:"toString",value:function(){return"Bool"}}]),n}(xn);zn[Symbol.toStringTag]=function(e){return e.ArrayType=Uint8Array,e[Symbol.toStringTag]="Bool"}(zn.prototype);var Vn=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(e,r){var i;return Object(L.a)(this,n),(i=t.call(this)).scale=e,i.precision=r,i}return Object(F.a)(n,[{key:"typeId",get:function(){return Vt.Decimal}},{key:"toString",value:function(){return"Decimal[".concat(this.precision,"e").concat(this.scale>0?"+":"").concat(this.scale,"]")}}]),n}(xn);Vn[Symbol.toStringTag]=function(e){return e.scale=null,e.precision=null,e.ArrayType=Uint32Array,e[Symbol.toStringTag]="Decimal"}(Vn.prototype);var Wn=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(e){var r;return Object(L.a)(this,n),(r=t.call(this)).unit=e,r}return Object(F.a)(n,[{key:"typeId",get:function(){return Vt.Date}},{key:"toString",value:function(){return"Date".concat(32*(this.unit+1),"<").concat($t[this.unit],">")}}]),n}(xn);Wn[Symbol.toStringTag]=function(e){return e.unit=null,e.ArrayType=Int32Array,e[Symbol.toStringTag]="Date"}(Wn.prototype);var $n=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.call(this,$t.DAY)}return Object(F.a)(n)}(Wn),Hn=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.call(this,$t.MILLISECOND)}return Object(F.a)(n)}(Wn),Yn=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(e,r){var i;return Object(L.a)(this,n),(i=t.call(this)).unit=e,i.bitWidth=r,i}return Object(F.a)(n,[{key:"typeId",get:function(){return Vt.Time}},{key:"toString",value:function(){return"Time".concat(this.bitWidth,"<").concat(Ht[this.unit],">")}}]),n}(xn);Yn[Symbol.toStringTag]=function(e){return e.unit=null,e.bitWidth=null,e.ArrayType=Int32Array,e[Symbol.toStringTag]="Time"}(Yn.prototype);var Kn=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(e,r){var i;return Object(L.a)(this,n),(i=t.call(this)).unit=e,i.timezone=r,i}return Object(F.a)(n,[{key:"typeId",get:function(){return Vt.Timestamp}},{key:"toString",value:function(){return"Timestamp<".concat(Ht[this.unit]).concat(this.timezone?", ".concat(this.timezone):"",">")}}]),n}(xn);Kn[Symbol.toStringTag]=function(e){return e.unit=null,e.timezone=null,e.ArrayType=Int32Array,e[Symbol.toStringTag]="Timestamp"}(Kn.prototype);var Qn=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(e){var r;return Object(L.a)(this,n),(r=t.call(this)).unit=e,r}return Object(F.a)(n,[{key:"typeId",get:function(){return Vt.Interval}},{key:"toString",value:function(){return"Interval<".concat(Qt[this.unit],">")}}]),n}(xn);Qn[Symbol.toStringTag]=function(e){return e.unit=null,e.ArrayType=Int32Array,e[Symbol.toStringTag]="Interval"}(Qn.prototype);var qn=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(e){var r;return Object(L.a)(this,n),(r=t.call(this)).children=[e],r}return Object(F.a)(n,[{key:"typeId",get:function(){return Vt.List}},{key:"toString",value:function(){return"List<".concat(this.valueType,">")}},{key:"valueType",get:function(){return this.children[0].type}},{key:"valueField",get:function(){return this.children[0]}},{key:"ArrayType",get:function(){return this.valueType.ArrayType}}]),n}(xn);qn[Symbol.toStringTag]=function(e){return e.children=null,e[Symbol.toStringTag]="List"}(qn.prototype);var Gn=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(e){var r;return Object(L.a)(this,n),(r=t.call(this)).children=e,r}return Object(F.a)(n,[{key:"typeId",get:function(){return Vt.Struct}},{key:"toString",value:function(){return"Struct<{".concat(this.children.map((function(e){return"".concat(e.name,":").concat(e.type)})).join(", "),"}>")}}]),n}(xn);Gn[Symbol.toStringTag]=function(e){return e.children=null,e[Symbol.toStringTag]="Struct"}(Gn.prototype);var Jn=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(e,r,i){var a;return Object(L.a)(this,n),(a=t.call(this)).mode=e,a.children=i,a.typeIds=r=Int32Array.from(r),a.typeIdToChildIndex=r.reduce((function(e,t,n){return(e[t]=n)&&e||e}),Object.create(null)),a}return Object(F.a)(n,[{key:"typeId",get:function(){return Vt.Union}},{key:"toString",value:function(){return"".concat(this[Symbol.toStringTag],"<").concat(this.children.map((function(e){return"".concat(e.type)})).join(" | "),">")}}]),n}(xn);Jn[Symbol.toStringTag]=function(e){return e.mode=null,e.typeIds=null,e.children=null,e.typeIdToChildIndex=null,e.ArrayType=Int8Array,e[Symbol.toStringTag]="Union"}(Jn.prototype);var Xn=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(e){var r;return Object(L.a)(this,n),(r=t.call(this)).byteWidth=e,r}return Object(F.a)(n,[{key:"typeId",get:function(){return Vt.FixedSizeBinary}},{key:"toString",value:function(){return"FixedSizeBinary[".concat(this.byteWidth,"]")}}]),n}(xn);Xn[Symbol.toStringTag]=function(e){return e.byteWidth=null,e.ArrayType=Uint8Array,e[Symbol.toStringTag]="FixedSizeBinary"}(Xn.prototype);var Zn=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(e,r){var i;return Object(L.a)(this,n),(i=t.call(this)).listSize=e,i.children=[r],i}return Object(F.a)(n,[{key:"typeId",get:function(){return Vt.FixedSizeList}},{key:"valueType",get:function(){return this.children[0].type}},{key:"valueField",get:function(){return this.children[0]}},{key:"ArrayType",get:function(){return this.valueType.ArrayType}},{key:"toString",value:function(){return"FixedSizeList[".concat(this.listSize,"]<").concat(this.valueType,">")}}]),n}(xn);Zn[Symbol.toStringTag]=function(e){return e.children=null,e.listSize=null,e[Symbol.toStringTag]="FixedSizeList"}(Zn.prototype);var er=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Object(L.a)(this,n),(r=t.call(this)).children=[e],r.keysSorted=i,r}return Object(F.a)(n,[{key:"typeId",get:function(){return Vt.Map}},{key:"keyType",get:function(){return this.children[0].type.children[0].type}},{key:"valueType",get:function(){return this.children[0].type.children[1].type}},{key:"toString",value:function(){return"Map<{".concat(this.children[0].type.children.map((function(e){return"".concat(e.name,":").concat(e.type)})).join(", "),"}>")}}]),n}(xn);er[Symbol.toStringTag]=function(e){return e.children=null,e.keysSorted=null,e[Symbol.toStringTag]="Map_"}(er.prototype);var tr,nr=(tr=-1,function(){return++tr}),rr=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(e,r,i,a){var o;return Object(L.a)(this,n),(o=t.call(this)).indices=r,o.dictionary=e,o.isOrdered=a||!1,o.id=null==i?nr():"number"===typeof i?i:i.low,o}return Object(F.a)(n,[{key:"typeId",get:function(){return Vt.Dictionary}},{key:"children",get:function(){return this.dictionary.children}},{key:"valueType",get:function(){return this.dictionary}},{key:"ArrayType",get:function(){return this.dictionary.ArrayType}},{key:"toString",value:function(){return"Dictionary<".concat(this.indices,", ").concat(this.dictionary,">")}}]),n}(xn);function ir(e){var t=e;switch(e.typeId){case Vt.Decimal:return 4;case Vt.Timestamp:return 2;case Vt.Date:case Vt.Interval:return 1+t.unit;case Vt.Int:case Vt.Time:return+(t.bitWidth>32)+1;case Vt.FixedSizeList:return t.listSize;case Vt.FixedSizeBinary:return t.byteWidth;default:return 1}}rr[Symbol.toStringTag]=function(e){return e.id=null,e.indices=null,e.isOrdered=null,e.dictionary=null,e[Symbol.toStringTag]="Dictionary"}(rr.prototype);var ar=function(){function e(t,n,r,i,a,o,u){var s;Object(L.a)(this,e),this.type=t,this.dictionary=u,this.offset=Math.floor(Math.max(n||0,0)),this.length=Math.floor(Math.max(r||0,0)),this._nullCount=Math.floor(Math.max(i||0,-1)),this.childData=(o||[]).map((function(t){return t instanceof e?t:t.data})),a instanceof e?(this.stride=a.stride,this.values=a.values,this.typeIds=a.typeIds,this.nullBitmap=a.nullBitmap,this.valueOffsets=a.valueOffsets):(this.stride=ir(t),a&&((s=a[0])&&(this.valueOffsets=s),(s=a[1])&&(this.values=s),(s=a[2])&&(this.nullBitmap=s),(s=a[3])&&(this.typeIds=s)))}return Object(F.a)(e,[{key:"typeId",get:function(){return this.type.typeId}},{key:"ArrayType",get:function(){return this.type.ArrayType}},{key:"buffers",get:function(){return[this.valueOffsets,this.values,this.nullBitmap,this.typeIds]}},{key:"byteLength",get:function(){var e=0,t=this.valueOffsets,n=this.values,r=this.nullBitmap,i=this.typeIds;return t&&(e+=t.byteLength),n&&(e+=n.byteLength),r&&(e+=r.byteLength),i&&(e+=i.byteLength),this.childData.reduce((function(e,t){return e+t.byteLength}),e)}},{key:"nullCount",get:function(){var e,t=this._nullCount;return t<=-1&&(e=this.nullBitmap)&&(this._nullCount=t=this.length-an(e,this.offset,this.offset+this.length)),t}},{key:"clone",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.offset,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.length,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this._nullCount,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:this.childData;return new e(t,n,r,i,a,o,this.dictionary)}},{key:"slice",value:function(e,t){var n=this.stride,r=this.typeId,i=this.childData,a=+(0===this._nullCount)-1,o=16===r?n:1,u=this._sliceBuffers(e,t,n,r);return this.clone(this.type,this.offset+e,t,a,u,!i.length||this.valueOffsets?i:this._sliceChildren(i,o*e,o*t))}},{key:"_changeLengthAndBackfillNullBitmap",value:function(e){if(this.typeId===Vt.Null)return this.clone(this.type,0,e,0);var t=this.length,n=this.nullCount,r=new Uint8Array((e+63&-64)>>3).fill(255,0,t>>3);r[t>>3]=(1<0&&r.set(tn(this.offset,t,this.nullBitmap),0);var i=this.buffers;return i[Wt.VALIDITY]=r,this.clone(this.type,0,e,n+(e-t),i)}},{key:"_sliceBuffers",value:function(e,t,n,r){var i,a=this.buffers;return(i=a[Wt.TYPE])&&(a[Wt.TYPE]=i.subarray(e,e+t)),(i=a[Wt.OFFSET])&&(a[Wt.OFFSET]=i.subarray(e,e+t+1))||(i=a[Wt.DATA])&&(a[Wt.DATA]=6===r?i:i.subarray(n*e,n*(e+t))),a}},{key:"_sliceChildren",value:function(e,t,n){return e.map((function(e){return e.slice(t,n)}))}}],[{key:"new",value:function(t,n,r,i,a,o,u){switch(a instanceof e?a=a.buffers:a||(a=[]),t.typeId){case Vt.Null:return e.Null(t,n,r);case Vt.Int:return e.Int(t,n,r,i||0,a[Wt.VALIDITY],a[Wt.DATA]||[]);case Vt.Dictionary:return e.Dictionary(t,n,r,i||0,a[Wt.VALIDITY],a[Wt.DATA]||[],u);case Vt.Float:return e.Float(t,n,r,i||0,a[Wt.VALIDITY],a[Wt.DATA]||[]);case Vt.Bool:return e.Bool(t,n,r,i||0,a[Wt.VALIDITY],a[Wt.DATA]||[]);case Vt.Decimal:return e.Decimal(t,n,r,i||0,a[Wt.VALIDITY],a[Wt.DATA]||[]);case Vt.Date:return e.Date(t,n,r,i||0,a[Wt.VALIDITY],a[Wt.DATA]||[]);case Vt.Time:return e.Time(t,n,r,i||0,a[Wt.VALIDITY],a[Wt.DATA]||[]);case Vt.Timestamp:return e.Timestamp(t,n,r,i||0,a[Wt.VALIDITY],a[Wt.DATA]||[]);case Vt.Interval:return e.Interval(t,n,r,i||0,a[Wt.VALIDITY],a[Wt.DATA]||[]);case Vt.FixedSizeBinary:return e.FixedSizeBinary(t,n,r,i||0,a[Wt.VALIDITY],a[Wt.DATA]||[]);case Vt.Binary:return e.Binary(t,n,r,i||0,a[Wt.VALIDITY],a[Wt.OFFSET]||[],a[Wt.DATA]||[]);case Vt.Utf8:return e.Utf8(t,n,r,i||0,a[Wt.VALIDITY],a[Wt.OFFSET]||[],a[Wt.DATA]||[]);case Vt.List:return e.List(t,n,r,i||0,a[Wt.VALIDITY],a[Wt.OFFSET]||[],(o||[])[0]);case Vt.FixedSizeList:return e.FixedSizeList(t,n,r,i||0,a[Wt.VALIDITY],(o||[])[0]);case Vt.Struct:return e.Struct(t,n,r,i||0,a[Wt.VALIDITY],o||[]);case Vt.Map:return e.Map(t,n,r,i||0,a[Wt.VALIDITY],a[Wt.OFFSET]||[],(o||[])[0]);case Vt.Union:return e.Union(t,n,r,i||0,a[Wt.VALIDITY],a[Wt.TYPE]||[],a[Wt.OFFSET]||o,o)}throw new Error("Unrecognized typeId ".concat(t.typeId))}},{key:"Null",value:function(t,n,r){return new e(t,n,r,0)}},{key:"Int",value:function(t,n,r,i,a,o){return new e(t,n,r,i,[void 0,Ne(t.ArrayType,o),Ve(a)])}},{key:"Dictionary",value:function(t,n,r,i,a,o,u){return new e(t,n,r,i,[void 0,Ne(t.indices.ArrayType,o),Ve(a)],[],u)}},{key:"Float",value:function(t,n,r,i,a,o){return new e(t,n,r,i,[void 0,Ne(t.ArrayType,o),Ve(a)])}},{key:"Bool",value:function(t,n,r,i,a,o){return new e(t,n,r,i,[void 0,Ne(t.ArrayType,o),Ve(a)])}},{key:"Decimal",value:function(t,n,r,i,a,o){return new e(t,n,r,i,[void 0,Ne(t.ArrayType,o),Ve(a)])}},{key:"Date",value:function(t,n,r,i,a,o){return new e(t,n,r,i,[void 0,Ne(t.ArrayType,o),Ve(a)])}},{key:"Time",value:function(t,n,r,i,a,o){return new e(t,n,r,i,[void 0,Ne(t.ArrayType,o),Ve(a)])}},{key:"Timestamp",value:function(t,n,r,i,a,o){return new e(t,n,r,i,[void 0,Ne(t.ArrayType,o),Ve(a)])}},{key:"Interval",value:function(t,n,r,i,a,o){return new e(t,n,r,i,[void 0,Ne(t.ArrayType,o),Ve(a)])}},{key:"FixedSizeBinary",value:function(t,n,r,i,a,o){return new e(t,n,r,i,[void 0,Ne(t.ArrayType,o),Ve(a)])}},{key:"Binary",value:function(t,n,r,i,a,o,u){return new e(t,n,r,i,[Re(o),Ve(u),Ve(a)])}},{key:"Utf8",value:function(t,n,r,i,a,o,u){return new e(t,n,r,i,[Re(o),Ve(u),Ve(a)])}},{key:"List",value:function(t,n,r,i,a,o,u){return new e(t,n,r,i,[Re(o),void 0,Ve(a)],[u])}},{key:"FixedSizeList",value:function(t,n,r,i,a,o){return new e(t,n,r,i,[void 0,void 0,Ve(a)],[o])}},{key:"Struct",value:function(t,n,r,i,a,o){return new e(t,n,r,i,[void 0,void 0,Ve(a)],o)}},{key:"Map",value:function(t,n,r,i,a,o,u){return new e(t,n,r,i,[Re(o),void 0,Ve(a)],[u])}},{key:"Union",value:function(t,n,r,i,a,o,u,s){var c=[void 0,void 0,Ve(a),Ne(t.ArrayType,o)];return t.mode===Kt.Sparse?new e(t,n,r,i,c,u):(c[Wt.OFFSET]=Re(u),new e(t,n,r,i,c,s))}}]),e}();ar.prototype.childData=Object.freeze([]);function or(e){if(null===e)return"null";if(void 0===e)return"undefined";switch(typeof e){case"number":case"bigint":return"".concat(e);case"string":return'"'.concat(e,'"')}return"function"===typeof e[Symbol.toPrimitive]?e[Symbol.toPrimitive]("string"):ArrayBuffer.isView(e)?"[".concat(e,"]"):JSON.stringify(e)}function ur(e){if(!e||e.length<=0)return function(e){return!0};var t="",n=e.filter((function(e){return e===e}));return n.length>0&&(t="\n switch (x) {".concat(n.map((function(e){return"\n case ".concat(function(e){if("bigint"!==typeof e)return or(e);if(le)return"".concat(or(e),"n");return'"'.concat(or(e),'"')}(e),":")})).join(""),"\n return false;\n }")),e.length!==n.length&&(t="if (x !== x) return false;\n".concat(t)),new Function("x","".concat(t,"\nreturn true;"))}var sr=function(e,t){return(e*t+63&-64||64)/t},cr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.length>=t?e.subarray(0,t):Fe(new e.constructor(t),e,0)},lr=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;Object(L.a)(this,e),this.buffer=t,this.stride=n,this.BYTES_PER_ELEMENT=t.BYTES_PER_ELEMENT,this.ArrayType=t.constructor,this._resize(this.length=t.length/n|0)}return Object(F.a)(e,[{key:"byteLength",get:function(){return this.length*this.stride*this.BYTES_PER_ELEMENT|0}},{key:"reservedLength",get:function(){return this.buffer.length/this.stride}},{key:"reservedByteLength",get:function(){return this.buffer.byteLength}},{key:"set",value:function(e,t){return this}},{key:"append",value:function(e){return this.set(this.length,e)}},{key:"reserve",value:function(e){if(e>0){this.length+=e;var t=this.stride,n=this.length*t,r=this.buffer.length;n>=r&&this._resize(sr(0===r?1*n:2*n,this.BYTES_PER_ELEMENT))}return this}},{key:"flush",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.length;e=sr(e*this.stride,this.BYTES_PER_ELEMENT);var t=cr(this.buffer,e);return this.clear(),t}},{key:"clear",value:function(){return this.length=0,this._resize(0),this}},{key:"_resize",value:function(e){return this.buffer=Fe(new this.ArrayType(e),this.buffer)}}]),e}();lr.prototype.offset=0;var fr=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.apply(this,arguments)}return Object(F.a)(n,[{key:"last",value:function(){return this.get(this.length-1)}},{key:"get",value:function(e){return this.buffer[e]}},{key:"set",value:function(e,t){return this.reserve(e-this.length+1),this.buffer[e*this.stride]=t,this}}]),n}(lr),hr=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Uint8Array(0);return Object(L.a)(this,n),(e=t.call(this,r,1/8)).numValid=0,e}return Object(F.a)(n,[{key:"numInvalid",get:function(){return this.length-this.numValid}},{key:"get",value:function(e){return this.buffer[e>>3]>>e%8&1}},{key:"set",value:function(e,t){var n=this.reserve(e-this.length+1).buffer,r=e>>3,i=e%8,a=n[r]>>i&1;return t?0===a&&(n[r]|=1<0&&void 0!==arguments[0]?arguments[0]:new Int32Array(1);return Object(L.a)(this,n),t.call(this,e,1)}return Object(F.a)(n,[{key:"append",value:function(e){return this.set(this.length-1,e)}},{key:"set",value:function(e,t){var n=this.length-1,r=this.reserve(e-n+1).buffer;return n0&&void 0!==arguments[0]?arguments[0]:this.length-1;return e>this.length&&this.set(e-1,0),Lt(Object(Ct.a)(n.prototype),"flush",this).call(this,e+1)}}]),n}(fr),pr=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.apply(this,arguments)}return Object(F.a)(n,[{key:"ArrayType64",get:function(){return this._ArrayType64||(this._ArrayType64=this.buffer instanceof Int32Array?he:pe)}},{key:"set",value:function(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}},{key:"_resize",value:function(e){var t=Lt(Object(Ct.a)(n.prototype),"_resize",this).call(this,e),r=t.byteLength/(this.BYTES_PER_ELEMENT*this.stride);return le&&(this.buffer64=new this.ArrayType64(t.buffer,t.byteOffset,r)),t}}]),n}(lr);function yr(e){var t,n,r,i=2;for("undefined"!=typeof Symbol&&(n=Symbol.asyncIterator,r=Symbol.iterator);i--;){if(n&&null!=(t=e[n]))return t.call(e);if(r&&null!=(t=e[r]))return new vr(t.call(e));n="@@asyncIterator",r="@@iterator"}throw new TypeError("Object is not async iterable")}function vr(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then((function(e){return{value:e,done:t}}))}return(vr=function(e){this.s=e,this.n=e.next}).prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return void 0===n?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return void 0===n?Promise.reject(e):t(n.apply(this.s,arguments))}},new vr(e)}var br=function(){function e(t){var n=t.type,r=t.nullValues;Object(L.a)(this,e),this.length=0,this.finished=!1,this.type=n,this.children=[],this.nullValues=r,this.stride=ir(n),this._nulls=new hr,r&&r.length>0&&(this._isValid=ur(r))}return Object(F.a)(e,[{key:"toVector",value:function(){return zt.new(this.flush())}},{key:"ArrayType",get:function(){return this.type.ArrayType}},{key:"nullCount",get:function(){return this._nulls.numInvalid}},{key:"numChildren",get:function(){return this.children.length}},{key:"byteLength",get:function(){var 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((function(e,t){return e+t.byteLength}),e)}},{key:"reservedLength",get:function(){return this._nulls.reservedLength}},{key:"reservedByteLength",get:function(){var 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((function(e,t){return e+t.reservedByteLength}),e)}},{key:"valueOffsets",get:function(){return this._offsets?this._offsets.buffer:null}},{key:"values",get:function(){return this._values?this._values.buffer:null}},{key:"nullBitmap",get:function(){return this._nulls?this._nulls.buffer:null}},{key:"typeIds",get:function(){return this._typeIds?this._typeIds.buffer:null}},{key:"append",value:function(e){return this.set(this.length,e)}},{key:"isValid",value:function(e){return this._isValid(e)}},{key:"set",value:function(e,t){return this.setValid(e,this.isValid(t))&&this.setValue(e,t),this}},{key:"setValue",value:function(e,t){this._setValue(this,e,t)}},{key:"setValid",value:function(e,t){return this.length=this._nulls.set(e,+t).length,t}},{key:"addChild",value:function(e){arguments.length>1&&void 0!==arguments[1]||"".concat(this.numChildren);throw new Error('Cannot append children to non-nested type "'.concat(this.type,'"'))}},{key:"getChildAt",value:function(e){return this.children[e]||null}},{key:"flush",value:function(){var e=[],t=this._values,n=this._offsets,r=this._typeIds,i=this.length,a=this.nullCount;r?(e[Wt.TYPE]=r.flush(i),n&&(e[Wt.OFFSET]=n.flush(i))):n?(t&&(e[Wt.DATA]=t.flush(n.last())),e[Wt.OFFSET]=n.flush(i)):t&&(e[Wt.DATA]=t.flush(i)),a>0&&(e[Wt.VALIDITY]=this._nulls.flush(i));var o=ar.new(this.type,0,i,a,e,this.children.map((function(e){return e.flush()})));return this.clear(),o}},{key:"finish",value:function(){return this.finished=!0,this.children.forEach((function(e){return e.finish()})),this}},{key:"clear",value:function(){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((function(e){return e.clear()})),this}}],[{key:"new",value:function(e){}},{key:"throughNode",value:function(e){throw new Error('"throughNode" not available in this environment')}},{key:"throughDOM",value:function(e){throw new Error('"throughDOM" not available in this environment')}},{key:"throughIterable",value:function(e){return function(e){var t=e.queueingStrategy,n=void 0===t?"count":t,r=e.highWaterMark,i=void 0===r?"bytes"!==n?1e3:Math.pow(2,14):r,a="bytes"!==n?"length":"byteLength";return M.mark((function t(n){var r,o,u,s,c;return M.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=0,o=br.new(e),u=B(n),t.prev=3,u.s();case 5:if((s=u.n()).done){t.next=14;break}if(c=s.value,!(o.append(c)[a]>=i)){t.next=12;break}if(t.t0=++r,!t.t0){t.next=12;break}return t.next=12,o.toVector();case 12:t.next=5;break;case 14:t.next=19;break;case 16:t.prev=16,t.t1=t.catch(3),u.e(t.t1);case 19:return t.prev=19,u.f(),t.finish(19);case 22:if(!(o.finish().length>0||0===r)){t.next=25;break}return t.next=25,o.toVector();case 25:case"end":return t.stop()}}),t,null,[[3,16,19,22]])}))}(e)}},{key:"throughAsyncIterable",value:function(e){return function(e){var t=e.queueingStrategy,n=void 0===t?"count":t,r=e.highWaterMark,i=void 0===r?"bytes"!==n?1e3:Math.pow(2,14):r,a="bytes"!==n?"length":"byteLength";return function(){var t=z(M.mark((function t(n){var r,o,u,s,c,l,f,h;return M.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=0,o=br.new(e),u=!1,s=!1,t.prev=4,l=yr(n);case 6:return t.next=8,U(l.next());case 8:if(!(u=!(f=t.sent).done)){t.next=18;break}if(h=f.value,!(o.append(h)[a]>=i)){t.next=15;break}if(t.t0=++r,!t.t0){t.next=15;break}return t.next=15,o.toVector();case 15:u=!1,t.next=6;break;case 18:t.next=24;break;case 20:t.prev=20,t.t1=t.catch(4),s=!0,c=t.t1;case 24:if(t.prev=24,t.prev=25,!u||null==l.return){t.next=29;break}return t.next=29,U(l.return());case 29:if(t.prev=29,!s){t.next=32;break}throw c;case 32:return t.finish(29);case 33:return t.finish(24);case 34:if(!(o.finish().length>0||0===r)){t.next=37;break}return t.next=37,o.toVector();case 37:case"end":return t.stop()}}),t,null,[[4,20,24,34],[25,,29,33]])})));return function(e){return t.apply(this,arguments)}}()}(e)}}]),e}();br.prototype.length=1,br.prototype.stride=1,br.prototype.children=null,br.prototype.finished=!1,br.prototype.nullValues=null,br.prototype._isValid=function(){return!0};var mr=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(e){var r;return Object(L.a)(this,n),(r=t.call(this,e))._values=new fr(new r.ArrayType(0),r.stride),r}return Object(F.a)(n,[{key:"setValue",value:function(e,t){var r=this._values;return r.reserve(e-r.length+1),Lt(Object(Ct.a)(n.prototype),"setValue",this).call(this,e,t)}}]),n}(br),gr=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(e){var r;return Object(L.a)(this,n),(r=t.call(this,e))._pendingLength=0,r._offsets=new dr,r}return Object(F.a)(n,[{key:"setValue",value:function(e,t){var n=this._pending||(this._pending=new Map),r=n.get(e);r&&(this._pendingLength-=r.length),this._pendingLength+=t.length,n.set(e,t)}},{key:"setValid",value:function(e,t){return!!Lt(Object(Ct.a)(n.prototype),"setValid",this).call(this,e,t)||((this._pending||(this._pending=new Map)).set(e,void 0),!1)}},{key:"clear",value:function(){return this._pendingLength=0,this._pending=void 0,Lt(Object(Ct.a)(n.prototype),"clear",this).call(this)}},{key:"flush",value:function(){return this._flush(),Lt(Object(Ct.a)(n.prototype),"flush",this).call(this)}},{key:"finish",value:function(){return this._flush(),Lt(Object(Ct.a)(n.prototype),"finish",this).call(this)}},{key:"_flush",value:function(){var e=this._pending,t=this._pendingLength;return this._pendingLength=0,this._pending=void 0,e&&e.size>0&&this._flushPending(e,t),this}}]),n}(br);var kr=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(e){var r;return Object(L.a)(this,n),(r=t.call(this,e))._values=new hr,r}return Object(F.a)(n,[{key:"setValue",value:function(e,t){this._values.set(e,+t)}}]),n}(br),wr=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.apply(this,arguments)}return Object(F.a)(n,[{key:"setValue",value:function(e,t){}},{key:"setValid",value:function(e,t){return this.length=Math.max(e+1,this.length),t}}]),n}(br),_r=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.apply(this,arguments)}return Object(F.a)(n)}(mr),Or=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.apply(this,arguments)}return Object(F.a)(n)}(_r),xr=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.apply(this,arguments)}return Object(F.a)(n)}(_r),jr=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.apply(this,arguments)}return Object(F.a)(n)}(mr),Sr=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(e){var r,i=e.type,a=e.nullValues,o=e.dictionaryHashFunction;return Object(L.a)(this,n),(r=t.call(this,{type:new rr(i.dictionary,i.indices,i.id,i.isOrdered)}))._nulls=null,r._dictionaryOffset=0,r._keysToIndices=Object.create(null),r.indices=br.new({type:r.type.indices,nullValues:a}),r.dictionary=br.new({type:r.type.dictionary,nullValues:null}),"function"===typeof o&&(r.valueToKey=o),r}return Object(F.a)(n,[{key:"values",get:function(){return this.indices.values}},{key:"nullCount",get:function(){return this.indices.nullCount}},{key:"nullBitmap",get:function(){return this.indices.nullBitmap}},{key:"byteLength",get:function(){return this.indices.byteLength+this.dictionary.byteLength}},{key:"reservedLength",get:function(){return this.indices.reservedLength+this.dictionary.reservedLength}},{key:"reservedByteLength",get:function(){return this.indices.reservedByteLength+this.dictionary.reservedByteLength}},{key:"isValid",value:function(e){return this.indices.isValid(e)}},{key:"setValid",value:function(e,t){var n=this.indices;return t=n.setValid(e,t),this.length=n.length,t}},{key:"setValue",value:function(e,t){var n=this._keysToIndices,r=this.valueToKey(t),i=n[r];return void 0===i&&(n[r]=i=this._dictionaryOffset+this.dictionary.append(t).length-1),this.indices.setValue(e,i)}},{key:"flush",value:function(){var e=this.type,t=this._dictionary,n=this.dictionary.toVector(),r=this.indices.flush().clone(e);return r.dictionary=t?t.concat(n):n,this.finished||(this._dictionaryOffset+=n.length),this._dictionary=r.dictionary,this.clear(),r}},{key:"finish",value:function(){return this.indices.finish(),this.dictionary.finish(),this._dictionaryOffset=0,this._keysToIndices=Object.create(null),Lt(Object(Ct.a)(n.prototype),"finish",this).call(this)}},{key:"clear",value:function(){return this.indices.clear(),this.dictionary.clear(),Lt(Object(Ct.a)(n.prototype),"clear",this).call(this)}},{key:"valueToKey",value:function(e){return"string"===typeof e?e:"".concat(e)}}]),n}(br),Tr=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.apply(this,arguments)}return Object(F.a)(n)}(mr),Ir=new Float64Array(1),Er=new Uint32Array(Ir.buffer);function Ar(e){var t=(31744&e)>>10,n=(1023&e)/1024,r=Math.pow(-1,(32768&e)>>15);switch(t){case 31:return r*(n?NaN:1/0);case 0:return r*(n?6103515625e-14*n:0)}return r*Math.pow(2,t-15)*(1+n)}function Br(e){if(e!==e)return 32256;Ir[0]=e;var t=(2147483648&Er[1])>>16&65535,n=2146435072&Er[1],r=0;return n>=1089470464?Er[0]>0?n=31744:(n=(2080374784&n)>>16,r=(1048575&Er[1])>>10):n<=1056964608?(r=1048576+((r=1048576+(1048575&Er[1]))<<(n>>20)-998)>>21,n=0):(n=n-1056964608>>10,r=512+(1048575&Er[1])>>10),t|n|65535&r}var Dr=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.apply(this,arguments)}return Object(F.a)(n)}(mr),Cr=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.apply(this,arguments)}return Object(F.a)(n,[{key:"setValue",value:function(e,t){this._values.set(e,Br(t))}}]),n}(Dr),Lr=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.apply(this,arguments)}return Object(F.a)(n,[{key:"setValue",value:function(e,t){this._values.set(e,t)}}]),n}(Dr),Fr=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.apply(this,arguments)}return Object(F.a)(n,[{key:"setValue",value:function(e,t){this._values.set(e,t)}}]),n}(Dr),Mr=n(17),Nr=n(18);function Pr(e,t,n){return(Pr=Object(Nr.a)()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&Object(Mr.a)(i,n.prototype),i}).apply(null,arguments)}var Ur,Rr,zr=Symbol.for("isArrowBigNum");function Vr(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r>>=0),s+=(n>>>0)+t*Math.pow(c,32);return s}function Kr(e){var t="",n=new Uint32Array(2),r=new Uint16Array(e.buffer,e.byteOffset,e.byteLength/2),i=new Uint32Array((r=new Uint16Array(r).reverse()).buffer),a=-1,o=r.length-1;do{for(n[0]=r[a=0];a0&&void 0!==arguments[0]?arguments[0]:"default";switch(e){case"number":return Yr(this);case"string":return Ur(this);case"default":return Rr(this)}return Ur(this)},Object.setPrototypeOf(Wr.prototype,Object.create(Int32Array.prototype)),Object.setPrototypeOf($r.prototype,Object.create(Uint32Array.prototype)),Object.setPrototypeOf(Hr.prototype,Object.create(Uint32Array.prototype)),Object.assign(Wr.prototype,Vr.prototype,{constructor:Wr,signed:!0,TypedArray:Int32Array,BigIntArray:he}),Object.assign($r.prototype,Vr.prototype,{constructor:$r,signed:!1,TypedArray:Uint32Array,BigIntArray:pe}),Object.assign(Hr.prototype,Vr.prototype,{constructor:Hr,signed:!0,TypedArray:Uint32Array,BigIntArray:pe}),le?(Rr=function(e){return 8===e.byteLength?new e.BigIntArray(e.buffer,e.byteOffset,1)[0]:Kr(e)},Ur=function(e){return 8===e.byteLength?"".concat(new e.BigIntArray(e.buffer,e.byteOffset,1)[0]):Kr(e)}):Rr=Ur=Kr;var Qr,qr=function(){function e(t,n){return Object(L.a)(this,e),e.new(t,n)}return Object(F.a)(e,null,[{key:"new",value:function(e,t){switch(t){case!0:return new Wr(e);case!1:return new $r(e)}switch(e.constructor){case Int8Array:case Int16Array:case Int32Array:case he:return new Wr(e)}return 16===e.byteLength?new Hr(e):new $r(e)}},{key:"signed",value:function(e){return new Wr(e)}},{key:"unsigned",value:function(e){return new $r(e)}},{key:"decimal",value:function(e){return new Hr(e)}}]),e}(),Gr=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.apply(this,arguments)}return Object(F.a)(n,[{key:"setValue",value:function(e,t){this._values.set(e,t)}}]),n}(mr),Jr=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.apply(this,arguments)}return Object(F.a)(n)}(Gr),Xr=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.apply(this,arguments)}return Object(F.a)(n)}(Gr),Zr=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.apply(this,arguments)}return Object(F.a)(n)}(Gr),ei=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(e){var r;return Object(L.a)(this,n),e.nullValues&&(e.nullValues=e.nullValues.map(ai)),(r=t.call(this,e))._values=new pr(new Int32Array(0),2),r}return Object(F.a)(n,[{key:"values64",get:function(){return this._values.buffer64}},{key:"isValid",value:function(e){return Lt(Object(Ct.a)(n.prototype),"isValid",this).call(this,ai(e))}}]),n}(Gr),ti=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.apply(this,arguments)}return Object(F.a)(n)}(Gr),ni=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.apply(this,arguments)}return Object(F.a)(n)}(Gr),ri=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.apply(this,arguments)}return Object(F.a)(n)}(Gr),ii=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(e){var r;return Object(L.a)(this,n),e.nullValues&&(e.nullValues=e.nullValues.map(ai)),(r=t.call(this,e))._values=new pr(new Uint32Array(0),2),r}return Object(F.a)(n,[{key:"values64",get:function(){return this._values.buffer64}},{key:"isValid",value:function(e){return Lt(Object(Ct.a)(n.prototype),"isValid",this).call(this,ai(e))}}]),n}(Gr),ai=(Qr={BigIntArray:he},function(e){return ArrayBuffer.isView(e)&&(Qr.buffer=e.buffer,Qr.byteOffset=e.byteOffset,Qr.byteLength=e.byteLength,e=Rr(Qr),Qr.buffer=null),e}),oi=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.apply(this,arguments)}return Object(F.a)(n)}(mr),ui=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.apply(this,arguments)}return Object(F.a)(n)}(oi),si=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.apply(this,arguments)}return Object(F.a)(n)}(oi),ci=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.apply(this,arguments)}return Object(F.a)(n)}(oi),li=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.apply(this,arguments)}return Object(F.a)(n)}(oi),fi=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.apply(this,arguments)}return Object(F.a)(n)}(mr),hi=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.apply(this,arguments)}return Object(F.a)(n)}(fi),di=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.apply(this,arguments)}return Object(F.a)(n)}(fi),pi=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.apply(this,arguments)}return Object(F.a)(n)}(fi),yi=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.apply(this,arguments)}return Object(F.a)(n)}(fi),vi=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.apply(this,arguments)}return Object(F.a)(n)}(mr),bi=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.apply(this,arguments)}return Object(F.a)(n)}(vi),mi=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.apply(this,arguments)}return Object(F.a)(n)}(vi),gi=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(e){var r;return Object(L.a)(this,n),(r=t.call(this,e))._values=new lr(new Uint8Array(0)),r}return Object(F.a)(n,[{key:"byteLength",get:function(){var e=this._pendingLength+4*this.length;return this._offsets&&(e+=this._offsets.byteLength),this._values&&(e+=this._values.byteLength),this._nulls&&(e+=this._nulls.byteLength),e}},{key:"setValue",value:function(e,t){return Lt(Object(Ct.a)(n.prototype),"setValue",this).call(this,e,Ve(t))}},{key:"_flushPending",value:function(e,t){var n,r,i=this._offsets,a=this._values.reserve(t).buffer,o=0,u=0,s=0,c=B(e);try{for(c.s();!(r=c.n()).done;){var l=N(r.value,2);o=l[0],void 0===(n=l[1])?i.set(o,0):(u=n.length,a.set(n,s),i.set(o,u),s+=u)}}catch(f){c.e(f)}finally{c.f()}}}]),n}(gr),ki=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(e){var r;return Object(L.a)(this,n),(r=t.call(this,e))._values=new lr(new Uint8Array(0)),r}return Object(F.a)(n,[{key:"byteLength",get:function(){var e=this._pendingLength+4*this.length;return this._offsets&&(e+=this._offsets.byteLength),this._values&&(e+=this._values.byteLength),this._nulls&&(e+=this._nulls.byteLength),e}},{key:"setValue",value:function(e,t){return Lt(Object(Ct.a)(n.prototype),"setValue",this).call(this,e,te(t))}},{key:"_flushPending",value:function(e,t){}}]),n}(gr);ki.prototype._flushPending=gi.prototype._flushPending;var wi=function(){function e(){Object(L.a)(this,e)}return Object(F.a)(e,[{key:"length",get:function(){return this._values.length}},{key:"get",value:function(e){return this._values[e]}},{key:"clear",value:function(){return this._values=null,this}},{key:"bind",value:function(e){return e instanceof zt?e:(this._values=e,this)}}]),e}(),_i=n(11),Oi=n(10),xi=Symbol.for("parent"),ji=Symbol.for("rowIndex"),Si=Symbol.for("keyToIdx"),Ti=Symbol.for("idxToVal"),Ii=Symbol.for("nodejs.util.inspect.custom"),Ei=function(e){function t(e,n){Object(L.a)(this,t),this[xi]=e,this.size=n}return Object(F.a)(t,[{key:"entries",value:function(){return this[Symbol.iterator]()}},{key:"has",value:function(e){return void 0!==this.get(e)}},{key:"get",value:function(e){var t=void 0;if(null!==e&&void 0!==e){var n=this[Si]||(this[Si]=new Map),r=n.get(e);if(void 0!==r){var i=this[Ti]||(this[Ti]=new Array(this.size));void 0!==(t=i[r])||(i[r]=t=this.getValue(r))}else if((r=this.getIndex(e))>-1){n.set(e,r);var a=this[Ti]||(this[Ti]=new Array(this.size));void 0!==(t=a[r])||(a[r]=t=this.getValue(r))}}return t}},{key:"set",value:function(e,t){if(null!==e&&void 0!==e){var n=this[Si]||(this[Si]=new Map),r=n.get(e);if(void 0===r&&n.set(e,r=this.getIndex(e)),r>-1)(this[Ti]||(this[Ti]=new Array(this.size)))[r]=this.setValue(r,t)}return this}},{key:"clear",value:function(){throw new Error("Clearing ".concat(this[Symbol.toStringTag]," not supported."))}},{key:"delete",value:function(e){throw new Error("Deleting ".concat(this[Symbol.toStringTag]," values not supported."))}},{key:e,value:M.mark((function e(){var t,n,r,i,a,o,u,s,c;return M.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.keys(),n=this.values(),r=this[Si]||(this[Si]=new Map),i=this[Ti]||(this[Ti]=new Array(this.size)),u=0;case 5:if((s=t.next()).done||(c=n.next()).done){e.next=15;break}return a=s.value,o=c.value,i[u]=o,r.has(a)||r.set(a,u),e.next=12,[a,o];case 12:++u,e.next=5;break;case 15:case"end":return e.stop()}}),e,this)}))},{key:"forEach",value:function(e,t){for(var n,r,i,a,o=this.keys(),u=this.values(),s=void 0===t?e:function(n,r,i){return e.call(t,n,r,i)},c=this[Si]||(this[Si]=new Map),l=this[Ti]||(this[Ti]=new Array(this.size)),f=0;!(i=o.next()).done&&!(a=u.next()).done;++f)n=i.value,r=a.value,l[f]=r,c.has(n)||c.set(n,f),s(r,n,this)}},{key:"toArray",value:function(){return sn(this.values())}},{key:"toJSON",value:function(){var e={};return this.forEach((function(t,n){return e[n]=t})),e}},{key:"inspect",value:function(){return this.toString()}},{key:Ii,value:function(){return this.toString()}},{key:"toString",value:function(){var e=[];return this.forEach((function(t,n){n=or(n),t=or(t),e.push("".concat(n,": ").concat(t))})),"{ ".concat(e.join(", ")," }")}}]),t}(Symbol.iterator);Ei[Symbol.toStringTag]=function(e){var t;return Object.defineProperties(e,(At(t={size:{writable:!0,enumerable:!1,configurable:!1,value:0}},xi,{writable:!0,enumerable:!1,configurable:!1,value:null}),At(t,ji,{writable:!0,enumerable:!1,configurable:!1,value:-1}),t)),e[Symbol.toStringTag]="Row"}(Ei.prototype);var Ai=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(e){var r;return Object(L.a)(this,n),r=t.call(this,e,e.length),Object(_i.a)(r,Li(Object(Oi.a)(r)))}return Object(F.a)(n,[{key:"keys",value:function(){return this[xi].getChildAt(0)[Symbol.iterator]()}},{key:"values",value:function(){return this[xi].getChildAt(1)[Symbol.iterator]()}},{key:"getKey",value:function(e){return this[xi].getChildAt(0).get(e)}},{key:"getIndex",value:function(e){return this[xi].getChildAt(0).indexOf(e)}},{key:"getValue",value:function(e){return this[xi].getChildAt(1).get(e)}},{key:"setValue",value:function(e,t){this[xi].getChildAt(1).set(e,t)}}]),n}(Ei),Bi=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(e){var r;return Object(L.a)(this,n),r=t.call(this,e,e.type.children.length),Object(_i.a)(r,Ci(Object(Oi.a)(r)))}return Object(F.a)(n,[{key:"keys",value:M.mark((function e(){var t,n,r;return M.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=B(this[xi].type.children),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=9;break}return r=n.value,e.next=7,r.name;case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[1,11,14,17]])}))},{key:"values",value:M.mark((function e(){var t,n,r;return M.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=B(this[xi].type.children),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=9;break}return r=n.value,e.next=7,this[r.name];case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[1,11,14,17]])}))},{key:"getKey",value:function(e){return this[xi].type.children[e].name}},{key:"getIndex",value:function(e){return this[xi].type.children.findIndex((function(t){return t.name===e}))}},{key:"getValue",value:function(e){return this[xi].getChildAt(e).get(this[ji])}},{key:"setValue",value:function(e,t){return this[xi].getChildAt(e).set(this[ji],t)}}]),n}(Ei);Object.setPrototypeOf(Ei.prototype,Map.prototype);var Di,Ci=function(){var e={enumerable:!0,configurable:!1,get:null,set:null};return function(t){var n,r=-1,i=t[Si]||(t[Si]=new Map),a=function(e){return function(){return this.get(e)}},o=function(e){return function(t){return this.set(e,t)}},u=B(t.keys());try{for(u.s();!(n=u.n()).done;){var s=n.value;i.set(s,++r),e.get=a(s),e.set=o(s),t.hasOwnProperty(s)||(e.enumerable=!0,Object.defineProperty(t,s,e)),t.hasOwnProperty(r)||(e.enumerable=!1,Object.defineProperty(t,r,e))}}catch(c){u.e(c)}finally{u.f()}return e.get=e.set=null,t}}(),Li=function(){if("undefined"===typeof Proxy)return Ci;var e=Ei.prototype.has,t=Ei.prototype.get,n=Ei.prototype.set,r=Ei.prototype.getKey,i={isExtensible:function(){return!1},deleteProperty:function(){return!1},preventExtensions:function(){return!0},ownKeys:function(e){return sn(e.keys()).map((function(e){return"".concat(e)}))},has:function(e,t){switch(t){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 xi:case ji:case Ti:case Si:case Ii:return!0}return"number"!==typeof t||e.has(t)||(t=e.getKey(t)),e.has(t)},get:function(n,i,a){switch(i){case"getKey":case"getIndex":case"getValue":case"setValue":case"toArray":case"toJSON":case"inspect":case"constructor":case"isPrototypeOf":case"propertyIsEnumerable":case"toString":case"toLocaleString":case"valueOf":case"size":case"has":case"get":case"set":case"clear":case"delete":case"keys":case"values":case"entries":case"forEach":case"__proto__":case"__defineGetter__":case"__defineSetter__":case"hasOwnProperty":case"__lookupGetter__":case"__lookupSetter__":case Symbol.iterator:case Symbol.toStringTag:case xi:case ji:case Ti:case Si:case Ii:return Reflect.get(n,i,a)}return"number"!==typeof i||e.call(a,i)||(i=r.call(a,i)),t.call(a,i)},set:function(t,i,a,o){switch(i){case xi:case ji:case Ti:case Si:return Reflect.set(t,i,a,o);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"number"!==typeof i||e.call(o,i)||(i=r.call(o,i)),!!e.call(o,i)&&!!n.call(o,i,a)}};return function(e){return new Proxy(e,i)}}();function Fi(e,t,n){var r=e.length,i=t>-1?t:r+t%r;return n?n(e,i):i}function Mi(e,t,n,r){var i=e.length,a=void 0===i?0:i,o="number"!==typeof t?0:t,u="number"!==typeof n?a:n;return o<0&&(o=(o%a+a)%a),u<0&&(u=(u%a+a)%a),ua&&(u=a),r?r(e,o,u):[o,u]}var Ni=le?ce(0):0,Pi=function(e){return e!==e};function Ui(e){var t=typeof e;if("object"!==t||null===e)return Pi(e)?Pi:"bigint"!==t?function(t){return t===e}:function(t){return Ni+t===e};if(e instanceof Date){var n=e.valueOf();return function(e){return e instanceof Date&&e.valueOf()===n}}return ArrayBuffer.isView(e)?function(t){return!!t&&mt(e,t)}:e instanceof Map?function(e){var t=-1,n=[];return e.forEach((function(e){return n[++t]=Ui(e)})),Ri(n)}(e):Array.isArray(e)?function(e){for(var t=[],n=-1,r=e.length;++n1&&void 0!==arguments[1]?arguments[1]:[],a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Wi(i);return Object(L.a)(this,r),(t=n.call(this))._nullCount=-1,t._type=e,t._chunks=i,t._chunkOffsets=a,t._length=a[a.length-1],t._numChildren=(t._type.children||[]).length,t}return Object(F.a)(r,[{key:"type",get:function(){return this._type}},{key:"length",get:function(){return this._length}},{key:"chunks",get:function(){return this._chunks}},{key:"typeId",get:function(){return this._type.typeId}},{key:"VectorName",get:function(){return"Chunked<".concat(this._type,">")}},{key:"data",get:function(){return this._chunks[0]?this._chunks[0].data:null}},{key:"ArrayType",get:function(){return this._type.ArrayType}},{key:"numChildren",get:function(){return this._numChildren}},{key:"stride",get:function(){return this._chunks[0]?this._chunks[0].stride:1}},{key:"byteLength",get:function(){return this._chunks.reduce((function(e,t){return e+t.byteLength}),0)}},{key:"nullCount",get:function(){var e=this._nullCount;return e<0&&(this._nullCount=e=this._chunks.reduce((function(e,t){return e+t.nullCount}),0)),e}},{key:"indices",get:function(){if(xn.isDictionary(this._type)){if(!this._indices){var e=this._chunks;this._indices=1===e.length?e[0].indices:r.concat.apply(r,sn(e.map((function(e){return e.indices}))))}return this._indices}return null}},{key:"dictionary",get:function(){return xn.isDictionary(this._type)?this._chunks[this._chunks.length-1].data.dictionary:null}},{key:t,value:M.mark((function e(){var t,n,r;return M.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=B(this._chunks),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=8;break}return r=n.value,e.delegateYield(r,"t0",6);case 6:e.next=3;break;case 8:e.next=13;break;case 10:e.prev=10,e.t1=e.catch(1),t.e(e.t1);case 13:return e.prev=13,t.f(),e.finish(13);case 16:case"end":return e.stop()}}),e,this,[[1,10,13,16]])}))},{key:"clone",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._chunks;return new r(this._type,e)}},{key:"concat",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n=this._numChildren)return null;var t,n,i,a=this._children||(this._children=[]);return(t=a[e])?t:(n=(this._type.children||[])[e])&&(i=this._chunks.map((function(t){return t.getChildAt(e)})).filter((function(e){return null!=e}))).length>0?a[e]=new r(n.type,i):null}},{key:"search",value:function(e,t){var n=e,r=this._chunkOffsets,i=r.length-1;if(n<0)return null;if(n>=r[i])return null;if(i<=1)return t?t(this,0,n):[0,n];var a=0,o=0,u=0;do{if(a+1===i)return t?t(this,a,n-o):[a,n-o];n>=r[u=a+(i-a)/2|0]?a=u:i=u}while(n=(o=r[a]));return null}},{key:"isValid",value:function(e){return!!this.search(e,this.isValidInternal)}},{key:"get",value:function(e){return this.search(e,this.getInternal)}},{key:"set",value:function(e,t){this.search(e,(function(e,n,r){return e.chunks[n].set(r,t)}))}},{key:"indexOf",value:function(e,t){var n=this;return t&&"number"===typeof t?this.search(t,(function(t,r,i){return n.indexOfInternal(t,r,i,e)})):this.indexOfInternal(this,0,Math.max(0,t||0),e)}},{key:"toArray",value:function(){var e=this.chunks,t=e.length,n=this._type.ArrayType;if(t<=0)return new n(0);if(t<=1)return e[0].toArray();for(var r=0,i=new Array(t),a=-1;++a=n)break;if(!(t>=l+c))if(l>=t&&l+c<=n)r.push(s);else{var f=Math.max(0,t-l),h=Math.min(n-l,c);r.push(s.slice(f,h))}}return e.clone(r)}}],[{key:"flatten",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:[],a=arguments.length>2?arguments[2]:void 0;return Object(L.a)(this,n),i=Vi.flatten.apply(Vi,sn(i)),(r=t.call(this,e.type,i,a))._field=e,1!==i.length||Object(Oi.a)(r)instanceof Ki?r:Object(_i.a)(r,new Ki(e,i[0],r._chunkOffsets))}return Object(F.a)(n,[{key:"field",get:function(){return this._field}},{key:"name",get:function(){return this._field.name}},{key:"nullable",get:function(){return this._field.nullable}},{key:"metadata",get:function(){return this._field.metadata}},{key:"clone",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._chunks;return new n(this._field,e)}},{key:"getChildAt",value:function(e){if(e<0||e>=this.numChildren)return null;var t,r,i,a=this._children||(this._children=[]);return(t=a[e])?t:(r=(this.type.children||[])[e])&&(i=this._chunks.map((function(t){return t.getChildAt(e)})).filter((function(e){return null!=e}))).length>0?a[e]=new n(r,i):null}}],[{key:"new",value:function(e,t){for(var r=arguments.length,i=new Array(r>2?r-2:0),a=2;a0}))&&(e=e.clone({nullable:!0}));return new n(e,o)}}]),n}(Vi),Ki=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(e,r,i){var a;return Object(L.a)(this,n),(a=t.call(this,e,[r],i))._chunk=r,a}return Object(F.a)(n,[{key:"search",value:function(e,t){return t?t(this,0,e):[0,e]}},{key:"isValid",value:function(e){return this._chunk.isValid(e)}},{key:"get",value:function(e){return this._chunk.get(e)}},{key:"set",value:function(e,t){this._chunk.set(e,t)}},{key:"indexOf",value:function(e,t){return this._chunk.indexOf(e,t)}}]),n}(Yi),Qi=Array.isArray,qi=function(e,t){return ea(e,t,[],0)},Gi=function(e){var t=N(na(e,[[],[]]),2),n=t[0];return t[1].map((function(e,t){return e instanceof Yi?Yi.new(e.field.clone(n[t]),e):e instanceof zt?Yi.new(n[t],e):Yi.new(n[t],[])}))},Ji=function(e){return na(e,[[],[]])},Xi=function(e,t){return function e(t,n,r,i){var a,o=i,u=-1,s=n.length;for(;++u0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0;Object(L.a)(this,t),this.fields=e||[],this.metadata=n||new Map,r||(r=oa(e)),this.dictionaries=r}return Object(F.a)(t,[{key:e,get:function(){return"Schema"}},{key:"toString",value:function(){return"Schema<{ ".concat(this.fields.map((function(e,t){return"".concat(t,": ").concat(e)})).join(", ")," }>")}},{key:"compareTo",value:function(e){return On.compareSchemas(this,e)}},{key:"select",value:function(){for(var e=arguments.length,n=new Array(e),r=0;r2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3?arguments[3]:void 0;Object(L.a)(this,t),this.name=e,this.type=n,this.nullable=r,this.metadata=i||new Map}return Object(F.a)(t,[{key:"typeId",get:function(){return this.type.typeId}},{key:e,get:function(){return"Field"}},{key:"toString",value:function(){return"".concat(this.name,": ").concat(this.type)}},{key:"compareTo",value:function(e){return On.compareField(this,e)}},{key:"clone",value:function(){for(var e,n,r,i,a,o,u,s,c,l,f=arguments.length,h=new Array(f),d=0;d1&&void 0!==arguments[1]?arguments[1]:new Map,n=-1,r=e.length;++n0&&oa(a.children,t)}return t}ra.prototype.fields=null,ra.prototype.metadata=null,ra.prototype.dictionaries=null,ia.prototype.type=null,ia.prototype.name=null,ia.prototype.nullable=null,ia.prototype.metadata=null;var ua=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(e){var r;return Object(L.a)(this,n),(r=t.call(this,e))._run=new wi,r._offsets=new dr,r}return Object(F.a)(n,[{key:"addChild",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0";if(this.numChildren>0)throw new Error("ListBuilder can only have one child.");return this.children[this.numChildren]=e,this.type=new qn(new ia(t,e.type,!0)),this.numChildren-1}},{key:"clear",value:function(){return this._run.clear(),Lt(Object(Ct.a)(n.prototype),"clear",this).call(this)}},{key:"_flushPending",value:function(e){var t,n,r=this._run,i=this._offsets,a=this._setValue,o=0,u=B(e);try{for(u.s();!(n=u.n()).done;){var s=N(n.value,2);o=s[0],void 0===(t=s[1])?i.set(o,0):(i.set(o,t.length),a(this,o,r.bind(t)))}}catch(c){u.e(c)}finally{u.f()}}}]),n}(gr),sa=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){var e;return Object(L.a)(this,n),(e=t.apply(this,arguments))._run=new wi,e}return Object(F.a)(n,[{key:"setValue",value:function(e,t){Lt(Object(Ct.a)(n.prototype),"setValue",this).call(this,e,this._run.bind(t))}},{key:"addChild",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0";if(this.numChildren>0)throw new Error("FixedSizeListBuilder can only have one child.");var n=this.children.push(e);return this.type=new Zn(this.type.listSize,new ia(t,e.type,!0)),n}},{key:"clear",value:function(){return this._run.clear(),Lt(Object(Ct.a)(n.prototype),"clear",this).call(this)}}]),n}(br),ca=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.apply(this,arguments)}return Object(F.a)(n,[{key:"set",value:function(e,t){return Lt(Object(Ct.a)(n.prototype),"set",this).call(this,e,t)}},{key:"setValue",value:function(e,t){t=t instanceof Map?t:new Map(Object.entries(t));var n=this._pending||(this._pending=new Map),r=n.get(e);r&&(this._pendingLength-=r.size),this._pendingLength+=t.size,n.set(e,t)}},{key:"addChild",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"".concat(this.numChildren);if(this.numChildren>0)throw new Error("ListBuilder can only have one child.");return this.children[this.numChildren]=e,this.type=new er(new ia(t,e.type,!0),this.type.keysSorted),this.numChildren-1}},{key:"_flushPending",value:function(e){var t=this,n=this._offsets,r=this._setValue;e.forEach((function(e,i){void 0===e?n.set(i,0):(n.set(i,e.size),r(t,i,e))}))}}]),n}(gr),la=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.apply(this,arguments)}return Object(F.a)(n,[{key:"addChild",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"".concat(this.numChildren),n=this.children.push(e);return this.type=new Gn([].concat(sn(this.type.children),[new ia(t,e.type,!0)])),n}}]),n}(br),fa=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(e){var r;return Object(L.a)(this,n),(r=t.call(this,e))._typeIds=new fr(new Int8Array(0),1),"function"===typeof e.valueToChildTypeId&&(r._valueToChildTypeId=e.valueToChildTypeId),r}return Object(F.a)(n,[{key:"typeIdToChildIndex",get:function(){return this.type.typeIdToChildIndex}},{key:"append",value:function(e,t){return this.set(this.length,e,t)}},{key:"set",value:function(e,t,n){return void 0===n&&(n=this._valueToChildTypeId(this,t,e)),this.setValid(e,this.isValid(t))&&this.setValue(e,t,n),this}},{key:"setValue",value:function(e,t,r){this._typeIds.set(e,r),Lt(Object(Ct.a)(n.prototype),"setValue",this).call(this,e,t)}},{key:"addChild",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"".concat(this.children.length),n=this.children.push(e),r=this.type,i=r.children,a=r.mode,o=r.typeIds,u=[].concat(sn(i),[new ia(t,e.type)]);return this.type=new Jn(a,[].concat(sn(o),[n]),u),n}},{key:"_valueToChildTypeId",value:function(e,t,n){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.")}}]),n}(br),ha=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.apply(this,arguments)}return Object(F.a)(n)}(fa),da=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(e){var r;return Object(L.a)(this,n),(r=t.call(this,e))._offsets=new fr(new Int32Array(0)),r}return Object(F.a)(n,[{key:"setValue",value:function(e,t,r){var i=this.type.typeIdToChildIndex[r];return this._offsets.set(e,this.getChildAt(i).length),Lt(Object(Ct.a)(n.prototype),"setValue",this).call(this,e,t,r)}}]),n}(fa),pa=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.apply(this,arguments)}return Object(F.a)(n)}(cn),ya=function(e,t,n){e[t]=n%4294967296|0,e[t+1]=n/4294967296|0},va=function(e,t,n,r){var i=t[n],a=t[n+1];null!=i&&null!=a&&e.set(r.subarray(0,a-i),i)},ba=function(e,t,n){!function(e,t,n){e[t]=n/864e5|0}(e.values,t,n.valueOf())},ma=function(e,t,n){var r=e.values;ya(r,2*t,n.valueOf())},ga=function(e,t,n){var r=e.stride;e.values[r*t]=n},ka=function(e,t,n){var r=e.stride;e.values[r*t]=Br(n)},wa=function(e,t,n){switch(typeof n){case"bigint":e.values64[t]=n;break;case"number":e.values[t*e.stride]=n;break;default:var r=n,i=e.stride,a=Ne(e.ArrayType,r);e.values.set(a.subarray(0,i),i*t)}},_a=function(e,t,n){var r=e.values;return ya(r,2*t,n/1e3)},Oa=function(e,t,n){var r=e.values;return ya(r,2*t,n)},xa=function(e,t,n){return function(e,t,n){e[t]=1e3*n%4294967296|0,e[t+1]=1e3*n/4294967296|0}(e.values,2*t,n)},ja=function(e,t,n){return function(e,t,n){e[t]=1e6*n%4294967296|0,e[t+1]=1e6*n/4294967296|0}(e.values,2*t,n)},Sa=function(e,t,n){e.values[e.stride*t]=n},Ta=function(e,t,n){e.values[e.stride*t]=n},Ia=function(e,t,n){e.values.set(n.subarray(0,2),2*t)},Ea=function(e,t,n){e.values.set(n.subarray(0,2),2*t)},Aa=function(e,t,n){var r=e.typeIdToChildIndex[e.typeIds[t]],i=e.getChildAt(r);i&&i.set(e.valueOffsets[t],n)},Ba=function(e,t,n){var r=e.typeIdToChildIndex[e.typeIds[t]],i=e.getChildAt(r);i&&i.set(t,n)},Da=function(e,t,n){e.values.set(n.subarray(0,2),2*t)},Ca=function(e,t,n){e.values[t]=12*n[0]+n[1]%12};pa.prototype.visitBool=function(e,t,n){var r=e.offset,i=e.values,a=r+t;n?i[a>>3]|=1<>3]&=~(1<0){var i=t.children||[],a={nullValues:t.nullValues},o=Array.isArray(i)?function(e,t){return i[t]||a}:function(e){var t=e.name;return i[t]||a};n.children.forEach((function(t,n){var i=t.type,a=o(t,n);r.children.push(e(Dt(Dt({},a),{},{type:i})))}))}return r},Object.keys(Vt).map((function(e){return Vt[e]})).filter((function(e){return"number"===typeof e&&e!==Vt.NONE})).forEach((function(e){Ma.visit(e).prototype._setValue=Fa.getVisitFn(e)})),ki.prototype._setValue=Fa.visitBinary,function(e){!function(t){!function(t){!function(t){var n=function(){function t(){Object(L.a)(this,t),this.bb=null,this.bb_pos=0}return Object(F.a)(t,[{key:"__init",value:function(e,t){return this.bb_pos=e,this.bb=t,this}},{key:"version",value:function(){var e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Ft.apache.arrow.flatbuf.MetadataVersion.V1}},{key:"schema",value:function(e){var t=this.bb.__offset(this.bb_pos,6);return t?(e||new Ft.apache.arrow.flatbuf.Schema).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}},{key:"dictionaries",value:function(t,n){var r=this.bb.__offset(this.bb_pos,8);return r?(n||new e.apache.arrow.flatbuf.Block).__init(this.bb.__vector(this.bb_pos+r)+24*t,this.bb):null}},{key:"dictionariesLength",value:function(){var e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}},{key:"recordBatches",value:function(t,n){var r=this.bb.__offset(this.bb_pos,10);return r?(n||new e.apache.arrow.flatbuf.Block).__init(this.bb.__vector(this.bb_pos+r)+24*t,this.bb):null}},{key:"recordBatchesLength",value:function(){var e=this.bb.__offset(this.bb_pos,10);return e?this.bb.__vector_len(this.bb_pos+e):0}}],[{key:"getRootAsFooter",value:function(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}},{key:"startFooter",value:function(e){e.startObject(4)}},{key:"addVersion",value:function(e,t){e.addFieldInt16(0,t,Ft.apache.arrow.flatbuf.MetadataVersion.V1)}},{key:"addSchema",value:function(e,t){e.addFieldOffset(1,t,0)}},{key:"addDictionaries",value:function(e,t){e.addFieldOffset(2,t,0)}},{key:"startDictionariesVector",value:function(e,t){e.startVector(24,t,8)}},{key:"addRecordBatches",value:function(e,t){e.addFieldOffset(3,t,0)}},{key:"startRecordBatchesVector",value:function(e,t){e.startVector(24,t,8)}},{key:"endFooter",value:function(e){return e.endObject()}},{key:"finishFooterBuffer",value:function(e,t){e.finish(t)}},{key:"createFooter",value:function(e,n,r,i,a){return t.startFooter(e),t.addVersion(e,n),t.addSchema(e,r),t.addDictionaries(e,i),t.addRecordBatches(e,a),t.endFooter(e)}}]),t}();t.Footer=n}(t.flatbuf||(t.flatbuf={}))}(t.arrow||(t.arrow={}))}(e.apache||(e.apache={}))}(La||(La={})),function(e){!function(e){!function(e){!function(e){var t=function(){function e(){Object(L.a)(this,e),this.bb=null,this.bb_pos=0}return Object(F.a)(e,[{key:"__init",value:function(e,t){return this.bb_pos=e,this.bb=t,this}},{key:"offset",value:function(){return this.bb.readInt64(this.bb_pos)}},{key:"metaDataLength",value:function(){return this.bb.readInt32(this.bb_pos+8)}},{key:"bodyLength",value:function(){return this.bb.readInt64(this.bb_pos+16)}}],[{key:"createBlock",value:function(e,t,n,r){return e.prep(8,24),e.writeInt64(r),e.pad(4),e.writeInt32(n),e.writeInt64(t),e.offset()}}]),e}();e.Block=t}(e.flatbuf||(e.flatbuf={}))}(e.arrow||(e.arrow={}))}(e.apache||(e.apache={}))}(La||(La={}));var Na=W.Long,Pa=W.Builder,Ua=W.ByteBuffer,Ra=La.apache.arrow.flatbuf.Block,za=La.apache.arrow.flatbuf.Footer,Va=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Gt.V4,r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0;Object(L.a)(this,e),this.schema=t,this.version=n,r&&(this._recordBatches=r),i&&(this._dictionaryBatches=i)}return Object(F.a)(e,[{key:"numRecordBatches",get:function(){return this._recordBatches.length}},{key:"numDictionaries",get:function(){return this._dictionaryBatches.length}},{key:"recordBatches",value:M.mark((function e(){var t,n,r;return M.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=-1,r=this.numRecordBatches;case 1:if(!(++n=0&&e=0&&e=0&&e=0&&e0)return Lt(Object(Ct.a)(n.prototype),"write",this).call(this,e)}},{key:"toString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e?ee(this.toUint8Array(!0)):this.toUint8Array(!1).then(ee)}},{key:"toUint8Array",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return t?Me(this._values)[0]:C(M.mark((function t(){var n,r,i,a,o,u,s,c;return M.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=[],r=0,i=!1,a=!1,t.prev=3,u=Ha(e);case 5:return t.next=7,u.next();case 7:if(!(i=!(s=t.sent).done)){t.next=14;break}c=s.value,n.push(c),r+=c.byteLength;case 11:i=!1,t.next=5;break;case 14:t.next=20;break;case 16:t.prev=16,t.t0=t.catch(3),a=!0,o=t.t0;case 20:if(t.prev=20,t.prev=21,!i||null==u.return){t.next=25;break}return t.next=25,u.return();case 25:if(t.prev=25,!a){t.next=28;break}throw o;case 28:return t.finish(25);case 29:return t.finish(20);case 30:return t.abrupt("return",Me(n,r)[0]);case 31:case"end":return t.stop()}}),t,null,[[3,16,20,30],[21,,25,29]])})))()}}]),n}(ue),Qa=function(e){function t(e){Object(L.a)(this,t),e&&(this.source=new Ga(kt.fromIterable(e)))}return Object(F.a)(t,[{key:e,value:function(){return this}},{key:"next",value:function(e){return this.source.next(e)}},{key:"throw",value:function(e){return this.source.throw(e)}},{key:"return",value:function(e){return this.source.return(e)}},{key:"peek",value:function(e){return this.source.peek(e)}},{key:"read",value:function(e){return this.source.read(e)}}]),t}(Symbol.iterator),qa=function(e){function t(e){Object(L.a)(this,t),e instanceof t?this.source=e.source:e instanceof Ka?this.source=new Ja(kt.fromAsyncIterable(e)):Ee(e)?this.source=new Ja(kt.fromNodeStream(e)):Te(e)?this.source=new Ja(kt.fromDOMStream(e)):je(e)?this.source=new Ja(kt.fromDOMStream(e.body)):ke(e)?this.source=new Ja(kt.fromIterable(e)):(ge(e)||we(e))&&(this.source=new Ja(kt.fromAsyncIterable(e)))}return Object(F.a)(t,[{key:e,value:function(){return this}},{key:"next",value:function(e){return this.source.next(e)}},{key:"throw",value:function(e){return this.source.throw(e)}},{key:"return",value:function(e){return this.source.return(e)}},{key:"closed",get:function(){return this.source.closed}},{key:"cancel",value:function(e){return this.source.cancel(e)}},{key:"peek",value:function(e){return this.source.peek(e)}},{key:"read",value:function(e){return this.source.read(e)}}]),t}(Symbol.asyncIterator),Ga=function(){function e(t){Object(L.a)(this,e),this.source=t}return Object(F.a)(e,[{key:"cancel",value:function(e){this.return(e)}},{key:"peek",value:function(e){return this.next(e,"peek").value}},{key:"read",value:function(e){return this.next(e,"read").value}},{key:"next",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"read";return this.source.next({cmd:t,size:e})}},{key:"throw",value:function(e){return Object.create(this.source.throw&&this.source.throw(e)||ie)}},{key:"return",value:function(e){return Object.create(this.source.return&&this.source.return(e)||ie)}}]),e}(),Ja=function(){function e(t){var n=this;Object(L.a)(this,e),this.source=t,this._closedPromise=new Promise((function(e){return n._closedPromiseResolve=e}))}return Object(F.a)(e,[{key:"cancel",value:function(){var e=C(M.mark((function e(t){return M.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.return(t);case 2:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"closed",get:function(){return this._closedPromise}},{key:"read",value:function(){var e=C(M.mark((function e(t){return M.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.next(t,"read");case 2:return e.abrupt("return",e.sent.value);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"peek",value:function(){var e=C(M.mark((function e(t){return M.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.next(t,"peek");case 2:return e.abrupt("return",e.sent.value);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"next",value:function(){var e=C(M.mark((function e(t){var n,r=arguments;return M.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.length>1&&void 0!==r[1]?r[1]:"read",e.next=3,this.source.next({cmd:n,size:t});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"throw",value:function(){var e=C(M.mark((function e(t){var n;return M.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t1=this.source.throw,!e.t1){e.next=5;break}return e.next=4,this.source.throw(t);case 4:e.t1=e.sent;case 5:if(e.t0=e.t1,e.t0){e.next=8;break}e.t0=ie;case 8:return n=e.t0,this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,e.abrupt("return",Object.create(n));case 12:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"return",value:function(){var e=C(M.mark((function e(t){var n;return M.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t1=this.source.return,!e.t1){e.next=5;break}return e.next=4,this.source.return(t);case 4:e.t1=e.sent;case 5:if(e.t0=e.t1,e.t0){e.next=8;break}e.t0=ie;case 8:return n=e.t0,this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,e.abrupt("return",Object.create(n));case 12:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),e}(),Xa=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(e,r){var i;return Object(L.a)(this,n),(i=t.call(this)).position=0,i.buffer=Ve(e),i.size="undefined"===typeof r?i.buffer.byteLength:r,i}return Object(F.a)(n,[{key:"readInt32",value:function(e){var t=this.readAt(e,4),n=t.buffer,r=t.byteOffset;return new DataView(n,r).getInt32(0,!0)}},{key:"seek",value:function(e){return this.position=Math.min(e,this.size),e>>16,65535&this.buffer[1],this.buffer[0]>>>16,65535&this.buffer[0]]),n=new Uint32Array([e.buffer[1]>>>16,65535&e.buffer[1],e.buffer[0]>>>16,65535&e.buffer[0]]),r=t[3]*n[3];this.buffer[0]=65535&r;var i=r>>>16;return i+=r=t[2]*n[3],i+=r=t[3]*n[2]>>>0,this.buffer[0]+=i<<16,this.buffer[1]=i>>>0>>16,this.buffer[1]+=t[1]*n[3]+t[2]*n[2]+t[3]*n[1],this.buffer[1]+=t[0]*n[3]+t[1]*n[2]+t[2]*n[1]+t[3]*n[0]<<16,this}},{key:"_plus",value:function(e){var t=this.buffer[0]+e.buffer[0]>>>0;this.buffer[1]+=e.buffer[1],t>>0&&++this.buffer[1],this.buffer[0]=t}},{key:"lessThan",value:function(e){return this.buffer[1]1&&void 0!==arguments[1]?arguments[1]:new Uint32Array(2);return n.fromString("string"===typeof e?e:e.toString(),t)}},{key:"fromNumber",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Uint32Array(2);return n.fromString(e.toString(),t)}},{key:"fromString",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Uint32Array(2),r=e.length,i=new n(t),a=0;a1&&void 0!==arguments[1]?arguments[1]:new Uint32Array(2);return n.fromString("string"===typeof e?e:e.toString(),t)}},{key:"fromNumber",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Uint32Array(2);return n.fromString(e.toString(),t)}},{key:"fromString",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Uint32Array(2),r=e.startsWith("-"),i=e.length,a=new n(t),o=r?1:0;o>>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]>>0&&++t[1],t[1]>>0&&++t[2],t[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}},{key:"hex",value:function(){return"".concat(eo(this.buffer[3])," ").concat(eo(this.buffer[2])," ").concat(eo(this.buffer[1])," ").concat(eo(this.buffer[0]))}}],[{key:"multiply",value:function(t,n){return new e(new Uint32Array(t.buffer)).times(n)}},{key:"add",value:function(t,n){return new e(new Uint32Array(t.buffer)).plus(n)}},{key:"from",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Uint32Array(4);return e.fromString("string"===typeof t?t:t.toString(),n)}},{key:"fromNumber",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Uint32Array(4);return e.fromString(t.toString(),n)}},{key:"fromString",value:function(t){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Uint32Array(4),r=t.startsWith("-"),i=t.length,a=new e(n),o=r?1:0;o1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode(),n=t.length;return ar.Null(e,0,n)}},{key:"visitBool",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode(),n=t.length,r=t.nullCount;return ar.Bool(e,0,n,r,this.readNullBitmap(e,r),this.readData(e))}},{key:"visitInt",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode(),n=t.length,r=t.nullCount;return ar.Int(e,0,n,r,this.readNullBitmap(e,r),this.readData(e))}},{key:"visitFloat",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode(),n=t.length,r=t.nullCount;return ar.Float(e,0,n,r,this.readNullBitmap(e,r),this.readData(e))}},{key:"visitUtf8",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode(),n=t.length,r=t.nullCount;return ar.Utf8(e,0,n,r,this.readNullBitmap(e,r),this.readOffsets(e),this.readData(e))}},{key:"visitBinary",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode(),n=t.length,r=t.nullCount;return ar.Binary(e,0,n,r,this.readNullBitmap(e,r),this.readOffsets(e),this.readData(e))}},{key:"visitFixedSizeBinary",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode(),n=t.length,r=t.nullCount;return ar.FixedSizeBinary(e,0,n,r,this.readNullBitmap(e,r),this.readData(e))}},{key:"visitDate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode(),n=t.length,r=t.nullCount;return ar.Date(e,0,n,r,this.readNullBitmap(e,r),this.readData(e))}},{key:"visitTimestamp",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode(),n=t.length,r=t.nullCount;return ar.Timestamp(e,0,n,r,this.readNullBitmap(e,r),this.readData(e))}},{key:"visitTime",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode(),n=t.length,r=t.nullCount;return ar.Time(e,0,n,r,this.readNullBitmap(e,r),this.readData(e))}},{key:"visitDecimal",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode(),n=t.length,r=t.nullCount;return ar.Decimal(e,0,n,r,this.readNullBitmap(e,r),this.readData(e))}},{key:"visitList",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode(),n=t.length,r=t.nullCount;return ar.List(e,0,n,r,this.readNullBitmap(e,r),this.readOffsets(e),this.visit(e.children[0]))}},{key:"visitStruct",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode(),n=t.length,r=t.nullCount;return ar.Struct(e,0,n,r,this.readNullBitmap(e,r),this.visitMany(e.children))}},{key:"visitUnion",value:function(e){return e.mode===Kt.Sparse?this.visitSparseUnion(e):this.visitDenseUnion(e)}},{key:"visitDenseUnion",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode(),n=t.length,r=t.nullCount;return ar.Union(e,0,n,r,this.readNullBitmap(e,r),this.readTypeIds(e),this.readOffsets(e),this.visitMany(e.children))}},{key:"visitSparseUnion",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode(),n=t.length,r=t.nullCount;return ar.Union(e,0,n,r,this.readNullBitmap(e,r),this.readTypeIds(e),this.visitMany(e.children))}},{key:"visitDictionary",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode(),n=t.length,r=t.nullCount;return ar.Dictionary(e,0,n,r,this.readNullBitmap(e,r),this.readData(e.indices),this.readDictionary(e))}},{key:"visitInterval",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode(),n=t.length,r=t.nullCount;return ar.Interval(e,0,n,r,this.readNullBitmap(e,r),this.readData(e))}},{key:"visitFixedSizeList",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode(),n=t.length,r=t.nullCount;return ar.FixedSizeList(e,0,n,r,this.readNullBitmap(e,r),this.visit(e.children[0]))}},{key:"visitMap",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode(),n=t.length,r=t.nullCount;return ar.Map(e,0,n,r,this.readNullBitmap(e,r),this.readOffsets(e),this.visit(e.children[0]))}},{key:"nextFieldNode",value:function(){return this.nodes[++this.nodesIndex]}},{key:"nextBufferRange",value:function(){return this.buffers[++this.buffersIndex]}},{key:"readNullBitmap",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.nextBufferRange();return t>0&&this.readData(e,n)||new Uint8Array(0)}},{key:"readOffsets",value:function(e,t){return this.readData(e,t)}},{key:"readTypeIds",value:function(e,t){return this.readData(e,t)}},{key:"readData",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextBufferRange(),n=t.length,r=t.offset;return this.bytes.subarray(r,r+n)}},{key:"readDictionary",value:function(e){return this.dictionaries.get(e.id)}}]),n}(cn),uo=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(e,r,i,a){var o;return Object(L.a)(this,n),(o=t.call(this,new Uint8Array(0),r,i,a)).sources=e,o}return Object(F.a)(n,[{key:"readNullBitmap",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.nextBufferRange(),r=n.offset;return t<=0?new Uint8Array(0):nn(this.sources[r])}},{key:"readOffsets",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextBufferRange(),n=t.offset;return Ne(Uint8Array,Ne(Int32Array,this.sources[n]))}},{key:"readTypeIds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextBufferRange(),n=t.offset;return Ne(Uint8Array,Ne(e.ArrayType,this.sources[n]))}},{key:"readData",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextBufferRange(),n=t.offset,r=this.sources;return xn.isTimestamp(e)||(xn.isInt(e)||xn.isTime(e))&&64===e.bitWidth||xn.isDate(e)&&e.unit===$t.MILLISECOND?Ne(Uint8Array,io.convertArray(r[n])):xn.isDecimal(e)?Ne(Uint8Array,ao.convertArray(r[n])):xn.isBinary(e)||xn.isFixedSizeBinary(e)?so(r[n]):xn.isBool(e)?nn(r[n]):xn.isUtf8(e)?te(r[n].join("")):Ne(Uint8Array,Ne(e.ArrayType,r[n].map((function(e){return+e}))))}}]),n}(oo);function so(e){for(var t=e.join(""),n=new Uint8Array(t.length/2),r=0;r>1]=parseInt(t.substr(r,2),16);return n}var co=W.Long,lo=Ft.apache.arrow.flatbuf.Null,fo=Ft.apache.arrow.flatbuf.Int,ho=Ft.apache.arrow.flatbuf.FloatingPoint,po=Ft.apache.arrow.flatbuf.Binary,yo=Ft.apache.arrow.flatbuf.Bool,vo=Ft.apache.arrow.flatbuf.Utf8,bo=Ft.apache.arrow.flatbuf.Decimal,mo=Ft.apache.arrow.flatbuf.Date,go=Ft.apache.arrow.flatbuf.Time,ko=Ft.apache.arrow.flatbuf.Timestamp,wo=Ft.apache.arrow.flatbuf.Interval,_o=Ft.apache.arrow.flatbuf.List,Oo=Ft.apache.arrow.flatbuf.Struct_,xo=Ft.apache.arrow.flatbuf.Union,jo=Ft.apache.arrow.flatbuf.DictionaryEncoding,So=Ft.apache.arrow.flatbuf.FixedSizeBinary,To=Ft.apache.arrow.flatbuf.FixedSizeList,Io=Ft.apache.arrow.flatbuf.Map,Eo=new(function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.apply(this,arguments)}return Object(F.a)(n,[{key:"visit",value:function(e,t){return null==e||null==t?void 0:Lt(Object(Ct.a)(n.prototype),"visit",this).call(this,e,t)}},{key:"visitNull",value:function(e,t){return lo.startNull(t),lo.endNull(t)}},{key:"visitInt",value:function(e,t){return fo.startInt(t),fo.addBitWidth(t,e.bitWidth),fo.addIsSigned(t,e.isSigned),fo.endInt(t)}},{key:"visitFloat",value:function(e,t){return ho.startFloatingPoint(t),ho.addPrecision(t,e.precision),ho.endFloatingPoint(t)}},{key:"visitBinary",value:function(e,t){return po.startBinary(t),po.endBinary(t)}},{key:"visitBool",value:function(e,t){return yo.startBool(t),yo.endBool(t)}},{key:"visitUtf8",value:function(e,t){return vo.startUtf8(t),vo.endUtf8(t)}},{key:"visitDecimal",value:function(e,t){return bo.startDecimal(t),bo.addScale(t,e.scale),bo.addPrecision(t,e.precision),bo.endDecimal(t)}},{key:"visitDate",value:function(e,t){return mo.startDate(t),mo.addUnit(t,e.unit),mo.endDate(t)}},{key:"visitTime",value:function(e,t){return go.startTime(t),go.addUnit(t,e.unit),go.addBitWidth(t,e.bitWidth),go.endTime(t)}},{key:"visitTimestamp",value:function(e,t){var n=e.timezone&&t.createString(e.timezone)||void 0;return ko.startTimestamp(t),ko.addUnit(t,e.unit),void 0!==n&&ko.addTimezone(t,n),ko.endTimestamp(t)}},{key:"visitInterval",value:function(e,t){return wo.startInterval(t),wo.addUnit(t,e.unit),wo.endInterval(t)}},{key:"visitList",value:function(e,t){return _o.startList(t),_o.endList(t)}},{key:"visitStruct",value:function(e,t){return Oo.startStruct_(t),Oo.endStruct_(t)}},{key:"visitUnion",value:function(e,t){xo.startTypeIdsVector(t,e.typeIds.length);var n=xo.createTypeIdsVector(t,e.typeIds);return xo.startUnion(t),xo.addMode(t,e.mode),xo.addTypeIds(t,n),xo.endUnion(t)}},{key:"visitDictionary",value:function(e,t){var n=this.visit(e.indices,t);return jo.startDictionaryEncoding(t),jo.addId(t,new co(e.id,0)),jo.addIsOrdered(t,e.isOrdered),void 0!==n&&jo.addIndexType(t,n),jo.endDictionaryEncoding(t)}},{key:"visitFixedSizeBinary",value:function(e,t){return So.startFixedSizeBinary(t),So.addByteWidth(t,e.byteWidth),So.endFixedSizeBinary(t)}},{key:"visitFixedSizeList",value:function(e,t){return To.startFixedSizeList(t),To.addListSize(t,e.listSize),To.endFixedSizeList(t)}},{key:"visitMap",value:function(e,t){return Io.startMap(t),Io.addKeysSorted(t,e.keysSorted),Io.endMap(t)}}]),n}(cn));function Ao(e){return new Go(e.count,function e(t){return(t||[]).reduce((function(t,n){return[].concat(sn(t),[new Zo(n.count,(r=n.VALIDITY,(r||[]).reduce((function(e,t){return e+ +(0===t)}),0)))],sn(e(n.children)));var r}),[])}(e.columns),function e(t){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=-1,i=(t||[]).length;++r1&&void 0!==arguments[1]?arguments[1]:0;if(t instanceof ra)return new e(0,Gt.V4,qt.Schema,t);if(t instanceof Go)return new e(n,Gt.V4,qt.RecordBatch,t);if(t instanceof Jo)return new e(n,Gt.V4,qt.DictionaryBatch,t);throw new Error("Unrecognized Message header: ".concat(t))}}]),e}(),Go=function(){function e(t,n,r){Object(L.a)(this,e),this._nodes=n,this._buffers=r,this._length="number"===typeof t?t:t.low}return Object(F.a)(e,[{key:"nodes",get:function(){return this._nodes}},{key:"length",get:function(){return this._length}},{key:"buffers",get:function(){return this._buffers}}]),e}(),Jo=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];Object(L.a)(this,e),this._data=t,this._isDelta=r,this._id="number"===typeof n?n:n.low}return Object(F.a)(e,[{key:"id",get:function(){return this._id}},{key:"data",get:function(){return this._data}},{key:"isDelta",get:function(){return this._isDelta}},{key:"length",get:function(){return this.data.length}},{key:"nodes",get:function(){return this.data.nodes}},{key:"buffers",get:function(){return this.data.buffers}}]),e}(),Xo=Object(F.a)((function e(t,n){Object(L.a)(this,e),this.offset="number"===typeof t?t:t.low,this.length="number"===typeof n?n:n.low})),Zo=Object(F.a)((function e(t,n){Object(L.a)(this,e),this.length="number"===typeof t?t:t.low,this.nullCount="number"===typeof n?n:n.low}));function eu(e){for(var t,n=[],r=-1,i=-1,a=e.nodesLength();++r0?Ro.createCustomMetadataVector(e,sn(t.metadata).map((function(t){var n=N(t,2),r=n[0],i=n[1],a=e.createString("".concat(r)),o=e.createString("".concat(i));return $o.startKeyValue(e),$o.addKey(e,a),$o.addValue(e,o),$o.endKeyValue(e)}))):-1;t.name&&(n=e.createString(t.name));Ro.startField(e),Ro.addType(e,r),Ro.addTypeType(e,o),Ro.addChildren(e,s),Ro.addNullable(e,!!t.nullable),-1!==n&&Ro.addName(e,n);-1!==i&&Ro.addDictionary(e,i);-1!==c&&Ro.addCustomMetadata(e,c);return Ro.endField(e)},ia.decode=function(e,t){var n,r,i,a,o,u;t&&(u=e.dictionary())?t.has(n=u.id().low)?(a=(a=u.indexType())?au(a):new En,o=new rr(t.get(n),a,n,u.isOrdered()),r=new ia(e.name(),o,e.nullable(),iu(e))):(a=(a=u.indexType())?au(a):new En,t.set(n,i=ou(e,ru(e,t))),o=new rr(i,a,n,u.isOrdered()),r=new ia(e.name(),o,e.nullable(),iu(e))):(i=ou(e,ru(e,t)),r=new ia(e.name(),i,e.nullable(),iu(e)));return r||null},ia.fromJSON=function(e,t){var n,r,i,a,o,u;return t&&(a=e.dictionary)?t.has(n=a.id)?(r=(r=a.indexType)?Lo(r):new En,u=new rr(t.get(n),r,n,a.isOrdered),i=new ia(e.name,u,e.nullable,Co(e.customMetadata))):(r=(r=a.indexType)?Lo(r):new En,t.set(n,o=Fo(e,Do(e,t))),u=new rr(o,r,n,a.isOrdered),i=new ia(e.name,u,e.nullable,Co(e.customMetadata))):(o=Fo(e,Do(e,t)),i=new ia(e.name,o,e.nullable,Co(e.customMetadata))),i||null},ra.encode=function(e,t){var n=t.fields.map((function(t){return ia.encode(e,t)}));zo.startFieldsVector(e,n.length);var r=zo.createFieldsVector(e,n),i=t.metadata&&t.metadata.size>0?zo.createCustomMetadataVector(e,sn(t.metadata).map((function(t){var n=N(t,2),r=n[0],i=n[1],a=e.createString("".concat(r)),o=e.createString("".concat(i));return $o.startKeyValue(e),$o.addKey(e,a),$o.addValue(e,o),$o.endKeyValue(e)}))):-1;zo.startSchema(e),zo.addFields(e,r),zo.addEndianness(e,uu?Yo.Little:Yo.Big),-1!==i&&zo.addCustomMetadata(e,i);return zo.endSchema(e)},ra.decode=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Map,n=nu(e,t);return new ra(n,iu(e),t)},ra.fromJSON=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Map;return new ra(Bo(e,t),Co(e.customMetadata),t)},Go.encode=function(e,t){var n=t.nodes||[],r=t.buffers||[];Ko.startNodesVector(e,n.length),n.slice().reverse().forEach((function(t){return Zo.encode(e,t)}));var i=e.endVector();Ko.startBuffersVector(e,r.length),r.slice().reverse().forEach((function(t){return Xo.encode(e,t)}));var a=e.endVector();return Ko.startRecordBatch(e),Ko.addLength(e,new Mo(t.length,0)),Ko.addNodes(e,i),Ko.addBuffers(e,a),Ko.endRecordBatch(e)},Go.decode=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Gt.V4;return new Go(e.length(),eu(e),tu(e,t))},Go.fromJSON=Ao,Jo.encode=function(e,t){var n=Go.encode(e,t.data);return Qo.startDictionaryBatch(e),Qo.addId(e,new Mo(t.id,0)),Qo.addIsDelta(e,t.isDelta),Qo.addData(e,n),Qo.endDictionaryBatch(e)},Jo.decode=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Gt.V4;return new Jo(Go.decode(e.data(),t),e.id(),e.isDelta())},Jo.fromJSON=function(e){return new Jo(Ao(e.data),e.id,e.isDelta)},Zo.encode=function(e,t){return Ho.createFieldNode(e,new Mo(t.length,0),new Mo(t.nullCount,0))},Zo.decode=function(e){return new Zo(e.length(),e.nullCount())},Xo.encode=function(e,t){return Vo.createBuffer(e,new Mo(t.offset,0),new Mo(t.length,0))},Xo.decode=function(e){return new Xo(e.offset(),e.length())};for(var uu=function(){var e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),256===new Int16Array(e)[0]}(),su=W.ByteBuffer,cu=function(e){return"Expected ".concat(qt[e]," Message in stream, but was null or length 0.")},lu=function(e){return"Header pointer of flatbuffer-encoded ".concat(qt[e]," Message is null or length 0.")},fu=function(e,t){return"Expected to read ".concat(e," metadata bytes, but only read ").concat(t,".")},hu=function(e,t){return"Expected to read ".concat(e," bytes for message body, but only read ").concat(t,".")},du=function(e){function t(e){Object(L.a)(this,t),this.source=e instanceof Qa?e:new Qa(e)}return Object(F.a)(t,[{key:e,value:function(){return this}},{key:"next",value:function(){var e;return(e=this.readMetadataLength()).done||-1===e.value&&(e=this.readMetadataLength()).done||(e=this.readMetadata(e.value)).done?ie:e}},{key:"throw",value:function(e){return this.source.throw(e)}},{key:"return",value:function(e){return this.source.return(e)}},{key:"readMessage",value:function(e){var t;if((t=this.next()).done)return null;if(null!=e&&t.value.headerType!==e)throw new Error(cu(e));return t.value}},{key:"readMessageBody",value:function(e){if(e<=0)return new Uint8Array(0);var t=Ve(this.source.read(e));if(t.byteLength0&&void 0!==arguments[0]&&arguments[0],t=qt.Schema,n=this.readMessage(t),r=n&&n.header();if(e&&!r)throw new Error(lu(t));return r}},{key:"readMetadataLength",value:function(){var e=this.source.read(vu),t=e&&new su(e),n=t&&t.readInt32(0)||0;return{done:0===n,value:n}}},{key:"readMetadata",value:function(e){var t=this.source.read(e);if(!t)return ie;if(t.byteLength0&&void 0!==a[0]&&a[0],n=qt.Schema,e.next=4,this.readMessage(n);case 4:if(r=e.sent,i=r&&r.header(),!t||i){e.next=8;break}throw new Error(lu(n));case 8:return e.abrupt("return",i);case 9:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"readMetadataLength",value:function(){var e=C(M.mark((function e(){var t,n,r;return M.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.source.read(vu);case 2:return t=e.sent,n=t&&new su(t),r=n&&n.readInt32(0)||0,e.abrupt("return",{done:0===r,value:r});case 6:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"readMetadata",value:function(){var e=C(M.mark((function e(t){var n;return M.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.source.read(t);case 2:if(n=e.sent){e.next=5;break}return e.abrupt("return",ie);case 5:if(!(n.byteLength1&&void 0!==arguments[1]?arguments[1]:0,n=-1,r=bu.length;++n2147483647)throw new RangeError("Cannot write arrays larger than 2^31 - 1 in length");xn.isNull(e.type)||xu.call(this,i<=0?new Uint8Array(0):tn(t.offset,r,t.nullBitmap)),this.nodes.push(new Zo(r,i))}return Lt(Object(Ct.a)(n.prototype),"visit",this).call(this,e)}},{key:"visitNull",value:function(e){return this}},{key:"visitDictionary",value:function(e){return this.visit(e.indices)}},{key:"nodes",get:function(){return this._nodes}},{key:"buffers",get:function(){return this._buffers}},{key:"byteLength",get:function(){return this._byteLength}},{key:"bufferRegions",get:function(){return this._bufferRegions}}],[{key:"assemble",value:function(){for(var e=new n,t=arguments.length,r=new Array(t),i=0;i=e.length?xu.call(this,new Uint8Array(0)):(t=e.values)instanceof Uint8Array?xu.call(this,tn(e.offset,e.length,t)):xu.call(this,nn(e))},Ou.prototype.visitInt=ju,Ou.prototype.visitFloat=ju,Ou.prototype.visitUtf8=Su,Ou.prototype.visitBinary=Su,Ou.prototype.visitFixedSizeBinary=ju,Ou.prototype.visitDate=ju,Ou.prototype.visitTimestamp=ju,Ou.prototype.visitTime=ju,Ou.prototype.visitDecimal=ju,Ou.prototype.visitList=Tu,Ou.prototype.visitStruct=Iu,Ou.prototype.visitUnion=function(e){var t=e.type,n=e.length,r=e.typeIds,i=e.valueOffsets;if(xu.call(this,r),t.mode===Kt.Sparse)return Iu.call(this,e);if(t.mode===Kt.Dense){if(e.offset<=0)return xu.call(this,i),Iu.call(this,e);for(var a,o,u=r.reduce((function(e,t){return Math.max(e,t)}),r[0]),s=new Int32Array(u+1),c=new Int32Array(u+1).fill(-1),l=new Int32Array(n),f=bt(-i[0],n,i),h=-1;++h0&&void 0!==arguments[0]&&arguments[0];return this._sink.toString(e)}},{key:"toUint8Array",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this._sink.toUint8Array(e)}},{key:"writeAll",value:function(e){var t=this;return ge(e)?e.then((function(e){return t.writeAll(e)})):we(e)?Fu(this,e):Lu(this,e)}},{key:"closed",get:function(){return this._sink.closed}},{key:t,value:function(){return this._sink[Symbol.asyncIterator]()}},{key:"toDOMStream",value:function(e){return this._sink.toDOMStream(e)}},{key:"toNodeStream",value:function(e){return this._sink.toNodeStream(e)}},{key:"close",value:function(){return this.reset()._sink.close()}},{key:"abort",value:function(e){return this.reset()._sink.abort(e)}},{key:"finish",value:function(){return this._autoDestroy?this.close():this.reset(this._sink,this._schema),this}},{key:"reset",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._sink,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return e===this._sink||e instanceof Ka?this._sink=e:(this._sink=new Ka,e&&Se(e)?this.toDOMStream({type:"bytes"}).pipeTo(e):e&&Ie(e)&&this.toNodeStream({objectMode:!1}).pipe(e)),this._started&&this._schema&&this._writeFooter(this._schema),this._started=!1,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._dictionaryDeltaOffsets=new Map,t&&t.compareTo(this._schema)||(null===t?(this._position=0,this._schema=null):(this._started=!0,this._schema=t,this._writeSchema(t))),this}},{key:"write",value:function(e){var t=null;if(!this._sink)throw new Error("RecordBatchWriter is closed");if(null===e||void 0===e)return this.finish()&&void 0;if(e instanceof Bc&&!(t=e.schema))return this.finish()&&void 0;if(e instanceof Dc&&!(t=e.schema))return this.finish()&&void 0;if(t&&!t.compareTo(this._schema)){if(this._started&&this._autoDestroy)return this.close();this.reset(this._sink,t)}e instanceof Dc?e instanceof Cc||this._writeRecordBatch(e):e instanceof Bc?this.writeAll(e.chunks):ke(e)&&this.writeAll(e)}},{key:"_writeMessage",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8,n=t-1,r=qo.encode(e),i=r.byteLength,a=this._writeLegacyIpcFormat?4:8,o=i+a+n&~n,u=o-i-a;return e.headerType===qt.RecordBatch?this._recordBatchBlocks.push(new $a(o,e.bodyLength,this._position)):e.headerType===qt.DictionaryBatch&&this._dictionaryBlocks.push(new $a(o,e.bodyLength,this._position)),this._writeLegacyIpcFormat||this._write(Int32Array.of(-1)),this._write(Int32Array.of(o-a)),i>0&&this._write(r),this._writePadding(u)}},{key:"_write",value:function(e){if(this._started){var t=Ve(e);t&&t.byteLength>0&&(this._sink.write(t),this._position+=t.byteLength)}return this}},{key:"_writeSchema",value:function(e){return this._writeMessage(qo.from(e))}},{key:"_writeFooter",value:function(e){return this._writeLegacyIpcFormat?this._write(Int32Array.of(0)):this._write(Int32Array.of(-1,0))}},{key:"_writeMagic",value:function(){return this._write(bu)}},{key:"_writePadding",value:function(e){return e>0?this._write(new Uint8Array(e)):this}},{key:"_writeRecordBatch",value:function(e){var t=Ou.assemble(e),n=t.byteLength,r=t.nodes,i=t.bufferRegions,a=t.buffers,o=new Go(e.length,r,i),u=qo.from(o,n);return this._writeDictionaries(e)._writeMessage(u)._writeBodyBuffers(a)}},{key:"_writeDictionaryBatch",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this._dictionaryDeltaOffsets.set(t,e.length+(this._dictionaryDeltaOffsets.get(t)||0));var r=Ou.assemble(e),i=r.byteLength,a=r.nodes,o=r.bufferRegions,u=r.buffers,s=new Go(e.length,a,o),c=new Jo(s,t,n),l=qo.from(c,i);return this._writeMessage(l)._writeBodyBuffers(u)}},{key:"_writeBodyBuffers",value:function(e){for(var t,n,r,i=-1,a=e.length;++i0&&(this._write(t),(r=(n+7&-8)-n)>0&&this._writePadding(r));return this}},{key:"_writeDictionaries",value:function(e){var t,n=B(e.dictionaries);try{for(n.s();!(t=n.n()).done;){var r=N(t.value,2),i=r[0],a=r[1],o=this._dictionaryDeltaOffsets.get(i)||0;if(0===o||(a=a.slice(o)).length>0){var u,s=B("chunks"in a?a.chunks:[a]);try{for(s.s();!(u=s.n()).done;){var c=u.value;this._writeDictionaryBatch(c,i,o>0),o+=c.length}}catch(l){s.e(l)}finally{s.f()}}}}catch(l){n.e(l)}finally{n.f()}return this}}],[{key:"throughNode",value:function(e){throw new Error('"throughNode" not available in this environment')}},{key:"throughDOM",value:function(e,t){throw new Error('"throughDOM" not available in this environment')}}]),r}(oe,Symbol.asyncIterator),Du=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.apply(this,arguments)}return Object(F.a)(n,null,[{key:"writeAll",value:function(e,t){var r=new n(t);return ge(e)?e.then((function(e){return r.writeAll(e)})):we(e)?Fu(r,e):Lu(r,e)}}]),n}(Bu),Cu=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){var e;return Object(L.a)(this,n),(e=t.call(this))._autoDestroy=!0,e}return Object(F.a)(n,[{key:"_writeSchema",value:function(e){return this._writeMagic()._writePadding(2)}},{key:"_writeFooter",value:function(e){var t=Va.encode(new Va(e,Gt.V4,this._recordBatchBlocks,this._dictionaryBlocks));return Lt(Object(Ct.a)(n.prototype),"_writeFooter",this).call(this,e)._write(t)._write(Int32Array.of(t.byteLength))._writeMagic()}}],[{key:"writeAll",value:function(e){var t=new n;return ge(e)?e.then((function(e){return t.writeAll(e)})):we(e)?Fu(t,e):Lu(t,e)}}]),n}(Bu);function Lu(e,t){var n=t;t instanceof Bc&&(n=t.chunks,e.reset(void 0,t.schema));var r,i=B(n);try{for(i.s();!(r=i.n()).done;){var a=r.value;e.write(a)}}catch(o){i.e(o)}finally{i.f()}return e.finish()}function Fu(e,t){return Mu.apply(this,arguments)}function Mu(){return(Mu=C(M.mark((function e(t,n){var r,i,a,o,u,s;return M.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=!1,i=!1,e.prev=2,o=Eu(n);case 4:return e.next=6,o.next();case 6:if(!(r=!(u=e.sent).done)){e.next=12;break}s=u.value,t.write(s);case 9:r=!1,e.next=4;break;case 12:e.next=18;break;case 14:e.prev=14,e.t0=e.catch(2),i=!0,a=e.t0;case 18:if(e.prev=18,e.prev=19,!r||null==o.return){e.next=23;break}return e.next=23,o.return();case 23:if(e.prev=23,!i){e.next=26;break}throw a;case 26:return e.finish(23);case 27:return e.finish(18);case 28:return e.abrupt("return",t.finish());case 29:case"end":return e.stop()}}),e,null,[[2,14,18,28],[19,,23,27]])})))).apply(this,arguments)}var Nu=new Uint8Array(0),Pu=function(e){return[Nu,Nu,new Uint8Array(e),Nu]};function Uu(e,t){for(var n,r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.reduce((function(e,t){return Math.max(e,t.length)}),0),a=-1,o=t.length,u=sn(e.fields),s=[],c=(i+63&-64)>>3;++a0;){for(u=Number.POSITIVE_INFINITY,s=-1;++s0&&(i[o++]=[u,l.slice()]))}return[e=new ra(r,e.metadata),i.map((function(t){return Pr(Dc,[e].concat(sn(t)))}))]}(e,t.map((function(e){return e instanceof Vi?e.chunks.map((function(e){return e.data})):[e.data]})))}function Vu(e,t,n,r,i){for(var a,o,u=0,s=-1,c=r.length,l=(t+63&-64)>>3;++s=t?u===t?n[s]=a:(n[s]=a.slice(0,t),a=a.slice(t,u-t),i.numBatches=Math.max(i.numBatches,r[s].unshift(a))):((o=e[s]).nullable||(e[s]=o.clone({nullable:!0})),n[s]=a?a._changeLengthAndBackfillNullBitmap(t):ar.new(o.type,0,t,t,Pu(l)));return n}function Wu(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var $u=function(e,t){Object(ne.a)(r,e);var n=Object(re.a)(r);function r(e,t){var i;return Object(L.a)(this,r),(i=n.call(this))._children=t,i.numChildren=e.childData.length,i._bindDataAccessors(i.data=e),i}return Object(F.a)(r,[{key:"type",get:function(){return this.data.type}},{key:"typeId",get:function(){return this.data.typeId}},{key:"length",get:function(){return this.data.length}},{key:"offset",get:function(){return this.data.offset}},{key:"stride",get:function(){return this.data.stride}},{key:"nullCount",get:function(){return this.data.nullCount}},{key:"byteLength",get:function(){return this.data.byteLength}},{key:"VectorName",get:function(){return"".concat(Vt[this.typeId],"Vector")}},{key:"ArrayType",get:function(){return this.type.ArrayType}},{key:"values",get:function(){return this.data.values}},{key:"typeIds",get:function(){return this.data.typeIds}},{key:"nullBitmap",get:function(){return this.data.nullBitmap}},{key:"valueOffsets",get:function(){return this.data.valueOffsets}},{key:t,get:function(){return"".concat(this.VectorName,"<").concat(this.type[Symbol.toStringTag],">")}},{key:"clone",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._children;return zt.new(e,t)}},{key:"concat",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n0){var t=this.offset+e;return 0!==(this.nullBitmap[t>>3]&1<=this.numChildren?null:(this._children||(this._children=[]))[e]||(this._children[e]=zt.new(this.data.childData[e]))}},{key:"toJSON",value:function(){return sn(this)}},{key:"_sliceInternal",value:function(e,t,n){return e.clone(e.data.slice(t,n-t),null)}},{key:"_bindDataAccessors",value:function(e){}}]),r}(zt,Symbol.toStringTag);$u.prototype[Symbol.isConcatSpreadable]=!0;var Hu=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.apply(this,arguments)}return Object(F.a)(n,[{key:"asUtf8",value:function(){return zt.new(this.data.clone(new Rn))}}]),n}($u),Yu=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.apply(this,arguments)}return Object(F.a)(n,null,[{key:"from",value:function(e){return Ic((function(){return new zn}),e)}}]),n}($u),Ku=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.apply(this,arguments)}return Object(F.a)(n,null,[{key:"from",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n>>0)},Hs=function(e){return new Date(e)},Ys=function(e,t,n){var r=t[n],i=t[n+1];return null!=r&&null!=i?e.subarray(r,i):null},Ks=function(e,t){return function(e,t){return Hs(function(e,t){return 864e5*e[t]}(e,t))}(e.values,t)},Qs=function(e,t){return function(e,t){return Hs($s(e,t))}(e.values,2*t)},qs=function(e,t){var n=e.stride;return e.values[n*t]},Gs=function(e,t){var n=e.stride;return Ar(e.values[n*t])},Js=function(e,t){var n=e.stride,r=e.values,i=e.type;return qr.new(r.subarray(n*t,n*(t+1)),i.isSigned)},Xs=function(e,t){var n=e.values;return 1e3*$s(n,2*t)},Zs=function(e,t){var n=e.values;return $s(n,2*t)},ec=function(e,t){return function(e,t){return e[t+1]/1e3*4294967296+(e[t]>>>0)/1e3}(e.values,2*t)},tc=function(e,t){return function(e,t){return e[t+1]/1e6*4294967296+(e[t]>>>0)/1e6}(e.values,2*t)},nc=function(e,t){return e.values[e.stride*t]},rc=function(e,t){return e.values[e.stride*t]},ic=function(e,t){var n=e.values;return qr.signed(n.subarray(2*t,2*(t+1)))},ac=function(e,t){var n=e.values;return qr.signed(n.subarray(2*t,2*(t+1)))},oc=function(e,t){var n=e.typeIdToChildIndex[e.typeIds[t]],r=e.getChildAt(n);return r?r.get(e.valueOffsets[t]):null},uc=function(e,t){var n=e.typeIdToChildIndex[e.typeIds[t]],r=e.getChildAt(n);return r?r.get(t):null},sc=function(e,t){return e.values.subarray(2*t,2*(t+1))},cc=function(e,t){var n=e.values[t],r=new Int32Array(2);return r[0]=n/12|0,r[1]=n%12|0,r};Ws.prototype.visitNull=function(e,t){return null},Ws.prototype.visitBool=function(e,t){var n=e.offset+t;return 0!==(e.values[n>>3]&1<0?0:-1},fc.prototype.visitBool=hc,fc.prototype.visitInt=hc,fc.prototype.visitInt8=hc,fc.prototype.visitInt16=hc,fc.prototype.visitInt32=hc,fc.prototype.visitInt64=hc,fc.prototype.visitUint8=hc,fc.prototype.visitUint16=hc,fc.prototype.visitUint32=hc,fc.prototype.visitUint64=hc,fc.prototype.visitFloat=hc,fc.prototype.visitFloat16=hc,fc.prototype.visitFloat32=hc,fc.prototype.visitFloat64=hc,fc.prototype.visitUtf8=hc,fc.prototype.visitBinary=hc,fc.prototype.visitFixedSizeBinary=hc,fc.prototype.visitDate=hc,fc.prototype.visitDateDay=hc,fc.prototype.visitDateMillisecond=hc,fc.prototype.visitTimestamp=hc,fc.prototype.visitTimestampSecond=hc,fc.prototype.visitTimestampMillisecond=hc,fc.prototype.visitTimestampMicrosecond=hc,fc.prototype.visitTimestampNanosecond=hc,fc.prototype.visitTime=hc,fc.prototype.visitTimeSecond=hc,fc.prototype.visitTimeMillisecond=hc,fc.prototype.visitTimeMicrosecond=hc,fc.prototype.visitTimeNanosecond=hc,fc.prototype.visitDecimal=hc,fc.prototype.visitList=hc,fc.prototype.visitStruct=hc,fc.prototype.visitUnion=hc,fc.prototype.visitDenseUnion=dc,fc.prototype.visitSparseUnion=dc,fc.prototype.visitDictionary=hc,fc.prototype.visitInterval=hc,fc.prototype.visitIntervalDayTime=hc,fc.prototype.visitIntervalYearMonth=hc,fc.prototype.visitFixedSizeList=hc,fc.prototype.visitMap=hc;var pc=new fc,yc=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.apply(this,arguments)}return Object(F.a)(n)}(cn);function vc(e){if(e.nullCount>0)return function(e){var t=lc.getVisitFn(e);return rn(e.nullBitmap,e.offset,e.length,e,(function(e,n,r,i){return 0!==(r&1<0)?e.values.subarray(0,r)[Symbol.iterator]():M.mark((function t(n){var i;return M.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i=-1;case 1:if(!(++i1?t-1:0),r=1;r0&&(this.get=(t=this.get,function(e){return this.isValid(e)?t.call(this,e):null}),this.set=function(e){return function(t,n){en(this.nullBitmap,this.offset+t,!(null===n||void 0===n))&&e.call(this,t,n)}}(this.set));var t},Object.keys(Vt).map((function(e){return Vt[e]})).filter((function(e){return"number"===typeof e})).filter((function(e){return e!==Vt.NONE})).forEach((function(e){var t,n=xc.visit(e);n.prototype.get=(t=lc.getVisitFn(e),function(e){return t(this,e)}),n.prototype.set=Vs(Fa.getVisitFn(e)),n.prototype.indexOf=Vs(pc.getVisitFn(e)),n.prototype.toArray=zs(kc.getVisitFn(e)),n.prototype.getByteWidth=function(e){return function(){return e(this.type)}}(Oc.getVisitFn(e)),n.prototype[Symbol.iterator]=zs(bc.getVisitFn(e))}));var Bc=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){var e;Object(L.a)(this,n);for(var r=null,i=arguments.length,a=new Array(i),o=0;o0&&void 0!==arguments[0]?arguments[0]:this._chunks;return new n(this._schema,e)}},{key:"getColumn",value:function(e){return this.getColumnAt(this.getColumnIndex(e))}},{key:"getColumnAt",value:function(e){return this.getChildAt(e)}},{key:"getColumnIndex",value:function(e){return this._schema.fields.findIndex((function(t){return t.name===e}))}},{key:"getChildAt",value:function(e){if(e<0||e>=this.numChildren)return null;var t,n,r=this._schema.fields,i=this._children||(this._children=[]);if(n=i[e])return n;if(t=r[e]){var a=this._chunks.map((function(t){return t.getChildAt(e)})).filter((function(e){return null!=e}));if(a.length>0)return i[e]=new Yi(t,a)}return null}},{key:"serialize",value:function(){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],t=e?Du:Cu;return t.writeAll(this).toUint8Array(!0)}},{key:"count",value:function(){return this._length}},{key:"select",value:function(){for(var e=this._schema.fields.reduce((function(e,t,n){return e.set(t.name,n)}),new Map),t=arguments.length,n=new Array(t),r=0;r-1}))))}},{key:"selectAt",value:function(){for(var e,t=arguments.length,r=new Array(t),i=0;i3&&void 0!==arguments[3]?arguments[3]:u[r];return void 0===a?t.getColumnAt(r):e.getColumnAt(a)}))),sn(o.map((function(t){return e.getColumnAt(t)})))).filter(Boolean);return Pr(n,sn(zu(s,c)))}}],[{key:"empty",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new ra([]);return new n(e,[])}},{key:"from",value:function(e){if(!e)return n.empty();if("object"===typeof e){var t=ke(e.values)?function(e){if(e.type instanceof Gn)return Bc.fromStruct(Ss.from(e));return null}(e):we(e.values)?function(e){if(e.type instanceof Gn)return Ss.from(e).then((function(e){return Bc.fromStruct(e)}));return null}(e):null;if(null!==t)return t}var r=Pc.from(e);return ge(r)?C(M.mark((function e(){return M.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=n,e.next=3,r;case 3:return e.t1=e.sent,e.next=6,e.t0.from.call(e.t0,e.t1);case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),e)})))():r.isSync()&&(r=r.open())?r.schema?new n(r.schema,sn(r)):n.empty():function(){var e=C(M.mark((function e(t){var r,i,a,o,u,s,c,l,f;return M.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t;case 2:if(r=e.sent,i=r.schema,a=[],!i){e.next=35;break}o=!1,u=!1,e.prev=8,c=Ec(r);case 10:return e.next=12,c.next();case 12:if(!(o=!(l=e.sent).done)){e.next=18;break}f=l.value,a.push(f);case 15:o=!1,e.next=10;break;case 18:e.next=24;break;case 20:e.prev=20,e.t0=e.catch(8),u=!0,s=e.t0;case 24:if(e.prev=24,e.prev=25,!o||null==c.return){e.next=29;break}return e.next=29,c.return();case 29:if(e.prev=29,!u){e.next=32;break}throw s;case 32:return e.finish(29);case 33:return e.finish(24);case 34:return e.abrupt("return",new n(i,a));case 35:return e.abrupt("return",n.empty());case 36:case"end":return e.stop()}}),e,null,[[8,20,24,34],[25,,29,33]])})));return function(t){return e.apply(this,arguments)}}()(r.open())}},{key:"fromAsync",value:function(){var e=C(M.mark((function e(t){return M.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.from(t);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:"fromStruct",value:function(e){return n.new(e.data.childData,e.type.children)}},{key:"new",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r1&&void 0!==arguments[1]?arguments[1]:this._children;return new n(this._schema,e,t)}},{key:"concat",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r-1}))))}},{key:"selectAt",value:function(){for(var e,t=this,r=arguments.length,i=new Array(r),a=0;a0&&this.dictionaries.set(t.id,n),this}}],[{key:"collect",value:function(e){return(new n).visit(e.data,new Gn(e.schema.fields)).dictionaries}}]),n}(cn),Fc=M.mark(Gc);function Mc(e){var t,n,r,i=2;for("undefined"!=typeof Symbol&&(n=Symbol.asyncIterator,r=Symbol.iterator);i--;){if(n&&null!=(t=e[n]))return t.call(e);if(r&&null!=(t=e[r]))return new Nc(t.call(e));n="@@asyncIterator",r="@@iterator"}throw new TypeError("Object is not async iterable")}function Nc(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then((function(e){return{value:e,done:t}}))}return(Nc=function(e){this.s=e,this.n=e.next}).prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return void 0===n?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return void 0===n?Promise.reject(e):t(n.apply(this.s,arguments))}},new Nc(e)}var Pc=function(e,t,n){Object(ne.a)(i,e);var r=Object(re.a)(i);function i(e){var t;return Object(L.a)(this,i),(t=r.call(this))._impl=e,t}return Object(F.a)(i,[{key:"closed",get:function(){return this._impl.closed}},{key:"schema",get:function(){return this._impl.schema}},{key:"autoDestroy",get:function(){return this._impl.autoDestroy}},{key:"dictionaries",get:function(){return this._impl.dictionaries}},{key:"numDictionaries",get:function(){return this._impl.numDictionaries}},{key:"numRecordBatches",get:function(){return this._impl.numRecordBatches}},{key:"footer",get:function(){return this._impl.isFile()?this._impl.footer:null}},{key:"isSync",value:function(){return this._impl.isSync()}},{key:"isAsync",value:function(){return this._impl.isAsync()}},{key:"isFile",value:function(){return this._impl.isFile()}},{key:"isStream",value:function(){return this._impl.isStream()}},{key:"next",value:function(){return this._impl.next()}},{key:"throw",value:function(e){return this._impl.throw(e)}},{key:"return",value:function(e){return this._impl.return(e)}},{key:"cancel",value:function(){return this._impl.cancel()}},{key:"reset",value:function(e){return this._impl.reset(e),this._DOMStream=void 0,this._nodeStream=void 0,this}},{key:"open",value:function(e){var t=this,n=this._impl.open(e);return ge(n)?n.then((function(){return t})):this}},{key:"readRecordBatch",value:function(e){return this._impl.isFile()?this._impl.readRecordBatch(e):null}},{key:t,value:function(){return this._impl[Symbol.iterator]()}},{key:n,value:function(){return this._impl[Symbol.asyncIterator]()}},{key:"toDOMStream",value:function(){var e=this;return kt.toDOMStream(this.isSync()?At({},Symbol.iterator,(function(){return e})):At({},Symbol.asyncIterator,(function(){return e})))}},{key:"toNodeStream",value:function(){var e=this;return kt.toNodeStream(this.isSync()?At({},Symbol.iterator,(function(){return e})):At({},Symbol.asyncIterator,(function(){return e})),{objectMode:!0})}}],[{key:"throughNode",value:function(e){throw new Error('"throughNode" not available in this environment')}},{key:"throughDOM",value:function(e,t){throw new Error('"throughDOM" not available in this environment')}},{key:"from",value:function(e){return e instanceof i?e:_e(e)?function(e){return new Uc(new Qc(e))}(e):xe(e)?function(e){return el.apply(this,arguments)}(e):ge(e)?C(M.mark((function t(){return M.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=i,t.next=3,e;case 3:return t.t1=t.sent,t.next=6,t.t0.from.call(t.t0,t.t1);case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}}),t)})))():je(e)||Te(e)||Ee(e)||we(e)?function(e){return Zc.apply(this,arguments)}(new qa(e)):function(e){var t=e.peek(ku+7&-8);return t&&t.byteLength>=4?gu(t)?new zc(new Yc(e.read())):new Uc(new $c(e)):new Uc(new $c(M.mark((function e(){return M.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)}))()))}(new Qa(e))}},{key:"readAll",value:function(e){return e instanceof i?e.isSync()?Gc(e):Jc(e):_e(e)||ArrayBuffer.isView(e)||ke(e)||Oe(e)?Gc(e):Jc(e)}}]),i}(oe,Symbol.iterator,Symbol.asyncIterator),Uc=function(e,t,n){Object(ne.a)(i,e);var r=Object(re.a)(i);function i(e){var t;return Object(L.a)(this,i),(t=r.call(this,e))._impl=e,t}return Object(F.a)(i,[{key:t,value:function(){return this._impl[Symbol.iterator]()}},{key:n,value:function(){var e=this;return z(M.mark((function t(){return M.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.delegateYield(V(Mc(e[Symbol.iterator]()),U),"t0",1);case 1:case"end":return t.stop()}}),t)})))()}}]),i}(Pc,Symbol.iterator,Symbol.asyncIterator),Rc=function(e,t,n){Object(ne.a)(i,e);var r=Object(re.a)(i);function i(e){var t;return Object(L.a)(this,i),(t=r.call(this,e))._impl=e,t}return Object(F.a)(i,[{key:t,value:function(){throw new Error("AsyncRecordBatchStreamReader is not Iterable")}},{key:n,value:function(){return this._impl[Symbol.asyncIterator]()}}]),i}(Pc,Symbol.iterator,Symbol.asyncIterator),zc=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(e){var r;return Object(L.a)(this,n),(r=t.call(this,e))._impl=e,r}return Object(F.a)(n)}(Uc),Vc=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(e){var r;return Object(L.a)(this,n),(r=t.call(this,e))._impl=e,r}return Object(F.a)(n)}(Rc),Wc=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Map;Object(L.a)(this,e),this.closed=!1,this.autoDestroy=!0,this._dictionaryIndex=0,this._recordBatchIndex=0,this.dictionaries=t}return Object(F.a)(e,[{key:"numDictionaries",get:function(){return this._dictionaryIndex}},{key:"numRecordBatches",get:function(){return this._recordBatchIndex}},{key:"isSync",value:function(){return!1}},{key:"isAsync",value:function(){return!1}},{key:"isFile",value:function(){return!1}},{key:"isStream",value:function(){return!1}},{key:"reset",value:function(e){return this._dictionaryIndex=0,this._recordBatchIndex=0,this.schema=e,this.dictionaries=new Map,this}},{key:"_loadRecordBatch",value:function(e,t){return new Dc(this.schema,e.length,this._loadVectors(e,t,this.schema.fields))}},{key:"_loadDictionaryBatch",value:function(e,t){var n=e.id,r=e.isDelta,i=e.data,a=this.dictionaries,o=this.schema,u=a.get(n);if(r||!u){var s=o.dictionaries.get(n);return u&&r?u.concat(zt.new(this._loadVectors(i,t,[s])[0])):zt.new(this._loadVectors(i,t,[s])[0])}return u}},{key:"_loadVectors",value:function(e,t,n){return new oo(t,e.nodes,e.buffers,this.dictionaries).visitMany(n)}}]),e}(),$c=function(e,t){Object(ne.a)(r,e);var n=Object(re.a)(r);function r(e,t){var i;return Object(L.a)(this,r),(i=n.call(this,t))._reader=_e(e)?new yu(i._handle=e):new du(i._handle=e),i}return Object(F.a)(r,[{key:"isSync",value:function(){return!0}},{key:"isStream",value:function(){return!0}},{key:t,value:function(){return this}},{key:"cancel",value:function(){!this.closed&&(this.closed=!0)&&(this.reset()._reader.return(),this._reader=null,this.dictionaries=null)}},{key:"open",value:function(e){return this.closed||(this.autoDestroy=qc(this,e),this.schema||(this.schema=this._reader.readSchema())||this.cancel()),this}},{key:"throw",value:function(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.throw(e):ie}},{key:"return",value:function(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(e):ie}},{key:"next",value:function(){if(this.closed)return ie;for(var e,t=this._reader;e=this._readNextMessageAndValidate();)if(e.isSchema())this.reset(e.header());else{if(e.isRecordBatch()){this._recordBatchIndex++;var n=e.header(),r=t.readMessageBody(e.bodyLength);return{done:!1,value:this._loadRecordBatch(n,r)}}if(e.isDictionaryBatch()){this._dictionaryIndex++;var i=e.header(),a=t.readMessageBody(e.bodyLength),o=this._loadDictionaryBatch(i,a);this.dictionaries.set(i.id,o)}}return this.schema&&0===this._recordBatchIndex?(this._recordBatchIndex++,{done:!1,value:new Cc(this.schema)}):this.return()}},{key:"_readNextMessageAndValidate",value:function(e){return this._reader.readMessage(e)}}]),r}(Wc,Symbol.iterator),Hc=function(e,t){Object(ne.a)(r,e);var n=Object(re.a)(r);function r(e,t){var i;return Object(L.a)(this,r),(i=n.call(this,t))._reader=new pu(i._handle=e),i}return Object(F.a)(r,[{key:"isAsync",value:function(){return!0}},{key:"isStream",value:function(){return!0}},{key:t,value:function(){return this}},{key:"cancel",value:function(){var e=C(M.mark((function e(){return M.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.closed||!(this.closed=!0)){e.next=5;break}return e.next=3,this.reset()._reader.return();case 3:this._reader=null,this.dictionaries=null;case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"open",value:function(){var e=C(M.mark((function e(t){return M.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.closed){e.next=10;break}if(this.autoDestroy=qc(this,t),e.t0=this.schema,e.t0){e.next=7;break}return e.next=6,this._reader.readSchema();case 6:e.t0=this.schema=e.sent;case 7:if(e.t0){e.next=10;break}return e.next=10,this.cancel();case 10:return e.abrupt("return",this);case 11:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"throw",value:function(){var e=C(M.mark((function e(t){return M.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.closed||!this.autoDestroy||!(this.closed=!0)){e.next=4;break}return e.next=3,this.reset()._reader.throw(t);case 3:return e.abrupt("return",e.sent);case 4:return e.abrupt("return",ie);case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"return",value:function(){var e=C(M.mark((function e(t){return M.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.closed||!this.autoDestroy||!(this.closed=!0)){e.next=4;break}return e.next=3,this.reset()._reader.return(t);case 3:return e.abrupt("return",e.sent);case 4:return e.abrupt("return",ie);case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"next",value:function(){var e=C(M.mark((function e(){var t,n,r,i,a,o,u,s;return M.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.closed){e.next=2;break}return e.abrupt("return",ie);case 2:n=this._reader;case 3:return e.next=5,this._readNextMessageAndValidate();case 5:if(!(t=e.sent)){e.next=31;break}if(!t.isSchema()){e.next=11;break}return e.next=9,this.reset(t.header());case 9:e.next=29;break;case 11:if(!t.isRecordBatch()){e.next=21;break}return this._recordBatchIndex++,r=t.header(),e.next=16,n.readMessageBody(t.bodyLength);case 16:return i=e.sent,a=this._loadRecordBatch(r,i),e.abrupt("return",{done:!1,value:a});case 21:if(!t.isDictionaryBatch()){e.next=29;break}return this._dictionaryIndex++,o=t.header(),e.next=26,n.readMessageBody(t.bodyLength);case 26:u=e.sent,s=this._loadDictionaryBatch(o,u),this.dictionaries.set(o.id,s);case 29:e.next=3;break;case 31:if(!this.schema||0!==this._recordBatchIndex){e.next=34;break}return this._recordBatchIndex++,e.abrupt("return",{done:!1,value:new Cc(this.schema)});case 34:return e.next=36,this.return();case 36:return e.abrupt("return",e.sent);case 37:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_readNextMessageAndValidate",value:function(){var e=C(M.mark((function e(t){return M.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._reader.readMessage(t);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),r}(Wc,Symbol.asyncIterator),Yc=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(e,r){return Object(L.a)(this,n),t.call(this,e instanceof Xa?e:new Xa(e),r)}return Object(F.a)(n,[{key:"footer",get:function(){return this._footer}},{key:"numDictionaries",get:function(){return this._footer?this._footer.numDictionaries:0}},{key:"numRecordBatches",get:function(){return this._footer?this._footer.numRecordBatches:0}},{key:"isSync",value:function(){return!0}},{key:"isFile",value:function(){return!0}},{key:"open",value:function(e){if(!this.closed&&!this._footer){this.schema=(this._footer=this._readFooter()).schema;var t,r=B(this._footer.dictionaryBatches());try{for(r.s();!(t=r.n()).done;){t.value&&this._readDictionaryBatch(this._dictionaryIndex++)}}catch(i){r.e(i)}finally{r.f()}}return Lt(Object(Ct.a)(n.prototype),"open",this).call(this,e)}},{key:"readRecordBatch",value:function(e){if(this.closed)return null;this._footer||this.open();var t=this._footer&&this._footer.getRecordBatch(e);if(t&&this._handle.seek(t.offset)){var n=this._reader.readMessage(qt.RecordBatch);if(n&&n.isRecordBatch()){var r=n.header(),i=this._reader.readMessageBody(n.bodyLength);return this._loadRecordBatch(r,i)}}return null}},{key:"_readDictionaryBatch",value:function(e){var t=this._footer&&this._footer.getDictionaryBatch(e);if(t&&this._handle.seek(t.offset)){var n=this._reader.readMessage(qt.DictionaryBatch);if(n&&n.isDictionaryBatch()){var r=n.header(),i=this._reader.readMessageBody(n.bodyLength),a=this._loadDictionaryBatch(r,i);this.dictionaries.set(r.id,a)}}}},{key:"_readFooter",value:function(){var e=this._handle,t=e.size-wu,n=e.readInt32(t),r=e.readAt(t-n,n);return Va.decode(r)}},{key:"_readNextMessageAndValidate",value:function(e){if(this._footer||this.open(),this._footer&&this._recordBatchIndex1?r-1:0),a=1;a=4)){e.next=18;break}if(gu(n)){e.next=8;break}e.t1=new Rc(new Hc(t)),e.next=15;break;case 8:return e.t2=zc,e.t3=Yc,e.next=12,t.read();case 12:e.t4=e.sent,e.t5=new e.t3(e.t4),e.t1=new e.t2(e.t5);case 15:e.t0=e.t1,e.next=19;break;case 18:e.t0=new Rc(new Hc(z(M.mark((function e(){return M.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})))()));case 19:return e.abrupt("return",e.t0);case 20:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function el(){return(el=C(M.mark((function e(t){var n,r,i;return M.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.stat();case 2:if(n=e.sent,r=n.size,i=new Za(t,r),!(r>=_u)){e.next=12;break}return e.t0=gu,e.next=9,i.readAt(0,ku+7&-8);case 9:if(e.t1=e.sent,!(0,e.t0)(e.t1)){e.next=12;break}return e.abrupt("return",new Vc(new Kc(i)));case 12:return e.abrupt("return",new Rc(new Hc(i)));case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var tl=["readableStrategy","writableStrategy","queueingStrategy"];var nl=function(){function e(t){var n,r,i=this;Object(L.a)(this,e),this._numChunks=0,this._finished=!1,this._bufferedSize=0;var a=t.readableStrategy,o=t.writableStrategy,u=t.queueingStrategy,s=void 0===u?"count":u,c=Wu(t,tl);this._controller=null,this._builder=br.new(c),this._getSize="bytes"!==s?rl:il;var l=Dt({},a).highWaterMark,f=void 0===l?"bytes"===s?Math.pow(2,14):1e3:l,h=Dt({},o).highWaterMark,d=void 0===h?"bytes"===s?Math.pow(2,14):1e3:h;this.readable=new ReadableStream((At(n={},"cancel",(function(){i._builder.clear()})),At(n,"pull",(function(e){i._maybeFlush(i._builder,i._controller=e)})),At(n,"start",(function(e){i._maybeFlush(i._builder,i._controller=e)})),n),{highWaterMark:f,size:"bytes"!==s?rl:il}),this.writable=new WritableStream((At(r={},"abort",(function(){i._builder.clear()})),At(r,"write",(function(){i._maybeFlush(i._builder,i._controller)})),At(r,"close",(function(){i._maybeFlush(i._builder.finish(),i._controller)})),r),{highWaterMark:d,size:function(e){return i._writeValueAndReturnChunkSize(e)}})}return Object(F.a)(e,[{key:"_writeValueAndReturnChunkSize",value:function(e){var t=this._bufferedSize;return this._bufferedSize=this._getSize(this._builder.append(e)),this._bufferedSize-t}},{key:"_maybeFlush",value:function(e,t){null!==t&&(this._bufferedSize>=t.desiredSize&&++this._numChunks&&this._enqueue(t,e.toVector()),e.finished&&((e.length>0||0===this._numChunks)&&++this._numChunks&&this._enqueue(t,e.toVector()),!this._finished&&(this._finished=!0)&&this._enqueue(t,null)))}},{key:"_enqueue",value:function(e,t){this._bufferedSize=0,this._controller=null,null===t?e.close():e.enqueue(t)}}]),e}(),rl=function(e){return e.length},il=function(e){return e.byteLength};var al=function(){function e(){Object(L.a)(this,e)}return Object(F.a)(e,[{key:"eq",value:function(t){return t instanceof e||(t=new ol(t)),new dl(this,t)}},{key:"le",value:function(t){return t instanceof e||(t=new ol(t)),new pl(this,t)}},{key:"ge",value:function(t){return t instanceof e||(t=new ol(t)),new yl(this,t)}},{key:"lt",value:function(e){return new vl(this.ge(e))}},{key:"gt",value:function(e){return new vl(this.le(e))}},{key:"ne",value:function(e){return new vl(this.eq(e))}}]),e}(),ol=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(e){var r;return Object(L.a)(this,n),(r=t.call(this)).v=e,r}return Object(F.a)(n)}(al),ul=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(e){var r;return Object(L.a)(this,n),(r=t.call(this)).name=e,r}return Object(F.a)(n,[{key:"bind",value:function(e){if(!this.colidx){this.colidx=-1;for(var t=e.schema.fields,n=-1;++n=n.v;return function(){return r}}},{key:"_bindColCol",value:function(e,t,n){var r=t.bind(e),i=n.bind(e);return function(e,t){return r(e,t)>=i(e,t)}}},{key:"_bindColLit",value:function(e,t,n){var r=t.bind(e);return function(e,t){return r(e,t)>=n.v}}},{key:"_bindLitCol",value:function(e,t,n){var r=n.bind(e);return function(e,n){return t.v>=r(e,n)}}}]),n}(cl),vl=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(e){var r;return Object(L.a)(this,n),(r=t.call(this)).child=e,r}return Object(F.a)(n,[{key:"bind",value:function(e){var t=this.child.bind(e);return function(e,n){return!t(e,n)}}}]),n}(sl);Bc.prototype.countBy=function(e){return new bl(this.chunks).countBy(e)},Bc.prototype.scan=function(e,t){return new bl(this.chunks).scan(e,t)},Bc.prototype.scanReverse=function(e,t){return new bl(this.chunks).scanReverse(e,t)},Bc.prototype.filter=function(e){return new bl(this.chunks).filter(e)};var bl=function(e){Object(ne.a)(n,e);var t=Object(re.a)(n);function n(){return Object(L.a)(this,n),t.apply(this,arguments)}return Object(F.a)(n,[{key:"filter",value:function(e){return new gl(this.chunks,e)}},{key:"scan",value:function(e,t){for(var n=this.chunks,r=n.length,i=-1;++i=0;){var i=n[r];t&&t(i);for(var a=i.length;--a>=0;)e(a,i)}}},{key:"countBy",value:function(e){var t=this.chunks,n=t.length,r="string"===typeof e?new ul(e):e;r.bind(t[n-1]);var i=r.vector;if(!xn.isDictionary(i.type))throw new Error("countBy currently only supports dictionary-encoded columns");for(var a=Math.ceil(Math.log(i.length)/Math.log(256)),o=new(4==a?Uint32Array:a>=2?Uint16Array:Uint8Array)(i.dictionary.length),u=-1;++u=0;)for(var i=n[r],a=this._predicate.bind(i),o=!1,u=i.length;--u>=0;)a(u,i)&&(t&&!o&&(t(i),o=!0),e(u,i))}},{key:"count",value:function(){for(var e=0,t=this._chunks,n=t.length,r=-1;++r=2?Uint16Array:Uint8Array)(i.dictionary.length),u=-1;++u=i.headerRows&&t=i.headerColumns;if(n){var o=["blank"];return t>0&&o.push("level"+e),{type:"blank",classNames:o.join(" "),content:""}}if(a)return{type:"columns",classNames:(o=["col_heading","level"+e,"col"+(s=t-i.headerColumns)]).join(" "),content:i.getContent(i.columnsTable,s,e)};if(r){o=["row_heading","level"+t,"row"+(u=e-i.headerRows)];return{type:"index",id:"T_"+i.uuid+"level"+t+"_row"+u,classNames:o.join(" "),content:i.getContent(i.indexTable,u,t)}}o=["data","row"+(u=e-i.headerRows),"col"+(s=t-i.headerColumns)];var u,s,c=i.styler?i.getContent(i.styler.displayValuesTable,u,s):i.getContent(i.dataTable,u,s);return{type:"data",id:"T_"+i.uuid+"row"+u+"_col"+s,classNames:o.join(" "),content:c}},this.getContent=function(e,t,n){var r=e.getColumnAt(n);if(null===r)return"";switch(i.getColumnTypeId(e,n)){case Vt.Timestamp:return i.nanosToDate(r.get(t));default:return r.get(t)}},this.dataTable=Bc.from(e),this.indexTable=Bc.from(t),this.columnsTable=Bc.from(n),this.styler=r?{caption:r.caption,displayValuesTable:Bc.from(r.displayValues),styles:r.styles,uuid:r.uuid}:void 0}return Object.defineProperty(e.prototype,"rows",{get:function(){return this.indexTable.length+this.columnsTable.numCols},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"columns",{get:function(){return this.indexTable.numCols+this.columnsTable.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"headerRows",{get:function(){return this.rows-this.dataRows},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"headerColumns",{get:function(){return this.columns-this.dataColumns},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dataRows",{get:function(){return this.dataTable.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dataColumns",{get:function(){return this.dataTable.numCols},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"uuid",{get:function(){return this.styler&&this.styler.uuid},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"caption",{get:function(){return this.styler&&this.styler.caption},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"styles",{get:function(){return this.styler&&this.styler.styles},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"table",{get:function(){return this.dataTable},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"index",{get:function(){return this.indexTable},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"columnTable",{get:function(){return this.columnsTable},enumerable:!0,configurable:!0}),e.prototype.serialize=function(){return{data:this.dataTable.serialize(),index:this.indexTable.serialize(),columns:this.columnsTable.serialize()}},e.prototype.getColumnTypeId=function(e,t){return e.schema.fields[t].type.typeId},e.prototype.nanosToDate=function(e){return new Date(e/1e6)},e}(),_l=function(){return(_l=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0?e.argsDataframeToObject(t.dfs):{};n=_l(_l({},n),r);var i=Boolean(t.disabled),a=t.theme;a&&xl(a);var o={disabled:i,args:n,theme:a},u=new CustomEvent(e.RENDER_EVENT,{detail:o});e.events.dispatchEvent(u)},e.argsDataframeToObject=function(t){var n=t.map((function(t){var n=t.key,r=t.value;return[n,e.toArrowTable(r)]}));return Object.fromEntries(n)},e.toArrowTable=function(e){var t=e.data,n=t.data,r=t.index,i=t.columns,a=t.styler;return new wl(n,r,i,a)},e.sendBackMsg=function(e,t){window.parent.postMessage(_l({isStreamlitMessage:!0,type:e},t),"*")},e}(),xl=function(e){var t=document.createElement("style");document.head.appendChild(t),t.innerHTML="\n :root {\n --primary-color: "+e.primaryColor+";\n --background-color: "+e.backgroundColor+";\n --secondary-background-color: "+e.secondaryBackgroundColor+";\n --text-color: "+e.textColor+";\n --font: "+e.font+";\n }\n\n body {\n background-color: var(--background-color);\n color: var(--text-color);\n }\n "};var jl=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Sl=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return jl(t,e),t.prototype.componentDidMount=function(){Ol.setFrameHeight()},t.prototype.componentDidUpdate=function(){Ol.setFrameHeight()},t}(h.a.PureComponent);function Tl(e){var t=function(t){function n(n){var r=t.call(this,n)||this;return r.componentDidMount=function(){Ol.events.addEventListener(Ol.RENDER_EVENT,r.onRenderEvent),Ol.setComponentReady()},r.componentDidUpdate=function(){null!=r.state.componentError&&Ol.setFrameHeight()},r.componentWillUnmount=function(){Ol.events.removeEventListener(Ol.RENDER_EVENT,r.onRenderEvent)},r.onRenderEvent=function(e){var t=e;r.setState({renderData:t.detail})},r.render=function(){return null!=r.state.componentError?h.a.createElement("div",null,h.a.createElement("h1",null,"Component Error"),h.a.createElement("span",null,r.state.componentError.message)):null==r.state.renderData?null:h.a.createElement(e,{width:window.innerWidth,disabled:r.state.renderData.disabled,args:r.state.renderData.args,theme:r.state.renderData.theme})},r.state={renderData:void 0,componentError:void 0},r}return jl(n,t),n.getDerivedStateFromError=function(e){return{componentError:e}},n}(h.a.PureComponent);return l()(t,e)}},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,n){"use strict";var r=n(12),i=n.n(r);t.a=function(e,t){return i()(e,t)}},function(e,t,n){"use strict";var r=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t0?b(I,--S):0,x--,10===T&&(x=1,O--),T}function D(){return T=S2||M(T)>3?"":" "}function z(e,t){for(;--t&&D()&&!(T<48||T>102||T>57&&T<65||T>70&&T<97););return F(e,L()+(t<6&&32==C()&&32==D()))}function V(e,t){for(;D()&&e+T!==57&&(e+T!==84||47!==C()););return"/*"+F(t,S-1)+"*"+h(47===e?e:D())}function W(e){for(;!M(C());)D();return F(e,S)}function $(e){return P(function e(t,n,r,i,a,o,u,s,c){var l=0,f=0,d=u,p=0,b=0,m=0,k=1,_=1,O=1,x=0,j="",S=a,T=o,I=i,E=j;for(;_;)switch(m=x,x=D()){case 40:if(108!=m&&58==E.charCodeAt(d-1)){-1!=v(E+=y(U(x),"&","&\f"),"&\f")&&(O=-1);break}case 34:case 39:case 91:E+=U(x);break;case 9:case 10:case 13:case 32:E+=R(m);break;case 92:E+=z(L()-1,7);continue;case 47:switch(C()){case 42:case 47:w(Y(V(D(),L()),n,r),c);break;default:E+="/"}break;case 123*k:s[l++]=g(E)*O;case 125*k:case 59:case 0:switch(x){case 0:case 125:_=0;case 59+f:b>0&&g(E)-d&&w(b>32?K(E+";",i,r,d-1):K(y(E," ","")+";",i,r,d-2),c);break;case 59:E+=";";default:if(w(I=H(E,n,r,l,f,a,s,j,S=[],T=[],d),o),123===x)if(0===f)e(E,n,I,I,S,o,d,s,T);else switch(p){case 100:case 109:case 115:e(t,I,I,i&&w(H(t,I,I,0,0,a,s,j,a,S=[],d),T),a,T,d,s,i?S:T);break;default:e(E,I,I,I,[""],T,0,s,T)}}l=f=b=0,k=O=1,j=E="",d=u;break;case 58:d=1+g(E),b=m;default:if(k<1)if(123==x)--k;else if(125==x&&0==k++&&125==B())continue;switch(E+=h(x),x*k){case 38:O=f>0?1:(E+="\f",-1);break;case 44:s[l++]=(g(E)-1)*O,O=1;break;case 64:45===C()&&(E+=U(D())),p=C(),f=d=g(j=E+=W(L())),x++;break;case 45:45===m&&2==g(E)&&(k=0)}}return o}("",null,null,null,[""],e=N(e),0,[0],e))}function H(e,t,n,r,i,a,o,u,c,l,h){for(var d=i-1,v=0===i?a:[""],b=k(v),g=0,w=0,_=0;g0?v[O]+" "+x:y(x,/&\f/g,v[O])))&&(c[_++]=j);return E(e,t,n,0===i?s:u,c,l,h)}function Y(e,t,n){return E(e,t,n,u,h(T),m(e,2,-2),0)}function K(e,t,n,r){return E(e,t,n,c,m(e,0,r),m(e,r+1,-1),r)}function Q(e,t){switch(function(e,t){return(((t<<2^b(e,0))<<2^b(e,1))<<2^b(e,2))<<2^b(e,3)}(e,t)){case 5103:return o+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return o+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return o+e+a+e+i+e+e;case 6828:case 4268:return o+e+i+e+e;case 6165:return o+e+i+"flex-"+e+e;case 5187:return o+e+y(e,/(\w+).+(:[^]+)/,o+"box-$1$2"+i+"flex-$1$2")+e;case 5443:return o+e+i+"flex-item-"+y(e,/flex-|-self/,"")+e;case 4675:return o+e+i+"flex-line-pack"+y(e,/align-content|flex-|-self/,"")+e;case 5548:return o+e+i+y(e,"shrink","negative")+e;case 5292:return o+e+i+y(e,"basis","preferred-size")+e;case 6060:return o+"box-"+y(e,"-grow","")+o+e+i+y(e,"grow","positive")+e;case 4554:return o+y(e,/([^-])(transform)/g,"$1"+o+"$2")+e;case 6187:return y(y(y(e,/(zoom-|grab)/,o+"$1"),/(image-set)/,o+"$1"),e,"")+e;case 5495:case 3959:return y(e,/(image-set\([^]*)/,o+"$1$`$1");case 4968:return y(y(e,/(.+:)(flex-)?(.*)/,o+"box-pack:$3"+i+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+o+e+e;case 4095:case 3583:case 4068:case 2532:return y(e,/(.+)-inline(.+)/,o+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(g(e)-1-t>6)switch(b(e,t+1)){case 109:if(45!==b(e,t+4))break;case 102:return y(e,/(.+:)(.+)-([^]+)/,"$1"+o+"$2-$3$1"+a+(108==b(e,t+3)?"$3":"$2-$3"))+e;case 115:return~v(e,"stretch")?Q(y(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==b(e,t+1))break;case 6444:switch(b(e,g(e)-3-(~v(e,"!important")&&10))){case 107:return y(e,":",":"+o)+e;case 101:return y(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+o+(45===b(e,14)?"inline-":"")+"box$3$1"+o+"$2$3$1"+i+"$2box$3")+e}break;case 5936:switch(b(e,t+11)){case 114:return o+e+i+y(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return o+e+i+y(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return o+e+i+y(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return o+e+i+e+e}return e}function q(e,t){for(var n="",r=k(e),i=0;i-1&&!e.return)switch(e.type){case c:e.return=Q(e.value,e.length);break;case l:return q([A(e,{value:y(e.value,"@","@"+o)})],r);case s:if(e.length)return _(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return q([A(e,{props:[y(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return q([A(e,{props:[y(t,/:(plac\w+)/,":"+o+"input-$1")]}),A(e,{props:[y(t,/:(plac\w+)/,":-moz-$1")]}),A(e,{props:[y(t,/:(plac\w+)/,i+"input-$1")]})],r)}return""}))}}];t.a=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var i=e.stylisPlugins||re;var a,o,u={},s=[];a=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n96?f:h},p=function(e,t,n){var r;if(t){var i=t.shouldForwardProp;r=e.__emotion_forwardProp&&i?function(t){return e.__emotion_forwardProp(t)&&i(t)}:i}return"function"!==typeof r&&n&&(r=e.__emotion_forwardProp),r},y=r.useInsertionEffect?r.useInsertionEffect:function(e){e()};var v=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;Object(c.c)(t,n,r);y((function(){return Object(c.b)(t,n,r)}));return null},b=function e(t,n){var i,a,o=t.__emotion_real===t,f=o&&t.__emotion_base||t;void 0!==n&&(i=n.label,a=n.target);var h=p(t,n,o),y=h||d(f),b=!y("as");return function(){var m=arguments,g=o&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==i&&g.push("label:"+i+";"),null==m[0]||void 0===m[0].raw)g.push.apply(g,m);else{0,g.push(m[0][0]);for(var k=m.length,w=1;wA.length&&A.push(e)}function C(e,t,n){return null==e?0:function e(t,n,r,i){var u=typeof t;"undefined"!==u&&"boolean"!==u||(t=null);var s=!1;if(null===t)s=!0;else switch(u){case"string":case"number":s=!0;break;case"object":switch(t.$$typeof){case a:case o:s=!0}}if(s)return r(i,t,""===n?"."+L(t,0):n),1;if(s=0,n=""===n?".":n+":",Array.isArray(t))for(var c=0;c