diff --git "a/streamlit_observable/frontend/build/static/js/2.c66b223a.chunk.js" "b/streamlit_observable/frontend/build/static/js/2.c66b223a.chunk.js" new file mode 100644--- /dev/null +++ "b/streamlit_observable/frontend/build/static/js/2.c66b223a.chunk.js" @@ -0,0 +1,3 @@ +/*! For license information please see 2.c66b223a.chunk.js.LICENSE.txt */ +(this.webpackJsonpstreamlit_component_template=this.webpackJsonpstreamlit_component_template||[]).push([[2],[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",(function(){return r}))},function(e,t,n){e.exports=n(46)},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(23);function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Object(r.a)(e,t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(9),i=n(28),a=n(21);function o(e){return function(){var t,n=Object(r.a)(e);if(Object(i.a)()){var o=Object(r.a)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return Object(a.a)(this,t)}}},function(e,t,n){"use strict";function r(e,t){for(var n=0;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 i,a,o=!0,u=!1;return{s:function(){i=e[Symbol.iterator]()},n:function(){var e=i.next();return o=e.done,e},e:function(e){u=!0,a=e},f:function(){try{o||null==i.return||i.return()}finally{if(u)throw a}}}}},function(e,t,n){"use strict";function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(11);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:new c.b,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:A,n=this.module();if(Object.defineProperties(this,{_dirty:{value:new Set},_updates:{value:new Set},_precomputes:{value:[],writable:!0},_computing:{value:null,writable:!0},_init:{value:null,writable:!0},_modules:{value:new Map},_variables:{value:new Set},_disposed:{value:!1,writable:!0},_builtin:{value:n},_global:{value:t}}),e)for(var r in e)new p.d(p.b,n).define(r,[],e[r])}function g(){return(g=Object(u.a)(i.a.mark((function e(){var t,n,r,a,u,c,l;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(l=function(e){0===--e._indegree&&t.push(e)},t=[],!(a=this._precomputes).length){e.next=8;break}this._precomputes=[],u=Object(o.a)(a);try{for(u.s();!(c=u.n()).done;)(0,c.value)()}catch(i){u.e(i)}finally{u.f()}return e.next=8,w(3);case 8:(n=new Set(this._dirty)).forEach((function(e){e._inputs.forEach(n.add,n);var t=E(e);t>e._reachable?this._updates.add(e):t0&&void 0!==arguments[0]?arguments[0]:0,t=Promise.resolve(),n=0;n1&&void 0!==arguments[1]?arguments[1]:d.a;if(void 0===e)return(t=this._init)?(this._init=null,t):new h.a(this);if(t=this._modules.get(e))return t;this._init=t=new h.a(this),this._modules.set(e,t);try{e(this,n)}finally{this._init=null}return t},writable:!0,configurable:!0},fileAttachments:{value:c.a,writable:!0,configurable:!0}})}).call(this,n(49).setImmediate)},function(e,t,n){"use strict";n.d(t,"a",(function(){return Ue})),n.d(t,"b",(function(){return gt}));var r=n(16),i=n(2),a=n(3),o=n(7),u=n(1),c=n.n(u),s=n(0),l=n(4),f=n(5),h={},d={};function p(e){return new Function("d","return {"+e.map((function(e,t){return JSON.stringify(e)+": d["+t+'] || ""'})).join(",")+"}")}function v(e){var t=Object.create(null),n=[];return e.forEach((function(e){for(var r in e)r in t||n.push(t[r]=r)})),n}function y(e,t){var n=e+"",r=n.length;return r9999?"+"+y(t,6):y(t,4))+"-"+y(e.getUTCMonth()+1,2)+"-"+y(e.getUTCDate(),2)+(a?"T"+y(n,2)+":"+y(r,2)+":"+y(i,2)+"."+y(a,3)+"Z":i?"T"+y(n,2)+":"+y(r,2)+":"+y(i,2)+"Z":r||n?"T"+y(n,2)+":"+y(r,2)+"Z":"")}var m=function(e){var t=new RegExp('["'+e+"\n\r]"),n=e.charCodeAt(0);function r(e,t){var r,i=[],a=e.length,o=0,u=0,c=a<=0,s=!1;function l(){if(c)return d;if(s)return s=!1,h;var t,r,i=o;if(34===e.charCodeAt(i)){for(;o++=a?c=!0:10===(r=e.charCodeAt(o++))?s=!0:13===r&&(s=!0,10===e.charCodeAt(o)&&++o),e.slice(i+1,t-1).replace(/""/g,'"')}for(;o1?Promise.all(L.call(arguments,n)).then(Q):n(e)}return a.alias=function(t){return K((function(n,r){return n in t&&(r=null,"string"!==typeof(n=t[n]))?n:e(n,r)}))},a.resolve=e,a}function Q(e){var t,n={},r=Object(T.a)(e);try{for(r.s();!(t=r.n()).done;){var i=t.value;for(var a in i)F.call(i,a)&&(null==i[a]?Object.defineProperty(n,a,{get:G(i,a)}):n[a]=i[a])}}catch(o){r.e(o)}finally{r.f()}return n}function G(e,t){return function(){return e[t]}}function J(e){return"exports"===(e+="")||"module"===e}function Z(e,t,n){var r=arguments.length;r<2?(n=e,t=[]):r<3&&(n=t,t="string"===typeof e?[]:e),D.push(N.call(t,J)?function(e){var r={},i={exports:r};return Promise.all(L.call(t,(function(t){return"exports"===(t+="")?r:"module"===t?i:e(t)}))).then((function(e){return n.apply(null,e),i.exports}))}:function(e){return Promise.all(L.call(t,e)).then((function(e){return"function"===typeof n?n.apply(null,e):n}))})}function X(e,t,n){return{resolve:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:n;return"https://cdn.jsdelivr.net/npm/".concat(e,"@").concat(t,"/").concat(r)}}}Z.amd={};var ee=X("d3","7.1.1","dist/d3.min.js"),te=X("@observablehq/inputs","0.10.3","dist/inputs.min.js"),ne=X("@observablehq/plot","0.2.9","dist/plot.umd.min.js"),re=X("@observablehq/graphviz","0.2.1","dist/graphviz.min.js"),ie=X("@observablehq/highlight.js","2.0.0","highlight.min.js"),ae=X("@observablehq/katex","0.11.1","dist/katex.min.js"),oe=X("lodash","4.17.21","lodash.min.js"),ue=X("htl","0.3.1","dist/htl.min.js"),ce=X("jszip","3.7.1","dist/jszip.min.js"),se=X("marked","0.3.12","marked.min.js"),le=X("sql.js","1.6.2","dist/sql-wasm.js"),fe=X("vega","5.21.0","build/vega.min.js"),he=X("vega-lite","5.1.1","build/vega-lite.min.js"),de=X("vega-lite-api","5.0.0","build/vega-lite-api.min.js"),pe=X("apache-arrow","4.0.1","Arrow.es2015.min.js"),ve=X("arquero","4.8.7","dist/arquero.min.js"),ye=X("topojson-client","3.1.0","dist/topojson-client.min.js"),be=X("exceljs","4.3.0","dist/exceljs.min.js");function me(e){return ge.apply(this,arguments)}function ge(){return(ge=Object(f.a)(c.a.mark((function e(t){var n;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t(le.resolve());case 2:return n=e.sent,e.abrupt("return",n({locateFile:function(e){return le.resolve("dist/".concat(e))}}));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var we=function(){function e(t){Object(s.a)(this,e),Object.defineProperties(this,{_db:{value:t}})}return Object(l.a)(e,[{key:"query",value:function(){var e=Object(f.a)(c.a.mark((function e(t,n){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,_e(this._db,t,n);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"queryRow",value:function(){var e=Object(f.a)(c.a.mark((function e(t,n){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.query(t,n);case 2:if(e.t0=e.sent[0],e.t0){e.next=5;break}e.t0=null;case 5:return e.abrupt("return",e.t0);case 6:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"explain",value:function(){var e=Object(f.a)(c.a.mark((function e(t,n){var r;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.query("EXPLAIN QUERY PLAN ".concat(t),n);case 2:return r=e.sent,e.abrupt("return",xe("pre",{className:"observablehq--inspect"},[je(r.map((function(e){return e.detail})).join("\n"))]));case 4:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"describe",value:function(){var e=Object(f.a)(c.a.mark((function e(t){var n,r;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,void 0===t?this.query("SELECT name FROM sqlite_master WHERE type = 'table'"):this.query("SELECT * FROM pragma_table_info(?)",[t]);case 2:if((n=e.sent).length){e.next=5;break}throw new Error("Not found");case 5:return r=n.columns,e.abrupt("return",xe("table",{value:n},[xe("thead",[xe("tr",r.map((function(e){return xe("th",[je(e)])})))]),xe("tbody",n.map((function(e){return xe("tr",r.map((function(t){return xe("td",[je(e[t])])})))})))]));case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"sql",value:function(){var e=Object(f.a)(c.a.mark((function e(t){var n,r,i,a=arguments;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(n=a.length,r=new Array(n>1?n-1:0),i=1;i1&&void 0!==arguments[1]?arguments[1]:{},n=t.range,r=t.headers,i=Ee(n,e),a=Object(o.a)(i,2),u=Object(o.a)(a[0],2),c=u[0],s=u[1],l=Object(o.a)(a[1],2),f=l[0],h=l[1],d=r?e._rows[s++]:null,p=new Set(["#"]),v=c;v<=f;v++){for(var y=d?Te(d.findCell(v+1)):null,b=y&&y+""||Ae(v);p.has(b);)b+="_";p.add(b)}p=new Array(c).concat(Array.from(p));for(var m=new Array(h-s+1),g=s;g<=h;g++){var w=m[g-s]=Object.create(null,{"#":{value:g+1}}),k=e.getRow(g+1);if(k.hasValues)for(var _=c;_<=f;_++){var O=Te(k.findCell(_+1));null!=O&&(w[p[_+1]]=O)}}return m.columns=p.filter((function(){return!0})),m}(r,t)}}]),e}();function Te(e){if(e){var t=e.value;if(t&&"object"===typeof t&&!(t instanceof Date)){if(t.formula||t.sharedFormula)return t.result&&t.result.error?NaN:t.result;if(t.richText)return Ie(t);if(t.text){var n=t.text;return n.richText&&(n=Ie(n)),t.hyperlink&&t.hyperlink!==n?"".concat(t.hyperlink," ").concat(n):n}return t}return t}}function Ie(e){return e.richText.map((function(e){return e.text})).join("")}function Ee(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:":",t=arguments.length>1?arguments[1]:void 0,n=t.columnCount,r=t.rowCount;if(!(e+="").match(/^[A-Z]*\d*:[A-Z]*\d*$/))throw new Error("Malformed range specifier");var i=e.split(":").map(Be),a=Object(o.a)(i,2),u=Object(o.a)(a[0],2),c=u[0],s=void 0===c?0:c,l=u[1],f=void 0===l?0:l,h=Object(o.a)(a[1],2),d=h[0],p=void 0===d?n-1:d,v=h[1],y=void 0===v?r-1:v;return[[s,f],[p,y]]}function Ae(e){var t="";e++;do{t=String.fromCharCode(64+(e%26||26))+t}while(e=Math.floor((e-1)/26));return t}function Be(e){var t=e.match(/^([A-Z]*)(\d*)$/),n=Object(o.a)(t,3),r=n[1],i=n[2],a=0;if(r)for(var u=0;u2&&void 0!==l[2]?l[2]:{},i=r.array,a=void 0!==i&&i,o=r.typed,u=void 0!==o&&o,e.next=3,t.text();case 3:return s=e.sent,e.abrupt("return",("\t"===n?a?k:w:a?x:O)(s,u&&j));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Fe=function(){function e(t){Object(s.a)(this,e),Object.defineProperty(this,"name",{value:t,enumerable:!0})}return Object(l.a)(e,[{key:"blob",value:function(){var e=Object(f.a)(c.a.mark((function e(){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ce(this);case 2:return e.abrupt("return",e.sent.blob());case 3:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"arrayBuffer",value:function(){var e=Object(f.a)(c.a.mark((function e(){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ce(this);case 2:return e.abrupt("return",e.sent.arrayBuffer());case 3:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"text",value:function(){var e=Object(f.a)(c.a.mark((function e(){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ce(this);case 2:return e.abrupt("return",e.sent.text());case 3:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"json",value:function(){var e=Object(f.a)(c.a.mark((function e(){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ce(this);case 2:return e.abrupt("return",e.sent.json());case 3:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"stream",value:function(){var e=Object(f.a)(c.a.mark((function e(){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ce(this);case 2:return e.abrupt("return",e.sent.body);case 3:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"csv",value:function(){var e=Object(f.a)(c.a.mark((function e(t){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Le(this,",",t));case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"tsv",value:function(){var e=Object(f.a)(c.a.mark((function e(t){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Le(this,"\t",t));case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"image",value:function(){var e=Object(f.a)(c.a.mark((function e(t){var n,r=this;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.url();case 2:return n=e.sent,e.abrupt("return",new Promise((function(e,i){var a=new Image;new URL(n,document.baseURI).origin!==new URL(location).origin&&(a.crossOrigin="anonymous"),Object.assign(a,t),a.onload=function(){return e(a)},a.onerror=function(){return i(new Error("Unable to load file: ".concat(r.name)))},a.src=n})));case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"arrow",value:function(){var e=Object(f.a)(c.a.mark((function e(){var t,n,r,i;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([$(pe.resolve()),Ce(this)]);case 2:return t=e.sent,n=Object(o.a)(t,2),r=n[0],i=n[1],e.abrupt("return",r.Table.from(i));case 7:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"sqlite",value:function(){var e=Object(f.a)(c.a.mark((function e(){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",we.open(Ce(this)));case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"zip",value:function(){var e=Object(f.a)(c.a.mark((function e(){var t,n,r,i;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([$(ce.resolve()),this.arrayBuffer()]);case 2:return t=e.sent,n=Object(o.a)(t,2),r=n[0],i=n[1],e.t0=Re,e.next=9,r.loadAsync(i);case 9:return e.t1=e.sent,e.abrupt("return",new e.t0(e.t1));case 11:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"xml",value:function(){var e=Object(f.a)(c.a.mark((function e(){var t,n=arguments;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:"application/xml",e.t0=new DOMParser,e.next=4,this.text();case 4:return e.t1=e.sent,e.t2=t,e.abrupt("return",e.t0.parseFromString.call(e.t0,e.t1,e.t2));case 7:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"html",value:function(){var e=Object(f.a)(c.a.mark((function e(){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.xml("text/html"));case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"xlsx",value:function(){var e=Object(f.a)(c.a.mark((function e(){var t,n,r,i;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([$(be.resolve()),this.arrayBuffer()]);case 2:return t=e.sent,n=Object(o.a)(t,2),r=n[0],i=n[1],e.t0=Se,e.next=9,(new r.Workbook).xlsx.load(i);case 9:return e.t1=e.sent,e.abrupt("return",new e.t0(e.t1));case 11:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),e}(),Me=function(e){Object(i.a)(n,e);var t=Object(a.a)(n);function n(e,i){var a;return Object(s.a)(this,n),a=t.call(this,i),Object.defineProperty(Object(r.a)(a),"_url",{value:e}),a}return Object(l.a)(n,[{key:"url",value:function(){var e=Object(f.a)(c.a.mark((function e(){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._url;case 2:return e.t0=e.sent,e.abrupt("return",e.t0+"");case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),n}(Fe);function Pe(e){throw new Error("File not found: ".concat(e))}function Ue(e){return Object.assign((function(t){var n=e(t+="");if(null==n)throw new Error("File not found: ".concat(t));return new Me(n,t)}),{prototype:Me.prototype})}var Re=function(){function e(t){Object(s.a)(this,e),Object.defineProperty(this,"_",{value:t}),this.filenames=Object.keys(t.files).filter((function(e){return!t.files[e].dir}))}return Object(l.a)(e,[{key:"file",value:function(e){var t=this._.file(e+="");if(!t||t.dir)throw new Error("file not found: ".concat(e));return new ze(t)}}]),e}(),ze=function(e){Object(i.a)(n,e);var t=Object(a.a)(n);function n(e){var i;return Object(s.a)(this,n),i=t.call(this,e.name),Object.defineProperty(Object(r.a)(i),"_",{value:e}),Object.defineProperty(Object(r.a)(i),"_url",{writable:!0}),i}return Object(l.a)(n,[{key:"url",value:function(){var e=Object(f.a)(c.a.mark((function e(){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this._url||(this._url=this.blob().then(URL.createObjectURL)));case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"blob",value:function(){var e=Object(f.a)(c.a.mark((function e(){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this._.async("blob"));case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"arrayBuffer",value:function(){var e=Object(f.a)(c.a.mark((function e(){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this._.async("arraybuffer"));case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"text",value:function(){var e=Object(f.a)(c.a.mark((function e(){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this._.async("text"));case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"json",value:function(){var e=Object(f.a)(c.a.mark((function e(){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=JSON,e.next=3,this.text();case 3:return e.t1=e.sent,e.abrupt("return",e.t0.parse.call(e.t0,e.t1));case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),n}(Fe),Ve=n(10),We={math:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},Ye=0;function qe(e){this.id=e,this.href=new URL("#".concat(e),location)+""}qe.prototype.toString=function(){return"url("+this.href+")"};var He={canvas:function(e,t){var n=document.createElement("canvas");return n.width=e,n.height=t,n},context2d:function(e,t,n){null==n&&(n=devicePixelRatio);var r=document.createElement("canvas");r.width=e*n,r.height=t*n,r.style.width=e+"px";var i=r.getContext("2d");return i.scale(n,n),i},download:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"untitled",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Save",r=document.createElement("a"),i=r.appendChild(document.createElement("button"));function a(){return o.apply(this,arguments)}function o(){return(o=Object(f.a)(c.a.mark((function e(){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise(requestAnimationFrame);case 2:URL.revokeObjectURL(r.href),r.removeAttribute("href"),i.textContent=n,i.disabled=!1;case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return i.textContent=n,r.download=t,r.onclick=function(){var t=Object(f.a)(c.a.mark((function t(o){var u;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i.disabled=!0,!r.href){t.next=3;break}return t.abrupt("return",a());case 3:return i.textContent="Saving\u2026",t.prev=4,t.next=7,"function"===typeof e?e():e;case 7:u=t.sent,i.textContent="Download",r.href=URL.createObjectURL(u),t.next=15;break;case 12:t.prev=12,t.t0=t.catch(4),i.textContent=n;case 15:if(!o.eventPhase){t.next=17;break}return t.abrupt("return",a());case 17:i.disabled=!1;case 18:case"end":return t.stop()}}),t,null,[[4,12]])})));return function(e){return t.apply(this,arguments)}}(),r},element:function(e,t){var n,r=e+="",i=r.indexOf(":");i>=0&&"xmlns"!==(r=e.slice(0,i))&&(e=e.slice(i+1));var a=We.hasOwnProperty(r)?document.createElementNS(We[r],e):document.createElement(e);if(t)for(var o in t)i=(r=o).indexOf(":"),n=t[o],i>=0&&"xmlns"!==(r=o.slice(0,i))&&(o=o.slice(i+1)),We.hasOwnProperty(r)?a.setAttributeNS(We[r],o,n):a.setAttribute(o,n);return a},input:function(e){var t=document.createElement("input");return null!=e&&(t.type=e),t},range:function(e,t,n){1===arguments.length&&(t=e,e=null);var r=document.createElement("input");return r.min=e=null==e?0:+e,r.max=t=null==t?1:+t,r.step=null==n?"any":n=+n,r.type="range",r},select:function(e){var t=document.createElement("select");return Array.prototype.forEach.call(e,(function(e){var n=document.createElement("option");n.value=n.textContent=e,t.appendChild(n)})),t},svg:function(e,t){var n=document.createElementNS("http://www.w3.org/2000/svg","svg");return n.setAttribute("viewBox",[0,0,e,t]),n.setAttribute("width",e),n.setAttribute("height",t),n},text:function(e){return document.createTextNode(e)},uid:function(e){return new qe("O-"+(null==e?"":e+"-")+ ++Ye)}},$e={buffer:function(e){return new Promise((function(t,n){var r=new FileReader;r.onload=function(){t(r.result)},r.onerror=n,r.readAsArrayBuffer(e)}))},text:function(e){return new Promise((function(t,n){var r=new FileReader;r.onload=function(){t(r.result)},r.onerror=n,r.readAsText(e)}))},url:function(e){return new Promise((function(t,n){var r=new FileReader;r.onload=function(){t(r.result)},r.onerror=n,r.readAsDataURL(e)}))}},Ke=n(11);function Qe(){return this}function Ge(e,t){var n,r=!1;if("function"!==typeof t)throw new Error("dispose is not a function");return n={},Object(Ke.a)(n,Symbol.iterator,Qe),Object(Ke.a)(n,"next",(function(){return r?{done:!0}:(r=!0,{done:!1,value:e})})),Object(Ke.a)(n,"return",(function(){return r=!0,t(e),{done:!0}})),Object(Ke.a)(n,"throw",(function(){return{done:r=!0}})),n}var Je=c.a.mark(Ze);function Ze(e,t){var n,r;return c.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:r=-1;case 1:if((n=e.next()).done){i.next=7;break}if(!t(n.value,++r)){i.next=5;break}return i.next=5,n.value;case 5:i.next=1;break;case 7:case"end":return i.stop()}}),Je)}var Xe=function(e){var t,n,r,i=!1,a=e((function(e){r?(r(e),r=null):i=!0;return n=e}));if(null!=a&&"function"!==typeof a)throw new Error("function"===typeof a.then?"async initializers are not supported":"initializer returned something, but not a dispose function");return t={},Object(Ke.a)(t,Symbol.iterator,Qe),Object(Ke.a)(t,"throw",(function(){return{done:!0}})),Object(Ke.a)(t,"return",(function(){return null!=a&&a(),{done:!0}})),Object(Ke.a)(t,"next",(function(){return{done:!1,value:i?(i=!1,Promise.resolve(n)):new Promise((function(e){return r=e}))}})),t};function et(e){switch(e.type){case"range":case"number":return e.valueAsNumber;case"date":return e.valueAsDate;case"checkbox":return e.checked;case"file":return e.multiple?e.files:e.files[0];case"select-multiple":return Array.from(e.selectedOptions,(function(e){return e.value}));default:return e.value}}var tt=c.a.mark(nt);function nt(e,t){var n,r;return c.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:r=-1;case 1:if((n=e.next()).done){i.next=6;break}return i.next=4,t(n.value,++r);case 4:i.next=1;break;case 6:case"end":return i.stop()}}),tt)}var rt=c.a.mark(it);function it(e,t,n){var r,i,a=arguments;return c.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:e=+e,t=+t,n=(i=a.length)<2?(t=e,e=0,1):i<3?1:+n,r=-1,i=0|Math.max(0,Math.ceil((t-e)/n));case 4:if(!(++r0){for(a=new Array(p),o=document.createTreeWalker(d,NodeFilter.SHOW_COMMENT,null,!1);o.nextNode();)i=o.currentNode,/^o:/.test(i.nodeValue)&&(a[+i.nodeValue.slice(2)]=i);for(u=0;u=e?Promise.resolve(t):function(e,t){var n=new Promise((function(n){ft.delete(t);var r=t-e;if(!(r>0))throw new Error("invalid time");if(r>2147483647)throw new Error("too long to wait");setTimeout(n,r)}));return ft.set(t,n),n}(n,e).then((function(){return t}))}var dt={delay:function(e,t){return new Promise((function(n){setTimeout((function(){n(t)}),e)}))},tick:function(e,t){return ht(Math.ceil((Date.now()+1)/e)*e,t)},when:ht};function pt(e,t){if(/^(\w+:)|\/\//i.test(e))return e;if(/^[.]{0,2}\//i.test(e))return new URL(e,null==t?location:t).href;if(!e.length||/^[\s._]/.test(e)||/\s$/.test(e))throw new Error("illegal name");return"https://unpkg.com/"+e}var vt=ot((function(e){var t=document.createElementNS("http://www.w3.org/2000/svg","g");return t.innerHTML=e.trim(),t}),(function(){return document.createElementNS("http://www.w3.org/2000/svg","g")})),yt=String.raw;function bt(){return(bt=Object(f.a)(c.a.mark((function e(t){var n,r,i,a,u;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([fe,he,de].map((function(e){return t(e.resolve())})));case 2:return n=e.sent,r=Object(o.a)(n,3),i=r[0],a=r[1],u=r[2],e.abrupt("return",u.register(i,a));case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var mt=function(){return Xe((function(e){var t=e(document.body.clientWidth);function n(){var n=document.body.clientWidth;n!==t&&e(t=n)}return window.addEventListener("resize",n),function(){window.removeEventListener("resize",n)}}))},gt=Object.assign((function(e){var t,n,r=null==(t=e)?$:K(t);Object.defineProperties(this,(n={FileAttachment:function(){return Pe},Arrow:function(){return r(pe.resolve())},Inputs:function(){return r(te.resolve()).then((function(e){return Object(Ve.a)(Object(Ve.a)({},e),{},{file:e.fileOf(Fe)})}))},Mutable:function(){return ct},Plot:function(){return r(ne.resolve())},SQLite:function(){return me(r)},SQLiteDatabaseClient:function(){return we},_:function(){return r(oe.resolve())},aq:function(){return r.alias({"apache-arrow":pe.resolve()})(ve.resolve())},d3:function(){return r(ee.resolve())},dot:function(){return r(re.resolve())},htl:function(){return r(ue.resolve())},html:function(){return ut},md:function(){return(e=r)(se.resolve()).then((function(t){return ot((function(n){var r=document.createElement("div");r.innerHTML=t(n,{langPrefix:""}).trim();var i=r.querySelectorAll("pre code[class]");return i.length>0&&e(ie.resolve()).then((function(t){i.forEach((function(n){function r(){t.highlightBlock(n),n.parentNode.classList.add("observablehq--md-pre")}t.getLanguage(n.className)?r():e(ie.resolve("async-languages/index.js")).then((function(r){if(r.has(n.className))return e(ie.resolve("async-languages/"+r.get(n.className))).then((function(e){t.registerLanguage(n.className,e)}))})).then(r,r)}))})),r}),(function(){return document.createElement("div")}))}));var e},now:lt,require:function(){return r},resolve:function(){return pt},svg:function(){return vt},tex:function(){return function(e){return Promise.all([e(ae.resolve()),(t=ae.resolve("dist/katex.min.css"),new Promise((function(e,n){var r=document.createElement("link");r.rel="stylesheet",r.href=t,r.onerror=n,r.onload=e,document.head.appendChild(r)})))]).then((function(e){var t=e[0],n=r();function r(e){return function(){var n=document.createElement("div");return t.render(yt.apply(String,arguments),n,e),n.removeChild(n.firstChild)}}return n.options=r,n.block=r({displayMode:!0}),n}));var t}(r)},topojson:function(){return r(ye.resolve())},vl:function(){return function(e){return bt.apply(this,arguments)}(r)},width:mt,DOM:He,Files:$e,Generators:at,Promises:dt},Object.fromEntries(Object.entries(n).map(wt))))}),{resolve:$.resolve});function wt(e){var t=Object(o.a)(e,2);return[t[0],{value:t[1],writable:!0,enumerable:!0}]}},function(e,t,n){"use strict";function r(e){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.d(t,"a",(function(){return a}));var i=n(16);function a(e,t){return!t||"object"!==r(t)&&"function"!==typeof t?Object(i.a)(e):t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(25);function i(e,t){if(e){if("string"===typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return wt})),n.d(t,"a",(function(){return cs}));var r={};n.r(r),n.d(r,"memcpy",(function(){return ve})),n.d(r,"joinUint8Arrays",(function(){return ye})),n.d(r,"toArrayBufferView",(function(){return be})),n.d(r,"toInt8Array",(function(){return me})),n.d(r,"toInt16Array",(function(){return ge})),n.d(r,"toInt32Array",(function(){return we})),n.d(r,"toBigInt64Array",(function(){return ke})),n.d(r,"toUint8Array",(function(){return _e})),n.d(r,"toUint16Array",(function(){return Oe})),n.d(r,"toUint32Array",(function(){return xe})),n.d(r,"toBigUint64Array",(function(){return je})),n.d(r,"toFloat32Array",(function(){return Se})),n.d(r,"toFloat64Array",(function(){return Te})),n.d(r,"toUint8ClampedArray",(function(){return Ie})),n.d(r,"toArrayBufferViewIterator",(function(){return Ae})),n.d(r,"toInt8ArrayIterator",(function(){return Be})),n.d(r,"toInt16ArrayIterator",(function(){return Ce})),n.d(r,"toInt32ArrayIterator",(function(){return De})),n.d(r,"toUint8ArrayIterator",(function(){return Le})),n.d(r,"toUint16ArrayIterator",(function(){return Ne})),n.d(r,"toUint32ArrayIterator",(function(){return Fe})),n.d(r,"toFloat32ArrayIterator",(function(){return Me})),n.d(r,"toFloat64ArrayIterator",(function(){return Pe})),n.d(r,"toUint8ClampedArrayIterator",(function(){return Ue})),n.d(r,"toArrayBufferViewAsyncIterator",(function(){return Re})),n.d(r,"toInt8ArrayAsyncIterator",(function(){return Ve})),n.d(r,"toInt16ArrayAsyncIterator",(function(){return We})),n.d(r,"toInt32ArrayAsyncIterator",(function(){return Ye})),n.d(r,"toUint8ArrayAsyncIterator",(function(){return qe})),n.d(r,"toUint16ArrayAsyncIterator",(function(){return He})),n.d(r,"toUint32ArrayAsyncIterator",(function(){return $e})),n.d(r,"toFloat32ArrayAsyncIterator",(function(){return Ke})),n.d(r,"toFloat64ArrayAsyncIterator",(function(){return Qe})),n.d(r,"toUint8ClampedArrayAsyncIterator",(function(){return Ge})),n.d(r,"rebaseValueOffsets",(function(){return Je})),n.d(r,"compareArrayLike",(function(){return Ze}));var i={};n.r(i),n.d(i,"getBool",(function(){return At})),n.d(i,"getBit",(function(){return Bt})),n.d(i,"setBool",(function(){return Ct})),n.d(i,"truncateBitmap",(function(){return Dt})),n.d(i,"packBools",(function(){return Lt})),n.d(i,"iterateBits",(function(){return Nt})),n.d(i,"popcnt_bit_range",(function(){return Ft})),n.d(i,"popcnt_array",(function(){return Mt})),n.d(i,"popcnt_uint32",(function(){return Pt}));var a={};n.r(a),n.d(a,"uint16ToFloat64",(function(){return cr})),n.d(a,"float64ToUint16",(function(){return sr}));var o={};n.r(o),n.d(o,"isArrowBigNumSymbol",(function(){return br})),n.d(o,"bignumToString",(function(){return lr})),n.d(o,"bignumToBigInt",(function(){return fr})),n.d(o,"BN",(function(){return jr}));var u={};n.r(u),n.d(u,"clampIndex",(function(){return hi})),n.d(u,"clampRange",(function(){return di})),n.d(u,"createElementComparator",(function(){return yi}));var c={};n.r(c),n.d(c,"BaseInt64",(function(){return Da})),n.d(c,"Uint64",(function(){return La})),n.d(c,"Int64",(function(){return Na})),n.d(c,"Int128",(function(){return Fa}));var s=n(8),l=n(5),f=n(0),h=n(4),d=n(1),p=n(7);function v(e){this.wrapped=e}function y(e){return new v(e)}function b(e){var t,n;function r(t,n){try{var a=e[t](n),o=a.value,u=o instanceof v;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(c){i("throw",c)}}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 m(e){return function(){return new b(e.apply(this,arguments))}}function g(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&&(b.prototype[Symbol.asyncIterator]=function(){return this}),b.prototype.next=function(e){return this._invoke("next",e)},b.prototype.throw=function(e){return this._invoke("throw",e)},b.prototype.return=function(e){return this._invoke("return",e)};var w={};function k(e,t,n){return t<=e&&e<=n}function _(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}}j.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=_(t),this._streaming||(this._decoder=new T({fatal:this._fatal}),this._BOMseen=!1),this._streaming=Boolean(t.stream);for(var r,i=new O(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)}},S.prototype={encode:function(e,t){e=e?String(e):"",t=_(t),this._streaming||(this._encoder=new I(this._options)),this._streaming=Boolean(t.stream);for(var n,r=[],i=new O(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,c=1023&o;i.push(65536+(u<<10)+c),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 E="function"===typeof Buffer?Buffer:null,A="function"===typeof TextDecoder&&"function"===typeof TextEncoder,B=function(e){if(A||!E){var t=new e("utf-8");return function(e){return t.decode(e)}}return function(e){var t=_e(e),n=t.buffer,r=t.byteOffset,i=t.length;return E.from(n,r,i).toString()}}("undefined"!==typeof TextDecoder?TextDecoder:j),C=function(e){if(A||!E){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 _e(E.from(e,"utf8"))}}("undefined"!==typeof TextEncoder?TextEncoder:S),D=n(2),L=n(3),N=Object.freeze({done:!0,value:void 0}),F=function(){function e(t){Object(f.a)(this,e),this._json=t}return Object(h.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}(),M=function(){function e(){Object(f.a)(this,e)}return Object(h.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}(),P=function(e,t){Object(D.a)(r,e);var n=Object(L.a)(r);function r(){var e;return Object(f.a)(this,r),(e=n.call(this))._values=[],e.resolvers=[],e._closedPromise=new Promise((function(t){return e._closedPromiseResolve=t})),e}return Object(h.a)(r,[{key:"closed",get:function(){return this._closedPromise}},{key:"cancel",value:function(){var e=Object(l.a)(d.mark((function e(t){return d.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(N);this._closedPromiseResolve(),this._closedPromiseResolve=void 0}}},{key:t,value:function(){return this}},{key:"toDOMStream",value:function(e){return et.toDOMStream(this._closedPromiseResolve||this._error?this:this._values,e)}},{key:"toNodeStream",value:function(e){return et.toNodeStream(this._closedPromiseResolve||this._error?this:this._values,e)}},{key:"throw",value:function(){var e=Object(l.a)(d.mark((function e(t){return d.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.abort(t);case 2:return e.abrupt("return",N);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"return",value:function(){var e=Object(l.a)(d.mark((function e(t){return d.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.close();case 2:return e.abrupt("return",N);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"read",value:function(){var e=Object(l.a)(d.mark((function e(t){return d.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=Object(l.a)(d.mark((function e(t){return d.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(N)}},{key:"_ensureOpen",value:function(){if(this._closedPromiseResolve)return!0;throw new Error("".concat(this," is closed"))}}]),r}(M,Symbol.asyncIterator),U=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]}(),R=Object(p.a)(U,2),z=R[0],V=R[1],W=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(f.a)(this,t),e()}return Object(h.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]}(),Y=Object(p.a)(W,2),q=Y[0],H=(Y[1],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(f.a)(this,t),e()}return Object(h.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]}()),$=Object(p.a)(H,2),K=$[0],Q=($[1],function(e){return"number"===typeof e}),G=function(e){return"boolean"===typeof e},J=function(e){return"function"===typeof e},Z=function(e){return null!=e&&Object(e)===e},X=function(e){return Z(e)&&J(e.then)},ee=function(e){return Z(e)&&J(e[Symbol.iterator])},te=function(e){return Z(e)&&J(e[Symbol.asyncIterator])},ne=function(e){return Z(e)&&Z(e.schema)},re=function(e){return Z(e)&&"done"in e&&"value"in e},ie=function(e){return Z(e)&&J(e.stat)&&Q(e.fd)},ae=function(e){return Z(e)&&ue(e.body)},oe=function(e){return Z(e)&&J(e.abort)&&J(e.getWriter)&&!(e instanceof M)},ue=function(e){return Z(e)&&J(e.cancel)&&J(e.getReader)&&!(e instanceof M)},ce=function(e){return Z(e)&&J(e.end)&&J(e.write)&&G(e.writable)&&!(e instanceof M)},se=function(e){return Z(e)&&J(e.read)&&J(e.pipe)&&G(e.readable)&&!(e instanceof M)},le=d.mark(Ae);function fe(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 he(t.call(e));n="@@asyncIterator",r="@@iterator"}throw new TypeError("Object is not async iterable")}function he(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(he=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 he(e)}var de=w.ByteBuffer,pe="undefined"!==typeof SharedArrayBuffer?SharedArrayBuffer:ArrayBuffer;function ve(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 ye(e,t){for(var n,r,i,a=function(e){for(var t,n,r,i,a,o,u=e[0]?[e[0]]:[],c=0,s=0,l=e.length;++c0)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,c();case 18:h=d.sent,a=h.cmd,o=h.size;case 21:if(o0&&(i.push(a),c+=a.byteLength),!(n||u<=c)){e.next=31;break}case 25:return e.next=27,s();case 27:v=e.sent,o=v.cmd,u=v.size;case 30:if(u0&&(i.push(_e(a)),c+=a.byteLength),!(n||u<=c)){e.next=31;break}case 25:return e.next=27,s();case 27:v=e.sent,o=v.cmd,u=v.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&&(f.push(h),c+=h.byteLength)),!(i||u<=c)){e.next=36;break}case 30:return e.next=32,v();case 32:w=e.sent,o=w.cmd,u=w.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={}))}(dt||(dt={})),function(e){!function(e){!function(e){!function(e){var t=function(){function e(){Object(f.a)(this,e),this.bb=null,this.bb_pos=0}return Object(h.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={}))}(dt||(dt={})),function(e){!function(t){!function(t){!function(t){var n=function(){function t(){Object(f.a)(this,t),this.bb=null,this.bb_pos=0}return Object(h.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={}))}(dt||(dt={})),function(e){!function(e){!function(e){!function(e){var t=function(){function e(){Object(f.a)(this,e),this.bb=null,this.bb_pos=0}return Object(h.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={}))}(dt||(dt={})),function(e){!function(e){!function(e){!function(e){var t=function(){function e(){Object(f.a)(this,e),this.bb=null,this.bb_pos=0}return Object(h.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={}))}(dt||(dt={})),function(e){!function(e){!function(e){!function(e){var t=function(){function e(){Object(f.a)(this,e),this.bb=null,this.bb_pos=0}return Object(h.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={}))}(dt||(dt={})),function(e){!function(e){!function(e){!function(e){var t=function(){function e(){Object(f.a)(this,e),this.bb=null,this.bb_pos=0}return Object(h.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={}))}(dt||(dt={})),function(e){!function(e){!function(e){!function(e){var t=function(){function e(){Object(f.a)(this,e),this.bb=null,this.bb_pos=0}return Object(h.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={}))}(dt||(dt={})),function(e){!function(e){!function(e){!function(e){var t=function(){function e(){Object(f.a)(this,e),this.bb=null,this.bb_pos=0}return Object(h.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={}))}(dt||(dt={})),function(e){!function(e){!function(e){!function(e){var t=function(){function e(){Object(f.a)(this,e),this.bb=null,this.bb_pos=0}return Object(h.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={}))}(dt||(dt={})),function(e){!function(t){!function(t){!function(t){var n=function(){function t(){Object(f.a)(this,t),this.bb=null,this.bb_pos=0}return Object(h.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={}))}(dt||(dt={})),function(e){!function(t){!function(t){!function(t){var n=function(){function t(){Object(f.a)(this,t),this.bb=null,this.bb_pos=0}return Object(h.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={}))}(dt||(dt={})),function(e){!function(t){!function(t){!function(t){var n=function(){function t(){Object(f.a)(this,t),this.bb=null,this.bb_pos=0}return Object(h.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={}))}(dt||(dt={})),function(e){!function(t){!function(t){!function(t){var n=function(){function t(){Object(f.a)(this,t),this.bb=null,this.bb_pos=0}return Object(h.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={}))}(dt||(dt={})),function(e){!function(t){!function(t){!function(t){var n=function(){function t(){Object(f.a)(this,t),this.bb=null,this.bb_pos=0}return Object(h.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={}))}(dt||(dt={})),function(e){!function(e){!function(e){!function(e){var t=function(){function e(){Object(f.a)(this,e),this.bb=null,this.bb_pos=0}return Object(h.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={}))}(dt||(dt={})),function(e){!function(t){!function(t){!function(t){var n=function(){function t(){Object(f.a)(this,t),this.bb=null,this.bb_pos=0}return Object(h.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={}))}(dt||(dt={})),function(e){!function(t){!function(t){!function(t){var n=function(){function t(){Object(f.a)(this,t),this.bb=null,this.bb_pos=0}return Object(h.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,c){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,c),t.endField(e)}}]),t}();t.Field=n}(t.flatbuf||(t.flatbuf={}))}(t.arrow||(t.arrow={}))}(e.apache||(e.apache={}))}(dt||(dt={})),function(e){!function(e){!function(e){!function(e){var t=function(){function e(){Object(f.a)(this,e),this.bb=null,this.bb_pos=0}return Object(h.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={}))}(dt||(dt={})),function(e){!function(t){!function(t){!function(t){var n=function(){function t(){Object(f.a)(this,t),this.bb=null,this.bb_pos=0}return Object(h.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={}))}(dt||(dt={})),function(e){!function(e){!function(e){!function(e){e.Schema=dt.apache.arrow.flatbuf.Schema}(e.flatbuf||(e.flatbuf={}))}(e.arrow||(e.arrow={}))}(e.apache||(e.apache={}))}(mt||(mt={})),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={}))}(mt||(mt={})),function(e){!function(e){!function(e){!function(e){var t=function(){function e(){Object(f.a)(this,e),this.bb=null,this.bb_pos=0}return Object(h.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={}))}(mt||(mt={})),function(e){!function(t){!function(t){!function(t){var n=function(){function t(){Object(f.a)(this,t),this.bb=null,this.bb_pos=0}return Object(h.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 dt.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={}))}(mt||(mt={})),function(e){!function(t){!function(t){!function(t){var n=function(){function t(){Object(f.a)(this,t),this.bb=null,this.bb_pos=0}return Object(h.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={}))}(mt||(mt={})),function(e){!function(t){!function(t){!function(t){var n=function(){function t(){Object(f.a)(this,t),this.bb=null,this.bb_pos=0}return Object(h.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):dt.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 dt.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,dt.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={}))}(mt||(mt={}));dt.apache.arrow.flatbuf.Type;var wt,kt,_t=dt.apache.arrow.flatbuf.DateUnit,Ot=dt.apache.arrow.flatbuf.TimeUnit,xt=dt.apache.arrow.flatbuf.Precision,jt=dt.apache.arrow.flatbuf.UnionMode,St=dt.apache.arrow.flatbuf.IntervalUnit,Tt=mt.apache.arrow.flatbuf.MessageHeader,It=dt.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"}(wt||(wt={})),function(e){e[e.OFFSET=0]="OFFSET",e[e.DATA=1]="DATA",e[e.VALIDITY=2]="VALIDITY",e[e.TYPE=3]="TYPE"}(kt||(kt={}));var Et=d.mark(Nt);function At(e,t,n,r){return 0!==(n&1<>r}function Ct(e,t,n){return n?!!(e[t>>3]|=1<>3]&=~(1<0||n.byteLength>3):Lt(Nt(n,e,t,null,At)).subarray(0,r)),i}return n}function Lt(e){var t,n=[],r=0,i=0,a=0,o=Object(s.a)(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 Nt(e,t,n,r,i){var a,o,u,c,s;return d.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:a=t%8,o=t>>3,u=0,c=n;case 3:if(!(c>0)){l.next=11;break}s=e[o++];case 5:return l.next=7,i(r,u++,s,a);case 7:if(--c>0&&++a<8){l.next=5;break}case 8:a=0,l.next=3;break;case 11:case"end":return l.stop()}}),Et)}function Ft(e,t,n){if(n-t<=0)return 0;if(n-t<8){var r,i=0,a=Object(s.a)(Nt(e,t,n-t,e,Bt));try{for(a.s();!(r=a.n()).done;){i+=r.value}}catch(c){a.e(c)}finally{a.f()}return i}var o=n>>3<<3,u=t+(t%8===0?0:8-t%8);return Ft(e,t,u)+Ft(e,o,n)+Mt(e,u>>3,o-u>>3)}function Mt(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+=Pt(a.getUint32(i)),i+=4;for(;o-i>=2;)r+=Pt(a.getUint16(i)),i+=2;for(;o-i>=1;)r+=Pt(a.getUint8(i)),i+=1;return r}function Pt(e){var t=0|e;return 16843009*((t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135)>>>24}var Ut=n(6),Rt=function(){function e(){Object(f.a)(this,e)}return Object(h.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 zt(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 zt(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=null,i=wt.NONE;switch(t instanceof Mn||t instanceof gt?i=Vt(t.type):t instanceof tn?i=Vt(t):"number"!==typeof(i=t)&&(i=wt[t]),i){case wt.Null:r=e.visitNull;break;case wt.Bool:r=e.visitBool;break;case wt.Int:r=e.visitInt;break;case wt.Int8:r=e.visitInt8||e.visitInt;break;case wt.Int16:r=e.visitInt16||e.visitInt;break;case wt.Int32:r=e.visitInt32||e.visitInt;break;case wt.Int64:r=e.visitInt64||e.visitInt;break;case wt.Uint8:r=e.visitUint8||e.visitInt;break;case wt.Uint16:r=e.visitUint16||e.visitInt;break;case wt.Uint32:r=e.visitUint32||e.visitInt;break;case wt.Uint64:r=e.visitUint64||e.visitInt;break;case wt.Float:r=e.visitFloat;break;case wt.Float16:r=e.visitFloat16||e.visitFloat;break;case wt.Float32:r=e.visitFloat32||e.visitFloat;break;case wt.Float64:r=e.visitFloat64||e.visitFloat;break;case wt.Utf8:r=e.visitUtf8;break;case wt.Binary:r=e.visitBinary;break;case wt.FixedSizeBinary:r=e.visitFixedSizeBinary;break;case wt.Date:r=e.visitDate;break;case wt.DateDay:r=e.visitDateDay||e.visitDate;break;case wt.DateMillisecond:r=e.visitDateMillisecond||e.visitDate;break;case wt.Timestamp:r=e.visitTimestamp;break;case wt.TimestampSecond:r=e.visitTimestampSecond||e.visitTimestamp;break;case wt.TimestampMillisecond:r=e.visitTimestampMillisecond||e.visitTimestamp;break;case wt.TimestampMicrosecond:r=e.visitTimestampMicrosecond||e.visitTimestamp;break;case wt.TimestampNanosecond:r=e.visitTimestampNanosecond||e.visitTimestamp;break;case wt.Time:r=e.visitTime;break;case wt.TimeSecond:r=e.visitTimeSecond||e.visitTime;break;case wt.TimeMillisecond:r=e.visitTimeMillisecond||e.visitTime;break;case wt.TimeMicrosecond:r=e.visitTimeMicrosecond||e.visitTime;break;case wt.TimeNanosecond:r=e.visitTimeNanosecond||e.visitTime;break;case wt.Decimal:r=e.visitDecimal;break;case wt.List:r=e.visitList;break;case wt.Struct:r=e.visitStruct;break;case wt.Union:r=e.visitUnion;break;case wt.DenseUnion:r=e.visitDenseUnion||e.visitUnion;break;case wt.SparseUnion:r=e.visitSparseUnion||e.visitUnion;break;case wt.Dictionary:r=e.visitDictionary;break;case wt.Interval:r=e.visitInterval;break;case wt.IntervalDayTime:r=e.visitIntervalDayTime||e.visitInterval;break;case wt.IntervalYearMonth:r=e.visitIntervalYearMonth||e.visitInterval;break;case wt.FixedSizeList:r=e.visitFixedSizeList;break;case wt.Map:r=e.visitMap}if("function"===typeof r)return r;if(!n)return function(){return null};throw new Error("Unrecognized type '".concat(wt[i],"'"))}function Vt(e){switch(e.typeId){case wt.Null:return wt.Null;case wt.Int:var t=e.bitWidth,n=e.isSigned;switch(t){case 8:return n?wt.Int8:wt.Uint8;case 16:return n?wt.Int16:wt.Uint16;case 32:return n?wt.Int32:wt.Uint32;case 64:return n?wt.Int64:wt.Uint64}return wt.Int;case wt.Float:switch(e.precision){case xt.HALF:return wt.Float16;case xt.SINGLE:return wt.Float32;case xt.DOUBLE:return wt.Float64}return wt.Float;case wt.Binary:return wt.Binary;case wt.Utf8:return wt.Utf8;case wt.Bool:return wt.Bool;case wt.Decimal:return wt.Decimal;case wt.Time:switch(e.unit){case Ot.SECOND:return wt.TimeSecond;case Ot.MILLISECOND:return wt.TimeMillisecond;case Ot.MICROSECOND:return wt.TimeMicrosecond;case Ot.NANOSECOND:return wt.TimeNanosecond}return wt.Time;case wt.Timestamp:switch(e.unit){case Ot.SECOND:return wt.TimestampSecond;case Ot.MILLISECOND:return wt.TimestampMillisecond;case Ot.MICROSECOND:return wt.TimestampMicrosecond;case Ot.NANOSECOND:return wt.TimestampNanosecond}return wt.Timestamp;case wt.Date:switch(e.unit){case _t.DAY:return wt.DateDay;case _t.MILLISECOND:return wt.DateMillisecond}return wt.Date;case wt.Interval:switch(e.unit){case St.DAY_TIME:return wt.IntervalDayTime;case St.YEAR_MONTH:return wt.IntervalYearMonth}return wt.Interval;case wt.Map:return wt.Map;case wt.List:return wt.List;case wt.Struct:return wt.Struct;case wt.Union:switch(e.mode){case jt.Dense:return wt.DenseUnion;case jt.Sparse:return wt.SparseUnion}return wt.Union;case wt.FixedSizeBinary:return wt.FixedSizeBinary;case wt.FixedSizeList:return wt.FixedSizeList;case wt.Dictionary:return wt.Dictionary}throw new Error("Unrecognized type '".concat(wt[e.typeId],"'"))}Rt.prototype.visitInt8=null,Rt.prototype.visitInt16=null,Rt.prototype.visitInt32=null,Rt.prototype.visitInt64=null,Rt.prototype.visitUint8=null,Rt.prototype.visitUint16=null,Rt.prototype.visitUint32=null,Rt.prototype.visitUint64=null,Rt.prototype.visitFloat16=null,Rt.prototype.visitFloat32=null,Rt.prototype.visitFloat64=null,Rt.prototype.visitDateDay=null,Rt.prototype.visitDateMillisecond=null,Rt.prototype.visitTimestampSecond=null,Rt.prototype.visitTimestampMillisecond=null,Rt.prototype.visitTimestampMicrosecond=null,Rt.prototype.visitTimestampNanosecond=null,Rt.prototype.visitTimeSecond=null,Rt.prototype.visitTimeMillisecond=null,Rt.prototype.visitTimeMicrosecond=null,Rt.prototype.visitTimeNanosecond=null,Rt.prototype.visitDenseUnion=null,Rt.prototype.visitSparseUnion=null,Rt.prototype.visitIntervalDayTime=null,Rt.prototype.visitIntervalYearMonth=null;var Wt=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.apply(this,arguments)}return Object(h.a)(n,[{key:"compareSchemas",value:function(e,t){return e===t||t instanceof e.constructor&&en.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 en.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&&en.visit(e.type,t.type)}}]),n}(Rt);function Yt(e,t){return t instanceof e.constructor}function qt(e,t){return e===t||Yt(e,t)}function Ht(e,t){return e===t||Yt(e,t)&&e.bitWidth===t.bitWidth&&e.isSigned===t.isSigned}function $t(e,t){return e===t||Yt(e,t)&&e.precision===t.precision}function Kt(e,t){return e===t||Yt(e,t)&&e.unit===t.unit}function Qt(e,t){return e===t||Yt(e,t)&&e.unit===t.unit&&e.timezone===t.timezone}function Gt(e,t){return e===t||Yt(e,t)&&e.unit===t.unit&&e.bitWidth===t.bitWidth}function Jt(e,t){return e===t||Yt(e,t)&&e.mode===t.mode&&e.typeIds.every((function(e,n){return e===t.typeIds[n]}))&&en.compareFields(e.children,t.children)}function Zt(e,t){return e===t||Yt(e,t)&&e.unit===t.unit}Wt.prototype.visitNull=qt,Wt.prototype.visitBool=qt,Wt.prototype.visitInt=Ht,Wt.prototype.visitInt8=Ht,Wt.prototype.visitInt16=Ht,Wt.prototype.visitInt32=Ht,Wt.prototype.visitInt64=Ht,Wt.prototype.visitUint8=Ht,Wt.prototype.visitUint16=Ht,Wt.prototype.visitUint32=Ht,Wt.prototype.visitUint64=Ht,Wt.prototype.visitFloat=$t,Wt.prototype.visitFloat16=$t,Wt.prototype.visitFloat32=$t,Wt.prototype.visitFloat64=$t,Wt.prototype.visitUtf8=qt,Wt.prototype.visitBinary=qt,Wt.prototype.visitFixedSizeBinary=function(e,t){return e===t||Yt(e,t)&&e.byteWidth===t.byteWidth},Wt.prototype.visitDate=Kt,Wt.prototype.visitDateDay=Kt,Wt.prototype.visitDateMillisecond=Kt,Wt.prototype.visitTimestamp=Qt,Wt.prototype.visitTimestampSecond=Qt,Wt.prototype.visitTimestampMillisecond=Qt,Wt.prototype.visitTimestampMicrosecond=Qt,Wt.prototype.visitTimestampNanosecond=Qt,Wt.prototype.visitTime=Gt,Wt.prototype.visitTimeSecond=Gt,Wt.prototype.visitTimeMillisecond=Gt,Wt.prototype.visitTimeMicrosecond=Gt,Wt.prototype.visitTimeNanosecond=Gt,Wt.prototype.visitDecimal=qt,Wt.prototype.visitList=function(e,t){return e===t||Yt(e,t)&&e.children.length===t.children.length&&en.compareFields(e.children,t.children)},Wt.prototype.visitStruct=function(e,t){return e===t||Yt(e,t)&&e.children.length===t.children.length&&en.compareFields(e.children,t.children)},Wt.prototype.visitUnion=Jt,Wt.prototype.visitDenseUnion=Jt,Wt.prototype.visitSparseUnion=Jt,Wt.prototype.visitDictionary=function(e,t){return e===t||Yt(e,t)&&e.id===t.id&&e.isOrdered===t.isOrdered&&en.visit(e.indices,t.indices)&&en.visit(e.dictionary,t.dictionary)},Wt.prototype.visitInterval=Zt,Wt.prototype.visitIntervalDayTime=Zt,Wt.prototype.visitIntervalYearMonth=Zt,Wt.prototype.visitFixedSizeList=function(e,t){return e===t||Yt(e,t)&&e.listSize===t.listSize&&e.children.length===t.children.length&&en.compareFields(e.children,t.children)},Wt.prototype.visitMap=function(e,t){return e===t||Yt(e,t)&&e.keysSorted===t.keysSorted&&e.children.length===t.children.length&&en.compareFields(e.children,t.children)};var Xt,en=new Wt,tn=function(){function e(){Object(f.a)(this,e)}return Object(h.a)(e,[{key:"typeId",get:function(){return wt.NONE}},{key:"compareTo",value:function(e){return en.visit(this,e)}}],[{key:"isNull",value:function(e){return e&&e.typeId===wt.Null}},{key:"isInt",value:function(e){return e&&e.typeId===wt.Int}},{key:"isFloat",value:function(e){return e&&e.typeId===wt.Float}},{key:"isBinary",value:function(e){return e&&e.typeId===wt.Binary}},{key:"isUtf8",value:function(e){return e&&e.typeId===wt.Utf8}},{key:"isBool",value:function(e){return e&&e.typeId===wt.Bool}},{key:"isDecimal",value:function(e){return e&&e.typeId===wt.Decimal}},{key:"isDate",value:function(e){return e&&e.typeId===wt.Date}},{key:"isTime",value:function(e){return e&&e.typeId===wt.Time}},{key:"isTimestamp",value:function(e){return e&&e.typeId===wt.Timestamp}},{key:"isInterval",value:function(e){return e&&e.typeId===wt.Interval}},{key:"isList",value:function(e){return e&&e.typeId===wt.List}},{key:"isStruct",value:function(e){return e&&e.typeId===wt.Struct}},{key:"isUnion",value:function(e){return e&&e.typeId===wt.Union}},{key:"isFixedSizeBinary",value:function(e){return e&&e.typeId===wt.FixedSizeBinary}},{key:"isFixedSizeList",value:function(e){return e&&e.typeId===wt.FixedSizeList}},{key:"isMap",value:function(e){return e&&e.typeId===wt.Map}},{key:"isDictionary",value:function(e){return e&&e.typeId===wt.Dictionary}}]),e}();tn[Symbol.toStringTag]=((Xt=tn.prototype).children=null,Xt.ArrayType=Array,Xt[Symbol.toStringTag]="DataType");var nn=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.apply(this,arguments)}return Object(h.a)(n,[{key:"toString",value:function(){return"Null"}},{key:"typeId",get:function(){return wt.Null}}]),n}(tn);nn[Symbol.toStringTag]=function(e){return e[Symbol.toStringTag]="Null"}(nn.prototype);var rn=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(e,r){var i;return Object(f.a)(this,n),(i=t.call(this)).isSigned=e,i.bitWidth=r,i}return Object(h.a)(n,[{key:"typeId",get:function(){return wt.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}(tn);rn[Symbol.toStringTag]=function(e){return e.isSigned=null,e.bitWidth=null,e[Symbol.toStringTag]="Int"}(rn.prototype);var an=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.call(this,!0,8)}return n}(rn),on=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.call(this,!0,16)}return n}(rn),un=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.call(this,!0,32)}return n}(rn),cn=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.call(this,!0,64)}return n}(rn),sn=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.call(this,!1,8)}return n}(rn),ln=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.call(this,!1,16)}return n}(rn),fn=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.call(this,!1,32)}return n}(rn),hn=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.call(this,!1,64)}return n}(rn);Object.defineProperty(an.prototype,"ArrayType",{value:Int8Array}),Object.defineProperty(on.prototype,"ArrayType",{value:Int16Array}),Object.defineProperty(un.prototype,"ArrayType",{value:Int32Array}),Object.defineProperty(cn.prototype,"ArrayType",{value:Int32Array}),Object.defineProperty(sn.prototype,"ArrayType",{value:Uint8Array}),Object.defineProperty(ln.prototype,"ArrayType",{value:Uint16Array}),Object.defineProperty(fn.prototype,"ArrayType",{value:Uint32Array}),Object.defineProperty(hn.prototype,"ArrayType",{value:Uint32Array});var dn=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(e){var r;return Object(f.a)(this,n),(r=t.call(this)).precision=e,r}return Object(h.a)(n,[{key:"typeId",get:function(){return wt.Float}},{key:"ArrayType",get:function(){switch(this.precision){case xt.HALF:return Uint16Array;case xt.SINGLE:return Float32Array;case xt.DOUBLE:return Float64Array}throw new Error("Unrecognized ".concat(this[Symbol.toStringTag]," type"))}},{key:"toString",value:function(){return"Float".concat(this.precision<<5||16)}}]),n}(tn);dn[Symbol.toStringTag]=function(e){return e.precision=null,e[Symbol.toStringTag]="Float"}(dn.prototype);var pn=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.call(this,xt.HALF)}return n}(dn),vn=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.call(this,xt.SINGLE)}return n}(dn),yn=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.call(this,xt.DOUBLE)}return n}(dn);Object.defineProperty(pn.prototype,"ArrayType",{value:Uint16Array}),Object.defineProperty(vn.prototype,"ArrayType",{value:Float32Array}),Object.defineProperty(yn.prototype,"ArrayType",{value:Float64Array});var bn=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.call(this)}return Object(h.a)(n,[{key:"typeId",get:function(){return wt.Binary}},{key:"toString",value:function(){return"Binary"}}]),n}(tn);bn[Symbol.toStringTag]=function(e){return e.ArrayType=Uint8Array,e[Symbol.toStringTag]="Binary"}(bn.prototype);var mn=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.call(this)}return Object(h.a)(n,[{key:"typeId",get:function(){return wt.Utf8}},{key:"toString",value:function(){return"Utf8"}}]),n}(tn);mn[Symbol.toStringTag]=function(e){return e.ArrayType=Uint8Array,e[Symbol.toStringTag]="Utf8"}(mn.prototype);var gn=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.call(this)}return Object(h.a)(n,[{key:"typeId",get:function(){return wt.Bool}},{key:"toString",value:function(){return"Bool"}}]),n}(tn);gn[Symbol.toStringTag]=function(e){return e.ArrayType=Uint8Array,e[Symbol.toStringTag]="Bool"}(gn.prototype);var wn=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(e,r){var i;return Object(f.a)(this,n),(i=t.call(this)).scale=e,i.precision=r,i}return Object(h.a)(n,[{key:"typeId",get:function(){return wt.Decimal}},{key:"toString",value:function(){return"Decimal[".concat(this.precision,"e").concat(this.scale>0?"+":"").concat(this.scale,"]")}}]),n}(tn);wn[Symbol.toStringTag]=function(e){return e.scale=null,e.precision=null,e.ArrayType=Uint32Array,e[Symbol.toStringTag]="Decimal"}(wn.prototype);var kn=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(e){var r;return Object(f.a)(this,n),(r=t.call(this)).unit=e,r}return Object(h.a)(n,[{key:"typeId",get:function(){return wt.Date}},{key:"toString",value:function(){return"Date".concat(32*(this.unit+1),"<").concat(_t[this.unit],">")}}]),n}(tn);kn[Symbol.toStringTag]=function(e){return e.unit=null,e.ArrayType=Int32Array,e[Symbol.toStringTag]="Date"}(kn.prototype);var _n=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.call(this,_t.DAY)}return n}(kn),On=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.call(this,_t.MILLISECOND)}return n}(kn),xn=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(e,r){var i;return Object(f.a)(this,n),(i=t.call(this)).unit=e,i.bitWidth=r,i}return Object(h.a)(n,[{key:"typeId",get:function(){return wt.Time}},{key:"toString",value:function(){return"Time".concat(this.bitWidth,"<").concat(Ot[this.unit],">")}}]),n}(tn);xn[Symbol.toStringTag]=function(e){return e.unit=null,e.bitWidth=null,e.ArrayType=Int32Array,e[Symbol.toStringTag]="Time"}(xn.prototype);var jn=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(e,r){var i;return Object(f.a)(this,n),(i=t.call(this)).unit=e,i.timezone=r,i}return Object(h.a)(n,[{key:"typeId",get:function(){return wt.Timestamp}},{key:"toString",value:function(){return"Timestamp<".concat(Ot[this.unit]).concat(this.timezone?", ".concat(this.timezone):"",">")}}]),n}(tn);jn[Symbol.toStringTag]=function(e){return e.unit=null,e.timezone=null,e.ArrayType=Int32Array,e[Symbol.toStringTag]="Timestamp"}(jn.prototype);var Sn=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(e){var r;return Object(f.a)(this,n),(r=t.call(this)).unit=e,r}return Object(h.a)(n,[{key:"typeId",get:function(){return wt.Interval}},{key:"toString",value:function(){return"Interval<".concat(St[this.unit],">")}}]),n}(tn);Sn[Symbol.toStringTag]=function(e){return e.unit=null,e.ArrayType=Int32Array,e[Symbol.toStringTag]="Interval"}(Sn.prototype);var Tn=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(e){var r;return Object(f.a)(this,n),(r=t.call(this)).children=[e],r}return Object(h.a)(n,[{key:"typeId",get:function(){return wt.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}(tn);Tn[Symbol.toStringTag]=function(e){return e.children=null,e[Symbol.toStringTag]="List"}(Tn.prototype);var In=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(e){var r;return Object(f.a)(this,n),(r=t.call(this)).children=e,r}return Object(h.a)(n,[{key:"typeId",get:function(){return wt.Struct}},{key:"toString",value:function(){return"Struct<{".concat(this.children.map((function(e){return"".concat(e.name,":").concat(e.type)})).join(", "),"}>")}}]),n}(tn);In[Symbol.toStringTag]=function(e){return e.children=null,e[Symbol.toStringTag]="Struct"}(In.prototype);var En=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(e,r,i){var a;return Object(f.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(h.a)(n,[{key:"typeId",get:function(){return wt.Union}},{key:"toString",value:function(){return"".concat(this[Symbol.toStringTag],"<").concat(this.children.map((function(e){return"".concat(e.type)})).join(" | "),">")}}]),n}(tn);En[Symbol.toStringTag]=function(e){return e.mode=null,e.typeIds=null,e.children=null,e.typeIdToChildIndex=null,e.ArrayType=Int8Array,e[Symbol.toStringTag]="Union"}(En.prototype);var An=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(e){var r;return Object(f.a)(this,n),(r=t.call(this)).byteWidth=e,r}return Object(h.a)(n,[{key:"typeId",get:function(){return wt.FixedSizeBinary}},{key:"toString",value:function(){return"FixedSizeBinary[".concat(this.byteWidth,"]")}}]),n}(tn);An[Symbol.toStringTag]=function(e){return e.byteWidth=null,e.ArrayType=Uint8Array,e[Symbol.toStringTag]="FixedSizeBinary"}(An.prototype);var Bn=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(e,r){var i;return Object(f.a)(this,n),(i=t.call(this)).listSize=e,i.children=[r],i}return Object(h.a)(n,[{key:"typeId",get:function(){return wt.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}(tn);Bn[Symbol.toStringTag]=function(e){return e.children=null,e.listSize=null,e[Symbol.toStringTag]="FixedSizeList"}(Bn.prototype);var Cn=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Object(f.a)(this,n),(r=t.call(this)).children=[e],r.keysSorted=i,r}return Object(h.a)(n,[{key:"typeId",get:function(){return wt.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}(tn);Cn[Symbol.toStringTag]=function(e){return e.children=null,e.keysSorted=null,e[Symbol.toStringTag]="Map_"}(Cn.prototype);var Dn,Ln=(Dn=-1,function(){return++Dn}),Nn=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(e,r,i,a){var o;return Object(f.a)(this,n),(o=t.call(this)).indices=r,o.dictionary=e,o.isOrdered=a||!1,o.id=null==i?Ln():"number"===typeof i?i:i.low,o}return Object(h.a)(n,[{key:"typeId",get:function(){return wt.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}(tn);function Fn(e){var t=e;switch(e.typeId){case wt.Decimal:return 4;case wt.Timestamp:return 2;case wt.Date:case wt.Interval:return 1+t.unit;case wt.Int:case wt.Time:return+(t.bitWidth>32)+1;case wt.FixedSizeList:return t.listSize;case wt.FixedSizeBinary:return t.byteWidth;default:return 1}}Nn[Symbol.toStringTag]=function(e){return e.id=null,e.indices=null,e.isOrdered=null,e.dictionary=null,e[Symbol.toStringTag]="Dictionary"}(Nn.prototype);var Mn=function(){function e(t,n,r,i,a,o,u){var c;Object(f.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=Fn(t),a&&((c=a[0])&&(this.valueOffsets=c),(c=a[1])&&(this.values=c),(c=a[2])&&(this.nullBitmap=c),(c=a[3])&&(this.typeIds=c)))}return Object(h.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-Ft(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===wt.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(Dt(this.offset,t,this.nullBitmap),0);var i=this.buffers;return i[kt.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[kt.TYPE])&&(a[kt.TYPE]=i.subarray(e,e+t)),(i=a[kt.OFFSET])&&(a[kt.OFFSET]=i.subarray(e,e+t+1))||(i=a[kt.DATA])&&(a[kt.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 wt.Null:return e.Null(t,n,r);case wt.Int:return e.Int(t,n,r,i||0,a[kt.VALIDITY],a[kt.DATA]||[]);case wt.Dictionary:return e.Dictionary(t,n,r,i||0,a[kt.VALIDITY],a[kt.DATA]||[],u);case wt.Float:return e.Float(t,n,r,i||0,a[kt.VALIDITY],a[kt.DATA]||[]);case wt.Bool:return e.Bool(t,n,r,i||0,a[kt.VALIDITY],a[kt.DATA]||[]);case wt.Decimal:return e.Decimal(t,n,r,i||0,a[kt.VALIDITY],a[kt.DATA]||[]);case wt.Date:return e.Date(t,n,r,i||0,a[kt.VALIDITY],a[kt.DATA]||[]);case wt.Time:return e.Time(t,n,r,i||0,a[kt.VALIDITY],a[kt.DATA]||[]);case wt.Timestamp:return e.Timestamp(t,n,r,i||0,a[kt.VALIDITY],a[kt.DATA]||[]);case wt.Interval:return e.Interval(t,n,r,i||0,a[kt.VALIDITY],a[kt.DATA]||[]);case wt.FixedSizeBinary:return e.FixedSizeBinary(t,n,r,i||0,a[kt.VALIDITY],a[kt.DATA]||[]);case wt.Binary:return e.Binary(t,n,r,i||0,a[kt.VALIDITY],a[kt.OFFSET]||[],a[kt.DATA]||[]);case wt.Utf8:return e.Utf8(t,n,r,i||0,a[kt.VALIDITY],a[kt.OFFSET]||[],a[kt.DATA]||[]);case wt.List:return e.List(t,n,r,i||0,a[kt.VALIDITY],a[kt.OFFSET]||[],(o||[])[0]);case wt.FixedSizeList:return e.FixedSizeList(t,n,r,i||0,a[kt.VALIDITY],(o||[])[0]);case wt.Struct:return e.Struct(t,n,r,i||0,a[kt.VALIDITY],o||[]);case wt.Map:return e.Map(t,n,r,i||0,a[kt.VALIDITY],a[kt.OFFSET]||[],(o||[])[0]);case wt.Union:return e.Union(t,n,r,i||0,a[kt.VALIDITY],a[kt.TYPE]||[],a[kt.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,be(t.ArrayType,o),_e(a)])}},{key:"Dictionary",value:function(t,n,r,i,a,o,u){return new e(t,n,r,i,[void 0,be(t.indices.ArrayType,o),_e(a)],[],u)}},{key:"Float",value:function(t,n,r,i,a,o){return new e(t,n,r,i,[void 0,be(t.ArrayType,o),_e(a)])}},{key:"Bool",value:function(t,n,r,i,a,o){return new e(t,n,r,i,[void 0,be(t.ArrayType,o),_e(a)])}},{key:"Decimal",value:function(t,n,r,i,a,o){return new e(t,n,r,i,[void 0,be(t.ArrayType,o),_e(a)])}},{key:"Date",value:function(t,n,r,i,a,o){return new e(t,n,r,i,[void 0,be(t.ArrayType,o),_e(a)])}},{key:"Time",value:function(t,n,r,i,a,o){return new e(t,n,r,i,[void 0,be(t.ArrayType,o),_e(a)])}},{key:"Timestamp",value:function(t,n,r,i,a,o){return new e(t,n,r,i,[void 0,be(t.ArrayType,o),_e(a)])}},{key:"Interval",value:function(t,n,r,i,a,o){return new e(t,n,r,i,[void 0,be(t.ArrayType,o),_e(a)])}},{key:"FixedSizeBinary",value:function(t,n,r,i,a,o){return new e(t,n,r,i,[void 0,be(t.ArrayType,o),_e(a)])}},{key:"Binary",value:function(t,n,r,i,a,o,u){return new e(t,n,r,i,[we(o),_e(u),_e(a)])}},{key:"Utf8",value:function(t,n,r,i,a,o,u){return new e(t,n,r,i,[we(o),_e(u),_e(a)])}},{key:"List",value:function(t,n,r,i,a,o,u){return new e(t,n,r,i,[we(o),void 0,_e(a)],[u])}},{key:"FixedSizeList",value:function(t,n,r,i,a,o){return new e(t,n,r,i,[void 0,void 0,_e(a)],[o])}},{key:"Struct",value:function(t,n,r,i,a,o){return new e(t,n,r,i,[void 0,void 0,_e(a)],o)}},{key:"Map",value:function(t,n,r,i,a,o,u){return new e(t,n,r,i,[we(o),void 0,_e(a)],[u])}},{key:"Union",value:function(t,n,r,i,a,o,u,c){var s=[void 0,void 0,_e(a),be(t.ArrayType,o)];return t.mode===jt.Sparse?new e(t,n,r,i,s,u):(s[kt.OFFSET]=we(u),new e(t,n,r,i,s,c))}}]),e}();Mn.prototype.childData=Object.freeze([]);function Pn(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 Un(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 Pn(e);if(V)return"".concat(Pn(e),"n");return'"'.concat(Pn(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 Rn=function(e,t){return(e*t+63&-64||64)/t},zn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.length>=t?e.subarray(0,t):ve(new e.constructor(t),e,0)},Vn=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;Object(f.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(h.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(Rn(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=Rn(e*this.stride,this.BYTES_PER_ELEMENT);var t=zn(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=ve(new this.ArrayType(e),this.buffer)}}]),e}();Vn.prototype.offset=0;var Wn=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.apply(this,arguments)}return Object(h.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}(Vn),Yn=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Uint8Array(0);return Object(f.a)(this,n),(e=t.call(this,r,1/8)).numValid=0,e}return Object(h.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(f.a)(this,n),t.call(this,e,1)}return Object(h.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),ht(Object(ft.a)(n.prototype),"flush",this).call(this,e+1)}}]),n}(Wn),Hn=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.apply(this,arguments)}return Object(h.a)(n,[{key:"ArrayType64",get:function(){return this._ArrayType64||(this._ArrayType64=this.buffer instanceof Int32Array?q:K)}},{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=ht(Object(ft.a)(n.prototype),"_resize",this).call(this,e),r=t.byteLength/(this.BYTES_PER_ELEMENT*this.stride);return V&&(this.buffer64=new this.ArrayType64(t.buffer,t.byteOffset,r)),t}}]),n}(Vn);function $n(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 Kn(t.call(e));n="@@asyncIterator",r="@@iterator"}throw new TypeError("Object is not async iterable")}function Kn(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(Kn=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 Kn(e)}var Qn=function(){function e(t){var n=t.type,r=t.nullValues;Object(f.a)(this,e),this.length=0,this.finished=!1,this.type=n,this.children=[],this.nullValues=r,this.stride=Fn(n),this._nulls=new Yn,r&&r.length>0&&(this._isValid=Un(r))}return Object(h.a)(e,[{key:"toVector",value:function(){return gt.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[kt.TYPE]=r.flush(i),n&&(e[kt.OFFSET]=n.flush(i))):n?(t&&(e[kt.DATA]=t.flush(n.last())),e[kt.OFFSET]=n.flush(i)):t&&(e[kt.DATA]=t.flush(i)),a>0&&(e[kt.VALIDITY]=this._nulls.flush(i));var o=Mn.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 d.mark((function t(n){var r,o,u,c,l;return d.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=0,o=Qn.new(e),u=Object(s.a)(n),t.prev=3,u.s();case 5:if((c=u.n()).done){t.next=14;break}if(l=c.value,!(o.append(l)[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=m(d.mark((function t(n){var r,o,u,c,s,l,f,h;return d.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=0,o=Qn.new(e),u=!1,c=!1,t.prev=4,l=$n(n);case 6:return t.next=8,y(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),c=!0,s=t.t1;case 24:if(t.prev=24,t.prev=25,!u||null==l.return){t.next=29;break}return t.next=29,y(l.return());case 29:if(t.prev=29,!c){t.next=32;break}throw s;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}();Qn.prototype.length=1,Qn.prototype.stride=1,Qn.prototype.children=null,Qn.prototype.finished=!1,Qn.prototype.nullValues=null,Qn.prototype._isValid=function(){return!0};var Gn=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(e){var r;return Object(f.a)(this,n),(r=t.call(this,e))._values=new Wn(new r.ArrayType(0),r.stride),r}return Object(h.a)(n,[{key:"setValue",value:function(e,t){var r=this._values;return r.reserve(e-r.length+1),ht(Object(ft.a)(n.prototype),"setValue",this).call(this,e,t)}}]),n}(Qn),Jn=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(e){var r;return Object(f.a)(this,n),(r=t.call(this,e))._pendingLength=0,r._offsets=new qn,r}return Object(h.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!!ht(Object(ft.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,ht(Object(ft.a)(n.prototype),"clear",this).call(this)}},{key:"flush",value:function(){return this._flush(),ht(Object(ft.a)(n.prototype),"flush",this).call(this)}},{key:"finish",value:function(){return this._flush(),ht(Object(ft.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}(Qn);var Zn=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(e){var r;return Object(f.a)(this,n),(r=t.call(this,e))._values=new Yn,r}return Object(h.a)(n,[{key:"setValue",value:function(e,t){this._values.set(e,+t)}}]),n}(Qn),Xn=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.apply(this,arguments)}return Object(h.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}(Qn),er=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.apply(this,arguments)}return n}(Gn),tr=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.apply(this,arguments)}return n}(er),nr=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.apply(this,arguments)}return n}(er),rr=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.apply(this,arguments)}return n}(Gn),ir=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(e){var r,i=e.type,a=e.nullValues,o=e.dictionaryHashFunction;return Object(f.a)(this,n),(r=t.call(this,{type:new Nn(i.dictionary,i.indices,i.id,i.isOrdered)}))._nulls=null,r._dictionaryOffset=0,r._keysToIndices=Object.create(null),r.indices=Qn.new({type:r.type.indices,nullValues:a}),r.dictionary=Qn.new({type:r.type.dictionary,nullValues:null}),"function"===typeof o&&(r.valueToKey=o),r}return Object(h.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),ht(Object(ft.a)(n.prototype),"finish",this).call(this)}},{key:"clear",value:function(){return this.indices.clear(),this.dictionary.clear(),ht(Object(ft.a)(n.prototype),"clear",this).call(this)}},{key:"valueToKey",value:function(e){return"string"===typeof e?e:"".concat(e)}}]),n}(Qn),ar=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.apply(this,arguments)}return n}(Gn),or=new Float64Array(1),ur=new Uint32Array(or.buffer);function cr(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 sr(e){if(e!==e)return 32256;or[0]=e;var t=(2147483648&ur[1])>>16&65535,n=2146435072&ur[1],r=0;return n>=1089470464?ur[0]>0?n=31744:(n=(2080374784&n)>>16,r=(1048575&ur[1])>>10):n<=1056964608?(r=1048576+((r=1048576+(1048575&ur[1]))<<(n>>20)-998)>>21,n=0):(n=n-1056964608>>10,r=512+(1048575&ur[1])>>10),t|n|65535&r}var lr,fr,hr=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.apply(this,arguments)}return n}(Gn),dr=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.apply(this,arguments)}return Object(h.a)(n,[{key:"setValue",value:function(e,t){this._values.set(e,sr(t))}}]),n}(hr),pr=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.apply(this,arguments)}return Object(h.a)(n,[{key:"setValue",value:function(e,t){this._values.set(e,t)}}]),n}(hr),vr=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.apply(this,arguments)}return Object(h.a)(n,[{key:"setValue",value:function(e,t){this._values.set(e,t)}}]),n}(hr),yr=n(13),br=Symbol.for("isArrowBigNum");function mr(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r>>=0),c+=(n>>>0)+t*Math.pow(s,32);return c}function Or(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 _r(this);case"string":return lr(this);case"default":return fr(this)}return lr(this)},Object.setPrototypeOf(gr.prototype,Object.create(Int32Array.prototype)),Object.setPrototypeOf(wr.prototype,Object.create(Uint32Array.prototype)),Object.setPrototypeOf(kr.prototype,Object.create(Uint32Array.prototype)),Object.assign(gr.prototype,mr.prototype,{constructor:gr,signed:!0,TypedArray:Int32Array,BigIntArray:q}),Object.assign(wr.prototype,mr.prototype,{constructor:wr,signed:!1,TypedArray:Uint32Array,BigIntArray:K}),Object.assign(kr.prototype,mr.prototype,{constructor:kr,signed:!0,TypedArray:Uint32Array,BigIntArray:K}),V?(fr=function(e){return 8===e.byteLength?new e.BigIntArray(e.buffer,e.byteOffset,1)[0]:Or(e)},lr=function(e){return 8===e.byteLength?"".concat(new e.BigIntArray(e.buffer,e.byteOffset,1)[0]):Or(e)}):fr=lr=Or;var xr,jr=function(){function e(t,n){return Object(f.a)(this,e),e.new(t,n)}return Object(h.a)(e,null,[{key:"new",value:function(e,t){switch(t){case!0:return new gr(e);case!1:return new wr(e)}switch(e.constructor){case Int8Array:case Int16Array:case Int32Array:case q:return new gr(e)}return 16===e.byteLength?new kr(e):new wr(e)}},{key:"signed",value:function(e){return new gr(e)}},{key:"unsigned",value:function(e){return new wr(e)}},{key:"decimal",value:function(e){return new kr(e)}}]),e}(),Sr=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.apply(this,arguments)}return Object(h.a)(n,[{key:"setValue",value:function(e,t){this._values.set(e,t)}}]),n}(Gn),Tr=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.apply(this,arguments)}return n}(Sr),Ir=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.apply(this,arguments)}return n}(Sr),Er=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.apply(this,arguments)}return n}(Sr),Ar=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(e){var r;return Object(f.a)(this,n),e.nullValues&&(e.nullValues=e.nullValues.map(Nr)),(r=t.call(this,e))._values=new Hn(new Int32Array(0),2),r}return Object(h.a)(n,[{key:"values64",get:function(){return this._values.buffer64}},{key:"isValid",value:function(e){return ht(Object(ft.a)(n.prototype),"isValid",this).call(this,Nr(e))}}]),n}(Sr),Br=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.apply(this,arguments)}return n}(Sr),Cr=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.apply(this,arguments)}return n}(Sr),Dr=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.apply(this,arguments)}return n}(Sr),Lr=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(e){var r;return Object(f.a)(this,n),e.nullValues&&(e.nullValues=e.nullValues.map(Nr)),(r=t.call(this,e))._values=new Hn(new Uint32Array(0),2),r}return Object(h.a)(n,[{key:"values64",get:function(){return this._values.buffer64}},{key:"isValid",value:function(e){return ht(Object(ft.a)(n.prototype),"isValid",this).call(this,Nr(e))}}]),n}(Sr),Nr=(xr={BigIntArray:q},function(e){return ArrayBuffer.isView(e)&&(xr.buffer=e.buffer,xr.byteOffset=e.byteOffset,xr.byteLength=e.byteLength,e=fr(xr),xr.buffer=null),e}),Fr=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.apply(this,arguments)}return n}(Gn),Mr=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.apply(this,arguments)}return n}(Fr),Pr=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.apply(this,arguments)}return n}(Fr),Ur=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.apply(this,arguments)}return n}(Fr),Rr=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.apply(this,arguments)}return n}(Fr),zr=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.apply(this,arguments)}return n}(Gn),Vr=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.apply(this,arguments)}return n}(zr),Wr=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.apply(this,arguments)}return n}(zr),Yr=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.apply(this,arguments)}return n}(zr),qr=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.apply(this,arguments)}return n}(zr),Hr=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.apply(this,arguments)}return n}(Gn),$r=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.apply(this,arguments)}return n}(Hr),Kr=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.apply(this,arguments)}return n}(Hr),Qr=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(e){var r;return Object(f.a)(this,n),(r=t.call(this,e))._values=new Vn(new Uint8Array(0)),r}return Object(h.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 ht(Object(ft.a)(n.prototype),"setValue",this).call(this,e,_e(t))}},{key:"_flushPending",value:function(e,t){var n,r,i=this._offsets,a=this._values.reserve(t).buffer,o=0,u=0,c=0,l=Object(s.a)(e);try{for(l.s();!(r=l.n()).done;){var f=Object(p.a)(r.value,2);o=f[0],void 0===(n=f[1])?i.set(o,0):(u=n.length,a.set(n,c),i.set(o,u),c+=u)}}catch(h){l.e(h)}finally{l.f()}}}]),n}(Jn),Gr=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(e){var r;return Object(f.a)(this,n),(r=t.call(this,e))._values=new Vn(new Uint8Array(0)),r}return Object(h.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 ht(Object(ft.a)(n.prototype),"setValue",this).call(this,e,C(t))}},{key:"_flushPending",value:function(e,t){}}]),n}(Jn);Gr.prototype._flushPending=Qr.prototype._flushPending;var Jr=function(){function e(){Object(f.a)(this,e)}return Object(h.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 gt?e:(this._values=e,this)}}]),e}(),Zr=n(21),Xr=n(16),ei=n(11),ti=Symbol.for("parent"),ni=Symbol.for("rowIndex"),ri=Symbol.for("keyToIdx"),ii=Symbol.for("idxToVal"),ai=Symbol.for("nodejs.util.inspect.custom"),oi=function(e){function t(e,n){Object(f.a)(this,t),this[ti]=e,this.size=n}return Object(h.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[ri]||(this[ri]=new Map),r=n.get(e);if(void 0!==r){var i=this[ii]||(this[ii]=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[ii]||(this[ii]=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[ri]||(this[ri]=new Map),r=n.get(e);if(void 0===r&&n.set(e,r=this.getIndex(e)),r>-1)(this[ii]||(this[ii]=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:d.mark((function e(){var t,n,r,i,a,o,u,c,s;return d.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.keys(),n=this.values(),r=this[ri]||(this[ri]=new Map),i=this[ii]||(this[ii]=new Array(this.size)),u=0;case 5:if((c=t.next()).done||(s=n.next()).done){e.next=15;break}return a=c.value,o=s.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(),c=void 0===t?e:function(n,r,i){return e.call(t,n,r,i)},s=this[ri]||(this[ri]=new Map),l=this[ii]||(this[ii]=new Array(this.size)),f=0;!(i=o.next()).done&&!(a=u.next()).done;++f)n=i.value,r=a.value,l[f]=r,s.has(n)||s.set(n,f),c(r,n,this)}},{key:"toArray",value:function(){return Object(Ut.a)(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:ai,value:function(){return this.toString()}},{key:"toString",value:function(){var e=[];return this.forEach((function(t,n){n=Pn(n),t=Pn(t),e.push("".concat(n,": ").concat(t))})),"{ ".concat(e.join(", ")," }")}}]),t}(Symbol.iterator);oi[Symbol.toStringTag]=function(e){var t;return Object.defineProperties(e,(t={size:{writable:!0,enumerable:!1,configurable:!1,value:0}},Object(ei.a)(t,ti,{writable:!0,enumerable:!1,configurable:!1,value:null}),Object(ei.a)(t,ni,{writable:!0,enumerable:!1,configurable:!1,value:-1}),t)),e[Symbol.toStringTag]="Row"}(oi.prototype);var ui=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(e){var r;return Object(f.a)(this,n),r=t.call(this,e,e.length),Object(Zr.a)(r,fi(Object(Xr.a)(r)))}return Object(h.a)(n,[{key:"keys",value:function(){return this[ti].getChildAt(0)[Symbol.iterator]()}},{key:"values",value:function(){return this[ti].getChildAt(1)[Symbol.iterator]()}},{key:"getKey",value:function(e){return this[ti].getChildAt(0).get(e)}},{key:"getIndex",value:function(e){return this[ti].getChildAt(0).indexOf(e)}},{key:"getValue",value:function(e){return this[ti].getChildAt(1).get(e)}},{key:"setValue",value:function(e,t){this[ti].getChildAt(1).set(e,t)}}]),n}(oi),ci=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(e){var r;return Object(f.a)(this,n),r=t.call(this,e,e.type.children.length),Object(Zr.a)(r,li(Object(Xr.a)(r)))}return Object(h.a)(n,[{key:"keys",value:d.mark((function e(){var t,n,r;return d.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=Object(s.a)(this[ti].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:d.mark((function e(){var t,n,r;return d.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=Object(s.a)(this[ti].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[ti].type.children[e].name}},{key:"getIndex",value:function(e){return this[ti].type.children.findIndex((function(t){return t.name===e}))}},{key:"getValue",value:function(e){return this[ti].getChildAt(e).get(this[ni])}},{key:"setValue",value:function(e,t){return this[ti].getChildAt(e).set(this[ni],t)}}]),n}(oi);Object.setPrototypeOf(oi.prototype,Map.prototype);var si,li=function(){var e={enumerable:!0,configurable:!1,get:null,set:null};return function(t){var n,r=-1,i=t[ri]||(t[ri]=new Map),a=function(e){return function(){return this.get(e)}},o=function(e){return function(t){return this.set(e,t)}},u=Object(s.a)(t.keys());try{for(u.s();!(n=u.n()).done;){var c=n.value;i.set(c,++r),e.get=a(c),e.set=o(c),t.hasOwnProperty(c)||(e.enumerable=!0,Object.defineProperty(t,c,e)),t.hasOwnProperty(r)||(e.enumerable=!1,Object.defineProperty(t,r,e))}}catch(l){u.e(l)}finally{u.f()}return e.get=e.set=null,t}}(),fi=function(){if("undefined"===typeof Proxy)return li;var e=oi.prototype.has,t=oi.prototype.get,n=oi.prototype.set,r=oi.prototype.getKey,i={isExtensible:function(){return!1},deleteProperty:function(){return!1},preventExtensions:function(){return!0},ownKeys:function(e){return Object(Ut.a)(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 ti:case ni:case ii:case ri:case ai: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 ti:case ni:case ii:case ri:case ai: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 ti:case ni:case ii:case ri: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 hi(e,t,n){var r=e.length,i=t>-1?t:r+t%r;return n?n(e,i):i}function di(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 pi=V?z(0):0,vi=function(e){return e!==e};function yi(e){var t=typeof e;if("object"!==t||null===e)return vi(e)?vi:"bigint"!==t?function(t){return t===e}:function(t){return pi+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&&Ze(e,t)}:e instanceof Map?function(e){var t=-1,n=[];return e.forEach((function(e){return n[++t]=yi(e)})),bi(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(f.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(h.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(tn.isDictionary(this._type)){if(!this._indices){var e=this._chunks;this._indices=1===e.length?e[0].indices:r.concat.apply(r,Object(Ut.a)(e.map((function(e){return e.indices}))))}return this._indices}return null}},{key:"dictionary",get:function(){return tn.isDictionary(this._type)?this._chunks[this._chunks.length-1].data.dictionary:null}},{key:t,value:d.mark((function e(){var t,n,r;return d.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=Object(s.a)(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+s))if(l>=t&&l+s<=n)r.push(c);else{var f=Math.max(0,t-l),h=Math.min(n-l,s);r.push(c.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(f.a)(this,n),i=gi.flatten.apply(gi,Object(Ut.a)(i)),(r=t.call(this,e.type,i,a))._field=e,1!==i.length||Object(Xr.a)(r)instanceof xi?r:Object(Zr.a)(r,new xi(e,i[0],r._chunkOffsets))}return Object(h.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}(gi),xi=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(e,r,i){var a;return Object(f.a)(this,n),(a=t.call(this,e,[r],i))._chunk=r,a}return Object(h.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}(Oi),ji=Array.isArray,Si=function(e,t){return Bi(e,t,[],0)},Ti=function(e){var t=Di(e,[[],[]]),n=Object(p.a)(t,2),r=n[0];return n[1].map((function(e,t){return e instanceof Oi?Oi.new(e.field.clone(r[t]),e):e instanceof gt?Oi.new(r[t],e):Oi.new(r[t],[])}))},Ii=function(e){return Di(e,[[],[]])},Ei=function(e,t){return function e(t,n,r,i){var a,o=i,u=-1,c=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(f.a)(this,t),this.fields=e||[],this.metadata=n||new Map,r||(r=Mi(e)),this.dictionaries=r}return Object(h.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 en.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(f.a)(this,t),this.name=e,this.type=n,this.nullable=r,this.metadata=i||new Map}return Object(h.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 en.compareField(this,e)}},{key:"clone",value:function(){for(var e,n,r,i,a,o,u,c,s,l,f,h=arguments.length,d=new Array(h),v=0;v1&&void 0!==arguments[1]?arguments[1]:new Map,n=-1,r=e.length;++n0&&Mi(a.children,t)}return t}Li.prototype.fields=null,Li.prototype.metadata=null,Li.prototype.dictionaries=null,Ni.prototype.type=null,Ni.prototype.name=null,Ni.prototype.nullable=null,Ni.prototype.metadata=null;var Pi=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(e){var r;return Object(f.a)(this,n),(r=t.call(this,e))._run=new Jr,r._offsets=new qn,r}return Object(h.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 Tn(new Ni(t,e.type,!0)),this.numChildren-1}},{key:"clear",value:function(){return this._run.clear(),ht(Object(ft.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=Object(s.a)(e);try{for(u.s();!(n=u.n()).done;){var c=Object(p.a)(n.value,2);o=c[0],void 0===(t=c[1])?i.set(o,0):(i.set(o,t.length),a(this,o,r.bind(t)))}}catch(l){u.e(l)}finally{u.f()}}}]),n}(Jn),Ui=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(f.a)(this,n),(e=t.apply(this,arguments))._run=new Jr,e}return Object(h.a)(n,[{key:"setValue",value:function(e,t){ht(Object(ft.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 Bn(this.type.listSize,new Ni(t,e.type,!0)),n}},{key:"clear",value:function(){return this._run.clear(),ht(Object(ft.a)(n.prototype),"clear",this).call(this)}}]),n}(Qn),Ri=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.apply(this,arguments)}return Object(h.a)(n,[{key:"set",value:function(e,t){return ht(Object(ft.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 Cn(new Ni(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}(Jn),zi=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.apply(this,arguments)}return Object(h.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 In([].concat(Object(Ut.a)(this.type.children),[new Ni(t,e.type,!0)])),n}}]),n}(Qn),Vi=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(e){var r;return Object(f.a)(this,n),(r=t.call(this,e))._typeIds=new Wn(new Int8Array(0),1),"function"===typeof e.valueToChildTypeId&&(r._valueToChildTypeId=e.valueToChildTypeId),r}return Object(h.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),ht(Object(ft.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(Object(Ut.a)(i),[new Ni(t,e.type)]);return this.type=new En(a,[].concat(Object(Ut.a)(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}(Qn),Wi=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.apply(this,arguments)}return n}(Vi),Yi=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(e){var r;return Object(f.a)(this,n),(r=t.call(this,e))._offsets=new Wn(new Int32Array(0)),r}return Object(h.a)(n,[{key:"setValue",value:function(e,t,r){var i=this.type.typeIdToChildIndex[r];return this._offsets.set(e,this.getChildAt(i).length),ht(Object(ft.a)(n.prototype),"setValue",this).call(this,e,t,r)}}]),n}(Vi),qi=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.apply(this,arguments)}return n}(Rt),Hi=function(e,t,n){e[t]=n%4294967296|0,e[t+1]=n/4294967296|0},$i=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)},Ki=function(e,t,n){!function(e,t,n){e[t]=n/864e5|0}(e.values,t,n.valueOf())},Qi=function(e,t,n){var r=e.values;Hi(r,2*t,n.valueOf())},Gi=function(e,t,n){var r=e.stride;e.values[r*t]=n},Ji=function(e,t,n){var r=e.stride;e.values[r*t]=sr(n)},Zi=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=be(e.ArrayType,r);e.values.set(a.subarray(0,i),i*t)}},Xi=function(e,t,n){var r=e.values;return Hi(r,2*t,n/1e3)},ea=function(e,t,n){var r=e.values;return Hi(r,2*t,n)},ta=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)},na=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)},ra=function(e,t,n){e.values[e.stride*t]=n},ia=function(e,t,n){e.values[e.stride*t]=n},aa=function(e,t,n){e.values.set(n.subarray(0,2),2*t)},oa=function(e,t,n){e.values.set(n.subarray(0,2),2*t)},ua=function(e,t,n){var r=e.typeIdToChildIndex[e.typeIds[t]],i=e.getChildAt(r);i&&i.set(e.valueOffsets[t],n)},ca=function(e,t,n){var r=e.typeIdToChildIndex[e.typeIds[t]],i=e.getChildAt(r);i&&i.set(t,n)},sa=function(e,t,n){e.values.set(n.subarray(0,2),2*t)},la=function(e,t,n){e.values[t]=12*n[0]+n[1]%12};qi.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(Object(lt.a)(Object(lt.a)({},a),{},{type:i})))}))}return r},Object.keys(wt).map((function(e){return wt[e]})).filter((function(e){return"number"===typeof e&&e!==wt.NONE})).forEach((function(e){da.visit(e).prototype._setValue=ha.getVisitFn(e)})),Gr.prototype._setValue=ha.visitBinary,function(e){!function(t){!function(t){!function(t){var n=function(){function t(){Object(f.a)(this,t),this.bb=null,this.bb_pos=0}return Object(h.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):dt.apache.arrow.flatbuf.MetadataVersion.V1}},{key:"schema",value:function(e){var t=this.bb.__offset(this.bb_pos,6);return t?(e||new dt.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,dt.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={}))}(fa||(fa={})),function(e){!function(e){!function(e){!function(e){var t=function(){function e(){Object(f.a)(this,e),this.bb=null,this.bb_pos=0}return Object(h.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={}))}(fa||(fa={}));var pa=w.Long,va=w.Builder,ya=w.ByteBuffer,ba=fa.apache.arrow.flatbuf.Block,ma=fa.apache.arrow.flatbuf.Footer,ga=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:It.V4,r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0;Object(f.a)(this,e),this.schema=t,this.version=n,r&&(this._recordBatches=r),i&&(this._dictionaryBatches=i)}return Object(h.a)(e,[{key:"numRecordBatches",get:function(){return this._recordBatches.length}},{key:"numDictionaries",get:function(){return this._dictionaryBatches.length}},{key:"recordBatches",value:d.mark((function e(){var t,n,r;return d.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 ht(Object(ft.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?B(this.toUint8Array(!0)):this.toUint8Array(!1).then(B)}},{key:"toUint8Array",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return t?ye(this._values)[0]:Object(l.a)(d.mark((function t(){var n,r,i,a,o,u,c,s;return d.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=[],r=0,i=!1,a=!1,t.prev=3,u=_a(e);case 5:return t.next=7,u.next();case 7:if(!(i=!(c=t.sent).done)){t.next=14;break}s=c.value,n.push(s),r+=s.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",ye(n,r)[0]);case 31:case"end":return t.stop()}}),t,null,[[3,16,20,30],[21,,25,29]])})))()}}]),n}(P),ja=function(e){function t(e){Object(f.a)(this,t),e&&(this.source=new Ta(et.fromIterable(e)))}return Object(h.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),Sa=function(e){function t(e){Object(f.a)(this,t),e instanceof t?this.source=e.source:e instanceof xa?this.source=new Ia(et.fromAsyncIterable(e)):se(e)?this.source=new Ia(et.fromNodeStream(e)):ue(e)?this.source=new Ia(et.fromDOMStream(e)):ae(e)?this.source=new Ia(et.fromDOMStream(e.body)):ee(e)?this.source=new Ia(et.fromIterable(e)):(X(e)||te(e))&&(this.source=new Ia(et.fromAsyncIterable(e)))}return Object(h.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),Ta=function(){function e(t){Object(f.a)(this,e),this.source=t}return Object(h.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)||N)}},{key:"return",value:function(e){return Object.create(this.source.return&&this.source.return(e)||N)}}]),e}(),Ia=function(){function e(t){var n=this;Object(f.a)(this,e),this.source=t,this._closedPromise=new Promise((function(e){return n._closedPromiseResolve=e}))}return Object(h.a)(e,[{key:"cancel",value:function(){var e=Object(l.a)(d.mark((function e(t){return d.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=Object(l.a)(d.mark((function e(t){return d.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=Object(l.a)(d.mark((function e(t){return d.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=Object(l.a)(d.mark((function e(t){var n,r=arguments;return d.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=Object(l.a)(d.mark((function e(t){var n;return d.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=N;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=Object(l.a)(d.mark((function e(t){var n;return d.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=N;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}(),Ea=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(e,r){var i;return Object(f.a)(this,n),(i=t.call(this)).position=0,i.buffer=_e(e),i.size="undefined"===typeof r?i.buffer.byteLength:r,i}return Object(h.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(Ba(this.buffer[3])," ").concat(Ba(this.buffer[2])," ").concat(Ba(this.buffer[1])," ").concat(Ba(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 Mn.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 Mn.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 Mn.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 Mn.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 Mn.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 Mn.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 Mn.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 Mn.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 Mn.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 Mn.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 Mn.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 Mn.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 Mn.Struct(e,0,n,r,this.readNullBitmap(e,r),this.visitMany(e.children))}},{key:"visitUnion",value:function(e){return e.mode===jt.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 Mn.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 Mn.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 Mn.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 Mn.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 Mn.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 Mn.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}(Rt),Pa=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(e,r,i,a){var o;return Object(f.a)(this,n),(o=t.call(this,new Uint8Array(0),r,i,a)).sources=e,o}return Object(h.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):Lt(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 be(Uint8Array,be(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 be(Uint8Array,be(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 tn.isTimestamp(e)||(tn.isInt(e)||tn.isTime(e))&&64===e.bitWidth||tn.isDate(e)&&e.unit===_t.MILLISECOND?be(Uint8Array,Na.convertArray(r[n])):tn.isDecimal(e)?be(Uint8Array,Fa.convertArray(r[n])):tn.isBinary(e)||tn.isFixedSizeBinary(e)?Ua(r[n]):tn.isBool(e)?Lt(r[n]):tn.isUtf8(e)?C(r[n].join("")):be(Uint8Array,be(e.ArrayType,r[n].map((function(e){return+e}))))}}]),n}(Ma);function Ua(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 Ra=w.Long,za=dt.apache.arrow.flatbuf.Null,Va=dt.apache.arrow.flatbuf.Int,Wa=dt.apache.arrow.flatbuf.FloatingPoint,Ya=dt.apache.arrow.flatbuf.Binary,qa=dt.apache.arrow.flatbuf.Bool,Ha=dt.apache.arrow.flatbuf.Utf8,$a=dt.apache.arrow.flatbuf.Decimal,Ka=dt.apache.arrow.flatbuf.Date,Qa=dt.apache.arrow.flatbuf.Time,Ga=dt.apache.arrow.flatbuf.Timestamp,Ja=dt.apache.arrow.flatbuf.Interval,Za=dt.apache.arrow.flatbuf.List,Xa=dt.apache.arrow.flatbuf.Struct_,eo=dt.apache.arrow.flatbuf.Union,to=dt.apache.arrow.flatbuf.DictionaryEncoding,no=dt.apache.arrow.flatbuf.FixedSizeBinary,ro=dt.apache.arrow.flatbuf.FixedSizeList,io=dt.apache.arrow.flatbuf.Map,ao=new(function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.apply(this,arguments)}return Object(h.a)(n,[{key:"visit",value:function(e,t){return null==e||null==t?void 0:ht(Object(ft.a)(n.prototype),"visit",this).call(this,e,t)}},{key:"visitNull",value:function(e,t){return za.startNull(t),za.endNull(t)}},{key:"visitInt",value:function(e,t){return Va.startInt(t),Va.addBitWidth(t,e.bitWidth),Va.addIsSigned(t,e.isSigned),Va.endInt(t)}},{key:"visitFloat",value:function(e,t){return Wa.startFloatingPoint(t),Wa.addPrecision(t,e.precision),Wa.endFloatingPoint(t)}},{key:"visitBinary",value:function(e,t){return Ya.startBinary(t),Ya.endBinary(t)}},{key:"visitBool",value:function(e,t){return qa.startBool(t),qa.endBool(t)}},{key:"visitUtf8",value:function(e,t){return Ha.startUtf8(t),Ha.endUtf8(t)}},{key:"visitDecimal",value:function(e,t){return $a.startDecimal(t),$a.addScale(t,e.scale),$a.addPrecision(t,e.precision),$a.endDecimal(t)}},{key:"visitDate",value:function(e,t){return Ka.startDate(t),Ka.addUnit(t,e.unit),Ka.endDate(t)}},{key:"visitTime",value:function(e,t){return Qa.startTime(t),Qa.addUnit(t,e.unit),Qa.addBitWidth(t,e.bitWidth),Qa.endTime(t)}},{key:"visitTimestamp",value:function(e,t){var n=e.timezone&&t.createString(e.timezone)||void 0;return Ga.startTimestamp(t),Ga.addUnit(t,e.unit),void 0!==n&&Ga.addTimezone(t,n),Ga.endTimestamp(t)}},{key:"visitInterval",value:function(e,t){return Ja.startInterval(t),Ja.addUnit(t,e.unit),Ja.endInterval(t)}},{key:"visitList",value:function(e,t){return Za.startList(t),Za.endList(t)}},{key:"visitStruct",value:function(e,t){return Xa.startStruct_(t),Xa.endStruct_(t)}},{key:"visitUnion",value:function(e,t){eo.startTypeIdsVector(t,e.typeIds.length);var n=eo.createTypeIdsVector(t,e.typeIds);return eo.startUnion(t),eo.addMode(t,e.mode),eo.addTypeIds(t,n),eo.endUnion(t)}},{key:"visitDictionary",value:function(e,t){var n=this.visit(e.indices,t);return to.startDictionaryEncoding(t),to.addId(t,new Ra(e.id,0)),to.addIsOrdered(t,e.isOrdered),void 0!==n&&to.addIndexType(t,n),to.endDictionaryEncoding(t)}},{key:"visitFixedSizeBinary",value:function(e,t){return no.startFixedSizeBinary(t),no.addByteWidth(t,e.byteWidth),no.endFixedSizeBinary(t)}},{key:"visitFixedSizeList",value:function(e,t){return ro.startFixedSizeList(t),ro.addListSize(t,e.listSize),ro.endFixedSizeList(t)}},{key:"visitMap",value:function(e,t){return io.startMap(t),io.addKeysSorted(t,e.keysSorted),io.endMap(t)}}]),n}(Rt));function oo(e){return new To(e.count,function e(t){return(t||[]).reduce((function(t,n){return[].concat(Object(Ut.a)(t),[new Ao(n.count,(r=n.VALIDITY,(r||[]).reduce((function(e,t){return e+ +(0===t)}),0)))],Object(Ut.a)(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 Li)return new e(0,It.V4,Tt.Schema,t);if(t instanceof To)return new e(n,It.V4,Tt.RecordBatch,t);if(t instanceof Io)return new e(n,It.V4,Tt.DictionaryBatch,t);throw new Error("Unrecognized Message header: ".concat(t))}}]),e}(),To=function(){function e(t,n,r){Object(f.a)(this,e),this._nodes=n,this._buffers=r,this._length="number"===typeof t?t:t.low}return Object(h.a)(e,[{key:"nodes",get:function(){return this._nodes}},{key:"length",get:function(){return this._length}},{key:"buffers",get:function(){return this._buffers}}]),e}(),Io=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];Object(f.a)(this,e),this._data=t,this._isDelta=r,this._id="number"===typeof n?n:n.low}return Object(h.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}(),Eo=function e(t,n){Object(f.a)(this,e),this.offset="number"===typeof t?t:t.low,this.length="number"===typeof n?n:n.low},Ao=function e(t,n){Object(f.a)(this,e),this.length="number"===typeof t?t:t.low,this.nullCount="number"===typeof n?n:n.low};function Bo(e){for(var t,n=[],r=-1,i=-1,a=e.nodesLength();++r0?bo.createCustomMetadataVector(e,Object(Ut.a)(t.metadata).map((function(t){var n=Object(p.a)(t,2),r=n[0],i=n[1],a=e.createString("".concat(r)),o=e.createString("".concat(i));return ko.startKeyValue(e),ko.addKey(e,a),ko.addValue(e,o),ko.endKeyValue(e)}))):-1;t.name&&(n=e.createString(t.name));bo.startField(e),bo.addType(e,r),bo.addTypeType(e,o),bo.addChildren(e,c),bo.addNullable(e,!!t.nullable),-1!==n&&bo.addName(e,n);-1!==i&&bo.addDictionary(e,i);-1!==s&&bo.addCustomMetadata(e,s);return bo.endField(e)},Ni.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())?Fo(a):new un,o=new Nn(t.get(n),a,n,u.isOrdered()),r=new Ni(e.name(),o,e.nullable(),No(e))):(a=(a=u.indexType())?Fo(a):new un,t.set(n,i=Mo(e,Lo(e,t))),o=new Nn(i,a,n,u.isOrdered()),r=new Ni(e.name(),o,e.nullable(),No(e))):(i=Mo(e,Lo(e,t)),r=new Ni(e.name(),i,e.nullable(),No(e)));return r||null},Ni.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 un,u=new Nn(t.get(n),r,n,a.isOrdered),i=new Ni(e.name,u,e.nullable,so(e.customMetadata))):(r=(r=a.indexType)?lo(r):new un,t.set(n,o=fo(e,co(e,t))),u=new Nn(o,r,n,a.isOrdered),i=new Ni(e.name,u,e.nullable,so(e.customMetadata))):(o=fo(e,co(e,t)),i=new Ni(e.name,o,e.nullable,so(e.customMetadata))),i||null},Li.encode=function(e,t){var n=t.fields.map((function(t){return Ni.encode(e,t)}));mo.startFieldsVector(e,n.length);var r=mo.createFieldsVector(e,n),i=t.metadata&&t.metadata.size>0?mo.createCustomMetadataVector(e,Object(Ut.a)(t.metadata).map((function(t){var n=Object(p.a)(t,2),r=n[0],i=n[1],a=e.createString("".concat(r)),o=e.createString("".concat(i));return ko.startKeyValue(e),ko.addKey(e,a),ko.addValue(e,o),ko.endKeyValue(e)}))):-1;mo.startSchema(e),mo.addFields(e,r),mo.addEndianness(e,Po?Oo.Little:Oo.Big),-1!==i&&mo.addCustomMetadata(e,i);return mo.endSchema(e)},Li.decode=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Map,n=Do(e,t);return new Li(n,No(e),t)},Li.fromJSON=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Map;return new Li(uo(e,t),so(e.customMetadata),t)},To.encode=function(e,t){var n=t.nodes||[],r=t.buffers||[];xo.startNodesVector(e,n.length),n.slice().reverse().forEach((function(t){return Ao.encode(e,t)}));var i=e.endVector();xo.startBuffersVector(e,r.length),r.slice().reverse().forEach((function(t){return Eo.encode(e,t)}));var a=e.endVector();return xo.startRecordBatch(e),xo.addLength(e,new ho(t.length,0)),xo.addNodes(e,i),xo.addBuffers(e,a),xo.endRecordBatch(e)},To.decode=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:It.V4;return new To(e.length(),Bo(e),Co(e,t))},To.fromJSON=oo,Io.encode=function(e,t){var n=To.encode(e,t.data);return jo.startDictionaryBatch(e),jo.addId(e,new ho(t.id,0)),jo.addIsDelta(e,t.isDelta),jo.addData(e,n),jo.endDictionaryBatch(e)},Io.decode=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:It.V4;return new Io(To.decode(e.data(),t),e.id(),e.isDelta())},Io.fromJSON=function(e){return new Io(oo(e.data),e.id,e.isDelta)},Ao.encode=function(e,t){return _o.createFieldNode(e,new ho(t.length,0),new ho(t.nullCount,0))},Ao.decode=function(e){return new Ao(e.length(),e.nullCount())},Eo.encode=function(e,t){return go.createBuffer(e,new ho(t.offset,0),new ho(t.length,0))},Eo.decode=function(e){return new Eo(e.offset(),e.length())};for(var Po=function(){var e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),256===new Int16Array(e)[0]}(),Uo=w.ByteBuffer,Ro=function(e){return"Expected ".concat(Tt[e]," Message in stream, but was null or length 0.")},zo=function(e){return"Header pointer of flatbuffer-encoded ".concat(Tt[e]," Message is null or length 0.")},Vo=function(e,t){return"Expected to read ".concat(e," metadata bytes, but only read ").concat(t,".")},Wo=function(e,t){return"Expected to read ".concat(e," bytes for message body, but only read ").concat(t,".")},Yo=function(e){function t(e){Object(f.a)(this,t),this.source=e instanceof ja?e:new ja(e)}return Object(h.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?N: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(Ro(e));return t.value}},{key:"readMessageBody",value:function(e){if(e<=0)return new Uint8Array(0);var t=_e(this.source.read(e));if(t.byteLength0&&void 0!==arguments[0]&&arguments[0],t=Tt.Schema,n=this.readMessage(t),r=n&&n.header();if(e&&!r)throw new Error(zo(t));return r}},{key:"readMetadataLength",value:function(){var e=this.source.read($o),t=e&&new Uo(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 N;if(t.byteLength0&&void 0!==a[0]&&a[0],n=Tt.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(zo(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=Object(l.a)(d.mark((function e(){var t,n,r;return d.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.source.read($o);case 2:return t=e.sent,n=t&&new Uo(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=Object(l.a)(d.mark((function e(t){var n;return d.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",N);case 5:if(!(n.byteLength1&&void 0!==arguments[1]?arguments[1]:0,n=-1,r=Ko.length;++n2147483647)throw new RangeError("Cannot write arrays larger than 2^31 - 1 in length");tn.isNull(e.type)||tu.call(this,i<=0?new Uint8Array(0):Dt(t.offset,r,t.nullBitmap)),this.nodes.push(new Ao(r,i))}return ht(Object(ft.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?tu.call(this,new Uint8Array(0)):(t=e.values)instanceof Uint8Array?tu.call(this,Dt(e.offset,e.length,t)):tu.call(this,Lt(e))},eu.prototype.visitInt=nu,eu.prototype.visitFloat=nu,eu.prototype.visitUtf8=ru,eu.prototype.visitBinary=ru,eu.prototype.visitFixedSizeBinary=nu,eu.prototype.visitDate=nu,eu.prototype.visitTimestamp=nu,eu.prototype.visitTime=nu,eu.prototype.visitDecimal=nu,eu.prototype.visitList=iu,eu.prototype.visitStruct=au,eu.prototype.visitUnion=function(e){var t=e.type,n=e.length,r=e.typeIds,i=e.valueOffsets;if(tu.call(this,r),t.mode===jt.Sparse)return au.call(this,e);if(t.mode===jt.Dense){if(e.offset<=0)return tu.call(this,i),au.call(this,e);for(var a,o,u=r.reduce((function(e,t){return Math.max(e,t)}),r[0]),c=new Int32Array(u+1),s=new Int32Array(u+1).fill(-1),l=new Int32Array(n),f=Je(-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 X(e)?e.then((function(e){return t.writeAll(e)})):te(e)?hu(this,e):fu(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 xa?this._sink=e:(this._sink=new xa,e&&oe(e)?this.toDOMStream({type:"bytes"}).pipeTo(e):e&&ce(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 cs&&!(t=e.schema))return this.finish()&&void 0;if(e instanceof ss&&!(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 ss?e instanceof ls||this._writeRecordBatch(e):e instanceof cs?this.writeAll(e.chunks):ee(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=So.encode(e),i=r.byteLength,a=this._writeLegacyIpcFormat?4:8,o=i+a+n&~n,u=o-i-a;return e.headerType===Tt.RecordBatch?this._recordBatchBlocks.push(new ka(o,e.bodyLength,this._position)):e.headerType===Tt.DictionaryBatch&&this._dictionaryBlocks.push(new ka(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=_e(e);t&&t.byteLength>0&&(this._sink.write(t),this._position+=t.byteLength)}return this}},{key:"_writeSchema",value:function(e){return this._writeMessage(So.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(Ko)}},{key:"_writePadding",value:function(e){return e>0?this._write(new Uint8Array(e)):this}},{key:"_writeRecordBatch",value:function(e){var t=eu.assemble(e),n=t.byteLength,r=t.nodes,i=t.bufferRegions,a=t.buffers,o=new To(e.length,r,i),u=So.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=eu.assemble(e),i=r.byteLength,a=r.nodes,o=r.bufferRegions,u=r.buffers,c=new To(e.length,a,o),s=new Io(c,t,n),l=So.from(s,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=Object(s.a)(e.dictionaries);try{for(n.s();!(t=n.n()).done;){var r=Object(p.a)(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,c="chunks"in a?a.chunks:[a],l=Object(s.a)(c);try{for(l.s();!(u=l.n()).done;){var f=u.value;this._writeDictionaryBatch(f,i,o>0),o+=f.length}}catch(h){l.e(h)}finally{l.f()}}}}catch(h){n.e(h)}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}(M,Symbol.asyncIterator),su=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.apply(this,arguments)}return Object(h.a)(n,null,[{key:"writeAll",value:function(e,t){var r=new n(t);return X(e)?e.then((function(e){return r.writeAll(e)})):te(e)?hu(r,e):fu(r,e)}}]),n}(cu),lu=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(f.a)(this,n),(e=t.call(this))._autoDestroy=!0,e}return Object(h.a)(n,[{key:"_writeSchema",value:function(e){return this._writeMagic()._writePadding(2)}},{key:"_writeFooter",value:function(e){var t=ga.encode(new ga(e,It.V4,this._recordBatchBlocks,this._dictionaryBlocks));return ht(Object(ft.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 X(e)?e.then((function(e){return t.writeAll(e)})):te(e)?hu(t,e):fu(t,e)}}]),n}(cu);function fu(e,t){var n=t;t instanceof cs&&(n=t.chunks,e.reset(void 0,t.schema));var r,i=Object(s.a)(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 hu(e,t){return du.apply(this,arguments)}function du(){return(du=Object(l.a)(d.mark((function e(t,n){var r,i,a,o,u,c;return d.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=!1,i=!1,e.prev=2,o=ou(n);case 4:return e.next=6,o.next();case 6:if(!(r=!(u=e.sent).done)){e.next=12;break}c=u.value,t.write(c);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 pu=new Uint8Array(0),vu=function(e){return[pu,pu,new Uint8Array(e),pu]};function yu(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=Object(Ut.a)(e.fields),c=[],s=(i+63&-64)>>3;++a0;){for(u=Number.POSITIVE_INFINITY,c=-1;++c0&&(i[o++]=[u,l.slice()]))}return[e=new Li(r,e.metadata),i.map((function(t){return Object(yr.a)(ss,[e].concat(Object(Ut.a)(t)))}))]}(e,t.map((function(e){return e instanceof gi?e.chunks.map((function(e){return e.data})):[e.data]})))}function gu(e,t,n,r,i){for(var a,o,u=0,c=-1,s=r.length,l=(t+63&-64)>>3;++c=t?u===t?n[c]=a:(n[c]=a.slice(0,t),a=a.slice(t,u-t),i.numBatches=Math.max(i.numBatches,r[c].unshift(a))):((o=e[c]).nullable||(e[c]=o.clone({nullable:!0})),n[c]=a?a._changeLengthAndBackfillNullBitmap(t):Mn.new(o.type,0,t,t,vu(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 ku=function(e,t){Object(D.a)(r,e);var n=Object(L.a)(r);function r(e,t){var i;return Object(f.a)(this,r),(i=n.call(this))._children=t,i.numChildren=e.childData.length,i._bindDataAccessors(i.data=e),i}return Object(h.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(wt[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 gt.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]=gt.new(this.data.childData[e]))}},{key:"toJSON",value:function(){return Object(Ut.a)(this)}},{key:"_sliceInternal",value:function(e,t,n){return e.clone(e.data.slice(t,n-t),null)}},{key:"_bindDataAccessors",value:function(e){}}]),r}(gt,Symbol.toStringTag);ku.prototype[Symbol.isConcatSpreadable]=!0;var _u=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.apply(this,arguments)}return Object(h.a)(n,[{key:"asUtf8",value:function(){return gt.new(this.data.clone(new mn))}}]),n}(ku),Ou=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.apply(this,arguments)}return Object(h.a)(n,null,[{key:"from",value:function(e){return as((function(){return new gn}),e)}}]),n}(ku),xu=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.apply(this,arguments)}return Object(h.a)(n,null,[{key:"from",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n>>0)},_c=function(e){return new Date(e)},Oc=function(e,t,n){var r=t[n],i=t[n+1];return null!=r&&null!=i?e.subarray(r,i):null},xc=function(e,t){return function(e,t){return _c(function(e,t){return 864e5*e[t]}(e,t))}(e.values,t)},jc=function(e,t){return function(e,t){return _c(kc(e,t))}(e.values,2*t)},Sc=function(e,t){var n=e.stride;return e.values[n*t]},Tc=function(e,t){var n=e.stride;return cr(e.values[n*t])},Ic=function(e,t){var n=e.stride,r=e.values,i=e.type;return jr.new(r.subarray(n*t,n*(t+1)),i.isSigned)},Ec=function(e,t){var n=e.values;return 1e3*kc(n,2*t)},Ac=function(e,t){var n=e.values;return kc(n,2*t)},Bc=function(e,t){return function(e,t){return e[t+1]/1e3*4294967296+(e[t]>>>0)/1e3}(e.values,2*t)},Cc=function(e,t){return function(e,t){return e[t+1]/1e6*4294967296+(e[t]>>>0)/1e6}(e.values,2*t)},Dc=function(e,t){return e.values[e.stride*t]},Lc=function(e,t){return e.values[e.stride*t]},Nc=function(e,t){var n=e.values;return jr.signed(n.subarray(2*t,2*(t+1)))},Fc=function(e,t){var n=e.values;return jr.signed(n.subarray(2*t,2*(t+1)))},Mc=function(e,t){var n=e.typeIdToChildIndex[e.typeIds[t]],r=e.getChildAt(n);return r?r.get(e.valueOffsets[t]):null},Pc=function(e,t){var n=e.typeIdToChildIndex[e.typeIds[t]],r=e.getChildAt(n);return r?r.get(t):null},Uc=function(e,t){return e.values.subarray(2*t,2*(t+1))},Rc=function(e,t){var n=e.values[t],r=new Int32Array(2);return r[0]=n/12|0,r[1]=n%12|0,r};wc.prototype.visitNull=function(e,t){return null},wc.prototype.visitBool=function(e,t){var n=e.offset+t;return 0!==(e.values[n>>3]&1<0?0:-1},Vc.prototype.visitBool=Wc,Vc.prototype.visitInt=Wc,Vc.prototype.visitInt8=Wc,Vc.prototype.visitInt16=Wc,Vc.prototype.visitInt32=Wc,Vc.prototype.visitInt64=Wc,Vc.prototype.visitUint8=Wc,Vc.prototype.visitUint16=Wc,Vc.prototype.visitUint32=Wc,Vc.prototype.visitUint64=Wc,Vc.prototype.visitFloat=Wc,Vc.prototype.visitFloat16=Wc,Vc.prototype.visitFloat32=Wc,Vc.prototype.visitFloat64=Wc,Vc.prototype.visitUtf8=Wc,Vc.prototype.visitBinary=Wc,Vc.prototype.visitFixedSizeBinary=Wc,Vc.prototype.visitDate=Wc,Vc.prototype.visitDateDay=Wc,Vc.prototype.visitDateMillisecond=Wc,Vc.prototype.visitTimestamp=Wc,Vc.prototype.visitTimestampSecond=Wc,Vc.prototype.visitTimestampMillisecond=Wc,Vc.prototype.visitTimestampMicrosecond=Wc,Vc.prototype.visitTimestampNanosecond=Wc,Vc.prototype.visitTime=Wc,Vc.prototype.visitTimeSecond=Wc,Vc.prototype.visitTimeMillisecond=Wc,Vc.prototype.visitTimeMicrosecond=Wc,Vc.prototype.visitTimeNanosecond=Wc,Vc.prototype.visitDecimal=Wc,Vc.prototype.visitList=Wc,Vc.prototype.visitStruct=Wc,Vc.prototype.visitUnion=Wc,Vc.prototype.visitDenseUnion=Yc,Vc.prototype.visitSparseUnion=Yc,Vc.prototype.visitDictionary=Wc,Vc.prototype.visitInterval=Wc,Vc.prototype.visitIntervalDayTime=Wc,Vc.prototype.visitIntervalYearMonth=Wc,Vc.prototype.visitFixedSizeList=Wc,Vc.prototype.visitMap=Wc;var qc=new Vc,Hc=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.apply(this,arguments)}return n}(Rt);function $c(e){if(e.nullCount>0)return function(e){var t=zc.getVisitFn(e);return Nt(e.nullBitmap,e.offset,e.length,e,(function(e,n,r,i){return 0!==(r&1<0)?e.values.subarray(0,r)[Symbol.iterator]():d.mark((function t(n){var i;return d.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){Ct(this.nullBitmap,this.offset+t,!(null===n||void 0===n))&&e.call(this,t,n)}}(this.set));var t},Object.keys(wt).map((function(e){return wt[e]})).filter((function(e){return"number"===typeof e})).filter((function(e){return e!==wt.NONE})).forEach((function(e){var t,n=ts.visit(e);n.prototype.get=(t=zc.getVisitFn(e),function(e){return t(this,e)}),n.prototype.set=gc(ha.getVisitFn(e)),n.prototype.indexOf=gc(qc.getVisitFn(e)),n.prototype.toArray=mc(Jc.getVisitFn(e)),n.prototype.getByteWidth=function(e){return function(){return e(this.type)}}(es.getVisitFn(e)),n.prototype[Symbol.iterator]=mc(Kc.getVisitFn(e))}));var cs=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){var e;Object(f.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 Oi(t,a)}return null}},{key:"serialize",value:function(){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],t=e?su:lu;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)}))),Object(Ut.a)(o.map((function(t){return e.getColumnAt(t)})))).filter(Boolean);return Object(yr.a)(n,Object(Ut.a)(mu(c,s)))}}],[{key:"empty",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Li([]);return new n(e,[])}},{key:"from",value:function(e){if(!e)return n.empty();if("object"===typeof e){var t=ee(e.values)?function(e){if(e.type instanceof In)return cs.fromStruct(rc.from(e));return null}(e):te(e.values)?function(e){if(e.type instanceof In)return rc.from(e).then((function(e){return cs.fromStruct(e)}));return null}(e):null;if(null!==t)return t}var r=vs.from(e);return X(r)?Object(l.a)(d.mark((function e(){return d.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,Object(Ut.a)(r)):n.empty():function(){var e=Object(l.a)(d.mark((function e(t){var r,i,a,o,u,c,s,l,f;return d.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,s=os(r);case 10:return e.next=12,s.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,c=e.t0;case 24:if(e.prev=24,e.prev=25,!o||null==s.return){e.next=29;break}return e.next=29,s.return();case 29:if(e.prev=29,!u){e.next=32;break}throw c;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=Object(l.a)(d.mark((function e(t){return d.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 In(e.schema.fields)).dictionaries}}]),n}(Rt),hs=d.mark(Ts);function ds(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 ps(t.call(e));n="@@asyncIterator",r="@@iterator"}throw new TypeError("Object is not async iterable")}function ps(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(ps=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 ps(e)}var vs=function(e,t,n){Object(D.a)(i,e);var r=Object(L.a)(i);function i(e){var t;return Object(f.a)(this,i),(t=r.call(this))._impl=e,t}return Object(h.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 X(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 et.toDOMStream(this.isSync()?Object(ei.a)({},Symbol.iterator,(function(){return e})):Object(ei.a)({},Symbol.asyncIterator,(function(){return e})))}},{key:"toNodeStream",value:function(){var e=this;return et.toNodeStream(this.isSync()?Object(ei.a)({},Symbol.iterator,(function(){return e})):Object(ei.a)({},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:ne(e)?function(e){return new ys(new js(e))}(e):ie(e)?function(e){return Bs.apply(this,arguments)}(e):X(e)?Object(l.a)(d.mark((function t(){return d.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)})))():ae(e)||ue(e)||se(e)||te(e)?function(e){return As.apply(this,arguments)}(new Sa(e)):function(e){var t=e.peek(Jo+7&-8);return t&&t.byteLength>=4?Go(t)?new ms(new Os(e.read())):new ys(new ks(e)):new ys(new ks(d.mark((function e(){return d.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)}))()))}(new ja(e))}},{key:"readAll",value:function(e){return e instanceof i?e.isSync()?Ts(e):Is(e):ne(e)||ArrayBuffer.isView(e)||ee(e)||re(e)?Ts(e):Is(e)}}]),i}(M,Symbol.iterator,Symbol.asyncIterator),ys=function(e,t,n){Object(D.a)(i,e);var r=Object(L.a)(i);function i(e){var t;return Object(f.a)(this,i),(t=r.call(this,e))._impl=e,t}return Object(h.a)(i,[{key:t,value:function(){return this._impl[Symbol.iterator]()}},{key:n,value:function(){var e=this;return m(d.mark((function t(){return d.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.delegateYield(g(ds(e[Symbol.iterator]()),y),"t0",1);case 1:case"end":return t.stop()}}),t)})))()}}]),i}(vs,Symbol.iterator,Symbol.asyncIterator),bs=function(e,t,n){Object(D.a)(i,e);var r=Object(L.a)(i);function i(e){var t;return Object(f.a)(this,i),(t=r.call(this,e))._impl=e,t}return Object(h.a)(i,[{key:t,value:function(){throw new Error("AsyncRecordBatchStreamReader is not Iterable")}},{key:n,value:function(){return this._impl[Symbol.asyncIterator]()}}]),i}(vs,Symbol.iterator,Symbol.asyncIterator),ms=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(e){var r;return Object(f.a)(this,n),(r=t.call(this,e))._impl=e,r}return n}(ys),gs=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(e){var r;return Object(f.a)(this,n),(r=t.call(this,e))._impl=e,r}return n}(bs),ws=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Map;Object(f.a)(this,e),this.closed=!1,this.autoDestroy=!0,this._dictionaryIndex=0,this._recordBatchIndex=0,this.dictionaries=t}return Object(h.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 ss(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 c=o.dictionaries.get(n);return u&&r?u.concat(gt.new(this._loadVectors(i,t,[c])[0])):gt.new(this._loadVectors(i,t,[c])[0])}return u}},{key:"_loadVectors",value:function(e,t,n){return new Ma(t,e.nodes,e.buffers,this.dictionaries).visitMany(n)}}]),e}(),ks=function(e,t){Object(D.a)(r,e);var n=Object(L.a)(r);function r(e,t){var i;return Object(f.a)(this,r),(i=n.call(this,t))._reader=ne(e)?new Ho(i._handle=e):new Yo(i._handle=e),i}return Object(h.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=Ss(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):N}},{key:"return",value:function(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(e):N}},{key:"next",value:function(){if(this.closed)return N;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 ls(this.schema)}):this.return()}},{key:"_readNextMessageAndValidate",value:function(e){return this._reader.readMessage(e)}}]),r}(ws,Symbol.iterator),_s=function(e,t){Object(D.a)(r,e);var n=Object(L.a)(r);function r(e,t){var i;return Object(f.a)(this,r),(i=n.call(this,t))._reader=new qo(i._handle=e),i}return Object(h.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=Object(l.a)(d.mark((function e(){return d.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=Object(l.a)(d.mark((function e(t){return d.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.closed){e.next=10;break}if(this.autoDestroy=Ss(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=Object(l.a)(d.mark((function e(t){return d.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",N);case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"return",value:function(){var e=Object(l.a)(d.mark((function e(t){return d.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",N);case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"next",value:function(){var e=Object(l.a)(d.mark((function e(){var t,n,r,i,a,o,u,c;return d.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.closed){e.next=2;break}return e.abrupt("return",N);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,c=this._loadDictionaryBatch(o,u),this.dictionaries.set(o.id,c);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 ls(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=Object(l.a)(d.mark((function e(t){return d.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}(ws,Symbol.asyncIterator),Os=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(e,r){return Object(f.a)(this,n),t.call(this,e instanceof Ea?e:new Ea(e),r)}return Object(h.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=Object(s.a)(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 ht(Object(ft.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(Tt.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(Tt.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-Zo,n=e.readInt32(t),r=e.readAt(t-n,n);return ga.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(Go(n)){e.next=8;break}e.t1=new bs(new _s(t)),e.next=15;break;case 8:return e.t2=ms,e.t3=Os,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 bs(new _s(m(d.mark((function e(){return d.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 Bs(){return(Bs=Object(l.a)(d.mark((function e(t){var n,r,i;return d.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 Aa(t,r),!(r>=Xo)){e.next=12;break}return e.t0=Go,e.next=9,i.readAt(0,Jo+7&-8);case 9:if(e.t1=e.sent,!(0,e.t0)(e.t1)){e.next=12;break}return e.abrupt("return",new gs(new xs(i)));case 12:return e.abrupt("return",new bs(new _s(i)));case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Cs=["readableStrategy","writableStrategy","queueingStrategy"];var Ds=function(){function e(t){var n,r,i=this;Object(f.a)(this,e),this._numChunks=0,this._finished=!1,this._bufferedSize=0;var a=t.readableStrategy,o=t.writableStrategy,u=t.queueingStrategy,c=void 0===u?"count":u,s=wu(t,Cs);this._controller=null,this._builder=Qn.new(s),this._getSize="bytes"!==c?Ls:Ns;var l=Object(lt.a)({},a).highWaterMark,h=void 0===l?"bytes"===c?Math.pow(2,14):1e3:l,d=Object(lt.a)({},o).highWaterMark,p=void 0===d?"bytes"===c?Math.pow(2,14):1e3:d;this.readable=new ReadableStream((n={},Object(ei.a)(n,"cancel",(function(){i._builder.clear()})),Object(ei.a)(n,"pull",(function(e){i._maybeFlush(i._builder,i._controller=e)})),Object(ei.a)(n,"start",(function(e){i._maybeFlush(i._builder,i._controller=e)})),n),{highWaterMark:h,size:"bytes"!==c?Ls:Ns}),this.writable=new WritableStream((r={},Object(ei.a)(r,"abort",(function(){i._builder.clear()})),Object(ei.a)(r,"write",(function(){i._maybeFlush(i._builder,i._controller)})),Object(ei.a)(r,"close",(function(){i._maybeFlush(i._builder.finish(),i._controller)})),r),{highWaterMark:p,size:function(e){return i._writeValueAndReturnChunkSize(e)}})}return Object(h.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}(),Ls=function(e){return e.length},Ns=function(e){return e.byteLength};var Fs=function(){function e(){Object(f.a)(this,e)}return Object(h.a)(e,[{key:"eq",value:function(t){return t instanceof e||(t=new Ms(t)),new Ys(this,t)}},{key:"le",value:function(t){return t instanceof e||(t=new Ms(t)),new qs(this,t)}},{key:"ge",value:function(t){return t instanceof e||(t=new Ms(t)),new Hs(this,t)}},{key:"lt",value:function(e){return new $s(this.ge(e))}},{key:"gt",value:function(e){return new $s(this.le(e))}},{key:"ne",value:function(e){return new $s(this.eq(e))}}]),e}(),Ms=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(e){var r;return Object(f.a)(this,n),(r=t.call(this)).v=e,r}return n}(Fs),Ps=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(e){var r;return Object(f.a)(this,n),(r=t.call(this)).name=e,r}return Object(h.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}(Rs),$s=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(e){var r;return Object(f.a)(this,n),(r=t.call(this)).child=e,r}return Object(h.a)(n,[{key:"bind",value:function(e){var t=this.child.bind(e);return function(e,n){return!t(e,n)}}}]),n}(Us);cs.prototype.countBy=function(e){return new Ks(this.chunks).countBy(e)},cs.prototype.scan=function(e,t){return new Ks(this.chunks).scan(e,t)},cs.prototype.scanReverse=function(e,t){return new Ks(this.chunks).scanReverse(e,t)},cs.prototype.filter=function(e){return new Ks(this.chunks).filter(e)};var Ks=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){return Object(f.a)(this,n),t.apply(this,arguments)}return Object(h.a)(n,[{key:"filter",value:function(e){return new Gs(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 Ps(e):e;r.bind(t[n-1]);var i=r.vector;if(!tn.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;++ue.length)&&(t=e.length);for(var n=0,r=new Array(t);n\n \n ",d.appendChild(document.createTextNode("".concat(i).concat(s?" [":" {"))),d.addEventListener("mouseup",(function(t){t.stopPropagation(),Ae(f,re(e,null,n,r))})),o=o(e);for(var p=0;!(u=o.next()).done&&p<20;++p)f.appendChild(u.value);if(!u.done){var v=f.appendChild(document.createElement("a"));v.className="observablehq--field",v.style.display="block",v.appendChild(document.createTextNode(" \u2026 more")),v.addEventListener("mouseup",(function(e){e.stopPropagation(),f.insertBefore(u.value,f.lastChild.previousSibling);for(var t=0;!(u=o.next()).done&&t<19;++t)f.insertBefore(u.value,f.lastChild.previousSibling);u.done&&f.removeChild(f.lastChild.previousSibling),a(f,"load")}))}return f.appendChild(document.createTextNode(s?"]":"}")),f}function M(e){var t,n,r,i,a;return u.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:t=Object(s.a)(e),o.prev=1,t.s();case 3:if((n=t.n()).done){o.next=9;break}return r=Object(c.a)(n.value,2),i=r[0],a=r[1],o.next=7,$(i,a);case 7:o.next=3;break;case 9:o.next=14;break;case 11:o.prev=11,o.t0=o.catch(1),t.e(o.t0);case 14:return o.prev=14,t.f(),o.finish(14);case 17:return o.delegateYield(W(e),"t1",18);case 18:case"end":return o.stop()}}),j,null,[[1,11,14,17]])}function P(e){var t,n,r;return u.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:t=Object(s.a)(e),i.prev=1,t.s();case 3:if((n=t.n()).done){i.next=9;break}return r=n.value,i.next=7,K(r);case 7:i.next=3;break;case 9:i.next=14;break;case 11:i.prev=11,i.t0=i.catch(1),t.e(i.t0);case 14:return i.prev=14,t.f(),i.finish(14);case 17:return i.delegateYield(W(e),"t1",18);case 18:case"end":return i.stop()}}),S,null,[[1,11,14,17]])}function U(e){var t,n,r;return u.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:t=Object(s.a)(e),i.prev=1,t.s();case 3:if((n=t.n()).done){i.next=9;break}return r=n.value,i.next=7,K(r);case 7:i.next=3;break;case 9:i.next=14;break;case 11:i.prev=11,i.t0=i.catch(1),t.e(i.t0);case 14:return i.prev=14,t.f(),i.finish(14);case 17:case"end":return i.stop()}}),T,null,[[1,11,14,17]])}function R(e){var t,n,r,i,a,o;return u.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:t=0,n=e.length;case 1:if(!(t ")),n.appendChild(Ee(t)),n}function K(e){var t=document.createElement("div");return t.className="observablehq--field",t.appendChild(document.createTextNode(" ")),t.appendChild(Ee(e)),t}var Q=u.a.mark(ie),G=u.a.mark(ae),J=u.a.mark(oe),Z=u.a.mark(ue),X=u.a.mark(ce),ee=u.a.mark(se),te=u.a.mark(le);function ne(e){var t=window.getSelection();return"Range"===t.type&&(t.containsNode(e,!0)||t.anchorNode.isSelfOrDescendant(e)||t.focusNode.isSelfOrDescendant(e))}function re(e,t,n,r){var i,a,o,u,c=l(e);if(e instanceof Map?e instanceof e.constructor?(i="Map(".concat(e.size,")"),a=ie):(i="Map()",a=se):e instanceof Set?e instanceof e.constructor?(i="Set(".concat(e.size,")"),a=ae):(i="Set()",a=se):c?(i="".concat(e.constructor.name,"(").concat(e.length,")"),a=ce):(u=x(e))?(i="Immutable.".concat(u.name).concat("Record"===u.name?"":"(".concat(e.size,")")),c=u.arrayish,a=u.arrayish?ue:u.setish?oe:le):(i=k(e),a=se),t){var s=document.createElement("span");return s.className="observablehq--shallow",n&&s.appendChild(h(n)),s.appendChild(document.createTextNode(i)),s.addEventListener("mouseup",(function(t){ne(s)||(t.stopPropagation(),Ae(s,re(e)))})),s}var f=document.createElement("span");f.className="observablehq--collapsed",n&&f.appendChild(h(n));var d=f.appendChild(document.createElement("a"));d.innerHTML="\n \n ",d.appendChild(document.createTextNode("".concat(i).concat(c?" [":" {"))),f.addEventListener("mouseup",(function(t){ne(f)||(t.stopPropagation(),Ae(f,F(e,0,n,r)))}),!0),a=a(e);for(var p=0;!(o=a.next()).done&&p<20;++p)p>0&&f.appendChild(document.createTextNode(", ")),f.appendChild(o.value);return o.done||f.appendChild(document.createTextNode(", \u2026")),f.appendChild(document.createTextNode(c?"]":"}")),f}function ie(e){var t,n,r,i,a;return u.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:t=Object(s.a)(e),o.prev=1,t.s();case 3:if((n=t.n()).done){o.next=9;break}return r=Object(c.a)(n.value,2),i=r[0],a=r[1],o.next=7,de(i,a);case 7:o.next=3;break;case 9:o.next=14;break;case 11:o.prev=11,o.t0=o.catch(1),t.e(o.t0);case 14:return o.prev=14,t.f(),o.finish(14);case 17:return o.delegateYield(se(e),"t1",18);case 18:case"end":return o.stop()}}),Q,null,[[1,11,14,17]])}function ae(e){var t,n,r;return u.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:t=Object(s.a)(e),i.prev=1,t.s();case 3:if((n=t.n()).done){i.next=9;break}return r=n.value,i.next=7,Ee(r,!0);case 7:i.next=3;break;case 9:i.next=14;break;case 11:i.prev=11,i.t0=i.catch(1),t.e(i.t0);case 14:return i.prev=14,t.f(),i.finish(14);case 17:return i.delegateYield(se(e),"t1",18);case 18:case"end":return i.stop()}}),G,null,[[1,11,14,17]])}function oe(e){var t,n,r;return u.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:t=Object(s.a)(e),i.prev=1,t.s();case 3:if((n=t.n()).done){i.next=9;break}return r=n.value,i.next=7,Ee(r,!0);case 7:i.next=3;break;case 9:i.next=14;break;case 11:i.prev=11,i.t0=i.catch(1),t.e(i.t0);case 14:return i.prev=14,t.f(),i.finish(14);case 17:case"end":return i.stop()}}),J,null,[[1,11,14,17]])}function ue(e){var t,n,r;return u.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:t=-1,n=0,r=e.size;case 2:if(!(nt+1)){i.next=6;break}return i.next=6,fe(n-t-1);case 6:return i.next=8,Ee(e.get(n),!0);case 8:t=n;case 9:++n,i.next=2;break;case 12:if(!(n>t+1)){i.next=15;break}return i.next=15,fe(n-t-1);case 15:case"end":return i.stop()}}),Z)}function ce(e){var t,n,r,i,a,o,c;return u.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:t=-1,n=0,r=e.length;case 2:if(!(nt+1)){l.next=7;break}return l.next=7,fe(n-t-1);case 7:return l.next=9,Ee(_(e,n),!0);case 9:t=n;case 10:++n,l.next=2;break;case 13:if(!(n>t+1)){l.next=16;break}return l.next=16,fe(n-t-1);case 16:l.t0=u.a.keys(e);case 17:if((l.t1=l.t0()).done){l.next=24;break}if(f(i=l.t1.value)||!w(e,i)){l.next=22;break}return l.next=22,he(i,_(e,i),"observablehq--key");case 22:l.next=17;break;case 24:a=Object(s.a)(g(e)),l.prev=25,a.s();case 27:if((o=a.n()).done){l.next=33;break}return c=o.value,l.next=31,he(p(c),_(e,c),"observablehq--symbol");case 31:l.next=27;break;case 33:l.next=38;break;case 35:l.prev=35,l.t2=l.catch(25),a.e(l.t2);case 38:return l.prev=38,a.f(),l.finish(38);case 41:case"end":return l.stop()}}),X,null,[[25,35,38,41]])}function se(e){var t,n,r,i;return u.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:a.t0=u.a.keys(e);case 1:if((a.t1=a.t0()).done){a.next=8;break}if(t=a.t1.value,!w(e,t)){a.next=6;break}return a.next=6,he(t,_(e,t),"observablehq--key");case 6:a.next=1;break;case 8:n=Object(s.a)(g(e)),a.prev=9,n.s();case 11:if((r=n.n()).done){a.next=17;break}return i=r.value,a.next=15,he(p(i),_(e,i),"observablehq--symbol");case 15:a.next=11;break;case 17:a.next=22;break;case 19:a.prev=19,a.t2=a.catch(9),n.e(a.t2);case 22:return a.prev=22,n.f(),a.finish(22);case 25:case"end":return a.stop()}}),ee,null,[[9,19,22,25]])}function le(e){var t,n,r,i,a;return u.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:t=Object(s.a)(e),o.prev=1,t.s();case 3:if((n=t.n()).done){o.next=9;break}return r=Object(c.a)(n.value,2),i=r[0],a=r[1],o.next=7,he(i,a,"observablehq--key");case 7:o.next=3;break;case 9:o.next=14;break;case 11:o.prev=11,o.t0=o.catch(1),t.e(o.t0);case 14:return o.prev=14,t.f(),o.finish(14);case 17:case"end":return o.stop()}}),te,null,[[1,11,14,17]])}function fe(e){var t=document.createElement("span");return t.className="observablehq--empty",t.textContent=1===e?"empty":"empty \xd7 ".concat(e),t}function he(e,t,n){var r=document.createDocumentFragment(),i=r.appendChild(document.createElement("span"));return i.className=n,i.textContent=e,r.appendChild(document.createTextNode(": ")),r.appendChild(Ee(t,!0)),r}function de(e,t){var n=document.createDocumentFragment();return n.appendChild(Ee(e,!0)),n.appendChild(document.createTextNode(" => ")),n.appendChild(Ee(t,!0)),n}function pe(e,t){if(e instanceof Date||(e=new Date(+e)),isNaN(e))return"function"===typeof t?t(e):t;var n,r=e.getUTCHours(),i=e.getUTCMinutes(),a=e.getUTCSeconds(),o=e.getUTCMilliseconds();return"".concat((n=e.getUTCFullYear(),n<0?"-".concat(ve(-n,6)):n>9999?"+".concat(ve(n,6)):ve(n,4)),"-").concat(ve(e.getUTCMonth()+1,2),"-").concat(ve(e.getUTCDate(),2)).concat(r||i||a||o?"T".concat(ve(r,2),":").concat(ve(i,2)).concat(a||o?":".concat(ve(a,2)).concat(o?".".concat(ve(o,3)):""):"","Z"):"")}function ve(e,t){return"".concat(e).padStart(t,"0")}var ye=Error.prototype.toString;var be=RegExp.prototype.toString;function me(e){return e.replace(/[\\`\x00-\x09\x0b-\x19]|\${/g,ge)}function ge(e){var t=e.charCodeAt(0);switch(t){case 8:return"\\b";case 9:return"\\t";case 11:return"\\v";case 12:return"\\f";case 13:return"\\r"}return t<16?"\\x0"+t.toString(16):t<32?"\\x"+t.toString(16):"\\"+e}function we(e,t){for(var n=0;t.exec(e);)++n;return n}var ke=Function.prototype.toString,_e={prefix:"async \u0192"},Oe={prefix:"async \u0192*"},xe={prefix:"class"},je={prefix:"\u0192"},Se={prefix:"\u0192*"};function Te(e,t,n){var r=document.createElement("span");r.className="observablehq--function",n&&r.appendChild(h(n));var i=r.appendChild(document.createElement("span"));return i.className="observablehq--keyword",i.textContent=e.prefix,r.appendChild(document.createTextNode(t)),r}var Ie=Object.prototype.toString;function Ee(e,t,n,r,i){var a=typeof e;switch(a){case"boolean":case"undefined":e+="";break;case"number":e=0===e&&1/e<0?"-0":e+"";break;case"bigint":e+="n";break;case"symbol":e=p(e);break;case"function":return function(e,t){var n,r,i=ke.call(e);switch(e.constructor&&e.constructor.name){case"AsyncFunction":n=_e;break;case"AsyncGeneratorFunction":n=Oe;break;case"GeneratorFunction":n=Se;break;default:n=/^class\b/.test(i)?xe:je}return n===xe?Te(n,"",t):(r=/^(?:async\s*)?(\w+)\s*=>/.exec(i))?Te(n,"("+r[1]+")",t):(r=/^(?:async\s*)?\(\s*(\w+(?:\s*,\s*\w+)*)?\s*\)/.exec(i))||(r=/^(?:async\s*)?function(?:\s*\*)?(?:\s*\w+)?\s*\(\s*(\w+(?:\s*,\s*\w+)*)?\s*\)/.exec(i))?Te(n,r[1]?"("+r[1].replace(/\s*,\s*/g,", ")+")":"()",t):Te(n,"(\u2026)",t)}(e,r);case"string":return function(e,t,n,r){if(!1===t){if(we(e,/["\n]/g)<=we(e,/`|\${/g)){var i=document.createElement("span");r&&i.appendChild(h(r));var a=i.appendChild(document.createElement("span"));return a.className="observablehq--string",a.textContent=JSON.stringify(e),i}var o=e.split("\n");if(o.length>20&&!n){var u=document.createElement("div");r&&u.appendChild(h(r));var c=u.appendChild(document.createElement("span"));c.className="observablehq--string",c.textContent="`"+me(o.slice(0,20).join("\n"));var s=u.appendChild(document.createElement("span")),l=o.length-20;return s.textContent="Show ".concat(l," truncated line").concat(l>1?"s":""),s.className="observablehq--string-expand",s.addEventListener("mouseup",(function(n){n.stopPropagation(),Ae(u,Ee(e,t,!0,r))})),u}var f=document.createElement("span");r&&f.appendChild(h(r));var d=f.appendChild(document.createElement("span"));return d.className="observablehq--string".concat(n?" observablehq--expanded":""),d.textContent="`"+me(e)+"`",f}var p=document.createElement("span");r&&p.appendChild(h(r));var v=p.appendChild(document.createElement("span"));return v.className="observablehq--string",v.textContent=JSON.stringify(e.length>100?"".concat(e.slice(0,50),"\u2026").concat(e.slice(-49)):e),p}(e,t,n,r);default:if(null===e){a=null,e="null";break}if(e instanceof Date){a="date",e=pe(e,"Invalid Date");break}if(e===m){a="forbidden",e="[forbidden]";break}switch(Ie.call(e)){case"[object RegExp]":a="regexp",e=function(e){return be.call(e)}(e);break;case"[object Error]":case"[object DOMException]":a="error",e=function(e){return e.stack||ye.call(e)}(e);break;default:return(n?F:re)(e,t,r,i)}}var o=document.createElement("span");r&&o.appendChild(h(r));var u=o.appendChild(document.createElement("span"));return u.className="observablehq--".concat(a),u.textContent=e,o}function Ae(e,t){e.classList.contains("observablehq--inspect")&&t.classList.add("observablehq--inspect"),e.parentNode.replaceChild(t,e),a(t,"load")}var Be=/\s+\(\d+:\d+\)$/m,Ce=function(){function e(t){if(Object(r.a)(this,e),!t)throw new Error("invalid node");this._node=t,t.classList.add("observablehq")}return Object(i.a)(e,[{key:"pending",value:function(){var e=this._node;e.classList.remove("observablehq--error"),e.classList.add("observablehq--running")}},{key:"fulfilled",value:function(e,t){var n=this._node;if((!function(e){return(e instanceof Element||e instanceof Text)&&e instanceof e.constructor}(e)||e.parentNode&&e.parentNode!==n)&&(e=Ee(e,!1,n.firstChild&&n.firstChild.classList&&n.firstChild.classList.contains("observablehq--expanded"),t)).classList.add("observablehq--inspect"),n.classList.remove("observablehq--running","observablehq--error"),n.firstChild!==e)if(n.firstChild){for(;n.lastChild!==n.firstChild;)n.removeChild(n.lastChild);n.replaceChild(e,n.firstChild)}else n.appendChild(e);a(n,"update")}},{key:"rejected",value:function(e,t){var n=this._node;for(n.classList.remove("observablehq--running"),n.classList.add("observablehq--error");n.lastChild;)n.removeChild(n.lastChild);var r=document.createElement("div");r.className="observablehq--inspect",t&&r.appendChild(h(t)),r.appendChild(document.createTextNode((e+"").replace(Be,""))),n.appendChild(r),a(n,"error",{error:e})}}]),e}();Ce.into=function(e){if("string"===typeof e&&null==(e=document.querySelector(e)))throw new Error("container not found");return function(){return new Ce(e.appendChild(document.createElement("div")))}};n(20),n(15);var De=n(19)},function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r=n(1),i=n.n(r),a=n(7),o=n(8),u=n(5),c=n(6),s=n(29),l=n(26),f=n(15),h=n(27),d=n(19),p=n(14);function v(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];Object.defineProperties(this,{_runtime:{value:e},_scope:{value:new Map},_builtins:{value:new Map([["invalidation",d.b],["visibility",d.c]].concat(Object(c.a)(t)))},_source:{value:null,writable:!0}})}function y(){return(y=Object(u.a)(i.a.mark((function e(t){var n;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this._scope.get(t)){e.next=3;break}throw new f.a(t+" is not defined");case 3:return n._observer===p.e&&(n._observer=!0,this._runtime._dirty.add(n)),e.next=6,this._runtime._compute();case 6:return e.abrupt("return",n._promise);case 7:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}function b(e){return e._name}Object.defineProperties(v.prototype,{_copy:{value:function(e,t){e._source=this,t.set(this,e);var n,r=Object(o.a)(this._scope);try{for(r.s();!(n=r.n()).done;){var i=Object(a.a)(n.value,2),u=i[0],c=i[1],s=e._scope.get(u);if(!s||s._type!==p.c)if(c._definition===h.a){var l=c._inputs[0],f=l._module;e.import(l._name,u,t.get(f)||(f._source?f._copy(new v(e._runtime,e._builtins),t):f))}else e.define(u,c._inputs.map(b),c._definition)}}catch(d){r.e(d)}finally{r.f()}return e},writable:!0,configurable:!0},_resolve:{value:function(e){var t,n=this._scope.get(e);if(!n)if(n=new p.d(p.b,this),this._builtins.has(e))n.define(e,Object(l.a)(this._builtins.get(e)));else if(this._runtime._builtin._scope.has(e))n.import(e,this._runtime._builtin);else{try{t=this._runtime._global(e)}catch(i){return n.define(e,(r=i,function(){throw r}))}void 0===t?this._scope.set(n._name=e,n):n.define(e,Object(l.a)(t))}var r;return n},writable:!0,configurable:!0},redefine:{value:function(e){var t=this._scope.get(e);if(!t)throw new f.a(e+" is not defined");if(t._type===p.a)throw new f.a(e+" is defined more than once");return t.define.apply(t,arguments)},writable:!0,configurable:!0},define:{value:function(){var e=new p.d(p.c,this);return e.define.apply(e,arguments)},writable:!0,configurable:!0},derive:{value:function(e,t){var n=this,r=new v(this._runtime,this._builtins);return r._source=this,s.a.call(e,(function(e){"object"!==typeof e&&(e={name:e+""}),null==e.alias&&(e.alias=e.name),r.import(e.name,e.alias,t)})),Promise.resolve().then((function(){var e,t=new Set([n]),i=Object(o.a)(t);try{for(i.s();!(e=i.n()).done;){var a,u=e.value,c=Object(o.a)(u._scope.values());try{for(c.s();!(a=c.n()).done;){var s=a.value;if(s._definition===h.a){var l=s._inputs[0]._module,f=l._source||l;if(f===n)return void console.warn("circular module definition; ignoring");t.add(f)}}}catch(d){c.e(d)}finally{c.f()}}}catch(d){i.e(d)}finally{i.f()}n._copy(r,new Map)})),r},writable:!0,configurable:!0},import:{value:function(){var e=new p.d(p.c,this);return e.import.apply(e,arguments)},writable:!0,configurable:!0},value:{value:function(e){return y.apply(this,arguments)},writable:!0,configurable:!0},variable:{value:function(e){return new p.d(p.c,this,e)},writable:!0,configurable:!0},builtin:{value:function(e,t){this._builtins.set(e,t)},writable:!0,configurable:!0}})},function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;function o(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(i){return!1}}()?Object.assign:function(e,t){for(var n,u,c=o(e),s=1;s0){for(var e=new Array(arguments.length),t=0;tA.length&&A.push(e)}function D(e,t,n){return null==e?0:function e(t,n,r,i){var u=typeof t;"undefined"!==u&&"boolean"!==u||(t=null);var c=!1;if(null===t)c=!0;else switch(u){case"string":case"number":c=!0;break;case"object":switch(t.$$typeof){case a:case o:c=!0}}if(c)return r(i,t,""===n?"."+L(t,0):n),1;if(c=0,n=""===n?".":n+":",Array.isArray(t))for(var s=0;s