@duckdb/duckdb-wasm 1.13.1-dev7.0 → 1.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/README.md +70 -6
  2. package/dist/duckdb-browser-blocking.cjs +24 -23121
  3. package/dist/duckdb-browser-blocking.cjs.map +3 -3
  4. package/dist/duckdb-browser-blocking.mjs +23 -32
  5. package/dist/duckdb-browser-blocking.mjs.map +3 -3
  6. package/dist/duckdb-browser-coi.pthread.worker.js +26 -2
  7. package/dist/duckdb-browser-coi.pthread.worker.js.map +3 -3
  8. package/dist/duckdb-browser-coi.worker.js +33 -17
  9. package/dist/duckdb-browser-coi.worker.js.map +3 -3
  10. package/dist/duckdb-browser-eh.worker.js +31 -17
  11. package/dist/duckdb-browser-eh.worker.js.map +3 -3
  12. package/dist/duckdb-browser-mvp.worker.js +47 -0
  13. package/dist/duckdb-browser-mvp.worker.js.map +7 -0
  14. package/dist/duckdb-browser.cjs +1 -16005
  15. package/dist/duckdb-browser.cjs.map +3 -3
  16. package/dist/duckdb-browser.mjs +1 -31
  17. package/dist/duckdb-browser.mjs.map +3 -3
  18. package/dist/duckdb-coi.wasm +0 -0
  19. package/dist/duckdb-eh.wasm +0 -0
  20. package/dist/{duckdb.wasm → duckdb-mvp.wasm} +0 -0
  21. package/dist/duckdb-node-blocking.cjs +4 -4
  22. package/dist/duckdb-node-blocking.cjs.map +3 -3
  23. package/dist/duckdb-node-eh.worker.cjs +4 -4
  24. package/dist/duckdb-node-eh.worker.cjs.map +3 -3
  25. package/dist/duckdb-node-mvp.worker.cjs +36 -0
  26. package/dist/duckdb-node-mvp.worker.cjs.map +7 -0
  27. package/dist/duckdb-node.cjs +1 -1
  28. package/dist/duckdb-node.cjs.map +3 -3
  29. package/dist/img/duckdb_version_badge.svg +1 -1
  30. package/dist/tests-browser.js +13784 -15928
  31. package/dist/tests-browser.js.map +3 -3
  32. package/dist/tests-node.cjs +5229 -4847
  33. package/dist/tests-node.cjs.map +3 -3
  34. package/dist/types/src/bindings/bindings_base.d.ts +10 -2
  35. package/dist/types/src/bindings/{bindings_browser.d.ts → bindings_browser_mvp.d.ts} +0 -0
  36. package/dist/types/src/bindings/bindings_interface.d.ts +5 -3
  37. package/dist/types/src/bindings/{bindings_node.d.ts → bindings_node_mvp.d.ts} +0 -0
  38. package/dist/types/src/bindings/config.d.ts +0 -2
  39. package/dist/types/src/bindings/connection.d.ts +2 -0
  40. package/dist/types/src/bindings/index.d.ts +1 -1
  41. package/dist/types/src/bindings/insert_options.d.ts +3 -3
  42. package/dist/types/src/bindings/progress.d.ts +9 -0
  43. package/dist/types/src/bindings/runtime.d.ts +31 -2
  44. package/dist/types/src/bindings/runtime_browser.d.ts +4 -2
  45. package/dist/types/src/bindings/runtime_node.d.ts +1 -1
  46. package/dist/types/src/bindings/udf_function.d.ts +14 -0
  47. package/dist/types/src/bindings/udf_runtime.d.ts +3 -0
  48. package/dist/types/src/bindings/web_file.d.ts +1 -0
  49. package/dist/types/src/json_typedef.d.ts +17 -0
  50. package/dist/types/src/log.d.ts +5 -2
  51. package/dist/types/src/parallel/async_bindings.d.ts +5 -2
  52. package/dist/types/src/parallel/worker_dispatcher.d.ts +2 -1
  53. package/dist/types/src/parallel/worker_request.d.ts +4 -2
  54. package/dist/types/src/platform.d.ts +3 -0
  55. package/dist/types/src/targets/duckdb-browser-blocking.d.ts +2 -1
  56. package/dist/types/src/targets/{duckdb-browser.worker.d.ts → duckdb-browser-mvp.worker.d.ts} +0 -0
  57. package/dist/types/src/targets/duckdb-node-blocking.d.ts +3 -2
  58. package/dist/types/src/targets/{duckdb-node.worker.d.ts → duckdb-node-mvp.worker.d.ts} +0 -0
  59. package/dist/types/src/targets/duckdb.d.ts +2 -0
  60. package/dist/types/src/utils/index.d.ts +1 -0
  61. package/dist/types/src/utils/s3_helper.d.ts +27 -0
  62. package/package.json +28 -29
  63. package/dist/duckdb-browser-coi.d.ts +0 -1
  64. package/dist/duckdb-browser-eh.d.ts +0 -1
  65. package/dist/duckdb-browser.worker.js +0 -33
  66. package/dist/duckdb-browser.worker.js.map +0 -7
  67. package/dist/duckdb-node-coi.d.ts +0 -1
  68. package/dist/duckdb-node-eh.d.ts +0 -1
  69. package/dist/duckdb-node.worker.cjs +0 -36
  70. package/dist/duckdb-node.worker.cjs.map +0 -7
  71. package/dist/types/src/bindings/insert.d.ts +0 -7
  72. package/dist/types/src/flat_arrow.d.ts +0 -14
@@ -1,34 +1,25 @@
1
- var sD=Object.create;var su=Object.defineProperty,oD=Object.defineProperties,aD=Object.getOwnPropertyDescriptor,uD=Object.getOwnPropertyDescriptors,cD=Object.getOwnPropertyNames,rg=Object.getOwnPropertySymbols,lD=Object.getPrototypeOf,ig=Object.prototype.hasOwnProperty,dD=Object.prototype.propertyIsEnumerable;var ng=(r,e,t)=>e in r?su(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,ri=(r,e)=>{for(var t in e||(e={}))ig.call(e,t)&&ng(r,t,e[t]);if(rg)for(var t of rg(e))dD.call(e,t)&&ng(r,t,e[t]);return r},ms=(r,e)=>oD(r,uD(e)),fD=r=>su(r,"__esModule",{value:!0});var sg=(r=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(r,{get:(e,t)=>(typeof require!="undefined"?require:e)[t]}):r)(function(r){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+r+'" is not supported')});var E=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var hD=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of cD(e))!ig.call(r,n)&&(t||n!=="default")&&su(r,n,{get:()=>e[n],enumerable:!(i=aD(e,n))||i.enumerable});return r},ii=(r,e)=>hD(fD(su(r!=null?sD(lD(r)):{},"default",!e&&r&&r.__esModule?{get:()=>r.default,enumerable:!0}:{value:r,enumerable:!0})),r);var kt=E((EU,uu)=>{var og,ag,ug,cg,lg,dg,fg,hg,pg,ou,tf,_g,yg,mg,bs,bg,gg,vg,wg,jg,Bg,Ig,Tg,au;(function(r){var e=typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:{};typeof define=="function"&&define.amd?define("tslib",["exports"],function(i){r(t(e,t(i)))}):typeof uu=="object"&&typeof uu.exports=="object"?r(t(e,t(uu.exports))):r(t(e));function t(i,n){return i!==e&&(typeof Object.create=="function"?Object.defineProperty(i,"__esModule",{value:!0}):i.__esModule=!0),function(s,l){return i[s]=n?n(s,l):l}}})(function(r){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])};og=function(i,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(i,n);function s(){this.constructor=i}i.prototype=n===null?Object.create(n):(s.prototype=n.prototype,new s)},ag=Object.assign||function(i){for(var n,s=1,l=arguments.length;s<l;s++){n=arguments[s];for(var y in n)Object.prototype.hasOwnProperty.call(n,y)&&(i[y]=n[y])}return i},ug=function(i,n){var s={};for(var l in i)Object.prototype.hasOwnProperty.call(i,l)&&n.indexOf(l)<0&&(s[l]=i[l]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var y=0,l=Object.getOwnPropertySymbols(i);y<l.length;y++)n.indexOf(l[y])<0&&Object.prototype.propertyIsEnumerable.call(i,l[y])&&(s[l[y]]=i[l[y]]);return s},cg=function(i,n,s,l){var y=arguments.length,w=y<3?n:l===null?l=Object.getOwnPropertyDescriptor(n,s):l,D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(i,n,s,l);else for(var k=i.length-1;k>=0;k--)(D=i[k])&&(w=(y<3?D(w):y>3?D(n,s,w):D(n,s))||w);return y>3&&w&&Object.defineProperty(n,s,w),w},lg=function(i,n){return function(s,l){n(s,l,i)}},dg=function(i,n){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,n)},fg=function(i,n,s,l){function y(w){return w instanceof s?w:new s(function(D){D(w)})}return new(s||(s=Promise))(function(w,D){function k(ie){try{J(l.next(ie))}catch(Ye){D(Ye)}}function Y(ie){try{J(l.throw(ie))}catch(Ye){D(Ye)}}function J(ie){ie.done?w(ie.value):y(ie.value).then(k,Y)}J((l=l.apply(i,n||[])).next())})},hg=function(i,n){var s={label:0,sent:function(){if(w[0]&1)throw w[1];return w[1]},trys:[],ops:[]},l,y,w,D;return D={next:k(0),throw:k(1),return:k(2)},typeof Symbol=="function"&&(D[Symbol.iterator]=function(){return this}),D;function k(J){return function(ie){return Y([J,ie])}}function Y(J){if(l)throw new TypeError("Generator is already executing.");for(;s;)try{if(l=1,y&&(w=J[0]&2?y.return:J[0]?y.throw||((w=y.return)&&w.call(y),0):y.next)&&!(w=w.call(y,J[1])).done)return w;switch(y=0,w&&(J=[J[0]&2,w.value]),J[0]){case 0:case 1:w=J;break;case 4:return s.label++,{value:J[1],done:!1};case 5:s.label++,y=J[1],J=[0];continue;case 7:J=s.ops.pop(),s.trys.pop();continue;default:if(w=s.trys,!(w=w.length>0&&w[w.length-1])&&(J[0]===6||J[0]===2)){s=0;continue}if(J[0]===3&&(!w||J[1]>w[0]&&J[1]<w[3])){s.label=J[1];break}if(J[0]===6&&s.label<w[1]){s.label=w[1],w=J;break}if(w&&s.label<w[2]){s.label=w[2],s.ops.push(J);break}w[2]&&s.ops.pop(),s.trys.pop();continue}J=n.call(i,s)}catch(ie){J=[6,ie],y=0}finally{l=w=0}if(J[0]&5)throw J[1];return{value:J[0]?J[1]:void 0,done:!0}}},pg=function(i,n){for(var s in i)s!=="default"&&!Object.prototype.hasOwnProperty.call(n,s)&&au(n,i,s)},au=Object.create?function(i,n,s,l){l===void 0&&(l=s),Object.defineProperty(i,l,{enumerable:!0,get:function(){return n[s]}})}:function(i,n,s,l){l===void 0&&(l=s),i[l]=n[s]},ou=function(i){var n=typeof Symbol=="function"&&Symbol.iterator,s=n&&i[n],l=0;if(s)return s.call(i);if(i&&typeof i.length=="number")return{next:function(){return i&&l>=i.length&&(i=void 0),{value:i&&i[l++],done:!i}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},tf=function(i,n){var s=typeof Symbol=="function"&&i[Symbol.iterator];if(!s)return i;var l=s.call(i),y,w=[],D;try{for(;(n===void 0||n-- >0)&&!(y=l.next()).done;)w.push(y.value)}catch(k){D={error:k}}finally{try{y&&!y.done&&(s=l.return)&&s.call(l)}finally{if(D)throw D.error}}return w},_g=function(){for(var i=[],n=0;n<arguments.length;n++)i=i.concat(tf(arguments[n]));return i},yg=function(){for(var i=0,n=0,s=arguments.length;n<s;n++)i+=arguments[n].length;for(var l=Array(i),y=0,n=0;n<s;n++)for(var w=arguments[n],D=0,k=w.length;D<k;D++,y++)l[y]=w[D];return l},mg=function(i,n,s){if(s||arguments.length===2)for(var l=0,y=n.length,w;l<y;l++)(w||!(l in n))&&(w||(w=Array.prototype.slice.call(n,0,l)),w[l]=n[l]);return i.concat(w||Array.prototype.slice.call(n))},bs=function(i){return this instanceof bs?(this.v=i,this):new bs(i)},bg=function(i,n,s){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var l=s.apply(i,n||[]),y,w=[];return y={},D("next"),D("throw"),D("return"),y[Symbol.asyncIterator]=function(){return this},y;function D(Re){l[Re]&&(y[Re]=function(Rt){return new Promise(function(at,fn){w.push([Re,Rt,at,fn])>1||k(Re,Rt)})})}function k(Re,Rt){try{Y(l[Re](Rt))}catch(at){Ye(w[0][3],at)}}function Y(Re){Re.value instanceof bs?Promise.resolve(Re.value.v).then(J,ie):Ye(w[0][2],Re)}function J(Re){k("next",Re)}function ie(Re){k("throw",Re)}function Ye(Re,Rt){Re(Rt),w.shift(),w.length&&k(w[0][0],w[0][1])}},gg=function(i){var n,s;return n={},l("next"),l("throw",function(y){throw y}),l("return"),n[Symbol.iterator]=function(){return this},n;function l(y,w){n[y]=i[y]?function(D){return(s=!s)?{value:bs(i[y](D)),done:y==="return"}:w?w(D):D}:w}},vg=function(i){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=i[Symbol.asyncIterator],s;return n?n.call(i):(i=typeof ou=="function"?ou(i):i[Symbol.iterator](),s={},l("next"),l("throw"),l("return"),s[Symbol.asyncIterator]=function(){return this},s);function l(w){s[w]=i[w]&&function(D){return new Promise(function(k,Y){D=i[w](D),y(k,Y,D.done,D.value)})}}function y(w,D,k,Y){Promise.resolve(Y).then(function(J){w({value:J,done:k})},D)}},wg=function(i,n){return Object.defineProperty?Object.defineProperty(i,"raw",{value:n}):i.raw=n,i};var t=Object.create?function(i,n){Object.defineProperty(i,"default",{enumerable:!0,value:n})}:function(i,n){i.default=n};jg=function(i){if(i&&i.__esModule)return i;var n={};if(i!=null)for(var s in i)s!=="default"&&Object.prototype.hasOwnProperty.call(i,s)&&au(n,i,s);return t(n,i),n},Bg=function(i){return i&&i.__esModule?i:{default:i}},Ig=function(i,n,s,l){if(s==="a"&&!l)throw new TypeError("Private accessor was defined without a getter");if(typeof n=="function"?i!==n||!l:!n.has(i))throw new TypeError("Cannot read private member from an object whose class did not declare it");return s==="m"?l:s==="a"?l.call(i):l?l.value:n.get(i)},Tg=function(i,n,s,l,y){if(l==="m")throw new TypeError("Private method is not writable");if(l==="a"&&!y)throw new TypeError("Private accessor was defined without a setter");if(typeof n=="function"?i!==n||!y:!n.has(i))throw new TypeError("Cannot write private member to an object whose class did not declare it");return l==="a"?y.call(i,s):y?y.value=s:n.set(i,s),s},r("__extends",og),r("__assign",ag),r("__rest",ug),r("__decorate",cg),r("__param",lg),r("__metadata",dg),r("__awaiter",fg),r("__generator",hg),r("__exportStar",pg),r("__createBinding",au),r("__values",ou),r("__read",tf),r("__spread",_g),r("__spreadArrays",yg),r("__spreadArray",mg),r("__await",bs),r("__asyncGenerator",bg),r("__asyncDelegator",gg),r("__asyncValues",vg),r("__makeTemplateObject",wg),r("__importStar",jg),r("__importDefault",Bg),r("__classPrivateFieldGet",Ig),r("__classPrivateFieldSet",Tg)})});var ni=E(Sg=>{var M={};M.Offset;M.Table;M.SIZEOF_SHORT=2;M.SIZEOF_INT=4;M.FILE_IDENTIFIER_LENGTH=4;M.SIZE_PREFIX_LENGTH=4;M.Encoding={UTF8_BYTES:1,UTF16_STRING:2};M.int32=new Int32Array(2);M.float32=new Float32Array(M.int32.buffer);M.float64=new Float64Array(M.int32.buffer);M.isLittleEndian=new Uint16Array(new Uint8Array([1,0]).buffer)[0]===1;M.Long=function(r,e){this.low=r|0,this.high=e|0};M.Long.create=function(r,e){return r==0&&e==0?M.Long.ZERO:new M.Long(r,e)};M.Long.prototype.toFloat64=function(){return(this.low>>>0)+this.high*4294967296};M.Long.prototype.equals=function(r){return this.low==r.low&&this.high==r.high};M.Long.ZERO=new M.Long(0,0);M.Builder=function(r){if(r)var e=r;else var e=1024;this.bb=M.ByteBuffer.allocate(e),this.space=e,this.minalign=1,this.vtable=null,this.vtable_in_use=0,this.isNested=!1,this.object_start=0,this.vtables=[],this.vector_num_elems=0,this.force_defaults=!1};M.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};M.Builder.prototype.forceDefaults=function(r){this.force_defaults=r};M.Builder.prototype.dataBuffer=function(){return this.bb};M.Builder.prototype.asUint8Array=function(){return this.bb.bytes().subarray(this.bb.position(),this.bb.position()+this.offset())};M.Builder.prototype.prep=function(r,e){r>this.minalign&&(this.minalign=r);for(var t=~(this.bb.capacity()-this.space+e)+1&r-1;this.space<t+r+e;){var i=this.bb.capacity();this.bb=M.Builder.growByteBuffer(this.bb),this.space+=this.bb.capacity()-i}this.pad(t)};M.Builder.prototype.pad=function(r){for(var e=0;e<r;e++)this.bb.writeInt8(--this.space,0)};M.Builder.prototype.writeInt8=function(r){this.bb.writeInt8(this.space-=1,r)};M.Builder.prototype.writeInt16=function(r){this.bb.writeInt16(this.space-=2,r)};M.Builder.prototype.writeInt32=function(r){this.bb.writeInt32(this.space-=4,r)};M.Builder.prototype.writeInt64=function(r){this.bb.writeInt64(this.space-=8,r)};M.Builder.prototype.writeFloat32=function(r){this.bb.writeFloat32(this.space-=4,r)};M.Builder.prototype.writeFloat64=function(r){this.bb.writeFloat64(this.space-=8,r)};M.Builder.prototype.addInt8=function(r){this.prep(1,0),this.writeInt8(r)};M.Builder.prototype.addInt16=function(r){this.prep(2,0),this.writeInt16(r)};M.Builder.prototype.addInt32=function(r){this.prep(4,0),this.writeInt32(r)};M.Builder.prototype.addInt64=function(r){this.prep(8,0),this.writeInt64(r)};M.Builder.prototype.addFloat32=function(r){this.prep(4,0),this.writeFloat32(r)};M.Builder.prototype.addFloat64=function(r){this.prep(8,0),this.writeFloat64(r)};M.Builder.prototype.addFieldInt8=function(r,e,t){(this.force_defaults||e!=t)&&(this.addInt8(e),this.slot(r))};M.Builder.prototype.addFieldInt16=function(r,e,t){(this.force_defaults||e!=t)&&(this.addInt16(e),this.slot(r))};M.Builder.prototype.addFieldInt32=function(r,e,t){(this.force_defaults||e!=t)&&(this.addInt32(e),this.slot(r))};M.Builder.prototype.addFieldInt64=function(r,e,t){(this.force_defaults||!e.equals(t))&&(this.addInt64(e),this.slot(r))};M.Builder.prototype.addFieldFloat32=function(r,e,t){(this.force_defaults||e!=t)&&(this.addFloat32(e),this.slot(r))};M.Builder.prototype.addFieldFloat64=function(r,e,t){(this.force_defaults||e!=t)&&(this.addFloat64(e),this.slot(r))};M.Builder.prototype.addFieldOffset=function(r,e,t){(this.force_defaults||e!=t)&&(this.addOffset(e),this.slot(r))};M.Builder.prototype.addFieldStruct=function(r,e,t){e!=t&&(this.nested(e),this.slot(r))};M.Builder.prototype.nested=function(r){if(r!=this.offset())throw new Error("FlatBuffers: struct must be serialized inline.")};M.Builder.prototype.notNested=function(){if(this.isNested)throw new Error("FlatBuffers: object serialization must not be nested.")};M.Builder.prototype.slot=function(r){this.vtable[r]=this.offset()};M.Builder.prototype.offset=function(){return this.bb.capacity()-this.space};M.Builder.growByteBuffer=function(r){var e=r.capacity();if(e&3221225472)throw new Error("FlatBuffers: cannot grow buffer beyond 2 gigabytes.");var t=e<<1,i=M.ByteBuffer.allocate(t);return i.setPosition(t-e),i.bytes().set(r.bytes(),t-e),i};M.Builder.prototype.addOffset=function(r){this.prep(M.SIZEOF_INT,0),this.writeInt32(this.offset()-r+M.SIZEOF_INT)};M.Builder.prototype.startObject=function(r){this.notNested(),this.vtable==null&&(this.vtable=[]),this.vtable_in_use=r;for(var e=0;e<r;e++)this.vtable[e]=0;this.isNested=!0,this.object_start=this.offset()};M.Builder.prototype.endObject=function(){if(this.vtable==null||!this.isNested)throw new Error("FlatBuffers: endObject called without startObject");this.addInt32(0);for(var r=this.offset(),e=this.vtable_in_use-1;e>=0&&this.vtable[e]==0;e--);for(var t=e+1;e>=0;e--)this.addInt16(this.vtable[e]!=0?r-this.vtable[e]:0);var i=2;this.addInt16(r-this.object_start);var n=(t+i)*M.SIZEOF_SHORT;this.addInt16(n);var s=0,l=this.space;e:for(e=0;e<this.vtables.length;e++){var y=this.bb.capacity()-this.vtables[e];if(n==this.bb.readInt16(y)){for(var w=M.SIZEOF_SHORT;w<n;w+=M.SIZEOF_SHORT)if(this.bb.readInt16(l+w)!=this.bb.readInt16(y+w))continue e;s=this.vtables[e];break}}return s?(this.space=this.bb.capacity()-r,this.bb.writeInt32(this.space,s-r)):(this.vtables.push(this.offset()),this.bb.writeInt32(this.bb.capacity()-r,this.offset()-r)),this.isNested=!1,r};M.Builder.prototype.finish=function(r,e,t){var i=t?M.SIZE_PREFIX_LENGTH:0;if(e){var n=e;if(this.prep(this.minalign,M.SIZEOF_INT+M.FILE_IDENTIFIER_LENGTH+i),n.length!=M.FILE_IDENTIFIER_LENGTH)throw new Error("FlatBuffers: file identifier must be length "+M.FILE_IDENTIFIER_LENGTH);for(var s=M.FILE_IDENTIFIER_LENGTH-1;s>=0;s--)this.writeInt8(n.charCodeAt(s))}this.prep(this.minalign,M.SIZEOF_INT+i),this.addOffset(r),i&&this.addInt32(this.bb.capacity()-this.space),this.bb.setPosition(this.space)};M.Builder.prototype.finishSizePrefixed=function(r,e){this.finish(r,e,!0)};M.Builder.prototype.requiredField=function(r,e){var t=this.bb.capacity()-r,i=t-this.bb.readInt32(t),n=this.bb.readInt16(i+e)!=0;if(!n)throw new Error("FlatBuffers: field "+e+" must be set")};M.Builder.prototype.startVector=function(r,e,t){this.notNested(),this.vector_num_elems=e,this.prep(M.SIZEOF_INT,r*e),this.prep(t,r*e)};M.Builder.prototype.endVector=function(){return this.writeInt32(this.vector_num_elems),this.offset()};M.Builder.prototype.createString=function(r){if(r instanceof Uint8Array)var e=r;else for(var e=[],t=0;t<r.length;){var i,n=r.charCodeAt(t++);if(n<55296||n>=56320)i=n;else{var s=r.charCodeAt(t++);i=(n<<10)+s+(65536-(55296<<10)-56320)}i<128?e.push(i):(i<2048?e.push(i>>6&31|192):(i<65536?e.push(i>>12&15|224):e.push(i>>18&7|240,i>>12&63|128),e.push(i>>6&63|128)),e.push(i&63|128))}this.addInt8(0),this.startVector(1,e.length,1),this.bb.setPosition(this.space-=e.length);for(var t=0,l=this.space,y=this.bb.bytes();t<e.length;t++)y[l++]=e[t];return this.endVector()};M.Builder.prototype.createLong=function(r,e){return M.Long.create(r,e)};M.ByteBuffer=function(r){this.bytes_=r,this.position_=0};M.ByteBuffer.allocate=function(r){return new M.ByteBuffer(new Uint8Array(r))};M.ByteBuffer.prototype.clear=function(){this.position_=0};M.ByteBuffer.prototype.bytes=function(){return this.bytes_};M.ByteBuffer.prototype.position=function(){return this.position_};M.ByteBuffer.prototype.setPosition=function(r){this.position_=r};M.ByteBuffer.prototype.capacity=function(){return this.bytes_.length};M.ByteBuffer.prototype.readInt8=function(r){return this.readUint8(r)<<24>>24};M.ByteBuffer.prototype.readUint8=function(r){return this.bytes_[r]};M.ByteBuffer.prototype.readInt16=function(r){return this.readUint16(r)<<16>>16};M.ByteBuffer.prototype.readUint16=function(r){return this.bytes_[r]|this.bytes_[r+1]<<8};M.ByteBuffer.prototype.readInt32=function(r){return this.bytes_[r]|this.bytes_[r+1]<<8|this.bytes_[r+2]<<16|this.bytes_[r+3]<<24};M.ByteBuffer.prototype.readUint32=function(r){return this.readInt32(r)>>>0};M.ByteBuffer.prototype.readInt64=function(r){return new M.Long(this.readInt32(r),this.readInt32(r+4))};M.ByteBuffer.prototype.readUint64=function(r){return new M.Long(this.readUint32(r),this.readUint32(r+4))};M.ByteBuffer.prototype.readFloat32=function(r){return M.int32[0]=this.readInt32(r),M.float32[0]};M.ByteBuffer.prototype.readFloat64=function(r){return M.int32[M.isLittleEndian?0:1]=this.readInt32(r),M.int32[M.isLittleEndian?1:0]=this.readInt32(r+4),M.float64[0]};M.ByteBuffer.prototype.writeInt8=function(r,e){this.bytes_[r]=e};M.ByteBuffer.prototype.writeUint8=function(r,e){this.bytes_[r]=e};M.ByteBuffer.prototype.writeInt16=function(r,e){this.bytes_[r]=e,this.bytes_[r+1]=e>>8};M.ByteBuffer.prototype.writeUint16=function(r,e){this.bytes_[r]=e,this.bytes_[r+1]=e>>8};M.ByteBuffer.prototype.writeInt32=function(r,e){this.bytes_[r]=e,this.bytes_[r+1]=e>>8,this.bytes_[r+2]=e>>16,this.bytes_[r+3]=e>>24};M.ByteBuffer.prototype.writeUint32=function(r,e){this.bytes_[r]=e,this.bytes_[r+1]=e>>8,this.bytes_[r+2]=e>>16,this.bytes_[r+3]=e>>24};M.ByteBuffer.prototype.writeInt64=function(r,e){this.writeInt32(r,e.low),this.writeInt32(r+4,e.high)};M.ByteBuffer.prototype.writeUint64=function(r,e){this.writeUint32(r,e.low),this.writeUint32(r+4,e.high)};M.ByteBuffer.prototype.writeFloat32=function(r,e){M.float32[0]=e,this.writeInt32(r,M.int32[0])};M.ByteBuffer.prototype.writeFloat64=function(r,e){M.float64[0]=e,this.writeInt32(r,M.int32[M.isLittleEndian?0:1]),this.writeInt32(r+4,M.int32[M.isLittleEndian?1:0])};M.ByteBuffer.prototype.getBufferIdentifier=function(){if(this.bytes_.length<this.position_+M.SIZEOF_INT+M.FILE_IDENTIFIER_LENGTH)throw new Error("FlatBuffers: ByteBuffer is too short to contain an identifier.");for(var r="",e=0;e<M.FILE_IDENTIFIER_LENGTH;e++)r+=String.fromCharCode(this.readInt8(this.position_+M.SIZEOF_INT+e));return r};M.ByteBuffer.prototype.__offset=function(r,e){var t=r-this.readInt32(r);return e<this.readInt16(t)?this.readInt16(t+e):0};M.ByteBuffer.prototype.__union=function(r,e){return r.bb_pos=e+this.readInt32(e),r.bb=this,r};M.ByteBuffer.prototype.__string=function(r,e){r+=this.readInt32(r);var t=this.readInt32(r),i="",n=0;if(r+=M.SIZEOF_INT,e===M.Encoding.UTF8_BYTES)return this.bytes_.subarray(r,r+t);for(;n<t;){var s,l=this.readUint8(r+n++);if(l<192)s=l;else{var y=this.readUint8(r+n++);if(l<224)s=(l&31)<<6|y&63;else{var w=this.readUint8(r+n++);if(l<240)s=(l&15)<<12|(y&63)<<6|w&63;else{var D=this.readUint8(r+n++);s=(l&7)<<18|(y&63)<<12|(w&63)<<6|D&63}}}s<65536?i+=String.fromCharCode(s):(s-=65536,i+=String.fromCharCode((s>>10)+55296,(s&(1<<10)-1)+56320))}return i};M.ByteBuffer.prototype.__indirect=function(r){return r+this.readInt32(r)};M.ByteBuffer.prototype.__vector=function(r){return r+this.readInt32(r)+M.SIZEOF_INT};M.ByteBuffer.prototype.__vector_len=function(r){return this.readInt32(r+this.readInt32(r))};M.ByteBuffer.prototype.__has_identifier=function(r){if(r.length!=M.FILE_IDENTIFIER_LENGTH)throw new Error("FlatBuffers: file identifier must be length "+M.FILE_IDENTIFIER_LENGTH);for(var e=0;e<M.FILE_IDENTIFIER_LENGTH;e++)if(r.charCodeAt(e)!=this.readInt8(this.position_+M.SIZEOF_INT+e))return!1;return!0};M.ByteBuffer.prototype.createLong=function(r,e){return M.Long.create(r,e)};Sg.flatbuffers=M});var wn=E(gs=>{"use strict";Object.defineProperty(gs,"__esModule",{value:!0});gs.encodeUtf8=gs.decodeUtf8=void 0;var pD=new TextDecoder("utf-8");gs.decodeUtf8=r=>pD.decode(r);var _D=new TextEncoder;gs.encodeUtf8=r=>_D.encode(r)});var vs=E(Lt=>{"use strict";Object.defineProperty(Lt,"__esModule",{value:!0});Lt.AsyncQueue=Lt.ReadableInterop=Lt.ArrowJSON=Lt.ITERATOR_DONE=void 0;var Go=kt(),Dg=Ko();Lt.ITERATOR_DONE=Object.freeze({done:!0,value:void 0});var Ag=class{constructor(e){this._json=e}get schema(){return this._json.schema}get batches(){return this._json.batches||[]}get dictionaries(){return this._json.dictionaries||[]}};Lt.ArrowJSON=Ag;var rf=class{tee(){return this._getDOMStream().tee()}pipe(e,t){return this._getNodeStream().pipe(e,t)}pipeTo(e,t){return this._getDOMStream().pipeTo(e,t)}pipeThrough(e,t){return this._getDOMStream().pipeThrough(e,t)}_getDOMStream(){return this._DOMStream||(this._DOMStream=this.toDOMStream())}_getNodeStream(){return this._nodeStream||(this._nodeStream=this.toNodeStream())}};Lt.ReadableInterop=rf;var Og=class extends rf{constructor(){super();this._values=[],this.resolvers=[],this._closedPromise=new Promise(e=>this._closedPromiseResolve=e)}get closed(){return this._closedPromise}cancel(e){return Go.__awaiter(this,void 0,void 0,function*(){yield this.return(e)})}write(e){this._ensureOpen()&&(this.resolvers.length<=0?this._values.push(e):this.resolvers.shift().resolve({done:!1,value:e}))}abort(e){this._closedPromiseResolve&&(this.resolvers.length<=0?this._error={error:e}:this.resolvers.shift().reject({done:!0,value:e}))}close(){if(this._closedPromiseResolve){let{resolvers:e}=this;for(;e.length>0;)e.shift().resolve(Lt.ITERATOR_DONE);this._closedPromiseResolve(),this._closedPromiseResolve=void 0}}[Symbol.asyncIterator](){return this}toDOMStream(e){return Dg.default.toDOMStream(this._closedPromiseResolve||this._error?this:this._values,e)}toNodeStream(e){return Dg.default.toNodeStream(this._closedPromiseResolve||this._error?this:this._values,e)}throw(e){return Go.__awaiter(this,void 0,void 0,function*(){return yield this.abort(e),Lt.ITERATOR_DONE})}return(e){return Go.__awaiter(this,void 0,void 0,function*(){return yield this.close(),Lt.ITERATOR_DONE})}read(e){return Go.__awaiter(this,void 0,void 0,function*(){return(yield this.next(e,"read")).value})}peek(e){return Go.__awaiter(this,void 0,void 0,function*(){return(yield this.next(e,"peek")).value})}next(...e){return this._values.length>0?Promise.resolve({done:!1,value:this._values.shift()}):this._error?Promise.reject({done:!0,value:this._error.error}):this._closedPromiseResolve?new Promise((t,i)=>{this.resolvers.push({resolve:t,reject:i})}):Promise.resolve(Lt.ITERATOR_DONE)}_ensureOpen(){if(this._closedPromiseResolve)return!0;throw new Error("AsyncQueue is closed")}};Lt.AsyncQueue=Og});var Mt=E(ee=>{"use strict";Object.defineProperty(ee,"__esModule",{value:!0});ee.isReadableNodeStream=ee.isWritableNodeStream=ee.isReadableDOMStream=ee.isWritableDOMStream=ee.isFetchResponse=ee.isFSReadStream=ee.isFileHandle=ee.isUnderlyingSink=ee.isIteratorResult=ee.isArrayLike=ee.isArrowJSON=ee.isAsyncIterable=ee.isIterable=ee.isObservable=ee.isPromise=ee.isObject=ee.BigUint64ArrayAvailable=ee.BigUint64Array=ee.BigInt64ArrayAvailable=ee.BigInt64Array=ee.BigIntAvailable=ee.BigInt=void 0;var cu=vs(),[yD,mD]=(()=>{let r=()=>{throw new Error("BigInt is not available in this environment")};function e(){throw r()}return e.asIntN=()=>{throw r()},e.asUintN=()=>{throw r()},typeof BigInt!="undefined"?[BigInt,!0]:[e,!1]})();ee.BigInt=yD;ee.BigIntAvailable=mD;var[bD,gD]=(()=>{let r=()=>{throw new Error("BigInt64Array is not available in this environment")};class e{static get BYTES_PER_ELEMENT(){return 8}static of(){throw r()}static from(){throw r()}constructor(){throw r()}}return typeof BigInt64Array!="undefined"?[BigInt64Array,!0]:[e,!1]})();ee.BigInt64Array=bD;ee.BigInt64ArrayAvailable=gD;var[vD,wD]=(()=>{let r=()=>{throw new Error("BigUint64Array is not available in this environment")};class e{static get BYTES_PER_ELEMENT(){return 8}static of(){throw r()}static from(){throw r()}constructor(){throw r()}}return typeof BigUint64Array!="undefined"?[BigUint64Array,!0]:[e,!1]})();ee.BigUint64Array=vD;ee.BigUint64ArrayAvailable=wD;var nf=r=>typeof r=="number",Fg=r=>typeof r=="boolean",St=r=>typeof r=="function";ee.isObject=r=>r!=null&&Object(r)===r;ee.isPromise=r=>ee.isObject(r)&&St(r.then);ee.isObservable=r=>ee.isObject(r)&&St(r.subscribe);ee.isIterable=r=>ee.isObject(r)&&St(r[Symbol.iterator]);ee.isAsyncIterable=r=>ee.isObject(r)&&St(r[Symbol.asyncIterator]);ee.isArrowJSON=r=>ee.isObject(r)&&ee.isObject(r.schema);ee.isArrayLike=r=>ee.isObject(r)&&nf(r.length);ee.isIteratorResult=r=>ee.isObject(r)&&"done"in r&&"value"in r;ee.isUnderlyingSink=r=>ee.isObject(r)&&St(r.abort)&&St(r.close)&&St(r.start)&&St(r.write);ee.isFileHandle=r=>ee.isObject(r)&&St(r.stat)&&nf(r.fd);ee.isFSReadStream=r=>ee.isReadableNodeStream(r)&&nf(r.bytesRead);ee.isFetchResponse=r=>ee.isObject(r)&&ee.isReadableDOMStream(r.body);ee.isWritableDOMStream=r=>ee.isObject(r)&&St(r.abort)&&St(r.getWriter)&&!(r instanceof cu.ReadableInterop);ee.isReadableDOMStream=r=>ee.isObject(r)&&St(r.cancel)&&St(r.getReader)&&!(r instanceof cu.ReadableInterop);ee.isWritableNodeStream=r=>ee.isObject(r)&&St(r.end)&&St(r.write)&&Fg(r.writable)&&!(r instanceof cu.ReadableInterop);ee.isReadableNodeStream=r=>ee.isObject(r)&&St(r.read)&&St(r.pipe)&&Fg(r.readable)&&!(r instanceof cu.ReadableInterop)});var mt=E(G=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0});G.compareArrayLike=G.rebaseValueOffsets=G.toUint8ClampedArrayAsyncIterator=G.toFloat64ArrayAsyncIterator=G.toFloat32ArrayAsyncIterator=G.toUint32ArrayAsyncIterator=G.toUint16ArrayAsyncIterator=G.toUint8ArrayAsyncIterator=G.toInt32ArrayAsyncIterator=G.toInt16ArrayAsyncIterator=G.toInt8ArrayAsyncIterator=G.toArrayBufferViewAsyncIterator=G.toUint8ClampedArrayIterator=G.toFloat64ArrayIterator=G.toFloat32ArrayIterator=G.toUint32ArrayIterator=G.toUint16ArrayIterator=G.toUint8ArrayIterator=G.toInt32ArrayIterator=G.toInt16ArrayIterator=G.toInt8ArrayIterator=G.toArrayBufferViewIterator=G.toUint8ClampedArray=G.toFloat64Array=G.toFloat32Array=G.toBigUint64Array=G.toUint32Array=G.toUint16Array=G.toUint8Array=G.toBigInt64Array=G.toInt32Array=G.toInt16Array=G.toInt8Array=G.toArrayBufferView=G.joinUint8Arrays=G.memcpy=void 0;var ct=kt(),jD=ni(),BD=wn(),ID=jD.flatbuffers.ByteBuffer,jn=Mt(),sf=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:ArrayBuffer;function TD(r){let e=r[0]?[r[0]]:[],t,i,n,s;for(let l,y,w=0,D=0,k=r.length;++w<k;){if(l=e[D],y=r[w],!l||!y||l.buffer!==y.buffer||y.byteOffset<l.byteOffset){y&&(e[++D]=y);continue}if({byteOffset:t,byteLength:n}=l,{byteOffset:i,byteLength:s}=y,t+n<i||i+s<t){y&&(e[++D]=y);continue}e[D]=new Uint8Array(l.buffer,t,i-t+s)}return e}function of(r,e,t=0,i=e.byteLength){let n=r.byteLength,s=new Uint8Array(r.buffer,r.byteOffset,n),l=new Uint8Array(e.buffer,e.byteOffset,Math.min(i,n));return s.set(l,t),r}G.memcpy=of;function SD(r,e){let t=TD(r),i=t.reduce((k,Y)=>k+Y.byteLength,0),n,s,l,y=0,w=-1,D=Math.min(e||1/0,i);for(let k=t.length;++w<k;){if(n=t[w],s=n.subarray(0,Math.min(n.length,D-y)),D<=y+s.length){s.length<n.length?t[w]=n.subarray(s.length):s.length===n.length&&w++,l?of(l,s,y):l=s;break}of(l||(l=new Uint8Array(D)),s,y),y+=s.length}return[l||new Uint8Array(0),t.slice(w),i-(l?l.byteLength:0)]}G.joinUint8Arrays=SD;function Vt(r,e){let t=jn.isIteratorResult(e)?e.value:e;return t instanceof r?r===Uint8Array?new r(t.buffer,t.byteOffset,t.byteLength):t:t?(typeof t=="string"&&(t=BD.encodeUtf8(t)),t instanceof ArrayBuffer?new r(t):t instanceof sf?new r(t):t instanceof ID?Vt(r,t.bytes()):ArrayBuffer.isView(t)?t.byteLength<=0?new r(0):new r(t.buffer,t.byteOffset,t.byteLength/r.BYTES_PER_ELEMENT):r.from(t)):new r(0)}G.toArrayBufferView=Vt;G.toInt8Array=r=>Vt(Int8Array,r);G.toInt16Array=r=>Vt(Int16Array,r);G.toInt32Array=r=>Vt(Int32Array,r);G.toBigInt64Array=r=>Vt(jn.BigInt64Array,r);G.toUint8Array=r=>Vt(Uint8Array,r);G.toUint16Array=r=>Vt(Uint16Array,r);G.toUint32Array=r=>Vt(Uint32Array,r);G.toBigUint64Array=r=>Vt(jn.BigUint64Array,r);G.toFloat32Array=r=>Vt(Float32Array,r);G.toFloat64Array=r=>Vt(Float64Array,r);G.toUint8ClampedArray=r=>Vt(Uint8ClampedArray,r);var af=r=>(r.next(),r);function*kr(r,e){let t=function*(n){yield n},i=typeof e=="string"||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof sf?t(e):jn.isIterable(e)?e:t(e);return yield*af(function*(n){let s=null;do s=n.next(yield Vt(r,s));while(!s.done)}(i[Symbol.iterator]())),new r}G.toArrayBufferViewIterator=kr;G.toInt8ArrayIterator=r=>kr(Int8Array,r);G.toInt16ArrayIterator=r=>kr(Int16Array,r);G.toInt32ArrayIterator=r=>kr(Int32Array,r);G.toUint8ArrayIterator=r=>kr(Uint8Array,r);G.toUint16ArrayIterator=r=>kr(Uint16Array,r);G.toUint32ArrayIterator=r=>kr(Uint32Array,r);G.toFloat32ArrayIterator=r=>kr(Float32Array,r);G.toFloat64ArrayIterator=r=>kr(Float64Array,r);G.toUint8ClampedArrayIterator=r=>kr(Uint8ClampedArray,r);function gr(r,e){return ct.__asyncGenerator(this,arguments,function*(){if(jn.isPromise(e))return yield ct.__await(yield ct.__await(yield*ct.__asyncDelegator(ct.__asyncValues(gr(r,yield ct.__await(e))))));let i=function(l){return ct.__asyncGenerator(this,arguments,function*(){yield yield ct.__await(yield ct.__await(l))})},n=function(l){return ct.__asyncGenerator(this,arguments,function*(){yield ct.__await(yield*ct.__asyncDelegator(ct.__asyncValues(af(function*(y){let w=null;do w=y.next(yield w==null?void 0:w.value);while(!w.done)}(l[Symbol.iterator]())))))})},s=typeof e=="string"||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof sf?i(e):jn.isIterable(e)?n(e):jn.isAsyncIterable(e)?e:i(e);return yield ct.__await(yield*ct.__asyncDelegator(ct.__asyncValues(af(function(l){return ct.__asyncGenerator(this,arguments,function*(){let y=null;do y=yield ct.__await(l.next(yield yield ct.__await(Vt(r,y))));while(!y.done)})}(s[Symbol.asyncIterator]()))))),yield ct.__await(new r)})}G.toArrayBufferViewAsyncIterator=gr;G.toInt8ArrayAsyncIterator=r=>gr(Int8Array,r);G.toInt16ArrayAsyncIterator=r=>gr(Int16Array,r);G.toInt32ArrayAsyncIterator=r=>gr(Int32Array,r);G.toUint8ArrayAsyncIterator=r=>gr(Uint8Array,r);G.toUint16ArrayAsyncIterator=r=>gr(Uint16Array,r);G.toUint32ArrayAsyncIterator=r=>gr(Uint32Array,r);G.toFloat32ArrayAsyncIterator=r=>gr(Float32Array,r);G.toFloat64ArrayAsyncIterator=r=>gr(Float64Array,r);G.toUint8ClampedArrayAsyncIterator=r=>gr(Uint8ClampedArray,r);function DD(r,e,t){if(r!==0){t=t.slice(0,e+1);for(let i=-1;++i<=e;)t[i]+=r}return t}G.rebaseValueOffsets=DD;function AD(r,e){let t=0,i=r.length;if(i!==e.length)return!1;if(i>0)do if(r[t]!==e[t])return!1;while(++t<i);return!0}G.compareArrayLike=AD});var Ko=E(cf=>{"use strict";Object.defineProperty(cf,"__esModule",{value:!0});var Ne=kt(),Et=mt();cf.default={fromIterable(r){return lu(OD(r))},fromAsyncIterable(r){return lu(FD(r))},fromDOMStream(r){return lu(kD(r))},fromNodeStream(r){return lu(MD(r))},toDOMStream(r,e){throw new Error('"toDOMStream" not available in this environment')},toNodeStream(r,e){throw new Error('"toNodeStream" not available in this environment')}};var lu=r=>(r.next(),r);function*OD(r){let e,t=!1,i=[],n,s,l,y=0;function w(){return s==="peek"?Et.joinUint8Arrays(i,l)[0]:([n,i,y]=Et.joinUint8Arrays(i,l),n)}({cmd:s,size:l}=yield null);let D=Et.toUint8ArrayIterator(r)[Symbol.iterator]();try{do if({done:e,value:n}=isNaN(l-y)?D.next(void 0):D.next(l-y),!e&&n.byteLength>0&&(i.push(n),y+=n.byteLength),e||l<=y)do({cmd:s,size:l}=yield w());while(l<y);while(!e)}catch(k){(t=!0)&&typeof D.throw=="function"&&D.throw(k)}finally{t===!1&&typeof D.return=="function"&&D.return(null)}return null}function FD(r){return Ne.__asyncGenerator(this,arguments,function*(){let t,i=!1,n=[],s,l,y,w=0;function D(){return l==="peek"?Et.joinUint8Arrays(n,y)[0]:([s,n,w]=Et.joinUint8Arrays(n,y),s)}({cmd:l,size:y}=yield yield Ne.__await(null));let k=Et.toUint8ArrayAsyncIterator(r)[Symbol.asyncIterator]();try{do if({done:t,value:s}=isNaN(y-w)?yield Ne.__await(k.next(void 0)):yield Ne.__await(k.next(y-w)),!t&&s.byteLength>0&&(n.push(s),w+=s.byteLength),t||y<=w)do({cmd:l,size:y}=yield yield Ne.__await(D()));while(y<w);while(!t)}catch(Y){(i=!0)&&typeof k.throw=="function"&&(yield Ne.__await(k.throw(Y)))}finally{i===!1&&typeof k.return=="function"&&(yield Ne.__await(k.return(new Uint8Array(0))))}return yield Ne.__await(null)})}function kD(r){return Ne.__asyncGenerator(this,arguments,function*(){let t=!1,i=!1,n=[],s,l,y,w=0;function D(){return l==="peek"?Et.joinUint8Arrays(n,y)[0]:([s,n,w]=Et.joinUint8Arrays(n,y),s)}({cmd:l,size:y}=yield yield Ne.__await(null));let k=new kg(r);try{do if({done:t,value:s}=isNaN(y-w)?yield Ne.__await(k.read(void 0)):yield Ne.__await(k.read(y-w)),!t&&s.byteLength>0&&(n.push(Et.toUint8Array(s)),w+=s.byteLength),t||y<=w)do({cmd:l,size:y}=yield yield Ne.__await(D()));while(y<w);while(!t)}catch(Y){(i=!0)&&(yield Ne.__await(k.cancel(Y)))}finally{i===!1?yield Ne.__await(k.cancel()):r.locked&&k.releaseLock()}return yield Ne.__await(null)})}var kg=class{constructor(e){this.source=e,this.byobReader=null,this.defaultReader=null;try{this.supportsBYOB=!!(this.reader=this.getBYOBReader())}catch(t){this.supportsBYOB=!(this.reader=this.getDefaultReader())}}get closed(){return this.reader?this.reader.closed.catch(()=>{}):Promise.resolve()}releaseLock(){this.reader&&this.reader.releaseLock(),this.reader=this.byobReader=this.defaultReader=null}cancel(e){return Ne.__awaiter(this,void 0,void 0,function*(){let{reader:t,source:i}=this;t&&(yield t.cancel(e).catch(()=>{})),i&&i.locked&&this.releaseLock()})}read(e){return Ne.__awaiter(this,void 0,void 0,function*(){if(e===0)return{done:this.reader==null,value:new Uint8Array(0)};let t=!this.supportsBYOB||typeof e!="number"?yield this.getDefaultReader().read():yield this.readFromBYOBReader(e);return!t.done&&(t.value=Et.toUint8Array(t)),t})}getDefaultReader(){return this.byobReader&&this.releaseLock(),this.defaultReader||(this.defaultReader=this.source.getReader(),this.defaultReader.closed.catch(()=>{})),this.reader=this.defaultReader}getBYOBReader(){return this.defaultReader&&this.releaseLock(),this.byobReader||(this.byobReader=this.source.getReader({mode:"byob"}),this.byobReader.closed.catch(()=>{})),this.reader=this.byobReader}readFromBYOBReader(e){return Ne.__awaiter(this,void 0,void 0,function*(){return yield Mg(this.getBYOBReader(),new ArrayBuffer(e),0,e)})}};function Mg(r,e,t,i){return Ne.__awaiter(this,void 0,void 0,function*(){if(t>=i)return{done:!1,value:new Uint8Array(e,0,i)};let{done:n,value:s}=yield r.read(new Uint8Array(e,t,i-t));return(t+=s.byteLength)<i&&!n?yield Mg(r,s.buffer,t,i):{done:n,value:new Uint8Array(s.buffer,0,t)}})}var uf=(r,e)=>{let t=n=>i([e,n]),i;return[e,t,new Promise(n=>(i=n)&&r.once(e,t))]};function MD(r){return Ne.__asyncGenerator(this,arguments,function*(){let t=[],i="error",n=!1,s=null,l,y,w=0,D=[],k;function Y(){return l==="peek"?Et.joinUint8Arrays(D,y)[0]:([k,D,w]=Et.joinUint8Arrays(D,y),k)}if({cmd:l,size:y}=yield yield Ne.__await(null),r.isTTY)return yield yield Ne.__await(new Uint8Array(0)),yield Ne.__await(null);try{t[0]=uf(r,"end"),t[1]=uf(r,"error");do{if(t[2]=uf(r,"readable"),[i,s]=yield Ne.__await(Promise.race(t.map(ie=>ie[2]))),i==="error")break;if((n=i==="end")||(isFinite(y-w)?(k=Et.toUint8Array(r.read(y-w)),k.byteLength<y-w&&(k=Et.toUint8Array(r.read(void 0)))):k=Et.toUint8Array(r.read(void 0)),k.byteLength>0&&(D.push(k),w+=k.byteLength)),n||y<=w)do({cmd:l,size:y}=yield yield Ne.__await(Y()));while(y<w)}while(!n)}finally{yield Ne.__await(J(t,i==="error"?s:null))}return yield Ne.__await(null);function J(ie,Ye){return k=D=null,new Promise((Re,Rt)=>{for(let[at,fn]of ie)r.off(at,fn);try{let at=r.destroy;at&&at.call(r,Ye),Ye=void 0}catch(at){Ye=at||Ye}finally{Ye!=null?Rt(Ye):Re()}})}})}});var nt=E(ws=>{"use strict";Object.defineProperty(ws,"__esModule",{value:!0});ws.Vector=ws.AbstractVector=void 0;var du=class{};ws.AbstractVector=du;ws.Vector=du;du.prototype.data=null});var Vi=E(W=>{"use strict";Object.defineProperty(W,"__esModule",{value:!0});W.Schema=W.Buffer=W.Field=W.DictionaryEncoding=W.KeyValue=W.Duration=W.Interval=W.Timestamp=W.Time=W.Date=W.Decimal=W.Bool=W.FixedSizeBinary=W.LargeBinary=W.LargeUtf8=W.Binary=W.Utf8=W.FloatingPoint=W.Int=W.Union=W.Map=W.FixedSizeList=W.LargeList=W.List=W.Struct_=W.Null=W.Endianness=W.DictionaryKind=W.Type=W.IntervalUnit=W.TimeUnit=W.DateUnit=W.Precision=W.UnionMode=W.Feature=W.MetadataVersion=void 0;var We=ni(),CD;(function(r){r[r.V1=0]="V1",r[r.V2=1]="V2",r[r.V3=2]="V3",r[r.V4=3]="V4",r[r.V5=4]="V5"})(CD=W.MetadataVersion||(W.MetadataVersion={}));var UD;(function(r){r[r.UNUSED=0]="UNUSED",r[r.DICTIONARY_REPLACEMENT=1]="DICTIONARY_REPLACEMENT",r[r.COMPRESSED_BODY=2]="COMPRESSED_BODY"})(UD=W.Feature||(W.Feature={}));var lf;(function(r){r[r.Sparse=0]="Sparse",r[r.Dense=1]="Dense"})(lf=W.UnionMode||(W.UnionMode={}));var df;(function(r){r[r.HALF=0]="HALF",r[r.SINGLE=1]="SINGLE",r[r.DOUBLE=2]="DOUBLE"})(df=W.Precision||(W.Precision={}));var ff;(function(r){r[r.DAY=0]="DAY",r[r.MILLISECOND=1]="MILLISECOND"})(ff=W.DateUnit||(W.DateUnit={}));var Bn;(function(r){r[r.SECOND=0]="SECOND",r[r.MILLISECOND=1]="MILLISECOND",r[r.MICROSECOND=2]="MICROSECOND",r[r.NANOSECOND=3]="NANOSECOND"})(Bn=W.TimeUnit||(W.TimeUnit={}));var hf;(function(r){r[r.YEAR_MONTH=0]="YEAR_MONTH",r[r.DAY_TIME=1]="DAY_TIME"})(hf=W.IntervalUnit||(W.IntervalUnit={}));var pf;(function(r){r[r.NONE=0]="NONE",r[r.Null=1]="Null",r[r.Int=2]="Int",r[r.FloatingPoint=3]="FloatingPoint",r[r.Binary=4]="Binary",r[r.Utf8=5]="Utf8",r[r.Bool=6]="Bool",r[r.Decimal=7]="Decimal",r[r.Date=8]="Date",r[r.Time=9]="Time",r[r.Timestamp=10]="Timestamp",r[r.Interval=11]="Interval",r[r.List=12]="List",r[r.Struct_=13]="Struct_",r[r.Union=14]="Union",r[r.FixedSizeBinary=15]="FixedSizeBinary",r[r.FixedSizeList=16]="FixedSizeList",r[r.Map=17]="Map",r[r.Duration=18]="Duration",r[r.LargeBinary=19]="LargeBinary",r[r.LargeUtf8=20]="LargeUtf8",r[r.LargeList=21]="LargeList"})(pf=W.Type||(W.Type={}));var _f;(function(r){r[r.DenseArray=0]="DenseArray"})(_f=W.DictionaryKind||(W.DictionaryKind={}));var yf;(function(r){r[r.Little=0]="Little",r[r.Big=1]="Big"})(yf=W.Endianness||(W.Endianness={}));var In=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsNull(e,t){return(t||new In).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsNull(e,t){return e.setPosition(e.position()+We.flatbuffers.SIZE_PREFIX_LENGTH),(t||new In).__init(e.readInt32(e.position())+e.position(),e)}static startNull(e){e.startObject(0)}static endNull(e){return e.endObject()}static createNull(e){return In.startNull(e),In.endNull(e)}};W.Null=In;var Tn=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsStruct_(e,t){return(t||new Tn).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsStruct_(e,t){return e.setPosition(e.position()+We.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Tn).__init(e.readInt32(e.position())+e.position(),e)}static startStruct_(e){e.startObject(0)}static endStruct_(e){return e.endObject()}static createStruct_(e){return Tn.startStruct_(e),Tn.endStruct_(e)}};W.Struct_=Tn;var Sn=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsList(e,t){return(t||new Sn).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsList(e,t){return e.setPosition(e.position()+We.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Sn).__init(e.readInt32(e.position())+e.position(),e)}static startList(e){e.startObject(0)}static endList(e){return e.endObject()}static createList(e){return Sn.startList(e),Sn.endList(e)}};W.List=Sn;var Dn=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsLargeList(e,t){return(t||new Dn).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsLargeList(e,t){return e.setPosition(e.position()+We.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Dn).__init(e.readInt32(e.position())+e.position(),e)}static startLargeList(e){e.startObject(0)}static endLargeList(e){return e.endObject()}static createLargeList(e){return Dn.startLargeList(e),Dn.endLargeList(e)}};W.LargeList=Dn;var Ai=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsFixedSizeList(e,t){return(t||new Ai).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFixedSizeList(e,t){return e.setPosition(e.position()+We.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Ai).__init(e.readInt32(e.position())+e.position(),e)}listSize(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}static startFixedSizeList(e){e.startObject(1)}static addListSize(e,t){e.addFieldInt32(0,t,0)}static endFixedSizeList(e){return e.endObject()}static createFixedSizeList(e,t){return Ai.startFixedSizeList(e),Ai.addListSize(e,t),Ai.endFixedSizeList(e)}};W.FixedSizeList=Ai;var Oi=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsMap(e,t){return(t||new Oi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsMap(e,t){return e.setPosition(e.position()+We.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Oi).__init(e.readInt32(e.position())+e.position(),e)}keysSorted(){let e=this.bb.__offset(this.bb_pos,4);return e?!!this.bb.readInt8(this.bb_pos+e):!1}static startMap(e){e.startObject(1)}static addKeysSorted(e,t){e.addFieldInt8(0,+t,0)}static endMap(e){return e.endObject()}static createMap(e,t){return Oi.startMap(e),Oi.addKeysSorted(e,t),Oi.endMap(e)}};W.Map=Oi;var si=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsUnion(e,t){return(t||new si).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsUnion(e,t){return e.setPosition(e.position()+We.flatbuffers.SIZE_PREFIX_LENGTH),(t||new si).__init(e.readInt32(e.position())+e.position(),e)}mode(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):lf.Sparse}typeIds(e){let t=this.bb.__offset(this.bb_pos,6);return t?this.bb.readInt32(this.bb.__vector(this.bb_pos+t)+e*4):0}typeIdsLength(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}typeIdsArray(){let e=this.bb.__offset(this.bb_pos,6);return e?new Int32Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+e),this.bb.__vector_len(this.bb_pos+e)):null}static startUnion(e){e.startObject(2)}static addMode(e,t){e.addFieldInt16(0,t,lf.Sparse)}static addTypeIds(e,t){e.addFieldOffset(1,t,0)}static createTypeIdsVector(e,t){e.startVector(4,t.length,4);for(let i=t.length-1;i>=0;i--)e.addInt32(t[i]);return e.endVector()}static startTypeIdsVector(e,t){e.startVector(4,t,4)}static endUnion(e){return e.endObject()}static createUnion(e,t,i){return si.startUnion(e),si.addMode(e,t),si.addTypeIds(e,i),si.endUnion(e)}};W.Union=si;var Mr=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsInt(e,t){return(t||new Mr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsInt(e,t){return e.setPosition(e.position()+We.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Mr).__init(e.readInt32(e.position())+e.position(),e)}bitWidth(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}isSigned(){let e=this.bb.__offset(this.bb_pos,6);return e?!!this.bb.readInt8(this.bb_pos+e):!1}static startInt(e){e.startObject(2)}static addBitWidth(e,t){e.addFieldInt32(0,t,0)}static addIsSigned(e,t){e.addFieldInt8(1,+t,0)}static endInt(e){return e.endObject()}static createInt(e,t,i){return Mr.startInt(e),Mr.addBitWidth(e,t),Mr.addIsSigned(e,i),Mr.endInt(e)}};W.Int=Mr;var Fi=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsFloatingPoint(e,t){return(t||new Fi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFloatingPoint(e,t){return e.setPosition(e.position()+We.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Fi).__init(e.readInt32(e.position())+e.position(),e)}precision(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):df.HALF}static startFloatingPoint(e){e.startObject(1)}static addPrecision(e,t){e.addFieldInt16(0,t,df.HALF)}static endFloatingPoint(e){return e.endObject()}static createFloatingPoint(e,t){return Fi.startFloatingPoint(e),Fi.addPrecision(e,t),Fi.endFloatingPoint(e)}};W.FloatingPoint=Fi;var An=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsUtf8(e,t){return(t||new An).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsUtf8(e,t){return e.setPosition(e.position()+We.flatbuffers.SIZE_PREFIX_LENGTH),(t||new An).__init(e.readInt32(e.position())+e.position(),e)}static startUtf8(e){e.startObject(0)}static endUtf8(e){return e.endObject()}static createUtf8(e){return An.startUtf8(e),An.endUtf8(e)}};W.Utf8=An;var On=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsBinary(e,t){return(t||new On).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBinary(e,t){return e.setPosition(e.position()+We.flatbuffers.SIZE_PREFIX_LENGTH),(t||new On).__init(e.readInt32(e.position())+e.position(),e)}static startBinary(e){e.startObject(0)}static endBinary(e){return e.endObject()}static createBinary(e){return On.startBinary(e),On.endBinary(e)}};W.Binary=On;var Fn=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsLargeUtf8(e,t){return(t||new Fn).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsLargeUtf8(e,t){return e.setPosition(e.position()+We.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Fn).__init(e.readInt32(e.position())+e.position(),e)}static startLargeUtf8(e){e.startObject(0)}static endLargeUtf8(e){return e.endObject()}static createLargeUtf8(e){return Fn.startLargeUtf8(e),Fn.endLargeUtf8(e)}};W.LargeUtf8=Fn;var kn=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsLargeBinary(e,t){return(t||new kn).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsLargeBinary(e,t){return e.setPosition(e.position()+We.flatbuffers.SIZE_PREFIX_LENGTH),(t||new kn).__init(e.readInt32(e.position())+e.position(),e)}static startLargeBinary(e){e.startObject(0)}static endLargeBinary(e){return e.endObject()}static createLargeBinary(e){return kn.startLargeBinary(e),kn.endLargeBinary(e)}};W.LargeBinary=kn;var ki=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsFixedSizeBinary(e,t){return(t||new ki).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFixedSizeBinary(e,t){return e.setPosition(e.position()+We.flatbuffers.SIZE_PREFIX_LENGTH),(t||new ki).__init(e.readInt32(e.position())+e.position(),e)}byteWidth(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}static startFixedSizeBinary(e){e.startObject(1)}static addByteWidth(e,t){e.addFieldInt32(0,t,0)}static endFixedSizeBinary(e){return e.endObject()}static createFixedSizeBinary(e,t){return ki.startFixedSizeBinary(e),ki.addByteWidth(e,t),ki.endFixedSizeBinary(e)}};W.FixedSizeBinary=ki;var Mn=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsBool(e,t){return(t||new Mn).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBool(e,t){return e.setPosition(e.position()+We.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Mn).__init(e.readInt32(e.position())+e.position(),e)}static startBool(e){e.startObject(0)}static endBool(e){return e.endObject()}static createBool(e){return Mn.startBool(e),Mn.endBool(e)}};W.Bool=Mn;var Cr=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsDecimal(e,t){return(t||new Cr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDecimal(e,t){return e.setPosition(e.position()+We.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Cr).__init(e.readInt32(e.position())+e.position(),e)}precision(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}scale(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt32(this.bb_pos+e):0}bitWidth(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.readInt32(this.bb_pos+e):128}static startDecimal(e){e.startObject(3)}static addPrecision(e,t){e.addFieldInt32(0,t,0)}static addScale(e,t){e.addFieldInt32(1,t,0)}static addBitWidth(e,t){e.addFieldInt32(2,t,128)}static endDecimal(e){return e.endObject()}static createDecimal(e,t,i,n){return Cr.startDecimal(e),Cr.addPrecision(e,t),Cr.addScale(e,i),Cr.addBitWidth(e,n),Cr.endDecimal(e)}};W.Decimal=Cr;var Mi=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsDate(e,t){return(t||new Mi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDate(e,t){return e.setPosition(e.position()+We.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Mi).__init(e.readInt32(e.position())+e.position(),e)}unit(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):ff.MILLISECOND}static startDate(e){e.startObject(1)}static addUnit(e,t){e.addFieldInt16(0,t,ff.MILLISECOND)}static endDate(e){return e.endObject()}static createDate(e,t){return Mi.startDate(e),Mi.addUnit(e,t),Mi.endDate(e)}};W.Date=Mi;var oi=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsTime(e,t){return(t||new oi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsTime(e,t){return e.setPosition(e.position()+We.flatbuffers.SIZE_PREFIX_LENGTH),(t||new oi).__init(e.readInt32(e.position())+e.position(),e)}unit(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Bn.MILLISECOND}bitWidth(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt32(this.bb_pos+e):32}static startTime(e){e.startObject(2)}static addUnit(e,t){e.addFieldInt16(0,t,Bn.MILLISECOND)}static addBitWidth(e,t){e.addFieldInt32(1,t,32)}static endTime(e){return e.endObject()}static createTime(e,t,i){return oi.startTime(e),oi.addUnit(e,t),oi.addBitWidth(e,i),oi.endTime(e)}};W.Time=oi;var ai=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsTimestamp(e,t){return(t||new ai).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsTimestamp(e,t){return e.setPosition(e.position()+We.flatbuffers.SIZE_PREFIX_LENGTH),(t||new ai).__init(e.readInt32(e.position())+e.position(),e)}unit(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Bn.SECOND}timezone(e){let t=this.bb.__offset(this.bb_pos,6);return t?this.bb.__string(this.bb_pos+t,e):null}static startTimestamp(e){e.startObject(2)}static addUnit(e,t){e.addFieldInt16(0,t,Bn.SECOND)}static addTimezone(e,t){e.addFieldOffset(1,t,0)}static endTimestamp(e){return e.endObject()}static createTimestamp(e,t,i){return ai.startTimestamp(e),ai.addUnit(e,t),ai.addTimezone(e,i),ai.endTimestamp(e)}};W.Timestamp=ai;var Ci=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsInterval(e,t){return(t||new Ci).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsInterval(e,t){return e.setPosition(e.position()+We.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Ci).__init(e.readInt32(e.position())+e.position(),e)}unit(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):hf.YEAR_MONTH}static startInterval(e){e.startObject(1)}static addUnit(e,t){e.addFieldInt16(0,t,hf.YEAR_MONTH)}static endInterval(e){return e.endObject()}static createInterval(e,t){return Ci.startInterval(e),Ci.addUnit(e,t),Ci.endInterval(e)}};W.Interval=Ci;var Ui=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsDuration(e,t){return(t||new Ui).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDuration(e,t){return e.setPosition(e.position()+We.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Ui).__init(e.readInt32(e.position())+e.position(),e)}unit(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Bn.MILLISECOND}static startDuration(e){e.startObject(1)}static addUnit(e,t){e.addFieldInt16(0,t,Bn.MILLISECOND)}static endDuration(e){return e.endObject()}static createDuration(e,t){return Ui.startDuration(e),Ui.addUnit(e,t),Ui.endDuration(e)}};W.Duration=Ui;var vr=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsKeyValue(e,t){return(t||new vr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsKeyValue(e,t){return e.setPosition(e.position()+We.flatbuffers.SIZE_PREFIX_LENGTH),(t||new vr).__init(e.readInt32(e.position())+e.position(),e)}key(e){let t=this.bb.__offset(this.bb_pos,4);return t?this.bb.__string(this.bb_pos+t,e):null}value(e){let t=this.bb.__offset(this.bb_pos,6);return t?this.bb.__string(this.bb_pos+t,e):null}static startKeyValue(e){e.startObject(2)}static addKey(e,t){e.addFieldOffset(0,t,0)}static addValue(e,t){e.addFieldOffset(1,t,0)}static endKeyValue(e){return e.endObject()}static createKeyValue(e,t,i){return vr.startKeyValue(e),vr.addKey(e,t),vr.addValue(e,i),vr.endKeyValue(e)}};W.KeyValue=vr;var Xt=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsDictionaryEncoding(e,t){return(t||new Xt).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDictionaryEncoding(e,t){return e.setPosition(e.position()+We.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Xt).__init(e.readInt32(e.position())+e.position(),e)}id(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt64(this.bb_pos+e):this.bb.createLong(0,0)}indexType(e){let t=this.bb.__offset(this.bb_pos,6);return t?(e||new Mr).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}isOrdered(){let e=this.bb.__offset(this.bb_pos,8);return e?!!this.bb.readInt8(this.bb_pos+e):!1}dictionaryKind(){let e=this.bb.__offset(this.bb_pos,10);return e?this.bb.readInt16(this.bb_pos+e):_f.DenseArray}static startDictionaryEncoding(e){e.startObject(4)}static addId(e,t){e.addFieldInt64(0,t,e.createLong(0,0))}static addIndexType(e,t){e.addFieldOffset(1,t,0)}static addIsOrdered(e,t){e.addFieldInt8(2,+t,0)}static addDictionaryKind(e,t){e.addFieldInt16(3,t,_f.DenseArray)}static endDictionaryEncoding(e){return e.endObject()}static createDictionaryEncoding(e,t,i,n,s){return Xt.startDictionaryEncoding(e),Xt.addId(e,t),Xt.addIndexType(e,i),Xt.addIsOrdered(e,n),Xt.addDictionaryKind(e,s),Xt.endDictionaryEncoding(e)}};W.DictionaryEncoding=Xt;var Ct=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsField(e,t){return(t||new Ct).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsField(e,t){return e.setPosition(e.position()+We.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Ct).__init(e.readInt32(e.position())+e.position(),e)}name(e){let t=this.bb.__offset(this.bb_pos,4);return t?this.bb.__string(this.bb_pos+t,e):null}nullable(){let e=this.bb.__offset(this.bb_pos,6);return e?!!this.bb.readInt8(this.bb_pos+e):!1}typeType(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.readUint8(this.bb_pos+e):pf.NONE}type(e){let t=this.bb.__offset(this.bb_pos,10);return t?this.bb.__union(e,this.bb_pos+t):null}dictionary(e){let t=this.bb.__offset(this.bb_pos,12);return t?(e||new Xt).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}children(e,t){let i=this.bb.__offset(this.bb_pos,14);return i?(t||new Ct).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+e*4),this.bb):null}childrenLength(){let e=this.bb.__offset(this.bb_pos,14);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,t){let i=this.bb.__offset(this.bb_pos,16);return i?(t||new vr).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+e*4),this.bb):null}customMetadataLength(){let e=this.bb.__offset(this.bb_pos,16);return e?this.bb.__vector_len(this.bb_pos+e):0}static startField(e){e.startObject(7)}static addName(e,t){e.addFieldOffset(0,t,0)}static addNullable(e,t){e.addFieldInt8(1,+t,0)}static addTypeType(e,t){e.addFieldInt8(2,t,pf.NONE)}static addType(e,t){e.addFieldOffset(3,t,0)}static addDictionary(e,t){e.addFieldOffset(4,t,0)}static addChildren(e,t){e.addFieldOffset(5,t,0)}static createChildrenVector(e,t){e.startVector(4,t.length,4);for(let i=t.length-1;i>=0;i--)e.addOffset(t[i]);return e.endVector()}static startChildrenVector(e,t){e.startVector(4,t,4)}static addCustomMetadata(e,t){e.addFieldOffset(6,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let i=t.length-1;i>=0;i--)e.addOffset(t[i]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static endField(e){return e.endObject()}static createField(e,t,i,n,s,l,y,w){return Ct.startField(e),Ct.addName(e,t),Ct.addNullable(e,i),Ct.addTypeType(e,n),Ct.addType(e,s),Ct.addDictionary(e,l),Ct.addChildren(e,y),Ct.addCustomMetadata(e,w),Ct.endField(e)}};W.Field=Ct;var Cg=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}offset(){return this.bb.readInt64(this.bb_pos)}length(){return this.bb.readInt64(this.bb_pos+8)}static createBuffer(e,t,i){return e.prep(8,16),e.writeInt64(i),e.writeInt64(t),e.offset()}};W.Buffer=Cg;var wr=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsSchema(e,t){return(t||new wr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsSchema(e,t){return e.setPosition(e.position()+We.flatbuffers.SIZE_PREFIX_LENGTH),(t||new wr).__init(e.readInt32(e.position())+e.position(),e)}endianness(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):yf.Little}fields(e,t){let i=this.bb.__offset(this.bb_pos,6);return i?(t||new Ct).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+e*4),this.bb):null}fieldsLength(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,t){let i=this.bb.__offset(this.bb_pos,8);return i?(t||new vr).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+e*4),this.bb):null}customMetadataLength(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}features(e){let t=this.bb.__offset(this.bb_pos,10);return t?this.bb.readInt64(this.bb.__vector(this.bb_pos+t)+e*8):this.bb.createLong(0,0)}featuresLength(){let e=this.bb.__offset(this.bb_pos,10);return e?this.bb.__vector_len(this.bb_pos+e):0}static startSchema(e){e.startObject(4)}static addEndianness(e,t){e.addFieldInt16(0,t,yf.Little)}static addFields(e,t){e.addFieldOffset(1,t,0)}static createFieldsVector(e,t){e.startVector(4,t.length,4);for(let i=t.length-1;i>=0;i--)e.addOffset(t[i]);return e.endVector()}static startFieldsVector(e,t){e.startVector(4,t,4)}static addCustomMetadata(e,t){e.addFieldOffset(2,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let i=t.length-1;i>=0;i--)e.addOffset(t[i]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static addFeatures(e,t){e.addFieldOffset(3,t,0)}static createFeaturesVector(e,t){e.startVector(8,t.length,8);for(let i=t.length-1;i>=0;i--)e.addInt64(t[i]);return e.endVector()}static startFeaturesVector(e,t){e.startVector(8,t,8)}static endSchema(e){return e.endObject()}static finishSchemaBuffer(e,t){e.finish(t)}static finishSizePrefixedSchemaBuffer(e,t){e.finish(t,void 0,!0)}static createSchema(e,t,i,n,s){return wr.startSchema(e),wr.addEndianness(e,t),wr.addFields(e,i),wr.addCustomMetadata(e,n),wr.addFeatures(e,s),wr.endSchema(e)}};W.Schema=wr});var pu=E(st=>{"use strict";Object.defineProperty(st,"__esModule",{value:!0});st.Message=st.DictionaryBatch=st.RecordBatch=st.BodyCompression=st.FieldNode=st.MessageHeader=st.BodyCompressionMethod=st.CompressionType=void 0;var fu=ni(),hu=Vi(),mf;(function(r){r[r.LZ4_FRAME=0]="LZ4_FRAME",r[r.ZSTD=1]="ZSTD"})(mf=st.CompressionType||(st.CompressionType={}));var bf;(function(r){r[r.BUFFER=0]="BUFFER"})(bf=st.BodyCompressionMethod||(st.BodyCompressionMethod={}));var gf;(function(r){r[r.NONE=0]="NONE",r[r.Schema=1]="Schema",r[r.DictionaryBatch=2]="DictionaryBatch",r[r.RecordBatch=3]="RecordBatch",r[r.Tensor=4]="Tensor",r[r.SparseTensor=5]="SparseTensor"})(gf=st.MessageHeader||(st.MessageHeader={}));var vf=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}length(){return this.bb.readInt64(this.bb_pos)}nullCount(){return this.bb.readInt64(this.bb_pos+8)}static createFieldNode(e,t,i){return e.prep(8,16),e.writeInt64(i),e.writeInt64(t),e.offset()}};st.FieldNode=vf;var Ur=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsBodyCompression(e,t){return(t||new Ur).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBodyCompression(e,t){return e.setPosition(e.position()+fu.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Ur).__init(e.readInt32(e.position())+e.position(),e)}codec(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt8(this.bb_pos+e):mf.LZ4_FRAME}method(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt8(this.bb_pos+e):bf.BUFFER}static startBodyCompression(e){e.startObject(2)}static addCodec(e,t){e.addFieldInt8(0,t,mf.LZ4_FRAME)}static addMethod(e,t){e.addFieldInt8(1,t,bf.BUFFER)}static endBodyCompression(e){return e.endObject()}static createBodyCompression(e,t,i){return Ur.startBodyCompression(e),Ur.addCodec(e,t),Ur.addMethod(e,i),Ur.endBodyCompression(e)}};st.BodyCompression=Ur;var Qt=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsRecordBatch(e,t){return(t||new Qt).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsRecordBatch(e,t){return e.setPosition(e.position()+fu.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Qt).__init(e.readInt32(e.position())+e.position(),e)}length(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt64(this.bb_pos+e):this.bb.createLong(0,0)}nodes(e,t){let i=this.bb.__offset(this.bb_pos,6);return i?(t||new vf).__init(this.bb.__vector(this.bb_pos+i)+e*16,this.bb):null}nodesLength(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}buffers(e,t){let i=this.bb.__offset(this.bb_pos,8);return i?(t||new hu.Buffer).__init(this.bb.__vector(this.bb_pos+i)+e*16,this.bb):null}buffersLength(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}compression(e){let t=this.bb.__offset(this.bb_pos,10);return t?(e||new Ur).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}static startRecordBatch(e){e.startObject(4)}static addLength(e,t){e.addFieldInt64(0,t,e.createLong(0,0))}static addNodes(e,t){e.addFieldOffset(1,t,0)}static startNodesVector(e,t){e.startVector(16,t,8)}static addBuffers(e,t){e.addFieldOffset(2,t,0)}static startBuffersVector(e,t){e.startVector(16,t,8)}static addCompression(e,t){e.addFieldOffset(3,t,0)}static endRecordBatch(e){return e.endObject()}static createRecordBatch(e,t,i,n,s){return Qt.startRecordBatch(e),Qt.addLength(e,t),Qt.addNodes(e,i),Qt.addBuffers(e,n),Qt.addCompression(e,s),Qt.endRecordBatch(e)}};st.RecordBatch=Qt;var Vr=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsDictionaryBatch(e,t){return(t||new Vr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDictionaryBatch(e,t){return e.setPosition(e.position()+fu.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Vr).__init(e.readInt32(e.position())+e.position(),e)}id(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt64(this.bb_pos+e):this.bb.createLong(0,0)}data(e){let t=this.bb.__offset(this.bb_pos,6);return t?(e||new Qt).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}isDelta(){let e=this.bb.__offset(this.bb_pos,8);return e?!!this.bb.readInt8(this.bb_pos+e):!1}static startDictionaryBatch(e){e.startObject(3)}static addId(e,t){e.addFieldInt64(0,t,e.createLong(0,0))}static addData(e,t){e.addFieldOffset(1,t,0)}static addIsDelta(e,t){e.addFieldInt8(2,+t,0)}static endDictionaryBatch(e){return e.endObject()}static createDictionaryBatch(e,t,i,n){return Vr.startDictionaryBatch(e),Vr.addId(e,t),Vr.addData(e,i),Vr.addIsDelta(e,n),Vr.endDictionaryBatch(e)}};st.DictionaryBatch=Vr;var er=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsMessage(e,t){return(t||new er).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsMessage(e,t){return e.setPosition(e.position()+fu.flatbuffers.SIZE_PREFIX_LENGTH),(t||new er).__init(e.readInt32(e.position())+e.position(),e)}version(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):hu.MetadataVersion.V1}headerType(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readUint8(this.bb_pos+e):gf.NONE}header(e){let t=this.bb.__offset(this.bb_pos,8);return t?this.bb.__union(e,this.bb_pos+t):null}bodyLength(){let e=this.bb.__offset(this.bb_pos,10);return e?this.bb.readInt64(this.bb_pos+e):this.bb.createLong(0,0)}customMetadata(e,t){let i=this.bb.__offset(this.bb_pos,12);return i?(t||new hu.KeyValue).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+e*4),this.bb):null}customMetadataLength(){let e=this.bb.__offset(this.bb_pos,12);return e?this.bb.__vector_len(this.bb_pos+e):0}static startMessage(e){e.startObject(5)}static addVersion(e,t){e.addFieldInt16(0,t,hu.MetadataVersion.V1)}static addHeaderType(e,t){e.addFieldInt8(1,t,gf.NONE)}static addHeader(e,t){e.addFieldOffset(2,t,0)}static addBodyLength(e,t){e.addFieldInt64(3,t,e.createLong(0,0))}static addCustomMetadata(e,t){e.addFieldOffset(4,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let i=t.length-1;i>=0;i--)e.addOffset(t[i]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static endMessage(e){return e.endObject()}static finishMessageBuffer(e,t){e.finish(t)}static finishSizePrefixedMessageBuffer(e,t){e.finish(t,void 0,!0)}static createMessage(e,t,i,n,s,l){return er.startMessage(e),er.addVersion(e,t),er.addHeaderType(e,i),er.addHeader(e,n),er.addBodyLength(e,s),er.addCustomMetadata(e,l),er.endMessage(e)}};st.Message=er});var xe=E(Ze=>{"use strict";Object.defineProperty(Ze,"__esModule",{value:!0});Ze.BufferType=Ze.Type=Ze.MessageHeader=Ze.MetadataVersion=Ze.IntervalUnit=Ze.UnionMode=Ze.Precision=Ze.TimeUnit=Ze.DateUnit=void 0;var js=Vi();Object.defineProperty(Ze,"DateUnit",{enumerable:!0,get:function(){return js.DateUnit}});Object.defineProperty(Ze,"TimeUnit",{enumerable:!0,get:function(){return js.TimeUnit}});Object.defineProperty(Ze,"Precision",{enumerable:!0,get:function(){return js.Precision}});Object.defineProperty(Ze,"UnionMode",{enumerable:!0,get:function(){return js.UnionMode}});Object.defineProperty(Ze,"IntervalUnit",{enumerable:!0,get:function(){return js.IntervalUnit}});Object.defineProperty(Ze,"MetadataVersion",{enumerable:!0,get:function(){return js.MetadataVersion}});var VD=pu();Object.defineProperty(Ze,"MessageHeader",{enumerable:!0,get:function(){return VD.MessageHeader}});var ED;(function(r){r[r.NONE=0]="NONE",r[r.Null=1]="Null",r[r.Int=2]="Int",r[r.Float=3]="Float",r[r.Binary=4]="Binary",r[r.Utf8=5]="Utf8",r[r.Bool=6]="Bool",r[r.Decimal=7]="Decimal",r[r.Date=8]="Date",r[r.Time=9]="Time",r[r.Timestamp=10]="Timestamp",r[r.Interval=11]="Interval",r[r.List=12]="List",r[r.Struct=13]="Struct",r[r.Union=14]="Union",r[r.FixedSizeBinary=15]="FixedSizeBinary",r[r.FixedSizeList=16]="FixedSizeList",r[r.Map=17]="Map",r[r.Dictionary=-1]="Dictionary",r[r.Int8=-2]="Int8",r[r.Int16=-3]="Int16",r[r.Int32=-4]="Int32",r[r.Int64=-5]="Int64",r[r.Uint8=-6]="Uint8",r[r.Uint16=-7]="Uint16",r[r.Uint32=-8]="Uint32",r[r.Uint64=-9]="Uint64",r[r.Float16=-10]="Float16",r[r.Float32=-11]="Float32",r[r.Float64=-12]="Float64",r[r.DateDay=-13]="DateDay",r[r.DateMillisecond=-14]="DateMillisecond",r[r.TimestampSecond=-15]="TimestampSecond",r[r.TimestampMillisecond=-16]="TimestampMillisecond",r[r.TimestampMicrosecond=-17]="TimestampMicrosecond",r[r.TimestampNanosecond=-18]="TimestampNanosecond",r[r.TimeSecond=-19]="TimeSecond",r[r.TimeMillisecond=-20]="TimeMillisecond",r[r.TimeMicrosecond=-21]="TimeMicrosecond",r[r.TimeNanosecond=-22]="TimeNanosecond",r[r.DenseUnion=-23]="DenseUnion",r[r.SparseUnion=-24]="SparseUnion",r[r.IntervalDayTime=-25]="IntervalDayTime",r[r.IntervalYearMonth=-26]="IntervalYearMonth"})(ED=Ze.Type||(Ze.Type={}));var RD;(function(r){r[r.OFFSET=0]="OFFSET",r[r.DATA=1]="DATA",r[r.VALIDITY=2]="VALIDITY",r[r.TYPE=3]="TYPE"})(RD=Ze.BufferType||(Ze.BufferType={}))});var Er=E(lt=>{"use strict";Object.defineProperty(lt,"__esModule",{value:!0});lt.popcnt_uint32=lt.popcnt_array=lt.popcnt_bit_range=lt.BitIterator=lt.packBools=lt.truncateBitmap=lt.setBool=lt.getBit=lt.getBool=void 0;function Ug(r,e,t,i){return(t&1<<i)!==0}lt.getBool=Ug;function Vg(r,e,t,i){return(t&1<<i)>>i}lt.getBit=Vg;function ND(r,e,t){return t?!!(r[e>>3]|=1<<e%8)||!0:!(r[e>>3]&=~(1<<e%8))&&!1}lt.setBool=ND;function PD(r,e,t){let i=t.byteLength+7&~7;if(r>0||t.byteLength<i){let n=new Uint8Array(i);return n.set(r%8===0?t.subarray(r>>3):Eg(new _u(t,r,e,null,Ug)).subarray(0,i)),n}return t}lt.truncateBitmap=PD;function Eg(r){let e=[],t=0,i=0,n=0;for(let l of r)l&&(n|=1<<i),++i===8&&(e[t++]=n,n=i=0);(t===0||i>0)&&(e[t++]=n);let s=new Uint8Array(e.length+7&~7);return s.set(e),s}lt.packBools=Eg;var _u=class{constructor(e,t,i,n,s){this.bytes=e,this.length=i,this.context=n,this.get=s,this.bit=t%8,this.byteIndex=t>>3,this.byte=e[this.byteIndex++],this.index=0}next(){return this.index<this.length?(this.bit===8&&(this.bit=0,this.byte=this.bytes[this.byteIndex++]),{value:this.get(this.context,this.index++,this.byte,this.bit++)}):{done:!0,value:null}}[Symbol.iterator](){return this}};lt.BitIterator=_u;function wf(r,e,t){if(t-e<=0)return 0;if(t-e<8){let s=0;for(let l of new _u(r,e,t-e,r,Vg))s+=l;return s}let i=t>>3<<3,n=e+(e%8===0?0:8-e%8);return wf(r,e,n)+wf(r,i,t)+Rg(r,n>>3,i-n>>3)}lt.popcnt_bit_range=wf;function Rg(r,e,t){let i=0,n=e|0,s=new DataView(r.buffer,r.byteOffset,r.byteLength),l=t===void 0?r.byteLength:n+t;for(;l-n>=4;)i+=yu(s.getUint32(n)),n+=4;for(;l-n>=2;)i+=yu(s.getUint16(n)),n+=2;for(;l-n>=1;)i+=yu(s.getUint8(n)),n+=1;return i}lt.popcnt_array=Rg;function yu(r){let e=r|0;return e=e-(e>>>1&1431655765),e=(e&858993459)+(e>>>2&858993459),(e+(e>>>4)&252645135)*16843009>>>24}lt.popcnt_uint32=yu});var Ve=E(x=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0});x.strideForType=x.Dictionary=x.Map_=x.FixedSizeList=x.FixedSizeBinary=x.SparseUnion=x.DenseUnion=x.Union=x.Struct=x.List=x.IntervalYearMonth=x.IntervalDayTime=x.Interval=x.TimestampNanosecond=x.TimestampMicrosecond=x.TimestampMillisecond=x.TimestampSecond=x.Timestamp=x.TimeNanosecond=x.TimeMicrosecond=x.TimeMillisecond=x.TimeSecond=x.Time=x.DateMillisecond=x.DateDay=x.Date_=x.Decimal=x.Bool=x.Utf8=x.Binary=x.Float64=x.Float32=x.Float16=x.Float=x.Uint64=x.Uint32=x.Uint16=x.Uint8=x.Int64=x.Int32=x.Int16=x.Int8=x.Int=x.Null=x.DataType=void 0;var Z=xe(),Xe=class{static isNull(e){return(e==null?void 0:e.typeId)===Z.Type.Null}static isInt(e){return(e==null?void 0:e.typeId)===Z.Type.Int}static isFloat(e){return(e==null?void 0:e.typeId)===Z.Type.Float}static isBinary(e){return(e==null?void 0:e.typeId)===Z.Type.Binary}static isUtf8(e){return(e==null?void 0:e.typeId)===Z.Type.Utf8}static isBool(e){return(e==null?void 0:e.typeId)===Z.Type.Bool}static isDecimal(e){return(e==null?void 0:e.typeId)===Z.Type.Decimal}static isDate(e){return(e==null?void 0:e.typeId)===Z.Type.Date}static isTime(e){return(e==null?void 0:e.typeId)===Z.Type.Time}static isTimestamp(e){return(e==null?void 0:e.typeId)===Z.Type.Timestamp}static isInterval(e){return(e==null?void 0:e.typeId)===Z.Type.Interval}static isList(e){return(e==null?void 0:e.typeId)===Z.Type.List}static isStruct(e){return(e==null?void 0:e.typeId)===Z.Type.Struct}static isUnion(e){return(e==null?void 0:e.typeId)===Z.Type.Union}static isFixedSizeBinary(e){return(e==null?void 0:e.typeId)===Z.Type.FixedSizeBinary}static isFixedSizeList(e){return(e==null?void 0:e.typeId)===Z.Type.FixedSizeList}static isMap(e){return(e==null?void 0:e.typeId)===Z.Type.Map}static isDictionary(e){return(e==null?void 0:e.typeId)===Z.Type.Dictionary}get typeId(){return Z.Type.NONE}};x.DataType=Xe;Xe[Symbol.toStringTag]=(r=>(r.children=null,r.ArrayType=Array,r[Symbol.toStringTag]="DataType"))(Xe.prototype);var mu=class extends Xe{toString(){return"Null"}get typeId(){return Z.Type.Null}};x.Null=mu;mu[Symbol.toStringTag]=(r=>r[Symbol.toStringTag]="Null")(mu.prototype);var tr=class extends Xe{constructor(e,t){super();this.isSigned=e,this.bitWidth=t}get typeId(){return Z.Type.Int}get ArrayType(){switch(this.bitWidth){case 8:return this.isSigned?Int8Array:Uint8Array;case 16:return this.isSigned?Int16Array:Uint16Array;case 32:return this.isSigned?Int32Array:Uint32Array;case 64:return this.isSigned?Int32Array:Uint32Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}};x.Int=tr;tr[Symbol.toStringTag]=(r=>(r.isSigned=null,r.bitWidth=null,r[Symbol.toStringTag]="Int"))(tr.prototype);var jf=class extends tr{constructor(){super(!0,8)}};x.Int8=jf;var Bf=class extends tr{constructor(){super(!0,16)}};x.Int16=Bf;var If=class extends tr{constructor(){super(!0,32)}};x.Int32=If;var Tf=class extends tr{constructor(){super(!0,64)}};x.Int64=Tf;var Sf=class extends tr{constructor(){super(!1,8)}};x.Uint8=Sf;var Df=class extends tr{constructor(){super(!1,16)}};x.Uint16=Df;var Af=class extends tr{constructor(){super(!1,32)}};x.Uint32=Af;var Of=class extends tr{constructor(){super(!1,64)}};x.Uint64=Of;Object.defineProperty(jf.prototype,"ArrayType",{value:Int8Array});Object.defineProperty(Bf.prototype,"ArrayType",{value:Int16Array});Object.defineProperty(If.prototype,"ArrayType",{value:Int32Array});Object.defineProperty(Tf.prototype,"ArrayType",{value:Int32Array});Object.defineProperty(Sf.prototype,"ArrayType",{value:Uint8Array});Object.defineProperty(Df.prototype,"ArrayType",{value:Uint16Array});Object.defineProperty(Af.prototype,"ArrayType",{value:Uint32Array});Object.defineProperty(Of.prototype,"ArrayType",{value:Uint32Array});var Cn=class extends Xe{constructor(e){super();this.precision=e}get typeId(){return Z.Type.Float}get ArrayType(){switch(this.precision){case Z.Precision.HALF:return Uint16Array;case Z.Precision.SINGLE:return Float32Array;case Z.Precision.DOUBLE:return Float64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}};x.Float=Cn;Cn[Symbol.toStringTag]=(r=>(r.precision=null,r[Symbol.toStringTag]="Float"))(Cn.prototype);var Ff=class extends Cn{constructor(){super(Z.Precision.HALF)}};x.Float16=Ff;var kf=class extends Cn{constructor(){super(Z.Precision.SINGLE)}};x.Float32=kf;var Mf=class extends Cn{constructor(){super(Z.Precision.DOUBLE)}};x.Float64=Mf;Object.defineProperty(Ff.prototype,"ArrayType",{value:Uint16Array});Object.defineProperty(kf.prototype,"ArrayType",{value:Float32Array});Object.defineProperty(Mf.prototype,"ArrayType",{value:Float64Array});var bu=class extends Xe{constructor(){super()}get typeId(){return Z.Type.Binary}toString(){return"Binary"}};x.Binary=bu;bu[Symbol.toStringTag]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Binary"))(bu.prototype);var gu=class extends Xe{constructor(){super()}get typeId(){return Z.Type.Utf8}toString(){return"Utf8"}};x.Utf8=gu;gu[Symbol.toStringTag]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Utf8"))(gu.prototype);var vu=class extends Xe{constructor(){super()}get typeId(){return Z.Type.Bool}toString(){return"Bool"}};x.Bool=vu;vu[Symbol.toStringTag]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Bool"))(vu.prototype);var wu=class extends Xe{constructor(e,t){super();this.scale=e,this.precision=t}get typeId(){return Z.Type.Decimal}toString(){return`Decimal[${this.precision}e${this.scale>0?"+":""}${this.scale}]`}};x.Decimal=wu;wu[Symbol.toStringTag]=(r=>(r.scale=null,r.precision=null,r.ArrayType=Uint32Array,r[Symbol.toStringTag]="Decimal"))(wu.prototype);var Bs=class extends Xe{constructor(e){super();this.unit=e}get typeId(){return Z.Type.Date}toString(){return`Date${(this.unit+1)*32}<${Z.DateUnit[this.unit]}>`}};x.Date_=Bs;Bs[Symbol.toStringTag]=(r=>(r.unit=null,r.ArrayType=Int32Array,r[Symbol.toStringTag]="Date"))(Bs.prototype);var Ng=class extends Bs{constructor(){super(Z.DateUnit.DAY)}};x.DateDay=Ng;var Pg=class extends Bs{constructor(){super(Z.DateUnit.MILLISECOND)}};x.DateMillisecond=Pg;var Ei=class extends Xe{constructor(e,t){super();this.unit=e,this.bitWidth=t}get typeId(){return Z.Type.Time}toString(){return`Time${this.bitWidth}<${Z.TimeUnit[this.unit]}>`}};x.Time=Ei;Ei[Symbol.toStringTag]=(r=>(r.unit=null,r.bitWidth=null,r.ArrayType=Int32Array,r[Symbol.toStringTag]="Time"))(Ei.prototype);var Lg=class extends Ei{constructor(){super(Z.TimeUnit.SECOND,32)}};x.TimeSecond=Lg;var xg=class extends Ei{constructor(){super(Z.TimeUnit.MILLISECOND,32)}};x.TimeMillisecond=xg;var qg=class extends Ei{constructor(){super(Z.TimeUnit.MICROSECOND,64)}};x.TimeMicrosecond=qg;var zg=class extends Ei{constructor(){super(Z.TimeUnit.NANOSECOND,64)}};x.TimeNanosecond=zg;var Ri=class extends Xe{constructor(e,t){super();this.unit=e,this.timezone=t}get typeId(){return Z.Type.Timestamp}toString(){return`Timestamp<${Z.TimeUnit[this.unit]}${this.timezone?`, ${this.timezone}`:""}>`}};x.Timestamp=Ri;Ri[Symbol.toStringTag]=(r=>(r.unit=null,r.timezone=null,r.ArrayType=Int32Array,r[Symbol.toStringTag]="Timestamp"))(Ri.prototype);var Wg=class extends Ri{constructor(e){super(Z.TimeUnit.SECOND,e)}};x.TimestampSecond=Wg;var Hg=class extends Ri{constructor(e){super(Z.TimeUnit.MILLISECOND,e)}};x.TimestampMillisecond=Hg;var Yg=class extends Ri{constructor(e){super(Z.TimeUnit.MICROSECOND,e)}};x.TimestampMicrosecond=Yg;var $g=class extends Ri{constructor(e){super(Z.TimeUnit.NANOSECOND,e)}};x.TimestampNanosecond=$g;var Is=class extends Xe{constructor(e){super();this.unit=e}get typeId(){return Z.Type.Interval}toString(){return`Interval<${Z.IntervalUnit[this.unit]}>`}};x.Interval=Is;Is[Symbol.toStringTag]=(r=>(r.unit=null,r.ArrayType=Int32Array,r[Symbol.toStringTag]="Interval"))(Is.prototype);var Gg=class extends Is{constructor(){super(Z.IntervalUnit.DAY_TIME)}};x.IntervalDayTime=Gg;var Kg=class extends Is{constructor(){super(Z.IntervalUnit.YEAR_MONTH)}};x.IntervalYearMonth=Kg;var ju=class extends Xe{constructor(e){super();this.children=[e]}get typeId(){return Z.Type.List}toString(){return`List<${this.valueType}>`}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}};x.List=ju;ju[Symbol.toStringTag]=(r=>(r.children=null,r[Symbol.toStringTag]="List"))(ju.prototype);var Bu=class extends Xe{constructor(e){super();this.children=e}get typeId(){return Z.Type.Struct}toString(){return`Struct<{${this.children.map(e=>`${e.name}:${e.type}`).join(", ")}}>`}};x.Struct=Bu;Bu[Symbol.toStringTag]=(r=>(r.children=null,r[Symbol.toStringTag]="Struct"))(Bu.prototype);var Ts=class extends Xe{constructor(e,t,i){super();this.mode=e,this.children=i,this.typeIds=t=Int32Array.from(t),this.typeIdToChildIndex=t.reduce((n,s,l)=>(n[s]=l)&&n||n,Object.create(null))}get typeId(){return Z.Type.Union}toString(){return`${this[Symbol.toStringTag]}<${this.children.map(e=>`${e.type}`).join(" | ")}>`}};x.Union=Ts;Ts[Symbol.toStringTag]=(r=>(r.mode=null,r.typeIds=null,r.children=null,r.typeIdToChildIndex=null,r.ArrayType=Int8Array,r[Symbol.toStringTag]="Union"))(Ts.prototype);var Jg=class extends Ts{constructor(e,t){super(Z.UnionMode.Dense,e,t)}};x.DenseUnion=Jg;var Zg=class extends Ts{constructor(e,t){super(Z.UnionMode.Sparse,e,t)}};x.SparseUnion=Zg;var Iu=class extends Xe{constructor(e){super();this.byteWidth=e}get typeId(){return Z.Type.FixedSizeBinary}toString(){return`FixedSizeBinary[${this.byteWidth}]`}};x.FixedSizeBinary=Iu;Iu[Symbol.toStringTag]=(r=>(r.byteWidth=null,r.ArrayType=Uint8Array,r[Symbol.toStringTag]="FixedSizeBinary"))(Iu.prototype);var Tu=class extends Xe{constructor(e,t){super();this.listSize=e,this.children=[t]}get typeId(){return Z.Type.FixedSizeList}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}toString(){return`FixedSizeList[${this.listSize}]<${this.valueType}>`}};x.FixedSizeList=Tu;Tu[Symbol.toStringTag]=(r=>(r.children=null,r.listSize=null,r[Symbol.toStringTag]="FixedSizeList"))(Tu.prototype);var Su=class extends Xe{constructor(e,t=!1){super();this.children=[e],this.keysSorted=t}get typeId(){return Z.Type.Map}get keyType(){return this.children[0].type.children[0].type}get valueType(){return this.children[0].type.children[1].type}toString(){return`Map<{${this.children[0].type.children.map(e=>`${e.name}:${e.type}`).join(", ")}}>`}};x.Map_=Su;Su[Symbol.toStringTag]=(r=>(r.children=null,r.keysSorted=null,r[Symbol.toStringTag]="Map_"))(Su.prototype);var LD=(r=>()=>++r)(-1),Du=class extends Xe{constructor(e,t,i,n){super();this.indices=t,this.dictionary=e,this.isOrdered=n||!1,this.id=i==null?LD():typeof i=="number"?i:i.low}get typeId(){return Z.Type.Dictionary}get children(){return this.dictionary.children}get valueType(){return this.dictionary}get ArrayType(){return this.dictionary.ArrayType}toString(){return`Dictionary<${this.indices}, ${this.dictionary}>`}};x.Dictionary=Du;Du[Symbol.toStringTag]=(r=>(r.id=null,r.indices=null,r.isOrdered=null,r.dictionary=null,r[Symbol.toStringTag]="Dictionary"))(Du.prototype);function xD(r){let e=r;switch(r.typeId){case Z.Type.Decimal:return 4;case Z.Type.Timestamp:return 2;case Z.Type.Date:return 1+e.unit;case Z.Type.Interval:return 1+e.unit;case Z.Type.Int:return 1+ +(e.bitWidth>32);case Z.Type.Time:return 1+ +(e.bitWidth>32);case Z.Type.FixedSizeList:return e.listSize;case Z.Type.FixedSizeBinary:return e.byteWidth;default:return 1}}x.strideForType=xD});var jr=E(Un=>{"use strict";Object.defineProperty(Un,"__esModule",{value:!0});Un.Data=Un.kUnknownNullCount=void 0;var qD=Er(),zD=Er(),te=xe(),WD=Ve(),De=mt();Un.kUnknownNullCount=-1;var ye=class{constructor(e,t,i,n,s,l,y){this.type=e,this.dictionary=y,this.offset=Math.floor(Math.max(t||0,0)),this.length=Math.floor(Math.max(i||0,0)),this._nullCount=Math.floor(Math.max(n||0,-1)),this.childData=(l||[]).map(D=>D instanceof ye?D:D.data);let w;s instanceof ye?(this.stride=s.stride,this.values=s.values,this.typeIds=s.typeIds,this.nullBitmap=s.nullBitmap,this.valueOffsets=s.valueOffsets):(this.stride=WD.strideForType(e),s&&((w=s[0])&&(this.valueOffsets=w),(w=s[1])&&(this.values=w),(w=s[2])&&(this.nullBitmap=w),(w=s[3])&&(this.typeIds=w)))}get typeId(){return this.type.typeId}get ArrayType(){return this.type.ArrayType}get buffers(){return[this.valueOffsets,this.values,this.nullBitmap,this.typeIds]}get byteLength(){let e=0,{valueOffsets:t,values:i,nullBitmap:n,typeIds:s}=this;return t&&(e+=t.byteLength),i&&(e+=i.byteLength),n&&(e+=n.byteLength),s&&(e+=s.byteLength),this.childData.reduce((l,y)=>l+y.byteLength,e)}get nullCount(){let e=this._nullCount,t;return e<=Un.kUnknownNullCount&&(t=this.nullBitmap)&&(this._nullCount=e=this.length-zD.popcnt_bit_range(t,this.offset,this.offset+this.length)),e}clone(e,t=this.offset,i=this.length,n=this._nullCount,s=this,l=this.childData){return new ye(e,t,i,n,s,l,this.dictionary)}slice(e,t){let{stride:i,typeId:n,childData:s}=this,l=+(this._nullCount===0)-1,y=n===16?i:1,w=this._sliceBuffers(e,t,i,n);return this.clone(this.type,this.offset+e,t,l,w,!s.length||this.valueOffsets?s:this._sliceChildren(s,y*e,y*t))}_changeLengthAndBackfillNullBitmap(e){if(this.typeId===te.Type.Null)return this.clone(this.type,0,e,0);let{length:t,nullCount:i}=this,n=new Uint8Array((e+63&~63)>>3).fill(255,0,t>>3);n[t>>3]=(1<<t-(t&~7))-1,i>0&&n.set(qD.truncateBitmap(this.offset,t,this.nullBitmap),0);let s=this.buffers;return s[te.BufferType.VALIDITY]=n,this.clone(this.type,0,e,i+(e-t),s)}_sliceBuffers(e,t,i,n){let s,{buffers:l}=this;return(s=l[te.BufferType.TYPE])&&(l[te.BufferType.TYPE]=s.subarray(e,e+t)),(s=l[te.BufferType.OFFSET])&&(l[te.BufferType.OFFSET]=s.subarray(e,e+t+1))||(s=l[te.BufferType.DATA])&&(l[te.BufferType.DATA]=n===6?s:s.subarray(i*e,i*(e+t))),l}_sliceChildren(e,t,i){return e.map(n=>n.slice(t,i))}static new(e,t,i,n,s,l,y){switch(s instanceof ye?s=s.buffers:s||(s=[]),e.typeId){case te.Type.Null:return ye.Null(e,t,i);case te.Type.Int:return ye.Int(e,t,i,n||0,s[te.BufferType.VALIDITY],s[te.BufferType.DATA]||[]);case te.Type.Dictionary:return ye.Dictionary(e,t,i,n||0,s[te.BufferType.VALIDITY],s[te.BufferType.DATA]||[],y);case te.Type.Float:return ye.Float(e,t,i,n||0,s[te.BufferType.VALIDITY],s[te.BufferType.DATA]||[]);case te.Type.Bool:return ye.Bool(e,t,i,n||0,s[te.BufferType.VALIDITY],s[te.BufferType.DATA]||[]);case te.Type.Decimal:return ye.Decimal(e,t,i,n||0,s[te.BufferType.VALIDITY],s[te.BufferType.DATA]||[]);case te.Type.Date:return ye.Date(e,t,i,n||0,s[te.BufferType.VALIDITY],s[te.BufferType.DATA]||[]);case te.Type.Time:return ye.Time(e,t,i,n||0,s[te.BufferType.VALIDITY],s[te.BufferType.DATA]||[]);case te.Type.Timestamp:return ye.Timestamp(e,t,i,n||0,s[te.BufferType.VALIDITY],s[te.BufferType.DATA]||[]);case te.Type.Interval:return ye.Interval(e,t,i,n||0,s[te.BufferType.VALIDITY],s[te.BufferType.DATA]||[]);case te.Type.FixedSizeBinary:return ye.FixedSizeBinary(e,t,i,n||0,s[te.BufferType.VALIDITY],s[te.BufferType.DATA]||[]);case te.Type.Binary:return ye.Binary(e,t,i,n||0,s[te.BufferType.VALIDITY],s[te.BufferType.OFFSET]||[],s[te.BufferType.DATA]||[]);case te.Type.Utf8:return ye.Utf8(e,t,i,n||0,s[te.BufferType.VALIDITY],s[te.BufferType.OFFSET]||[],s[te.BufferType.DATA]||[]);case te.Type.List:return ye.List(e,t,i,n||0,s[te.BufferType.VALIDITY],s[te.BufferType.OFFSET]||[],(l||[])[0]);case te.Type.FixedSizeList:return ye.FixedSizeList(e,t,i,n||0,s[te.BufferType.VALIDITY],(l||[])[0]);case te.Type.Struct:return ye.Struct(e,t,i,n||0,s[te.BufferType.VALIDITY],l||[]);case te.Type.Map:return ye.Map(e,t,i,n||0,s[te.BufferType.VALIDITY],s[te.BufferType.OFFSET]||[],(l||[])[0]);case te.Type.Union:return ye.Union(e,t,i,n||0,s[te.BufferType.VALIDITY],s[te.BufferType.TYPE]||[],s[te.BufferType.OFFSET]||l,l)}throw new Error(`Unrecognized typeId ${e.typeId}`)}static Null(e,t,i){return new ye(e,t,i,0)}static Int(e,t,i,n,s,l){return new ye(e,t,i,n,[void 0,De.toArrayBufferView(e.ArrayType,l),De.toUint8Array(s)])}static Dictionary(e,t,i,n,s,l,y){return new ye(e,t,i,n,[void 0,De.toArrayBufferView(e.indices.ArrayType,l),De.toUint8Array(s)],[],y)}static Float(e,t,i,n,s,l){return new ye(e,t,i,n,[void 0,De.toArrayBufferView(e.ArrayType,l),De.toUint8Array(s)])}static Bool(e,t,i,n,s,l){return new ye(e,t,i,n,[void 0,De.toArrayBufferView(e.ArrayType,l),De.toUint8Array(s)])}static Decimal(e,t,i,n,s,l){return new ye(e,t,i,n,[void 0,De.toArrayBufferView(e.ArrayType,l),De.toUint8Array(s)])}static Date(e,t,i,n,s,l){return new ye(e,t,i,n,[void 0,De.toArrayBufferView(e.ArrayType,l),De.toUint8Array(s)])}static Time(e,t,i,n,s,l){return new ye(e,t,i,n,[void 0,De.toArrayBufferView(e.ArrayType,l),De.toUint8Array(s)])}static Timestamp(e,t,i,n,s,l){return new ye(e,t,i,n,[void 0,De.toArrayBufferView(e.ArrayType,l),De.toUint8Array(s)])}static Interval(e,t,i,n,s,l){return new ye(e,t,i,n,[void 0,De.toArrayBufferView(e.ArrayType,l),De.toUint8Array(s)])}static FixedSizeBinary(e,t,i,n,s,l){return new ye(e,t,i,n,[void 0,De.toArrayBufferView(e.ArrayType,l),De.toUint8Array(s)])}static Binary(e,t,i,n,s,l,y){return new ye(e,t,i,n,[De.toInt32Array(l),De.toUint8Array(y),De.toUint8Array(s)])}static Utf8(e,t,i,n,s,l,y){return new ye(e,t,i,n,[De.toInt32Array(l),De.toUint8Array(y),De.toUint8Array(s)])}static List(e,t,i,n,s,l,y){return new ye(e,t,i,n,[De.toInt32Array(l),void 0,De.toUint8Array(s)],y?[y]:[])}static FixedSizeList(e,t,i,n,s,l){return new ye(e,t,i,n,[void 0,void 0,De.toUint8Array(s)],l?[l]:[])}static Struct(e,t,i,n,s,l){return new ye(e,t,i,n,[void 0,void 0,De.toUint8Array(s)],l)}static Map(e,t,i,n,s,l,y){return new ye(e,t,i,n,[De.toInt32Array(l),void 0,De.toUint8Array(s)],y?[y]:[])}static Union(e,t,i,n,s,l,y,w){let D=[void 0,void 0,De.toUint8Array(s),De.toArrayBufferView(e.ArrayType,l)];return e.mode===te.UnionMode.Sparse?new ye(e,t,i,n,D,y):(D[te.BufferType.OFFSET]=De.toInt32Array(y),new ye(e,t,i,n,D,w))}};Un.Data=ye;ye.prototype.childData=Object.freeze([])});var Cf=E(Au=>{"use strict";Object.defineProperty(Au,"__esModule",{value:!0});Au.valueToString=void 0;var HD=void 0;function YD(r){if(r===null)return"null";if(r===HD)return"undefined";switch(typeof r){case"number":return`${r}`;case"bigint":return`${r}`;case"string":return`"${r}"`}return typeof r[Symbol.toPrimitive]=="function"?r[Symbol.toPrimitive]("string"):ArrayBuffer.isView(r)?`[${r}]`:JSON.stringify(r)}Au.valueToString=YD});var Xg=E(Ou=>{"use strict";Object.defineProperty(Ou,"__esModule",{value:!0});Ou.createIsValidFunction=void 0;var Uf=Cf(),$D=Mt();function GD(r){if(!r||r.length<=0)return function(n){return!0};let e="",t=r.filter(i=>i===i);return t.length>0&&(e=`
2
- switch (x) {${t.map(i=>`
3
- case ${KD(i)}:`).join("")}
4
- return false;
5
- }`),r.length!==t.length&&(e=`if (x !== x) return false;
6
- ${e}`),new Function("x",`${e}
7
- return true;`)}Ou.createIsValidFunction=GD;function KD(r){return typeof r!="bigint"?Uf.valueToString(r):$D.BigIntAvailable?`${Uf.valueToString(r)}n`:`"${Uf.valueToString(r)}"`}});var Ni=E(rr=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});rr.WideBufferBuilder=rr.OffsetsBufferBuilder=rr.BitmapBufferBuilder=rr.DataBufferBuilder=rr.BufferBuilder=void 0;var Qg=mt(),Vf=Mt(),Ef=(r,e)=>(r*e+63&~63||64)/e,JD=(r,e=0)=>r.length>=e?r.subarray(0,e):Qg.memcpy(new r.constructor(e),r,0),Jo=class{constructor(e,t=1){this.buffer=e,this.stride=t,this.BYTES_PER_ELEMENT=e.BYTES_PER_ELEMENT,this.ArrayType=e.constructor,this._resize(this.length=e.length/t|0)}get byteLength(){return this.length*this.stride*this.BYTES_PER_ELEMENT|0}get reservedLength(){return this.buffer.length/this.stride}get reservedByteLength(){return this.buffer.byteLength}set(e,t){return this}append(e){return this.set(this.length,e)}reserve(e){if(e>0){this.length+=e;let t=this.stride,i=this.length*t,n=this.buffer.length;i>=n&&this._resize(n===0?Ef(i*1,this.BYTES_PER_ELEMENT):Ef(i*2,this.BYTES_PER_ELEMENT))}return this}flush(e=this.length){e=Ef(e*this.stride,this.BYTES_PER_ELEMENT);let t=JD(this.buffer,e);return this.clear(),t}clear(){return this.length=0,this._resize(0),this}_resize(e){return this.buffer=Qg.memcpy(new this.ArrayType(e),this.buffer)}};rr.BufferBuilder=Jo;Jo.prototype.offset=0;var Fu=class extends Jo{last(){return this.get(this.length-1)}get(e){return this.buffer[e]}set(e,t){return this.reserve(e-this.length+1),this.buffer[e*this.stride]=t,this}};rr.DataBufferBuilder=Fu;var ev=class extends Fu{constructor(e=new Uint8Array(0)){super(e,1/8);this.numValid=0}get numInvalid(){return this.length-this.numValid}get(e){return this.buffer[e>>3]>>e%8&1}set(e,t){let{buffer:i}=this.reserve(e-this.length+1),n=e>>3,s=e%8,l=i[n]>>s&1;return t?l===0&&(i[n]|=1<<s,++this.numValid):l===1&&(i[n]&=~(1<<s),--this.numValid),this}clear(){return this.numValid=0,super.clear()}};rr.BitmapBufferBuilder=ev;var tv=class extends Fu{constructor(e=new Int32Array(1)){super(e,1)}append(e){return this.set(this.length-1,e)}set(e,t){let i=this.length-1,n=this.reserve(e-i+1).buffer;return i<e++&&n.fill(n[i],i,e),n[e]=n[e-1]+t,this}flush(e=this.length-1){return e>this.length&&this.set(e-1,0),super.flush(e+1)}};rr.OffsetsBufferBuilder=tv;var rv=class extends Jo{get ArrayType64(){return this._ArrayType64||(this._ArrayType64=this.buffer instanceof Int32Array?Vf.BigInt64Array:Vf.BigUint64Array)}set(e,t){switch(this.reserve(e-this.length+1),typeof t){case"bigint":this.buffer64[e]=t;break;case"number":this.buffer[e*this.stride]=t;break;default:this.buffer.set(t,e*this.stride)}return this}_resize(e){let t=super._resize(e),i=t.byteLength/(this.BYTES_PER_ELEMENT*this.stride);return Vf.BigIntAvailable&&(this.buffer64=new this.ArrayType64(t.buffer,t.byteOffset,i)),t}};rr.WideBufferBuilder=rv});var Qe=E(Pi=>{"use strict";Object.defineProperty(Pi,"__esModule",{value:!0});Pi.VariableWidthBuilder=Pi.FixedWidthBuilder=Pi.Builder=void 0;var Ss=kt(),ZD=nt(),Ds=xe(),XD=jr(),QD=Xg(),Rf=Ni(),eA=Ve(),ir=class{constructor({type:e,nullValues:t}){this.length=0,this.finished=!1,this.type=e,this.children=[],this.nullValues=t,this.stride=eA.strideForType(e),this._nulls=new Rf.BitmapBufferBuilder,t&&t.length>0&&(this._isValid=QD.createIsValidFunction(t))}static new(e){}static throughNode(e){throw new Error('"throughNode" not available in this environment')}static throughDOM(e){throw new Error('"throughDOM" not available in this environment')}static throughIterable(e){return tA(e)}static throughAsyncIterable(e){return rA(e)}toVector(){return ZD.Vector.new(this.flush())}get ArrayType(){return this.type.ArrayType}get nullCount(){return this._nulls.numInvalid}get numChildren(){return this.children.length}get byteLength(){let e=0;return this._offsets&&(e+=this._offsets.byteLength),this._values&&(e+=this._values.byteLength),this._nulls&&(e+=this._nulls.byteLength),this._typeIds&&(e+=this._typeIds.byteLength),this.children.reduce((t,i)=>t+i.byteLength,e)}get reservedLength(){return this._nulls.reservedLength}get reservedByteLength(){let e=0;return this._offsets&&(e+=this._offsets.reservedByteLength),this._values&&(e+=this._values.reservedByteLength),this._nulls&&(e+=this._nulls.reservedByteLength),this._typeIds&&(e+=this._typeIds.reservedByteLength),this.children.reduce((t,i)=>t+i.reservedByteLength,e)}get valueOffsets(){return this._offsets?this._offsets.buffer:null}get values(){return this._values?this._values.buffer:null}get nullBitmap(){return this._nulls?this._nulls.buffer:null}get typeIds(){return this._typeIds?this._typeIds.buffer:null}append(e){return this.set(this.length,e)}isValid(e){return this._isValid(e)}set(e,t){return this.setValid(e,this.isValid(t))&&this.setValue(e,t),this}setValue(e,t){this._setValue(this,e,t)}setValid(e,t){return this.length=this._nulls.set(e,+t).length,t}addChild(e,t=`${this.numChildren}`){throw new Error(`Cannot append children to non-nested type "${this.type}"`)}getChildAt(e){return this.children[e]||null}flush(){let e=[],t=this._values,i=this._offsets,n=this._typeIds,{length:s,nullCount:l}=this;n?(e[Ds.BufferType.TYPE]=n.flush(s),i&&(e[Ds.BufferType.OFFSET]=i.flush(s))):i?(t&&(e[Ds.BufferType.DATA]=t.flush(i.last())),e[Ds.BufferType.OFFSET]=i.flush(s)):t&&(e[Ds.BufferType.DATA]=t.flush(s)),l>0&&(e[Ds.BufferType.VALIDITY]=this._nulls.flush(s));let y=XD.Data.new(this.type,0,s,l,e,this.children.map(w=>w.flush()));return this.clear(),y}finish(){return this.finished=!0,this.children.forEach(e=>e.finish()),this}clear(){return this.length=0,this._offsets&&this._offsets.clear(),this._values&&this._values.clear(),this._nulls&&this._nulls.clear(),this._typeIds&&this._typeIds.clear(),this.children.forEach(e=>e.clear()),this}};Pi.Builder=ir;ir.prototype.length=1;ir.prototype.stride=1;ir.prototype.children=null;ir.prototype.finished=!1;ir.prototype.nullValues=null;ir.prototype._isValid=()=>!0;var iv=class extends ir{constructor(e){super(e);this._values=new Rf.DataBufferBuilder(new this.ArrayType(0),this.stride)}setValue(e,t){let i=this._values;return i.reserve(e-i.length+1),super.setValue(e,t)}};Pi.FixedWidthBuilder=iv;var nv=class extends ir{constructor(e){super(e);this._pendingLength=0,this._offsets=new Rf.OffsetsBufferBuilder}setValue(e,t){let i=this._pending||(this._pending=new Map),n=i.get(e);n&&(this._pendingLength-=n.length),this._pendingLength+=t.length,i.set(e,t)}setValid(e,t){return super.setValid(e,t)?!0:((this._pending||(this._pending=new Map)).set(e,void 0),!1)}clear(){return this._pendingLength=0,this._pending=void 0,super.clear()}flush(){return this._flush(),super.flush()}finish(){return this._flush(),super.finish()}_flush(){let e=this._pending,t=this._pendingLength;return this._pendingLength=0,this._pending=void 0,e&&e.size>0&&this._flushPending(e,t),this}};Pi.VariableWidthBuilder=nv;function tA(r){let{["queueingStrategy"]:e="count"}=r,{["highWaterMark"]:t=e!=="bytes"?1e3:Math.pow(2,14)}=r,i=e!=="bytes"?"length":"byteLength";return function*(n){let s=0,l=ir.new(r);for(let y of n)l.append(y)[i]>=t&&++s&&(yield l.toVector());(l.finish().length>0||s===0)&&(yield l.toVector())}}function rA(r){let{["queueingStrategy"]:e="count"}=r,{["highWaterMark"]:t=e!=="bytes"?1e3:Math.pow(2,14)}=r,i=e!=="bytes"?"length":"byteLength";return function(n){return Ss.__asyncGenerator(this,arguments,function*(){var s,l;let y=0,w=ir.new(r);try{for(var D=Ss.__asyncValues(n),k;k=yield Ss.__await(D.next()),!k.done;){let Y=k.value;w.append(Y)[i]>=t&&++y&&(yield yield Ss.__await(w.toVector()))}}catch(Y){s={error:Y}}finally{try{k&&!k.done&&(l=D.return)&&(yield Ss.__await(l.call(D)))}finally{if(s)throw s.error}}(w.finish().length>0||y===0)&&(yield yield Ss.__await(w.toVector()))})}}});var Nf=E(ku=>{"use strict";Object.defineProperty(ku,"__esModule",{value:!0});ku.BoolBuilder=void 0;var iA=Ni(),nA=Qe(),sv=class extends nA.Builder{constructor(e){super(e);this._values=new iA.BitmapBufferBuilder}setValue(e,t){this._values.set(e,+t)}};ku.BoolBuilder=sv});var Pf=E(Mu=>{"use strict";Object.defineProperty(Mu,"__esModule",{value:!0});Mu.NullBuilder=void 0;var sA=Qe(),ov=class extends sA.Builder{setValue(e,t){}setValid(e,t){return this.length=Math.max(e+1,this.length),t}};Mu.NullBuilder=ov});var Lf=E(Li=>{"use strict";Object.defineProperty(Li,"__esModule",{value:!0});Li.DateMillisecondBuilder=Li.DateDayBuilder=Li.DateBuilder=void 0;var oA=Qe(),Cu=class extends oA.FixedWidthBuilder{};Li.DateBuilder=Cu;var av=class extends Cu{};Li.DateDayBuilder=av;var uv=class extends Cu{};Li.DateMillisecondBuilder=uv});var xf=E(Uu=>{"use strict";Object.defineProperty(Uu,"__esModule",{value:!0});Uu.DecimalBuilder=void 0;var aA=Qe(),cv=class extends aA.FixedWidthBuilder{};Uu.DecimalBuilder=cv});var zf=E(Vu=>{"use strict";Object.defineProperty(Vu,"__esModule",{value:!0});Vu.DictionaryBuilder=void 0;var uA=Ve(),qf=Qe(),lv=class extends qf.Builder{constructor({type:e,nullValues:t,dictionaryHashFunction:i}){super({type:new uA.Dictionary(e.dictionary,e.indices,e.id,e.isOrdered)});this._nulls=null,this._dictionaryOffset=0,this._keysToIndices=Object.create(null),this.indices=qf.Builder.new({type:this.type.indices,nullValues:t}),this.dictionary=qf.Builder.new({type:this.type.dictionary,nullValues:null}),typeof i=="function"&&(this.valueToKey=i)}get values(){return this.indices.values}get nullCount(){return this.indices.nullCount}get nullBitmap(){return this.indices.nullBitmap}get byteLength(){return this.indices.byteLength+this.dictionary.byteLength}get reservedLength(){return this.indices.reservedLength+this.dictionary.reservedLength}get reservedByteLength(){return this.indices.reservedByteLength+this.dictionary.reservedByteLength}isValid(e){return this.indices.isValid(e)}setValid(e,t){let i=this.indices;return t=i.setValid(e,t),this.length=i.length,t}setValue(e,t){let i=this._keysToIndices,n=this.valueToKey(t),s=i[n];return s===void 0&&(i[n]=s=this._dictionaryOffset+this.dictionary.append(t).length-1),this.indices.setValue(e,s)}flush(){let e=this.type,t=this._dictionary,i=this.dictionary.toVector(),n=this.indices.flush().clone(e);return n.dictionary=t?t.concat(i):i,this.finished||(this._dictionaryOffset+=i.length),this._dictionary=n.dictionary,this.clear(),n}finish(){return this.indices.finish(),this.dictionary.finish(),this._dictionaryOffset=0,this._keysToIndices=Object.create(null),super.finish()}clear(){return this.indices.clear(),this.dictionary.clear(),super.clear()}valueToKey(e){return typeof e=="string"?e:`${e}`}};Vu.DictionaryBuilder=lv});var Wf=E(Eu=>{"use strict";Object.defineProperty(Eu,"__esModule",{value:!0});Eu.FixedSizeBinaryBuilder=void 0;var cA=Qe(),dv=class extends cA.FixedWidthBuilder{};Eu.FixedSizeBinaryBuilder=dv});var Zo=E(Os=>{"use strict";Object.defineProperty(Os,"__esModule",{value:!0});Os.float64ToUint16=Os.uint16ToFloat64=void 0;var fv=new Float64Array(1),As=new Uint32Array(fv.buffer);function lA(r){let e=(r&31744)>>10,t=(r&1023)/1024,i=Math.pow(-1,(r&32768)>>15);switch(e){case 31:return i*(t?NaN:1/0);case 0:return i*(t?6103515625e-14*t:0)}return i*Math.pow(2,e-15)*(1+t)}Os.uint16ToFloat64=lA;function dA(r){if(r!==r)return 32256;fv[0]=r;let e=(As[1]&2147483648)>>16&65535,t=As[1]&2146435072,i=0;return t>=1089470464?As[0]>0?t=31744:(t=(t&2080374784)>>16,i=(As[1]&1048575)>>10):t<=1056964608?(i=1048576+(As[1]&1048575),i=1048576+(i<<(t>>20)-998)>>21,t=0):(t=t-1056964608>>10,i=(As[1]&1048575)+512>>10),e|t|i&65535}Os.float64ToUint16=dA});var Hf=E(Rr=>{"use strict";Object.defineProperty(Rr,"__esModule",{value:!0});Rr.Float64Builder=Rr.Float32Builder=Rr.Float16Builder=Rr.FloatBuilder=void 0;var fA=Zo(),hA=Qe(),Xo=class extends hA.FixedWidthBuilder{};Rr.FloatBuilder=Xo;var hv=class extends Xo{setValue(e,t){this._values.set(e,fA.float64ToUint16(t))}};Rr.Float16Builder=hv;var pv=class extends Xo{setValue(e,t){this._values.set(e,t)}};Rr.Float32Builder=pv;var _v=class extends Xo{setValue(e,t){this._values.set(e,t)}};Rr.Float64Builder=_v});var ta=E(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.BN=bt.bignumToBigInt=bt.bignumToString=bt.isArrowBigNumSymbol=void 0;var pA=mt(),Qo=Mt();bt.isArrowBigNumSymbol=Symbol.for("isArrowBigNum");function Br(r,...e){return e.length===0?Object.setPrototypeOf(pA.toArrayBufferView(this.TypedArray,r),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(r,...e),this.constructor.prototype)}Br.prototype[bt.isArrowBigNumSymbol]=!0;Br.prototype.toJSON=function(){return`"${bt.bignumToString(this)}"`};Br.prototype.valueOf=function(){return yv(this)};Br.prototype.toString=function(){return bt.bignumToString(this)};Br.prototype[Symbol.toPrimitive]=function(r="default"){switch(r){case"number":return yv(this);case"string":return bt.bignumToString(this);case"default":return bt.bignumToBigInt(this)}return bt.bignumToString(this)};function Fs(...r){return Br.apply(this,r)}function ks(...r){return Br.apply(this,r)}function ea(...r){return Br.apply(this,r)}Object.setPrototypeOf(Fs.prototype,Object.create(Int32Array.prototype));Object.setPrototypeOf(ks.prototype,Object.create(Uint32Array.prototype));Object.setPrototypeOf(ea.prototype,Object.create(Uint32Array.prototype));Object.assign(Fs.prototype,Br.prototype,{constructor:Fs,signed:!0,TypedArray:Int32Array,BigIntArray:Qo.BigInt64Array});Object.assign(ks.prototype,Br.prototype,{constructor:ks,signed:!1,TypedArray:Uint32Array,BigIntArray:Qo.BigUint64Array});Object.assign(ea.prototype,Br.prototype,{constructor:ea,signed:!0,TypedArray:Uint32Array,BigIntArray:Qo.BigUint64Array});function yv(r){let{buffer:e,byteOffset:t,length:i,signed:n}=r,s=new Int32Array(e,t,i),l=0,y=0,w=s.length,D,k;for(;y<w;)k=s[y++],D=s[y++],n||(D=D>>>0),l+=(k>>>0)+D*Math.pow(y,32);return l}Qo.BigIntAvailable?(bt.bignumToBigInt=r=>r.byteLength===8?new r.BigIntArray(r.buffer,r.byteOffset,1)[0]:Yf(r),bt.bignumToString=r=>r.byteLength===8?`${new r.BigIntArray(r.buffer,r.byteOffset,1)[0]}`:Yf(r)):(bt.bignumToString=Yf,bt.bignumToBigInt=bt.bignumToString);function Yf(r){let e="",t=new Uint32Array(2),i=new Uint16Array(r.buffer,r.byteOffset,r.byteLength/2),n=new Uint32Array((i=new Uint16Array(i).reverse()).buffer),s=-1,l=i.length-1;do{for(t[0]=i[s=0];s<l;)i[s++]=t[1]=t[0]/10,t[0]=(t[0]-t[1]*10<<16)+i[s];i[s]=t[1]=t[0]/10,t[0]=t[0]-t[1]*10,e=`${t[0]}${e}`}while(n[0]||n[1]||n[2]||n[3]);return e||"0"}var Ru=class{static new(e,t){switch(t){case!0:return new Fs(e);case!1:return new ks(e)}switch(e.constructor){case Int8Array:case Int16Array:case Int32Array:case Qo.BigInt64Array:return new Fs(e)}return e.byteLength===16?new ea(e):new ks(e)}static signed(e){return new Fs(e)}static unsigned(e){return new ks(e)}static decimal(e){return new ea(e)}constructor(e,t){return Ru.new(e,t)}};bt.BN=Ru});var $f=E(dt=>{"use strict";Object.defineProperty(dt,"__esModule",{value:!0});dt.Uint64Builder=dt.Uint32Builder=dt.Uint16Builder=dt.Uint8Builder=dt.Int64Builder=dt.Int32Builder=dt.Int16Builder=dt.Int8Builder=dt.IntBuilder=void 0;var _A=ta(),mv=Ni(),yA=Mt(),mA=Qe(),Nr=class extends mA.FixedWidthBuilder{setValue(e,t){this._values.set(e,t)}};dt.IntBuilder=Nr;var bv=class extends Nr{};dt.Int8Builder=bv;var gv=class extends Nr{};dt.Int16Builder=gv;var vv=class extends Nr{};dt.Int32Builder=vv;var wv=class extends Nr{constructor(e){e.nullValues&&(e.nullValues=e.nullValues.map(Nu));super(e);this._values=new mv.WideBufferBuilder(new Int32Array(0),2)}get values64(){return this._values.buffer64}isValid(e){return super.isValid(Nu(e))}};dt.Int64Builder=wv;var jv=class extends Nr{};dt.Uint8Builder=jv;var Bv=class extends Nr{};dt.Uint16Builder=Bv;var Iv=class extends Nr{};dt.Uint32Builder=Iv;var Tv=class extends Nr{constructor(e){e.nullValues&&(e.nullValues=e.nullValues.map(Nu));super(e);this._values=new mv.WideBufferBuilder(new Uint32Array(0),2)}get values64(){return this._values.buffer64}isValid(e){return super.isValid(Nu(e))}};dt.Uint64Builder=Tv;var Nu=(r=>e=>(ArrayBuffer.isView(e)&&(r.buffer=e.buffer,r.byteOffset=e.byteOffset,r.byteLength=e.byteLength,e=_A.bignumToBigInt(r),r.buffer=null),e))({BigIntArray:yA.BigInt64Array})});var Gf=E(nr=>{"use strict";Object.defineProperty(nr,"__esModule",{value:!0});nr.TimeNanosecondBuilder=nr.TimeMicrosecondBuilder=nr.TimeMillisecondBuilder=nr.TimeSecondBuilder=nr.TimeBuilder=void 0;var bA=Qe(),Ms=class extends bA.FixedWidthBuilder{};nr.TimeBuilder=Ms;var Sv=class extends Ms{};nr.TimeSecondBuilder=Sv;var Dv=class extends Ms{};nr.TimeMillisecondBuilder=Dv;var Av=class extends Ms{};nr.TimeMicrosecondBuilder=Av;var Ov=class extends Ms{};nr.TimeNanosecondBuilder=Ov});var Kf=E(sr=>{"use strict";Object.defineProperty(sr,"__esModule",{value:!0});sr.TimestampNanosecondBuilder=sr.TimestampMicrosecondBuilder=sr.TimestampMillisecondBuilder=sr.TimestampSecondBuilder=sr.TimestampBuilder=void 0;var gA=Qe(),Cs=class extends gA.FixedWidthBuilder{};sr.TimestampBuilder=Cs;var Fv=class extends Cs{};sr.TimestampSecondBuilder=Fv;var kv=class extends Cs{};sr.TimestampMillisecondBuilder=kv;var Mv=class extends Cs{};sr.TimestampMicrosecondBuilder=Mv;var Cv=class extends Cs{};sr.TimestampNanosecondBuilder=Cv});var Jf=E(xi=>{"use strict";Object.defineProperty(xi,"__esModule",{value:!0});xi.IntervalYearMonthBuilder=xi.IntervalDayTimeBuilder=xi.IntervalBuilder=void 0;var vA=Qe(),Pu=class extends vA.FixedWidthBuilder{};xi.IntervalBuilder=Pu;var Uv=class extends Pu{};xi.IntervalDayTimeBuilder=Uv;var Vv=class extends Pu{};xi.IntervalYearMonthBuilder=Vv});var xu=E(Lu=>{"use strict";Object.defineProperty(Lu,"__esModule",{value:!0});Lu.BinaryBuilder=void 0;var wA=mt(),jA=Ni(),BA=Qe(),Ev=class extends BA.VariableWidthBuilder{constructor(e){super(e);this._values=new jA.BufferBuilder(new Uint8Array(0))}get byteLength(){let e=this._pendingLength+this.length*4;return this._offsets&&(e+=this._offsets.byteLength),this._values&&(e+=this._values.byteLength),this._nulls&&(e+=this._nulls.byteLength),e}setValue(e,t){return super.setValue(e,wA.toUint8Array(t))}_flushPending(e,t){let i=this._offsets,n=this._values.reserve(t).buffer,s=0,l=0,y=0,w;for([s,w]of e)w===void 0?i.set(s,0):(l=w.length,n.set(w,y),i.set(s,l),y+=l)}};Lu.BinaryBuilder=Ev});var zu=E(qu=>{"use strict";Object.defineProperty(qu,"__esModule",{value:!0});qu.Utf8Builder=void 0;var IA=wn(),TA=xu(),SA=Ni(),DA=Qe(),Zf=class extends DA.VariableWidthBuilder{constructor(e){super(e);this._values=new SA.BufferBuilder(new Uint8Array(0))}get byteLength(){let e=this._pendingLength+this.length*4;return this._offsets&&(e+=this._offsets.byteLength),this._values&&(e+=this._values.byteLength),this._nulls&&(e+=this._nulls.byteLength),e}setValue(e,t){return super.setValue(e,IA.encodeUtf8(t))}_flushPending(e,t){}};qu.Utf8Builder=Zf;Zf.prototype._flushPending=TA.BinaryBuilder.prototype._flushPending});var Xf=E(Wu=>{"use strict";Object.defineProperty(Wu,"__esModule",{value:!0});Wu.Run=void 0;var AA=nt(),Rv=class{get length(){return this._values.length}get(e){return this._values[e]}clear(){return this._values=null,this}bind(e){return e instanceof AA.Vector?e:(this._values=e,this)}};Wu.Run=Rv});var wt=E(Us=>{"use strict";Object.defineProperty(Us,"__esModule",{value:!0});Us.Field=Us.Schema=void 0;var OA=Ve(),or=class{constructor(e=[],t,i){this.fields=e||[],this.metadata=t||new Map,i||(i=Qf(e)),this.dictionaries=i}get[Symbol.toStringTag](){return"Schema"}toString(){return`Schema<{ ${this.fields.map((e,t)=>`${t}: ${e}`).join(", ")} }>`}select(...e){let t=e.reduce((i,n)=>(i[n]=!0)&&i,Object.create(null));return new or(this.fields.filter(i=>t[i.name]),this.metadata)}selectAt(...e){return new or(e.map(t=>this.fields[t]).filter(Boolean),this.metadata)}assign(...e){let t=e[0]instanceof or?e[0]:Array.isArray(e[0])?new or(e[0]):new or(e),i=[...this.fields],n=Hu(Hu(new Map,this.metadata),t.metadata),s=t.fields.filter(y=>{let w=i.findIndex(D=>D.name===y.name);return~w?(i[w]=y.clone({metadata:Hu(Hu(new Map,i[w].metadata),y.metadata)}))&&!1:!0}),l=Qf(s,new Map);return new or([...i,...s],n,new Map([...this.dictionaries,...l]))}};Us.Schema=or;var ui=class{constructor(e,t,i=!1,n){this.name=e,this.type=t,this.nullable=i,this.metadata=n||new Map}static new(...e){let[t,i,n,s]=e;return e[0]&&typeof e[0]=="object"&&({name:t}=e[0],i===void 0&&(i=e[0].type),n===void 0&&(n=e[0].nullable),s===void 0&&(s=e[0].metadata)),new ui(`${t}`,i,n,s)}get typeId(){return this.type.typeId}get[Symbol.toStringTag](){return"Field"}toString(){return`${this.name}: ${this.type}`}clone(...e){let[t,i,n,s]=e;return!e[0]||typeof e[0]!="object"?[t=this.name,i=this.type,n=this.nullable,s=this.metadata]=e:{name:t=this.name,type:i=this.type,nullable:n=this.nullable,metadata:s=this.metadata}=e[0],ui.new(t,i,n,s)}};Us.Field=ui;function Hu(r,e){return new Map([...r||new Map,...e||new Map])}function Qf(r,e=new Map){for(let t=-1,i=r.length;++t<i;){let s=r[t].type;if(OA.DataType.isDictionary(s)){if(!e.has(s.id))e.set(s.id,s.dictionary);else if(e.get(s.id)!==s.dictionary)throw new Error("Cannot create Schema containing two different dictionaries with the same Id")}s.children&&s.children.length>0&&Qf(s.children,e)}return e}or.prototype.fields=null;or.prototype.metadata=null;or.prototype.dictionaries=null;ui.prototype.type=null;ui.prototype.name=null;ui.prototype.nullable=null;ui.prototype.metadata=null});var eh=E(Yu=>{"use strict";Object.defineProperty(Yu,"__esModule",{value:!0});Yu.ListBuilder=void 0;var FA=Xf(),kA=wt(),MA=Ve(),CA=Ni(),UA=Qe(),Nv=class extends UA.VariableWidthBuilder{constructor(e){super(e);this._run=new FA.Run,this._offsets=new CA.OffsetsBufferBuilder}addChild(e,t="0"){if(this.numChildren>0)throw new Error("ListBuilder can only have one child.");return this.children[this.numChildren]=e,this.type=new MA.List(new kA.Field(t,e.type,!0)),this.numChildren-1}clear(){return this._run.clear(),super.clear()}_flushPending(e){let t=this._run,i=this._offsets,n=this._setValue,s=0,l;for([s,l]of e)l===void 0?i.set(s,0):(i.set(s,l.length),n(this,s,t.bind(l)))}};Yu.ListBuilder=Nv});var th=E($u=>{"use strict";Object.defineProperty($u,"__esModule",{value:!0});$u.FixedSizeListBuilder=void 0;var VA=Xf(),EA=wt(),RA=Qe(),NA=Ve(),Pv=class extends RA.Builder{constructor(){super(...arguments);this._run=new VA.Run}setValue(e,t){super.setValue(e,this._run.bind(t))}addChild(e,t="0"){if(this.numChildren>0)throw new Error("FixedSizeListBuilder can only have one child.");let i=this.children.push(e);return this.type=new NA.FixedSizeList(this.type.listSize,new EA.Field(t,e.type,!0)),i}clear(){return this._run.clear(),super.clear()}};$u.FixedSizeListBuilder=Pv});var rh=E(Gu=>{"use strict";Object.defineProperty(Gu,"__esModule",{value:!0});Gu.MapBuilder=void 0;var PA=wt(),LA=Ve(),xA=Qe(),Lv=class extends xA.VariableWidthBuilder{set(e,t){return super.set(e,t)}setValue(e,t){t=t instanceof Map?t:new Map(Object.entries(t));let i=this._pending||(this._pending=new Map),n=i.get(e);n&&(this._pendingLength-=n.size),this._pendingLength+=t.size,i.set(e,t)}addChild(e,t=`${this.numChildren}`){if(this.numChildren>0)throw new Error("ListBuilder can only have one child.");return this.children[this.numChildren]=e,this.type=new LA.Map_(new PA.Field(t,e.type,!0),this.type.keysSorted),this.numChildren-1}_flushPending(e){let t=this._offsets,i=this._setValue;e.forEach((n,s)=>{n===void 0?t.set(s,0):(t.set(s,n.size),i(this,s,n))})}};Gu.MapBuilder=Lv});var ih=E(Ku=>{"use strict";Object.defineProperty(Ku,"__esModule",{value:!0});Ku.StructBuilder=void 0;var qA=wt(),zA=Qe(),WA=Ve(),xv=class extends zA.Builder{addChild(e,t=`${this.numChildren}`){let i=this.children.push(e);return this.type=new WA.Struct([...this.type.children,new qA.Field(t,e.type,!0)]),i}};Ku.StructBuilder=xv});var nh=E(qi=>{"use strict";Object.defineProperty(qi,"__esModule",{value:!0});qi.DenseUnionBuilder=qi.SparseUnionBuilder=qi.UnionBuilder=void 0;var HA=wt(),qv=Ni(),YA=Qe(),$A=Ve(),Ju=class extends YA.Builder{constructor(e){super(e);this._typeIds=new qv.DataBufferBuilder(new Int8Array(0),1),typeof e.valueToChildTypeId=="function"&&(this._valueToChildTypeId=e.valueToChildTypeId)}get typeIdToChildIndex(){return this.type.typeIdToChildIndex}append(e,t){return this.set(this.length,e,t)}set(e,t,i){return i===void 0&&(i=this._valueToChildTypeId(this,t,e)),this.setValid(e,this.isValid(t))&&this.setValue(e,t,i),this}setValue(e,t,i){this._typeIds.set(e,i),super.setValue(e,t)}addChild(e,t=`${this.children.length}`){let i=this.children.push(e),{type:{children:n,mode:s,typeIds:l}}=this,y=[...n,new HA.Field(t,e.type)];return this.type=new $A.Union(s,[...l,i],y),i}_valueToChildTypeId(e,t,i){throw new Error("Cannot map UnionBuilder value to child typeId. Pass the `childTypeId` as the second argument to unionBuilder.append(), or supply a `valueToChildTypeId` function as part of the UnionBuilder constructor options.")}};qi.UnionBuilder=Ju;var zv=class extends Ju{};qi.SparseUnionBuilder=zv;var Wv=class extends Ju{constructor(e){super(e);this._offsets=new qv.DataBufferBuilder(new Int32Array(0))}setValue(e,t,i){let n=this.type.typeIdToChildIndex[i];return this._offsets.set(e,this.getChildAt(n).length),super.setValue(e,t,i)}};qi.DenseUnionBuilder=Wv});var Dt=E(Zu=>{"use strict";Object.defineProperty(Zu,"__esModule",{value:!0});Zu.Visitor=void 0;var GA=jr(),KA=nt(),U=xe(),JA=Ve(),Pe=class{visitMany(e,...t){return e.map((i,n)=>this.visit(i,...t.map(s=>s[n])))}visit(...e){return this.getVisitFn(e[0],!1).apply(this,e)}getVisitFn(e,t=!0){return ZA(this,e,t)}visitNull(e,...t){return null}visitBool(e,...t){return null}visitInt(e,...t){return null}visitFloat(e,...t){return null}visitUtf8(e,...t){return null}visitBinary(e,...t){return null}visitFixedSizeBinary(e,...t){return null}visitDate(e,...t){return null}visitTimestamp(e,...t){return null}visitTime(e,...t){return null}visitDecimal(e,...t){return null}visitList(e,...t){return null}visitStruct(e,...t){return null}visitUnion(e,...t){return null}visitDictionary(e,...t){return null}visitInterval(e,...t){return null}visitFixedSizeList(e,...t){return null}visitMap(e,...t){return null}};Zu.Visitor=Pe;function ZA(r,e,t=!0){let i=null,n=U.Type.NONE;switch(e instanceof GA.Data||e instanceof KA.Vector?n=sh(e.type):e instanceof JA.DataType?n=sh(e):typeof(n=e)!="number"&&(n=U.Type[e]),n){case U.Type.Null:i=r.visitNull;break;case U.Type.Bool:i=r.visitBool;break;case U.Type.Int:i=r.visitInt;break;case U.Type.Int8:i=r.visitInt8||r.visitInt;break;case U.Type.Int16:i=r.visitInt16||r.visitInt;break;case U.Type.Int32:i=r.visitInt32||r.visitInt;break;case U.Type.Int64:i=r.visitInt64||r.visitInt;break;case U.Type.Uint8:i=r.visitUint8||r.visitInt;break;case U.Type.Uint16:i=r.visitUint16||r.visitInt;break;case U.Type.Uint32:i=r.visitUint32||r.visitInt;break;case U.Type.Uint64:i=r.visitUint64||r.visitInt;break;case U.Type.Float:i=r.visitFloat;break;case U.Type.Float16:i=r.visitFloat16||r.visitFloat;break;case U.Type.Float32:i=r.visitFloat32||r.visitFloat;break;case U.Type.Float64:i=r.visitFloat64||r.visitFloat;break;case U.Type.Utf8:i=r.visitUtf8;break;case U.Type.Binary:i=r.visitBinary;break;case U.Type.FixedSizeBinary:i=r.visitFixedSizeBinary;break;case U.Type.Date:i=r.visitDate;break;case U.Type.DateDay:i=r.visitDateDay||r.visitDate;break;case U.Type.DateMillisecond:i=r.visitDateMillisecond||r.visitDate;break;case U.Type.Timestamp:i=r.visitTimestamp;break;case U.Type.TimestampSecond:i=r.visitTimestampSecond||r.visitTimestamp;break;case U.Type.TimestampMillisecond:i=r.visitTimestampMillisecond||r.visitTimestamp;break;case U.Type.TimestampMicrosecond:i=r.visitTimestampMicrosecond||r.visitTimestamp;break;case U.Type.TimestampNanosecond:i=r.visitTimestampNanosecond||r.visitTimestamp;break;case U.Type.Time:i=r.visitTime;break;case U.Type.TimeSecond:i=r.visitTimeSecond||r.visitTime;break;case U.Type.TimeMillisecond:i=r.visitTimeMillisecond||r.visitTime;break;case U.Type.TimeMicrosecond:i=r.visitTimeMicrosecond||r.visitTime;break;case U.Type.TimeNanosecond:i=r.visitTimeNanosecond||r.visitTime;break;case U.Type.Decimal:i=r.visitDecimal;break;case U.Type.List:i=r.visitList;break;case U.Type.Struct:i=r.visitStruct;break;case U.Type.Union:i=r.visitUnion;break;case U.Type.DenseUnion:i=r.visitDenseUnion||r.visitUnion;break;case U.Type.SparseUnion:i=r.visitSparseUnion||r.visitUnion;break;case U.Type.Dictionary:i=r.visitDictionary;break;case U.Type.Interval:i=r.visitInterval;break;case U.Type.IntervalDayTime:i=r.visitIntervalDayTime||r.visitInterval;break;case U.Type.IntervalYearMonth:i=r.visitIntervalYearMonth||r.visitInterval;break;case U.Type.FixedSizeList:i=r.visitFixedSizeList;break;case U.Type.Map:i=r.visitMap;break}if(typeof i=="function")return i;if(!t)return()=>null;throw new Error(`Unrecognized type '${U.Type[n]}'`)}function sh(r){switch(r.typeId){case U.Type.Null:return U.Type.Null;case U.Type.Int:{let{bitWidth:e,isSigned:t}=r;switch(e){case 8:return t?U.Type.Int8:U.Type.Uint8;case 16:return t?U.Type.Int16:U.Type.Uint16;case 32:return t?U.Type.Int32:U.Type.Uint32;case 64:return t?U.Type.Int64:U.Type.Uint64}return U.Type.Int}case U.Type.Float:switch(r.precision){case U.Precision.HALF:return U.Type.Float16;case U.Precision.SINGLE:return U.Type.Float32;case U.Precision.DOUBLE:return U.Type.Float64}return U.Type.Float;case U.Type.Binary:return U.Type.Binary;case U.Type.Utf8:return U.Type.Utf8;case U.Type.Bool:return U.Type.Bool;case U.Type.Decimal:return U.Type.Decimal;case U.Type.Time:switch(r.unit){case U.TimeUnit.SECOND:return U.Type.TimeSecond;case U.TimeUnit.MILLISECOND:return U.Type.TimeMillisecond;case U.TimeUnit.MICROSECOND:return U.Type.TimeMicrosecond;case U.TimeUnit.NANOSECOND:return U.Type.TimeNanosecond}return U.Type.Time;case U.Type.Timestamp:switch(r.unit){case U.TimeUnit.SECOND:return U.Type.TimestampSecond;case U.TimeUnit.MILLISECOND:return U.Type.TimestampMillisecond;case U.TimeUnit.MICROSECOND:return U.Type.TimestampMicrosecond;case U.TimeUnit.NANOSECOND:return U.Type.TimestampNanosecond}return U.Type.Timestamp;case U.Type.Date:switch(r.unit){case U.DateUnit.DAY:return U.Type.DateDay;case U.DateUnit.MILLISECOND:return U.Type.DateMillisecond}return U.Type.Date;case U.Type.Interval:switch(r.unit){case U.IntervalUnit.DAY_TIME:return U.Type.IntervalDayTime;case U.IntervalUnit.YEAR_MONTH:return U.Type.IntervalYearMonth}return U.Type.Interval;case U.Type.Map:return U.Type.Map;case U.Type.List:return U.Type.List;case U.Type.Struct:return U.Type.Struct;case U.Type.Union:switch(r.mode){case U.UnionMode.Dense:return U.Type.DenseUnion;case U.UnionMode.Sparse:return U.Type.SparseUnion}return U.Type.Union;case U.Type.FixedSizeBinary:return U.Type.FixedSizeBinary;case U.Type.FixedSizeList:return U.Type.FixedSizeList;case U.Type.Dictionary:return U.Type.Dictionary}throw new Error(`Unrecognized type '${U.Type[r.typeId]}'`)}Pe.prototype.visitInt8=null;Pe.prototype.visitInt16=null;Pe.prototype.visitInt32=null;Pe.prototype.visitInt64=null;Pe.prototype.visitUint8=null;Pe.prototype.visitUint16=null;Pe.prototype.visitUint32=null;Pe.prototype.visitUint64=null;Pe.prototype.visitFloat16=null;Pe.prototype.visitFloat32=null;Pe.prototype.visitFloat64=null;Pe.prototype.visitDateDay=null;Pe.prototype.visitDateMillisecond=null;Pe.prototype.visitTimestampSecond=null;Pe.prototype.visitTimestampMillisecond=null;Pe.prototype.visitTimestampMicrosecond=null;Pe.prototype.visitTimestampNanosecond=null;Pe.prototype.visitTimeSecond=null;Pe.prototype.visitTimeMillisecond=null;Pe.prototype.visitTimeMicrosecond=null;Pe.prototype.visitTimeNanosecond=null;Pe.prototype.visitDenseUnion=null;Pe.prototype.visitSparseUnion=null;Pe.prototype.visitIntervalDayTime=null;Pe.prototype.visitIntervalYearMonth=null});var uh=E(Vs=>{"use strict";Object.defineProperty(Vs,"__esModule",{value:!0});Vs.instance=Vs.SetVisitor=void 0;var XA=nt(),QA=Dt(),eO=wn(),tO=Zo(),rO=mt(),ar=xe(),me=class extends QA.Visitor{};Vs.SetVisitor=me;var iO=(r,e,t)=>{r[e]=t/864e5|0},oh=(r,e,t)=>{r[e]=t%4294967296|0,r[e+1]=t/4294967296|0},nO=(r,e,t)=>{r[e]=t*1e3%4294967296|0,r[e+1]=t*1e3/4294967296|0},sO=(r,e,t)=>{r[e]=t*1e6%4294967296|0,r[e+1]=t*1e6/4294967296|0},Hv=(r,e,t,i)=>{let{[t]:n,[t+1]:s}=e;n!=null&&s!=null&&r.set(i.subarray(0,s-n),n)},oO=({offset:r,values:e},t,i)=>{let n=r+t;i?e[n>>3]|=1<<n%8:e[n>>3]&=~(1<<n%8)},Yv=({values:r},e,t)=>{iO(r,e,t.valueOf())},$v=({values:r},e,t)=>{oh(r,e*2,t.valueOf())},Pr=({stride:r,values:e},t,i)=>{e[r*t]=i},Gv=({stride:r,values:e},t,i)=>{e[r*t]=tO.float64ToUint16(i)},ah=(r,e,t)=>{switch(typeof t){case"bigint":r.values64[e]=t;break;case"number":r.values[e*r.stride]=t;break;default:{let i=t,{stride:n,ArrayType:s}=r,l=rO.toArrayBufferView(s,i);r.values.set(l.subarray(0,n),n*e)}}},aO=({stride:r,values:e},t,i)=>{e.set(i.subarray(0,r),r*t)},uO=({values:r,valueOffsets:e},t,i)=>Hv(r,e,t,i),cO=({values:r,valueOffsets:e},t,i)=>{Hv(r,e,t,eO.encodeUtf8(i))},lO=(r,e,t)=>{r.type.bitWidth<64?Pr(r,e,t):ah(r,e,t)},dO=(r,e,t)=>{r.type.precision!==ar.Precision.HALF?Pr(r,e,t):Gv(r,e,t)},fO=(r,e,t)=>{r.type.unit===ar.DateUnit.DAY?Yv(r,e,t):$v(r,e,t)},Kv=({values:r},e,t)=>oh(r,e*2,t/1e3),Jv=({values:r},e,t)=>oh(r,e*2,t),Zv=({values:r},e,t)=>nO(r,e*2,t),Xv=({values:r},e,t)=>sO(r,e*2,t),hO=(r,e,t)=>{switch(r.type.unit){case ar.TimeUnit.SECOND:return Kv(r,e,t);case ar.TimeUnit.MILLISECOND:return Jv(r,e,t);case ar.TimeUnit.MICROSECOND:return Zv(r,e,t);case ar.TimeUnit.NANOSECOND:return Xv(r,e,t)}},Qv=({values:r,stride:e},t,i)=>{r[e*t]=i},e0=({values:r,stride:e},t,i)=>{r[e*t]=i},t0=({values:r},e,t)=>{r.set(t.subarray(0,2),2*e)},r0=({values:r},e,t)=>{r.set(t.subarray(0,2),2*e)},pO=(r,e,t)=>{switch(r.type.unit){case ar.TimeUnit.SECOND:return Qv(r,e,t);case ar.TimeUnit.MILLISECOND:return e0(r,e,t);case ar.TimeUnit.MICROSECOND:return t0(r,e,t);case ar.TimeUnit.NANOSECOND:return r0(r,e,t)}},_O=({values:r},e,t)=>{r.set(t.subarray(0,4),4*e)},yO=(r,e,t)=>{let i=r.getChildAt(0),n=r.valueOffsets;for(let s=-1,l=n[e],y=n[e+1];l<y;)i.set(l++,t.get(++s))},mO=(r,e,t)=>{let i=r.getChildAt(0),n=r.valueOffsets,s=t instanceof Map?[...t]:Object.entries(t);for(let l=-1,y=n[e],w=n[e+1];y<w;)i.set(y++,s[++l])},bO=(r,e)=>(t,i,n)=>t==null?void 0:t.set(r,e[n]),gO=(r,e)=>(t,i,n)=>t==null?void 0:t.set(r,e.get(n)),vO=(r,e)=>(t,i,n)=>t==null?void 0:t.set(r,e.get(i.name)),wO=(r,e)=>(t,i,n)=>t==null?void 0:t.set(r,e[i.name]),jO=(r,e,t)=>{let i=t instanceof Map?vO(e,t):t instanceof XA.Vector?gO(e,t):Array.isArray(t)?bO(e,t):wO(e,t);r.type.children.forEach((n,s)=>i(r.getChildAt(s),n,s))},BO=(r,e,t)=>{r.type.mode===ar.UnionMode.Dense?i0(r,e,t):n0(r,e,t)},i0=(r,e,t)=>{let i=r.typeIdToChildIndex[r.typeIds[e]],n=r.getChildAt(i);n&&n.set(r.valueOffsets[e],t)},n0=(r,e,t)=>{let i=r.typeIdToChildIndex[r.typeIds[e]],n=r.getChildAt(i);n&&n.set(e,t)},IO=(r,e,t)=>{let i=r.getKey(e);i!==null&&r.setValue(i,t)},TO=(r,e,t)=>{r.type.unit===ar.IntervalUnit.DAY_TIME?s0(r,e,t):o0(r,e,t)},s0=({values:r},e,t)=>{r.set(t.subarray(0,2),2*e)},o0=({values:r},e,t)=>{r[e]=t[0]*12+t[1]%12},SO=(r,e,t)=>{let i=r.getChildAt(0),{stride:n}=r;for(let s=-1,l=e*n;++s<n;)i.set(l+s,t.get(s))};me.prototype.visitBool=oO;me.prototype.visitInt=lO;me.prototype.visitInt8=Pr;me.prototype.visitInt16=Pr;me.prototype.visitInt32=Pr;me.prototype.visitInt64=ah;me.prototype.visitUint8=Pr;me.prototype.visitUint16=Pr;me.prototype.visitUint32=Pr;me.prototype.visitUint64=ah;me.prototype.visitFloat=dO;me.prototype.visitFloat16=Gv;me.prototype.visitFloat32=Pr;me.prototype.visitFloat64=Pr;me.prototype.visitUtf8=cO;me.prototype.visitBinary=uO;me.prototype.visitFixedSizeBinary=aO;me.prototype.visitDate=fO;me.prototype.visitDateDay=Yv;me.prototype.visitDateMillisecond=$v;me.prototype.visitTimestamp=hO;me.prototype.visitTimestampSecond=Kv;me.prototype.visitTimestampMillisecond=Jv;me.prototype.visitTimestampMicrosecond=Zv;me.prototype.visitTimestampNanosecond=Xv;me.prototype.visitTime=pO;me.prototype.visitTimeSecond=Qv;me.prototype.visitTimeMillisecond=e0;me.prototype.visitTimeMicrosecond=t0;me.prototype.visitTimeNanosecond=r0;me.prototype.visitDecimal=_O;me.prototype.visitList=yO;me.prototype.visitStruct=jO;me.prototype.visitUnion=BO;me.prototype.visitDenseUnion=i0;me.prototype.visitSparseUnion=n0;me.prototype.visitDictionary=IO;me.prototype.visitInterval=TO;me.prototype.visitIntervalDayTime=s0;me.prototype.visitIntervalYearMonth=o0;me.prototype.visitFixedSizeList=SO;me.prototype.visitMap=mO;Vs.instance=new me});var a0=E(Es=>{"use strict";Object.defineProperty(Es,"__esModule",{value:!0});Es.instance=Es.GetBuilderCtor=void 0;var DO=Dt(),AO=xu(),OO=Nf(),ch=Lf(),FO=xf(),kO=zf(),MO=Wf(),CO=th(),Xu=Hf(),lh=Jf(),ci=$f(),UO=eh(),VO=rh(),EO=Pf(),RO=ih(),ra=Kf(),ia=Gf(),dh=nh(),NO=zu(),fh=class extends DO.Visitor{visitNull(){return EO.NullBuilder}visitBool(){return OO.BoolBuilder}visitInt(){return ci.IntBuilder}visitInt8(){return ci.Int8Builder}visitInt16(){return ci.Int16Builder}visitInt32(){return ci.Int32Builder}visitInt64(){return ci.Int64Builder}visitUint8(){return ci.Uint8Builder}visitUint16(){return ci.Uint16Builder}visitUint32(){return ci.Uint32Builder}visitUint64(){return ci.Uint64Builder}visitFloat(){return Xu.FloatBuilder}visitFloat16(){return Xu.Float16Builder}visitFloat32(){return Xu.Float32Builder}visitFloat64(){return Xu.Float64Builder}visitUtf8(){return NO.Utf8Builder}visitBinary(){return AO.BinaryBuilder}visitFixedSizeBinary(){return MO.FixedSizeBinaryBuilder}visitDate(){return ch.DateBuilder}visitDateDay(){return ch.DateDayBuilder}visitDateMillisecond(){return ch.DateMillisecondBuilder}visitTimestamp(){return ra.TimestampBuilder}visitTimestampSecond(){return ra.TimestampSecondBuilder}visitTimestampMillisecond(){return ra.TimestampMillisecondBuilder}visitTimestampMicrosecond(){return ra.TimestampMicrosecondBuilder}visitTimestampNanosecond(){return ra.TimestampNanosecondBuilder}visitTime(){return ia.TimeBuilder}visitTimeSecond(){return ia.TimeSecondBuilder}visitTimeMillisecond(){return ia.TimeMillisecondBuilder}visitTimeMicrosecond(){return ia.TimeMicrosecondBuilder}visitTimeNanosecond(){return ia.TimeNanosecondBuilder}visitDecimal(){return FO.DecimalBuilder}visitList(){return UO.ListBuilder}visitStruct(){return RO.StructBuilder}visitUnion(){return dh.UnionBuilder}visitDenseUnion(){return dh.DenseUnionBuilder}visitSparseUnion(){return dh.SparseUnionBuilder}visitDictionary(){return kO.DictionaryBuilder}visitInterval(){return lh.IntervalBuilder}visitIntervalDayTime(){return lh.IntervalDayTimeBuilder}visitIntervalYearMonth(){return lh.IntervalYearMonthBuilder}visitFixedSizeList(){return CO.FixedSizeListBuilder}visitMap(){return VO.MapBuilder}};Es.GetBuilderCtor=fh;Es.instance=new fh});var ec=E(q=>{"use strict";Object.defineProperty(q,"__esModule",{value:!0});q.DenseUnionBuilder=q.SparseUnionBuilder=q.UnionBuilder=q.StructBuilder=q.MapBuilder=q.FixedSizeListBuilder=q.ListBuilder=q.BinaryBuilder=q.Utf8Builder=q.IntervalYearMonthBuilder=q.IntervalDayTimeBuilder=q.IntervalBuilder=q.TimestampNanosecondBuilder=q.TimestampMicrosecondBuilder=q.TimestampMillisecondBuilder=q.TimestampSecondBuilder=q.TimestampBuilder=q.TimeNanosecondBuilder=q.TimeMicrosecondBuilder=q.TimeMillisecondBuilder=q.TimeSecondBuilder=q.TimeBuilder=q.Uint64Builder=q.Uint32Builder=q.Uint16Builder=q.Uint8Builder=q.Int64Builder=q.Int32Builder=q.Int16Builder=q.Int8Builder=q.IntBuilder=q.Float64Builder=q.Float32Builder=q.Float16Builder=q.FloatBuilder=q.FixedSizeBinaryBuilder=q.DictionaryBuilder=q.DecimalBuilder=q.DateMillisecondBuilder=q.DateDayBuilder=q.DateBuilder=q.NullBuilder=q.BoolBuilder=q.Builder=void 0;var PO=Qe();Object.defineProperty(q,"Builder",{enumerable:!0,get:function(){return PO.Builder}});var LO=Nf();Object.defineProperty(q,"BoolBuilder",{enumerable:!0,get:function(){return LO.BoolBuilder}});var xO=Pf();Object.defineProperty(q,"NullBuilder",{enumerable:!0,get:function(){return xO.NullBuilder}});var hh=Lf();Object.defineProperty(q,"DateBuilder",{enumerable:!0,get:function(){return hh.DateBuilder}});Object.defineProperty(q,"DateDayBuilder",{enumerable:!0,get:function(){return hh.DateDayBuilder}});Object.defineProperty(q,"DateMillisecondBuilder",{enumerable:!0,get:function(){return hh.DateMillisecondBuilder}});var qO=xf();Object.defineProperty(q,"DecimalBuilder",{enumerable:!0,get:function(){return qO.DecimalBuilder}});var zO=zf();Object.defineProperty(q,"DictionaryBuilder",{enumerable:!0,get:function(){return zO.DictionaryBuilder}});var WO=Wf();Object.defineProperty(q,"FixedSizeBinaryBuilder",{enumerable:!0,get:function(){return WO.FixedSizeBinaryBuilder}});var Qu=Hf();Object.defineProperty(q,"FloatBuilder",{enumerable:!0,get:function(){return Qu.FloatBuilder}});Object.defineProperty(q,"Float16Builder",{enumerable:!0,get:function(){return Qu.Float16Builder}});Object.defineProperty(q,"Float32Builder",{enumerable:!0,get:function(){return Qu.Float32Builder}});Object.defineProperty(q,"Float64Builder",{enumerable:!0,get:function(){return Qu.Float64Builder}});var li=$f();Object.defineProperty(q,"IntBuilder",{enumerable:!0,get:function(){return li.IntBuilder}});Object.defineProperty(q,"Int8Builder",{enumerable:!0,get:function(){return li.Int8Builder}});Object.defineProperty(q,"Int16Builder",{enumerable:!0,get:function(){return li.Int16Builder}});Object.defineProperty(q,"Int32Builder",{enumerable:!0,get:function(){return li.Int32Builder}});Object.defineProperty(q,"Int64Builder",{enumerable:!0,get:function(){return li.Int64Builder}});Object.defineProperty(q,"Uint8Builder",{enumerable:!0,get:function(){return li.Uint8Builder}});Object.defineProperty(q,"Uint16Builder",{enumerable:!0,get:function(){return li.Uint16Builder}});Object.defineProperty(q,"Uint32Builder",{enumerable:!0,get:function(){return li.Uint32Builder}});Object.defineProperty(q,"Uint64Builder",{enumerable:!0,get:function(){return li.Uint64Builder}});var na=Gf();Object.defineProperty(q,"TimeBuilder",{enumerable:!0,get:function(){return na.TimeBuilder}});Object.defineProperty(q,"TimeSecondBuilder",{enumerable:!0,get:function(){return na.TimeSecondBuilder}});Object.defineProperty(q,"TimeMillisecondBuilder",{enumerable:!0,get:function(){return na.TimeMillisecondBuilder}});Object.defineProperty(q,"TimeMicrosecondBuilder",{enumerable:!0,get:function(){return na.TimeMicrosecondBuilder}});Object.defineProperty(q,"TimeNanosecondBuilder",{enumerable:!0,get:function(){return na.TimeNanosecondBuilder}});var sa=Kf();Object.defineProperty(q,"TimestampBuilder",{enumerable:!0,get:function(){return sa.TimestampBuilder}});Object.defineProperty(q,"TimestampSecondBuilder",{enumerable:!0,get:function(){return sa.TimestampSecondBuilder}});Object.defineProperty(q,"TimestampMillisecondBuilder",{enumerable:!0,get:function(){return sa.TimestampMillisecondBuilder}});Object.defineProperty(q,"TimestampMicrosecondBuilder",{enumerable:!0,get:function(){return sa.TimestampMicrosecondBuilder}});Object.defineProperty(q,"TimestampNanosecondBuilder",{enumerable:!0,get:function(){return sa.TimestampNanosecondBuilder}});var ph=Jf();Object.defineProperty(q,"IntervalBuilder",{enumerable:!0,get:function(){return ph.IntervalBuilder}});Object.defineProperty(q,"IntervalDayTimeBuilder",{enumerable:!0,get:function(){return ph.IntervalDayTimeBuilder}});Object.defineProperty(q,"IntervalYearMonthBuilder",{enumerable:!0,get:function(){return ph.IntervalYearMonthBuilder}});var HO=zu();Object.defineProperty(q,"Utf8Builder",{enumerable:!0,get:function(){return HO.Utf8Builder}});var YO=xu();Object.defineProperty(q,"BinaryBuilder",{enumerable:!0,get:function(){return YO.BinaryBuilder}});var $O=eh();Object.defineProperty(q,"ListBuilder",{enumerable:!0,get:function(){return $O.ListBuilder}});var GO=th();Object.defineProperty(q,"FixedSizeListBuilder",{enumerable:!0,get:function(){return GO.FixedSizeListBuilder}});var KO=rh();Object.defineProperty(q,"MapBuilder",{enumerable:!0,get:function(){return KO.MapBuilder}});var JO=ih();Object.defineProperty(q,"StructBuilder",{enumerable:!0,get:function(){return JO.StructBuilder}});var _h=nh();Object.defineProperty(q,"UnionBuilder",{enumerable:!0,get:function(){return _h.UnionBuilder}});Object.defineProperty(q,"SparseUnionBuilder",{enumerable:!0,get:function(){return _h.SparseUnionBuilder}});Object.defineProperty(q,"DenseUnionBuilder",{enumerable:!0,get:function(){return _h.DenseUnionBuilder}});var yh=xe(),ZO=zu(),XO=Qe(),u0=uh(),c0=a0();XO.Builder.new=l0;function l0(r){let e=r.type,t=new(c0.instance.getVisitFn(e)())(r);if(e.children&&e.children.length>0){let i=r.children||[],n={nullValues:r.nullValues},s=Array.isArray(i)?(l,y)=>i[y]||n:({name:l})=>i[l]||n;e.children.forEach((l,y)=>{let{type:w}=l,D=s(l,y);t.children.push(l0(Object.assign(Object.assign({},D),{type:w})))})}return t}Object.keys(yh.Type).map(r=>yh.Type[r]).filter(r=>typeof r=="number"&&r!==yh.Type.NONE).forEach(r=>{let e=c0.instance.visit(r);e.prototype._setValue=u0.instance.getVisitFn(r)});ZO.Utf8Builder.prototype._setValue=u0.instance.visitBinary});var d0=E(Rs=>{"use strict";Object.defineProperty(Rs,"__esModule",{value:!0});Rs.Block=Rs.Footer=void 0;var QO=ni(),tc=Vi(),ur=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsFooter(e,t){return(t||new ur).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFooter(e,t){return e.setPosition(e.position()+QO.flatbuffers.SIZE_PREFIX_LENGTH),(t||new ur).__init(e.readInt32(e.position())+e.position(),e)}version(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):tc.MetadataVersion.V1}schema(e){let t=this.bb.__offset(this.bb_pos,6);return t?(e||new tc.Schema).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}dictionaries(e,t){let i=this.bb.__offset(this.bb_pos,8);return i?(t||new rc).__init(this.bb.__vector(this.bb_pos+i)+e*24,this.bb):null}dictionariesLength(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}recordBatches(e,t){let i=this.bb.__offset(this.bb_pos,10);return i?(t||new rc).__init(this.bb.__vector(this.bb_pos+i)+e*24,this.bb):null}recordBatchesLength(){let e=this.bb.__offset(this.bb_pos,10);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,t){let i=this.bb.__offset(this.bb_pos,12);return i?(t||new tc.KeyValue).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+e*4),this.bb):null}customMetadataLength(){let e=this.bb.__offset(this.bb_pos,12);return e?this.bb.__vector_len(this.bb_pos+e):0}static startFooter(e){e.startObject(5)}static addVersion(e,t){e.addFieldInt16(0,t,tc.MetadataVersion.V1)}static addSchema(e,t){e.addFieldOffset(1,t,0)}static addDictionaries(e,t){e.addFieldOffset(2,t,0)}static startDictionariesVector(e,t){e.startVector(24,t,8)}static addRecordBatches(e,t){e.addFieldOffset(3,t,0)}static startRecordBatchesVector(e,t){e.startVector(24,t,8)}static addCustomMetadata(e,t){e.addFieldOffset(4,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let i=t.length-1;i>=0;i--)e.addOffset(t[i]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static endFooter(e){return e.endObject()}static finishFooterBuffer(e,t){e.finish(t)}static finishSizePrefixedFooterBuffer(e,t){e.finish(t,void 0,!0)}static createFooter(e,t,i,n,s,l){return ur.startFooter(e),ur.addVersion(e,t),ur.addSchema(e,i),ur.addDictionaries(e,n),ur.addRecordBatches(e,s),ur.addCustomMetadata(e,l),ur.endFooter(e)}};Rs.Footer=ur;var rc=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}offset(){return this.bb.readInt64(this.bb_pos)}metaDataLength(){return this.bb.readInt32(this.bb_pos+8)}bodyLength(){return this.bb.readInt64(this.bb_pos+16)}static createBlock(e,t,i,n){return e.prep(8,24),e.writeInt64(n),e.pad(4),e.writeInt32(i),e.writeInt64(t),e.offset()}};Rs.Block=rc});var gh=E(Ns=>{"use strict";Object.defineProperty(Ns,"__esModule",{value:!0});Ns.FileBlock=Ns.Footer=void 0;var Ir=d0(),mh=ni(),f0=mh.flatbuffers.Long,eF=mh.flatbuffers.Builder,tF=mh.flatbuffers.ByteBuffer,h0=wt(),p0=xe(),rF=mt(),bh=class{constructor(e,t=p0.MetadataVersion.V4,i,n){this.schema=e,this.version=t,i&&(this._recordBatches=i),n&&(this._dictionaryBatches=n)}static decode(e){e=new tF(rF.toUint8Array(e));let t=Ir.Footer.getRootAsFooter(e),i=h0.Schema.decode(t.schema());return new _0(i,t)}static encode(e){let t=new eF,i=h0.Schema.encode(t,e.schema);Ir.Footer.startRecordBatchesVector(t,e.numRecordBatches),[...e.recordBatches()].slice().reverse().forEach(l=>zi.encode(t,l));let n=t.endVector();Ir.Footer.startDictionariesVector(t,e.numDictionaries),[...e.dictionaryBatches()].slice().reverse().forEach(l=>zi.encode(t,l));let s=t.endVector();return Ir.Footer.startFooter(t),Ir.Footer.addSchema(t,i),Ir.Footer.addVersion(t,p0.MetadataVersion.V4),Ir.Footer.addRecordBatches(t,n),Ir.Footer.addDictionaries(t,s),Ir.Footer.finishFooterBuffer(t,Ir.Footer.endFooter(t)),t.asUint8Array()}get numRecordBatches(){return this._recordBatches.length}get numDictionaries(){return this._dictionaryBatches.length}*recordBatches(){for(let e,t=-1,i=this.numRecordBatches;++t<i;)(e=this.getRecordBatch(t))&&(yield e)}*dictionaryBatches(){for(let e,t=-1,i=this.numDictionaries;++t<i;)(e=this.getDictionaryBatch(t))&&(yield e)}getRecordBatch(e){return e>=0&&e<this.numRecordBatches&&this._recordBatches[e]||null}getDictionaryBatch(e){return e>=0&&e<this.numDictionaries&&this._dictionaryBatches[e]||null}};Ns.Footer=bh;var _0=class extends bh{constructor(e,t){super(e,t.version());this._footer=t}get numRecordBatches(){return this._footer.recordBatchesLength()}get numDictionaries(){return this._footer.dictionariesLength()}getRecordBatch(e){if(e>=0&&e<this.numRecordBatches){let t=this._footer.recordBatches(e);if(t)return zi.decode(t)}return null}getDictionaryBatch(e){if(e>=0&&e<this.numDictionaries){let t=this._footer.dictionaries(e);if(t)return zi.decode(t)}return null}},zi=class{constructor(e,t,i){this.metaDataLength=e,this.offset=typeof i=="number"?i:i.low,this.bodyLength=typeof t=="number"?t:t.low}static decode(e){return new zi(e.metaDataLength(),e.bodyLength(),e.offset())}static encode(e,t){let{metaDataLength:i}=t,n=new f0(t.offset,0),s=new f0(t.bodyLength,0);return Ir.Block.createBlock(e,n,i,s)}};Ns.FileBlock=zi});var Gi=E($i=>{"use strict";Object.defineProperty($i,"__esModule",{value:!0});$i.AsyncByteStream=$i.ByteStream=$i.AsyncByteQueue=void 0;var Wi=kt(),Hi=Ko(),y0=wn(),oa=vs(),vh=mt(),Ps=Mt(),wh=class extends oa.AsyncQueue{write(e){if((e=vh.toUint8Array(e)).byteLength>0)return super.write(e)}toString(e=!1){return e?y0.decodeUtf8(this.toUint8Array(!0)):this.toUint8Array(!1).then(y0.decodeUtf8)}toUint8Array(e=!1){return e?vh.joinUint8Arrays(this._values)[0]:(()=>Wi.__awaiter(this,void 0,void 0,function*(){var t,i;let n=[],s=0;try{for(var l=Wi.__asyncValues(this),y;y=yield l.next(),!y.done;){let w=y.value;n.push(w),s+=w.byteLength}}catch(w){t={error:w}}finally{try{y&&!y.done&&(i=l.return)&&(yield i.call(l))}finally{if(t)throw t.error}}return vh.joinUint8Arrays(n,s)[0]}))()}};$i.AsyncByteQueue=wh;var m0=class{constructor(e){e&&(this.source=new b0(Hi.default.fromIterable(e)))}[Symbol.iterator](){return this}next(e){return this.source.next(e)}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}peek(e){return this.source.peek(e)}read(e){return this.source.read(e)}};$i.ByteStream=m0;var ic=class{constructor(e){e instanceof ic?this.source=e.source:e instanceof wh?this.source=new Yi(Hi.default.fromAsyncIterable(e)):Ps.isReadableNodeStream(e)?this.source=new Yi(Hi.default.fromNodeStream(e)):Ps.isReadableDOMStream(e)?this.source=new Yi(Hi.default.fromDOMStream(e)):Ps.isFetchResponse(e)?this.source=new Yi(Hi.default.fromDOMStream(e.body)):Ps.isIterable(e)?this.source=new Yi(Hi.default.fromIterable(e)):Ps.isPromise(e)?this.source=new Yi(Hi.default.fromAsyncIterable(e)):Ps.isAsyncIterable(e)&&(this.source=new Yi(Hi.default.fromAsyncIterable(e)))}[Symbol.asyncIterator](){return this}next(e){return this.source.next(e)}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}get closed(){return this.source.closed}cancel(e){return this.source.cancel(e)}peek(e){return this.source.peek(e)}read(e){return this.source.read(e)}};$i.AsyncByteStream=ic;var b0=class{constructor(e){this.source=e}cancel(e){this.return(e)}peek(e){return this.next(e,"peek").value}read(e){return this.next(e,"read").value}next(e,t="read"){return this.source.next({cmd:t,size:e})}throw(e){return Object.create(this.source.throw&&this.source.throw(e)||oa.ITERATOR_DONE)}return(e){return Object.create(this.source.return&&this.source.return(e)||oa.ITERATOR_DONE)}},Yi=class{constructor(e){this.source=e,this._closedPromise=new Promise(t=>this._closedPromiseResolve=t)}cancel(e){return Wi.__awaiter(this,void 0,void 0,function*(){yield this.return(e)})}get closed(){return this._closedPromise}read(e){return Wi.__awaiter(this,void 0,void 0,function*(){return(yield this.next(e,"read")).value})}peek(e){return Wi.__awaiter(this,void 0,void 0,function*(){return(yield this.next(e,"peek")).value})}next(e,t="read"){return Wi.__awaiter(this,void 0,void 0,function*(){return yield this.source.next({cmd:t,size:e})})}throw(e){return Wi.__awaiter(this,void 0,void 0,function*(){let t=this.source.throw&&(yield this.source.throw(e))||oa.ITERATOR_DONE;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(t)})}return(e){return Wi.__awaiter(this,void 0,void 0,function*(){let t=this.source.return&&(yield this.source.return(e))||oa.ITERATOR_DONE;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(t)})}}});var jh=E(Ls=>{"use strict";Object.defineProperty(Ls,"__esModule",{value:!0});Ls.AsyncRandomAccessFile=Ls.RandomAccessFile=void 0;var Ki=kt(),g0=Gi(),iF=mt(),v0=class extends g0.ByteStream{constructor(e,t){super();this.position=0,this.buffer=iF.toUint8Array(e),this.size=typeof t=="undefined"?this.buffer.byteLength:t}readInt32(e){let{buffer:t,byteOffset:i}=this.readAt(e,4);return new DataView(t,i).getInt32(0,!0)}seek(e){return this.position=Math.min(e,this.size),e<this.size}read(e){let{buffer:t,size:i,position:n}=this;return t&&n<i?(typeof e!="number"&&(e=1/0),this.position=Math.min(i,n+Math.min(i-n,e)),t.subarray(n,this.position)):null}readAt(e,t){let i=this.buffer,n=Math.min(this.size,e+t);return i?i.subarray(e,n):new Uint8Array(t)}close(){this.buffer&&(this.buffer=null)}throw(e){return this.close(),{done:!0,value:e}}return(e){return this.close(),{done:!0,value:e}}};Ls.RandomAccessFile=v0;var w0=class extends g0.AsyncByteStream{constructor(e,t){super();this.position=0,this._handle=e,typeof t=="number"?this.size=t:this._pending=(()=>Ki.__awaiter(this,void 0,void 0,function*(){this.size=(yield e.stat()).size,delete this._pending}))()}readInt32(e){return Ki.__awaiter(this,void 0,void 0,function*(){let{buffer:t,byteOffset:i}=yield this.readAt(e,4);return new DataView(t,i).getInt32(0,!0)})}seek(e){return Ki.__awaiter(this,void 0,void 0,function*(){return this._pending&&(yield this._pending),this.position=Math.min(e,this.size),e<this.size})}read(e){return Ki.__awaiter(this,void 0,void 0,function*(){this._pending&&(yield this._pending);let{_handle:t,size:i,position:n}=this;if(t&&n<i){typeof e!="number"&&(e=1/0);let s=n,l=0,y=0,w=Math.min(i,s+Math.min(i-s,e)),D=new Uint8Array(Math.max(0,(this.position=w)-s));for(;(s+=y)<w&&(l+=y)<D.byteLength;)({bytesRead:y}=yield t.read(D,l,D.byteLength-l,s));return D}return null})}readAt(e,t){return Ki.__awaiter(this,void 0,void 0,function*(){this._pending&&(yield this._pending);let{_handle:i,size:n}=this;if(i&&e+t<n){let s=Math.min(n,e+t),l=new Uint8Array(s-e);return(yield i.read(l,0,t,e)).buffer}return new Uint8Array(t)})}close(){return Ki.__awaiter(this,void 0,void 0,function*(){let e=this._handle;this._handle=null,e&&(yield e.close())})}throw(e){return Ki.__awaiter(this,void 0,void 0,function*(){return yield this.close(),{done:!0,value:e}})}return(e){return Ki.__awaiter(this,void 0,void 0,function*(){return yield this.close(),{done:!0,value:e}})}};Ls.AsyncRandomAccessFile=w0});var Ih=E(Lr=>{"use strict";Object.defineProperty(Lr,"__esModule",{value:!0});Lr.Int128=Lr.Int64=Lr.Uint64=Lr.BaseInt64=void 0;var nF=1<<16;function xs(r){return r<0&&(r=4294967295+r+1),`0x${r.toString(16)}`}var qs=8,Bh=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8],nc=class{constructor(e){this.buffer=e}high(){return this.buffer[1]}low(){return this.buffer[0]}_times(e){let t=new Uint32Array([this.buffer[1]>>>16,this.buffer[1]&65535,this.buffer[0]>>>16,this.buffer[0]&65535]),i=new Uint32Array([e.buffer[1]>>>16,e.buffer[1]&65535,e.buffer[0]>>>16,e.buffer[0]&65535]),n=t[3]*i[3];this.buffer[0]=n&65535;let s=n>>>16;return n=t[2]*i[3],s+=n,n=t[3]*i[2]>>>0,s+=n,this.buffer[0]+=s<<16,this.buffer[1]=s>>>0<n?nF:0,this.buffer[1]+=s>>>16,this.buffer[1]+=t[1]*i[3]+t[2]*i[2]+t[3]*i[1],this.buffer[1]+=t[0]*i[3]+t[1]*i[2]+t[2]*i[1]+t[3]*i[0]<<16,this}_plus(e){let t=this.buffer[0]+e.buffer[0]>>>0;this.buffer[1]+=e.buffer[1],t<this.buffer[0]>>>0&&++this.buffer[1],this.buffer[0]=t}lessThan(e){return this.buffer[1]<e.buffer[1]||this.buffer[1]===e.buffer[1]&&this.buffer[0]<e.buffer[0]}equals(e){return this.buffer[1]===e.buffer[1]&&this.buffer[0]==e.buffer[0]}greaterThan(e){return e.lessThan(this)}hex(){return`${xs(this.buffer[1])} ${xs(this.buffer[0])}`}};Lr.BaseInt64=nc;var Ee=class extends nc{times(e){return this._times(e),this}plus(e){return this._plus(e),this}static from(e,t=new Uint32Array(2)){return Ee.fromString(typeof e=="string"?e:e.toString(),t)}static fromNumber(e,t=new Uint32Array(2)){return Ee.fromString(e.toString(),t)}static fromString(e,t=new Uint32Array(2)){let i=e.length,n=new Ee(t);for(let s=0;s<i;){let l=qs<i-s?qs:i-s,y=new Ee(new Uint32Array([parseInt(e.substr(s,l),10),0])),w=new Ee(new Uint32Array([Bh[l],0]));n.times(w),n.plus(y),s+=l}return n}static convertArray(e){let t=new Uint32Array(e.length*2);for(let i=-1,n=e.length;++i<n;)Ee.from(e[i],new Uint32Array(t.buffer,t.byteOffset+2*i*4,2));return t}static multiply(e,t){return new Ee(new Uint32Array(e.buffer)).times(t)}static add(e,t){return new Ee(new Uint32Array(e.buffer)).plus(t)}};Lr.Uint64=Ee;var Gt=class extends nc{negate(){return this.buffer[0]=~this.buffer[0]+1,this.buffer[1]=~this.buffer[1],this.buffer[0]==0&&++this.buffer[1],this}times(e){return this._times(e),this}plus(e){return this._plus(e),this}lessThan(e){let t=this.buffer[1]<<0,i=e.buffer[1]<<0;return t<i||t===i&&this.buffer[0]<e.buffer[0]}static from(e,t=new Uint32Array(2)){return Gt.fromString(typeof e=="string"?e:e.toString(),t)}static fromNumber(e,t=new Uint32Array(2)){return Gt.fromString(e.toString(),t)}static fromString(e,t=new Uint32Array(2)){let i=e.startsWith("-"),n=e.length,s=new Gt(t);for(let l=i?1:0;l<n;){let y=qs<n-l?qs:n-l,w=new Gt(new Uint32Array([parseInt(e.substr(l,y),10),0])),D=new Gt(new Uint32Array([Bh[y],0]));s.times(D),s.plus(w),l+=y}return i?s.negate():s}static convertArray(e){let t=new Uint32Array(e.length*2);for(let i=-1,n=e.length;++i<n;)Gt.from(e[i],new Uint32Array(t.buffer,t.byteOffset+2*i*4,2));return t}static multiply(e,t){return new Gt(new Uint32Array(e.buffer)).times(t)}static add(e,t){return new Gt(new Uint32Array(e.buffer)).plus(t)}};Lr.Int64=Gt;var Tr=class{constructor(e){this.buffer=e}high(){return new Gt(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset+8,2))}low(){return new Gt(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset,2))}negate(){return this.buffer[0]=~this.buffer[0]+1,this.buffer[1]=~this.buffer[1],this.buffer[2]=~this.buffer[2],this.buffer[3]=~this.buffer[3],this.buffer[0]==0&&++this.buffer[1],this.buffer[1]==0&&++this.buffer[2],this.buffer[2]==0&&++this.buffer[3],this}times(e){let t=new Ee(new Uint32Array([this.buffer[3],0])),i=new Ee(new Uint32Array([this.buffer[2],0])),n=new Ee(new Uint32Array([this.buffer[1],0])),s=new Ee(new Uint32Array([this.buffer[0],0])),l=new Ee(new Uint32Array([e.buffer[3],0])),y=new Ee(new Uint32Array([e.buffer[2],0])),w=new Ee(new Uint32Array([e.buffer[1],0])),D=new Ee(new Uint32Array([e.buffer[0],0])),k=Ee.multiply(s,D);this.buffer[0]=k.low();let Y=new Ee(new Uint32Array([k.high(),0]));return k=Ee.multiply(n,D),Y.plus(k),k=Ee.multiply(s,w),Y.plus(k),this.buffer[1]=Y.low(),this.buffer[3]=Y.lessThan(k)?1:0,this.buffer[2]=Y.high(),new Ee(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset+8,2)).plus(Ee.multiply(i,D)).plus(Ee.multiply(n,w)).plus(Ee.multiply(s,y)),this.buffer[3]+=Ee.multiply(t,D).plus(Ee.multiply(i,w)).plus(Ee.multiply(n,y)).plus(Ee.multiply(s,l)).low(),this}plus(e){let t=new Uint32Array(4);return t[3]=this.buffer[3]+e.buffer[3]>>>0,t[2]=this.buffer[2]+e.buffer[2]>>>0,t[1]=this.buffer[1]+e.buffer[1]>>>0,t[0]=this.buffer[0]+e.buffer[0]>>>0,t[0]<this.buffer[0]>>>0&&++t[1],t[1]<this.buffer[1]>>>0&&++t[2],t[2]<this.buffer[2]>>>0&&++t[3],this.buffer[3]=t[3],this.buffer[2]=t[2],this.buffer[1]=t[1],this.buffer[0]=t[0],this}hex(){return`${xs(this.buffer[3])} ${xs(this.buffer[2])} ${xs(this.buffer[1])} ${xs(this.buffer[0])}`}static multiply(e,t){return new Tr(new Uint32Array(e.buffer)).times(t)}static add(e,t){return new Tr(new Uint32Array(e.buffer)).plus(t)}static from(e,t=new Uint32Array(4)){return Tr.fromString(typeof e=="string"?e:e.toString(),t)}static fromNumber(e,t=new Uint32Array(4)){return Tr.fromString(e.toString(),t)}static fromString(e,t=new Uint32Array(4)){let i=e.startsWith("-"),n=e.length,s=new Tr(t);for(let l=i?1:0;l<n;){let y=qs<n-l?qs:n-l,w=new Tr(new Uint32Array([parseInt(e.substr(l,y),10),0,0,0])),D=new Tr(new Uint32Array([Bh[y],0,0,0]));s.times(D),s.plus(w),l+=y}return i?s.negate():s}static convertArray(e){let t=new Uint32Array(e.length*4);for(let i=-1,n=e.length;++i<n;)Tr.from(e[i],new Uint32Array(t.buffer,t.byteOffset+4*4*i,4));return t}};Lr.Int128=Tr});var T0=E(zs=>{"use strict";Object.defineProperty(zs,"__esModule",{value:!0});zs.JSONVectorLoader=zs.VectorLoader=void 0;var gt=jr(),sF=wt(),di=Ve(),oF=Dt(),j0=Er(),aF=wn(),sc=Ih(),B0=xe(),xr=mt(),Th=class extends oF.Visitor{constructor(e,t,i,n){super();this.nodesIndex=-1,this.buffersIndex=-1,this.bytes=e,this.nodes=t,this.buffers=i,this.dictionaries=n}visit(e){return super.visit(e instanceof sF.Field?e.type:e)}visitNull(e,{length:t}=this.nextFieldNode()){return gt.Data.Null(e,0,t)}visitBool(e,{length:t,nullCount:i}=this.nextFieldNode()){return gt.Data.Bool(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitInt(e,{length:t,nullCount:i}=this.nextFieldNode()){return gt.Data.Int(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitFloat(e,{length:t,nullCount:i}=this.nextFieldNode()){return gt.Data.Float(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitUtf8(e,{length:t,nullCount:i}=this.nextFieldNode()){return gt.Data.Utf8(e,0,t,i,this.readNullBitmap(e,i),this.readOffsets(e),this.readData(e))}visitBinary(e,{length:t,nullCount:i}=this.nextFieldNode()){return gt.Data.Binary(e,0,t,i,this.readNullBitmap(e,i),this.readOffsets(e),this.readData(e))}visitFixedSizeBinary(e,{length:t,nullCount:i}=this.nextFieldNode()){return gt.Data.FixedSizeBinary(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitDate(e,{length:t,nullCount:i}=this.nextFieldNode()){return gt.Data.Date(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitTimestamp(e,{length:t,nullCount:i}=this.nextFieldNode()){return gt.Data.Timestamp(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitTime(e,{length:t,nullCount:i}=this.nextFieldNode()){return gt.Data.Time(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitDecimal(e,{length:t,nullCount:i}=this.nextFieldNode()){return gt.Data.Decimal(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitList(e,{length:t,nullCount:i}=this.nextFieldNode()){return gt.Data.List(e,0,t,i,this.readNullBitmap(e,i),this.readOffsets(e),this.visit(e.children[0]))}visitStruct(e,{length:t,nullCount:i}=this.nextFieldNode()){return gt.Data.Struct(e,0,t,i,this.readNullBitmap(e,i),this.visitMany(e.children))}visitUnion(e){return e.mode===B0.UnionMode.Sparse?this.visitSparseUnion(e):this.visitDenseUnion(e)}visitDenseUnion(e,{length:t,nullCount:i}=this.nextFieldNode()){return gt.Data.Union(e,0,t,i,this.readNullBitmap(e,i),this.readTypeIds(e),this.readOffsets(e),this.visitMany(e.children))}visitSparseUnion(e,{length:t,nullCount:i}=this.nextFieldNode()){return gt.Data.Union(e,0,t,i,this.readNullBitmap(e,i),this.readTypeIds(e),this.visitMany(e.children))}visitDictionary(e,{length:t,nullCount:i}=this.nextFieldNode()){return gt.Data.Dictionary(e,0,t,i,this.readNullBitmap(e,i),this.readData(e.indices),this.readDictionary(e))}visitInterval(e,{length:t,nullCount:i}=this.nextFieldNode()){return gt.Data.Interval(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitFixedSizeList(e,{length:t,nullCount:i}=this.nextFieldNode()){return gt.Data.FixedSizeList(e,0,t,i,this.readNullBitmap(e,i),this.visit(e.children[0]))}visitMap(e,{length:t,nullCount:i}=this.nextFieldNode()){return gt.Data.Map(e,0,t,i,this.readNullBitmap(e,i),this.readOffsets(e),this.visit(e.children[0]))}nextFieldNode(){return this.nodes[++this.nodesIndex]}nextBufferRange(){return this.buffers[++this.buffersIndex]}readNullBitmap(e,t,i=this.nextBufferRange()){return t>0&&this.readData(e,i)||new Uint8Array(0)}readOffsets(e,t){return this.readData(e,t)}readTypeIds(e,t){return this.readData(e,t)}readData(e,{length:t,offset:i}=this.nextBufferRange()){return this.bytes.subarray(i,i+t)}readDictionary(e){return this.dictionaries.get(e.id)}};zs.VectorLoader=Th;var I0=class extends Th{constructor(e,t,i,n){super(new Uint8Array(0),t,i,n);this.sources=e}readNullBitmap(e,t,{offset:i}=this.nextBufferRange()){return t<=0?new Uint8Array(0):j0.packBools(this.sources[i])}readOffsets(e,{offset:t}=this.nextBufferRange()){return xr.toArrayBufferView(Uint8Array,xr.toArrayBufferView(Int32Array,this.sources[t]))}readTypeIds(e,{offset:t}=this.nextBufferRange()){return xr.toArrayBufferView(Uint8Array,xr.toArrayBufferView(e.ArrayType,this.sources[t]))}readData(e,{offset:t}=this.nextBufferRange()){let{sources:i}=this;return di.DataType.isTimestamp(e)||(di.DataType.isInt(e)||di.DataType.isTime(e))&&e.bitWidth===64||di.DataType.isDate(e)&&e.unit===B0.DateUnit.MILLISECOND?xr.toArrayBufferView(Uint8Array,sc.Int64.convertArray(i[t])):di.DataType.isDecimal(e)?xr.toArrayBufferView(Uint8Array,sc.Int128.convertArray(i[t])):di.DataType.isBinary(e)||di.DataType.isFixedSizeBinary(e)?uF(i[t]):di.DataType.isBool(e)?j0.packBools(i[t]):di.DataType.isUtf8(e)?aF.encodeUtf8(i[t].join("")):xr.toArrayBufferView(Uint8Array,xr.toArrayBufferView(e.ArrayType,i[t].map(n=>+n)))}};zs.JSONVectorLoader=I0;function uF(r){let e=r.join(""),t=new Uint8Array(e.length/2);for(let i=0;i<e.length;i+=2)t[i>>1]=parseInt(e.substr(i,2),16);return t}});var aa=E(Hs=>{"use strict";Object.defineProperty(Hs,"__esModule",{value:!0});Hs.StructRow=Hs.MapRow=void 0;var S0=Cf(),At=Symbol.for("parent"),Ws=Symbol.for("rowIndex"),Kt=Symbol.for("keyToIdx"),Jt=Symbol.for("idxToVal"),Sh=Symbol.for("nodejs.util.inspect.custom"),qr=class{constructor(e,t){this[At]=e,this.size=t}entries(){return this[Symbol.iterator]()}has(e){return this.get(e)!==void 0}get(e){let t;if(e!=null){let i=this[Kt]||(this[Kt]=new Map),n=i.get(e);if(n!==void 0){let s=this[Jt]||(this[Jt]=new Array(this.size));(t=s[n])!==void 0||(s[n]=t=this.getValue(n))}else if((n=this.getIndex(e))>-1){i.set(e,n);let s=this[Jt]||(this[Jt]=new Array(this.size));(t=s[n])!==void 0||(s[n]=t=this.getValue(n))}}return t}set(e,t){if(e!=null){let i=this[Kt]||(this[Kt]=new Map),n=i.get(e);if(n===void 0&&i.set(e,n=this.getIndex(e)),n>-1){let s=this[Jt]||(this[Jt]=new Array(this.size));s[n]=this.setValue(n,t)}}return this}clear(){throw new Error(`Clearing ${this[Symbol.toStringTag]} not supported.`)}delete(e){throw new Error(`Deleting ${this[Symbol.toStringTag]} values not supported.`)}*[Symbol.iterator](){let e=this.keys(),t=this.values(),i=this[Kt]||(this[Kt]=new Map),n=this[Jt]||(this[Jt]=new Array(this.size));for(let s,l,y=0,w,D;!((w=e.next()).done||(D=t.next()).done);++y)s=w.value,l=D.value,n[y]=l,i.has(s)||i.set(s,y),yield[s,l]}forEach(e,t){let i=this.keys(),n=this.values(),s=t===void 0?e:(w,D,k)=>e.call(t,w,D,k),l=this[Kt]||(this[Kt]=new Map),y=this[Jt]||(this[Jt]=new Array(this.size));for(let w,D,k=0,Y,J;!((Y=i.next()).done||(J=n.next()).done);++k)w=Y.value,D=J.value,y[k]=D,l.has(w)||l.set(w,k),s(D,w,this)}toArray(){return[...this.values()]}toJSON(){let e={};return this.forEach((t,i)=>e[i]=t),e}inspect(){return this.toString()}[Sh](){return this.toString()}toString(){let e=[];return this.forEach((t,i)=>{i=S0.valueToString(i),t=S0.valueToString(t),e.push(`${i}: ${t}`)}),`{ ${e.join(", ")} }`}};qr[Symbol.toStringTag]=(r=>(Object.defineProperties(r,{size:{writable:!0,enumerable:!1,configurable:!1,value:0},[At]:{writable:!0,enumerable:!1,configurable:!1,value:null},[Ws]:{writable:!0,enumerable:!1,configurable:!1,value:-1}}),r[Symbol.toStringTag]="Row"))(qr.prototype);var D0=class extends qr{constructor(e){super(e,e.length);return cF(this)}keys(){return this[At].getChildAt(0)[Symbol.iterator]()}values(){return this[At].getChildAt(1)[Symbol.iterator]()}getKey(e){return this[At].getChildAt(0).get(e)}getIndex(e){return this[At].getChildAt(0).indexOf(e)}getValue(e){return this[At].getChildAt(1).get(e)}setValue(e,t){this[At].getChildAt(1).set(e,t)}};Hs.MapRow=D0;var A0=class extends qr{constructor(e){super(e,e.type.children.length);return O0(this)}*keys(){for(let e of this[At].type.children)yield e.name}*values(){for(let e of this[At].type.children)yield this[e.name]}getKey(e){return this[At].type.children[e].name}getIndex(e){return this[At].type.children.findIndex(t=>t.name===e)}getValue(e){return this[At].getChildAt(e).get(this[Ws])}setValue(e,t){return this[At].getChildAt(e).set(this[Ws],t)}};Hs.StructRow=A0;Object.setPrototypeOf(qr.prototype,Map.prototype);var O0=(()=>{let r={enumerable:!0,configurable:!1,get:null,set:null};return e=>{let t=-1,i=e[Kt]||(e[Kt]=new Map),n=l=>function(){return this.get(l)},s=l=>function(y){return this.set(l,y)};for(let l of e.keys())i.set(l,++t),r.get=n(l),r.set=s(l),Object.prototype.hasOwnProperty.call(e,l)||(r.enumerable=!0,Object.defineProperty(e,l,r)),Object.prototype.hasOwnProperty.call(e,t)||(r.enumerable=!1,Object.defineProperty(e,t,r));return r.get=r.set=null,e}})(),cF=(()=>{if(typeof Proxy=="undefined")return O0;let r=qr.prototype.has,e=qr.prototype.get,t=qr.prototype.set,i=qr.prototype.getKey,n={isExtensible(){return!1},deleteProperty(){return!1},preventExtensions(){return!0},ownKeys(s){return[...s.keys()].map(l=>`${l}`)},has(s,l){switch(l){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 At:case Ws:case Jt:case Kt:case Sh:return!0}return typeof l=="number"&&!s.has(l)&&(l=s.getKey(l)),s.has(l)},get(s,l,y){switch(l){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 At:case Ws:case Jt:case Kt:case Sh:return Reflect.get(s,l,y)}return typeof l=="number"&&!r.call(y,l)&&(l=i.call(y,l)),e.call(y,l)},set(s,l,y,w){switch(l){case At:case Ws:case Jt:case Kt:return Reflect.set(s,l,y,w);case"getKey":case"getIndex":case"getValue":case"setValue":case"toArray":case"toJSON":case"inspect":case"constructor":case"isPrototypeOf":case"propertyIsEnumerable":case"toString":case"toLocaleString":case"valueOf":case"size":case"has":case"get":case"set":case"clear":case"delete":case"keys":case"values":case"entries":case"forEach":case"__proto__":case"__defineGetter__":case"__defineSetter__":case"hasOwnProperty":case"__lookupGetter__":case"__lookupSetter__":case Symbol.iterator:case Symbol.toStringTag:return!1}return typeof l=="number"&&!r.call(w,l)&&(l=i.call(w,l)),r.call(w,l)?!!t.call(w,l,y):!1}};return s=>new Proxy(s,n)})()});var ca=E(Ji=>{"use strict";Object.defineProperty(Ji,"__esModule",{value:!0});Ji.createElementComparator=Ji.clampRange=Ji.clampIndex=void 0;var F0=nt(),k0=aa(),lF=mt(),M0=Mt();function dF(r,e,t){let i=r.length,n=e>-1?e:i+e%i;return t?t(r,n):n}Ji.clampIndex=dF;var C0;function fF(r,e,t,i){let{length:n=0}=r,s=typeof e!="number"?0:e,l=typeof t!="number"?n:t;return s<0&&(s=(s%n+n)%n),l<0&&(l=(l%n+n)%n),l<s&&(C0=s,s=l,l=C0),l>n&&(l=n),i?i(r,s,l):[s,l]}Ji.clampRange=fF;var hF=M0.BigIntAvailable?M0.BigInt(0):0,U0=r=>r!==r;function ua(r){let e=typeof r;if(e!=="object"||r===null)return U0(r)?U0:e!=="bigint"?t=>t===r:t=>hF+t===r;if(r instanceof Date){let t=r.valueOf();return i=>i instanceof Date?i.valueOf()===t:!1}return ArrayBuffer.isView(r)?t=>t?lF.compareArrayLike(r,t):!1:r instanceof Map?_F(r):Array.isArray(r)?pF(r):r instanceof F0.Vector?yF(r):mF(r)}Ji.createElementComparator=ua;function pF(r){let e=[];for(let t=-1,i=r.length;++t<i;)e[t]=ua(r[t]);return oc(e)}function _F(r){let e=-1,t=[];return r.forEach(i=>t[++e]=ua(i)),oc(t)}function yF(r){let e=[];for(let t=-1,i=r.length;++t<i;)e[t]=ua(r.get(t));return oc(e)}function mF(r){let e=Object.keys(r);if(e.length===0)return()=>!1;let t=[];for(let i=-1,n=e.length;++i<n;)t[i]=ua(r[e[i]]);return oc(t,e)}function oc(r,e){return t=>{if(!t||typeof t!="object")return!1;switch(t.constructor){case Array:return bF(r,t);case Map:case k0.MapRow:case k0.StructRow:return V0(r,t,t.keys());case Object:case void 0:return V0(r,t,e||Object.keys(t))}return t instanceof F0.Vector?gF(r,t):!1}}function bF(r,e){let t=r.length;if(e.length!==t)return!1;for(let i=-1;++i<t;)if(!r[i](e[i]))return!1;return!0}function gF(r,e){let t=r.length;if(e.length!==t)return!1;for(let i=-1;++i<t;)if(!r[i](e.get(i)))return!1;return!0}function V0(r,e,t){let i=t[Symbol.iterator](),n=e instanceof Map?e.keys():Object.keys(e)[Symbol.iterator](),s=e instanceof Map?e.values():Object.values(e)[Symbol.iterator](),l=0,y=r.length,w=s.next(),D=i.next(),k=n.next();for(;l<y&&!D.done&&!k.done&&!w.done&&!(D.value!==k.value||!r[l](w.value));++l,D=i.next(),k=n.next(),w=s.next());return l===y&&D.done&&k.done&&w.done?!0:(i.return&&i.return(),n.return&&n.return(),s.return&&s.return(),!1)}});var Vn=E(jt=>{"use strict";Object.defineProperty(jt,"__esModule",{value:!0});jt.selectColumnChildrenArgs=jt.selectVectorChildrenArgs=jt.selectChunkArgs=jt.selectFieldArgs=jt.selectColumnArgs=jt.selectArgs=jt.arrayTypeToDataType=jt.isTypedArray=void 0;var Dh=jr(),E0=wt(),fi=$s(),Ys=nt(),cr=Ve(),vF=Xi(),Zi=Array.isArray;function Ah(r){return ArrayBuffer.isView(r)&&"BYTES_PER_ELEMENT"in r}jt.isTypedArray=Ah;function R0(r){switch(r){case Int8Array:return cr.Int8;case Int16Array:return cr.Int16;case Int32Array:return cr.Int32;case BigInt64Array:return cr.Int64;case Uint8Array:return cr.Uint8;case Uint16Array:return cr.Uint16;case Uint32Array:return cr.Uint32;case BigUint64Array:return cr.Uint64;case Float32Array:return cr.Float32;case Float64Array:return cr.Float64;default:return null}}jt.arrayTypeToDataType=R0;function wF(r){let e=R0(r.constructor);if(!e)throw new TypeError("Unrecognized Array input");let t=new e,i=Dh.Data.new(t,0,r.length,0,[void 0,r]);return Ys.Vector.new(i)}jt.selectArgs=(r,e)=>ac(r,e,[],0);jt.selectColumnArgs=r=>{let[e,t]=Fh(r,[[],[]]);return t.map((i,n)=>i instanceof fi.Column?fi.Column.new(i.field.clone(e[n]),i):i instanceof Ys.Vector?fi.Column.new(e[n],i):Ah(i)?fi.Column.new(e[n],wF(i)):fi.Column.new(e[n],[]))};jt.selectFieldArgs=r=>Fh(r,[[],[]]);jt.selectChunkArgs=(r,e)=>Oh(r,e,[],0);jt.selectVectorChildrenArgs=(r,e)=>N0(r,e,[],0);jt.selectColumnChildrenArgs=(r,e)=>P0(r,e,[],0);function ac(r,e,t,i){let n,s=i,l=-1,y=e.length;for(;++l<y;)Zi(n=e[l])?s=ac(r,n,t,s).length:n instanceof r&&(t[s++]=n);return t}function Oh(r,e,t,i){let n,s=i,l=-1,y=e.length;for(;++l<y;)Zi(n=e[l])?s=Oh(r,n,t,s).length:n instanceof vF.Chunked?s=Oh(r,n.chunks,t,s).length:n instanceof r&&(t[s++]=n);return t}function N0(r,e,t,i){let n,s=i,l=-1,y=e.length;for(;++l<y;)Zi(n=e[l])?s=N0(r,n,t,s).length:n instanceof r?s=ac(Ys.Vector,n.schema.fields.map((w,D)=>n.getChildAt(D)),t,s).length:n instanceof Ys.Vector&&(t[s++]=n);return t}function P0(r,e,t,i){let n,s=i,l=-1,y=e.length;for(;++l<y;)Zi(n=e[l])?s=P0(r,n,t,s).length:n instanceof r?s=ac(fi.Column,n.schema.fields.map((w,D)=>fi.Column.new(w,n.getChildAt(D))),t,s).length:n instanceof fi.Column&&(t[s++]=n);return t}var jF=(r,[e,t],i)=>(r[0][i]=e,r[1][i]=t,r);function Fh(r,e){let t,i;switch(i=r.length){case 0:return e;case 1:if(t=e[0],!r[0])return e;if(Zi(r[0]))return Fh(r[0],e);r[0]instanceof Dh.Data||r[0]instanceof Ys.Vector||Ah(r[0])||r[0]instanceof cr.DataType||([t,r]=Object.entries(r[0]).reduce(jF,e));break;default:Zi(t=r[i-1])?r=Zi(r[0])?r[0]:r.slice(0,i-1):(r=Zi(r[0])?r[0]:r,t=[])}let n=-1,s=-1,l=-1,y=r.length,w,D,[k,Y]=e;for(;++l<y;)D=r[l],D instanceof fi.Column&&(Y[++s]=D)?k[++n]=D.field.clone(t[l],D.type,!0):({[l]:w=l}=t,D instanceof cr.DataType&&(Y[++s]=D)?k[++n]=E0.Field.new(w,D,!0):(D==null?void 0:D.type)&&(Y[++s]=D)&&(D instanceof Dh.Data&&(Y[s]=D=Ys.Vector.new(D)),k[++n]=E0.Field.new(w,D.type,!0)));return e}});var Xi=E(uc=>{"use strict";Object.defineProperty(uc,"__esModule",{value:!0});uc.Chunked=void 0;var BF=ca(),L0=Ve(),IF=Vn(),x0=nt(),q0=class{constructor(e){this.chunks=e,this.chunkIndex=0,this.chunkIterator=this.getChunkIterator()}next(){for(;this.chunkIndex<this.chunks.length;){let e=this.chunkIterator.next();if(!e.done)return e;++this.chunkIndex<this.chunks.length&&(this.chunkIterator=this.getChunkIterator())}return{done:!0,value:null}}getChunkIterator(){return this.chunks[this.chunkIndex][Symbol.iterator]()}[Symbol.iterator](){return this}},hi=class extends x0.AbstractVector{constructor(e,t=[],i=TF(t)){super();this._nullCount=-1,this._type=e,this._chunks=t,this._chunkOffsets=i,this._length=i[i.length-1],this._numChildren=(this._type.children||[]).length}static flatten(...e){return IF.selectChunkArgs(x0.Vector,e)}static concat(...e){let t=hi.flatten(...e);return new hi(t[0].type,t)}get type(){return this._type}get length(){return this._length}get chunks(){return this._chunks}get typeId(){return this._type.typeId}get VectorName(){return`Chunked<${this._type}>`}get data(){return this._chunks[0]?this._chunks[0].data:null}get ArrayType(){return this._type.ArrayType}get numChildren(){return this._numChildren}get stride(){return this._chunks[0]?this._chunks[0].stride:1}get byteLength(){return this._chunks.reduce((e,t)=>e+t.byteLength,0)}get nullCount(){let e=this._nullCount;return e<0&&(this._nullCount=e=this._chunks.reduce((t,{nullCount:i})=>t+i,0)),e}get indices(){if(L0.DataType.isDictionary(this._type)){if(!this._indices){let e=this._chunks;this._indices=e.length===1?e[0].indices:hi.concat(...e.map(t=>t.indices))}return this._indices}return null}get dictionary(){return L0.DataType.isDictionary(this._type)?this._chunks[this._chunks.length-1].data.dictionary:null}[Symbol.iterator](){return new q0(this._chunks)}clone(e=this._chunks){return new hi(this._type,e)}concat(...e){return this.clone(hi.flatten(this,...e))}slice(e,t){return BF.clampRange(this,e,t,this._sliceInternal)}getChildAt(e){if(e<0||e>=this._numChildren)return null;let t=this._children||(this._children=[]),i,n,s;return(i=t[e])?i:(n=(this._type.children||[])[e])&&(s=this._chunks.map(l=>l.getChildAt(e)).filter(l=>l!=null),s.length>0)?t[e]=new hi(n.type,s):null}search(e,t){let i=e,n=this._chunkOffsets,s=n.length-1;if(i<0||i>=n[s])return null;if(s<=1)return t?t(this,0,i):[0,i];let l=0,y=0,w=0;do{if(l+1===s)return t?t(this,l,i-y):[l,i-y];w=l+(s-l)/2|0,i>=n[w]?l=w:s=w}while(i<n[s]&&i>=(y=n[l]));return null}isValid(e){return!!this.search(e,this.isValidInternal)}get(e){return this.search(e,this.getInternal)}set(e,t){this.search(e,({chunks:i},n,s)=>i[n].set(s,t))}indexOf(e,t){return t&&typeof t=="number"?this.search(t,(i,n,s)=>this.indexOfInternal(i,n,s,e)):this.indexOfInternal(this,0,Math.max(0,t||0),e)}toArray(){let{chunks:e}=this,t=e.length,i=this._type.ArrayType;if(t<=0)return new i(0);if(t<=1)return e[0].toArray();let n=0,s=new Array(t);for(let w=-1;++w<t;)n+=(s[w]=e[w].toArray()).length;i!==s[0].constructor&&(i=s[0].constructor);let l=new i(n),y=i===Array?DF:SF;for(let w=-1,D=0;++w<t;)D=y(s[w],l,D);return l}getInternal({_chunks:e},t,i){return e[t].get(i)}isValidInternal({_chunks:e},t,i){return e[t].isValid(i)}indexOfInternal({_chunks:e},t,i,n){let s=t-1,l=e.length,y=i,w=0,D=-1;for(;++s<l;){if(~(D=e[s].indexOf(n,y)))return w+D;y=0,w+=e[s].length}return-1}_sliceInternal(e,t,i){let n=[],{chunks:s,_chunkOffsets:l}=e;for(let y=-1,w=s.length;++y<w;){let D=s[y],k=D.length,Y=l[y];if(Y>=i)break;if(t>=Y+k)continue;if(Y>=t&&Y+k<=i){n.push(D);continue}let J=Math.max(0,t-Y),ie=Math.min(i-Y,k);n.push(D.slice(J,ie))}return e.clone(n)}};uc.Chunked=hi;function TF(r){let e=new Uint32Array((r||[]).length+1),t=e[0]=0,i=e.length;for(let n=0;++n<i;)e[n]=t+=r[n-1].length;return e}var SF=(r,e,t)=>(e.set(r,t),t+r.length),DF=(r,e,t)=>{let i=t;for(let n=-1,s=r.length;++n<s;)e[i++]=r[n];return i}});var $s=E(cc=>{"use strict";Object.defineProperty(cc,"__esModule",{value:!0});cc.Column=void 0;var z0=wt(),W0=nt(),kh=Xi(),En=class extends kh.Chunked{constructor(e,t=[],i){t=kh.Chunked.flatten(...t);super(e.type,t,i);if(this._field=e,t.length===1&&!(this instanceof Mh))return new Mh(e,t[0],this._chunkOffsets)}static new(...e){let[t,i,...n]=e;typeof t!="string"&&!(t instanceof z0.Field)&&(i=t,t="");let s=kh.Chunked.flatten(Array.isArray(i)?[...i,...n]:i instanceof W0.Vector?[i,...n]:[W0.Vector.new(i,...n)]);if(typeof t=="string"){let l=s[0].data.type;t=new z0.Field(t,l,!0)}else!t.nullable&&s.some(({nullCount:l})=>l>0)&&(t=t.clone({nullable:!0}));return new En(t,s)}get field(){return this._field}get name(){return this._field.name}get nullable(){return this._field.nullable}get metadata(){return this._field.metadata}clone(e=this._chunks){return new En(this._field,e)}getChildAt(e){if(e<0||e>=this.numChildren)return null;let t=this._children||(this._children=[]),i,n,s;return(i=t[e])?i:(n=(this.type.children||[])[e])&&(s=this._chunks.map(l=>l.getChildAt(e)).filter(l=>l!=null),s.length>0)?t[e]=new En(n,s):null}};cc.Column=En;var Mh=class extends En{constructor(e,t,i){super(e,[t],i);this._chunk=t}search(e,t){return t?t(this,0,e):[0,e]}isValid(e){return this._chunk.isValid(e)}get(e){return this._chunk.get(e)}set(e,t){this._chunk.set(e,t)}indexOf(e,t){return this._chunk.indexOf(e,t)}}});var H0=E(Gs=>{"use strict";Object.defineProperty(Gs,"__esModule",{value:!0});Gs.instance=Gs.TypeAssembler=void 0;var AF=ni(),OF=AF.flatbuffers.Long,FF=Dt(),oe=Vi(),Ch=class extends FF.Visitor{visit(e,t){return e==null||t==null?void 0:super.visit(e,t)}visitNull(e,t){return oe.Null.startNull(t),oe.Null.endNull(t)}visitInt(e,t){return oe.Int.startInt(t),oe.Int.addBitWidth(t,e.bitWidth),oe.Int.addIsSigned(t,e.isSigned),oe.Int.endInt(t)}visitFloat(e,t){return oe.FloatingPoint.startFloatingPoint(t),oe.FloatingPoint.addPrecision(t,e.precision),oe.FloatingPoint.endFloatingPoint(t)}visitBinary(e,t){return oe.Binary.startBinary(t),oe.Binary.endBinary(t)}visitBool(e,t){return oe.Bool.startBool(t),oe.Bool.endBool(t)}visitUtf8(e,t){return oe.Utf8.startUtf8(t),oe.Utf8.endUtf8(t)}visitDecimal(e,t){return oe.Decimal.startDecimal(t),oe.Decimal.addScale(t,e.scale),oe.Decimal.addPrecision(t,e.precision),oe.Decimal.endDecimal(t)}visitDate(e,t){return oe.Date.startDate(t),oe.Date.addUnit(t,e.unit),oe.Date.endDate(t)}visitTime(e,t){return oe.Time.startTime(t),oe.Time.addUnit(t,e.unit),oe.Time.addBitWidth(t,e.bitWidth),oe.Time.endTime(t)}visitTimestamp(e,t){let i=e.timezone&&t.createString(e.timezone)||void 0;return oe.Timestamp.startTimestamp(t),oe.Timestamp.addUnit(t,e.unit),i!==void 0&&oe.Timestamp.addTimezone(t,i),oe.Timestamp.endTimestamp(t)}visitInterval(e,t){return oe.Interval.startInterval(t),oe.Interval.addUnit(t,e.unit),oe.Interval.endInterval(t)}visitList(e,t){return oe.List.startList(t),oe.List.endList(t)}visitStruct(e,t){return oe.Struct_.startStruct_(t),oe.Struct_.endStruct_(t)}visitUnion(e,t){oe.Union.startTypeIdsVector(t,e.typeIds.length);let i=oe.Union.createTypeIdsVector(t,e.typeIds);return oe.Union.startUnion(t),oe.Union.addMode(t,e.mode),oe.Union.addTypeIds(t,i),oe.Union.endUnion(t)}visitDictionary(e,t){let i=this.visit(e.indices,t);return oe.DictionaryEncoding.startDictionaryEncoding(t),oe.DictionaryEncoding.addId(t,new OF(e.id,0)),oe.DictionaryEncoding.addIsOrdered(t,e.isOrdered),i!==void 0&&oe.DictionaryEncoding.addIndexType(t,i),oe.DictionaryEncoding.endDictionaryEncoding(t)}visitFixedSizeBinary(e,t){return oe.FixedSizeBinary.startFixedSizeBinary(t),oe.FixedSizeBinary.addByteWidth(t,e.byteWidth),oe.FixedSizeBinary.endFixedSizeBinary(t)}visitFixedSizeList(e,t){return oe.FixedSizeList.startFixedSizeList(t),oe.FixedSizeList.addListSize(t,e.listSize),oe.FixedSizeList.endFixedSizeList(t)}visitMap(e,t){return oe.Map.startMap(t),oe.Map.addKeysSorted(t,e.keysSorted),oe.Map.endMap(t)}};Gs.TypeAssembler=Ch;Gs.instance=new Ch});var X0=E(zr=>{"use strict";Object.defineProperty(zr,"__esModule",{value:!0});zr.fieldFromJSON=zr.dictionaryBatchFromJSON=zr.recordBatchFromJSON=zr.schemaFromJSON=void 0;var Ks=wt(),$e=Ve(),Rn=Nn(),Js=xe();function kF(r,e=new Map){return new Ks.Schema(CF(r,e),lc(r.customMetadata),e)}zr.schemaFromJSON=kF;function Y0(r){return new Rn.RecordBatch(r.count,G0(r.columns),K0(r.columns))}zr.recordBatchFromJSON=Y0;function MF(r){return new Rn.DictionaryBatch(Y0(r.data),r.id,r.isDelta)}zr.dictionaryBatchFromJSON=MF;function CF(r,e){return(r.fields||[]).filter(Boolean).map(t=>Ks.Field.fromJSON(t,e))}function $0(r,e){return(r.children||[]).filter(Boolean).map(t=>Ks.Field.fromJSON(t,e))}function G0(r){return(r||[]).reduce((e,t)=>[...e,new Rn.FieldNode(t.count,UF(t.VALIDITY)),...G0(t.children)],[])}function K0(r,e=[]){for(let t=-1,i=(r||[]).length;++t<i;){let n=r[t];n.VALIDITY&&e.push(new Rn.BufferRegion(e.length,n.VALIDITY.length)),n.TYPE&&e.push(new Rn.BufferRegion(e.length,n.TYPE.length)),n.OFFSET&&e.push(new Rn.BufferRegion(e.length,n.OFFSET.length)),n.DATA&&e.push(new Rn.BufferRegion(e.length,n.DATA.length)),e=K0(n.children,e)}return e}function UF(r){return(r||[]).reduce((e,t)=>e+ +(t===0),0)}function VF(r,e){let t,i,n,s,l,y;return!e||!(s=r.dictionary)?(l=Z0(r,$0(r,e)),n=new Ks.Field(r.name,l,r.nullable,lc(r.customMetadata))):e.has(t=s.id)?(i=(i=s.indexType)?J0(i):new $e.Int32,y=new $e.Dictionary(e.get(t),i,t,s.isOrdered),n=new Ks.Field(r.name,y,r.nullable,lc(r.customMetadata))):(i=(i=s.indexType)?J0(i):new $e.Int32,e.set(t,l=Z0(r,$0(r,e))),y=new $e.Dictionary(l,i,t,s.isOrdered),n=new Ks.Field(r.name,y,r.nullable,lc(r.customMetadata))),n||null}zr.fieldFromJSON=VF;function lc(r){return new Map(Object.entries(r||{}))}function J0(r){return new $e.Int(r.isSigned,r.bitWidth)}function Z0(r,e){let t=r.type.name;switch(t){case"NONE":return new $e.Null;case"null":return new $e.Null;case"binary":return new $e.Binary;case"utf8":return new $e.Utf8;case"bool":return new $e.Bool;case"list":return new $e.List((e||[])[0]);case"struct":return new $e.Struct(e||[]);case"struct_":return new $e.Struct(e||[])}switch(t){case"int":{let i=r.type;return new $e.Int(i.isSigned,i.bitWidth)}case"floatingpoint":{let i=r.type;return new $e.Float(Js.Precision[i.precision])}case"decimal":{let i=r.type;return new $e.Decimal(i.scale,i.precision)}case"date":{let i=r.type;return new $e.Date_(Js.DateUnit[i.unit])}case"time":{let i=r.type;return new $e.Time(Js.TimeUnit[i.unit],i.bitWidth)}case"timestamp":{let i=r.type;return new $e.Timestamp(Js.TimeUnit[i.unit],i.timezone)}case"interval":{let i=r.type;return new $e.Interval(Js.IntervalUnit[i.unit])}case"union":{let i=r.type;return new $e.Union(Js.UnionMode[i.mode],i.typeIds||[],e||[])}case"fixedsizebinary":{let i=r.type;return new $e.FixedSizeBinary(i.byteWidth)}case"fixedsizelist":{let i=r.type;return new $e.FixedSizeList(i.listSize,(e||[])[0])}case"map":{let i=r.type;return new $e.Map_((e||[])[0],i.keysSorted)}}throw new Error(`Unrecognized type: "${t}"`)}});var Nn=E(dr=>{"use strict";Object.defineProperty(dr,"__esModule",{value:!0});dr.FieldNode=dr.BufferRegion=dr.DictionaryBatch=dr.RecordBatch=dr.Message=void 0;var Uh=ni(),re=Vi(),Je=pu(),Bt=wt(),EF=mt(),et=xe(),Vh=H0(),dc=X0(),Pn=Uh.flatbuffers.Long,RF=Uh.flatbuffers.Builder,NF=Uh.flatbuffers.ByteBuffer,Ge=Ve(),Qi=class{constructor(e,t,i,n){this._version=t,this._headerType=i,this.body=new Uint8Array(0),n&&(this._createHeader=()=>n),this._bodyLength=typeof e=="number"?e:e.low}static fromJSON(e,t){let i=new Qi(0,et.MetadataVersion.V4,t);return i._createHeader=PF(e,t),i}static decode(e){e=new NF(EF.toUint8Array(e));let t=Je.Message.getRootAsMessage(e),i=t.bodyLength(),n=t.version(),s=t.headerType(),l=new Qi(i,n,s);return l._createHeader=LF(t,s),l}static encode(e){let t=new RF,i=-1;return e.isSchema()?i=Bt.Schema.encode(t,e.header()):e.isRecordBatch()?i=lr.encode(t,e.header()):e.isDictionaryBatch()&&(i=Wr.encode(t,e.header())),Je.Message.startMessage(t),Je.Message.addVersion(t,et.MetadataVersion.V4),Je.Message.addHeader(t,i),Je.Message.addHeaderType(t,e.headerType),Je.Message.addBodyLength(t,new Pn(e.bodyLength,0)),Je.Message.finishMessageBuffer(t,Je.Message.endMessage(t)),t.asUint8Array()}static from(e,t=0){if(e instanceof Bt.Schema)return new Qi(0,et.MetadataVersion.V4,et.MessageHeader.Schema,e);if(e instanceof lr)return new Qi(t,et.MetadataVersion.V4,et.MessageHeader.RecordBatch,e);if(e instanceof Wr)return new Qi(t,et.MetadataVersion.V4,et.MessageHeader.DictionaryBatch,e);throw new Error(`Unrecognized Message header: ${e}`)}get type(){return this.headerType}get version(){return this._version}get headerType(){return this._headerType}get bodyLength(){return this._bodyLength}header(){return this._createHeader()}isSchema(){return this.headerType===et.MessageHeader.Schema}isRecordBatch(){return this.headerType===et.MessageHeader.RecordBatch}isDictionaryBatch(){return this.headerType===et.MessageHeader.DictionaryBatch}};dr.Message=Qi;var lr=class{constructor(e,t,i){this._nodes=t,this._buffers=i,this._length=typeof e=="number"?e:e.low}get nodes(){return this._nodes}get length(){return this._length}get buffers(){return this._buffers}};dr.RecordBatch=lr;var Wr=class{constructor(e,t,i=!1){this._data=e,this._isDelta=i,this._id=typeof t=="number"?t:t.low}get id(){return this._id}get data(){return this._data}get isDelta(){return this._isDelta}get length(){return this.data.length}get nodes(){return this.data.nodes}get buffers(){return this.data.buffers}};dr.DictionaryBatch=Wr;var Ln=class{constructor(e,t){this.offset=typeof e=="number"?e:e.low,this.length=typeof t=="number"?t:t.low}};dr.BufferRegion=Ln;var xn=class{constructor(e,t){this.length=typeof e=="number"?e:e.low,this.nullCount=typeof t=="number"?t:t.low}};dr.FieldNode=xn;function PF(r,e){return()=>{switch(e){case et.MessageHeader.Schema:return Bt.Schema.fromJSON(r);case et.MessageHeader.RecordBatch:return lr.fromJSON(r);case et.MessageHeader.DictionaryBatch:return Wr.fromJSON(r)}throw new Error(`Unrecognized Message type: { name: ${et.MessageHeader[e]}, type: ${e} }`)}}function LF(r,e){return()=>{switch(e){case et.MessageHeader.Schema:return Bt.Schema.decode(r.header(new re.Schema));case et.MessageHeader.RecordBatch:return lr.decode(r.header(new Je.RecordBatch),r.version());case et.MessageHeader.DictionaryBatch:return Wr.decode(r.header(new Je.DictionaryBatch),r.version())}throw new Error(`Unrecognized Message type: { name: ${et.MessageHeader[e]}, type: ${e} }`)}}Bt.Field.encode=ZF;Bt.Field.decode=KF;Bt.Field.fromJSON=dc.fieldFromJSON;Bt.Schema.encode=JF;Bt.Schema.decode=xF;Bt.Schema.fromJSON=dc.schemaFromJSON;lr.encode=XF;lr.decode=qF;lr.fromJSON=dc.recordBatchFromJSON;Wr.encode=QF;Wr.decode=zF;Wr.fromJSON=dc.dictionaryBatchFromJSON;xn.encode=ek;xn.decode=HF;Ln.encode=tk;Ln.decode=WF;function xF(r,e=new Map){let t=GF(r,e);return new Bt.Schema(t,fc(r),e)}function qF(r,e=et.MetadataVersion.V4){return new lr(r.length(),YF(r),$F(r,e))}function zF(r,e=et.MetadataVersion.V4){return new Wr(lr.decode(r.data(),e),r.id(),r.isDelta())}function WF(r){return new Ln(r.offset(),r.length())}function HF(r){return new xn(r.length(),r.nullCount())}function YF(r){let e=[];for(let t,i=-1,n=-1,s=r.nodesLength();++i<s;)(t=r.nodes(i))&&(e[++n]=xn.decode(t));return e}function $F(r,e){let t=[];for(let i,n=-1,s=-1,l=r.buffersLength();++n<l;)(i=r.buffers(n))&&(e<et.MetadataVersion.V4&&(i.bb_pos+=8*(n+1)),t[++s]=Ln.decode(i));return t}function GF(r,e){let t=[];for(let i,n=-1,s=-1,l=r.fieldsLength();++n<l;)(i=r.fields(n))&&(t[++s]=Bt.Field.decode(i,e));return t}function Q0(r,e){let t=[];for(let i,n=-1,s=-1,l=r.childrenLength();++n<l;)(i=r.children(n))&&(t[++s]=Bt.Field.decode(i,e));return t}function KF(r,e){let t,i,n,s,l,y;return!e||!(y=r.dictionary())?(n=tw(r,Q0(r,e)),i=new Bt.Field(r.name(),n,r.nullable(),fc(r))):e.has(t=y.id().low)?(s=(s=y.indexType())?ew(s):new Ge.Int32,l=new Ge.Dictionary(e.get(t),s,t,y.isOrdered()),i=new Bt.Field(r.name(),l,r.nullable(),fc(r))):(s=(s=y.indexType())?ew(s):new Ge.Int32,e.set(t,n=tw(r,Q0(r,e))),l=new Ge.Dictionary(n,s,t,y.isOrdered()),i=new Bt.Field(r.name(),l,r.nullable(),fc(r))),i||null}function fc(r){let e=new Map;if(r)for(let t,i,n=-1,s=r.customMetadataLength()|0;++n<s;)(t=r.customMetadata(n))&&(i=t.key())!=null&&e.set(i,t.value());return e}function ew(r){return new Ge.Int(r.isSigned(),r.bitWidth())}function tw(r,e){let t=r.typeType();switch(t){case re.Type.NONE:return new Ge.Null;case re.Type.Null:return new Ge.Null;case re.Type.Binary:return new Ge.Binary;case re.Type.Utf8:return new Ge.Utf8;case re.Type.Bool:return new Ge.Bool;case re.Type.List:return new Ge.List((e||[])[0]);case re.Type.Struct_:return new Ge.Struct(e||[])}switch(t){case re.Type.Int:{let i=r.type(new re.Int);return new Ge.Int(i.isSigned(),i.bitWidth())}case re.Type.FloatingPoint:{let i=r.type(new re.FloatingPoint);return new Ge.Float(i.precision())}case re.Type.Decimal:{let i=r.type(new re.Decimal);return new Ge.Decimal(i.scale(),i.precision())}case re.Type.Date:{let i=r.type(new re.Date);return new Ge.Date_(i.unit())}case re.Type.Time:{let i=r.type(new re.Time);return new Ge.Time(i.unit(),i.bitWidth())}case re.Type.Timestamp:{let i=r.type(new re.Timestamp);return new Ge.Timestamp(i.unit(),i.timezone())}case re.Type.Interval:{let i=r.type(new re.Interval);return new Ge.Interval(i.unit())}case re.Type.Union:{let i=r.type(new re.Union);return new Ge.Union(i.mode(),i.typeIdsArray()||[],e||[])}case re.Type.FixedSizeBinary:{let i=r.type(new re.FixedSizeBinary);return new Ge.FixedSizeBinary(i.byteWidth())}case re.Type.FixedSizeList:{let i=r.type(new re.FixedSizeList);return new Ge.FixedSizeList(i.listSize(),(e||[])[0])}case re.Type.Map:{let i=r.type(new re.Map);return new Ge.Map_((e||[])[0],i.keysSorted())}}throw new Error(`Unrecognized type: "${re.Type[t]}" (${t})`)}function JF(r,e){let t=e.fields.map(s=>Bt.Field.encode(r,s));re.Schema.startFieldsVector(r,t.length);let i=re.Schema.createFieldsVector(r,t),n=e.metadata&&e.metadata.size>0?re.Schema.createCustomMetadataVector(r,[...e.metadata].map(([s,l])=>{let y=r.createString(`${s}`),w=r.createString(`${l}`);return re.KeyValue.startKeyValue(r),re.KeyValue.addKey(r,y),re.KeyValue.addValue(r,w),re.KeyValue.endKeyValue(r)})):-1;return re.Schema.startSchema(r),re.Schema.addFields(r,i),re.Schema.addEndianness(r,rk?re.Endianness.Little:re.Endianness.Big),n!==-1&&re.Schema.addCustomMetadata(r,n),re.Schema.endSchema(r)}function ZF(r,e){let t=-1,i=-1,n=-1,s=e.type,l=e.typeId;Ge.DataType.isDictionary(s)?(l=s.dictionary.typeId,n=Vh.instance.visit(s,r),i=Vh.instance.visit(s.dictionary,r)):i=Vh.instance.visit(s,r);let y=(s.children||[]).map(k=>Bt.Field.encode(r,k)),w=re.Field.createChildrenVector(r,y),D=e.metadata&&e.metadata.size>0?re.Field.createCustomMetadataVector(r,[...e.metadata].map(([k,Y])=>{let J=r.createString(`${k}`),ie=r.createString(`${Y}`);return re.KeyValue.startKeyValue(r),re.KeyValue.addKey(r,J),re.KeyValue.addValue(r,ie),re.KeyValue.endKeyValue(r)})):-1;return e.name&&(t=r.createString(e.name)),re.Field.startField(r),re.Field.addType(r,i),re.Field.addTypeType(r,l),re.Field.addChildren(r,w),re.Field.addNullable(r,!!e.nullable),t!==-1&&re.Field.addName(r,t),n!==-1&&re.Field.addDictionary(r,n),D!==-1&&re.Field.addCustomMetadata(r,D),re.Field.endField(r)}function XF(r,e){let t=e.nodes||[],i=e.buffers||[];Je.RecordBatch.startNodesVector(r,t.length),t.slice().reverse().forEach(l=>xn.encode(r,l));let n=r.endVector();Je.RecordBatch.startBuffersVector(r,i.length),i.slice().reverse().forEach(l=>Ln.encode(r,l));let s=r.endVector();return Je.RecordBatch.startRecordBatch(r),Je.RecordBatch.addLength(r,new Pn(e.length,0)),Je.RecordBatch.addNodes(r,n),Je.RecordBatch.addBuffers(r,s),Je.RecordBatch.endRecordBatch(r)}function QF(r,e){let t=lr.encode(r,e.data);return Je.DictionaryBatch.startDictionaryBatch(r),Je.DictionaryBatch.addId(r,new Pn(e.id,0)),Je.DictionaryBatch.addIsDelta(r,e.isDelta),Je.DictionaryBatch.addData(r,t),Je.DictionaryBatch.endDictionaryBatch(r)}function ek(r,e){return Je.FieldNode.createFieldNode(r,new Pn(e.length,0),new Pn(e.nullCount,0))}function tk(r,e){return re.Buffer.createBuffer(r,new Pn(e.offset,0),new Pn(e.length,0))}var rk=function(){let r=new ArrayBuffer(2);return new DataView(r).setInt16(0,256,!0),new Int16Array(r)[0]===256}()});var pc=E(Ae=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:!0});Ae.magicX2AndPadding=Ae.magicAndPadding=Ae.magicLength=Ae.checkForMagicArrowString=Ae.MAGIC=Ae.MAGIC_STR=Ae.PADDING=Ae.JSONMessageReader=Ae.AsyncMessageReader=Ae.MessageReader=void 0;var en=kt(),tn=xe(),ik=ni(),rw=ik.flatbuffers.ByteBuffer,la=Nn(),nk=Mt(),sk=jh(),iw=mt(),hc=Gi(),Sr=vs(),Eh=r=>`Expected ${tn.MessageHeader[r]} Message in stream, but was null or length 0.`,Rh=r=>`Header pointer of flatbuffer-encoded ${tn.MessageHeader[r]} Message is null or length 0.`,nw=(r,e)=>`Expected to read ${r} metadata bytes, but only read ${e}.`,sw=(r,e)=>`Expected to read ${r} bytes for message body, but only read ${e}.`,Nh=class{constructor(e){this.source=e instanceof hc.ByteStream?e:new hc.ByteStream(e)}[Symbol.iterator](){return this}next(){let e;return(e=this.readMetadataLength()).done||e.value===-1&&(e=this.readMetadataLength()).done||(e=this.readMetadata(e.value)).done?Sr.ITERATOR_DONE:e}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}readMessage(e){let t;if((t=this.next()).done)return null;if(e!=null&&t.value.headerType!==e)throw new Error(Eh(e));return t.value}readMessageBody(e){if(e<=0)return new Uint8Array(0);let t=iw.toUint8Array(this.source.read(e));if(t.byteLength<e)throw new Error(sw(e,t.byteLength));return t.byteOffset%8===0&&t.byteOffset+t.byteLength<=t.buffer.byteLength?t:t.slice()}readSchema(e=!1){let t=tn.MessageHeader.Schema,i=this.readMessage(t),n=i==null?void 0:i.header();if(e&&!n)throw new Error(Rh(t));return n}readMetadataLength(){let e=this.source.read(Ae.PADDING),t=e&&new rw(e),i=(t==null?void 0:t.readInt32(0))||0;return{done:i===0,value:i}}readMetadata(e){let t=this.source.read(e);if(!t)return Sr.ITERATOR_DONE;if(t.byteLength<e)throw new Error(nw(e,t.byteLength));return{done:!1,value:la.Message.decode(t)}}};Ae.MessageReader=Nh;var ow=class{constructor(e,t){this.source=e instanceof hc.AsyncByteStream?e:nk.isFileHandle(e)?new sk.AsyncRandomAccessFile(e,t):new hc.AsyncByteStream(e)}[Symbol.asyncIterator](){return this}next(){return en.__awaiter(this,void 0,void 0,function*(){let e;return(e=yield this.readMetadataLength()).done||e.value===-1&&(e=yield this.readMetadataLength()).done||(e=yield this.readMetadata(e.value)).done?Sr.ITERATOR_DONE:e})}throw(e){return en.__awaiter(this,void 0,void 0,function*(){return yield this.source.throw(e)})}return(e){return en.__awaiter(this,void 0,void 0,function*(){return yield this.source.return(e)})}readMessage(e){return en.__awaiter(this,void 0,void 0,function*(){let t;if((t=yield this.next()).done)return null;if(e!=null&&t.value.headerType!==e)throw new Error(Eh(e));return t.value})}readMessageBody(e){return en.__awaiter(this,void 0,void 0,function*(){if(e<=0)return new Uint8Array(0);let t=iw.toUint8Array(yield this.source.read(e));if(t.byteLength<e)throw new Error(sw(e,t.byteLength));return t.byteOffset%8===0&&t.byteOffset+t.byteLength<=t.buffer.byteLength?t:t.slice()})}readSchema(e=!1){return en.__awaiter(this,void 0,void 0,function*(){let t=tn.MessageHeader.Schema,i=yield this.readMessage(t),n=i==null?void 0:i.header();if(e&&!n)throw new Error(Rh(t));return n})}readMetadataLength(){return en.__awaiter(this,void 0,void 0,function*(){let e=yield this.source.read(Ae.PADDING),t=e&&new rw(e),i=(t==null?void 0:t.readInt32(0))||0;return{done:i===0,value:i}})}readMetadata(e){return en.__awaiter(this,void 0,void 0,function*(){let t=yield this.source.read(e);if(!t)return Sr.ITERATOR_DONE;if(t.byteLength<e)throw new Error(nw(e,t.byteLength));return{done:!1,value:la.Message.decode(t)}})}};Ae.AsyncMessageReader=ow;var aw=class extends Nh{constructor(e){super(new Uint8Array(0));this._schema=!1,this._body=[],this._batchIndex=0,this._dictionaryIndex=0,this._json=e instanceof Sr.ArrowJSON?e:new Sr.ArrowJSON(e)}next(){let{_json:e}=this;if(!this._schema){this._schema=!0;let t=la.Message.fromJSON(e.schema,tn.MessageHeader.Schema);return{done:!1,value:t}}if(this._dictionaryIndex<e.dictionaries.length){let t=e.dictionaries[this._dictionaryIndex++];this._body=t.data.columns;let i=la.Message.fromJSON(t,tn.MessageHeader.DictionaryBatch);return{done:!1,value:i}}if(this._batchIndex<e.batches.length){let t=e.batches[this._batchIndex++];this._body=t.columns;let i=la.Message.fromJSON(t,tn.MessageHeader.RecordBatch);return{done:!1,value:i}}return this._body=[],Sr.ITERATOR_DONE}readMessageBody(e){return t(this._body);function t(i){return(i||[]).reduce((n,s)=>[...n,...s.VALIDITY&&[s.VALIDITY]||[],...s.TYPE&&[s.TYPE]||[],...s.OFFSET&&[s.OFFSET]||[],...s.DATA&&[s.DATA]||[],...t(s.children)],[])}}readMessage(e){let t;if((t=this.next()).done)return null;if(e!=null&&t.value.headerType!==e)throw new Error(Eh(e));return t.value}readSchema(){let e=tn.MessageHeader.Schema,t=this.readMessage(e),i=t==null?void 0:t.header();if(!t||!i)throw new Error(Rh(e));return i}};Ae.JSONMessageReader=aw;Ae.PADDING=4;Ae.MAGIC_STR="ARROW1";Ae.MAGIC=new Uint8Array(Ae.MAGIC_STR.length);for(let r=0;r<Ae.MAGIC_STR.length;r+=1|0)Ae.MAGIC[r]=Ae.MAGIC_STR.charCodeAt(r);function ok(r,e=0){for(let t=-1,i=Ae.MAGIC.length;++t<i;)if(Ae.MAGIC[t]!==r[e+t])return!1;return!0}Ae.checkForMagicArrowString=ok;Ae.magicLength=Ae.MAGIC.length;Ae.magicAndPadding=Ae.magicLength+Ae.PADDING;Ae.magicX2AndPadding=Ae.magicLength*2+Ae.PADDING});var qh=E(tt=>{"use strict";Object.defineProperty(tt,"__esModule",{value:!0});tt.compareTypes=tt.compareFields=tt.compareSchemas=tt.instance=tt.TypeComparator=void 0;var ak=Dt(),le=class extends ak.Visitor{compareSchemas(e,t){return e===t||t instanceof e.constructor&&this.compareManyFields(e.fields,t.fields)}compareManyFields(e,t){return e===t||Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&e.every((i,n)=>this.compareFields(i,t[n]))}compareFields(e,t){return e===t||t instanceof e.constructor&&e.name===t.name&&e.nullable===t.nullable&&this.visit(e.type,t.type)}};tt.TypeComparator=le;function xt(r,e){return e instanceof r.constructor}function da(r,e){return r===e||xt(r,e)}function pi(r,e){return r===e||xt(r,e)&&r.bitWidth===e.bitWidth&&r.isSigned===e.isSigned}function _c(r,e){return r===e||xt(r,e)&&r.precision===e.precision}function uk(r,e){return r===e||xt(r,e)&&r.byteWidth===e.byteWidth}function Ph(r,e){return r===e||xt(r,e)&&r.unit===e.unit}function fa(r,e){return r===e||xt(r,e)&&r.unit===e.unit&&r.timezone===e.timezone}function ha(r,e){return r===e||xt(r,e)&&r.unit===e.unit&&r.bitWidth===e.bitWidth}function ck(r,e){return r===e||xt(r,e)&&r.children.length===e.children.length&&tt.instance.compareManyFields(r.children,e.children)}function lk(r,e){return r===e||xt(r,e)&&r.children.length===e.children.length&&tt.instance.compareManyFields(r.children,e.children)}function Lh(r,e){return r===e||xt(r,e)&&r.mode===e.mode&&r.typeIds.every((t,i)=>t===e.typeIds[i])&&tt.instance.compareManyFields(r.children,e.children)}function dk(r,e){return r===e||xt(r,e)&&r.id===e.id&&r.isOrdered===e.isOrdered&&tt.instance.visit(r.indices,e.indices)&&tt.instance.visit(r.dictionary,e.dictionary)}function xh(r,e){return r===e||xt(r,e)&&r.unit===e.unit}function fk(r,e){return r===e||xt(r,e)&&r.listSize===e.listSize&&r.children.length===e.children.length&&tt.instance.compareManyFields(r.children,e.children)}function hk(r,e){return r===e||xt(r,e)&&r.keysSorted===e.keysSorted&&r.children.length===e.children.length&&tt.instance.compareManyFields(r.children,e.children)}le.prototype.visitNull=da;le.prototype.visitBool=da;le.prototype.visitInt=pi;le.prototype.visitInt8=pi;le.prototype.visitInt16=pi;le.prototype.visitInt32=pi;le.prototype.visitInt64=pi;le.prototype.visitUint8=pi;le.prototype.visitUint16=pi;le.prototype.visitUint32=pi;le.prototype.visitUint64=pi;le.prototype.visitFloat=_c;le.prototype.visitFloat16=_c;le.prototype.visitFloat32=_c;le.prototype.visitFloat64=_c;le.prototype.visitUtf8=da;le.prototype.visitBinary=da;le.prototype.visitFixedSizeBinary=uk;le.prototype.visitDate=Ph;le.prototype.visitDateDay=Ph;le.prototype.visitDateMillisecond=Ph;le.prototype.visitTimestamp=fa;le.prototype.visitTimestampSecond=fa;le.prototype.visitTimestampMillisecond=fa;le.prototype.visitTimestampMicrosecond=fa;le.prototype.visitTimestampNanosecond=fa;le.prototype.visitTime=ha;le.prototype.visitTimeSecond=ha;le.prototype.visitTimeMillisecond=ha;le.prototype.visitTimeMicrosecond=ha;le.prototype.visitTimeNanosecond=ha;le.prototype.visitDecimal=da;le.prototype.visitList=ck;le.prototype.visitStruct=lk;le.prototype.visitUnion=Lh;le.prototype.visitDenseUnion=Lh;le.prototype.visitSparseUnion=Lh;le.prototype.visitDictionary=dk;le.prototype.visitInterval=xh;le.prototype.visitIntervalDayTime=xh;le.prototype.visitIntervalYearMonth=xh;le.prototype.visitFixedSizeList=fk;le.prototype.visitMap=hk;tt.instance=new le;function pk(r,e){return tt.instance.compareSchemas(r,e)}tt.compareSchemas=pk;function _k(r,e){return tt.instance.compareFields(r,e)}tt.compareFields=_k;function yk(r,e){return tt.instance.visit(r,e)}tt.compareTypes=yk});var fw=E(yc=>{"use strict";Object.defineProperty(yc,"__esModule",{value:!0});yc.VectorAssembler=void 0;var mk=Dt(),uw=xe(),bk=_i(),zh=mt(),Wh=Er(),gk=Vn(),cw=Nn(),lw=Ve(),ft=class extends mk.Visitor{constructor(){super();this._byteLength=0,this._nodes=[],this._buffers=[],this._bufferRegions=[]}static assemble(...e){let t=new ft,i=gk.selectVectorChildrenArgs(bk.RecordBatch,e),[n=t]=t.visitMany(i);return n}visit(e){if(!lw.DataType.isDictionary(e.type)){let{data:t,length:i,nullCount:n}=e;if(i>2147483647)throw new RangeError("Cannot write arrays larger than 2^31 - 1 in length");lw.DataType.isNull(e.type)||Dr.call(this,n<=0?new Uint8Array(0):Wh.truncateBitmap(t.offset,i,t.nullBitmap)),this.nodes.push(new cw.FieldNode(i,n))}return super.visit(e)}visitNull(e){return this}visitDictionary(e){return this.visit(e.indices)}get nodes(){return this._nodes}get buffers(){return this._buffers}get byteLength(){return this._byteLength}get bufferRegions(){return this._bufferRegions}};yc.VectorAssembler=ft;function Dr(r){let e=r.byteLength+7&~7;return this.buffers.push(r),this.bufferRegions.push(new cw.BufferRegion(this._byteLength,e)),this._byteLength+=e,this}function vk(r){let{type:e,length:t,typeIds:i,valueOffsets:n}=r;if(Dr.call(this,i),e.mode===uw.UnionMode.Sparse)return Yh.call(this,r);if(e.mode===uw.UnionMode.Dense){if(r.offset<=0)return Dr.call(this,n),Yh.call(this,r);{let s=i.reduce((k,Y)=>Math.max(k,Y),i[0]),l=new Int32Array(s+1),y=new Int32Array(s+1).fill(-1),w=new Int32Array(t),D=zh.rebaseValueOffsets(-n[0],t,n);for(let k,Y,J=-1;++J<t;)(Y=y[k=i[J]])===-1&&(Y=y[k]=D[k]),w[J]=D[J]-Y,++l[k];Dr.call(this,w);for(let k,Y=-1,J=e.children.length;++Y<J;)if(k=r.getChildAt(Y)){let ie=e.typeIds[Y],Ye=Math.min(t,l[ie]);this.visit(k.slice(y[ie],Ye))}}}return this}function wk(r){let e;return r.nullCount>=r.length?Dr.call(this,new Uint8Array(0)):(e=r.values)instanceof Uint8Array?Dr.call(this,Wh.truncateBitmap(r.offset,r.length,e)):Dr.call(this,Wh.packBools(r))}function rn(r){return Dr.call(this,r.values.subarray(0,r.length*r.stride))}function dw(r){let{length:e,values:t,valueOffsets:i}=r,n=i[0],s=i[e],l=Math.min(s-n,t.byteLength-n);return Dr.call(this,zh.rebaseValueOffsets(-i[0],e,i)),Dr.call(this,t.subarray(n,n+l)),this}function Hh(r){let{length:e,valueOffsets:t}=r;return t&&Dr.call(this,zh.rebaseValueOffsets(t[0],e,t)),this.visit(r.getChildAt(0))}function Yh(r){return this.visitMany(r.type.children.map((e,t)=>r.getChildAt(t)).filter(Boolean))[0]}ft.prototype.visitBool=wk;ft.prototype.visitInt=rn;ft.prototype.visitFloat=rn;ft.prototype.visitUtf8=dw;ft.prototype.visitBinary=dw;ft.prototype.visitFixedSizeBinary=rn;ft.prototype.visitDate=rn;ft.prototype.visitTimestamp=rn;ft.prototype.visitTime=rn;ft.prototype.visitDecimal=rn;ft.prototype.visitList=Hh;ft.prototype.visitStruct=Yh;ft.prototype.visitUnion=vk;ft.prototype.visitInterval=rn;ft.prototype.visitFixedSizeList=Hh;ft.prototype.visitMap=Hh});var pw=E(mc=>{"use strict";Object.defineProperty(mc,"__esModule",{value:!0});mc.JSONTypeAssembler=void 0;var jk=Dt(),Ot=Vi(),Zs=xe(),hw=class extends jk.Visitor{visit(e){return e==null?void 0:super.visit(e)}visitNull({typeId:e}){return{name:Ot.Type[e].toLowerCase()}}visitInt({typeId:e,bitWidth:t,isSigned:i}){return{name:Ot.Type[e].toLowerCase(),bitWidth:t,isSigned:i}}visitFloat({typeId:e,precision:t}){return{name:Ot.Type[e].toLowerCase(),precision:Zs.Precision[t]}}visitBinary({typeId:e}){return{name:Ot.Type[e].toLowerCase()}}visitBool({typeId:e}){return{name:Ot.Type[e].toLowerCase()}}visitUtf8({typeId:e}){return{name:Ot.Type[e].toLowerCase()}}visitDecimal({typeId:e,scale:t,precision:i}){return{name:Ot.Type[e].toLowerCase(),scale:t,precision:i}}visitDate({typeId:e,unit:t}){return{name:Ot.Type[e].toLowerCase(),unit:Zs.DateUnit[t]}}visitTime({typeId:e,unit:t,bitWidth:i}){return{name:Ot.Type[e].toLowerCase(),unit:Zs.TimeUnit[t],bitWidth:i}}visitTimestamp({typeId:e,timezone:t,unit:i}){return{name:Ot.Type[e].toLowerCase(),unit:Zs.TimeUnit[i],timezone:t}}visitInterval({typeId:e,unit:t}){return{name:Ot.Type[e].toLowerCase(),unit:Zs.IntervalUnit[t]}}visitList({typeId:e}){return{name:Ot.Type[e].toLowerCase()}}visitStruct({typeId:e}){return{name:Ot.Type[e].toLowerCase()}}visitUnion({typeId:e,mode:t,typeIds:i}){return{name:Ot.Type[e].toLowerCase(),mode:Zs.UnionMode[t],typeIds:[...i]}}visitDictionary(e){return this.visit(e.dictionary)}visitFixedSizeBinary({typeId:e,byteWidth:t}){return{name:Ot.Type[e].toLowerCase(),byteWidth:t}}visitFixedSizeList({typeId:e,listSize:t}){return{name:Ot.Type[e].toLowerCase(),listSize:t}}visitMap({typeId:e,keysSorted:t}){return{name:Ot.Type[e].toLowerCase(),keysSorted:t}}};mc.JSONTypeAssembler=hw});var mw=E(vc=>{"use strict";Object.defineProperty(vc,"__esModule",{value:!0});vc.JSONVectorAssembler=void 0;var Bk=ta(),pa=$s(),Ik=nt(),Tk=Dt(),Sk=xe(),Dk=_i(),$h=xe(),bc=Er(),Ak=Vn(),_w=Ve(),gc=class extends Tk.Visitor{static assemble(...e){return new gc().visitMany(Ak.selectColumnChildrenArgs(Dk.RecordBatch,e))}visit(e){let{data:t,name:i,length:n}=e,{offset:s,nullCount:l,nullBitmap:y}=t,w=_w.DataType.isDictionary(e.type)?e.type.indices:e.type,D=Object.assign([],t.buffers,{[Sk.BufferType.VALIDITY]:void 0});return Object.assign({name:i,count:n,VALIDITY:_w.DataType.isNull(w)?void 0:l<=0?Array.from({length:n},()=>1):[...new bc.BitIterator(y,s,n,null,bc.getBit)]},super.visit(Ik.Vector.new(t.clone(w,s,n,0,D))))}visitNull(){return{}}visitBool({values:e,offset:t,length:i}){return{DATA:[...new bc.BitIterator(e,t,i,null,bc.getBool)]}}visitInt(e){return{DATA:e.type.bitWidth<64?[...e.values]:[..._a(e.values,2)]}}visitFloat(e){return{DATA:[...e.values]}}visitUtf8(e){return{DATA:[...e],OFFSET:[...e.valueOffsets]}}visitBinary(e){return{DATA:[...yw(e)],OFFSET:[...e.valueOffsets]}}visitFixedSizeBinary(e){return{DATA:[...yw(e)]}}visitDate(e){return{DATA:e.type.unit===$h.DateUnit.DAY?[...e.values]:[..._a(e.values,2)]}}visitTimestamp(e){return{DATA:[..._a(e.values,2)]}}visitTime(e){return{DATA:e.type.unit<$h.TimeUnit.MICROSECOND?[...e.values]:[..._a(e.values,2)]}}visitDecimal(e){return{DATA:[..._a(e.values,4)]}}visitList(e){return{OFFSET:[...e.valueOffsets],children:e.type.children.map((t,i)=>this.visit(new pa.Column(t,[e.getChildAt(i)])))}}visitStruct(e){return{children:e.type.children.map((t,i)=>this.visit(new pa.Column(t,[e.getChildAt(i)])))}}visitUnion(e){return{TYPE:[...e.typeIds],OFFSET:e.type.mode===$h.UnionMode.Dense?[...e.valueOffsets]:void 0,children:e.type.children.map((t,i)=>this.visit(new pa.Column(t,[e.getChildAt(i)])))}}visitInterval(e){return{DATA:[...e.values]}}visitFixedSizeList(e){return{children:e.type.children.map((t,i)=>this.visit(new pa.Column(t,[e.getChildAt(i)])))}}visitMap(e){return{OFFSET:[...e.valueOffsets],children:e.type.children.map((t,i)=>this.visit(new pa.Column(t,[e.getChildAt(i)])))}}};vc.JSONVectorAssembler=gc;function*yw(r){for(let e of r)yield e.reduce((t,i)=>`${t}${("0"+(i&255).toString(16)).slice(-2)}`,"").toUpperCase()}function*_a(r,e){for(let t=-1,i=r.length/e;++t<i;)yield`${Bk.BN.new(r.subarray((t+0)*e,(t+1)*e),!1)}`}});var Tc=E(Yr=>{"use strict";Object.defineProperty(Yr,"__esModule",{value:!0});Yr.RecordBatchJSONWriter=Yr.RecordBatchFileWriter=Yr.RecordBatchStreamWriter=Yr.RecordBatchWriter=void 0;var bw=kt(),Gh=ma(),Ok=pc(),Fk=$s(),kk=Ve(),Mk=wt(),wc=Nn(),Kh=Nn(),Xs=gh(),Jh=xe(),gw=qh(),Zh=Gi(),vw=fw(),Ck=pw(),ww=mw(),Uk=mt(),Xh=_i(),Vk=vs(),Hr=Mt(),ya=class extends Vk.ReadableInterop{constructor(e){super();this._position=0,this._started=!1,this._sink=new Zh.AsyncByteQueue,this._schema=null,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._dictionaryDeltaOffsets=new Map,Hr.isObject(e)||(e={autoDestroy:!0,writeLegacyIpcFormat:!1}),this._autoDestroy=typeof e.autoDestroy=="boolean"?e.autoDestroy:!0,this._writeLegacyIpcFormat=typeof e.writeLegacyIpcFormat=="boolean"?e.writeLegacyIpcFormat:!1}static throughNode(e){throw new Error('"throughNode" not available in this environment')}static throughDOM(e,t){throw new Error('"throughDOM" not available in this environment')}toString(e=!1){return this._sink.toString(e)}toUint8Array(e=!1){return this._sink.toUint8Array(e)}writeAll(e){return Hr.isPromise(e)?e.then(t=>this.writeAll(t)):Hr.isAsyncIterable(e)?ep(this,e):Qh(this,e)}get closed(){return this._sink.closed}[Symbol.asyncIterator](){return this._sink[Symbol.asyncIterator]()}toDOMStream(e){return this._sink.toDOMStream(e)}toNodeStream(e){return this._sink.toNodeStream(e)}close(){return this.reset()._sink.close()}abort(e){return this.reset()._sink.abort(e)}finish(){return this._autoDestroy?this.close():this.reset(this._sink,this._schema),this}reset(e=this._sink,t=null){return e===this._sink||e instanceof Zh.AsyncByteQueue?this._sink=e:(this._sink=new Zh.AsyncByteQueue,e&&Hr.isWritableDOMStream(e)?this.toDOMStream({type:"bytes"}).pipeTo(e):e&&Hr.isWritableNodeStream(e)&&this.toNodeStream({objectMode:!1}).pipe(e)),this._started&&this._schema&&this._writeFooter(this._schema),this._started=!1,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._dictionaryDeltaOffsets=new Map,(!t||!gw.compareSchemas(t,this._schema))&&(t===null?(this._position=0,this._schema=null):(this._started=!0,this._schema=t,this._writeSchema(t))),this}write(e){let t=null;if(this._sink){if(e==null)return this.finish()&&void 0;if(e instanceof Gh.Table&&!(t=e.schema))return this.finish()&&void 0;if(e instanceof Xh.RecordBatch&&!(t=e.schema))return this.finish()&&void 0}else throw new Error("RecordBatchWriter is closed");if(t&&!gw.compareSchemas(t,this._schema)){if(this._started&&this._autoDestroy)return this.close();this.reset(this._sink,t)}e instanceof Xh.RecordBatch?e instanceof Xh._InternalEmptyPlaceholderRecordBatch||this._writeRecordBatch(e):e instanceof Gh.Table?this.writeAll(e.chunks):Hr.isIterable(e)&&this.writeAll(e)}_writeMessage(e,t=8){let i=t-1,n=wc.Message.encode(e),s=n.byteLength,l=this._writeLegacyIpcFormat?4:8,y=s+l+i&~i,w=y-s-l;return e.headerType===Jh.MessageHeader.RecordBatch?this._recordBatchBlocks.push(new Xs.FileBlock(y,e.bodyLength,this._position)):e.headerType===Jh.MessageHeader.DictionaryBatch&&this._dictionaryBlocks.push(new Xs.FileBlock(y,e.bodyLength,this._position)),this._writeLegacyIpcFormat||this._write(Int32Array.of(-1)),this._write(Int32Array.of(y-l)),s>0&&this._write(n),this._writePadding(w)}_write(e){if(this._started){let t=Uk.toUint8Array(e);t&&t.byteLength>0&&(this._sink.write(t),this._position+=t.byteLength)}return this}_writeSchema(e){return this._writeMessage(wc.Message.from(e))}_writeFooter(e){return this._writeLegacyIpcFormat?this._write(Int32Array.of(0)):this._write(Int32Array.of(-1,0))}_writeMagic(){return this._write(Ok.MAGIC)}_writePadding(e){return e>0?this._write(new Uint8Array(e)):this}_writeRecordBatch(e){let{byteLength:t,nodes:i,bufferRegions:n,buffers:s}=vw.VectorAssembler.assemble(e),l=new Kh.RecordBatch(e.length,i,n),y=wc.Message.from(l,t);return this._writeDictionaries(e)._writeMessage(y)._writeBodyBuffers(s)}_writeDictionaryBatch(e,t,i=!1){this._dictionaryDeltaOffsets.set(t,e.length+(this._dictionaryDeltaOffsets.get(t)||0));let{byteLength:n,nodes:s,bufferRegions:l,buffers:y}=vw.VectorAssembler.assemble(e),w=new Kh.RecordBatch(e.length,s,l),D=new Kh.DictionaryBatch(w,t,i),k=wc.Message.from(D,n);return this._writeMessage(k)._writeBodyBuffers(y)}_writeBodyBuffers(e){let t,i,n;for(let s=-1,l=e.length;++s<l;)(t=e[s])&&(i=t.byteLength)>0&&(this._write(t),(n=(i+7&~7)-i)>0&&this._writePadding(n));return this}_writeDictionaries(e){for(let[t,i]of e.dictionaries){let n=this._dictionaryDeltaOffsets.get(t)||0;if(n===0||(i=i.slice(n)).length>0){let s="chunks"in i?i.chunks:[i];for(let l of s)this._writeDictionaryBatch(l,t,n>0),n+=l.length}}return this}};Yr.RecordBatchWriter=ya;var jc=class extends ya{static writeAll(e,t){let i=new jc(t);return Hr.isPromise(e)?e.then(n=>i.writeAll(n)):Hr.isAsyncIterable(e)?ep(i,e):Qh(i,e)}};Yr.RecordBatchStreamWriter=jc;var Bc=class extends ya{static writeAll(e){let t=new Bc;return Hr.isPromise(e)?e.then(i=>t.writeAll(i)):Hr.isAsyncIterable(e)?ep(t,e):Qh(t,e)}constructor(){super();this._autoDestroy=!0}_writeSchema(e){return this._writeMagic()._writePadding(2)}_writeFooter(e){let t=Xs.Footer.encode(new Xs.Footer(e,Jh.MetadataVersion.V4,this._recordBatchBlocks,this._dictionaryBlocks));return super._writeFooter(e)._write(t)._write(Int32Array.of(t.byteLength))._writeMagic()}};Yr.RecordBatchFileWriter=Bc;var Ic=class extends ya{constructor(){super();this._autoDestroy=!0,this._recordBatches=[],this._dictionaries=[]}static writeAll(e){return new Ic().writeAll(e)}_writeMessage(){return this}_writeFooter(e){return this}_writeSchema(e){return this._write(`{
8
- "schema": ${JSON.stringify({fields:e.fields.map(jw)},null,2)}`)}_writeDictionaries(e){return e.dictionaries.size>0&&this._dictionaries.push(e),this}_writeDictionaryBatch(e,t,i=!1){return this._dictionaryDeltaOffsets.set(t,e.length+(this._dictionaryDeltaOffsets.get(t)||0)),this._write(this._dictionaryBlocks.length===0?" ":`,
9
- `),this._write(`${Ek(e,t,i)}`),this._dictionaryBlocks.push(new Xs.FileBlock(0,0,0)),this}_writeRecordBatch(e){return this._writeDictionaries(e),this._recordBatches.push(e),this}close(){if(this._dictionaries.length>0){this._write(`,
10
- "dictionaries": [
11
- `);for(let e of this._dictionaries)super._writeDictionaries(e);this._write(`
12
- ]`)}if(this._recordBatches.length>0){for(let e=-1,t=this._recordBatches.length;++e<t;)this._write(e===0?`,
13
- "batches": [
14
- `:`,
15
- `),this._write(`${Rk(this._recordBatches[e])}`),this._recordBatchBlocks.push(new Xs.FileBlock(0,0,0));this._write(`
16
- ]`)}return this._schema&&this._write(`
17
- }`),this._dictionaries=[],this._recordBatches=[],super.close()}};Yr.RecordBatchJSONWriter=Ic;function Qh(r,e){let t=e;e instanceof Gh.Table&&(t=e.chunks,r.reset(void 0,e.schema));for(let i of t)r.write(i);return r.finish()}function ep(r,e){var t,i,n,s;return bw.__awaiter(this,void 0,void 0,function*(){try{for(t=bw.__asyncValues(e);i=yield t.next(),!i.done;){let l=i.value;r.write(l)}}catch(l){n={error:l}}finally{try{i&&!i.done&&(s=t.return)&&(yield s.call(t))}finally{if(n)throw n.error}}return r.finish()})}function jw({name:r,type:e,nullable:t}){let i=new Ck.JSONTypeAssembler;return{name:r,nullable:t,type:i.visit(e),children:(e.children||[]).map(jw),dictionary:kk.DataType.isDictionary(e)?{id:e.id,isOrdered:e.isOrdered,indexType:i.visit(e.indices)}:void 0}}function Ek(r,e,t=!1){let i=new Mk.Field(`${e}`,r.type,r.nullCount>0),n=ww.JSONVectorAssembler.assemble(new Fk.Column(i,[r]));return JSON.stringify({id:e,isDelta:t,data:{count:r.length,columns:n}},null,2)}function Rk(r){return JSON.stringify({count:r.length,columns:ww.JSONVectorAssembler.assemble(r)},null,2)}});var ip=E(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.distributeVectorsIntoRecordBatches=nn.distributeColumnsIntoRecordBatches=nn.ensureSameLengthData=void 0;var Bw=jr(),tp=wt(),Nk=Xi(),Pk=_i(),rp=new Uint8Array(0),Iw=r=>[rp,rp,new Uint8Array(r),rp];function Lk(r,e,t=e.reduce((i,n)=>Math.max(i,n.length),0)){let i,n,s=-1,l=e.length,y=[...r.fields],w=[],D=(t+63&~63)>>3;for(;++s<l;)(i=e[s])&&i.length===t?w[s]=i:((n=y[s]).nullable||(y[s]=y[s].clone({nullable:!0})),w[s]=i?i._changeLengthAndBackfillNullBitmap(t):Bw.Data.new(n.type,0,t,t,Iw(D)));return[new tp.Schema(y),t,w]}nn.ensureSameLengthData=Lk;function xk(r){return Tw(new tp.Schema(r.map(({field:e})=>e)),r)}nn.distributeColumnsIntoRecordBatches=xk;function Tw(r,e){return qk(r,e.map(t=>t instanceof Nk.Chunked?t.chunks.map(i=>i.data):[t.data]))}nn.distributeVectorsIntoRecordBatches=Tw;function qk(r,e){let t=[...r.fields],i=[],n={numBatches:e.reduce((Y,J)=>Math.max(Y,J.length),0)},s=0,l=0,y=-1,w=e.length,D,k=[];for(;n.numBatches-- >0;){for(l=Number.POSITIVE_INFINITY,y=-1;++y<w;)k[y]=D=e[y].shift(),l=Math.min(l,D?D.length:l);isFinite(l)&&(k=zk(t,l,k,e,n),l>0&&(i[s++]=[l,k.slice()]))}return[r=new tp.Schema(t,r.metadata),i.map(Y=>new Pk.RecordBatch(r,...Y))]}function zk(r,e,t,i,n){let s,l,y=0,w=-1,D=i.length,k=(e+63&~63)>>3;for(;++w<D;)(s=t[w])&&(y=s.length)>=e?y===e?t[w]=s:(t[w]=s.slice(0,e),s=s.slice(e,y-e),n.numBatches=Math.max(n.numBatches,i[w].unshift(s))):((l=r[w]).nullable||(r[w]=l.clone({nullable:!0})),t[w]=s?s._changeLengthAndBackfillNullBitmap(e):Bw.Data.new(l.type,0,e,e,Iw(k)));return t}});var ot=E(Sc=>{"use strict";Object.defineProperty(Sc,"__esModule",{value:!0});Sc.BaseVector=void 0;var Wk=xe(),Hk=Xi(),Yk=ca(),np=nt(),sp=class extends np.AbstractVector{constructor(e,t){super();this._children=t,this.numChildren=e.childData.length,this._bindDataAccessors(this.data=e)}get type(){return this.data.type}get typeId(){return this.data.typeId}get length(){return this.data.length}get offset(){return this.data.offset}get stride(){return this.data.stride}get nullCount(){return this.data.nullCount}get byteLength(){return this.data.byteLength}get VectorName(){return`${Wk.Type[this.typeId]}Vector`}get ArrayType(){return this.type.ArrayType}get values(){return this.data.values}get typeIds(){return this.data.typeIds}get nullBitmap(){return this.data.nullBitmap}get valueOffsets(){return this.data.valueOffsets}get[Symbol.toStringTag](){return`${this.VectorName}<${this.type[Symbol.toStringTag]}>`}clone(e,t=this._children){return np.Vector.new(e,t)}concat(...e){return Hk.Chunked.concat(this,...e)}slice(e,t){return Yk.clampRange(this,e,t,this._sliceInternal)}isValid(e){if(this.nullCount>0){let t=this.offset+e;return(this.nullBitmap[t>>3]&1<<t%8)!==0}return!0}getChildAt(e){return e<0||e>=this.numChildren?null:(this._children||(this._children=[]))[e]||(this._children[e]=np.Vector.new(this.data.childData[e]))}toJSON(){return[...this]}_sliceInternal(e,t,i){return e.clone(e.data.slice(t,i-t),null)}_bindDataAccessors(e){}};Sc.BaseVector=sp;sp.prototype[Symbol.isConcatSpreadable]=!0});var op=E(Dc=>{"use strict";Object.defineProperty(Dc,"__esModule",{value:!0});Dc.BinaryVector=void 0;var $k=nt(),Gk=ot(),Kk=Ve(),Sw=class extends Gk.BaseVector{asUtf8(){return $k.Vector.new(this.data.clone(new Kk.Utf8))}};Dc.BinaryVector=Sw});var ap=E(Ac=>{"use strict";Object.defineProperty(Ac,"__esModule",{value:!0});Ac.BoolVector=void 0;var Jk=Ve(),Zk=ot(),Xk=$r(),Dw=class extends Zk.BaseVector{static from(e){return Xk.vectorFromValuesWithType(()=>new Jk.Bool,e)}};Ac.BoolVector=Dw});var cp=E(sn=>{"use strict";Object.defineProperty(sn,"__esModule",{value:!0});sn.DateMillisecondVector=sn.DateDayVector=sn.DateVector=void 0;var Qk=xe(),eM=ot(),Aw=$r(),up=Ve(),Oc=class extends eM.BaseVector{static from(...e){return e.length===2?Aw.vectorFromValuesWithType(()=>e[1]===Qk.DateUnit.DAY?new up.DateDay:new up.DateMillisecond,e[0]):Aw.vectorFromValuesWithType(()=>new up.DateMillisecond,e[0])}};sn.DateVector=Oc;var Ow=class extends Oc{};sn.DateDayVector=Ow;var Fw=class extends Oc{};sn.DateMillisecondVector=Fw});var lp=E(Fc=>{"use strict";Object.defineProperty(Fc,"__esModule",{value:!0});Fc.DecimalVector=void 0;var tM=ot(),kw=class extends tM.BaseVector{};Fc.DecimalVector=kw});var Mc=E(kc=>{"use strict";Object.defineProperty(kc,"__esModule",{value:!0});kc.DictionaryVector=void 0;var rM=jr(),Mw=nt(),iM=ot(),nM=$r(),sM=Ve(),dp=class extends iM.BaseVector{constructor(e){super(e);this.indices=Mw.Vector.new(e.clone(this.type.indices))}static from(...e){if(e.length===3){let[t,i,n]=e,s=new sM.Dictionary(t.type,i,null,null);return Mw.Vector.new(rM.Data.Dictionary(s,0,n.length,0,null,n,t))}return nM.vectorFromValuesWithType(()=>e[0].type,e[0])}get dictionary(){return this.data.dictionary}reverseLookup(e){return this.dictionary.indexOf(e)}getKey(e){return this.indices.get(e)}getValue(e){return this.dictionary.get(e)}setKey(e,t){return this.indices.set(e,t)}setValue(e,t){return this.dictionary.set(e,t)}};kc.DictionaryVector=dp;dp.prototype.indices=null});var fp=E(Cc=>{"use strict";Object.defineProperty(Cc,"__esModule",{value:!0});Cc.FixedSizeBinaryVector=void 0;var oM=ot(),Cw=class extends oM.BaseVector{};Cc.FixedSizeBinaryVector=Cw});var hp=E(Uc=>{"use strict";Object.defineProperty(Uc,"__esModule",{value:!0});Uc.FixedSizeListVector=void 0;var aM=ot(),Uw=class extends aM.BaseVector{};Uc.FixedSizeListVector=Uw});var mp=E(Gr=>{"use strict";Object.defineProperty(Gr,"__esModule",{value:!0});Gr.Float64Vector=Gr.Float32Vector=Gr.Float16Vector=Gr.FloatVector=void 0;var uM=jr(),cM=nt(),lM=ot(),dM=$r(),qn=Ve(),ba=class extends lM.BaseVector{static from(e){let t=pM(this);if(e instanceof ArrayBuffer||ArrayBuffer.isView(e)){let i=hM(e.constructor)||t;if(t===null&&(t=i),t&&t===i){let n=new t,s=e.byteLength/n.ArrayType.BYTES_PER_ELEMENT;if(!fM(t,e.constructor))return cM.Vector.new(uM.Data.Float(n,0,s,0,null,e))}}if(t)return dM.vectorFromValuesWithType(()=>new t,e);throw e instanceof DataView||e instanceof ArrayBuffer?new TypeError(`Cannot infer float type from instance of ${e.constructor.name}`):new TypeError("Unrecognized FloatVector input")}};Gr.FloatVector=ba;var pp=class extends ba{toFloat32Array(){return new Float32Array(this)}toFloat64Array(){return new Float64Array(this)}};Gr.Float16Vector=pp;var _p=class extends ba{};Gr.Float32Vector=_p;var yp=class extends ba{};Gr.Float64Vector=yp;var fM=(r,e)=>r===qn.Float16&&e!==Uint16Array,hM=r=>{switch(r){case Uint16Array:return qn.Float16;case Float32Array:return qn.Float32;case Float64Array:return qn.Float64;default:return null}},pM=r=>{switch(r){case pp:return qn.Float16;case _p:return qn.Float32;case yp:return qn.Float64;default:return null}}});var bp=E(on=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});on.IntervalYearMonthVector=on.IntervalDayTimeVector=on.IntervalVector=void 0;var _M=ot(),Vc=class extends _M.BaseVector{};on.IntervalVector=Vc;var Vw=class extends Vc{};on.IntervalDayTimeVector=Vw;var Ew=class extends Vc{};on.IntervalYearMonthVector=Ew});var Ec=E(ht=>{"use strict";Object.defineProperty(ht,"__esModule",{value:!0});ht.Uint64Vector=ht.Uint32Vector=ht.Uint16Vector=ht.Uint8Vector=ht.Int64Vector=ht.Int32Vector=ht.Int16Vector=ht.Int8Vector=ht.IntVector=void 0;var yM=jr(),mM=nt(),bM=ot(),gM=$r(),Rw=Mt(),Nw=mt(),rt=Ve(),Kr=class extends bM.BaseVector{static from(...e){let[t,i=!1]=e,n=jM(this,i);if(t instanceof ArrayBuffer||ArrayBuffer.isView(t)){let s=wM(t.constructor,i)||n;if(n===null&&(n=s),n&&n===s){let l=new n,y=t.byteLength/l.ArrayType.BYTES_PER_ELEMENT;return vM(n,t.constructor)&&(y*=.5),mM.Vector.new(yM.Data.Int(l,0,y,0,null,t))}}if(n)return gM.vectorFromValuesWithType(()=>new n,t);throw t instanceof DataView||t instanceof ArrayBuffer?new TypeError(`Cannot infer integer type from instance of ${t.constructor.name}`):new TypeError("Unrecognized IntVector input")}};ht.IntVector=Kr;var gp=class extends Kr{};ht.Int8Vector=gp;var vp=class extends Kr{};ht.Int16Vector=vp;var wp=class extends Kr{};ht.Int32Vector=wp;var jp=class extends Kr{toBigInt64Array(){return Nw.toBigInt64Array(this.values)}get values64(){return this._values64||(this._values64=this.toBigInt64Array())}};ht.Int64Vector=jp;var Bp=class extends Kr{};ht.Uint8Vector=Bp;var Ip=class extends Kr{};ht.Uint16Vector=Ip;var Tp=class extends Kr{};ht.Uint32Vector=Tp;var Sp=class extends Kr{toBigUint64Array(){return Nw.toBigUint64Array(this.values)}get values64(){return this._values64||(this._values64=this.toBigUint64Array())}};ht.Uint64Vector=Sp;var vM=(r,e)=>(r===rt.Int64||r===rt.Uint64)&&(e===Int32Array||e===Uint32Array),wM=(r,e)=>{switch(r){case Int8Array:return rt.Int8;case Int16Array:return rt.Int16;case Int32Array:return e?rt.Int64:rt.Int32;case Rw.BigInt64Array:return rt.Int64;case Uint8Array:return rt.Uint8;case Uint16Array:return rt.Uint16;case Uint32Array:return e?rt.Uint64:rt.Uint32;case Rw.BigUint64Array:return rt.Uint64;default:return null}},jM=(r,e)=>{switch(r){case gp:return rt.Int8;case vp:return rt.Int16;case wp:return e?rt.Int64:rt.Int32;case jp:return rt.Int64;case Bp:return rt.Uint8;case Ip:return rt.Uint16;case Tp:return e?rt.Uint64:rt.Uint32;case Sp:return rt.Uint64;default:return null}}});var Dp=E(Rc=>{"use strict";Object.defineProperty(Rc,"__esModule",{value:!0});Rc.ListVector=void 0;var BM=ot(),Pw=class extends BM.BaseVector{};Rc.ListVector=Pw});var Ap=E(Nc=>{"use strict";Object.defineProperty(Nc,"__esModule",{value:!0});Nc.MapVector=void 0;var IM=aa(),TM=nt(),SM=ot(),DM=Ve(),Lw=class extends SM.BaseVector{asList(){let e=this.type.children[0];return TM.Vector.new(this.data.clone(new DM.List(e)))}bind(e){let t=this.getChildAt(0),{[e]:i,[e+1]:n}=this.valueOffsets;return new IM.MapRow(t.slice(i,n))}};Nc.MapVector=Lw});var Op=E(Pc=>{"use strict";Object.defineProperty(Pc,"__esModule",{value:!0});Pc.NullVector=void 0;var AM=ot(),xw=class extends AM.BaseVector{};Pc.NullVector=xw});var Fp=E(Lc=>{"use strict";Object.defineProperty(Lc,"__esModule",{value:!0});Lc.StructVector=void 0;var OM=aa(),FM=ot(),kM=Symbol.for("rowIndex"),qw=class extends FM.BaseVector{bind(e){let t=this._row||(this._row=new OM.StructRow(this)),i=Object.create(t);return i[kM]=e,i}};Lc.StructVector=qw});var kp=E(fr=>{"use strict";Object.defineProperty(fr,"__esModule",{value:!0});fr.TimestampNanosecondVector=fr.TimestampMicrosecondVector=fr.TimestampMillisecondVector=fr.TimestampSecondVector=fr.TimestampVector=void 0;var MM=ot(),Qs=class extends MM.BaseVector{};fr.TimestampVector=Qs;var zw=class extends Qs{};fr.TimestampSecondVector=zw;var Ww=class extends Qs{};fr.TimestampMillisecondVector=Ww;var Hw=class extends Qs{};fr.TimestampMicrosecondVector=Hw;var Yw=class extends Qs{};fr.TimestampNanosecondVector=Yw});var Mp=E(hr=>{"use strict";Object.defineProperty(hr,"__esModule",{value:!0});hr.TimeNanosecondVector=hr.TimeMicrosecondVector=hr.TimeMillisecondVector=hr.TimeSecondVector=hr.TimeVector=void 0;var CM=ot(),eo=class extends CM.BaseVector{};hr.TimeVector=eo;var $w=class extends eo{};hr.TimeSecondVector=$w;var Gw=class extends eo{};hr.TimeMillisecondVector=Gw;var Kw=class extends eo{};hr.TimeMicrosecondVector=Kw;var Jw=class extends eo{};hr.TimeNanosecondVector=Jw});var Cp=E(an=>{"use strict";Object.defineProperty(an,"__esModule",{value:!0});an.SparseUnionVector=an.DenseUnionVector=an.UnionVector=void 0;var UM=ot(),xc=class extends UM.BaseVector{get typeIdToChildIndex(){return this.data.type.typeIdToChildIndex}};an.UnionVector=xc;var Zw=class extends xc{get valueOffsets(){return this.data.valueOffsets}};an.DenseUnionVector=Zw;var Xw=class extends xc{};an.SparseUnionVector=Xw});var Up=E(qc=>{"use strict";Object.defineProperty(qc,"__esModule",{value:!0});qc.Utf8Vector=void 0;var VM=nt(),EM=ot(),Qw=Ve(),RM=$r(),ej=class extends EM.BaseVector{static from(e){return RM.vectorFromValuesWithType(()=>new Qw.Utf8,e)}asBinary(){return VM.Vector.new(this.data.clone(new Qw.Binary))}};qc.Utf8Vector=ej});var tj=E(un=>{"use strict";Object.defineProperty(un,"__esModule",{value:!0});un.partial2=un.partial1=un.partial0=void 0;function NM(r){return function(){return r(this)}}un.partial0=NM;function PM(r){return function(e){return r(this,e)}}un.partial1=PM;function LM(r){return function(e,t){return r(this,e,t)}}un.partial2=LM});var Rp=E(to=>{"use strict";Object.defineProperty(to,"__esModule",{value:!0});to.instance=to.GetVisitor=void 0;var zc=ta(),xM=Dt(),qM=wn(),zM=Zo(),pr=xe(),de=class extends xM.Visitor{};to.GetVisitor=de;var WM=(r,e)=>864e5*r[e],Vp=(r,e)=>4294967296*r[e+1]+(r[e]>>>0),HM=(r,e)=>4294967296*(r[e+1]/1e3)+(r[e]>>>0)/1e3,YM=(r,e)=>4294967296*(r[e+1]/1e6)+(r[e]>>>0)/1e6,rj=r=>new Date(r),$M=(r,e)=>rj(WM(r,e)),GM=(r,e)=>rj(Vp(r,e)),KM=(r,e)=>null,ij=(r,e,t)=>{let{[t]:i,[t+1]:n}=e;return i!=null&&n!=null?r.subarray(i,n):null},JM=({offset:r,values:e},t)=>{let i=r+t;return(e[i>>3]&1<<i%8)!==0},nj=({values:r},e)=>$M(r,e),sj=({values:r},e)=>GM(r,e*2),Jr=({stride:r,values:e},t)=>e[r*t],oj=({stride:r,values:e},t)=>zM.uint16ToFloat64(e[r*t]),Ep=({stride:r,values:e,type:t},i)=>zc.BN.new(e.subarray(r*i,r*(i+1)),t.isSigned),ZM=({stride:r,values:e},t)=>e.subarray(r*t,r*(t+1)),XM=({values:r,valueOffsets:e},t)=>ij(r,e,t),QM=({values:r,valueOffsets:e},t)=>{let i=ij(r,e,t);return i!==null?qM.decodeUtf8(i):null},eC=(r,e)=>r.type.bitWidth<64?Jr(r,e):Ep(r,e),tC=(r,e)=>r.type.precision!==pr.Precision.HALF?Jr(r,e):oj(r,e),rC=(r,e)=>r.type.unit===pr.DateUnit.DAY?nj(r,e):sj(r,e),aj=({values:r},e)=>1e3*Vp(r,e*2),uj=({values:r},e)=>Vp(r,e*2),cj=({values:r},e)=>HM(r,e*2),lj=({values:r},e)=>YM(r,e*2),iC=(r,e)=>{switch(r.type.unit){case pr.TimeUnit.SECOND:return aj(r,e);case pr.TimeUnit.MILLISECOND:return uj(r,e);case pr.TimeUnit.MICROSECOND:return cj(r,e);case pr.TimeUnit.NANOSECOND:return lj(r,e)}},dj=({values:r,stride:e},t)=>r[e*t],fj=({values:r,stride:e},t)=>r[e*t],hj=({values:r},e)=>zc.BN.signed(r.subarray(2*e,2*(e+1))),pj=({values:r},e)=>zc.BN.signed(r.subarray(2*e,2*(e+1))),nC=(r,e)=>{switch(r.type.unit){case pr.TimeUnit.SECOND:return dj(r,e);case pr.TimeUnit.MILLISECOND:return fj(r,e);case pr.TimeUnit.MICROSECOND:return hj(r,e);case pr.TimeUnit.NANOSECOND:return pj(r,e)}},sC=({values:r},e)=>zc.BN.decimal(r.subarray(4*e,4*(e+1))),oC=(r,e)=>{let t=r.getChildAt(0),{valueOffsets:i,stride:n}=r;return t.slice(i[e*n],i[e*n+1])},aC=(r,e)=>r.bind(e),uC=(r,e)=>r.bind(e),cC=(r,e)=>r.type.mode===pr.UnionMode.Dense?_j(r,e):yj(r,e),_j=(r,e)=>{let t=r.typeIdToChildIndex[r.typeIds[e]],i=r.getChildAt(t);return i?i.get(r.valueOffsets[e]):null},yj=(r,e)=>{let t=r.typeIdToChildIndex[r.typeIds[e]],i=r.getChildAt(t);return i?i.get(e):null},lC=(r,e)=>r.getValue(r.getKey(e)),dC=(r,e)=>r.type.unit===pr.IntervalUnit.DAY_TIME?mj(r,e):bj(r,e),mj=({values:r},e)=>r.subarray(2*e,2*(e+1)),bj=({values:r},e)=>{let t=r[e],i=new Int32Array(2);return i[0]=t/12|0,i[1]=t%12|0,i},fC=(r,e)=>{let t=r.getChildAt(0),{stride:i}=r;return t.slice(e*i,(e+1)*i)};de.prototype.visitNull=KM;de.prototype.visitBool=JM;de.prototype.visitInt=eC;de.prototype.visitInt8=Jr;de.prototype.visitInt16=Jr;de.prototype.visitInt32=Jr;de.prototype.visitInt64=Ep;de.prototype.visitUint8=Jr;de.prototype.visitUint16=Jr;de.prototype.visitUint32=Jr;de.prototype.visitUint64=Ep;de.prototype.visitFloat=tC;de.prototype.visitFloat16=oj;de.prototype.visitFloat32=Jr;de.prototype.visitFloat64=Jr;de.prototype.visitUtf8=QM;de.prototype.visitBinary=XM;de.prototype.visitFixedSizeBinary=ZM;de.prototype.visitDate=rC;de.prototype.visitDateDay=nj;de.prototype.visitDateMillisecond=sj;de.prototype.visitTimestamp=iC;de.prototype.visitTimestampSecond=aj;de.prototype.visitTimestampMillisecond=uj;de.prototype.visitTimestampMicrosecond=cj;de.prototype.visitTimestampNanosecond=lj;de.prototype.visitTime=nC;de.prototype.visitTimeSecond=dj;de.prototype.visitTimeMillisecond=fj;de.prototype.visitTimeMicrosecond=hj;de.prototype.visitTimeNanosecond=pj;de.prototype.visitDecimal=sC;de.prototype.visitList=oC;de.prototype.visitStruct=uC;de.prototype.visitUnion=cC;de.prototype.visitDenseUnion=_j;de.prototype.visitSparseUnion=yj;de.prototype.visitDictionary=lC;de.prototype.visitInterval=dC;de.prototype.visitIntervalDayTime=mj;de.prototype.visitIntervalYearMonth=bj;de.prototype.visitFixedSizeList=fC;de.prototype.visitMap=aC;to.instance=new de});var jj=E(ro=>{"use strict";Object.defineProperty(ro,"__esModule",{value:!0});ro.instance=ro.IndexOfVisitor=void 0;var hC=Dt(),gj=Er(),vj=ca(),fe=class extends hC.Visitor{};ro.IndexOfVisitor=fe;function pC(r,e){return e===null&&r.length>0?0:-1}function _C(r,e){let{nullBitmap:t}=r.data;if(!t||r.nullCount<=0)return-1;let i=0;for(let n of new gj.BitIterator(t,r.data.offset+(e||0),r.length,t,gj.getBool)){if(!n)return i;++i}return-1}function Be(r,e,t){if(e===void 0)return-1;if(e===null)return _C(r,t);let i=vj.createElementComparator(e);for(let n=(t||0)-1,s=r.length;++n<s;)if(i(r.get(n)))return n;return-1}function wj(r,e,t){let i=vj.createElementComparator(e);for(let n=(t||0)-1,s=r.length;++n<s;)if(i(r.get(n)))return n;return-1}fe.prototype.visitNull=pC;fe.prototype.visitBool=Be;fe.prototype.visitInt=Be;fe.prototype.visitInt8=Be;fe.prototype.visitInt16=Be;fe.prototype.visitInt32=Be;fe.prototype.visitInt64=Be;fe.prototype.visitUint8=Be;fe.prototype.visitUint16=Be;fe.prototype.visitUint32=Be;fe.prototype.visitUint64=Be;fe.prototype.visitFloat=Be;fe.prototype.visitFloat16=Be;fe.prototype.visitFloat32=Be;fe.prototype.visitFloat64=Be;fe.prototype.visitUtf8=Be;fe.prototype.visitBinary=Be;fe.prototype.visitFixedSizeBinary=Be;fe.prototype.visitDate=Be;fe.prototype.visitDateDay=Be;fe.prototype.visitDateMillisecond=Be;fe.prototype.visitTimestamp=Be;fe.prototype.visitTimestampSecond=Be;fe.prototype.visitTimestampMillisecond=Be;fe.prototype.visitTimestampMicrosecond=Be;fe.prototype.visitTimestampNanosecond=Be;fe.prototype.visitTime=Be;fe.prototype.visitTimeSecond=Be;fe.prototype.visitTimeMillisecond=Be;fe.prototype.visitTimeMicrosecond=Be;fe.prototype.visitTimeNanosecond=Be;fe.prototype.visitDecimal=Be;fe.prototype.visitList=Be;fe.prototype.visitStruct=Be;fe.prototype.visitUnion=Be;fe.prototype.visitDenseUnion=wj;fe.prototype.visitSparseUnion=wj;fe.prototype.visitDictionary=Be;fe.prototype.visitInterval=Be;fe.prototype.visitIntervalDayTime=Be;fe.prototype.visitIntervalYearMonth=Be;fe.prototype.visitFixedSizeList=Be;fe.prototype.visitMap=Be;ro.instance=new fe});var Np=E(io=>{"use strict";Object.defineProperty(io,"__esModule",{value:!0});io.instance=io.IteratorVisitor=void 0;var Wc=xe(),yC=Dt(),mC=Er(),Bj=Rp(),he=class extends yC.Visitor{};io.IteratorVisitor=he;function bC(r){let e=Bj.instance.getVisitFn(r);return new mC.BitIterator(r.data.nullBitmap,r.data.offset,r.length,r,(t,i,n,s)=>(n&1<<s)!==0?e(t,i):null)}var Ij=class{constructor(e,t){this.vector=e,this.getFn=t,this.index=0}next(){return this.index<this.vector.length?{value:this.getFn(this.vector,this.index++)}:{done:!0,value:null}}[Symbol.iterator](){return this}};function ve(r){if(r.nullCount>0)return bC(r);let{type:e,typeId:t,length:i}=r;return r.stride===1&&(t===Wc.Type.Timestamp||t===Wc.Type.Int&&e.bitWidth!==64||t===Wc.Type.Time&&e.bitWidth!==64||t===Wc.Type.Float&&e.precision>0)?r.data.values.subarray(0,i)[Symbol.iterator]():new Ij(r,Bj.instance.getVisitFn(r))}he.prototype.visitNull=ve;he.prototype.visitBool=ve;he.prototype.visitInt=ve;he.prototype.visitInt8=ve;he.prototype.visitInt16=ve;he.prototype.visitInt32=ve;he.prototype.visitInt64=ve;he.prototype.visitUint8=ve;he.prototype.visitUint16=ve;he.prototype.visitUint32=ve;he.prototype.visitUint64=ve;he.prototype.visitFloat=ve;he.prototype.visitFloat16=ve;he.prototype.visitFloat32=ve;he.prototype.visitFloat64=ve;he.prototype.visitUtf8=ve;he.prototype.visitBinary=ve;he.prototype.visitFixedSizeBinary=ve;he.prototype.visitDate=ve;he.prototype.visitDateDay=ve;he.prototype.visitDateMillisecond=ve;he.prototype.visitTimestamp=ve;he.prototype.visitTimestampSecond=ve;he.prototype.visitTimestampMillisecond=ve;he.prototype.visitTimestampMicrosecond=ve;he.prototype.visitTimestampNanosecond=ve;he.prototype.visitTime=ve;he.prototype.visitTimeSecond=ve;he.prototype.visitTimeMillisecond=ve;he.prototype.visitTimeMicrosecond=ve;he.prototype.visitTimeNanosecond=ve;he.prototype.visitDecimal=ve;he.prototype.visitList=ve;he.prototype.visitStruct=ve;he.prototype.visitUnion=ve;he.prototype.visitDenseUnion=ve;he.prototype.visitSparseUnion=ve;he.prototype.visitDictionary=ve;he.prototype.visitInterval=ve;he.prototype.visitIntervalDayTime=ve;he.prototype.visitIntervalYearMonth=ve;he.prototype.visitFixedSizeList=ve;he.prototype.visitMap=ve;io.instance=new he});var Tj=E(no=>{"use strict";Object.defineProperty(no,"__esModule",{value:!0});no.instance=no.ToArrayVisitor=void 0;var ga=xe(),gC=Dt(),vC=Np(),pe=class extends gC.Visitor{};no.ToArrayVisitor=pe;function we(r){let{type:e,length:t,stride:i}=r;switch(e.typeId){case ga.Type.Int:case ga.Type.Float:case ga.Type.Decimal:case ga.Type.Time:case ga.Type.Timestamp:return r.data.values.subarray(0,t*i)}return[...vC.instance.visit(r)]}pe.prototype.visitNull=we;pe.prototype.visitBool=we;pe.prototype.visitInt=we;pe.prototype.visitInt8=we;pe.prototype.visitInt16=we;pe.prototype.visitInt32=we;pe.prototype.visitInt64=we;pe.prototype.visitUint8=we;pe.prototype.visitUint16=we;pe.prototype.visitUint32=we;pe.prototype.visitUint64=we;pe.prototype.visitFloat=we;pe.prototype.visitFloat16=we;pe.prototype.visitFloat32=we;pe.prototype.visitFloat64=we;pe.prototype.visitUtf8=we;pe.prototype.visitBinary=we;pe.prototype.visitFixedSizeBinary=we;pe.prototype.visitDate=we;pe.prototype.visitDateDay=we;pe.prototype.visitDateMillisecond=we;pe.prototype.visitTimestamp=we;pe.prototype.visitTimestampSecond=we;pe.prototype.visitTimestampMillisecond=we;pe.prototype.visitTimestampMicrosecond=we;pe.prototype.visitTimestampNanosecond=we;pe.prototype.visitTime=we;pe.prototype.visitTimeSecond=we;pe.prototype.visitTimeMillisecond=we;pe.prototype.visitTimeMicrosecond=we;pe.prototype.visitTimeNanosecond=we;pe.prototype.visitDecimal=we;pe.prototype.visitList=we;pe.prototype.visitStruct=we;pe.prototype.visitUnion=we;pe.prototype.visitDenseUnion=we;pe.prototype.visitSparseUnion=we;pe.prototype.visitDictionary=we;pe.prototype.visitInterval=we;pe.prototype.visitIntervalDayTime=we;pe.prototype.visitIntervalYearMonth=we;pe.prototype.visitFixedSizeList=we;pe.prototype.visitMap=we;no.instance=new pe});var Sj=E(so=>{"use strict";Object.defineProperty(so,"__esModule",{value:!0});so.instance=so.ByteWidthVisitor=void 0;var wC=Dt(),jC=xe(),va=(r,e)=>r+e,Pp=r=>`Cannot compute the byte width of variable-width column ${r}`,Lp=class extends wC.Visitor{visitNull(e){return 0}visitInt(e){return e.bitWidth/8}visitFloat(e){return e.ArrayType.BYTES_PER_ELEMENT}visitBinary(e){throw new Error(Pp(e))}visitUtf8(e){throw new Error(Pp(e))}visitBool(e){return 1/8}visitDecimal(e){return 16}visitDate(e){return(e.unit+1)*4}visitTime(e){return e.bitWidth/8}visitTimestamp(e){return e.unit===jC.TimeUnit.SECOND?4:8}visitInterval(e){return(e.unit+1)*4}visitList(e){throw new Error(Pp(e))}visitStruct(e){return this.visitFields(e.children).reduce(va,0)}visitUnion(e){return this.visitFields(e.children).reduce(va,0)}visitFixedSizeBinary(e){return e.byteWidth}visitFixedSizeList(e){return e.listSize*this.visitFields(e.children).reduce(va,0)}visitMap(e){return this.visitFields(e.children).reduce(va,0)}visitDictionary(e){return this.visit(e.indices)}visitFields(e){return(e||[]).map(t=>this.visit(t.type))}visitSchema(e){return this.visitFields(e.fields).reduce(va,0)}};so.ByteWidthVisitor=Lp;so.instance=new Lp});var Dj=E(oo=>{"use strict";Object.defineProperty(oo,"__esModule",{value:!0});oo.instance=oo.GetVectorConstructor=void 0;var BC=Dt(),IC=op(),TC=ap(),xp=cp(),SC=lp(),DC=Mc(),AC=fp(),OC=hp(),Hc=mp(),qp=bp(),yi=Ec(),FC=Dp(),kC=Ap(),MC=Op(),CC=Fp(),wa=kp(),ja=Mp(),zp=Cp(),UC=Up(),Wp=class extends BC.Visitor{visitNull(){return MC.NullVector}visitBool(){return TC.BoolVector}visitInt(){return yi.IntVector}visitInt8(){return yi.Int8Vector}visitInt16(){return yi.Int16Vector}visitInt32(){return yi.Int32Vector}visitInt64(){return yi.Int64Vector}visitUint8(){return yi.Uint8Vector}visitUint16(){return yi.Uint16Vector}visitUint32(){return yi.Uint32Vector}visitUint64(){return yi.Uint64Vector}visitFloat(){return Hc.FloatVector}visitFloat16(){return Hc.Float16Vector}visitFloat32(){return Hc.Float32Vector}visitFloat64(){return Hc.Float64Vector}visitUtf8(){return UC.Utf8Vector}visitBinary(){return IC.BinaryVector}visitFixedSizeBinary(){return AC.FixedSizeBinaryVector}visitDate(){return xp.DateVector}visitDateDay(){return xp.DateDayVector}visitDateMillisecond(){return xp.DateMillisecondVector}visitTimestamp(){return wa.TimestampVector}visitTimestampSecond(){return wa.TimestampSecondVector}visitTimestampMillisecond(){return wa.TimestampMillisecondVector}visitTimestampMicrosecond(){return wa.TimestampMicrosecondVector}visitTimestampNanosecond(){return wa.TimestampNanosecondVector}visitTime(){return ja.TimeVector}visitTimeSecond(){return ja.TimeSecondVector}visitTimeMillisecond(){return ja.TimeMillisecondVector}visitTimeMicrosecond(){return ja.TimeMicrosecondVector}visitTimeNanosecond(){return ja.TimeNanosecondVector}visitDecimal(){return SC.DecimalVector}visitList(){return FC.ListVector}visitStruct(){return CC.StructVector}visitUnion(){return zp.UnionVector}visitDenseUnion(){return zp.DenseUnionVector}visitSparseUnion(){return zp.SparseUnionVector}visitDictionary(){return DC.DictionaryVector}visitInterval(){return qp.IntervalVector}visitIntervalDayTime(){return qp.IntervalDayTimeVector}visitIntervalYearMonth(){return qp.IntervalYearMonthVector}visitFixedSizeList(){return OC.FixedSizeListVector}visitMap(){return kC.MapVector}};oo.GetVectorConstructor=Wp;oo.instance=new Wp});var $r=E(P=>{"use strict";Object.defineProperty(P,"__esModule",{value:!0});P.vectorFromValuesWithType=P.StructRow=P.MapRow=P.Utf8Vector=P.SparseUnionVector=P.DenseUnionVector=P.UnionVector=P.TimeNanosecondVector=P.TimeMicrosecondVector=P.TimeMillisecondVector=P.TimeSecondVector=P.TimeVector=P.TimestampNanosecondVector=P.TimestampMicrosecondVector=P.TimestampMillisecondVector=P.TimestampSecondVector=P.TimestampVector=P.StructVector=P.NullVector=P.MapVector=P.ListVector=P.Uint64Vector=P.Uint32Vector=P.Uint16Vector=P.Uint8Vector=P.Int64Vector=P.Int32Vector=P.Int16Vector=P.Int8Vector=P.IntVector=P.IntervalYearMonthVector=P.IntervalDayTimeVector=P.IntervalVector=P.Float64Vector=P.Float32Vector=P.Float16Vector=P.FloatVector=P.FixedSizeListVector=P.FixedSizeBinaryVector=P.DictionaryVector=P.DecimalVector=P.DateMillisecondVector=P.DateDayVector=P.DateVector=P.Chunked=P.BoolVector=P.BinaryVector=P.BaseVector=P.Vector=void 0;var Hp=kt(),VC=nt();Object.defineProperty(P,"Vector",{enumerable:!0,get:function(){return VC.Vector}});var EC=ot();Object.defineProperty(P,"BaseVector",{enumerable:!0,get:function(){return EC.BaseVector}});var RC=op();Object.defineProperty(P,"BinaryVector",{enumerable:!0,get:function(){return RC.BinaryVector}});var NC=ap();Object.defineProperty(P,"BoolVector",{enumerable:!0,get:function(){return NC.BoolVector}});var PC=Xi();Object.defineProperty(P,"Chunked",{enumerable:!0,get:function(){return PC.Chunked}});var Yp=cp();Object.defineProperty(P,"DateVector",{enumerable:!0,get:function(){return Yp.DateVector}});Object.defineProperty(P,"DateDayVector",{enumerable:!0,get:function(){return Yp.DateDayVector}});Object.defineProperty(P,"DateMillisecondVector",{enumerable:!0,get:function(){return Yp.DateMillisecondVector}});var LC=lp();Object.defineProperty(P,"DecimalVector",{enumerable:!0,get:function(){return LC.DecimalVector}});var xC=Mc();Object.defineProperty(P,"DictionaryVector",{enumerable:!0,get:function(){return xC.DictionaryVector}});var qC=fp();Object.defineProperty(P,"FixedSizeBinaryVector",{enumerable:!0,get:function(){return qC.FixedSizeBinaryVector}});var zC=hp();Object.defineProperty(P,"FixedSizeListVector",{enumerable:!0,get:function(){return zC.FixedSizeListVector}});var Yc=mp();Object.defineProperty(P,"FloatVector",{enumerable:!0,get:function(){return Yc.FloatVector}});Object.defineProperty(P,"Float16Vector",{enumerable:!0,get:function(){return Yc.Float16Vector}});Object.defineProperty(P,"Float32Vector",{enumerable:!0,get:function(){return Yc.Float32Vector}});Object.defineProperty(P,"Float64Vector",{enumerable:!0,get:function(){return Yc.Float64Vector}});var $p=bp();Object.defineProperty(P,"IntervalVector",{enumerable:!0,get:function(){return $p.IntervalVector}});Object.defineProperty(P,"IntervalDayTimeVector",{enumerable:!0,get:function(){return $p.IntervalDayTimeVector}});Object.defineProperty(P,"IntervalYearMonthVector",{enumerable:!0,get:function(){return $p.IntervalYearMonthVector}});var mi=Ec();Object.defineProperty(P,"IntVector",{enumerable:!0,get:function(){return mi.IntVector}});Object.defineProperty(P,"Int8Vector",{enumerable:!0,get:function(){return mi.Int8Vector}});Object.defineProperty(P,"Int16Vector",{enumerable:!0,get:function(){return mi.Int16Vector}});Object.defineProperty(P,"Int32Vector",{enumerable:!0,get:function(){return mi.Int32Vector}});Object.defineProperty(P,"Int64Vector",{enumerable:!0,get:function(){return mi.Int64Vector}});Object.defineProperty(P,"Uint8Vector",{enumerable:!0,get:function(){return mi.Uint8Vector}});Object.defineProperty(P,"Uint16Vector",{enumerable:!0,get:function(){return mi.Uint16Vector}});Object.defineProperty(P,"Uint32Vector",{enumerable:!0,get:function(){return mi.Uint32Vector}});Object.defineProperty(P,"Uint64Vector",{enumerable:!0,get:function(){return mi.Uint64Vector}});var WC=Dp();Object.defineProperty(P,"ListVector",{enumerable:!0,get:function(){return WC.ListVector}});var HC=Ap();Object.defineProperty(P,"MapVector",{enumerable:!0,get:function(){return HC.MapVector}});var YC=Op();Object.defineProperty(P,"NullVector",{enumerable:!0,get:function(){return YC.NullVector}});var $C=Fp();Object.defineProperty(P,"StructVector",{enumerable:!0,get:function(){return $C.StructVector}});var Ba=kp();Object.defineProperty(P,"TimestampVector",{enumerable:!0,get:function(){return Ba.TimestampVector}});Object.defineProperty(P,"TimestampSecondVector",{enumerable:!0,get:function(){return Ba.TimestampSecondVector}});Object.defineProperty(P,"TimestampMillisecondVector",{enumerable:!0,get:function(){return Ba.TimestampMillisecondVector}});Object.defineProperty(P,"TimestampMicrosecondVector",{enumerable:!0,get:function(){return Ba.TimestampMicrosecondVector}});Object.defineProperty(P,"TimestampNanosecondVector",{enumerable:!0,get:function(){return Ba.TimestampNanosecondVector}});var Ia=Mp();Object.defineProperty(P,"TimeVector",{enumerable:!0,get:function(){return Ia.TimeVector}});Object.defineProperty(P,"TimeSecondVector",{enumerable:!0,get:function(){return Ia.TimeSecondVector}});Object.defineProperty(P,"TimeMillisecondVector",{enumerable:!0,get:function(){return Ia.TimeMillisecondVector}});Object.defineProperty(P,"TimeMicrosecondVector",{enumerable:!0,get:function(){return Ia.TimeMicrosecondVector}});Object.defineProperty(P,"TimeNanosecondVector",{enumerable:!0,get:function(){return Ia.TimeNanosecondVector}});var Gp=Cp();Object.defineProperty(P,"UnionVector",{enumerable:!0,get:function(){return Gp.UnionVector}});Object.defineProperty(P,"DenseUnionVector",{enumerable:!0,get:function(){return Gp.DenseUnionVector}});Object.defineProperty(P,"SparseUnionVector",{enumerable:!0,get:function(){return Gp.SparseUnionVector}});var GC=Up();Object.defineProperty(P,"Utf8Vector",{enumerable:!0,get:function(){return GC.Utf8Vector}});var Aj=aa();Object.defineProperty(P,"MapRow",{enumerable:!0,get:function(){return Aj.MapRow}});Object.defineProperty(P,"StructRow",{enumerable:!0,get:function(){return Aj.StructRow}});var Ta=tj(),Kp=xe(),ao=nt(),Oj=Xi(),zn=ot(),KC=Er(),$c=Mt(),Fj=Qe(),kj=Rp(),Mj=uh(),Cj=jj(),Uj=Tj(),Vj=Np(),Ej=Sj(),Rj=Dj();ao.Vector.new=JC;ao.Vector.from=XC;function JC(r,...e){return new(Rj.instance.getVisitFn(r)())(r,...e)}function ZC(r,e){if($c.isIterable(e))return ao.Vector.from({nullValues:[null,void 0],type:r(),values:e});if($c.isAsyncIterable(e))return ao.Vector.from({nullValues:[null,void 0],type:r(),values:e});let{values:t=[],type:i=r(),nullValues:n=[null,void 0]}=Object.assign({},e);return $c.isIterable(t)?ao.Vector.from(Object.assign(Object.assign({nullValues:n},e),{type:i})):ao.Vector.from(Object.assign(Object.assign({nullValues:n},e),{type:i}))}P.vectorFromValuesWithType=ZC;function XC(r){let e=Object.assign({nullValues:[null,void 0]},r),{values:t=[]}=e,i=Hp.__rest(e,["values"]);if($c.isIterable(t)){let n=[...Fj.Builder.throughIterable(i)(t)];return n.length===1?n[0]:Oj.Chunked.concat(n)}return(n=>Hp.__awaiter(this,void 0,void 0,function*(){var s,l;let y=Fj.Builder.throughAsyncIterable(i);try{for(var w=Hp.__asyncValues(y(t)),D;D=yield w.next(),!D.done;){let k=D.value;n.push(k)}}catch(k){s={error:k}}finally{try{D&&!D.done&&(l=w.return)&&(yield l.call(w))}finally{if(s)throw s.error}}return n.length===1?n[0]:Oj.Chunked.concat(n)}))([])}zn.BaseVector.prototype.get=function(e){return kj.instance.visit(this,e)};zn.BaseVector.prototype.set=function(e,t){return Mj.instance.visit(this,e,t)};zn.BaseVector.prototype.indexOf=function(e,t){return Cj.instance.visit(this,e,t)};zn.BaseVector.prototype.toArray=function(){return Uj.instance.visit(this)};zn.BaseVector.prototype.getByteWidth=function(){return Ej.instance.visit(this.type)};zn.BaseVector.prototype[Symbol.iterator]=function(){return Vj.instance.visit(this)};zn.BaseVector.prototype._bindDataAccessors=r2;Object.keys(Kp.Type).map(r=>Kp.Type[r]).filter(r=>typeof r=="number").filter(r=>r!==Kp.Type.NONE).forEach(r=>{let e=Rj.instance.visit(r);e.prototype.get=Ta.partial1(kj.instance.getVisitFn(r)),e.prototype.set=Ta.partial2(Mj.instance.getVisitFn(r)),e.prototype.indexOf=Ta.partial2(Cj.instance.getVisitFn(r)),e.prototype.toArray=Ta.partial0(Uj.instance.getVisitFn(r)),e.prototype.getByteWidth=QC(Ej.instance.getVisitFn(r)),e.prototype[Symbol.iterator]=Ta.partial0(Vj.instance.getVisitFn(r))});function QC(r){return function(){return r(this.type)}}function e2(r){return function(e){return this.isValid(e)?r.call(this,e):null}}function t2(r){return function(e,t){KC.setBool(this.nullBitmap,this.offset+e,t!=null)&&r.call(this,e,t)}}function r2(){let r=this.nullBitmap;r&&r.byteLength>0&&(this.get=e2(this.get),this.set=t2(this.set))}});var ma=E(Kc=>{"use strict";Object.defineProperty(Kc,"__esModule",{value:!0});Kc.Table=void 0;var Gc=kt(),i2=$s(),n2=Sa(),Nj=Tc(),Jp=_i(),Pj=wt(),Zp=Ve(),Lj=Vn(),Xp=Mt(),xj=ip(),Qp=$r(),vt=class extends Qp.Chunked{constructor(...e){var t;let i=null;e[0]instanceof Pj.Schema&&(i=e[0]);let n=e[0]instanceof vt?e[0].chunks:Lj.selectArgs(Jp.RecordBatch,e);if(!i&&!(i=(t=n[0])===null||t===void 0?void 0:t.schema))throw new TypeError("Table must be initialized with a Schema or at least one RecordBatch");n[0]||(n[0]=new Jp._InternalEmptyPlaceholderRecordBatch(i));super(new Zp.Struct(i.fields),n);this._schema=i,this._chunks=n}static empty(e=new Pj.Schema([])){return new vt(e,[])}static from(e){if(!e)return vt.empty();if(typeof e=="object"){let i=Xp.isIterable(e.values)?s2(e):Xp.isAsyncIterable(e.values)?o2(e):null;if(i!==null)return i}let t=n2.RecordBatchReader.from(e);return Xp.isPromise(t)?(()=>Gc.__awaiter(this,void 0,void 0,function*(){return yield vt.from(yield t)}))():t.isSync()&&(t=t.open())?t.schema?new vt(t.schema,[...t]):vt.empty():(i=>Gc.__awaiter(this,void 0,void 0,function*(){var n,s;let l=yield i,y=l.schema,w=[];if(y){try{for(var D=Gc.__asyncValues(l),k;k=yield D.next(),!k.done;){let Y=k.value;w.push(Y)}}catch(Y){n={error:Y}}finally{try{k&&!k.done&&(s=D.return)&&(yield s.call(D))}finally{if(n)throw n.error}}return new vt(y,w)}return vt.empty()}))(t.open())}static fromAsync(e){return Gc.__awaiter(this,void 0,void 0,function*(){return yield vt.from(e)})}static fromStruct(e){return vt.new(e.data.childData,e.type.children)}static new(...e){return new vt(...xj.distributeColumnsIntoRecordBatches(Lj.selectColumnArgs(e)))}get schema(){return this._schema}get length(){return this._length}get chunks(){return this._chunks}get numCols(){return this._numChildren}clone(e=this._chunks){return new vt(this._schema,e)}getColumn(e){return this.getColumnAt(this.getColumnIndex(e))}getColumnAt(e){return this.getChildAt(e)}getColumnIndex(e){return this._schema.fields.findIndex(t=>t.name===e)}getChildAt(e){if(e<0||e>=this.numChildren)return null;let t,i,n=this._schema.fields,s=this._children||(this._children=[]);if(i=s[e])return i;if(t=n[e]){let l=this._chunks.map(y=>y.getChildAt(e)).filter(y=>y!=null);if(l.length>0)return s[e]=new i2.Column(t,l)}return null}serialize(e="binary",t=!0){return(t?Nj.RecordBatchStreamWriter:Nj.RecordBatchFileWriter).writeAll(this).toUint8Array(!0)}count(){return this._length}select(...e){let t=this._schema.fields.reduce((i,n,s)=>i.set(n.name,s),new Map);return this.selectAt(...e.map(i=>t.get(i)).filter(i=>i>-1))}selectAt(...e){let t=this._schema.selectAt(...e);return new vt(t,this._chunks.map(({length:i,data:{childData:n}})=>new Jp.RecordBatch(t,i,e.map(s=>n[s]).filter(Boolean))))}assign(e){let t=this._schema.fields,[i,n]=e.schema.fields.reduce((y,w,D)=>{let[k,Y]=y,J=t.findIndex(ie=>ie.name===w.name);return~J?Y[J]=D:k.push(D),y},[[],[]]),s=this._schema.assign(e.schema),l=[...t.map((y,w,D,k=n[w])=>k===void 0?this.getColumnAt(w):e.getColumnAt(k)),...i.map(y=>e.getColumnAt(y))].filter(Boolean);return new vt(...xj.distributeVectorsIntoRecordBatches(s,l))}};Kc.Table=vt;function s2(r){let{type:e}=r;return e instanceof Zp.Struct?vt.fromStruct(Qp.StructVector.from(r)):null}function o2(r){let{type:e}=r;return e instanceof Zp.Struct?Qp.StructVector.from(r).then(t=>vt.fromStruct(t)):null}});var _i=E(uo=>{"use strict";Object.defineProperty(uo,"__esModule",{value:!0});uo._InternalEmptyPlaceholderRecordBatch=uo.RecordBatch=void 0;var e_=jr(),t_=ma(),a2=nt(),u2=Dt(),c2=wt(),l2=Mt(),d2=Xi(),f2=Vn(),r_=Ve(),h2=ip(),p2=$r(),cn=class extends p2.StructVector{constructor(...e){let t,i=e[0],n;if(e[1]instanceof e_.Data)[,t,n]=e;else{let s=i.fields,[,l,y]=e;t=e_.Data.Struct(new r_.Struct(s),0,l,0,null,y)}super(t,n);this._schema=i}static from(e){return l2.isIterable(e.values),t_.Table.from(e)}static new(...e){let[t,i]=f2.selectFieldArgs(e),n=i.filter(s=>s instanceof a2.Vector);return new cn(...h2.ensureSameLengthData(new c2.Schema(t),n.map(s=>s.data)))}clone(e,t=this._children){return new cn(this._schema,e,t)}concat(...e){let t=this._schema,i=d2.Chunked.flatten(this,...e);return new t_.Table(t,i.map(({data:n})=>new cn(t,n)))}get schema(){return this._schema}get numCols(){return this._schema.fields.length}get dictionaries(){return this._dictionaries||(this._dictionaries=Jc.collect(this))}select(...e){let t=this._schema.fields.reduce((i,n,s)=>i.set(n.name,s),new Map);return this.selectAt(...e.map(i=>t.get(i)).filter(i=>i>-1))}selectAt(...e){let t=this._schema.selectAt(...e),i=e.map(n=>this.data.childData[n]).filter(Boolean);return new cn(t,this.length,i)}};uo.RecordBatch=cn;var qj=class extends cn{constructor(e){super(e,0,e.fields.map(t=>e_.Data.new(t.type,0,0,0)))}};uo._InternalEmptyPlaceholderRecordBatch=qj;var Jc=class extends u2.Visitor{constructor(){super(...arguments);this.dictionaries=new Map}static collect(e){return new Jc().visit(e.data,new r_.Struct(e.schema.fields)).dictionaries}visit(e,t){return r_.DataType.isDictionary(t)?this.visitDictionary(e,t):(e.childData.forEach((i,n)=>this.visit(i,t.children[n].type)),this)}visitDictionary(e,t){let i=e.dictionary;return i&&i.length>0&&this.dictionaries.set(t.id,i),this}}});var Sa=E(mr=>{"use strict";Object.defineProperty(mr,"__esModule",{value:!0});mr.AsyncRecordBatchFileReader=mr.RecordBatchFileReader=mr.AsyncRecordBatchStreamReader=mr.RecordBatchStreamReader=mr.RecordBatchReader=void 0;var He=kt(),zj=nt(),Zc=xe(),Wj=gh(),Hj=Ko(),Yj=Gi(),Da=jh(),$j=T0(),i_=_i(),Wn=vs(),_r=pc(),yr=Mt(),Zr=class extends Wn.ReadableInterop{constructor(e){super();this._impl=e}get closed(){return this._impl.closed}get schema(){return this._impl.schema}get autoDestroy(){return this._impl.autoDestroy}get dictionaries(){return this._impl.dictionaries}get numDictionaries(){return this._impl.numDictionaries}get numRecordBatches(){return this._impl.numRecordBatches}get footer(){return this._impl.isFile()?this._impl.footer:null}isSync(){return this._impl.isSync()}isAsync(){return this._impl.isAsync()}isFile(){return this._impl.isFile()}isStream(){return this._impl.isStream()}next(){return this._impl.next()}throw(e){return this._impl.throw(e)}return(e){return this._impl.return(e)}cancel(){return this._impl.cancel()}reset(e){return this._impl.reset(e),this._DOMStream=void 0,this._nodeStream=void 0,this}open(e){let t=this._impl.open(e);return yr.isPromise(t)?t.then(()=>this):this}readRecordBatch(e){return this._impl.isFile()?this._impl.readRecordBatch(e):null}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}toDOMStream(){return Hj.default.toDOMStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this})}toNodeStream(){return Hj.default.toNodeStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this},{objectMode:!0})}static throughNode(e){throw new Error('"throughNode" not available in this environment')}static throughDOM(e,t){throw new Error('"throughDOM" not available in this environment')}static from(e){return e instanceof Zr?e:yr.isArrowJSON(e)?_2(e):yr.isFileHandle(e)?b2(e):yr.isPromise(e)?(()=>He.__awaiter(this,void 0,void 0,function*(){return yield Zr.from(yield e)}))():yr.isFetchResponse(e)||yr.isReadableDOMStream(e)||yr.isReadableNodeStream(e)||yr.isAsyncIterable(e)?m2(new Yj.AsyncByteStream(e)):y2(new Yj.ByteStream(e))}static readAll(e){return e instanceof Zr?e.isSync()?Zj(e):Xj(e):yr.isArrowJSON(e)||ArrayBuffer.isView(e)||yr.isIterable(e)||yr.isIteratorResult(e)?Zj(e):Xj(e)}};mr.RecordBatchReader=Zr;var co=class extends Zr{constructor(e){super(e);this._impl=e}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return He.__asyncGenerator(this,arguments,function*(){yield He.__await(yield*He.__asyncDelegator(He.__asyncValues(this[Symbol.iterator]())))})}};mr.RecordBatchStreamReader=co;var lo=class extends Zr{constructor(e){super(e);this._impl=e}[Symbol.iterator](){throw new Error("AsyncRecordBatchStreamReader is not Iterable")}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}};mr.AsyncRecordBatchStreamReader=lo;var Xc=class extends co{constructor(e){super(e);this._impl=e}};mr.RecordBatchFileReader=Xc;var n_=class extends lo{constructor(e){super(e);this._impl=e}};mr.AsyncRecordBatchFileReader=n_;var s_=class{constructor(e=new Map){this.closed=!1,this.autoDestroy=!0,this._dictionaryIndex=0,this._recordBatchIndex=0,this.dictionaries=e}get numDictionaries(){return this._dictionaryIndex}get numRecordBatches(){return this._recordBatchIndex}isSync(){return!1}isAsync(){return!1}isFile(){return!1}isStream(){return!1}reset(e){return this._dictionaryIndex=0,this._recordBatchIndex=0,this.schema=e,this.dictionaries=new Map,this}_loadRecordBatch(e,t){return new i_.RecordBatch(this.schema,e.length,this._loadVectors(e,t,this.schema.fields))}_loadDictionaryBatch(e,t){let{id:i,isDelta:n,data:s}=e,{dictionaries:l,schema:y}=this,w=l.get(i);if(n||!w){let D=y.dictionaries.get(i);return w&&n?w.concat(zj.Vector.new(this._loadVectors(s,t,[D])[0])):zj.Vector.new(this._loadVectors(s,t,[D])[0])}return w}_loadVectors(e,t,i){return new $j.VectorLoader(t,e.nodes,e.buffers,this.dictionaries).visitMany(i)}},Aa=class extends s_{constructor(e,t){super(t);this._reader=yr.isArrowJSON(e)?new _r.JSONMessageReader(this._handle=e):new _r.MessageReader(this._handle=e)}isSync(){return!0}isStream(){return!0}[Symbol.iterator](){return this}cancel(){!this.closed&&(this.closed=!0)&&(this.reset()._reader.return(),this._reader=null,this.dictionaries=null)}open(e){return this.closed||(this.autoDestroy=Jj(this,e),this.schema||(this.schema=this._reader.readSchema())||this.cancel()),this}throw(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.throw(e):Wn.ITERATOR_DONE}return(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(e):Wn.ITERATOR_DONE}next(){if(this.closed)return Wn.ITERATOR_DONE;let e,{_reader:t}=this;for(;e=this._readNextMessageAndValidate();)if(e.isSchema())this.reset(e.header());else if(e.isRecordBatch()){this._recordBatchIndex++;let i=e.header(),n=t.readMessageBody(e.bodyLength),s=this._loadRecordBatch(i,n);return{done:!1,value:s}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;let i=e.header(),n=t.readMessageBody(e.bodyLength),s=this._loadDictionaryBatch(i,n);this.dictionaries.set(i.id,s)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new i_._InternalEmptyPlaceholderRecordBatch(this.schema)}):this.return()}_readNextMessageAndValidate(e){return this._reader.readMessage(e)}},Oa=class extends s_{constructor(e,t){super(t);this._reader=new _r.AsyncMessageReader(this._handle=e)}isAsync(){return!0}isStream(){return!0}[Symbol.asyncIterator](){return this}cancel(){return He.__awaiter(this,void 0,void 0,function*(){!this.closed&&(this.closed=!0)&&(yield this.reset()._reader.return(),this._reader=null,this.dictionaries=null)})}open(e){return He.__awaiter(this,void 0,void 0,function*(){return this.closed||(this.autoDestroy=Jj(this,e),this.schema||(this.schema=yield this._reader.readSchema())||(yield this.cancel())),this})}throw(e){return He.__awaiter(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.throw(e):Wn.ITERATOR_DONE})}return(e){return He.__awaiter(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.return(e):Wn.ITERATOR_DONE})}next(){return He.__awaiter(this,void 0,void 0,function*(){if(this.closed)return Wn.ITERATOR_DONE;let e,{_reader:t}=this;for(;e=yield this._readNextMessageAndValidate();)if(e.isSchema())yield this.reset(e.header());else if(e.isRecordBatch()){this._recordBatchIndex++;let i=e.header(),n=yield t.readMessageBody(e.bodyLength),s=this._loadRecordBatch(i,n);return{done:!1,value:s}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;let i=e.header(),n=yield t.readMessageBody(e.bodyLength),s=this._loadDictionaryBatch(i,n);this.dictionaries.set(i.id,s)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new i_._InternalEmptyPlaceholderRecordBatch(this.schema)}):yield this.return()})}_readNextMessageAndValidate(e){return He.__awaiter(this,void 0,void 0,function*(){return yield this._reader.readMessage(e)})}},o_=class extends Aa{constructor(e,t){super(e instanceof Da.RandomAccessFile?e:new Da.RandomAccessFile(e),t)}get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}isSync(){return!0}isFile(){return!0}open(e){if(!this.closed&&!this._footer){this.schema=(this._footer=this._readFooter()).schema;for(let t of this._footer.dictionaryBatches())t&&this._readDictionaryBatch(this._dictionaryIndex++)}return super.open(e)}readRecordBatch(e){if(this.closed)return null;this._footer||this.open();let t=this._footer&&this._footer.getRecordBatch(e);if(t&&this._handle.seek(t.offset)){let i=this._reader.readMessage(Zc.MessageHeader.RecordBatch);if(i==null?void 0:i.isRecordBatch()){let n=i.header(),s=this._reader.readMessageBody(i.bodyLength);return this._loadRecordBatch(n,s)}}return null}_readDictionaryBatch(e){let t=this._footer&&this._footer.getDictionaryBatch(e);if(t&&this._handle.seek(t.offset)){let i=this._reader.readMessage(Zc.MessageHeader.DictionaryBatch);if(i==null?void 0:i.isDictionaryBatch()){let n=i.header(),s=this._reader.readMessageBody(i.bodyLength),l=this._loadDictionaryBatch(n,s);this.dictionaries.set(n.id,l)}}}_readFooter(){let{_handle:e}=this,t=e.size-_r.magicAndPadding,i=e.readInt32(t),n=e.readAt(t-i,i);return Wj.Footer.decode(n)}_readNextMessageAndValidate(e){if(this._footer||this.open(),this._footer&&this._recordBatchIndex<this.numRecordBatches){let t=this._footer&&this._footer.getRecordBatch(this._recordBatchIndex);if(t&&this._handle.seek(t.offset))return this._reader.readMessage(e)}return null}},Gj=class extends Oa{constructor(e,...t){let i=typeof t[0]!="number"?t.shift():void 0,n=t[0]instanceof Map?t.shift():void 0;super(e instanceof Da.AsyncRandomAccessFile?e:new Da.AsyncRandomAccessFile(e,i),n)}get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}isFile(){return!0}isAsync(){return!0}open(e){let t=Object.create(null,{open:{get:()=>super.open}});return He.__awaiter(this,void 0,void 0,function*(){if(!this.closed&&!this._footer){this.schema=(this._footer=yield this._readFooter()).schema;for(let i of this._footer.dictionaryBatches())i&&(yield this._readDictionaryBatch(this._dictionaryIndex++))}return yield t.open.call(this,e)})}readRecordBatch(e){return He.__awaiter(this,void 0,void 0,function*(){if(this.closed)return null;this._footer||(yield this.open());let t=this._footer&&this._footer.getRecordBatch(e);if(t&&(yield this._handle.seek(t.offset))){let i=yield this._reader.readMessage(Zc.MessageHeader.RecordBatch);if(i==null?void 0:i.isRecordBatch()){let n=i.header(),s=yield this._reader.readMessageBody(i.bodyLength);return this._loadRecordBatch(n,s)}}return null})}_readDictionaryBatch(e){return He.__awaiter(this,void 0,void 0,function*(){let t=this._footer&&this._footer.getDictionaryBatch(e);if(t&&(yield this._handle.seek(t.offset))){let i=yield this._reader.readMessage(Zc.MessageHeader.DictionaryBatch);if(i==null?void 0:i.isDictionaryBatch()){let n=i.header(),s=yield this._reader.readMessageBody(i.bodyLength),l=this._loadDictionaryBatch(n,s);this.dictionaries.set(n.id,l)}}})}_readFooter(){return He.__awaiter(this,void 0,void 0,function*(){let{_handle:e}=this;e._pending&&(yield e._pending);let t=e.size-_r.magicAndPadding,i=yield e.readInt32(t),n=yield e.readAt(t-i,i);return Wj.Footer.decode(n)})}_readNextMessageAndValidate(e){return He.__awaiter(this,void 0,void 0,function*(){if(this._footer||(yield this.open()),this._footer&&this._recordBatchIndex<this.numRecordBatches){let t=this._footer.getRecordBatch(this._recordBatchIndex);if(t&&(yield this._handle.seek(t.offset)))return yield this._reader.readMessage(e)}return null})}},Kj=class extends Aa{constructor(e,t){super(e,t)}_loadVectors(e,t,i){return new $j.JSONVectorLoader(t,e.nodes,e.buffers,this.dictionaries).visitMany(i)}};function Jj(r,e){return e&&typeof e.autoDestroy=="boolean"?e.autoDestroy:r.autoDestroy}function*Zj(r){let e=Zr.from(r);try{if(!e.open({autoDestroy:!1}).closed)do yield e;while(!e.reset().open().closed)}finally{e.cancel()}}function Xj(r){return He.__asyncGenerator(this,arguments,function*(){let t=yield He.__await(Zr.from(r));try{if(!(yield He.__await(t.open({autoDestroy:!1}))).closed)do yield yield He.__await(t);while(!(yield He.__await(t.reset().open())).closed)}finally{yield He.__await(t.cancel())}})}function _2(r){return new co(new Kj(r))}function y2(r){let e=r.peek(_r.magicLength+7&~7);return e&&e.byteLength>=4?_r.checkForMagicArrowString(e)?new Xc(new o_(r.read())):new co(new Aa(r)):new co(new Aa(function*(){}()))}function m2(r){return He.__awaiter(this,void 0,void 0,function*(){let e=yield r.peek(_r.magicLength+7&~7);return e&&e.byteLength>=4?_r.checkForMagicArrowString(e)?new Xc(new o_(yield r.read())):new lo(new Oa(r)):new lo(new Oa(function(){return He.__asyncGenerator(this,arguments,function*(){})}()))})}function b2(r){return He.__awaiter(this,void 0,void 0,function*(){let{size:e}=yield r.stat(),t=new Da.AsyncRandomAccessFile(r,e);return e>=_r.magicX2AndPadding&&_r.checkForMagicArrowString(yield t.readAt(0,_r.magicLength+7&~7))?new n_(new Gj(t)):new lo(new Oa(t))})}});var t1=E(el=>{"use strict";Object.defineProperty(el,"__esModule",{value:!0});el.toDOMStream=void 0;var Qc=kt(),Qj=mt(),e1=Mt();function g2(r,e){if(e1.isAsyncIterable(r))return w2(r,e);if(e1.isIterable(r))return v2(r,e);throw new Error("toDOMStream() must be called with an Iterable or AsyncIterable")}el.toDOMStream=g2;function v2(r,e){let t=null,i=(e==null?void 0:e.type)==="bytes"||!1,n=(e==null?void 0:e.highWaterMark)||Math.pow(2,24);return new ReadableStream(Object.assign(Object.assign({},e),{start(l){s(l,t||(t=r[Symbol.iterator]()))},pull(l){t?s(l,t):l.close()},cancel(){((t==null?void 0:t.return)&&t.return()||!0)&&(t=null)}}),Object.assign({highWaterMark:i?n:void 0},e));function s(l,y){let w,D=null,k=l.desiredSize||null;for(;!(D=y.next(i?k:null)).done;)if(ArrayBuffer.isView(D.value)&&(w=Qj.toUint8Array(D.value))&&(k!=null&&i&&(k=k-w.byteLength+1),D.value=w),l.enqueue(D.value),k!=null&&--k<=0)return;l.close()}}function w2(r,e){let t=null,i=(e==null?void 0:e.type)==="bytes"||!1,n=(e==null?void 0:e.highWaterMark)||Math.pow(2,24);return new ReadableStream(Object.assign(Object.assign({},e),{start(l){return Qc.__awaiter(this,void 0,void 0,function*(){yield s(l,t||(t=r[Symbol.asyncIterator]()))})},pull(l){return Qc.__awaiter(this,void 0,void 0,function*(){t?yield s(l,t):l.close()})},cancel(){return Qc.__awaiter(this,void 0,void 0,function*(){((t==null?void 0:t.return)&&(yield t.return())||!0)&&(t=null)})}}),Object.assign({highWaterMark:i?n:void 0},e));function s(l,y){return Qc.__awaiter(this,void 0,void 0,function*(){let w,D=null,k=l.desiredSize||null;for(;!(D=yield y.next(i?k:null)).done;)if(ArrayBuffer.isView(D.value)&&(w=Qj.toUint8Array(D.value))&&(k!=null&&i&&(k=k-w.byteLength+1),D.value=w),l.enqueue(D.value),k!=null&&--k<=0)return;l.close()})}}});var n1=E(fo=>{"use strict";Object.defineProperty(fo,"__esModule",{value:!0});fo.BuilderTransform=fo.builderThroughDOMStream=void 0;var j2=kt(),B2=ec();function I2(r){return new a_(r)}fo.builderThroughDOMStream=I2;var a_=class{constructor(e){this._numChunks=0,this._finished=!1,this._bufferedSize=0;let{["readableStrategy"]:t,["writableStrategy"]:i,["queueingStrategy"]:n="count"}=e,s=j2.__rest(e,["readableStrategy","writableStrategy","queueingStrategy"]);this._controller=null,this._builder=B2.Builder.new(s),this._getSize=n!=="bytes"?r1:i1;let{["highWaterMark"]:l=n==="bytes"?Math.pow(2,14):1e3}=Object.assign({},t),{["highWaterMark"]:y=n==="bytes"?Math.pow(2,14):1e3}=Object.assign({},i);this.readable=new ReadableStream({cancel:()=>{this._builder.clear()},pull:w=>{this._maybeFlush(this._builder,this._controller=w)},start:w=>{this._maybeFlush(this._builder,this._controller=w)}},{highWaterMark:l,size:n!=="bytes"?r1:i1}),this.writable=new WritableStream({abort:()=>{this._builder.clear()},write:()=>{this._maybeFlush(this._builder,this._controller)},close:()=>{this._maybeFlush(this._builder.finish(),this._controller)}},{highWaterMark:y,size:w=>this._writeValueAndReturnChunkSize(w)})}_writeValueAndReturnChunkSize(e){let t=this._bufferedSize;return this._bufferedSize=this._getSize(this._builder.append(e)),this._bufferedSize-t}_maybeFlush(e,t){t!==null&&(this._bufferedSize>=t.desiredSize&&++this._numChunks&&this._enqueue(t,e.toVector()),e.finished&&((e.length>0||this._numChunks===0)&&++this._numChunks&&this._enqueue(t,e.toVector()),!this._finished&&(this._finished=!0)&&this._enqueue(t,null)))}_enqueue(e,t){this._bufferedSize=0,this._controller=null,t===null?e.close():e.enqueue(t)}};fo.BuilderTransform=a_;var r1=r=>r.length,i1=r=>r.byteLength});var s1=E(tl=>{"use strict";Object.defineProperty(tl,"__esModule",{value:!0});tl.recordBatchReaderThroughDOMStream=void 0;var Fa=kt(),T2=Gi(),S2=Sa();function D2(r,e){let t=new T2.AsyncByteQueue,i=null,n=new ReadableStream({cancel(){return Fa.__awaiter(this,void 0,void 0,function*(){yield t.close()})},start(y){return Fa.__awaiter(this,void 0,void 0,function*(){yield l(y,i||(i=yield s()))})},pull(y){return Fa.__awaiter(this,void 0,void 0,function*(){i?yield l(y,i):y.close()})}});return{writable:new WritableStream(t,Object.assign({highWaterMark:Math.pow(2,14)},r)),readable:n};function s(){return Fa.__awaiter(this,void 0,void 0,function*(){return yield(yield S2.RecordBatchReader.from(t)).open(e)})}function l(y,w){return Fa.__awaiter(this,void 0,void 0,function*(){let D=y.desiredSize,k=null;for(;!(k=yield w.next()).done;)if(y.enqueue(k.value),D!=null&&--D<=0)return;y.close()})}}tl.recordBatchReaderThroughDOMStream=D2});var o1=E(il=>{"use strict";Object.defineProperty(il,"__esModule",{value:!0});il.recordBatchWriterThroughDOMStream=void 0;var rl=kt(),A2=Gi();function O2(r,e){let t=new this(r),i=new A2.AsyncByteStream(t),n=new ReadableStream({type:"bytes",cancel(){return rl.__awaiter(this,void 0,void 0,function*(){yield i.cancel()})},pull(l){return rl.__awaiter(this,void 0,void 0,function*(){yield s(l)})},start(l){return rl.__awaiter(this,void 0,void 0,function*(){yield s(l)})}},Object.assign({highWaterMark:Math.pow(2,14)},e));return{writable:new WritableStream(t,r),readable:n};function s(l){return rl.__awaiter(this,void 0,void 0,function*(){let y=null,w=l.desiredSize;for(;y=yield i.read(w||null);)if(l.enqueue(y),w!=null&&(w-=y.byteLength)<=0)return;l.close()})}}il.recordBatchWriterThroughDOMStream=O2});var h_=E(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.custom=Ie.or=Ie.and=Ie.col=Ie.lit=Ie.CustomPredicate=Ie.Not=Ie.GTeq=Ie.LTeq=Ie.Equals=Ie.Or=Ie.And=Ie.CombinationPredicate=Ie.ComparisonPredicate=Ie.Predicate=Ie.Col=Ie.Literal=Ie.Value=void 0;var F2=Mc(),ln=class{eq(e){return e instanceof ln||(e=new bi(e)),new c_(this,e)}le(e){return e instanceof ln||(e=new bi(e)),new l_(this,e)}ge(e){return e instanceof ln||(e=new bi(e)),new d_(this,e)}lt(e){return new yo(this.ge(e))}gt(e){return new yo(this.le(e))}ne(e){return new yo(this.eq(e))}};Ie.Value=ln;var bi=class extends ln{constructor(e){super();this.v=e}};Ie.Literal=bi;var u_=class extends ln{constructor(e){super();this.name=e}bind(e){if(!this.colidx){this.colidx=-1;let i=e.schema.fields;for(let n=-1;++n<i.length;)if(i[n].name===this.name){this.colidx=n;break}if(this.colidx<0)throw new Error(`Failed to bind Col "${this.name}"`)}let t=this.vector=e.getChildAt(this.colidx);return i=>t.get(i)}};Ie.Col=u_;var ho=class{and(...e){return new po(this,...e)}or(...e){return new _o(this,...e)}not(){return new yo(this)}};Ie.Predicate=ho;var ka=class extends ho{constructor(e,t){super();this.left=e,this.right=t}bind(e){return this.left instanceof bi?this.right instanceof bi?this._bindLitLit(e,this.left,this.right):this._bindLitCol(e,this.left,this.right):this.right instanceof bi?this._bindColLit(e,this.left,this.right):this._bindColCol(e,this.left,this.right)}};Ie.ComparisonPredicate=ka;var Ma=class extends ho{constructor(...e){super();this.children=e}};Ie.CombinationPredicate=Ma;Ma.prototype.children=Object.freeze([]);var po=class extends Ma{constructor(...e){e=e.reduce((t,i)=>t.concat(i instanceof po?i.children:i),[]);super(...e)}bind(e){let t=this.children.map(i=>i.bind(e));return(i,n)=>t.every(s=>s(i,n))}};Ie.And=po;var _o=class extends Ma{constructor(...e){e=e.reduce((t,i)=>t.concat(i instanceof _o?i.children:i),[]);super(...e)}bind(e){let t=this.children.map(i=>i.bind(e));return(i,n)=>t.some(s=>s(i,n))}};Ie.Or=_o;var c_=class extends ka{_bindLitLit(e,t,i){let n=t.v==i.v;return()=>n}_bindColCol(e,t,i){let n=t.bind(e),s=i.bind(e);return(l,y)=>n(l,y)==s(l,y)}_bindColLit(e,t,i){let n=t.bind(e);if(t.vector instanceof F2.DictionaryVector){let s,l=t.vector;return l.dictionary!==this.lastDictionary?(s=l.reverseLookup(i.v),this.lastDictionary=l.dictionary,this.lastKey=s):s=this.lastKey,s===-1?()=>!1:y=>l.getKey(y)===s}else return(s,l)=>n(s,l)==i.v}_bindLitCol(e,t,i){return this._bindColLit(e,i,t)}};Ie.Equals=c_;var l_=class extends ka{_bindLitLit(e,t,i){let n=t.v<=i.v;return()=>n}_bindColCol(e,t,i){let n=t.bind(e),s=i.bind(e);return(l,y)=>n(l,y)<=s(l,y)}_bindColLit(e,t,i){let n=t.bind(e);return(s,l)=>n(s,l)<=i.v}_bindLitCol(e,t,i){let n=i.bind(e);return(s,l)=>t.v<=n(s,l)}};Ie.LTeq=l_;var d_=class extends ka{_bindLitLit(e,t,i){let n=t.v>=i.v;return()=>n}_bindColCol(e,t,i){let n=t.bind(e),s=i.bind(e);return(l,y)=>n(l,y)>=s(l,y)}_bindColLit(e,t,i){let n=t.bind(e);return(s,l)=>n(s,l)>=i.v}_bindLitCol(e,t,i){let n=i.bind(e);return(s,l)=>t.v>=n(s,l)}};Ie.GTeq=d_;var yo=class extends ho{constructor(e){super();this.child=e}bind(e){let t=this.child.bind(e);return(i,n)=>!t(i,n)}};Ie.Not=yo;var f_=class extends ho{constructor(e,t){super();this.next=e,this.bind_=t}bind(e){return this.bind_(e),this.next}};Ie.CustomPredicate=f_;function k2(r){return new bi(r)}Ie.lit=k2;function M2(r){return new u_(r)}Ie.col=M2;function C2(...r){return new po(...r)}Ie.and=C2;function U2(...r){return new _o(...r)}Ie.or=U2;function V2(r,e){return new f_(r,e)}Ie.custom=V2});var f1=E(dn=>{"use strict";Object.defineProperty(dn,"__esModule",{value:!0});dn.FilteredDataFrame=dn.CountByResult=dn.DataFrame=void 0;var a1=ma(),u1=Ec(),p_=wt(),c1=h_(),E2=_i(),l1=Ve(),__=class extends a1.Table{filter(e){return new Ca(this.chunks,e)}scan(e,t){let i=this.chunks,n=i.length;for(let s=-1;++s<n;){let l=i[s];t&&t(l);for(let y=-1,w=l.length;++y<w;)e(y,l)}}scanReverse(e,t){let i=this.chunks,n=i.length;for(let s=n;--s>=0;){let l=i[s];t&&t(l);for(let y=l.length;--y>=0;)e(y,l)}}countBy(e){let t=this.chunks,i=t.length,n=typeof e=="string"?new c1.Col(e):e;n.bind(t[i-1]);let s=n.vector;if(!l1.DataType.isDictionary(s.type))throw new Error("countBy currently only supports dictionary-encoded columns");let l=Math.ceil(Math.log(s.length)/Math.log(256)),y=l==4?Uint32Array:l>=2?Uint16Array:Uint8Array,w=new y(s.dictionary.length);for(let D=-1;++D<i;){let k=t[D];n.bind(k);let Y=n.vector.indices;for(let J=-1,ie=k.length;++J<ie;){let Ye=Y.get(J);Ye!==null&&w[Ye]++}}return new nl(s.dictionary,u1.IntVector.from(w))}};dn.DataFrame=__;var nl=class extends a1.Table{constructor(e,t){let i=new p_.Schema([new p_.Field("values",e.type),new p_.Field("counts",t.type)]);super(new E2.RecordBatch(i,t.length,[e,t]))}toJSON(){let e=this.getColumnAt(0),t=this.getColumnAt(1),i={};for(let n=-1;++n<this.length;)i[e.get(n)]=t.get(n);return i}};dn.CountByResult=nl;var d1=class{constructor(e,t){this.batches=e,this.predicate=t,this.batchIndex=0,this.index=0,this.batch=this.batches[this.batchIndex],this.predicateFunc=this.predicate.bind(this.batch)}next(){for(;this.batchIndex<this.batches.length;){for(;this.index<this.batch.length;){if(this.predicateFunc(this.index,this.batch))return{value:this.batch.get(this.index++)};this.index++}++this.batchIndex<this.batches.length&&(this.index=0,this.batch=this.batches[this.batchIndex],this.predicateFunc=this.predicate.bind(this.batch))}return{done:!0,value:null}}[Symbol.iterator](){return this}},Ca=class extends __{constructor(e,t){super(e);this._predicate=t}scan(e,t){let i=this._chunks,n=i.length;for(let s=-1;++s<n;){let l=i[s],y=this._predicate.bind(l),w=!1;for(let D=-1,k=l.length;++D<k;)y(D,l)&&(t&&!w&&(t(l),w=!0),e(D,l))}}scanReverse(e,t){let i=this._chunks,n=i.length;for(let s=n;--s>=0;){let l=i[s],y=this._predicate.bind(l),w=!1;for(let D=l.length;--D>=0;)y(D,l)&&(t&&!w&&(t(l),w=!0),e(D,l))}}count(){let e=0,t=this._chunks,i=t.length;for(let n=-1;++n<i;){let s=t[n],l=this._predicate.bind(s);for(let y=-1,w=s.length;++y<w;)l(y,s)&&++e}return e}[Symbol.iterator](){return new d1(this._chunks,this._predicate)}filter(e){return new Ca(this._chunks,this._predicate.and(e))}countBy(e){let t=this._chunks,i=t.length,n=typeof e=="string"?new c1.Col(e):e;n.bind(t[i-1]);let s=n.vector;if(!l1.DataType.isDictionary(s.type))throw new Error("countBy currently only supports dictionary-encoded columns");let l=Math.ceil(Math.log(s.length)/Math.log(256)),y=l==4?Uint32Array:l>=2?Uint16Array:Uint8Array,w=new y(s.dictionary.length);for(let D=-1;++D<i;){let k=t[D],Y=this._predicate.bind(k);n.bind(k);let J=n.vector.indices;for(let ie=-1,Ye=k.length;++ie<Ye;){let Re=J.get(ie);Re!==null&&Y(ie,k)&&w[Re]++}}return new nl(s.dictionary,u1.IntVector.from(w))}};dn.FilteredDataFrame=Ca});var _1=E(v=>{"use strict";Object.defineProperty(v,"__esModule",{value:!0});v.isTypedArray=v.util=v.predicate=v.CountByResult=v.FilteredDataFrame=v.DataFrame=v.RecordBatch=v.Message=v.JSONMessageReader=v.AsyncMessageReader=v.MessageReader=v.RecordBatchJSONWriter=v.RecordBatchStreamWriter=v.RecordBatchFileWriter=v.RecordBatchWriter=v.AsyncRecordBatchStreamReader=v.AsyncRecordBatchFileReader=v.RecordBatchStreamReader=v.RecordBatchFileReader=v.RecordBatchReader=v.AsyncByteQueue=v.AsyncByteStream=v.ByteStream=v.Utf8Builder=v.SparseUnionBuilder=v.DenseUnionBuilder=v.UnionBuilder=v.TimeNanosecondBuilder=v.TimeMicrosecondBuilder=v.TimeMillisecondBuilder=v.TimeSecondBuilder=v.TimeBuilder=v.TimestampNanosecondBuilder=v.TimestampMicrosecondBuilder=v.TimestampMillisecondBuilder=v.TimestampSecondBuilder=v.TimestampBuilder=v.StructBuilder=v.NullBuilder=v.MapBuilder=v.ListBuilder=v.Uint64Builder=v.Uint32Builder=v.Uint16Builder=v.Uint8Builder=v.Int64Builder=v.Int32Builder=v.Int16Builder=v.Int8Builder=v.IntBuilder=v.IntervalYearMonthBuilder=v.IntervalDayTimeBuilder=v.IntervalBuilder=v.Float64Builder=v.Float32Builder=v.Float16Builder=v.FloatBuilder=v.FixedSizeListBuilder=v.FixedSizeBinaryBuilder=v.DictionaryBuilder=v.DecimalBuilder=v.DateMillisecondBuilder=v.DateDayBuilder=v.DateBuilder=v.BoolBuilder=v.BinaryBuilder=v.Builder=v.Utf8Vector=v.SparseUnionVector=v.DenseUnionVector=v.UnionVector=v.TimeNanosecondVector=v.TimeMicrosecondVector=v.TimeMillisecondVector=v.TimeSecondVector=v.TimeVector=v.TimestampNanosecondVector=v.TimestampMicrosecondVector=v.TimestampMillisecondVector=v.TimestampSecondVector=v.TimestampVector=v.StructVector=v.NullVector=v.MapVector=v.ListVector=v.Uint64Vector=v.Uint32Vector=v.Uint16Vector=v.Uint8Vector=v.Int64Vector=v.Int32Vector=v.Int16Vector=v.Int8Vector=v.IntVector=v.IntervalYearMonthVector=v.IntervalDayTimeVector=v.IntervalVector=v.Float64Vector=v.Float32Vector=v.Float16Vector=v.FloatVector=v.FixedSizeListVector=v.FixedSizeBinaryVector=v.DictionaryVector=v.DecimalVector=v.DateMillisecondVector=v.DateDayVector=v.DateVector=v.Chunked=v.BoolVector=v.BinaryVector=v.BaseVector=v.Vector=v.Field=v.Schema=v.Visitor=v.Column=v.Table=v.Map_=v.FixedSizeList=v.IntervalYearMonth=v.IntervalDayTime=v.Interval=v.Dictionary=v.SparseUnion=v.DenseUnion=v.Union=v.Struct=v.List=v.Decimal=v.TimeNanosecond=v.TimeMicrosecond=v.TimeMillisecond=v.TimeSecond=v.Time=v.TimestampNanosecond=v.TimestampMicrosecond=v.TimestampMillisecond=v.TimestampSecond=v.Timestamp=v.DateMillisecond=v.DateDay=v.Date_=v.FixedSizeBinary=v.Binary=v.Utf8=v.Float64=v.Float32=v.Float16=v.Float=v.Uint64=v.Uint32=v.Uint16=v.Uint8=v.Int64=v.Int32=v.Int16=v.Int8=v.Int=v.Bool=v.Null=v.DataType=v.Data=v.BufferType=v.Type=v.MessageHeader=v.MetadataVersion=v.IntervalUnit=v.UnionMode=v.Precision=v.TimeUnit=v.DateUnit=void 0;var mo=Vi();Object.defineProperty(v,"DateUnit",{enumerable:!0,get:function(){return mo.DateUnit}});Object.defineProperty(v,"TimeUnit",{enumerable:!0,get:function(){return mo.TimeUnit}});Object.defineProperty(v,"Precision",{enumerable:!0,get:function(){return mo.Precision}});Object.defineProperty(v,"UnionMode",{enumerable:!0,get:function(){return mo.UnionMode}});Object.defineProperty(v,"IntervalUnit",{enumerable:!0,get:function(){return mo.IntervalUnit}});Object.defineProperty(v,"MetadataVersion",{enumerable:!0,get:function(){return mo.MetadataVersion}});var R2=pu();Object.defineProperty(v,"MessageHeader",{enumerable:!0,get:function(){return R2.MessageHeader}});var h1=xe();Object.defineProperty(v,"Type",{enumerable:!0,get:function(){return h1.Type}});Object.defineProperty(v,"BufferType",{enumerable:!0,get:function(){return h1.BufferType}});var N2=jr();Object.defineProperty(v,"Data",{enumerable:!0,get:function(){return N2.Data}});var be=Ve();Object.defineProperty(v,"DataType",{enumerable:!0,get:function(){return be.DataType}});Object.defineProperty(v,"Null",{enumerable:!0,get:function(){return be.Null}});Object.defineProperty(v,"Bool",{enumerable:!0,get:function(){return be.Bool}});Object.defineProperty(v,"Int",{enumerable:!0,get:function(){return be.Int}});Object.defineProperty(v,"Int8",{enumerable:!0,get:function(){return be.Int8}});Object.defineProperty(v,"Int16",{enumerable:!0,get:function(){return be.Int16}});Object.defineProperty(v,"Int32",{enumerable:!0,get:function(){return be.Int32}});Object.defineProperty(v,"Int64",{enumerable:!0,get:function(){return be.Int64}});Object.defineProperty(v,"Uint8",{enumerable:!0,get:function(){return be.Uint8}});Object.defineProperty(v,"Uint16",{enumerable:!0,get:function(){return be.Uint16}});Object.defineProperty(v,"Uint32",{enumerable:!0,get:function(){return be.Uint32}});Object.defineProperty(v,"Uint64",{enumerable:!0,get:function(){return be.Uint64}});Object.defineProperty(v,"Float",{enumerable:!0,get:function(){return be.Float}});Object.defineProperty(v,"Float16",{enumerable:!0,get:function(){return be.Float16}});Object.defineProperty(v,"Float32",{enumerable:!0,get:function(){return be.Float32}});Object.defineProperty(v,"Float64",{enumerable:!0,get:function(){return be.Float64}});Object.defineProperty(v,"Utf8",{enumerable:!0,get:function(){return be.Utf8}});Object.defineProperty(v,"Binary",{enumerable:!0,get:function(){return be.Binary}});Object.defineProperty(v,"FixedSizeBinary",{enumerable:!0,get:function(){return be.FixedSizeBinary}});Object.defineProperty(v,"Date_",{enumerable:!0,get:function(){return be.Date_}});Object.defineProperty(v,"DateDay",{enumerable:!0,get:function(){return be.DateDay}});Object.defineProperty(v,"DateMillisecond",{enumerable:!0,get:function(){return be.DateMillisecond}});Object.defineProperty(v,"Timestamp",{enumerable:!0,get:function(){return be.Timestamp}});Object.defineProperty(v,"TimestampSecond",{enumerable:!0,get:function(){return be.TimestampSecond}});Object.defineProperty(v,"TimestampMillisecond",{enumerable:!0,get:function(){return be.TimestampMillisecond}});Object.defineProperty(v,"TimestampMicrosecond",{enumerable:!0,get:function(){return be.TimestampMicrosecond}});Object.defineProperty(v,"TimestampNanosecond",{enumerable:!0,get:function(){return be.TimestampNanosecond}});Object.defineProperty(v,"Time",{enumerable:!0,get:function(){return be.Time}});Object.defineProperty(v,"TimeSecond",{enumerable:!0,get:function(){return be.TimeSecond}});Object.defineProperty(v,"TimeMillisecond",{enumerable:!0,get:function(){return be.TimeMillisecond}});Object.defineProperty(v,"TimeMicrosecond",{enumerable:!0,get:function(){return be.TimeMicrosecond}});Object.defineProperty(v,"TimeNanosecond",{enumerable:!0,get:function(){return be.TimeNanosecond}});Object.defineProperty(v,"Decimal",{enumerable:!0,get:function(){return be.Decimal}});Object.defineProperty(v,"List",{enumerable:!0,get:function(){return be.List}});Object.defineProperty(v,"Struct",{enumerable:!0,get:function(){return be.Struct}});Object.defineProperty(v,"Union",{enumerable:!0,get:function(){return be.Union}});Object.defineProperty(v,"DenseUnion",{enumerable:!0,get:function(){return be.DenseUnion}});Object.defineProperty(v,"SparseUnion",{enumerable:!0,get:function(){return be.SparseUnion}});Object.defineProperty(v,"Dictionary",{enumerable:!0,get:function(){return be.Dictionary}});Object.defineProperty(v,"Interval",{enumerable:!0,get:function(){return be.Interval}});Object.defineProperty(v,"IntervalDayTime",{enumerable:!0,get:function(){return be.IntervalDayTime}});Object.defineProperty(v,"IntervalYearMonth",{enumerable:!0,get:function(){return be.IntervalYearMonth}});Object.defineProperty(v,"FixedSizeList",{enumerable:!0,get:function(){return be.FixedSizeList}});Object.defineProperty(v,"Map_",{enumerable:!0,get:function(){return be.Map_}});var P2=ma();Object.defineProperty(v,"Table",{enumerable:!0,get:function(){return P2.Table}});var L2=$s();Object.defineProperty(v,"Column",{enumerable:!0,get:function(){return L2.Column}});var x2=Dt();Object.defineProperty(v,"Visitor",{enumerable:!0,get:function(){return x2.Visitor}});var p1=wt();Object.defineProperty(v,"Schema",{enumerable:!0,get:function(){return p1.Schema}});Object.defineProperty(v,"Field",{enumerable:!0,get:function(){return p1.Field}});var _e=$r();Object.defineProperty(v,"Vector",{enumerable:!0,get:function(){return _e.Vector}});Object.defineProperty(v,"BaseVector",{enumerable:!0,get:function(){return _e.BaseVector}});Object.defineProperty(v,"BinaryVector",{enumerable:!0,get:function(){return _e.BinaryVector}});Object.defineProperty(v,"BoolVector",{enumerable:!0,get:function(){return _e.BoolVector}});Object.defineProperty(v,"Chunked",{enumerable:!0,get:function(){return _e.Chunked}});Object.defineProperty(v,"DateVector",{enumerable:!0,get:function(){return _e.DateVector}});Object.defineProperty(v,"DateDayVector",{enumerable:!0,get:function(){return _e.DateDayVector}});Object.defineProperty(v,"DateMillisecondVector",{enumerable:!0,get:function(){return _e.DateMillisecondVector}});Object.defineProperty(v,"DecimalVector",{enumerable:!0,get:function(){return _e.DecimalVector}});Object.defineProperty(v,"DictionaryVector",{enumerable:!0,get:function(){return _e.DictionaryVector}});Object.defineProperty(v,"FixedSizeBinaryVector",{enumerable:!0,get:function(){return _e.FixedSizeBinaryVector}});Object.defineProperty(v,"FixedSizeListVector",{enumerable:!0,get:function(){return _e.FixedSizeListVector}});Object.defineProperty(v,"FloatVector",{enumerable:!0,get:function(){return _e.FloatVector}});Object.defineProperty(v,"Float16Vector",{enumerable:!0,get:function(){return _e.Float16Vector}});Object.defineProperty(v,"Float32Vector",{enumerable:!0,get:function(){return _e.Float32Vector}});Object.defineProperty(v,"Float64Vector",{enumerable:!0,get:function(){return _e.Float64Vector}});Object.defineProperty(v,"IntervalVector",{enumerable:!0,get:function(){return _e.IntervalVector}});Object.defineProperty(v,"IntervalDayTimeVector",{enumerable:!0,get:function(){return _e.IntervalDayTimeVector}});Object.defineProperty(v,"IntervalYearMonthVector",{enumerable:!0,get:function(){return _e.IntervalYearMonthVector}});Object.defineProperty(v,"IntVector",{enumerable:!0,get:function(){return _e.IntVector}});Object.defineProperty(v,"Int8Vector",{enumerable:!0,get:function(){return _e.Int8Vector}});Object.defineProperty(v,"Int16Vector",{enumerable:!0,get:function(){return _e.Int16Vector}});Object.defineProperty(v,"Int32Vector",{enumerable:!0,get:function(){return _e.Int32Vector}});Object.defineProperty(v,"Int64Vector",{enumerable:!0,get:function(){return _e.Int64Vector}});Object.defineProperty(v,"Uint8Vector",{enumerable:!0,get:function(){return _e.Uint8Vector}});Object.defineProperty(v,"Uint16Vector",{enumerable:!0,get:function(){return _e.Uint16Vector}});Object.defineProperty(v,"Uint32Vector",{enumerable:!0,get:function(){return _e.Uint32Vector}});Object.defineProperty(v,"Uint64Vector",{enumerable:!0,get:function(){return _e.Uint64Vector}});Object.defineProperty(v,"ListVector",{enumerable:!0,get:function(){return _e.ListVector}});Object.defineProperty(v,"MapVector",{enumerable:!0,get:function(){return _e.MapVector}});Object.defineProperty(v,"NullVector",{enumerable:!0,get:function(){return _e.NullVector}});Object.defineProperty(v,"StructVector",{enumerable:!0,get:function(){return _e.StructVector}});Object.defineProperty(v,"TimestampVector",{enumerable:!0,get:function(){return _e.TimestampVector}});Object.defineProperty(v,"TimestampSecondVector",{enumerable:!0,get:function(){return _e.TimestampSecondVector}});Object.defineProperty(v,"TimestampMillisecondVector",{enumerable:!0,get:function(){return _e.TimestampMillisecondVector}});Object.defineProperty(v,"TimestampMicrosecondVector",{enumerable:!0,get:function(){return _e.TimestampMicrosecondVector}});Object.defineProperty(v,"TimestampNanosecondVector",{enumerable:!0,get:function(){return _e.TimestampNanosecondVector}});Object.defineProperty(v,"TimeVector",{enumerable:!0,get:function(){return _e.TimeVector}});Object.defineProperty(v,"TimeSecondVector",{enumerable:!0,get:function(){return _e.TimeSecondVector}});Object.defineProperty(v,"TimeMillisecondVector",{enumerable:!0,get:function(){return _e.TimeMillisecondVector}});Object.defineProperty(v,"TimeMicrosecondVector",{enumerable:!0,get:function(){return _e.TimeMicrosecondVector}});Object.defineProperty(v,"TimeNanosecondVector",{enumerable:!0,get:function(){return _e.TimeNanosecondVector}});Object.defineProperty(v,"UnionVector",{enumerable:!0,get:function(){return _e.UnionVector}});Object.defineProperty(v,"DenseUnionVector",{enumerable:!0,get:function(){return _e.DenseUnionVector}});Object.defineProperty(v,"SparseUnionVector",{enumerable:!0,get:function(){return _e.SparseUnionVector}});Object.defineProperty(v,"Utf8Vector",{enumerable:!0,get:function(){return _e.Utf8Vector}});var ge=ec();Object.defineProperty(v,"Builder",{enumerable:!0,get:function(){return ge.Builder}});Object.defineProperty(v,"BinaryBuilder",{enumerable:!0,get:function(){return ge.BinaryBuilder}});Object.defineProperty(v,"BoolBuilder",{enumerable:!0,get:function(){return ge.BoolBuilder}});Object.defineProperty(v,"DateBuilder",{enumerable:!0,get:function(){return ge.DateBuilder}});Object.defineProperty(v,"DateDayBuilder",{enumerable:!0,get:function(){return ge.DateDayBuilder}});Object.defineProperty(v,"DateMillisecondBuilder",{enumerable:!0,get:function(){return ge.DateMillisecondBuilder}});Object.defineProperty(v,"DecimalBuilder",{enumerable:!0,get:function(){return ge.DecimalBuilder}});Object.defineProperty(v,"DictionaryBuilder",{enumerable:!0,get:function(){return ge.DictionaryBuilder}});Object.defineProperty(v,"FixedSizeBinaryBuilder",{enumerable:!0,get:function(){return ge.FixedSizeBinaryBuilder}});Object.defineProperty(v,"FixedSizeListBuilder",{enumerable:!0,get:function(){return ge.FixedSizeListBuilder}});Object.defineProperty(v,"FloatBuilder",{enumerable:!0,get:function(){return ge.FloatBuilder}});Object.defineProperty(v,"Float16Builder",{enumerable:!0,get:function(){return ge.Float16Builder}});Object.defineProperty(v,"Float32Builder",{enumerable:!0,get:function(){return ge.Float32Builder}});Object.defineProperty(v,"Float64Builder",{enumerable:!0,get:function(){return ge.Float64Builder}});Object.defineProperty(v,"IntervalBuilder",{enumerable:!0,get:function(){return ge.IntervalBuilder}});Object.defineProperty(v,"IntervalDayTimeBuilder",{enumerable:!0,get:function(){return ge.IntervalDayTimeBuilder}});Object.defineProperty(v,"IntervalYearMonthBuilder",{enumerable:!0,get:function(){return ge.IntervalYearMonthBuilder}});Object.defineProperty(v,"IntBuilder",{enumerable:!0,get:function(){return ge.IntBuilder}});Object.defineProperty(v,"Int8Builder",{enumerable:!0,get:function(){return ge.Int8Builder}});Object.defineProperty(v,"Int16Builder",{enumerable:!0,get:function(){return ge.Int16Builder}});Object.defineProperty(v,"Int32Builder",{enumerable:!0,get:function(){return ge.Int32Builder}});Object.defineProperty(v,"Int64Builder",{enumerable:!0,get:function(){return ge.Int64Builder}});Object.defineProperty(v,"Uint8Builder",{enumerable:!0,get:function(){return ge.Uint8Builder}});Object.defineProperty(v,"Uint16Builder",{enumerable:!0,get:function(){return ge.Uint16Builder}});Object.defineProperty(v,"Uint32Builder",{enumerable:!0,get:function(){return ge.Uint32Builder}});Object.defineProperty(v,"Uint64Builder",{enumerable:!0,get:function(){return ge.Uint64Builder}});Object.defineProperty(v,"ListBuilder",{enumerable:!0,get:function(){return ge.ListBuilder}});Object.defineProperty(v,"MapBuilder",{enumerable:!0,get:function(){return ge.MapBuilder}});Object.defineProperty(v,"NullBuilder",{enumerable:!0,get:function(){return ge.NullBuilder}});Object.defineProperty(v,"StructBuilder",{enumerable:!0,get:function(){return ge.StructBuilder}});Object.defineProperty(v,"TimestampBuilder",{enumerable:!0,get:function(){return ge.TimestampBuilder}});Object.defineProperty(v,"TimestampSecondBuilder",{enumerable:!0,get:function(){return ge.TimestampSecondBuilder}});Object.defineProperty(v,"TimestampMillisecondBuilder",{enumerable:!0,get:function(){return ge.TimestampMillisecondBuilder}});Object.defineProperty(v,"TimestampMicrosecondBuilder",{enumerable:!0,get:function(){return ge.TimestampMicrosecondBuilder}});Object.defineProperty(v,"TimestampNanosecondBuilder",{enumerable:!0,get:function(){return ge.TimestampNanosecondBuilder}});Object.defineProperty(v,"TimeBuilder",{enumerable:!0,get:function(){return ge.TimeBuilder}});Object.defineProperty(v,"TimeSecondBuilder",{enumerable:!0,get:function(){return ge.TimeSecondBuilder}});Object.defineProperty(v,"TimeMillisecondBuilder",{enumerable:!0,get:function(){return ge.TimeMillisecondBuilder}});Object.defineProperty(v,"TimeMicrosecondBuilder",{enumerable:!0,get:function(){return ge.TimeMicrosecondBuilder}});Object.defineProperty(v,"TimeNanosecondBuilder",{enumerable:!0,get:function(){return ge.TimeNanosecondBuilder}});Object.defineProperty(v,"UnionBuilder",{enumerable:!0,get:function(){return ge.UnionBuilder}});Object.defineProperty(v,"DenseUnionBuilder",{enumerable:!0,get:function(){return ge.DenseUnionBuilder}});Object.defineProperty(v,"SparseUnionBuilder",{enumerable:!0,get:function(){return ge.SparseUnionBuilder}});Object.defineProperty(v,"Utf8Builder",{enumerable:!0,get:function(){return ge.Utf8Builder}});var y_=Gi();Object.defineProperty(v,"ByteStream",{enumerable:!0,get:function(){return y_.ByteStream}});Object.defineProperty(v,"AsyncByteStream",{enumerable:!0,get:function(){return y_.AsyncByteStream}});Object.defineProperty(v,"AsyncByteQueue",{enumerable:!0,get:function(){return y_.AsyncByteQueue}});var Ua=Sa();Object.defineProperty(v,"RecordBatchReader",{enumerable:!0,get:function(){return Ua.RecordBatchReader}});Object.defineProperty(v,"RecordBatchFileReader",{enumerable:!0,get:function(){return Ua.RecordBatchFileReader}});Object.defineProperty(v,"RecordBatchStreamReader",{enumerable:!0,get:function(){return Ua.RecordBatchStreamReader}});Object.defineProperty(v,"AsyncRecordBatchFileReader",{enumerable:!0,get:function(){return Ua.AsyncRecordBatchFileReader}});Object.defineProperty(v,"AsyncRecordBatchStreamReader",{enumerable:!0,get:function(){return Ua.AsyncRecordBatchStreamReader}});var sl=Tc();Object.defineProperty(v,"RecordBatchWriter",{enumerable:!0,get:function(){return sl.RecordBatchWriter}});Object.defineProperty(v,"RecordBatchFileWriter",{enumerable:!0,get:function(){return sl.RecordBatchFileWriter}});Object.defineProperty(v,"RecordBatchStreamWriter",{enumerable:!0,get:function(){return sl.RecordBatchStreamWriter}});Object.defineProperty(v,"RecordBatchJSONWriter",{enumerable:!0,get:function(){return sl.RecordBatchJSONWriter}});var m_=pc();Object.defineProperty(v,"MessageReader",{enumerable:!0,get:function(){return m_.MessageReader}});Object.defineProperty(v,"AsyncMessageReader",{enumerable:!0,get:function(){return m_.AsyncMessageReader}});Object.defineProperty(v,"JSONMessageReader",{enumerable:!0,get:function(){return m_.JSONMessageReader}});var q2=Nn();Object.defineProperty(v,"Message",{enumerable:!0,get:function(){return q2.Message}});var z2=_i();Object.defineProperty(v,"RecordBatch",{enumerable:!0,get:function(){return z2.RecordBatch}});var b_=f1();Object.defineProperty(v,"DataFrame",{enumerable:!0,get:function(){return b_.DataFrame}});Object.defineProperty(v,"FilteredDataFrame",{enumerable:!0,get:function(){return b_.FilteredDataFrame}});Object.defineProperty(v,"CountByResult",{enumerable:!0,get:function(){return b_.CountByResult}});var W2=ta(),H2=Ih(),Y2=Er(),$2=Zo(),G2=mt(),K2=ca(),J2=h_();v.predicate=J2;var g_=qh();v.util=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},W2),H2),Y2),$2),G2),K2),{compareSchemas:g_.compareSchemas,compareFields:g_.compareFields,compareTypes:g_.compareTypes});var Z2=Vn();Object.defineProperty(v,"isTypedArray",{enumerable:!0,get:function(){return Z2.isTypedArray}})});var Hn=E(()=>{});var Ea=E(()=>{});var y1=ii(Ko(),1),m1=ii(ec(),1),bo=ii(Sa(),1),go=ii(Tc(),1),b1=ii(t1(),1),g1=ii(n1(),1),ol=ii(s1(),1),al=ii(o1(),1),O=ii(_1(),1);y1.default.toDOMStream=b1.toDOMStream;m1.Builder.throughDOM=g1.builderThroughDOMStream;bo.RecordBatchReader.throughDOM=ol.recordBatchReaderThroughDOMStream;bo.RecordBatchFileReader.throughDOM=ol.recordBatchReaderThroughDOMStream;bo.RecordBatchStreamReader.throughDOM=ol.recordBatchReaderThroughDOMStream;go.RecordBatchWriter.throughDOM=al.recordBatchWriterThroughDOMStream;go.RecordBatchFileWriter.throughDOM=al.recordBatchWriterThroughDOMStream;go.RecordBatchStreamWriter.throughDOM=al.recordBatchWriterThroughDOMStream;var v_=class{constructor(e,t){this._bindings=e,this._conn=t}close(){this._bindings.disconnect(this._conn)}useUnsafe(e){return e(this._bindings,this._conn)}query(e){let t=this._bindings.runQuery(this._conn,e),i=O.RecordBatchReader.from(t);return console.assert(i.isSync()),console.assert(i.isFile()),O.Table.from(i)}send(e){let t=this._bindings.sendQuery(this._conn,e),i=new w_(this._bindings,this._conn,t),n=O.RecordBatchReader.from(i);return console.assert(n.isSync()),console.assert(n.isStream()),n}getTableNames(e){return this._bindings.getTableNames(this._conn,e)}prepare(e){let t=this._bindings.createPrepared(this._conn,e);return new w1(this._bindings,this._conn,t)}insertArrowTable(e,t){let i=e.serialize("binary",!0);this.insertArrowFromIPCStream(i,t)}insertArrowFromIPCStream(e,t){this._bindings.insertArrowFromIPCStream(this._conn,e,t)}insertCSVFromPath(e,t){this._bindings.insertCSVFromPath(this._conn,e,t)}insertJSONFromPath(e,t){this._bindings.insertJSONFromPath(this._conn,e,t)}},w_=class{constructor(e,t,i){this.bindings=e;this.conn=t;this.header=i;this._first=!0,this._depleted=!1}next(){if(this._first)return this._first=!1,{done:!1,value:this.header};if(this._depleted)return{done:!0,value:null};let e=this.bindings.fetchQueryResults(this.conn);return this._depleted=e.length==0,{done:this._depleted,value:e}}[Symbol.iterator](){return this}},w1=class{constructor(e,t,i){this.bindings=e,this.connectionId=t,this.statementId=i}close(){this.bindings.closePrepared(this.connectionId,this.statementId)}query(...e){let t=this.bindings.runPrepared(this.connectionId,this.statementId,e),i=O.RecordBatchReader.from(t);return console.assert(i.isSync()),console.assert(i.isFile()),O.Table.from(i)}send(...e){let t=this.bindings.sendPrepared(this.connectionId,this.statementId,e),i=new w_(this.bindings,this.connectionId,t),n=O.RecordBatchReader.from(i);return console.assert(n.isSync()),console.assert(n.isStream()),n}};var X2=(e=>(e[e.SUCCESS=0]="SUCCESS",e))(X2||{});function Q2(){let r=new TextDecoder;return e=>(typeof SharedArrayBuffer!="undefined"&&e.buffer instanceof SharedArrayBuffer&&(e=new Uint8Array(e)),r.decode(e))}var eU=Q2();function gi(r,e){r.ccall("duckdb_web_fail_with",null,["string"],[e])}function vo(r,e,t){let i=r.HEAPU8.subarray(e,e+t),n=new Uint8Array(new ArrayBuffer(i.byteLength));return n.set(i),n}function Te(r,e,t){return eU(r.HEAPU8.subarray(e,e+t))}var j1=(i=>(i[i.BUFFER=0]="BUFFER",i[i.NATIVE=1]="NATIVE",i[i.HTTP=3]="HTTP",i))(j1||{});function Le(r,e,t,i){let n=r.stackSave(),s=r.stackAlloc(3*8);t.unshift("number"),i.unshift(s),r.ccall(e,null,t,i);let l=r.HEAPF64[(s>>3)+0],y=r.HEAPF64[(s>>3)+1],w=r.HEAPF64[(s>>3)+2];return r.stackRestore(n),[l,y,w]}function it(r){r.ccall("duckdb_web_clear_response",null,[],[])}var tU={testPlatformFeature:(r,e)=>!1,openFile:(r,e)=>{},syncFile:(r,e)=>{},closeFile:(r,e)=>{},getLastFileModificationTime:(r,e)=>0,truncateFile:(r,e,t)=>{},readFile:(r,e,t,i,n)=>0,writeFile:(r,e,t,i,n)=>0,removeDirectory:(r,e,t)=>{},checkDirectory:(r,e,t)=>!1,createDirectory:(r,e,t)=>{},listDirectoryEntries:(r,e,t)=>!1,glob:(r,e,t)=>{},moveFile:(r,e,t,i,n)=>{},checkFile:(r,e,t)=>!1,removeFile:(r,e,t)=>{}};var j_=class{constructor(e){let t=new Float64Array(e.buffer,e.byteOffset,e.byteLength/8),i=new Uint8Array(new ArrayBuffer(e.byteLength));i.set(e.subarray(7*8)),this.totalFileReadsCold=t[0],this.totalFileReadsAhead=t[1],this.totalFileReadsCached=t[2],this.totalFileWrites=t[3],this.totalPageAccesses=t[4],this.totalPageLoads=t[5],this.blockSize=t[6],this.blockStats=i}getBlockStats(e,t){return t=t||{file_reads_cold:0,file_reads_ahead:0,file_reads_cached:0,file_writes:0,page_accesses:0,page_loads:0},t.file_writes=this.blockStats[e*3+0]&15,t.file_reads_cold=this.blockStats[e*3+0]>>4,t.file_reads_ahead=this.blockStats[e*3+1]&15,t.file_reads_cached=this.blockStats[e*3+1]>>4,t.page_accesses=this.blockStats[e*3+1]&15,t.page_loads=this.blockStats[e*3+1]>>4,t}};function Va(r,e){switch(e.typeId){case O.Type.Binary:return{name:r,type:"binary"};case O.Type.Bool:return{name:r,type:"bool"};case O.Type.Date:return{name:r,type:"date"};case O.Type.DateDay:return{name:r,type:"date32[d]"};case O.Type.DateMillisecond:return{name:r,type:"date64[ms]"};case O.Type.Decimal:{let t=e;return{name:r,type:"decimal",precision:t.precision,scale:t.scale}}case O.Type.Float:return{name:r,type:"float"};case O.Type.Float16:return{name:r,type:"float16"};case O.Type.Float32:return{name:r,type:"float32"};case O.Type.Float64:return{name:r,type:"float64"};case O.Type.Int:return{name:r,type:"int32"};case O.Type.Int16:return{name:r,type:"int16"};case O.Type.Int32:return{name:r,type:"int32"};case O.Type.Int64:return{name:r,type:"int64"};case O.Type.Uint16:return{name:r,type:"uint16"};case O.Type.Uint32:return{name:r,type:"uint32"};case O.Type.Uint64:return{name:r,type:"uint64"};case O.Type.Uint8:return{name:r,type:"uint8"};case O.Type.IntervalDayTime:return{name:r,type:"interval[dt]"};case O.Type.IntervalYearMonth:return{name:r,type:"interval[m]"};case O.Type.List:{let t=e;return{name:r,type:"list",children:[Va(t.valueField.name,t.valueField.type)]}}case O.Type.FixedSizeBinary:return{name:r,type:"fixedsizebinary",byteWidth:e.byteWidth};case O.Type.Null:return{name:r,type:"null"};case O.Type.Utf8:return{name:r,type:"utf8"};case O.Type.Struct:return{name:r,type:"struct",children:e.children.map(i=>Va(i.name,i.type))};case O.Type.Time:return{name:r,type:"time[s]"};case O.Type.TimeMicrosecond:return{name:r,type:"time[us]"};case O.Type.TimeMillisecond:return{name:r,type:"time[ms]"};case O.Type.TimeNanosecond:return{name:r,type:"time[ns]"};case O.Type.TimeSecond:return{name:r,type:"time[s]"};case O.Type.Timestamp:return{name:r,type:"timestamp",timezone:e.timezone||void 0};case O.Type.TimestampSecond:return{name:r,type:"timestamp[s]",timezone:e.timezone||void 0};case O.Type.TimestampMicrosecond:return{name:r,type:"timestamp[us]",timezone:e.timezone||void 0};case O.Type.TimestampNanosecond:return{name:r,type:"timestamp[ns]",timezone:e.timezone||void 0};case O.Type.TimestampMillisecond:return{name:r,type:"timestamp[ms]",timezone:e.timezone||void 0}}throw new Error(`unsupported arrow type: ${e.toString()}`)}var rU=new TextEncoder,iU=(s=>(s[s.WASM_EXCEPTIONS=1]="WASM_EXCEPTIONS",s[s.WASM_THREADS=2]="WASM_THREADS",s[s.WASM_SIMD=4]="WASM_SIMD",s[s.WASM_BULK_MEMORY=8]="WASM_BULK_MEMORY",s[s.EMIT_BIGINT=16]="EMIT_BIGINT",s))(iU||{}),B_=class{constructor(e,t){this._instance=null;this._initPromise=null;this._initPromiseResolver=()=>{};this._logger=e,this._runtime=t}get logger(){return this._logger}get mod(){return this._instance}get pthread(){return this.mod.PThread||null}async instantiate(){return this._instance!=null?this:(this._initPromise!=null&&await this._initPromise,this._initPromise=new Promise(e=>{this._initPromiseResolver=e}),this._instance=await this.instantiateImpl({print:console.log.bind(console),printErr:console.log.bind(console),onRuntimeInitialized:this._initPromiseResolver}),await this._initPromise,this._initPromise=null,this)}open(e){let[t,i,n]=Le(this.mod,"duckdb_web_open",["string"],[JSON.stringify(e)]);if(t!==0)throw new Error(Te(this.mod,i,n));it(this.mod)}reset(){let[e,t,i]=Le(this.mod,"duckdb_web_reset",[],[]);if(e!==0)throw new Error(Te(this.mod,t,i));it(this.mod)}getVersion(){let[e,t,i]=Le(this.mod,"duckdb_web_get_version",[],[]);if(e!==0)throw new Error(Te(this.mod,t,i));let n=Te(this.mod,t,i);return it(this.mod),n}getFeatureFlags(){return this.mod.ccall("duckdb_web_get_feature_flags","number",[],[])}tokenize(e){let[t,i,n]=Le(this.mod,"duckdb_web_tokenize",["string"],[e]);if(t!==0)throw new Error(Te(this.mod,i,n));let s=Te(this.mod,i,n);return it(this.mod),JSON.parse(s)}connect(){let e=this.mod.ccall("duckdb_web_connect","number",[],[]);return new v_(this,e)}disconnect(e){this.mod.ccall("duckdb_web_disconnect",null,["number"],[e])}runQuery(e,t){let[i,n,s]=Le(this.mod,"duckdb_web_query_run",["number","string"],[e,t]);if(i!==0)throw new Error(Te(this.mod,n,s));let l=vo(this.mod,n,s);return it(this.mod),l}sendQuery(e,t){let[i,n,s]=Le(this.mod,"duckdb_web_query_send",["number","string"],[e,t]);if(i!==0)throw new Error(Te(this.mod,n,s));let l=vo(this.mod,n,s);return it(this.mod),l}fetchQueryResults(e){let[t,i,n]=Le(this.mod,"duckdb_web_query_fetch_results",["number"],[e]);if(t!==0)throw new Error(Te(this.mod,i,n));let s=vo(this.mod,i,n);return it(this.mod),s}getTableNames(e,t){let[i,n,s]=Le(this.mod,"duckdb_web_get_tablenames",["number","string"],[e,t]);if(i!==0)throw new Error(Te(this.mod,n,s));let l=Te(this.mod,n,s);return it(this.mod),JSON.parse(l)}createPrepared(e,t){let[i,n,s]=Le(this.mod,"duckdb_web_prepared_create",["number","string"],[e,t]);if(i!==0)throw new Error(Te(this.mod,n,s));return it(this.mod),n}closePrepared(e,t){let[i,n,s]=Le(this.mod,"duckdb_web_prepared_close",["number","number"],[e,t]);if(i!==0)throw new Error(Te(this.mod,n,s));it(this.mod)}runPrepared(e,t,i){let[n,s,l]=Le(this.mod,"duckdb_web_prepared_run",["number","number","string"],[e,t,JSON.stringify(i)]);if(n!==0)throw new Error(Te(this.mod,s,l));let y=vo(this.mod,s,l);return it(this.mod),y}sendPrepared(e,t,i){let[n,s,l]=Le(this.mod,"duckdb_web_prepared_send",["number","number","string"],[e,t,JSON.stringify(i)]);if(n!==0)throw new Error(Te(this.mod,s,l));let y=vo(this.mod,s,l);return it(this.mod),y}insertArrowFromIPCStream(e,t,i){if(t.length==0)return;let n=this.mod._malloc(t.length);this.mod.HEAPU8.subarray(n,n+t.length).set(t);let l=i?JSON.stringify(i):"",[y,w,D]=Le(this.mod,"duckdb_web_insert_arrow_from_ipc_stream",["number","number","number","string"],[e,n,t.length,l]);if(y!==0)throw new Error(Te(this.mod,w,D))}insertCSVFromPath(e,t,i){if(i.columns!==void 0){i.columnsFlat=[];for(let D in i.columns)i.columnsFlat.push(Va(D,i.columns[D]))}let n=ri({},i);n.columns=n.columnsFlat,delete n.columnsFlat;let s=JSON.stringify(n),[l,y,w]=Le(this.mod,"duckdb_web_insert_csv_from_path",["number","string","string"],[e,t,s]);if(l!==0)throw new Error(Te(this.mod,y,w))}insertJSONFromPath(e,t,i){if(i.columns!==void 0){i.columnsFlat=[];for(let D in i.columns)i.columnsFlat.push(Va(D,i.columns[D]))}let n=ri({},i);n.columns=n.columnsFlat,delete n.columnsFlat;let s=JSON.stringify(n),[l,y,w]=Le(this.mod,"duckdb_web_insert_json_from_path",["number","string","string"],[e,t,s]);if(l!==0)throw new Error(Te(this.mod,y,w))}globFiles(e){let[t,i,n]=Le(this.mod,"duckdb_web_fs_glob_file_infos",["string"],[e]);if(t!==0)throw new Error(Te(this.mod,i,n));let s=Te(this.mod,i,n);it(this.mod);let l=JSON.parse(s);return l==null?[]:l}registerFileURL(e,t){t===void 0&&(t=e);let[i,n,s]=Le(this.mod,"duckdb_web_fs_register_file_url",["string","string"],[e,t]);if(i!==0)throw new Error(Te(this.mod,n,s));it(this.mod)}registerFileText(e,t){let i=rU.encode(t);this.registerFileBuffer(e,i)}registerFileBuffer(e,t){let i=this.mod._malloc(t.length);this.mod.HEAPU8.subarray(i,i+t.length).set(t);let[s,l,y]=Le(this.mod,"duckdb_web_fs_register_file_buffer",["string","number","number"],[e,i,t.length]);if(s!==0)throw new Error(Te(this.mod,l,y));it(this.mod)}registerFileHandle(e,t){let[i,n,s]=Le(this.mod,"duckdb_web_fs_register_file_url",["string","string"],[e,e]);if(i!==0)throw new Error(Te(this.mod,n,s));if(it(this.mod),globalThis.DUCKDB_RUNTIME._files=(globalThis.DUCKDB_RUNTIME._files||new Map).set(e,t),this.pthread){for(let l of this.pthread.runningWorkers)l.postMessage({cmd:"registerFileHandle",fileName:e,fileHandle:t});for(let l of this.pthread.unusedWorkers)l.postMessage({cmd:"dropFileHandle",fileName:e})}}dropFile(e){return this.mod.ccall("duckdb_web_fs_drop_file","boolean",["string"],[e])}dropFiles(){let[e,t,i]=Le(this.mod,"duckdb_web_fs_drop_files",[],[]);if(e!==0)throw new Error(Te(this.mod,t,i));it(this.mod)}flushFiles(){this.mod.ccall("duckdb_web_flush_files",null,[],[])}copyFileToPath(e,t){let[i,n,s]=Le(this.mod,"duckdb_web_copy_file_to_path",["string","string"],[e,t]);if(i!==0)throw new Error(Te(this.mod,n,s));it(this.mod)}copyFileToBuffer(e){let[t,i,n]=Le(this.mod,"duckdb_web_copy_file_to_buffer",["string"],[e]);if(t!==0)throw new Error(Te(this.mod,i,n));let s=this.mod.HEAPU8.subarray(i,i+n),l=new Uint8Array(s.length);return l.set(s),it(this.mod),l}collectFileStatistics(e,t){let[i,n,s]=Le(this.mod,"duckdb_web_collect_file_stats",["string","boolean"],[e,t]);if(i!==0)throw new Error(Te(this.mod,n,s))}exportFileStatistics(e){let[t,i,n]=Le(this.mod,"duckdb_web_export_file_stats",["string"],[e]);if(t!==0)throw new Error(Te(this.mod,i,n));return new j_(this.mod.HEAPU8.subarray(i,i+n))}};var nU=(t=>(t.ROW_ARRAY="row-array",t.COLUMN_OBJECT="column-object",t))(nU||{});var sU=(t=>(t[t.APPEND=0]="APPEND",t[t.IMPORT=1]="IMPORT",t))(sU||{});var oU=(s=>(s[s.NONE=0]="NONE",s[s.DEBUG=1]="DEBUG",s[s.INFO=2]="INFO",s[s.WARNING=3]="WARNING",s[s.ERROR=4]="ERROR",s))(oU||{}),aU=(s=>(s[s.NONE=0]="NONE",s[s.CONNECT=1]="CONNECT",s[s.DISCONNECT=2]="DISCONNECT",s[s.OPEN=3]="OPEN",s[s.QUERY=4]="QUERY",s))(aU||{}),uU=(l=>(l[l.NONE=0]="NONE",l[l.OK=1]="OK",l[l.ERROR=2]="ERROR",l[l.START=3]="START",l[l.RUN=4]="RUN",l[l.CAPTURE=5]="CAPTURE",l))(uU||{}),cU=(s=>(s[s.NONE=0]="NONE",s[s.WEB_WORKER=1]="WEB_WORKER",s[s.NODE_WORKER=2]="NODE_WORKER",s[s.BINDINGS=3]="BINDINGS",s[s.ASYNC_DUCKDB=4]="ASYNC_DUCKDB",s))(cU||{}),lU=class{log(e){}},dU=class{log(e){console.log(e)}};function zE(r){switch(r){case 0:return"NONE";case 1:return"DEBUG";case 2:return"INFO";case 3:return"WARNING";case 4:return"ERROR";default:return"?"}}function WE(r){switch(r){case 0:return"NONE";case 1:return"OK";case 2:return"ERROR";case 3:return"START";case 4:return"RUN";case 5:return"CAPTURE";default:return"?"}}function HE(r){switch(r){case 1:return"CONNECT";case 2:return"DISCONNECT";case 3:return"OPEN";case 4:return"QUERY";default:return"?"}}function YE(r){switch(r){case 0:return"NONE";case 1:return"WEB WORKER";case 2:return"NODE WORKER";case 3:return"DUCKDB BINDINGS";case 4:return"DUCKDB";default:return"?"}}var B1=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,3,1,0,1,10,14,1,12,0,65,0,65,0,65,0,252,10,0,0,11])),I1=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,8,1,6,0,6,64,25,11,11]));var T1=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11]));var S1=()=>(async r=>{try{return typeof MessageChannel!="undefined"&&new MessageChannel().port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(r)}catch(e){return!1}})(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]));var hU="@duckdb/duckdb-wasm",pU="1.13.1-dev7.0",_U="DuckDB powered by WebAssembly",yU="MPL-2.0",mU={type:"git",url:"https://github.com/duckdb/duckdb-wasm.git"},bU=["sql","duckdb","relational","database","data","query","wasm","analytics","olap","arrow","parquet","json","csv"],gU={"apache-arrow":"^6.0.1","wasm-feature-detect":"^1.2.11","fast-glob":"^3.2.10","web-worker":"^1.2.0","@types/emscripten":"^1.39.6"},vU={"@types/jasmine":"^3.10.3","@typescript-eslint/eslint-plugin":"^5.9.1","@typescript-eslint/parser":"^5.9.1",esbuild:"^0.14.11",eslint:"^8.6.0","eslint-plugin-jasmine":"^4.1.3","eslint-plugin-react":"^7.28.0",jasmine:"^4.0.2","jasmine-core":"^4.0.0","jasmine-spec-reporter":"^7.0.0",karma:"^6.3.10","karma-chrome-launcher":"^3.1.0","karma-coverage":"^2.1.0","karma-firefox-launcher":"^2.1.2","karma-jasmine":"^4.0.1","karma-jasmine-html-reporter":"^1.7.0","karma-sourcemap-loader":"^0.3.8","karma-spec-reporter":"^0.0.33","make-dir":"^3.1.0",nyc:"^15.1.0",prettier:"^2.5.1",puppeteer:"^13.0.1",rimraf:"^3.0.2",typedoc:"^0.22.10",typescript:"^4.5.4"},wU={fsevents:"*"},jU={"build:debug":"node bundle.mjs debug && tsc --emitDeclarationOnly","build:release":"node bundle.mjs release && tsc --emitDeclarationOnly",docs:"typedoc",report:"node ./coverage.mjs","test:node":"node --enable-source-maps --experimental-wasm-eh ../../node_modules/jasmine/bin/jasmine ./dist/tests-node.cjs","test:node:debug":"node --inspect-brk --enable-source-maps --experimental-wasm-eh ../../node_modules/jasmine/bin/jasmine ./dist/tests-node.cjs","test:node:coverage":"nyc -r json --report-dir ./coverage/node node --experimental-wasm-eh ../../node_modules/jasmine/bin/jasmine ./dist/tests-node.cjs","test:firefox":"karma start ./karma/tests-firefox.cjs","test:chrome":"karma start ./karma/tests-chrome.cjs","test:chrome:eh":"karma start ./karma/tests-chrome-eh.cjs","test:chrome:coverage":"karma start ./karma/tests-chrome-coverage.cjs","test:browser":"karma start ./karma/tests-all.cjs","test:browser:debug":"karma start ./karma/tests-debug.cjs",test:"npm run test:chrome && npm run test:node","test:coverage":"npm run test:chrome:coverage && npm run test:node:coverage && npm run report",lint:"eslint src test"},BU=["dist","!dist/types/test"],IU="dist/duckdb-browser.cjs",TU="dist/duckdb-browser.mjs",SU="dist/duckdb-browser.d.ts",DU="dist/duckdb-browser.cjs",AU="dist/duckdb-browser.mjs",OU=!1,FU={fs:!1,path:!1,perf_hooks:!1,os:!1,worker_threads:!1},kU={"./dist/duckdb.wasm":"./dist/duckdb.wasm","./dist/duckdb-eh.wasm":"./dist/duckdb-eh.wasm","./dist/duckdb-coi.wasm":"./dist/duckdb-coi.wasm","./dist/duckdb-browser":"./dist/duckdb-browser.mjs","./dist/duckdb-browser.cjs":"./dist/duckdb-browser.cjs","./dist/duckdb-browser.mjs":"./dist/duckdb-browser.mjs","./dist/duckdb-browser-blocking":"./dist/duckdb-browser-blocking.mjs","./dist/duckdb-browser-blocking.mjs":"./dist/duckdb-browser-blocking.mjs","./dist/duckdb-browser-blocking.cjs":"./dist/duckdb-browser-blocking.cjs","./dist/duckdb-browser-coi.pthread.worker.js":"./dist/duckdb-browser-coi.pthread.worker.js","./dist/duckdb-browser-coi.worker.js":"./dist/duckdb-browser-coi.worker.js","./dist/duckdb-browser-eh.worker.js":"./dist/duckdb-browser-eh.worker.js","./dist/duckdb-browser.worker.js":"./dist/duckdb-browser.worker.js","./dist/duckdb-node":"./dist/duckdb-node.cjs","./dist/duckdb-node.cjs":"./dist/duckdb-node.cjs","./dist/duckdb-node-blocking":"./dist/duckdb-node-blocking.cjs","./dist/duckdb-node-blocking.cjs":"./dist/duckdb-node-blocking.cjs","./dist/duckdb-node-eh.worker.cjs":"./dist/duckdb-node-eh.worker.cjs","./dist/duckdb-node.worker.cjs":"./dist/duckdb-node.worker.cjs","./blocking":{browser:{types:"./dist/duckdb-browser-blocking.d.ts",import:"./dist/duckdb-browser-blocking.mjs",require:"./dist/duckdb-browser-blocking.cjs"},node:{types:"./dist/duckdb-node-blocking.d.ts",require:"./dist/duckdb-node-blocking.cjs",import:"./dist/duckdb-node-blocking.cjs"},types:"./dist/duckdb-browser-blocking.d.ts",import:"./dist/duckdb-browser-blocking.mjs",require:"./dist/duckdb-browser-blocking.cjs"},".":{browser:{types:"./dist/duckdb-browser.d.ts",import:"./dist/duckdb-browser.mjs",require:"./dist/duckdb-browser.cjs"},node:{types:"./dist/duckdb-node.d.ts",import:"./dist/duckdb-node.cjs",require:"./dist/duckdb-node.cjs"},types:"./dist/duckdb-browser.d.ts",import:"./dist/duckdb-browser.mjs",require:"./dist/duckdb-browser.cjs"}},ul={name:hU,version:pU,description:_U,license:yU,repository:mU,keywords:bU,dependencies:gU,devDependencies:vU,optionalDependencies:wU,scripts:jU,files:BU,main:IU,module:TU,types:SU,jsdelivr:DU,unpkg:AU,sideEffects:OU,browser:FU,exports:kU};var D1=ul.name,A1=ul.version,I_=ul.version.split("."),JE=I_[0],ZE=I_[1],XE=I_[2];function tR(){let r=`https://cdn.jsdelivr.net/npm/${D1}@${A1}/dist/`;return{mvp:{mainModule:`${r}duckdb.wasm`,mainWorker:`${r}duckdb-browser.worker.js`},eh:{mainModule:`${r}duckdb-eh.wasm`,mainWorker:`${r}duckdb-browser-eh.worker.js`}}}var T_=null,S_=null,D_=null,A_=null,O_=null;function MU(){return typeof process!="undefined"&&!1}async function F_(){return T_==null&&(T_=typeof BigInt64Array!="undefined"),S_==null&&(S_=await I1()),D_==null&&(D_=await S1()),A_==null&&(A_=await T1()),O_==null&&(O_=await B1()),{bigInt64Array:T_,crossOriginIsolated:MU()||globalThis.crossOriginIsolated||!1,wasmExceptions:S_,wasmSIMD:A_,wasmThreads:D_,wasmBulkMemory:O_}}async function rR(r){let e=await F_();if(e.wasmExceptions){if(e.wasmSIMD&&e.wasmThreads&&e.crossOriginIsolated&&r.coi)return{mainModule:r.coi.mainModule,mainWorker:r.coi.mainWorker,pthreadWorker:r.coi.pthreadWorker};if(r.eh)return{mainModule:r.eh.mainModule,mainWorker:r.eh.mainWorker,pthreadWorker:null}}return{mainModule:r.mvp.mainModule,mainWorker:r.mvp.mainWorker,pthreadWorker:null}}var qt={fileInfoCache:new Map,getFileInfo(r,e){try{let t=qt.fileInfoCache.get(e);if(t)return t;let[i,n,s]=Le(r,"duckdb_web_fs_get_file_info_by_id",["number"],[e]);if(i!==0)return null;let l=Te(r,n,s);it(r);let y=JSON.parse(l);if(y==null)return null;let w=ms(ri({},y),{blob:null});return qt.fileInfoCache.set(e,w),w}catch(t){return null}},testPlatformFeature:(r,e)=>{switch(e){case 1:return typeof BigInt64Array!="undefined";default:return console.warn(`test for unknown feature: ${e}`),!1}},openFile:(r,e)=>{var t;try{qt.fileInfoCache.delete(e);let i=qt.getFileInfo(r,e);switch(i==null?void 0:i.dataProtocol){case 3:{let n=null;try{let s=new XMLHttpRequest;s.open("HEAD",i.dataUrl,!1),s.setRequestHeader("Range","bytes=0-"),s.send(null);let l=s.getResponseHeader("Content-Length");if(s.status==206&&l!==null){let y=r._malloc(2*8);return r.HEAPF64[(y>>3)+0]=+l,r.HEAPF64[(y>>3)+1]=0,y}}catch(s){n=s,console.warn(`HEAD request with range header failed: ${s}`)}if(i.allowFullHttpReads){console.warn(`falling back to full HTTP read for: ${i.dataUrl}`);let s=new XMLHttpRequest;if(s.open("GET",i.dataUrl,!1),s.responseType="arraybuffer",s.send(null),s.status==200){let l=r._malloc(s.response.byteLength),y=new Uint8Array(s.response,0,s.response.byteLength);r.HEAPU8.set(y,l);let w=r._malloc(2*8);return r.HEAPF64[(w>>3)+0]=s.response.byteLength,r.HEAPF64[(w>>3)+1]=l,w}}if(n!=null)throw new Error(`Reading file ${i.fileName} failed with error: ${n}`);return 0}case 1:{let n=(t=qt._files)==null?void 0:t.get(i.fileName);if(n){let y=r._malloc(2*8);return r.HEAPF64[(y>>3)+0]=n.size,r.HEAPF64[(y>>3)+1]=0,y}console.warn(`Buffering missing file: ${i.fileName}`);let s=r._malloc(2*8),l=r._malloc(1);return r.HEAPF64[(s>>3)+0]=1,r.HEAPF64[(s>>3)+1]=l,s}}}catch(i){console.error(i.toString()),gi(r,i.toString())}return 0},glob:(r,e,t)=>{try{let i=Te(r,e,t);if(i.startsWith("http")){let n=new XMLHttpRequest;if(n.open("HEAD",i,!1),n.send(null),n.status!=200&&n.status!==206){gi(r,`HEAD request failed: ${i}`);return}r.ccall("duckdb_web_fs_glob_add_path",null,["string"],[i])}}catch(i){return gi(r,i.toString()),0}},checkFile:(r,e,t)=>{try{let i=Te(r,e,t);if(i.startsWith("http")){let n=new XMLHttpRequest;n.open("HEAD",i,!1),n.setRequestHeader("Range","bytes=0-"),n.send(null);let s=!1;if(n.status==206)s=!0;else if(n.status==200)s=n.getResponseHeader("Accept-Ranges")==="bytes";else return!1;return!!s}}catch(i){return!1}return!1},syncFile:(r,e)=>{},closeFile:(r,e)=>{let t=qt.getFileInfo(r,e);switch(qt.fileInfoCache.delete(e),t==null?void 0:t.dataProtocol){case 3:break;case 1:return}},truncateFile:(r,e,t)=>{let i=qt.getFileInfo(r,e);switch(i==null?void 0:i.dataProtocol){case 3:gi(r,"Cannot truncate a http file");return;case 1:gi(r,"truncateFile not implemented");return}return 0},readFile(r,e,t,i,n){var s;try{let l=qt.getFileInfo(r,e);switch(l==null?void 0:l.dataProtocol){case 3:{if(!l.dataUrl)throw new Error(`Missing data URL for file ${e}`);try{let y=new XMLHttpRequest;if(y.open("GET",l.dataUrl,!1),y.responseType="arraybuffer",y.setRequestHeader("Range",`bytes=${n}-${n+i-1}`),y.send(null),y.status==206||y.status==200&&i==y.response.byteLength&&n==0){let w=new Uint8Array(y.response,0,Math.min(y.response.byteLength,i));return r.HEAPU8.set(w,t),w.byteLength}else throw y.status==200?new Error(`Range request for ${l.dataUrl} did not return a partial response: ${y.status} "${y.statusText}"`):new Error(`Range request for ${l.dataUrl} did returned non-success status: ${y.status} "${y.statusText}"`)}catch(y){throw new Error(`Range request for ${l.dataUrl} failed with error: ${y}"`)}}case 1:{let y=(s=qt._files)==null?void 0:s.get(l.fileName);if(!y)throw new Error(`No handle available for file: ${l.fileName}`);let w=y.slice(n,n+i),D=new Uint8Array(new FileReaderSync().readAsArrayBuffer(w));return r.HEAPU8.set(D,t),D.byteLength}}return 0}catch(l){return gi(r,l.toString()),0}},writeFile:(r,e,t,i,n)=>{let s=qt.getFileInfo(r,e);switch(s==null?void 0:s.dataProtocol){case 3:return gi(r,"Cannot write to HTTP file"),0;case 1:return gi(r,"writefile not implemented"),0}return 0},getLastFileModificationTime:(r,e)=>{var i;let t=qt.getFileInfo(r,e);switch(t==null?void 0:t.dataProtocol){case 1:{if(!((i=qt._files)==null?void 0:i.get(t.fileName)))throw Error(`No handle available for file: ${t.fileName}`);return 0}case 3:return new Date().getTime()}return 0},checkDirectory:(r,e,t)=>{let i=Te(r,e,t);return console.log(`checkDirectory: ${i}`),!1},createDirectory:(r,e,t)=>{let i=Te(r,e,t);console.log(`createDirectory: ${i}`)},removeDirectory:(r,e,t)=>{let i=Te(r,e,t);console.log(`removeDirectory: ${i}`)},listDirectoryEntries:(r,e,t)=>{let i=Te(r,e,t);return console.log(`listDirectoryEntries: ${i}`),!1},moveFile:(r,e,t,i,n)=>{},removeFile:(r,e,t)=>{}};var CU=function(){var r=import.meta.url;return function(e){e=e||{};var t=typeof e!="undefined"?e:{},i,n;t.ready=new Promise(function(o,a){i=o,n=a});var s={},l;for(l in t)t.hasOwnProperty(l)&&(s[l]=t[l]);var y=[],w="./this.program",D=function(o,a){throw a},k=typeof window=="object",Y=typeof importScripts=="function",J=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",ie="";function Ye(o){return t.locateFile?t.locateFile(o,ie):ie+o}var Re,Rt,at,fn;function cl(o){if(!(o instanceof nu)){var a=o;_t("exiting due to exception: "+a)}}var zt,Wt;J?(Y?ie=Hn().dirname(ie)+"/":ie=__dirname+"/",Re=function(a,u){return zt||(zt=Ea()),Wt||(Wt=Hn()),a=Wt.normalize(a),zt.readFileSync(a,u?null:"utf8")},at=function(a){var u=Re(a,!0);return u.buffer||(u=new Uint8Array(u)),hn(u.buffer),u},Rt=function(a,u,c){zt||(zt=Ea()),Wt||(Wt=Hn()),a=Wt.normalize(a),zt.readFile(a,function(d,f){d?c(d):u(f.buffer)})},process.argv.length>1&&(w=process.argv[1].replace(/\\/g,"/")),y=process.argv.slice(2),process.on("uncaughtException",function(o){if(!(o instanceof nu))throw o}),process.on("unhandledRejection",function(o){throw o}),D=function(o,a){if(Fo())throw process.exitCode=o,a;cl(a),process.exit(o)},t.inspect=function(){return"[Emscripten Module object]"}):(k||Y)&&(Y?ie=self.location.href:typeof document!="undefined"&&document.currentScript&&(ie=document.currentScript.src),r&&(ie=r),ie.indexOf("blob:")!==0?ie=ie.substr(0,ie.replace(/[?#].*/,"").lastIndexOf("/")+1):ie="",Re=function(o){var a=new XMLHttpRequest;return a.open("GET",o,!1),a.send(null),a.responseText},Y&&(at=function(o){var a=new XMLHttpRequest;return a.open("GET",o,!1),a.responseType="arraybuffer",a.send(null),new Uint8Array(a.response)}),Rt=function(o,a,u){var c=new XMLHttpRequest;c.open("GET",o,!0),c.responseType="arraybuffer",c.onload=function(){if(c.status==200||c.status==0&&c.response){a(c.response);return}u()},c.onerror=u,c.send(null)},fn=function(o){document.title=o});var ll=t.print||console.log.bind(console),_t=t.printErr||console.warn.bind(console);for(l in s)s.hasOwnProperty(l)&&(t[l]=s[l]);s=null,t.arguments&&(y=t.arguments),t.thisProgram&&(w=t.thisProgram),t.quit&&(D=t.quit);var vi=0,yt=function(o){vi=o},Yn=function(){return vi},Xr;t.wasmBinary&&(Xr=t.wasmBinary);var $n=t.noExitRuntime||!0;typeof WebAssembly!="object"&&qe("no native wasm support detected");var Qr,wo=!1,Gn;function hn(o,a){o||qe("Assertion failed: "+a)}function Na(o){var a=t["_"+o];return hn(a,"Cannot call unknown function "+o+", make sure it is exported"),a}function wi(o,a,u,c,d){var f={string:function(z){var ce=0;if(z!=null&&z!==0){var je=(z.length<<2)+1;ce=ze(je),Io(z,ce,je)}return ce},array:function(z){var ce=ze(z.length);return To(z,ce),ce}};function h(z){return a==="string"?ji(z):a==="boolean"?Boolean(z):z}var p=Na(o),_=[],m=0;if(c)for(var b=0;b<c.length;b++){var S=f[u[b]];S?(m===0&&(m=B()),_[b]=S(c[b])):_[b]=c[b]}var F=p.apply(null,_);function V(z){return m!==0&&I(m),h(z)}return F=V(F),F}var jo=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):void 0;function Kn(o,a,u){for(var c=a+u,d=a;o[d]&&!(d>=c);)++d;if(d-a>16&&o.subarray&&jo)return jo.decode(o.subarray(a,d));for(var f="";a<d;){var h=o[a++];if(!(h&128)){f+=String.fromCharCode(h);continue}var p=o[a++]&63;if((h&224)==192){f+=String.fromCharCode((h&31)<<6|p);continue}var _=o[a++]&63;if((h&240)==224?h=(h&15)<<12|p<<6|_:h=(h&7)<<18|p<<12|_<<6|o[a++]&63,h<65536)f+=String.fromCharCode(h);else{var m=h-65536;f+=String.fromCharCode(55296|m>>10,56320|m&1023)}}return f}function ji(o,a){return o?Kn(Q,o,a):""}function Bo(o,a,u,c){if(!(c>0))return 0;for(var d=u,f=u+c-1,h=0;h<o.length;++h){var p=o.charCodeAt(h);if(p>=55296&&p<=57343){var _=o.charCodeAt(++h);p=65536+((p&1023)<<10)|_&1023}if(p<=127){if(u>=f)break;a[u++]=p}else if(p<=2047){if(u+1>=f)break;a[u++]=192|p>>6,a[u++]=128|p&63}else if(p<=65535){if(u+2>=f)break;a[u++]=224|p>>12,a[u++]=128|p>>6&63,a[u++]=128|p&63}else{if(u+3>=f)break;a[u++]=240|p>>18,a[u++]=128|p>>12&63,a[u++]=128|p>>6&63,a[u++]=128|p&63}}return a[u]=0,u-d}function Io(o,a,u){return Bo(o,Q,a,u)}function dl(o){for(var a=0,u=0;u<o.length;++u){var c=o.charCodeAt(u);c>=55296&&c<=57343&&(c=65536+((c&1023)<<10)|o.charCodeAt(++u)&1023),c<=127?++a:c<=2047?a+=2:c<=65535?a+=3:a+=4}return a}function To(o,a){Ht.set(o,a)}function Bi(o,a,u){for(var c=0;c<o.length;++c)Ht[a++>>0]=o.charCodeAt(c);u||(Ht[a>>0]=0)}function Ar(o,a){return o%a>0&&(o+=a-o%a),o}var Ii,Ht,Q,pn,Pa,K,La,C_,So;function Do(o){Ii=o,t.HEAP8=Ht=new Int8Array(o),t.HEAP16=pn=new Int16Array(o),t.HEAP32=K=new Int32Array(o),t.HEAPU8=Q=new Uint8Array(o),t.HEAPU16=Pa=new Uint16Array(o),t.HEAPU32=La=new Uint32Array(o),t.HEAPF32=C_=new Float32Array(o),t.HEAPF64=So=new Float64Array(o)}var fl=t.INITIAL_MEMORY||16777216,ne,Ao=[],xa=[],hl=[],qa=[],Oo=!1,pl=!1,_l=0;function Fo(){return $n||_l>0}function yl(){if(t.preRun)for(typeof t.preRun=="function"&&(t.preRun=[t.preRun]);t.preRun.length;)ei(t.preRun.shift());Jn(Ao)}function ml(){Oo=!0,Jn(xa)}function bl(){Jn(hl)}function gl(){pl=!0}function vl(){if(t.postRun)for(typeof t.postRun=="function"&&(t.postRun=[t.postRun]);t.postRun.length;)_n(t.postRun.shift());Jn(qa)}function ei(o){Ao.unshift(o)}function ko(o){xa.unshift(o)}function _n(o){qa.unshift(o)}var ti=0,Mo=null,It=null;function wl(o){ti++,t.monitorRunDependencies&&t.monitorRunDependencies(ti)}function za(o){if(ti--,t.monitorRunDependencies&&t.monitorRunDependencies(ti),ti==0&&(Mo!==null&&(clearInterval(Mo),Mo=null),It)){var a=It;It=null,a()}}t.preloadedImages={},t.preloadedAudios={};function qe(o){t.onAbort&&t.onAbort(o),o="Aborted("+o+")",_t(o),wo=!0,Gn=1,o+=". Build with -s ASSERTIONS=1 for more info.";var a=new WebAssembly.RuntimeError(o);throw n(a),a}var Wa="data:application/octet-stream;base64,";function Ha(o){return o.startsWith(Wa)}var Nt;t.locateFile?(Nt="./duckdb.wasm",Ha(Nt)||(Nt=Ye(Nt))):Nt=new URL("./duckdb.wasm",import.meta.url).toString();function yn(o){try{if(o==Nt&&Xr)return new Uint8Array(Xr);if(at)return at(o);throw"both async and sync fetching of the wasm failed"}catch(a){qe(a)}}function jl(){return!Xr&&(k||Y)&&typeof fetch=="function"?fetch(Nt,{credentials:"same-origin"}).then(function(o){if(!o.ok)throw"failed to load wasm binary file at '"+Nt+"'";return o.arrayBuffer()}).catch(function(){return yn(Nt)}):Promise.resolve().then(function(){return yn(Nt)})}function ut(){var o={a:Ed};function a(h,p){var _=h.exports;t.asm=_,Qr=t.asm.Se,Do(Qr.buffer),ne=t.asm.Ve,ko(t.asm.Te),za("wasm-instantiate")}wl("wasm-instantiate");function u(h){a(h.instance)}function c(h){return jl().then(function(p){return WebAssembly.instantiate(p,o)}).then(function(p){return p}).then(h,function(p){_t("failed to asynchronously prepare wasm: "+p),qe(p)})}function d(){return!Xr&&typeof WebAssembly.instantiateStreaming=="function"&&!Ha(Nt)&&typeof fetch=="function"?fetch(Nt,{credentials:"same-origin"}).then(function(h){var p=WebAssembly.instantiateStreaming(h,o);return p.then(u,function(_){return _t("wasm streaming compile failed: "+_),_t("falling back to ArrayBuffer instantiation"),c(u)})}):c(u)}if(t.instantiateWasm)try{var f=t.instantiateWasm(o,a);return f}catch(h){return _t("Module.instantiateWasm callback failed with error: "+h),!1}return d().catch(n),{}}function Jn(o){for(;o.length>0;){var a=o.shift();if(typeof a=="function"){a(t);continue}var u=a.func;typeof u=="number"?a.arg===void 0?ne.get(u)():ne.get(u)(a.arg):u(a.arg===void 0?null:a.arg)}}function Bl(o){if(o instanceof nu||o=="unwind")return Gn;D(1,o)}function Il(o){return L(o+16)+16}function Or(o){this.excPtr=o,this.ptr=o-16,this.set_type=function(a){K[this.ptr+4>>2]=a},this.get_type=function(){return K[this.ptr+4>>2]},this.set_destructor=function(a){K[this.ptr+8>>2]=a},this.get_destructor=function(){return K[this.ptr+8>>2]},this.set_refcount=function(a){K[this.ptr>>2]=a},this.set_caught=function(a){a=a?1:0,Ht[this.ptr+12>>0]=a},this.get_caught=function(){return Ht[this.ptr+12>>0]!=0},this.set_rethrown=function(a){a=a?1:0,Ht[this.ptr+13>>0]=a},this.get_rethrown=function(){return Ht[this.ptr+13>>0]!=0},this.init=function(a,u){this.set_type(a),this.set_destructor(u),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var a=K[this.ptr>>2];K[this.ptr>>2]=a+1},this.release_ref=function(){var a=K[this.ptr>>2];return K[this.ptr>>2]=a-1,a===1}}function Yt(o){this.free=function(){ue(this.ptr),this.ptr=0},this.set_base_ptr=function(a){K[this.ptr>>2]=a},this.get_base_ptr=function(){return K[this.ptr>>2]},this.set_adjusted_ptr=function(a){K[this.ptr+4>>2]=a},this.get_adjusted_ptr_addr=function(){return this.ptr+4},this.get_adjusted_ptr=function(){return K[this.ptr+4>>2]},this.get_exception_ptr=function(){var a=Si(this.get_exception_info().get_type());if(a)return K[this.get_base_ptr()>>2];var u=this.get_adjusted_ptr();return u!==0?u:this.get_base_ptr()},this.get_exception_info=function(){return new Or(this.get_base_ptr())},o===void 0?(this.ptr=L(8),this.set_adjusted_ptr(0)):this.ptr=o}var Zn=[];function Co(o){o.add_ref()}var mn=0;function Ya(o){var a=new Yt(o),u=a.get_exception_info();return u.get_caught()||(u.set_caught(!0),mn--),u.set_rethrown(!1),Zn.push(a),Co(u),a.get_exception_ptr()}var Zt=0;function $a(o){return ue(new Or(o).ptr)}function Tl(o){if(o.release_ref()&&!o.get_rethrown()){var a=o.get_destructor();a&&ne.get(a)(o.excPtr),$a(o.excPtr)}}function Sl(){T(0);var o=Zn.pop();Tl(o.get_exception_info()),o.free(),Zt=0}function Dl(o){var a=new Yt(o),u=a.get_base_ptr();throw Zt||(Zt=u),a.free(),u}function Al(){var o=Zt;if(!o)return yt(0),0|0;var a=new Or(o),u=a.get_type(),c=new Yt;if(c.set_base_ptr(o),c.set_adjusted_ptr(o),!u)return yt(0),c.ptr|0;for(var d=Array.prototype.slice.call(arguments),f=0;f<d.length;f++){var h=d[f];if(h===0||h===u)break;if(Ft(h,u,c.get_adjusted_ptr_addr()))return yt(h),c.ptr|0}return yt(u),c.ptr|0}function Ol(){var o=Zt;if(!o)return yt(0),0|0;var a=new Or(o),u=a.get_type(),c=new Yt;if(c.set_base_ptr(o),c.set_adjusted_ptr(o),!u)return yt(0),c.ptr|0;for(var d=Array.prototype.slice.call(arguments),f=0;f<d.length;f++){var h=d[f];if(h===0||h===u)break;if(Ft(h,u,c.get_adjusted_ptr_addr()))return yt(h),c.ptr|0}return yt(u),c.ptr|0}function Xn(){var o=Zt;if(!o)return yt(0),0|0;var a=new Or(o),u=a.get_type(),c=new Yt;if(c.set_base_ptr(o),c.set_adjusted_ptr(o),!u)return yt(0),c.ptr|0;for(var d=Array.prototype.slice.call(arguments),f=0;f<d.length;f++){var h=d[f];if(h===0||h===u)break;if(Ft(h,u,c.get_adjusted_ptr_addr()))return yt(h),c.ptr|0}return yt(u),c.ptr|0}function Qn(){var o=Zt;if(!o)return yt(0),0|0;var a=new Or(o),u=a.get_type(),c=new Yt;if(c.set_base_ptr(o),c.set_adjusted_ptr(o),!u)return yt(0),c.ptr|0;for(var d=Array.prototype.slice.call(arguments),f=0;f<d.length;f++){var h=d[f];if(h===0||h===u)break;if(Ft(h,u,c.get_adjusted_ptr_addr()))return yt(h),c.ptr|0}return yt(u),c.ptr|0}function Uo(){var o=Zn.pop();o||qe("no exception to throw");var a=o.get_exception_info(),u=o.get_base_ptr();throw a.get_rethrown()?o.free():(Zn.push(o),a.set_rethrown(!0),a.set_caught(!1),mn++),Zt=u,u}function Ga(o,a,u){var c=new Or(o);throw c.init(a,u),Zt=o,mn++,o}function Vo(){return mn}var Ue={mappings:{},buffers:[null,[],[]],printChar:function(o,a){var u=Ue.buffers[o];a===0||a===10?((o===1?ll:_t)(Kn(u,0)),u.length=0):u.push(a)},varargs:void 0,get:function(){Ue.varargs+=4;var o=K[Ue.varargs-4>>2];return o},getStr:function(o){var a=ji(o);return a},get64:function(o,a){return o}};function Fl(o,a,u,c,d){}function kl(o,a){return o=Ue.getStr(o),Ue.doAccess(o,a)}function Ml(){_t("missing function: $SOCKFS"),qe(-1)}function Ka(){_t("missing function: $FS"),qe(-1)}function Ti(o){var a=Ml.getSocket(o);if(!a)throw new Ka.ErrnoError(8);return a}function Cl(o){return K[ae()>>2]=o,o}function Eo(o){return(o&255)+"."+(o>>8&255)+"."+(o>>16&255)+"."+(o>>24&255)}function Ja(o){var a="",u=0,c=0,d=0,f=0,h=0,p=0,_=[o[0]&65535,o[0]>>16,o[1]&65535,o[1]>>16,o[2]&65535,o[2]>>16,o[3]&65535,o[3]>>16],m=!0,b="";for(p=0;p<5;p++)if(_[p]!==0){m=!1;break}if(m){if(b=Eo(_[6]|_[7]<<16),_[5]===-1)return a="::ffff:",a+=b,a;if(_[5]===0)return a="::",b==="0.0.0.0"&&(b=""),b==="0.0.0.1"&&(b="1"),a+=b,a}for(u=0;u<8;u++)_[u]===0&&(u-d>1&&(h=0),d=u,h++),h>c&&(c=h,f=u-c+1);for(u=0;u<8;u++){if(c>1&&_[u]===0&&u>=f&&u<f+c){u===f&&(a+=":",f===0&&(a+=":"));continue}a+=Number(ke(_[u]&65535)).toString(16),a+=u<7?":":""}return a}function Za(o,a){var u=pn[o>>1],c=ke(Pa[o+2>>1]),d;switch(u){case 2:if(a!==16)return{errno:28};d=K[o+4>>2],d=Eo(d);break;case 10:if(a!==28)return{errno:28};d=[K[o+8>>2],K[o+12>>2],K[o+16>>2],K[o+20>>2]],d=Ja(d);break;default:return{errno:5}}return{family:u,addr:d,port:c}}function Xa(o,a,u){if(u&&o===0)return null;var c=Za(o,a);if(c.errno)throw new Ka.ErrnoError(c.errno);return c.addr=Pt.lookup_addr(c.addr)||c.addr,c}function Ul(o,a,u){var c=Ti(o),d=Xa(a,u);return c.sock_ops.bind(c,d.addr,d.port),0}function Vl(o,a,u){var c=Ti(o),d=Xa(a,u);return c.sock_ops.connect(c,d.addr,d.port),0}function El(o,a,u){return Ue.varargs=u,0}function Rl(o,a){}function Nl(o,a,u,c){}function Pl(o,a,u){}function es(o){for(var a=o.split("."),u=0;u<4;u++){var c=Number(a[u]);if(isNaN(c))return null;a[u]=c}return(a[0]|a[1]<<8|a[2]<<16|a[3]<<24)>>>0}function ts(o){return parseInt(o)}function Ro(o){var a,u,c,d,f=/^((?=.*::)(?!.*::.+::)(::)?([\dA-F]{1,4}:(:|\b)|){5}|([\dA-F]{1,4}:){6})((([\dA-F]{1,4}((?!\3)::|:\b|$))|(?!\2\3)){2}|(((2[0-4]|1\d|[1-9])?\d|25[0-5])\.?\b){4})$/i,h=[];if(!f.test(o))return null;if(o==="::")return[0,0,0,0,0,0,0,0];for(o.startsWith("::")?o=o.replace("::","Z:"):o=o.replace("::",":Z:"),o.indexOf(".")>0?(o=o.replace(new RegExp("[.]","g"),":"),a=o.split(":"),a[a.length-4]=ts(a[a.length-4])+ts(a[a.length-3])*256,a[a.length-3]=ts(a[a.length-2])+ts(a[a.length-1])*256,a=a.slice(0,a.length-2)):a=o.split(":"),c=0,d=0,u=0;u<a.length;u++)if(typeof a[u]=="string")if(a[u]==="Z"){for(d=0;d<8-a.length+1;d++)h[u+d]=0;c=d-1}else h[u+c]=Tt(parseInt(a[u],16));else h[u+c]=a[u];return[h[1]<<16|h[0],h[3]<<16|h[2],h[5]<<16|h[4],h[7]<<16|h[6]]}function rs(o,a){Q.fill(0,o,o+a)}function No(o,a,u,c,d){switch(a){case 2:u=es(u),rs(o,16),d&&(K[d>>2]=16),pn[o>>1]=a,K[o+4>>2]=u,pn[o+2>>1]=Tt(c);break;case 10:u=Ro(u),rs(o,28),d&&(K[d>>2]=28),K[o>>2]=a,K[o+8>>2]=u[0],K[o+12>>2]=u[1],K[o+16>>2]=u[2],K[o+20>>2]=u[3],pn[o+2>>1]=Tt(c);break;default:return 5}return 0}var Pt={address_map:{id:1,addrs:{},names:{}},lookup_name:function(o){var a=es(o);if(a!==null||(a=Ro(o),a!==null))return o;var u;if(Pt.address_map.addrs[o])u=Pt.address_map.addrs[o];else{var c=Pt.address_map.id++;hn(c<65535,"exceeded max address mappings of 65535"),u="172.29."+(c&255)+"."+(c&65280),Pt.address_map.names[u]=o,Pt.address_map.addrs[o]=u}return u},lookup_addr:function(o){return Pt.address_map.names[o]?Pt.address_map.names[o]:null}};function Ll(o,a,u){var c=Ti(o);if(!c.daddr)return-53;var d=No(a,c.family,Pt.lookup_name(c.daddr),c.dport,u);return 0}function xl(){return 42}function ql(o,a,u,c,d){var f=Ti(o);return a===1&&u===4?(K[c>>2]=f.error,K[d>>2]=4,f.error=null,0):-50}function zl(o,a,u){return Ue.varargs=u,0}function Wl(o,a,u){return 0}function Hl(o,a){return o=Ue.getStr(o),Ue.doMkdir(o,a)}function Yl(o,a,u){Ue.varargs=u}function $l(o,a,u,c,d,f){var h=Ti(o),p=h.sock_ops.recvmsg(h,u);if(!p)return 0;if(d)var _=No(d,h.family,Pt.lookup_name(p.addr),p.port,f);return Q.set(p.buffer,a),p.buffer.byteLength}function Gl(o,a){}function Kl(o){}function Jl(o,a,u,c,d,f){}function Zl(o){return-50}function Xl(o,a){return Ti(o),-52}function Ql(o,a,u){}function ed(o,a){}function td(o){}function rd(o,a){qe("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")}function id(o,a){qe("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")}function Po(){qe("")}var Lo;J?Lo=function(){var o=process.hrtime();return o[0]*1e3+o[1]/1e6}:Lo=function(){return performance.now()};var bn=!0;function nd(o,a){var u;if(o===0)u=Date.now();else if((o===1||o===4)&&bn)u=Lo();else return Cl(28),-1;return K[a>>2]=u/1e3|0,K[a+4>>2]=u%1e3*1e3*1e3|0,0}function sd(o,a){return globalThis.DUCKDB_RUNTIME.createDirectory(t,o,a)}function od(o,a){return globalThis.DUCKDB_RUNTIME.checkDirectory(t,o,a)}function ad(o,a){return globalThis.DUCKDB_RUNTIME.listDirectoryEntries(t,o,a)}function ud(o,a){return globalThis.DUCKDB_RUNTIME.removeDirectory(t,o,a)}function cd(o){return globalThis.DUCKDB_RUNTIME.closeFile(t,o)}function ld(o,a){return globalThis.DUCKDB_RUNTIME.checkFile(t,o,a)}function dd(o){return globalThis.DUCKDB_RUNTIME.getLastFileModificationTime(t,o)}function fd(o,a,u,c){return globalThis.DUCKDB_RUNTIME.moveFile(t,o,a,u,c)}function hd(o){return globalThis.DUCKDB_RUNTIME.openFile(t,o)}function pd(o,a,u,c){return globalThis.DUCKDB_RUNTIME.readFile(t,o,a,u,c)}function _d(o,a){return globalThis.DUCKDB_RUNTIME.truncateFile(t,o,a)}function is(o,a,u,c){return globalThis.DUCKDB_RUNTIME.writeFile(t,o,a,u,c)}function yd(o,a){return globalThis.DUCKDB_RUNTIME.glob(t,o,a)}function ns(o){return globalThis.DUCKDB_RUNTIME.testPlatformFeature(t,o)}function xo(){return 2147483648}function ss(o,a,u){Q.copyWithin(o,a,a+u)}function os(o){try{return Qr.grow(o-Ii.byteLength+65535>>>16),Do(Qr.buffer),1}catch(a){}}function as(o){var a=Q.length;o=o>>>0;var u=2147483648;if(o>u)return!1;for(var c=1;c<=4;c*=2){var d=a*(1+.2/c);d=Math.min(d,o+100663296);var f=Math.min(u,Ar(Math.max(o,d),65536)),h=os(f);if(h)return!0}return!1}var qo={};function md(){return w||"./this.program"}function gn(){if(!gn.strings){var o=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:o,_:md()};for(var u in qo)qo[u]===void 0?delete a[u]:a[u]=qo[u];var c=[];for(var u in a)c.push(u+"="+a[u]);gn.strings=c}return gn.strings}function bd(o,a){var u=0;return gn().forEach(function(c,d){var f=a+u;K[o+d*4>>2]=f,Bi(c,f),u+=c.length+1}),0}function U_(o,a){var u=gn();K[o>>2]=u.length;var c=0;return u.forEach(function(d){c+=d.length+1}),K[a>>2]=c,0}function gd(o){return 0}function vd(o,a){var u=o==1||o==2?2:qe();return Ht[a>>0]=u,0}function wd(o,a,u,c,d,f){var h=Ue.getStreamFromFD(o),p=Ue.doReadv(h,a,u,c);return K[f>>2]=p,0}function jd(o,a,u,c,d,f){var h=Ue.getStreamFromFD(o),p=Ue.doWritev(h,a,u,c);return K[f>>2]=p,0}function Bd(o,a,u,c){var d=Ue.getStreamFromFD(o),f=Ue.doReadv(d,a,u);return K[c>>2]=f,0}function Id(o,a,u,c,d){}function Td(o){var a=Ue.getStreamFromFD(o);return a.stream_ops&&a.stream_ops.fsync?-a.stream_ops.fsync(a):0}function Sd(o,a,u,c){for(var d=0,f=0;f<u;f++){for(var h=K[a+f*8>>2],p=K[a+(f*8+4)>>2],_=0;_<p;_++)Ue.printChar(o,Q[h+_]);d+=p}return K[c>>2]=d,0}function Dd(){return Yn()}function Ad(o,a,u,c){var d=0,f=0,h=0,p=0,_=0,m=0,b;function S(F,V,z,ce,je,Ke){var N,se,Oe,Se;return se=F===10?28:16,je=F===10?Ja(je):Eo(je),N=L(se),Se=No(N,F,je,Ke),hn(!Se),Oe=L(32),K[Oe+4>>2]=F,K[Oe+8>>2]=V,K[Oe+12>>2]=z,K[Oe+24>>2]=ce,K[Oe+20>>2]=N,F===10?K[Oe+16>>2]=28:K[Oe+16>>2]=16,K[Oe+28>>2]=0,Oe}if(u&&(h=K[u>>2],p=K[u+4>>2],_=K[u+8>>2],m=K[u+12>>2]),_&&!m&&(m=_===2?17:6),!_&&m&&(_=m===17?2:1),m===0&&(m=6),_===0&&(_=1),!o&&!a)return-2;if(h&~(1|2|4|1024|8|16|32)||u!==0&&K[u>>2]&2&&!o)return-1;if(h&32)return-2;if(_!==0&&_!==1&&_!==2)return-7;if(p!==0&&p!==2&&p!==10)return-6;if(a&&(a=ji(a),f=parseInt(a,10),isNaN(f)))return h&1024?-2:-8;if(!o)return p===0&&(p=2),(h&1)===0&&(p===2?d=Fe(2130706433):d=[0,0,0,1]),b=S(p,_,m,null,d,f),K[c>>2]=b,0;if(o=ji(o),d=es(o),d!==null)if(p===0||p===2)p=2;else if(p===10&&h&8)d=[0,0,Fe(65535),d],p=10;else return-2;else if(d=Ro(o),d!==null)if(p===0||p===10)p=10;else return-2;return d!=null?(b=S(p,_,m,o,d,f),K[c>>2]=b,0):h&4?-2:(o=Pt.lookup_name(o),d=es(o),p===0?p=2:p===10&&(d=[0,0,Fe(65535),d]),b=S(p,_,m,null,d,f),K[c>>2]=b,0)}function Od(){if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function"){var o=new Uint8Array(1);return function(){return crypto.getRandomValues(o),o[0]}}else if(J)try{var a=sg("crypto");return function(){return a.randomBytes(1)[0]}}catch(u){}return function(){qe("randomDevice")}}function us(o,a){us.randomDevice||(us.randomDevice=Od());for(var u=0;u<a;u++)Ht[o+u>>0]=us.randomDevice();return 0}function Fd(o,a,u,c,d,f,h){var p=Za(o,a);if(p.errno)return-6;var _=p.port,m=p.addr,b=!1;if(u&&c){var S;if(h&1||!(S=Pt.lookup_addr(m))){if(h&8)return-2}else m=S;var F=Io(m,u,c);F+1>=c&&(b=!0)}if(d&&f){_=""+_;var F=Io(_,d,f);F+1>=f&&(b=!0)}return b?-12:0}function kd(o){return o}function Md(o){yt(o)}function cs(o){return o%4===0&&(o%100!==0||o%400===0)}function zo(o,a){for(var u=0,c=0;c<=a;u+=o[c++]);return u}var ls=[31,29,31,30,31,30,31,31,30,31,30,31],ds=[31,28,31,30,31,30,31,31,30,31,30,31];function fs(o,a){for(var u=new Date(o.getTime());a>0;){var c=cs(u.getFullYear()),d=u.getMonth(),f=(c?ls:ds)[d];if(a>f-u.getDate())a-=f-u.getDate()+1,u.setDate(1),d<11?u.setMonth(d+1):(u.setMonth(0),u.setFullYear(u.getFullYear()+1));else return u.setDate(u.getDate()+a),u}return u}function Cd(o,a,u,c){var d=K[c+40>>2],f={tm_sec:K[c>>2],tm_min:K[c+4>>2],tm_hour:K[c+8>>2],tm_mday:K[c+12>>2],tm_mon:K[c+16>>2],tm_year:K[c+20>>2],tm_wday:K[c+24>>2],tm_yday:K[c+28>>2],tm_isdst:K[c+32>>2],tm_gmtoff:K[c+36>>2],tm_zone:d?ji(d):""},h=ji(u),p={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var _ in p)h=h.replace(new RegExp(_,"g"),p[_]);var m=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],b=["January","February","March","April","May","June","July","August","September","October","November","December"];function S(N,se,Oe){for(var Se=typeof N=="number"?N.toString():N||"";Se.length<se;)Se=Oe[0]+Se;return Se}function F(N,se){return S(N,se,"0")}function V(N,se){function Oe(Ut){return Ut<0?-1:Ut>0?1:0}var Se;return(Se=Oe(N.getFullYear()-se.getFullYear()))===0&&(Se=Oe(N.getMonth()-se.getMonth()))===0&&(Se=Oe(N.getDate()-se.getDate())),Se}function z(N){switch(N.getDay()){case 0:return new Date(N.getFullYear()-1,11,29);case 1:return N;case 2:return new Date(N.getFullYear(),0,3);case 3:return new Date(N.getFullYear(),0,2);case 4:return new Date(N.getFullYear(),0,1);case 5:return new Date(N.getFullYear()-1,11,31);case 6:return new Date(N.getFullYear()-1,11,30)}}function ce(N){var se=fs(new Date(N.tm_year+1900,0,1),N.tm_yday),Oe=new Date(se.getFullYear(),0,4),Se=new Date(se.getFullYear()+1,0,4),Ut=z(Oe),Di=z(Se);return V(Ut,se)<=0?V(Di,se)<=0?se.getFullYear()+1:se.getFullYear():se.getFullYear()-1}var je={"%a":function(N){return m[N.tm_wday].substring(0,3)},"%A":function(N){return m[N.tm_wday]},"%b":function(N){return b[N.tm_mon].substring(0,3)},"%B":function(N){return b[N.tm_mon]},"%C":function(N){var se=N.tm_year+1900;return F(se/100|0,2)},"%d":function(N){return F(N.tm_mday,2)},"%e":function(N){return S(N.tm_mday,2," ")},"%g":function(N){return ce(N).toString().substring(2)},"%G":function(N){return ce(N)},"%H":function(N){return F(N.tm_hour,2)},"%I":function(N){var se=N.tm_hour;return se==0?se=12:se>12&&(se-=12),F(se,2)},"%j":function(N){return F(N.tm_mday+zo(cs(N.tm_year+1900)?ls:ds,N.tm_mon-1),3)},"%m":function(N){return F(N.tm_mon+1,2)},"%M":function(N){return F(N.tm_min,2)},"%n":function(){return`
18
- `},"%p":function(N){return N.tm_hour>=0&&N.tm_hour<12?"AM":"PM"},"%S":function(N){return F(N.tm_sec,2)},"%t":function(){return" "},"%u":function(N){return N.tm_wday||7},"%U":function(N){var se=new Date(N.tm_year+1900,0,1),Oe=se.getDay()===0?se:fs(se,7-se.getDay()),Se=new Date(N.tm_year+1900,N.tm_mon,N.tm_mday);if(V(Oe,Se)<0){var Ut=zo(cs(Se.getFullYear())?ls:ds,Se.getMonth()-1)-31,Di=31-Oe.getDate(),vn=Di+Ut+Se.getDate();return F(Math.ceil(vn/7),2)}return V(Oe,se)===0?"01":"00"},"%V":function(N){var se=new Date(N.tm_year+1900,0,4),Oe=new Date(N.tm_year+1901,0,4),Se=z(se),Ut=z(Oe),Di=fs(new Date(N.tm_year+1900,0,1),N.tm_yday);if(V(Di,Se)<0)return"53";if(V(Ut,Di)<=0)return"01";var vn;return Se.getFullYear()<N.tm_year+1900?vn=N.tm_yday+32-Se.getDate():vn=N.tm_yday+1-Se.getDate(),F(Math.ceil(vn/7),2)},"%w":function(N){return N.tm_wday},"%W":function(N){var se=new Date(N.tm_year,0,1),Oe=se.getDay()===1?se:fs(se,se.getDay()===0?1:7-se.getDay()+1),Se=new Date(N.tm_year+1900,N.tm_mon,N.tm_mday);if(V(Oe,Se)<0){var Ut=zo(cs(Se.getFullYear())?ls:ds,Se.getMonth()-1)-31,Di=31-Oe.getDate(),vn=Di+Ut+Se.getDate();return F(Math.ceil(vn/7),2)}return V(Oe,se)===0?"01":"00"},"%y":function(N){return(N.tm_year+1900).toString().substring(2)},"%Y":function(N){return N.tm_year+1900},"%z":function(N){var se=N.tm_gmtoff,Oe=se>=0;return se=Math.abs(se)/60,se=se/60*100+se%60,(Oe?"+":"-")+String("0000"+se).slice(-4)},"%Z":function(N){return N.tm_zone},"%%":function(){return"%"}};for(var _ in je)h.includes(_)&&(h=h.replace(new RegExp(_,"g"),je[_](f)));var Ke=Vd(h,!1);return Ke.length>a?0:(To(Ke,o),Ke.length-1)}function Ud(o,a,u,c){return Cd(o,a,u,c)}function Vd(o,a,u){var c=u>0?u:dl(o)+1,d=new Array(c),f=Bo(o,d,0,d.length);return a&&(d.length=f),d}var Ed={j:Il,A:Ya,F:Sl,b:Al,n:Ol,I:Xn,V:Qn,i:$a,da:Uo,u:Ga,E:Vo,e:Dl,Fa:Fl,wa:kl,Ha:Ul,Ga:Vl,N:El,ya:Rl,xa:Nl,Qe:Pl,Ba:Ll,ta:xl,Ea:ql,Ra:zl,Me:Wl,Re:Hl,oa:Yl,Ca:$l,Oe:Gl,ua:Kl,Da:Jl,Ia:Zl,Ka:Xl,ia:Ql,fa:ed,va:td,Ma:rd,La:id,ca:Po,ma:nd,Fe:sd,Ge:od,De:ad,Ee:ud,sa:cd,Be:ld,Ie:dd,Ce:fd,Ke:hd,ea:pd,He:_d,Je:is,Ae:yd,ra:ns,Sa:xo,ib:ss,ed:as,Ua:bd,Va:U_,T:gd,Qa:vd,nb:wd,mb:jd,na:Bd,Td:Id,Pe:Td,ba:Sd,a:Dd,Ja:Ad,za:us,Aa:Fd,ja:wB,L:cB,Pa:mB,S:x1,yc:OT,ka:vB,W:dB,qa:L1,zc:AT,s:X1,Na:BB,Nb:Y1,Y:nB,Oa:jB,Yb:H1,d:C1,_:SB,C:sB,Fb:vS,c:U1,X:lB,ga:AB,h:E1,Db:jS,l:P1,pa:hB,o:R1,v:J1,z:Z1,R:K1,x:Q1,w:tB,p:yB,M:TB,J:IB,ac:QT,dc:JT,gc:$T,nc:LT,bc:XT,Eb:wS,xc:FT,ec:KT,oc:PT,Lb:pS,we:UB,Rd:fI,Kd:gI,je:$B,Rb:cS,id:$I,Ib:mS,Hb:bS,$d:iI,Qd:hI,vb:FS,Xc:sT,_d:nI,Ec:IT,Sb:uS,Gb:gS,re:PB,Xd:aI,Ac:DT,Ld:bI,vd:UI,Id:wI,hb:xS,Yd:oI,lc:qT,Vd:cI,hd:GI,cb:YS,Kb:_S,kd:HI,ce:eI,ae:rI,_a:JS,tb:MS,Md:mI,db:HS,Cb:BS,Wd:uI,Ed:TI,Hd:jI,Gd:BI,Fd:II,Bd:AI,kc:zT,Zb:rS,pe:xB,he:KB,pc:NT,ge:JB,Sd:dI,sc:VT,rc:ET,ne:zB,ie:GB,Pd:pI,ze:kB,qd:PI,qc:RT,cc:ZT,Fc:BT,uc:CT,Uc:uT,sb:CS,Cc:ST,wc:kT,sd:RI,md:zI,Mc:yT,vc:MT,wb:OS,_b:tS,od:xI,cd:XI,Pc:hT,Oc:pT,Lc:mT,Nc:_T,td:EI,$c:tT,Jb:yS,ic:HT,kb:PS,Zc:iT,tc:UT,zb:SS,Vb:sS,Ab:TS,Tb:aS,t:k1,k:V1,B:uB,$:_B,pb:ES,D:aB,aa:pB,qb:VS,f:M1,U:z1,Q:oB,Bc:q1,g:W1,m:N1,Ne:OB,q:G1,r:$1,ha:DB,y:eB,O:fB,P:gB,K:rB,Le:FB,la:bB,Z:iB,Dd:SI,ob:RS,jd:YI,$b:eS,Dc:TT,mc:xT,Mb:hS,fb:zS,ue:EB,Zd:sI,ub:kS,ab:GS,zd:FI,Ad:OI,Wb:nS,wd:CI,Pb:dS,Ob:fS,Qc:fT,te:RB,xd:MI,Cd:DI,Wc:oT,Ic:vT,xb:AS,yb:DS,eb:WS,me:WB,ud:VI,Qb:lS,Gc:jT,Tc:cT,se:NB,bb:$S,xe:CB,ee:XB,fe:ZB,Jd:vI,$a:KS,bd:QI,Kc:bT,Jc:gT,ad:eT,Yc:nT,nd:qI,gb:qS,gd:KI,Za:ZS,Hc:wT,jb:LS,ye:MB,Ud:lI,dd:ZI,Rc:dT,ke:YB,fc:GT,ve:VB,oe:qB,fd:JI,Od:_I,Nd:yI,_c:rT,rb:US,ld:WI,jc:WT,qe:LB,Ya:XS,Sc:lT,lb:NS,de:QB,Vc:aT,Wa:eD,Xa:QS,hc:YT,le:HB,rd:NI,be:tI,Ub:oS,Xb:iS,Bb:IS,yd:kI,pd:LI,H:kd,G:Md,Ta:Ud},V_=ut(),Rd=t.___wasm_call_ctors=function(){return(Rd=t.___wasm_call_ctors=t.asm.Te).apply(null,arguments)},Nd=t._main=function(){return(Nd=t._main=t.asm.Ue).apply(null,arguments)},Pd=t._duckdb_web_fs_glob_add_path=function(){return(Pd=t._duckdb_web_fs_glob_add_path=t.asm.We).apply(null,arguments)},Ld=t._duckdb_web_clear_response=function(){return(Ld=t._duckdb_web_clear_response=t.asm.Xe).apply(null,arguments)},xd=t._duckdb_web_fail_with=function(){return(xd=t._duckdb_web_fail_with=t.asm.Ye).apply(null,arguments)},qd=t._duckdb_web_reset=function(){return(qd=t._duckdb_web_reset=t.asm.Ze).apply(null,arguments)},zd=t._duckdb_web_connect=function(){return(zd=t._duckdb_web_connect=t.asm._e).apply(null,arguments)},Wd=t._duckdb_web_disconnect=function(){return(Wd=t._duckdb_web_disconnect=t.asm.$e).apply(null,arguments)},Hd=t._duckdb_web_flush_files=function(){return(Hd=t._duckdb_web_flush_files=t.asm.af).apply(null,arguments)},Yd=t._duckdb_web_flush_file=function(){return(Yd=t._duckdb_web_flush_file=t.asm.bf).apply(null,arguments)},$d=t._duckdb_web_open=function(){return($d=t._duckdb_web_open=t.asm.cf).apply(null,arguments)},Gd=t._duckdb_web_collect_file_stats=function(){return(Gd=t._duckdb_web_collect_file_stats=t.asm.df).apply(null,arguments)},hs=t._duckdb_web_export_file_stats=function(){return(hs=t._duckdb_web_export_file_stats=t.asm.ef).apply(null,arguments)},ps=t._duckdb_web_fs_drop_file=function(){return(ps=t._duckdb_web_fs_drop_file=t.asm.ff).apply(null,arguments)},Wo=t._duckdb_web_fs_drop_files=function(){return(Wo=t._duckdb_web_fs_drop_files=t.asm.gf).apply(null,arguments)},Qa=t._duckdb_web_fs_glob_file_infos=function(){return(Qa=t._duckdb_web_fs_glob_file_infos=t.asm.hf).apply(null,arguments)},eu=t._duckdb_web_fs_get_file_info_by_id=function(){return(eu=t._duckdb_web_fs_get_file_info_by_id=t.asm.jf).apply(null,arguments)},tu=t._duckdb_web_fs_get_file_info_by_name=function(){return(tu=t._duckdb_web_fs_get_file_info_by_name=t.asm.kf).apply(null,arguments)},Ho=t._duckdb_web_fs_set_file_descriptor=function(){return(Ho=t._duckdb_web_fs_set_file_descriptor=t.asm.lf).apply(null,arguments)},Yo=t._duckdb_web_fs_register_file_url=function(){return(Yo=t._duckdb_web_fs_register_file_url=t.asm.mf).apply(null,arguments)},Kd=t._duckdb_web_fs_register_file_buffer=function(){return(Kd=t._duckdb_web_fs_register_file_buffer=t.asm.nf).apply(null,arguments)},_s=t._duckdb_web_copy_file_to_buffer=function(){return(_s=t._duckdb_web_copy_file_to_buffer=t.asm.of).apply(null,arguments)},ys=t._duckdb_web_copy_file_to_path=function(){return(ys=t._duckdb_web_copy_file_to_path=t.asm.pf).apply(null,arguments)},Jd=t._duckdb_web_get_version=function(){return(Jd=t._duckdb_web_get_version=t.asm.qf).apply(null,arguments)},Zd=t._duckdb_web_get_feature_flags=function(){return(Zd=t._duckdb_web_get_feature_flags=t.asm.rf).apply(null,arguments)},$o=t._duckdb_web_tokenize=function(){return($o=t._duckdb_web_tokenize=t.asm.sf).apply(null,arguments)},Xd=t._duckdb_web_prepared_create=function(){return(Xd=t._duckdb_web_prepared_create=t.asm.tf).apply(null,arguments)},Qd=t._duckdb_web_prepared_close=function(){return(Qd=t._duckdb_web_prepared_close=t.asm.uf).apply(null,arguments)},ru=t._duckdb_web_prepared_run=function(){return(ru=t._duckdb_web_prepared_run=t.asm.vf).apply(null,arguments)},g=t._duckdb_web_prepared_send=function(){return(g=t._duckdb_web_prepared_send=t.asm.wf).apply(null,arguments)},j=t._duckdb_web_query_run=function(){return(j=t._duckdb_web_query_run=t.asm.xf).apply(null,arguments)},A=t._duckdb_web_query_send=function(){return(A=t._duckdb_web_query_send=t.asm.yf).apply(null,arguments)},C=t._duckdb_web_query_fetch_results=function(){return(C=t._duckdb_web_query_fetch_results=t.asm.zf).apply(null,arguments)},R=t._duckdb_web_get_tablenames=function(){return(R=t._duckdb_web_get_tablenames=t.asm.Af).apply(null,arguments)},X=t._duckdb_web_insert_arrow_from_ipc_stream=function(){return(X=t._duckdb_web_insert_arrow_from_ipc_stream=t.asm.Bf).apply(null,arguments)},$=t._duckdb_web_insert_csv_from_path=function(){return($=t._duckdb_web_insert_csv_from_path=t.asm.Cf).apply(null,arguments)},H=t._duckdb_web_insert_json_from_path=function(){return(H=t._duckdb_web_insert_json_from_path=t.asm.Df).apply(null,arguments)},ae=t.___errno_location=function(){return(ae=t.___errno_location=t.asm.Ef).apply(null,arguments)},Fe=t._htonl=function(){return(Fe=t._htonl=t.asm.Ff).apply(null,arguments)},ke=t._ntohs=function(){return(ke=t._ntohs=t.asm.Gf).apply(null,arguments)},Tt=t._htons=function(){return(Tt=t._htons=t.asm.Hf).apply(null,arguments)},B=t.stackSave=function(){return(B=t.stackSave=t.asm.If).apply(null,arguments)},I=t.stackRestore=function(){return(I=t.stackRestore=t.asm.Jf).apply(null,arguments)},ze=t.stackAlloc=function(){return(ze=t.stackAlloc=t.asm.Kf).apply(null,arguments)},T=t._setThrew=function(){return(T=t._setThrew=t.asm.Lf).apply(null,arguments)},Ft=t.___cxa_can_catch=function(){return(Ft=t.___cxa_can_catch=t.asm.Mf).apply(null,arguments)},Si=t.___cxa_is_pointer_type=function(){return(Si=t.___cxa_is_pointer_type=t.asm.Nf).apply(null,arguments)},L=t._malloc=function(){return(L=t._malloc=t.asm.Of).apply(null,arguments)},ue=t._free=function(){return(ue=t._free=t.asm.Pf).apply(null,arguments)},Me=t.dynCall_viiij=function(){return(Me=t.dynCall_viiij=t.asm.Qf).apply(null,arguments)},Ce=t.dynCall_viiijjj=function(){return(Ce=t.dynCall_viiijjj=t.asm.Rf).apply(null,arguments)},$t=t.dynCall_iiij=function(){return($t=t.dynCall_iiij=t.asm.Sf).apply(null,arguments)},br=t.dynCall_vijijj=function(){return(br=t.dynCall_vijijj=t.asm.Tf).apply(null,arguments)},Fr=t.dynCall_iji=function(){return(Fr=t.dynCall_iji=t.asm.Uf).apply(null,arguments)},E_=t.dynCall_viji=function(){return(E_=t.dynCall_viji=t.asm.Vf).apply(null,arguments)},R_=t.dynCall_vij=function(){return(R_=t.dynCall_vij=t.asm.Wf).apply(null,arguments)},N_=t.dynCall_viijj=function(){return(N_=t.dynCall_viijj=t.asm.Xf).apply(null,arguments)},P_=t.dynCall_ji=function(){return(P_=t.dynCall_ji=t.asm.Yf).apply(null,arguments)},L_=t.dynCall_viiijj=function(){return(L_=t.dynCall_viiijj=t.asm.Zf).apply(null,arguments)},x_=t.dynCall_vijjj=function(){return(x_=t.dynCall_vijjj=t.asm._f).apply(null,arguments)},q_=t.dynCall_viiiij=function(){return(q_=t.dynCall_viiiij=t.asm.$f).apply(null,arguments)},z_=t.dynCall_jii=function(){return(z_=t.dynCall_jii=t.asm.ag).apply(null,arguments)},W_=t.dynCall_jiiii=function(){return(W_=t.dynCall_jiiii=t.asm.bg).apply(null,arguments)},H_=t.dynCall_iiiiij=function(){return(H_=t.dynCall_iiiiij=t.asm.cg).apply(null,arguments)},Y_=t.dynCall_iiiiijj=function(){return(Y_=t.dynCall_iiiiijj=t.asm.dg).apply(null,arguments)},$_=t.dynCall_iij=function(){return($_=t.dynCall_iij=t.asm.eg).apply(null,arguments)},G_=t.dynCall_viijii=function(){return(G_=t.dynCall_viijii=t.asm.fg).apply(null,arguments)},K_=t.dynCall_viiji=function(){return(K_=t.dynCall_viiji=t.asm.gg).apply(null,arguments)},J_=t.dynCall_vijj=function(){return(J_=t.dynCall_vijj=t.asm.hg).apply(null,arguments)},Z_=t.dynCall_viij=function(){return(Z_=t.dynCall_viij=t.asm.ig).apply(null,arguments)},X_=t.dynCall_vj=function(){return(X_=t.dynCall_vj=t.asm.jg).apply(null,arguments)},Q_=t.dynCall_iiji=function(){return(Q_=t.dynCall_iiji=t.asm.kg).apply(null,arguments)},ey=t.dynCall_iiiij=function(){return(ey=t.dynCall_iiiij=t.asm.lg).apply(null,arguments)},ty=t.dynCall_iiiiiji=function(){return(ty=t.dynCall_iiiiiji=t.asm.mg).apply(null,arguments)},ry=t.dynCall_iiiji=function(){return(ry=t.dynCall_iiiji=t.asm.ng).apply(null,arguments)},iy=t.dynCall_iiiiji=function(){return(iy=t.dynCall_iiiiji=t.asm.og).apply(null,arguments)},ny=t.dynCall_jiii=function(){return(ny=t.dynCall_jiii=t.asm.pg).apply(null,arguments)},sy=t.dynCall_jij=function(){return(sy=t.dynCall_jij=t.asm.qg).apply(null,arguments)},oy=t.dynCall_j=function(){return(oy=t.dynCall_j=t.asm.rg).apply(null,arguments)},ay=t.dynCall_viijij=function(){return(ay=t.dynCall_viijij=t.asm.sg).apply(null,arguments)},uy=t.dynCall_iijjijj=function(){return(uy=t.dynCall_iijjijj=t.asm.tg).apply(null,arguments)},cy=t.dynCall_viiiijiiiii=function(){return(cy=t.dynCall_viiiijiiiii=t.asm.ug).apply(null,arguments)},ly=t.dynCall_viiiijiiii=function(){return(ly=t.dynCall_viiiijiiii=t.asm.vg).apply(null,arguments)},dy=t.dynCall_viiijii=function(){return(dy=t.dynCall_viiijii=t.asm.wg).apply(null,arguments)},fy=t.dynCall_viiiiiij=function(){return(fy=t.dynCall_viiiiiij=t.asm.xg).apply(null,arguments)},hy=t.dynCall_iiijiii=function(){return(hy=t.dynCall_iiijiii=t.asm.yg).apply(null,arguments)},py=t.dynCall_iiiiijii=function(){return(py=t.dynCall_iiiiijii=t.asm.zg).apply(null,arguments)},_y=t.dynCall_viijiii=function(){return(_y=t.dynCall_viijiii=t.asm.Ag).apply(null,arguments)},yy=t.dynCall_iiijiij=function(){return(yy=t.dynCall_iiijiij=t.asm.Bg).apply(null,arguments)},my=t.dynCall_vijiii=function(){return(my=t.dynCall_vijiii=t.asm.Cg).apply(null,arguments)},by=t.dynCall_iijjii=function(){return(by=t.dynCall_iijjii=t.asm.Dg).apply(null,arguments)},gy=t.dynCall_iijjiii=function(){return(gy=t.dynCall_iijjiii=t.asm.Eg).apply(null,arguments)},vy=t.dynCall_iijjiiii=function(){return(vy=t.dynCall_iijjiiii=t.asm.Fg).apply(null,arguments)},wy=t.dynCall_iijji=function(){return(wy=t.dynCall_iijji=t.asm.Gg).apply(null,arguments)},jy=t.dynCall_vijiiii=function(){return(jy=t.dynCall_vijiiii=t.asm.Hg).apply(null,arguments)},By=t.dynCall_iijiiii=function(){return(By=t.dynCall_iijiiii=t.asm.Ig).apply(null,arguments)},Iy=t.dynCall_vijij=function(){return(Iy=t.dynCall_vijij=t.asm.Jg).apply(null,arguments)},Ty=t.dynCall_iiijjjj=function(){return(Ty=t.dynCall_iiijjjj=t.asm.Kg).apply(null,arguments)},Sy=t.dynCall_iiijiiii=function(){return(Sy=t.dynCall_iiijiiii=t.asm.Lg).apply(null,arguments)},Dy=t.dynCall_jiiij=function(){return(Dy=t.dynCall_jiiij=t.asm.Mg).apply(null,arguments)},Ay=t.dynCall_jiiiii=function(){return(Ay=t.dynCall_jiiiii=t.asm.Ng).apply(null,arguments)},Oy=t.dynCall_iiiiijjiijj=function(){return(Oy=t.dynCall_iiiiijjiijj=t.asm.Og).apply(null,arguments)},Fy=t.dynCall_viijiiji=function(){return(Fy=t.dynCall_viijiiji=t.asm.Pg).apply(null,arguments)},ky=t.dynCall_vjjijij=function(){return(ky=t.dynCall_vjjijij=t.asm.Qg).apply(null,arguments)},My=t.dynCall_vijjji=function(){return(My=t.dynCall_vijjji=t.asm.Rg).apply(null,arguments)},Cy=t.dynCall_vjjii=function(){return(Cy=t.dynCall_vjjii=t.asm.Sg).apply(null,arguments)},Uy=t.dynCall_viiiiiji=function(){return(Uy=t.dynCall_viiiiiji=t.asm.Tg).apply(null,arguments)},Vy=t.dynCall_jiiiji=function(){return(Vy=t.dynCall_jiiiji=t.asm.Ug).apply(null,arguments)},Ey=t.dynCall_iijj=function(){return(Ey=t.dynCall_iijj=t.asm.Vg).apply(null,arguments)},Ry=t.dynCall_iiijjii=function(){return(Ry=t.dynCall_iiijjii=t.asm.Wg).apply(null,arguments)},Ny=t.dynCall_vijii=function(){return(Ny=t.dynCall_vijii=t.asm.Xg).apply(null,arguments)},Py=t.dynCall_viijjii=function(){return(Py=t.dynCall_viijjii=t.asm.Yg).apply(null,arguments)},Ly=t.dynCall_viiiijj=function(){return(Ly=t.dynCall_viiiijj=t.asm.Zg).apply(null,arguments)},xy=t.dynCall_jijjij=function(){return(xy=t.dynCall_jijjij=t.asm._g).apply(null,arguments)},qy=t.dynCall_jiijii=function(){return(qy=t.dynCall_jiijii=t.asm.$g).apply(null,arguments)},zy=t.dynCall_jijiii=function(){return(zy=t.dynCall_jijiii=t.asm.ah).apply(null,arguments)},Wy=t.dynCall_viijiiiii=function(){return(Wy=t.dynCall_viijiiiii=t.asm.bh).apply(null,arguments)},Hy=t.dynCall_viijiiij=function(){return(Hy=t.dynCall_viijiiij=t.asm.ch).apply(null,arguments)},Yy=t.dynCall_vijiiiji=function(){return(Yy=t.dynCall_vijiiiji=t.asm.dh).apply(null,arguments)},$y=t.dynCall_jiiji=function(){return($y=t.dynCall_jiiji=t.asm.eh).apply(null,arguments)},Gy=t.dynCall_viiijij=function(){return(Gy=t.dynCall_viiijij=t.asm.fh).apply(null,arguments)},Ky=t.dynCall_viijiij=function(){return(Ky=t.dynCall_viijiij=t.asm.gh).apply(null,arguments)},Jy=t.dynCall_viiiiijj=function(){return(Jy=t.dynCall_viiiiijj=t.asm.hh).apply(null,arguments)},Zy=t.dynCall_viiijji=function(){return(Zy=t.dynCall_viiijji=t.asm.ih).apply(null,arguments)},Xy=t.dynCall_viiiji=function(){return(Xy=t.dynCall_viiiji=t.asm.jh).apply(null,arguments)},Qy=t.dynCall_iiiijiii=function(){return(Qy=t.dynCall_iiiijiii=t.asm.kh).apply(null,arguments)},em=t.dynCall_iiijij=function(){return(em=t.dynCall_iiijij=t.asm.lh).apply(null,arguments)},tm=t.dynCall_iiijji=function(){return(tm=t.dynCall_iiijji=t.asm.mh).apply(null,arguments)},rm=t.dynCall_viijji=function(){return(rm=t.dynCall_viijji=t.asm.nh).apply(null,arguments)},im=t.dynCall_iiiijj=function(){return(im=t.dynCall_iiiijj=t.asm.oh).apply(null,arguments)},nm=t.dynCall_viiijiii=function(){return(nm=t.dynCall_viiijiii=t.asm.ph).apply(null,arguments)},sm=t.dynCall_vijji=function(){return(sm=t.dynCall_vijji=t.asm.qh).apply(null,arguments)},om=t.dynCall_jiiiij=function(){return(om=t.dynCall_jiiiij=t.asm.rh).apply(null,arguments)},am=t.dynCall_jiijiiiii=function(){return(am=t.dynCall_jiijiiiii=t.asm.sh).apply(null,arguments)},um=t.dynCall_jiijiijiii=function(){return(um=t.dynCall_jiijiijiii=t.asm.th).apply(null,arguments)},cm=t.dynCall_jiijjiii=function(){return(cm=t.dynCall_jiijjiii=t.asm.uh).apply(null,arguments)},lm=t.dynCall_jiiijii=function(){return(lm=t.dynCall_jiiijii=t.asm.vh).apply(null,arguments)},dm=t.dynCall_jiijijii=function(){return(dm=t.dynCall_jiijijii=t.asm.wh).apply(null,arguments)},fm=t.dynCall_viiijjij=function(){return(fm=t.dynCall_viiijjij=t.asm.xh).apply(null,arguments)},hm=t.dynCall_vijijjiij=function(){return(hm=t.dynCall_vijijjiij=t.asm.yh).apply(null,arguments)},pm=t.dynCall_viijjij=function(){return(pm=t.dynCall_viijjij=t.asm.zh).apply(null,arguments)},_m=t.dynCall_viiijjiij=function(){return(_m=t.dynCall_viiijjiij=t.asm.Ah).apply(null,arguments)},ym=t.dynCall_viiiijjjj=function(){return(ym=t.dynCall_viiiijjjj=t.asm.Bh).apply(null,arguments)},mm=t.dynCall_viijiiiiij=function(){return(mm=t.dynCall_viijiiiiij=t.asm.Ch).apply(null,arguments)},bm=t.dynCall_viijiiiijj=function(){return(bm=t.dynCall_viijiiiijj=t.asm.Dh).apply(null,arguments)},gm=t.dynCall_viiijiiiijjj=function(){return(gm=t.dynCall_viiijiiiijjj=t.asm.Eh).apply(null,arguments)},vm=t.dynCall_viijijiiiijjj=function(){return(vm=t.dynCall_viijijiiiijjj=t.asm.Fh).apply(null,arguments)},wm=t.dynCall_viiiiijiiii=function(){return(wm=t.dynCall_viiiiijiiii=t.asm.Gh).apply(null,arguments)},jm=t.dynCall_iiijii=function(){return(jm=t.dynCall_iiijii=t.asm.Hh).apply(null,arguments)},Bm=t.dynCall_fiijii=function(){return(Bm=t.dynCall_fiijii=t.asm.Ih).apply(null,arguments)},Im=t.dynCall_diijii=function(){return(Im=t.dynCall_diijii=t.asm.Jh).apply(null,arguments)},Tm=t.dynCall_iiiiiiijii=function(){return(Tm=t.dynCall_iiiiiiijii=t.asm.Kh).apply(null,arguments)},Sm=t.dynCall_viiiiji=function(){return(Sm=t.dynCall_viiiiji=t.asm.Lh).apply(null,arguments)},Dm=t.dynCall_jiiiijii=function(){return(Dm=t.dynCall_jiiiijii=t.asm.Mh).apply(null,arguments)},Am=t.dynCall_jiiiijiiiiiiii=function(){return(Am=t.dynCall_jiiiijiiiiiiii=t.asm.Nh).apply(null,arguments)},Om=t.dynCall_jiiijiii=function(){return(Om=t.dynCall_jiiijiii=t.asm.Oh).apply(null,arguments)},Fm=t.dynCall_jiiiiijiiii=function(){return(Fm=t.dynCall_jiiiiijiiii=t.asm.Ph).apply(null,arguments)},km=t.dynCall_jj=function(){return(km=t.dynCall_jj=t.asm.Qh).apply(null,arguments)},Mm=t.dynCall_jd=function(){return(Mm=t.dynCall_jd=t.asm.Rh).apply(null,arguments)},Cm=t.dynCall_jf=function(){return(Cm=t.dynCall_jf=t.asm.Sh).apply(null,arguments)},Um=t.dynCall_iijjj=function(){return(Um=t.dynCall_iijjj=t.asm.Th).apply(null,arguments)},Vm=t.dynCall_iiijj=function(){return(Vm=t.dynCall_iiijj=t.asm.Uh).apply(null,arguments)},Em=t.dynCall_vijijiiiijjj=function(){return(Em=t.dynCall_vijijiiiijjj=t.asm.Vh).apply(null,arguments)},Rm=t.dynCall_iiiiiiji=function(){return(Rm=t.dynCall_iiiiiiji=t.asm.Wh).apply(null,arguments)},Nm=t.dynCall_iiiiiiiiji=function(){return(Nm=t.dynCall_iiiiiiiiji=t.asm.Xh).apply(null,arguments)},Pm=t.dynCall_jijijjij=function(){return(Pm=t.dynCall_jijijjij=t.asm.Yh).apply(null,arguments)},Lm=t.dynCall_viijjj=function(){return(Lm=t.dynCall_viijjj=t.asm.Zh).apply(null,arguments)},xm=t.dynCall_vijjij=function(){return(xm=t.dynCall_vijjij=t.asm._h).apply(null,arguments)},qm=t.dynCall_viijjji=function(){return(qm=t.dynCall_viijjji=t.asm.$h).apply(null,arguments)},zm=t.dynCall_iiiiiij=function(){return(zm=t.dynCall_iiiiiij=t.asm.ai).apply(null,arguments)},Wm=t.dynCall_iiiiiiiiiiji=function(){return(Wm=t.dynCall_iiiiiiiiiiji=t.asm.bi).apply(null,arguments)},Hm=t.dynCall_jiiiiiii=function(){return(Hm=t.dynCall_jiiiiiii=t.asm.ci).apply(null,arguments)},Ym=t.dynCall_jijj=function(){return(Ym=t.dynCall_jijj=t.asm.di).apply(null,arguments)},$m=t.dynCall_viiiijiiiiiiii=function(){return($m=t.dynCall_viiiijiiiiiiii=t.asm.ei).apply(null,arguments)},Gm=t.dynCall_ij=function(){return(Gm=t.dynCall_ij=t.asm.fi).apply(null,arguments)},Km=t.dynCall_jjj=function(){return(Km=t.dynCall_jjj=t.asm.gi).apply(null,arguments)},Jm=t.dynCall_vjii=function(){return(Jm=t.dynCall_vjii=t.asm.hi).apply(null,arguments)},Zm=t.dynCall_jjjjjjd=function(){return(Zm=t.dynCall_jjjjjjd=t.asm.ii).apply(null,arguments)},Xm=t.dynCall_vjiiii=function(){return(Xm=t.dynCall_vjiiii=t.asm.ji).apply(null,arguments)},Qm=t.dynCall_viiiiijiii=function(){return(Qm=t.dynCall_viiiiijiii=t.asm.ki).apply(null,arguments)},eb=t.dynCall_jiij=function(){return(eb=t.dynCall_jiij=t.asm.li).apply(null,arguments)},tb=t.dynCall_iiiijjii=function(){return(tb=t.dynCall_iiiijjii=t.asm.mi).apply(null,arguments)},rb=t.dynCall_iiiiijji=function(){return(rb=t.dynCall_iiiiijji=t.asm.ni).apply(null,arguments)},ib=t.dynCall_viiijjii=function(){return(ib=t.dynCall_viiijjii=t.asm.oi).apply(null,arguments)},nb=t.dynCall_viiiijji=function(){return(nb=t.dynCall_viiiijji=t.asm.pi).apply(null,arguments)},sb=t.dynCall_viiiijjii=function(){return(sb=t.dynCall_viiiijjii=t.asm.qi).apply(null,arguments)},ob=t.dynCall_viiiiijji=function(){return(ob=t.dynCall_viiiiijji=t.asm.ri).apply(null,arguments)},ab=t.dynCall_iiiiiijji=function(){return(ab=t.dynCall_iiiiiijji=t.asm.si).apply(null,arguments)},ub=t.dynCall_iiiiijjj=function(){return(ub=t.dynCall_iiiiijjj=t.asm.ti).apply(null,arguments)},cb=t.dynCall_jijiiii=function(){return(cb=t.dynCall_jijiiii=t.asm.ui).apply(null,arguments)},lb=t.dynCall_iiijjjii=function(){return(lb=t.dynCall_iiijjjii=t.asm.vi).apply(null,arguments)},db=t.dynCall_iiiiijjji=function(){return(db=t.dynCall_iiiiijjji=t.asm.wi).apply(null,arguments)},fb=t.dynCall_iiiijjj=function(){return(fb=t.dynCall_iiiijjj=t.asm.xi).apply(null,arguments)},hb=t.dynCall_iidj=function(){return(hb=t.dynCall_iidj=t.asm.yi).apply(null,arguments)},pb=t.dynCall_ijji=function(){return(pb=t.dynCall_ijji=t.asm.zi).apply(null,arguments)},_b=t.dynCall_iiiiiiiij=function(){return(_b=t.dynCall_iiiiiiiij=t.asm.Ai).apply(null,arguments)},yb=t.dynCall_iiiiiiij=function(){return(yb=t.dynCall_iiiiiiij=t.asm.Bi).apply(null,arguments)},mb=t.dynCall_iiiiiiiiiiiij=function(){return(mb=t.dynCall_iiiiiiiiiiiij=t.asm.Ci).apply(null,arguments)},bb=t.dynCall_iiiiiiiji=function(){return(bb=t.dynCall_iiiiiiiji=t.asm.Di).apply(null,arguments)},gb=t.dynCall_iiiidjj=function(){return(gb=t.dynCall_iiiidjj=t.asm.Ei).apply(null,arguments)},vb=t.dynCall_jiiiiiijii=function(){return(vb=t.dynCall_jiiiiiijii=t.asm.Fi).apply(null,arguments)},wb=t.dynCall_iiiijji=function(){return(wb=t.dynCall_iiiijji=t.asm.Gi).apply(null,arguments)},jb=t.dynCall_jiiiiii=function(){return(jb=t.dynCall_jiiiiii=t.asm.Hi).apply(null,arguments)},Bb=t.dynCall_iijiji=function(){return(Bb=t.dynCall_iijiji=t.asm.Ii).apply(null,arguments)},Ib=t.dynCall_vjiiiji=function(){return(Ib=t.dynCall_vjiiiji=t.asm.Ji).apply(null,arguments)},Tb=t.dynCall_jjjii=function(){return(Tb=t.dynCall_jjjii=t.asm.Ki).apply(null,arguments)},Sb=t.dynCall_jji=function(){return(Sb=t.dynCall_jji=t.asm.Li).apply(null,arguments)},Db=t.dynCall_viiijijiji=function(){return(Db=t.dynCall_viiijijiji=t.asm.Mi).apply(null,arguments)},Ab=t.dynCall_jiiijj=function(){return(Ab=t.dynCall_jiiijj=t.asm.Ni).apply(null,arguments)},Ob=t.dynCall_iiiijii=function(){return(Ob=t.dynCall_iiiijii=t.asm.Oi).apply(null,arguments)},Fb=t.dynCall_viiiijii=function(){return(Fb=t.dynCall_viiiijii=t.asm.Pi).apply(null,arguments)},kb=t.dynCall_iijiii=function(){return(kb=t.dynCall_iijiii=t.asm.Qi).apply(null,arguments)},Mb=t.dynCall_jiiiiji=function(){return(Mb=t.dynCall_jiiiiji=t.asm.Ri).apply(null,arguments)},Cb=t.dynCall_vijiijj=function(){return(Cb=t.dynCall_vijiijj=t.asm.Si).apply(null,arguments)},Ub=t.dynCall_vifiijj=function(){return(Ub=t.dynCall_vifiijj=t.asm.Ti).apply(null,arguments)},Vb=t.dynCall_vidiijj=function(){return(Vb=t.dynCall_vidiijj=t.asm.Ui).apply(null,arguments)},Eb=t.dynCall_viiiiij=function(){return(Eb=t.dynCall_viiiiij=t.asm.Vi).apply(null,arguments)},Rb=t.dynCall_ijj=function(){return(Rb=t.dynCall_ijj=t.asm.Wi).apply(null,arguments)},Nb=t.dynCall_ijjiii=function(){return(Nb=t.dynCall_ijjiii=t.asm.Xi).apply(null,arguments)},Pb=t.dynCall_vijijjji=function(){return(Pb=t.dynCall_vijijjji=t.asm.Yi).apply(null,arguments)},Lb=t.dynCall_viijiijj=function(){return(Lb=t.dynCall_viijiijj=t.asm.Zi).apply(null,arguments)},xb=t.dynCall_viijijj=function(){return(xb=t.dynCall_viijijj=t.asm._i).apply(null,arguments)},qb=t.dynCall_viiiiijjji=function(){return(qb=t.dynCall_viiiiijjji=t.asm.$i).apply(null,arguments)},zb=t.dynCall_iiijiijj=function(){return(zb=t.dynCall_iiijiijj=t.asm.aj).apply(null,arguments)},Wb=t.dynCall_viiijijjj=function(){return(Wb=t.dynCall_viiijijjj=t.asm.bj).apply(null,arguments)},Hb=t.dynCall_iijiijj=function(){return(Hb=t.dynCall_iijiijj=t.asm.cj).apply(null,arguments)},Yb=t.dynCall_viiijjjji=function(){return(Yb=t.dynCall_viiijjjji=t.asm.dj).apply(null,arguments)},$b=t.dynCall_viiiijiii=function(){return($b=t.dynCall_viiiijiii=t.asm.ej).apply(null,arguments)},Gb=t.dynCall_viijiiii=function(){return(Gb=t.dynCall_viijiiii=t.asm.fj).apply(null,arguments)},Kb=t.dynCall_iijii=function(){return(Kb=t.dynCall_iijii=t.asm.gj).apply(null,arguments)},Jb=t.dynCall_vijjiiii=function(){return(Jb=t.dynCall_vijjiiii=t.asm.hj).apply(null,arguments)},Zb=t.dynCall_vijijjiiiii=function(){return(Zb=t.dynCall_vijijjiiiii=t.asm.ij).apply(null,arguments)},Xb=t.dynCall_vijjiiiii=function(){return(Xb=t.dynCall_vijjiiiii=t.asm.jj).apply(null,arguments)},Qb=t.dynCall_iiijjji=function(){return(Qb=t.dynCall_iiijjji=t.asm.kj).apply(null,arguments)},eg=t.dynCall_viijiji=function(){return(eg=t.dynCall_viijiji=t.asm.lj).apply(null,arguments)};function k1(o){var a=B();try{ne.get(o)()}catch(u){if(I(a),u!==u+0&&u!=="longjmp")throw u;T(1,0)}}function M1(o,a,u){var c=B();try{ne.get(o)(a,u)}catch(d){if(I(c),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function C1(o,a){var u=B();try{return ne.get(o)(a)}catch(c){if(I(u),c!==c+0&&c!=="longjmp")throw c;T(1,0)}}function U1(o,a,u){var c=B();try{return ne.get(o)(a,u)}catch(d){if(I(c),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function V1(o,a){var u=B();try{ne.get(o)(a)}catch(c){if(I(u),c!==c+0&&c!=="longjmp")throw c;T(1,0)}}function E1(o,a,u,c){var d=B();try{return ne.get(o)(a,u,c)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function R1(o,a,u,c,d,f){var h=B();try{return ne.get(o)(a,u,c,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function N1(o,a,u,c,d){var f=B();try{ne.get(o)(a,u,c,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function P1(o,a,u,c,d){var f=B();try{return ne.get(o)(a,u,c,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function L1(o,a,u,c){var d=B();try{return ne.get(o)(a,u,c)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function x1(o,a,u,c){var d=B();try{return ne.get(o)(a,u,c)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function q1(o,a,u,c){var d=B();try{ne.get(o)(a,u,c)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function z1(o,a,u,c){var d=B();try{ne.get(o)(a,u,c)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function W1(o,a,u,c){var d=B();try{ne.get(o)(a,u,c)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function H1(o,a,u){var c=B();try{return ne.get(o)(a,u)}catch(d){if(I(c),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function Y1(o,a,u){var c=B();try{return ne.get(o)(a,u)}catch(d){if(I(c),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function $1(o,a,u,c,d,f,h){var p=B();try{ne.get(o)(a,u,c,d,f,h)}catch(_){if(I(p),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function G1(o,a,u,c,d,f){var h=B();try{ne.get(o)(a,u,c,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function K1(o,a,u,c,d,f,h,p,_){var m=B();try{return ne.get(o)(a,u,c,d,f,h,p,_)}catch(b){if(I(m),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function J1(o,a,u,c,d,f,h){var p=B();try{return ne.get(o)(a,u,c,d,f,h)}catch(_){if(I(p),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function Z1(o,a,u,c,d,f,h,p){var _=B();try{return ne.get(o)(a,u,c,d,f,h,p)}catch(m){if(I(_),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function X1(o){var a=B();try{return ne.get(o)()}catch(u){if(I(a),u!==u+0&&u!=="longjmp")throw u;T(1,0)}}function Q1(o,a,u,c,d,f,h,p,_,m,b){var S=B();try{return ne.get(o)(a,u,c,d,f,h,p,_,m,b)}catch(F){if(I(S),F!==F+0&&F!=="longjmp")throw F;T(1,0)}}function eB(o,a,u,c,d,f,h,p){var _=B();try{ne.get(o)(a,u,c,d,f,h,p)}catch(m){if(I(_),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function tB(o,a,u,c,d,f,h,p,_,m,b,S){var F=B();try{return ne.get(o)(a,u,c,d,f,h,p,_,m,b,S)}catch(V){if(I(F),V!==V+0&&V!=="longjmp")throw V;T(1,0)}}function rB(o,a,u,c,d,f,h,p,_,m,b){var S=B();try{ne.get(o)(a,u,c,d,f,h,p,_,m,b)}catch(F){if(I(S),F!==F+0&&F!=="longjmp")throw F;T(1,0)}}function iB(o,a,u,c,d,f,h,p,_,m,b,S,F,V,z,ce){var je=B();try{ne.get(o)(a,u,c,d,f,h,p,_,m,b,S,F,V,z,ce)}catch(Ke){if(I(je),Ke!==Ke+0&&Ke!=="longjmp")throw Ke;T(1,0)}}function nB(o,a,u,c,d){var f=B();try{return ne.get(o)(a,u,c,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function sB(o,a,u,c,d){var f=B();try{return ne.get(o)(a,u,c,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function oB(o,a,u,c,d,f){var h=B();try{ne.get(o)(a,u,c,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function aB(o,a,u){var c=B();try{ne.get(o)(a,u)}catch(d){if(I(c),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function uB(o,a,u){var c=B();try{ne.get(o)(a,u)}catch(d){if(I(c),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function cB(o,a){var u=B();try{return ne.get(o)(a)}catch(c){if(I(u),c!==c+0&&c!=="longjmp")throw c;T(1,0)}}function lB(o,a,u,c){var d=B();try{return ne.get(o)(a,u,c)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function dB(o,a){var u=B();try{return ne.get(o)(a)}catch(c){if(I(u),c!==c+0&&c!=="longjmp")throw c;T(1,0)}}function fB(o,a,u,c,d,f,h,p,_){var m=B();try{ne.get(o)(a,u,c,d,f,h,p,_)}catch(b){if(I(m),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function hB(o,a,u,c,d,f){var h=B();try{return ne.get(o)(a,u,c,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function pB(o,a,u,c){var d=B();try{ne.get(o)(a,u,c)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function _B(o,a,u,c){var d=B();try{ne.get(o)(a,u,c)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function yB(o,a,u,c,d,f,h,p,_,m,b,S,F,V,z){var ce=B();try{return ne.get(o)(a,u,c,d,f,h,p,_,m,b,S,F,V,z)}catch(je){if(I(ce),je!==je+0&&je!=="longjmp")throw je;T(1,0)}}function mB(o,a,u){var c=B();try{return ne.get(o)(a,u)}catch(d){if(I(c),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function bB(o,a,u,c,d,f,h,p,_,m,b,S,F,V){var z=B();try{ne.get(o)(a,u,c,d,f,h,p,_,m,b,S,F,V)}catch(ce){if(I(z),ce!==ce+0&&ce!=="longjmp")throw ce;T(1,0)}}function gB(o,a,u,c,d,f,h,p,_,m){var b=B();try{ne.get(o)(a,u,c,d,f,h,p,_,m)}catch(S){if(I(b),S!==S+0&&S!=="longjmp")throw S;T(1,0)}}function vB(o){var a=B();try{return ne.get(o)()}catch(u){if(I(a),u!==u+0&&u!=="longjmp")throw u;T(1,0)}}function wB(o){var a=B();try{return ne.get(o)()}catch(u){if(I(a),u!==u+0&&u!=="longjmp")throw u;T(1,0)}}function jB(o,a){var u=B();try{return ne.get(o)(a)}catch(c){if(I(u),c!==c+0&&c!=="longjmp")throw c;T(1,0)}}function BB(o,a){var u=B();try{return ne.get(o)(a)}catch(c){if(I(u),c!==c+0&&c!=="longjmp")throw c;T(1,0)}}function IB(o,a,u,c,d,f,h,p,_,m,b,S,F,V,z,ce,je,Ke,N,se,Oe){var Se=B();try{return ne.get(o)(a,u,c,d,f,h,p,_,m,b,S,F,V,z,ce,je,Ke,N,se,Oe)}catch(Ut){if(I(Se),Ut!==Ut+0&&Ut!=="longjmp")throw Ut;T(1,0)}}function TB(o,a,u,c,d,f,h,p,_,m,b,S,F,V,z,ce,je,Ke,N,se){var Oe=B();try{return ne.get(o)(a,u,c,d,f,h,p,_,m,b,S,F,V,z,ce,je,Ke,N,se)}catch(Se){if(I(Oe),Se!==Se+0&&Se!=="longjmp")throw Se;T(1,0)}}function SB(o,a,u){var c=B();try{return ne.get(o)(a,u)}catch(d){if(I(c),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function DB(o,a,u,c,d,f,h,p,_,m,b){var S=B();try{ne.get(o)(a,u,c,d,f,h,p,_,m,b)}catch(F){if(I(S),F!==F+0&&F!=="longjmp")throw F;T(1,0)}}function AB(o,a,u,c){var d=B();try{return ne.get(o)(a,u,c)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function OB(o,a,u,c,d,f,h,p,_,m){var b=B();try{ne.get(o)(a,u,c,d,f,h,p,_,m)}catch(S){if(I(b),S!==S+0&&S!=="longjmp")throw S;T(1,0)}}function FB(o,a,u,c,d,f,h,p,_,m,b,S){var F=B();try{ne.get(o)(a,u,c,d,f,h,p,_,m,b,S)}catch(V){if(I(F),V!==V+0&&V!=="longjmp")throw V;T(1,0)}}function kB(o,a,u,c,d){var f=B();try{return W_(o,a,u,c,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function MB(o,a,u,c,d,f,h){var p=B();try{N_(o,a,u,c,d,f,h)}catch(_){if(I(p),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function CB(o,a,u,c,d){var f=B();try{Z_(o,a,u,c,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function UB(o,a,u,c,d,f,h){var p=B();try{return H_(o,a,u,c,d,f,h)}catch(_){if(I(p),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function VB(o,a,u,c){var d=B();try{R_(o,a,u,c)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function EB(o,a,u,c,d,f,h){var p=B();try{q_(o,a,u,c,d,f,h)}catch(_){if(I(p),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function RB(o,a,u,c,d,f){var h=B();try{Me(o,a,u,c,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function NB(o,a,u,c,d,f,h,p,_,m){var b=B();try{Ce(o,a,u,c,d,f,h,p,_,m)}catch(S){if(I(b),S!==S+0&&S!=="longjmp")throw S;T(1,0)}}function PB(o,a,u,c,d){var f=B();try{return $t(o,a,u,c,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function LB(o,a,u,c,d,f,h,p,_){var m=B();try{br(o,a,u,c,d,f,h,p,_)}catch(b){if(I(m),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function xB(o,a,u,c){var d=B();try{return Fr(o,a,u,c)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function qB(o,a,u,c,d){var f=B();try{E_(o,a,u,c,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function zB(o,a){var u=B();try{return P_(o,a)}catch(c){if(I(u),c!==c+0&&c!=="longjmp")throw c;T(1,0)}}function WB(o,a,u,c,d,f,h,p){var _=B();try{L_(o,a,u,c,d,f,h,p)}catch(m){if(I(_),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function HB(o,a,u,c,d,f,h,p){var _=B();try{x_(o,a,u,c,d,f,h,p)}catch(m){if(I(_),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function YB(o,a,u,c,d,f,h,p,_){var m=B();try{Lm(o,a,u,c,d,f,h,p,_)}catch(b){if(I(m),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function $B(o,a,u,c,d,f,h,p,_){var m=B();try{return Y_(o,a,u,c,d,f,h,p,_)}catch(b){if(I(m),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function GB(o,a,u){var c=B();try{return z_(o,a,u)}catch(d){if(I(c),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function KB(o,a,u,c,d){var f=B();try{return Rb(o,a,u,c,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function JB(o,a,u,c,d,f,h,p){var _=B();try{return Nb(o,a,u,c,d,f,h,p)}catch(m){if(I(_),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function ZB(o,a,u,c,d,f,h){var p=B();try{G_(o,a,u,c,d,f,h)}catch(_){if(I(p),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function XB(o,a,u,c,d,f){var h=B();try{K_(o,a,u,c,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function QB(o,a,u,c,d,f){var h=B();try{J_(o,a,u,c,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function eI(o,a,u,c){var d=B();try{return $_(o,a,u,c)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function tI(o,a,u){var c=B();try{X_(o,a,u)}catch(d){if(I(c),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function rI(o,a,u,c,d){var f=B();try{return Q_(o,a,u,c,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function iI(o,a,u,c,d,f){var h=B();try{return ey(o,a,u,c,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function nI(o,a,u,c,d,f,h,p){var _=B();try{return im(o,a,u,c,d,f,h,p)}catch(m){if(I(_),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function sI(o,a,u,c,d,f,h,p){var _=B();try{Sm(o,a,u,c,d,f,h,p)}catch(m){if(I(_),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function oI(o,a,u,c,d,f,h,p){var _=B();try{return em(o,a,u,c,d,f,h,p)}catch(m){if(I(_),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function aI(o,a,u,c,d,f){var h=B();try{return ry(o,a,u,c,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function uI(o,a,u,c,d,f){var h=B();try{return Ey(o,a,u,c,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function cI(o,a,u,c,d,f,h,p){var _=B();try{return tm(o,a,u,c,d,f,h,p)}catch(m){if(I(_),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function lI(o,a,u,c,d,f,h,p){var _=B();try{rm(o,a,u,c,d,f,h,p)}catch(m){if(I(_),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function dI(o){var a=B();try{return oy(o)}catch(u){if(I(a),u!==u+0&&u!=="longjmp")throw u;T(1,0)}}function fI(o,a,u,c,d,f,h,p){var _=B();try{return ty(o,a,u,c,d,f,h,p)}catch(m){if(I(_),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function hI(o,a,u,c,d,f,h){var p=B();try{return iy(o,a,u,c,d,f,h)}catch(_){if(I(p),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function pI(o,a,u,c){var d=B();try{return ny(o,a,u,c)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function _I(o,a,u,c,d,f,h){var p=B();try{my(o,a,u,c,d,f,h)}catch(_){if(I(p),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function yI(o,a,u,c,d,f,h,p){var _=B();try{jy(o,a,u,c,d,f,h,p)}catch(m){if(I(_),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function mI(o,a,u,c,d,f,h,p){var _=B();try{return By(o,a,u,c,d,f,h,p)}catch(m){if(I(_),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function bI(o,a,u,c,d,f,h,p){var _=B();try{return hy(o,a,u,c,d,f,h,p)}catch(m){if(I(_),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function gI(o,a,u,c,d,f,h,p,_){var m=B();try{return py(o,a,u,c,d,f,h,p,_)}catch(b){if(I(m),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function vI(o,a,u,c,d,f,h,p){var _=B();try{_y(o,a,u,c,d,f,h,p)}catch(m){if(I(_),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function wI(o,a,u,c,d,f,h,p,_){var m=B();try{return yy(o,a,u,c,d,f,h,p,_)}catch(b){if(I(m),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function jI(o,a,u,c,d,f,h,p){var _=B();try{return by(o,a,u,c,d,f,h,p)}catch(m){if(I(_),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function BI(o,a,u,c,d,f,h,p,_){var m=B();try{return gy(o,a,u,c,d,f,h,p,_)}catch(b){if(I(m),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function II(o,a,u,c,d,f,h,p,_,m){var b=B();try{return vy(o,a,u,c,d,f,h,p,_,m)}catch(S){if(I(b),S!==S+0&&S!=="longjmp")throw S;T(1,0)}}function TI(o,a,u,c,d,f,h){var p=B();try{return wy(o,a,u,c,d,f,h)}catch(_){if(I(p),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function SI(o,a,u,c,d,f,h,p,_){var m=B();try{fy(o,a,u,c,d,f,h,p,_)}catch(b){if(I(m),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function DI(o,a,u,c,d,f,h,p){var _=B();try{dy(o,a,u,c,d,f,h,p)}catch(m){if(I(_),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function AI(o,a,u,c,d,f,h,p,_,m,b){var S=B();try{return uy(o,a,u,c,d,f,h,p,_,m,b)}catch(F){if(I(S),F!==F+0&&F!=="longjmp")throw F;T(1,0)}}function OI(o,a,u,c,d,f,h,p,_,m,b,S){var F=B();try{cy(o,a,u,c,d,f,h,p,_,m,b,S)}catch(V){if(I(F),V!==V+0&&V!=="longjmp")throw V;T(1,0)}}function FI(o,a,u,c,d,f,h,p,_,m,b){var S=B();try{ly(o,a,u,c,d,f,h,p,_,m,b)}catch(F){if(I(S),F!==F+0&&F!=="longjmp")throw F;T(1,0)}}function kI(o,a,u,c,d,f,h){var p=B();try{Cy(o,a,u,c,d,f,h)}catch(_){if(I(p),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function MI(o,a,u,c,d,f,h){var p=B();try{Xy(o,a,u,c,d,f,h)}catch(_){if(I(p),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function CI(o,a,u,c,d,f,h,p,_){var m=B();try{Ly(o,a,u,c,d,f,h,p,_)}catch(b){if(I(m),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function UI(o,a,u,c,d,f,h,p,_){var m=B();try{return Sy(o,a,u,c,d,f,h,p,_)}catch(b){if(I(m),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function VI(o,a,u,c,d,f,h,p,_){var m=B();try{Zy(o,a,u,c,d,f,h,p,_)}catch(b){if(I(m),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function EI(o,a,u,c){var d=B();try{return sy(o,a,u,c)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function RI(o,a,u,c,d,f){var h=B();try{return Dy(o,a,u,c,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function NI(o,a,u,c,d,f,h,p,_){var m=B();try{My(o,a,u,c,d,f,h,p,_)}catch(b){if(I(m),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function PI(o,a,u,c,d,f){var h=B();try{return Ay(o,a,u,c,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function LI(o,a,u,c,d,f,h,p,_,m,b){var S=B();try{ky(o,a,u,c,d,f,h,p,_,m,b)}catch(F){if(I(S),F!==F+0&&F!=="longjmp")throw F;T(1,0)}}function xI(o,a,u,c,d,f){var h=B();try{return $y(o,a,u,c,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function qI(o,a,u,c,d,f,h,p,_,m){var b=B();try{Fy(o,a,u,c,d,f,h,p,_,m)}catch(S){if(I(b),S!==S+0&&S!=="longjmp")throw S;T(1,0)}}function zI(o,a,u,c,d,f,h){var p=B();try{return Vy(o,a,u,c,d,f,h)}catch(_){if(I(p),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function WI(o,a,u,c,d,f,h){var p=B();try{Iy(o,a,u,c,d,f,h)}catch(_){if(I(p),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function HI(o,a,u,c,d,f,h,p,_,m,b){var S=B();try{return Ty(o,a,u,c,d,f,h,p,_,m,b)}catch(F){if(I(S),F!==F+0&&F!=="longjmp")throw F;T(1,0)}}function YI(o,a,u,c,d,f,h,p,_){var m=B();try{Uy(o,a,u,c,d,f,h,p,_)}catch(b){if(I(m),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function $I(o,a,u,c,d,f,h,p,_,m,b,S,F,V,z){var ce=B();try{return Oy(o,a,u,c,d,f,h,p,_,m,b,S,F,V,z)}catch(je){if(I(ce),je!==je+0&&je!=="longjmp")throw je;T(1,0)}}function GI(o,a,u,c,d,f,h,p,_){var m=B();try{return Ry(o,a,u,c,d,f,h,p,_)}catch(b){if(I(m),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function KI(o,a,u,c,d,f,h,p){var _=B();try{ay(o,a,u,c,d,f,h,p)}catch(m){if(I(_),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function JI(o,a,u,c,d,f){var h=B();try{Ny(o,a,u,c,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function ZI(o,a,u,c,d,f,h,p,_){var m=B();try{Py(o,a,u,c,d,f,h,p,_)}catch(b){if(I(m),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function XI(o,a,u,c,d,f,h){var p=B();try{return qy(o,a,u,c,d,f,h)}catch(_){if(I(p),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function QI(o,a,u,c,d,f,h,p,_,m){var b=B();try{Wy(o,a,u,c,d,f,h,p,_,m)}catch(S){if(I(b),S!==S+0&&S!=="longjmp")throw S;T(1,0)}}function eT(o,a,u,c,d,f,h,p,_,m){var b=B();try{Hy(o,a,u,c,d,f,h,p,_,m)}catch(S){if(I(b),S!==S+0&&S!=="longjmp")throw S;T(1,0)}}function tT(o,a,u,c,d,f,h){var p=B();try{return zy(o,a,u,c,d,f,h)}catch(_){if(I(p),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function rT(o,a,u,c,d,f,h,p,_,m){var b=B();try{Yy(o,a,u,c,d,f,h,p,_,m)}catch(S){if(I(b),S!==S+0&&S!=="longjmp")throw S;T(1,0)}}function iT(o,a,u,c,d,f,h,p,_){var m=B();try{return xy(o,a,u,c,d,f,h,p,_)}catch(b){if(I(m),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function nT(o,a,u,c,d,f,h,p,_){var m=B();try{Ky(o,a,u,c,d,f,h,p,_)}catch(b){if(I(m),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function sT(o,a,u,c,d,f,h,p,_){var m=B();try{return Qy(o,a,u,c,d,f,h,p,_)}catch(b){if(I(m),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function oT(o,a,u,c,d,f,h,p,_){var m=B();try{nm(o,a,u,c,d,f,h,p,_)}catch(b){if(I(m),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function aT(o,a,u,c,d,f,h){var p=B();try{sm(o,a,u,c,d,f,h)}catch(_){if(I(p),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function uT(o,a,u,c,d,f,h){var p=B();try{return om(o,a,u,c,d,f,h)}catch(_){if(I(p),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function cT(o,a,u,c,d,f,h,p,_,m,b){var S=B();try{fm(o,a,u,c,d,f,h,p,_,m,b)}catch(F){if(I(S),F!==F+0&&F!=="longjmp")throw F;T(1,0)}}function lT(o,a,u,c,d,f,h,p,_,m,b,S,F){var V=B();try{hm(o,a,u,c,d,f,h,p,_,m,b,S,F)}catch(z){if(I(V),z!==z+0&&z!=="longjmp")throw z;T(1,0)}}function dT(o,a,u,c,d,f,h,p,_,m){var b=B();try{pm(o,a,u,c,d,f,h,p,_,m)}catch(S){if(I(b),S!==S+0&&S!=="longjmp")throw S;T(1,0)}}function fT(o,a,u,c,d,f,h,p,_,m,b,S,F){var V=B();try{ym(o,a,u,c,d,f,h,p,_,m,b,S,F)}catch(z){if(I(V),z!==z+0&&z!=="longjmp")throw z;T(1,0)}}function hT(o,a,u,c,d,f,h,p,_,m){var b=B();try{return am(o,a,u,c,d,f,h,p,_,m)}catch(S){if(I(b),S!==S+0&&S!=="longjmp")throw S;T(1,0)}}function pT(o,a,u,c,d,f,h,p,_,m,b,S){var F=B();try{return um(o,a,u,c,d,f,h,p,_,m,b,S)}catch(V){if(I(F),V!==V+0&&V!=="longjmp")throw V;T(1,0)}}function _T(o,a,u,c,d,f,h,p,_,m){var b=B();try{return cm(o,a,u,c,d,f,h,p,_,m)}catch(S){if(I(b),S!==S+0&&S!=="longjmp")throw S;T(1,0)}}function yT(o,a,u,c,d,f,h,p){var _=B();try{return lm(o,a,u,c,d,f,h,p)}catch(m){if(I(_),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function mT(o,a,u,c,d,f,h,p,_,m){var b=B();try{return dm(o,a,u,c,d,f,h,p,_,m)}catch(S){if(I(b),S!==S+0&&S!=="longjmp")throw S;T(1,0)}}function bT(o,a,u,c,d,f,h,p,_,m,b,S){var F=B();try{mm(o,a,u,c,d,f,h,p,_,m,b,S)}catch(V){if(I(F),V!==V+0&&V!=="longjmp")throw V;T(1,0)}}function gT(o,a,u,c,d,f,h,p,_,m,b,S,F){var V=B();try{bm(o,a,u,c,d,f,h,p,_,m,b,S,F)}catch(z){if(I(V),z!==z+0&&z!=="longjmp")throw z;T(1,0)}}function vT(o,a,u,c,d,f,h,p,_,m,b,S,F,V,z,ce){var je=B();try{gm(o,a,u,c,d,f,h,p,_,m,b,S,F,V,z,ce)}catch(Ke){if(I(je),Ke!==Ke+0&&Ke!=="longjmp")throw Ke;T(1,0)}}function wT(o,a,u,c,d,f,h,p,_,m,b,S,F,V,z,ce,je,Ke){var N=B();try{vm(o,a,u,c,d,f,h,p,_,m,b,S,F,V,z,ce,je,Ke)}catch(se){if(I(N),se!==se+0&&se!=="longjmp")throw se;T(1,0)}}function jT(o,a,u,c,d,f,h,p,_,m,b,S){var F=B();try{_m(o,a,u,c,d,f,h,p,_,m,b,S)}catch(V){if(I(F),V!==V+0&&V!=="longjmp")throw V;T(1,0)}}function BT(o,a,u,c,d,f,h,p,_,m,b){var S=B();try{return vb(o,a,u,c,d,f,h,p,_,m,b)}catch(F){if(I(S),F!==F+0&&F!=="longjmp")throw F;T(1,0)}}function IT(o,a,u,c,d,f,h,p,_){var m=B();try{return wb(o,a,u,c,d,f,h,p,_)}catch(b){if(I(m),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function TT(o,a,u,c,d,f,h,p,_,m,b,S){var F=B();try{wm(o,a,u,c,d,f,h,p,_,m,b,S)}catch(V){if(I(F),V!==V+0&&V!=="longjmp")throw V;T(1,0)}}function ST(o,a,u,c,d,f,h,p,_){var m=B();try{return Dm(o,a,u,c,d,f,h,p,_)}catch(b){if(I(m),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function DT(o,a,u,c,d,f,h){var p=B();try{return jm(o,a,u,c,d,f,h)}catch(_){if(I(p),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function AT(o,a,u,c,d,f,h){var p=B();try{return Bm(o,a,u,c,d,f,h)}catch(_){if(I(p),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function OT(o,a,u,c,d,f,h){var p=B();try{return Im(o,a,u,c,d,f,h)}catch(_){if(I(p),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function FT(o,a,u,c,d,f,h,p,_,m,b){var S=B();try{return Tm(o,a,u,c,d,f,h,p,_,m,b)}catch(F){if(I(S),F!==F+0&&F!=="longjmp")throw F;T(1,0)}}function kT(o,a,u,c,d,f,h,p,_,m,b,S,F,V,z){var ce=B();try{return Am(o,a,u,c,d,f,h,p,_,m,b,S,F,V,z)}catch(je){if(I(ce),je!==je+0&&je!=="longjmp")throw je;T(1,0)}}function MT(o,a,u,c,d,f,h,p,_){var m=B();try{return Om(o,a,u,c,d,f,h,p,_)}catch(b){if(I(m),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function CT(o,a,u,c,d,f,h,p,_,m,b,S){var F=B();try{return Fm(o,a,u,c,d,f,h,p,_,m,b,S)}catch(V){if(I(F),V!==V+0&&V!=="longjmp")throw V;T(1,0)}}function UT(o,a,u){var c=B();try{return km(o,a,u)}catch(d){if(I(c),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function VT(o,a){var u=B();try{return Mm(o,a)}catch(c){if(I(u),c!==c+0&&c!=="longjmp")throw c;T(1,0)}}function ET(o,a){var u=B();try{return Cm(o,a)}catch(c){if(I(u),c!==c+0&&c!=="longjmp")throw c;T(1,0)}}function RT(o,a,u,c,d,f,h){var p=B();try{return jb(o,a,u,c,d,f,h)}catch(_){if(I(p),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function NT(o,a,u,c,d,f){var h=B();try{return pb(o,a,u,c,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function PT(o,a,u,c,d,f,h,p,_){var m=B();try{return Rm(o,a,u,c,d,f,h,p,_)}catch(b){if(I(m),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function LT(o,a,u,c,d,f,h,p,_,m,b){var S=B();try{return Nm(o,a,u,c,d,f,h,p,_,m,b)}catch(F){if(I(S),F!==F+0&&F!=="longjmp")throw F;T(1,0)}}function xT(o,a,u,c,d,f,h,p,_,m){var b=B();try{Jy(o,a,u,c,d,f,h,p,_,m)}catch(S){if(I(b),S!==S+0&&S!=="longjmp")throw S;T(1,0)}}function qT(o,a,u,c,d,f,h){var p=B();try{return Vm(o,a,u,c,d,f,h)}catch(_){if(I(p),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function zT(o,a,u,c,d,f,h,p){var _=B();try{return Um(o,a,u,c,d,f,h,p)}catch(m){if(I(_),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function WT(o,a,u,c,d,f,h,p,_,m,b,S,F,V,z,ce,je){var Ke=B();try{Em(o,a,u,c,d,f,h,p,_,m,b,S,F,V,z,ce,je)}catch(N){if(I(Ke),N!==N+0&&N!=="longjmp")throw N;T(1,0)}}function HT(o,a,u,c,d,f,h,p,_,m,b,S){var F=B();try{return Pm(o,a,u,c,d,f,h,p,_,m,b,S)}catch(V){if(I(F),V!==V+0&&V!=="longjmp")throw V;T(1,0)}}function YT(o,a,u,c,d,f,h,p,_){var m=B();try{xm(o,a,u,c,d,f,h,p,_)}catch(b){if(I(m),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function $T(o,a,u,c,d,f,h,p,_,m){var b=B();try{return _b(o,a,u,c,d,f,h,p,_,m)}catch(S){if(I(b),S!==S+0&&S!=="longjmp")throw S;T(1,0)}}function GT(o,a,u,c,d,f,h,p,_,m){var b=B();try{qm(o,a,u,c,d,f,h,p,_,m)}catch(S){if(I(b),S!==S+0&&S!=="longjmp")throw S;T(1,0)}}function KT(o,a,u,c,d,f,h,p){var _=B();try{return zm(o,a,u,c,d,f,h,p)}catch(m){if(I(_),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function JT(o,a,u,c,d,f,h,p,_,m,b,S,F){var V=B();try{return Wm(o,a,u,c,d,f,h,p,_,m,b,S,F)}catch(z){if(I(V),z!==z+0&&z!=="longjmp")throw z;T(1,0)}}function ZT(o,a,u,c,d,f,h,p){var _=B();try{return Hm(o,a,u,c,d,f,h,p)}catch(m){if(I(_),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function XT(o,a,u,c,d,f,h,p,_){var m=B();try{return yb(o,a,u,c,d,f,h,p,_)}catch(b){if(I(m),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function QT(o,a,u,c,d,f,h,p,_,m,b,S,F,V){var z=B();try{return mb(o,a,u,c,d,f,h,p,_,m,b,S,F,V)}catch(ce){if(I(z),ce!==ce+0&&ce!=="longjmp")throw ce;T(1,0)}}function eS(o,a,u,c,d,f,h,p,_,m,b){var S=B();try{Qm(o,a,u,c,d,f,h,p,_,m,b)}catch(F){if(I(S),F!==F+0&&F!=="longjmp")throw F;T(1,0)}}function tS(o,a,u,c,d){var f=B();try{return eb(o,a,u,c,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function rS(o,a,u){var c=B();try{return Gm(o,a,u)}catch(d){if(I(c),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function iS(o,a,u,c,d,f,h){var p=B();try{Xm(o,a,u,c,d,f,h)}catch(_){if(I(p),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function nS(o,a,u,c,d,f,h,p,_,m,b,S,F,V,z){var ce=B();try{$m(o,a,u,c,d,f,h,p,_,m,b,S,F,V,z)}catch(je){if(I(ce),je!==je+0&&je!=="longjmp")throw je;T(1,0)}}function sS(o,a,u,c,d){var f=B();try{return Km(o,a,u,c,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function oS(o,a,u,c,d){var f=B();try{Jm(o,a,u,c,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function aS(o,a,u,c,d,f,h,p,_,m,b,S){var F=B();try{return Zm(o,a,u,c,d,f,h,p,_,m,b,S)}catch(V){if(I(F),V!==V+0&&V!=="longjmp")throw V;T(1,0)}}function uS(o,a,u,c,d,f,h,p,_,m){var b=B();try{return tb(o,a,u,c,d,f,h,p,_,m)}catch(S){if(I(b),S!==S+0&&S!=="longjmp")throw S;T(1,0)}}function cS(o,a,u,c,d,f,h,p,_,m){var b=B();try{return rb(o,a,u,c,d,f,h,p,_,m)}catch(S){if(I(b),S!==S+0&&S!=="longjmp")throw S;T(1,0)}}function lS(o,a,u,c,d,f,h,p,_,m){var b=B();try{ib(o,a,u,c,d,f,h,p,_,m)}catch(S){if(I(b),S!==S+0&&S!=="longjmp")throw S;T(1,0)}}function dS(o,a,u,c,d,f,h,p,_,m){var b=B();try{nb(o,a,u,c,d,f,h,p,_,m)}catch(S){if(I(b),S!==S+0&&S!=="longjmp")throw S;T(1,0)}}function fS(o,a,u,c,d,f,h,p,_,m,b){var S=B();try{sb(o,a,u,c,d,f,h,p,_,m,b)}catch(F){if(I(S),F!==F+0&&F!=="longjmp")throw F;T(1,0)}}function hS(o,a,u,c,d,f,h,p,_,m,b){var S=B();try{ob(o,a,u,c,d,f,h,p,_,m,b)}catch(F){if(I(S),F!==F+0&&F!=="longjmp")throw F;T(1,0)}}function pS(o,a,u,c,d,f,h,p,_,m,b){var S=B();try{return ab(o,a,u,c,d,f,h,p,_,m,b)}catch(F){if(I(S),F!==F+0&&F!=="longjmp")throw F;T(1,0)}}function _S(o,a,u,c,d,f,h,p,_,m,b){var S=B();try{return lb(o,a,u,c,d,f,h,p,_,m,b)}catch(F){if(I(S),F!==F+0&&F!=="longjmp")throw F;T(1,0)}}function yS(o,a,u,c,d,f,h,p){var _=B();try{return cb(o,a,u,c,d,f,h,p)}catch(m){if(I(_),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function mS(o,a,u,c,d,f,h,p,_,m,b){var S=B();try{return ub(o,a,u,c,d,f,h,p,_,m,b)}catch(F){if(I(S),F!==F+0&&F!=="longjmp")throw F;T(1,0)}}function bS(o,a,u,c,d,f,h,p,_,m,b,S){var F=B();try{return db(o,a,u,c,d,f,h,p,_,m,b,S)}catch(V){if(I(F),V!==V+0&&V!=="longjmp")throw V;T(1,0)}}function gS(o,a,u,c,d,f,h,p,_,m){var b=B();try{return fb(o,a,u,c,d,f,h,p,_,m)}catch(S){if(I(b),S!==S+0&&S!=="longjmp")throw S;T(1,0)}}function vS(o,a,u,c,d){var f=B();try{return hb(o,a,u,c,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function wS(o,a,u,c,d,f,h,p,_,m){var b=B();try{return bb(o,a,u,c,d,f,h,p,_,m)}catch(S){if(I(b),S!==S+0&&S!=="longjmp")throw S;T(1,0)}}function jS(o,a,u,c,d,f,h,p,_){var m=B();try{return gb(o,a,u,c,d,f,h,p,_)}catch(b){if(I(m),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function BS(o,a,u,c,d,f,h,p){var _=B();try{return Bb(o,a,u,c,d,f,h,p)}catch(m){if(I(_),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function IS(o,a,u,c,d,f,h,p,_){var m=B();try{Ib(o,a,u,c,d,f,h,p,_)}catch(b){if(I(m),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function TS(o,a,u,c,d,f,h){var p=B();try{return Tb(o,a,u,c,d,f,h)}catch(_){if(I(p),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function SS(o,a,u,c){var d=B();try{return Sb(o,a,u,c)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function DS(o,a,u,c,d,f,h,p,_,m,b,S,F){var V=B();try{Db(o,a,u,c,d,f,h,p,_,m,b,S,F)}catch(z){if(I(V),z!==z+0&&z!=="longjmp")throw z;T(1,0)}}function AS(o,a,u,c,d,f,h,p,_){var m=B();try{Gy(o,a,u,c,d,f,h,p,_)}catch(b){if(I(m),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function OS(o,a,u,c,d,f,h,p){var _=B();try{return Ab(o,a,u,c,d,f,h,p)}catch(m){if(I(_),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function FS(o,a,u,c,d,f,h,p){var _=B();try{return Ob(o,a,u,c,d,f,h,p)}catch(m){if(I(_),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function kS(o,a,u,c,d,f,h,p,_){var m=B();try{Fb(o,a,u,c,d,f,h,p,_)}catch(b){if(I(m),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function MS(o,a,u,c,d,f,h){var p=B();try{return kb(o,a,u,c,d,f,h)}catch(_){if(I(p),_!==_+0&&_!=="longjmp")throw _;T(1,0)}}function CS(o,a,u,c,d,f,h,p){var _=B();try{return Mb(o,a,u,c,d,f,h,p)}catch(m){if(I(_),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function US(o,a,u,c,d,f,h,p,_,m){var b=B();try{Cb(o,a,u,c,d,f,h,p,_,m)}catch(S){if(I(b),S!==S+0&&S!=="longjmp")throw S;T(1,0)}}function VS(o,a,u,c,d,f,h,p,_){var m=B();try{Ub(o,a,u,c,d,f,h,p,_)}catch(b){if(I(m),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function ES(o,a,u,c,d,f,h,p,_){var m=B();try{Vb(o,a,u,c,d,f,h,p,_)}catch(b){if(I(m),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function RS(o,a,u,c,d,f,h,p){var _=B();try{Eb(o,a,u,c,d,f,h,p)}catch(m){if(I(_),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function NS(o,a,u,c,d,f,h,p,_,m,b,S){var F=B();try{Pb(o,a,u,c,d,f,h,p,_,m,b,S)}catch(V){if(I(F),V!==V+0&&V!=="longjmp")throw V;T(1,0)}}function PS(o,a,u,c,d,f){var h=B();try{return Ym(o,a,u,c,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function LS(o,a,u,c,d,f,h,p,_,m){var b=B();try{xb(o,a,u,c,d,f,h,p,_,m)}catch(S){if(I(b),S!==S+0&&S!=="longjmp")throw S;T(1,0)}}function xS(o,a,u,c,d,f,h,p,_,m,b){var S=B();try{return zb(o,a,u,c,d,f,h,p,_,m,b)}catch(F){if(I(S),F!==F+0&&F!=="longjmp")throw F;T(1,0)}}function qS(o,a,u,c,d,f,h,p,_,m,b){var S=B();try{Lb(o,a,u,c,d,f,h,p,_,m,b)}catch(F){if(I(S),F!==F+0&&F!=="longjmp")throw F;T(1,0)}}function zS(o,a,u,c,d,f,h,p,_,m,b,S,F){var V=B();try{qb(o,a,u,c,d,f,h,p,_,m,b,S,F)}catch(z){if(I(V),z!==z+0&&z!=="longjmp")throw z;T(1,0)}}function WS(o,a,u,c,d,f,h,p,_,m,b,S,F){var V=B();try{Wb(o,a,u,c,d,f,h,p,_,m,b,S,F)}catch(z){if(I(V),z!==z+0&&z!=="longjmp")throw z;T(1,0)}}function HS(o,a,u,c,d,f,h,p,_,m){var b=B();try{return Hb(o,a,u,c,d,f,h,p,_,m)}catch(S){if(I(b),S!==S+0&&S!=="longjmp")throw S;T(1,0)}}function YS(o,a,u,c,d,f,h,p,_,m){var b=B();try{return Qb(o,a,u,c,d,f,h,p,_,m)}catch(S){if(I(b),S!==S+0&&S!=="longjmp")throw S;T(1,0)}}function $S(o,a,u,c,d,f,h,p,_,m,b,S,F){var V=B();try{Yb(o,a,u,c,d,f,h,p,_,m,b,S,F)}catch(z){if(I(V),z!==z+0&&z!=="longjmp")throw z;T(1,0)}}function GS(o,a,u,c,d,f,h,p,_,m){var b=B();try{$b(o,a,u,c,d,f,h,p,_,m)}catch(S){if(I(b),S!==S+0&&S!=="longjmp")throw S;T(1,0)}}function KS(o,a,u,c,d,f,h,p,_){var m=B();try{Gb(o,a,u,c,d,f,h,p,_)}catch(b){if(I(m),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function JS(o,a,u,c,d,f){var h=B();try{return Kb(o,a,u,c,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function ZS(o,a,u,c,d,f,h,p,_){var m=B();try{eg(o,a,u,c,d,f,h,p,_)}catch(b){if(I(m),b!==b+0&&b!=="longjmp")throw b;T(1,0)}}function XS(o,a,u,c,d,f,h,p,_,m,b,S,F,V){var z=B();try{Zb(o,a,u,c,d,f,h,p,_,m,b,S,F,V)}catch(ce){if(I(z),ce!==ce+0&&ce!=="longjmp")throw ce;T(1,0)}}function QS(o,a,u,c,d,f,h,p,_,m,b){var S=B();try{Xb(o,a,u,c,d,f,h,p,_,m,b)}catch(F){if(I(S),F!==F+0&&F!=="longjmp")throw F;T(1,0)}}function eD(o,a,u,c,d,f,h,p,_,m){var b=B();try{Jb(o,a,u,c,d,f,h,p,_,m)}catch(S){if(I(b),S!==S+0&&S!=="longjmp")throw S;T(1,0)}}t.ccall=wi;var iu;function nu(o){this.name="ExitStatus",this.message="Program terminated with exit("+o+")",this.status=o}var tD=!1;It=function o(){iu||ef(),iu||(It=o)};function rD(o){var a=t._main,u=0,c=0;try{var d=a(u,c);return iD(d,!0),d}catch(f){return Bl(f)}finally{tD=!0}}function ef(o){if(o=o||y,ti>0||(yl(),ti>0))return;function a(){iu||(iu=!0,t.calledRun=!0,!wo&&(ml(),bl(),i(t),t.onRuntimeInitialized&&t.onRuntimeInitialized(),tg&&rD(o),vl()))}t.setStatus?(t.setStatus("Running..."),setTimeout(function(){setTimeout(function(){t.setStatus("")},1),a()},1)):a()}t.run=ef;function iD(o,a){Gn=o,Fo()||gl(),nD(o)}function nD(o){Gn=o,Fo()||(t.onExit&&t.onExit(o),wo=!0),D(o,new nu(o))}if(t.preInit)for(typeof t.preInit=="function"&&(t.preInit=[t.preInit]);t.preInit.length>0;)t.preInit.pop()();var tg=!0;return t.noInitialRun&&(tg=!1),ef(),e.ready}}(),O1=CU;var Ra=class extends B_{constructor(e,t,i,n){super(e,t);this.mainModuleURL=i,this.pthreadWorkerURL=n}locateFile(e,t){if(e.endsWith(".wasm"))return this.mainModuleURL;if(e.endsWith(".worker.js")){if(!this.pthreadWorkerURL)throw new Error("Missing DuckDB worker URL!");return this.pthreadWorkerURL}throw new Error(`WASM instantiation requested unexpected file: prefix=${t} path=${e}`)}instantiateWasm(e,t){if(globalThis.DUCKDB_RUNTIME=this._runtime,WebAssembly.instantiateStreaming){let i=new Request(this.mainModuleURL);WebAssembly.instantiateStreaming(fetch(i),e).then(n=>{t(n.instance,n.module)})}else{let i=new Request(this.mainModuleURL);fetch(i).then(n=>n.arrayBuffer()).then(n=>WebAssembly.instantiate(n,e).then(s=>{t(s.instance,s.module)})).catch(n=>{console.error("Failed to instantiate WASM:",n)})}return[]}};var k_=class extends Ra{constructor(e,t,i,n=null){super(e,t,i,n)}instantiateImpl(e){return O1(ms(ri({},e),{instantiateWasm:this.instantiateWasm.bind(this),locateFile:this.locateFile.bind(this)}))}};var UU=function(){var r=import.meta.url;return function(e){e=e||{};var t=typeof e!="undefined"?e:{},i,n;t.ready=new Promise(function(g,j){i=g,n=j});var s={},l;for(l in t)t.hasOwnProperty(l)&&(s[l]=t[l]);var y=[],w="./this.program",D=function(g,j){throw j},k=typeof window=="object",Y=typeof importScripts=="function",J=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",ie="";function Ye(g){return t.locateFile?t.locateFile(g,ie):ie+g}var Re,Rt,at,fn;function cl(g){if(!(g instanceof ys)){var j=g;_t("exiting due to exception: "+j)}}var zt,Wt;J?(Y?ie=Hn().dirname(ie)+"/":ie=__dirname+"/",Re=function(j,A){return zt||(zt=Ea()),Wt||(Wt=Hn()),j=Wt.normalize(j),zt.readFileSync(j,A?null:"utf8")},at=function(j){var A=Re(j,!0);return A.buffer||(A=new Uint8Array(A)),Qr(A.buffer),A},Rt=function(j,A,C){zt||(zt=Ea()),Wt||(Wt=Hn()),j=Wt.normalize(j),zt.readFile(j,function(R,X){R?C(R):A(X.buffer)})},process.argv.length>1&&(w=process.argv[1].replace(/\\/g,"/")),y=process.argv.slice(2),process.on("uncaughtException",function(g){if(!(g instanceof ys))throw g}),process.on("unhandledRejection",function(g){throw g}),D=function(g,j){if(Oo())throw process.exitCode=g,j;cl(j),process.exit(g)},t.inspect=function(){return"[Emscripten Module object]"}):(k||Y)&&(Y?ie=self.location.href:typeof document!="undefined"&&document.currentScript&&(ie=document.currentScript.src),r&&(ie=r),ie.indexOf("blob:")!==0?ie=ie.substr(0,ie.replace(/[?#].*/,"").lastIndexOf("/")+1):ie="",Re=function(g){var j=new XMLHttpRequest;return j.open("GET",g,!1),j.send(null),j.responseText},Y&&(at=function(g){var j=new XMLHttpRequest;return j.open("GET",g,!1),j.responseType="arraybuffer",j.send(null),new Uint8Array(j.response)}),Rt=function(g,j,A){var C=new XMLHttpRequest;C.open("GET",g,!0),C.responseType="arraybuffer",C.onload=function(){if(C.status==200||C.status==0&&C.response){j(C.response);return}A()},C.onerror=A,C.send(null)},fn=function(g){document.title=g});var ll=t.print||console.log.bind(console),_t=t.printErr||console.warn.bind(console);for(l in s)s.hasOwnProperty(l)&&(t[l]=s[l]);s=null,t.arguments&&(y=t.arguments),t.thisProgram&&(w=t.thisProgram),t.quit&&(D=t.quit);var vi;t.wasmBinary&&(vi=t.wasmBinary);var yt=t.noExitRuntime||!0;typeof WebAssembly!="object"&&It("no native wasm support detected");var Yn,Xr=!1,$n;function Qr(g,j){g||It("Assertion failed: "+j)}function wo(g){var j=t["_"+g];return Qr(j,"Cannot call unknown function "+g+", make sure it is exported"),j}function Gn(g,j,A,C,R){var X={string:function(ze){var T=0;if(ze!=null&&ze!==0){var Ft=(ze.length<<2)+1;T=Ho(Ft),Kn(ze,T,Ft)}return T},array:function(ze){var T=Ho(ze.length);return Bo(ze,T),T}};function $(ze){return j==="string"?wi(ze):j==="boolean"?Boolean(ze):ze}var H=wo(g),ae=[],Fe=0;if(C)for(var ke=0;ke<C.length;ke++){var Tt=X[A[ke]];Tt?(Fe===0&&(Fe=eu()),ae[ke]=Tt(C[ke])):ae[ke]=C[ke]}var B=H.apply(null,ae);function I(ze){return Fe!==0&&tu(Fe),$(ze)}return B=I(B),B}var hn=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):void 0;function Na(g,j,A){for(var C=j+A,R=j;g[R]&&!(R>=C);)++R;if(R-j>16&&g.subarray&&hn)return hn.decode(g.subarray(j,R));for(var X="";j<R;){var $=g[j++];if(!($&128)){X+=String.fromCharCode($);continue}var H=g[j++]&63;if(($&224)==192){X+=String.fromCharCode(($&31)<<6|H);continue}var ae=g[j++]&63;if(($&240)==224?$=($&15)<<12|H<<6|ae:$=($&7)<<18|H<<12|ae<<6|g[j++]&63,$<65536)X+=String.fromCharCode($);else{var Fe=$-65536;X+=String.fromCharCode(55296|Fe>>10,56320|Fe&1023)}}return X}function wi(g,j){return g?Na(Ar,g,j):""}function jo(g,j,A,C){if(!(C>0))return 0;for(var R=A,X=A+C-1,$=0;$<g.length;++$){var H=g.charCodeAt($);if(H>=55296&&H<=57343){var ae=g.charCodeAt(++$);H=65536+((H&1023)<<10)|ae&1023}if(H<=127){if(A>=X)break;j[A++]=H}else if(H<=2047){if(A+1>=X)break;j[A++]=192|H>>6,j[A++]=128|H&63}else if(H<=65535){if(A+2>=X)break;j[A++]=224|H>>12,j[A++]=128|H>>6&63,j[A++]=128|H&63}else{if(A+3>=X)break;j[A++]=240|H>>18,j[A++]=128|H>>12&63,j[A++]=128|H>>6&63,j[A++]=128|H&63}}return j[A]=0,A-R}function Kn(g,j,A){return jo(g,Ar,j,A)}function ji(g){for(var j=0,A=0;A<g.length;++A){var C=g.charCodeAt(A);C>=55296&&C<=57343&&(C=65536+((C&1023)<<10)|g.charCodeAt(++A)&1023),C<=127?++j:C<=2047?j+=2:C<=65535?j+=3:j+=4}return j}function Bo(g,j){Bi.set(g,j)}function Io(g,j,A){for(var C=0;C<g.length;++C)Bi[j++>>0]=g.charCodeAt(C);A||(Bi[j>>0]=0)}function dl(g,j){return g%j>0&&(g+=j-g%j),g}var To,Bi,Ar,Ii,Ht,Q,pn,Pa,K;function La(g){To=g,t.HEAP8=Bi=new Int8Array(g),t.HEAP16=Ii=new Int16Array(g),t.HEAP32=Q=new Int32Array(g),t.HEAPU8=Ar=new Uint8Array(g),t.HEAPU16=Ht=new Uint16Array(g),t.HEAPU32=pn=new Uint32Array(g),t.HEAPF32=Pa=new Float32Array(g),t.HEAPF64=K=new Float64Array(g)}var C_=t.INITIAL_MEMORY||16777216,So,Do=[],fl=[],ne=[],Ao=[],xa=!1,hl=!1,qa=0;function Oo(){return yt||qa>0}function pl(){if(t.preRun)for(typeof t.preRun=="function"&&(t.preRun=[t.preRun]);t.preRun.length;)bl(t.preRun.shift());yn(Do)}function _l(){xa=!0,yn(fl)}function Fo(){yn(ne)}function yl(){hl=!0}function ml(){if(t.postRun)for(typeof t.postRun=="function"&&(t.postRun=[t.postRun]);t.postRun.length;)vl(t.postRun.shift());yn(Ao)}function bl(g){Do.unshift(g)}function gl(g){fl.unshift(g)}function vl(g){Ao.unshift(g)}var ei=0,ko=null,_n=null;function ti(g){ei++,t.monitorRunDependencies&&t.monitorRunDependencies(ei)}function Mo(g){if(ei--,t.monitorRunDependencies&&t.monitorRunDependencies(ei),ei==0&&(ko!==null&&(clearInterval(ko),ko=null),_n)){var j=_n;_n=null,j()}}t.preloadedImages={},t.preloadedAudios={};function It(g){t.onAbort&&t.onAbort(g),g="Aborted("+g+")",_t(g),Xr=!0,$n=1,g+=". Build with -s ASSERTIONS=1 for more info.";var j=new WebAssembly.RuntimeError(g);throw n(j),j}var wl="data:application/octet-stream;base64,";function za(g){return g.startsWith(wl)}var qe;t.locateFile?(qe="./duckdb-eh.wasm",za(qe)||(qe=Ye(qe))):qe=new URL("./duckdb-eh.wasm",import.meta.url).toString();function Wa(g){try{if(g==qe&&vi)return new Uint8Array(vi);if(at)return at(g);throw"both async and sync fetching of the wasm failed"}catch(j){It(j)}}function Ha(){return!vi&&(k||Y)&&typeof fetch=="function"?fetch(qe,{credentials:"same-origin"}).then(function(g){if(!g.ok)throw"failed to load wasm binary file at '"+qe+"'";return g.arrayBuffer()}).catch(function(){return Wa(qe)}):Promise.resolve().then(function(){return Wa(qe)})}function Nt(){var g={a:bd};function j($,H){var ae=$.exports;t.asm=ae,Yn=t.asm.fa,La(Yn.buffer),So=t.asm.ia,gl(t.asm.ga),Mo("wasm-instantiate")}ti("wasm-instantiate");function A($){j($.instance)}function C($){return Ha().then(function(H){return WebAssembly.instantiate(H,g)}).then(function(H){return H}).then($,function(H){_t("failed to asynchronously prepare wasm: "+H),It(H)})}function R(){return!vi&&typeof WebAssembly.instantiateStreaming=="function"&&!za(qe)&&typeof fetch=="function"?fetch(qe,{credentials:"same-origin"}).then(function($){var H=WebAssembly.instantiateStreaming($,g);return H.then(A,function(ae){return _t("wasm streaming compile failed: "+ae),_t("falling back to ArrayBuffer instantiation"),C(A)})}):C(A)}if(t.instantiateWasm)try{var X=t.instantiateWasm(g,j);return X}catch($){return _t("Module.instantiateWasm callback failed with error: "+$),!1}return R().catch(n),{}}function yn(g){for(;g.length>0;){var j=g.shift();if(typeof j=="function"){j(t);continue}var A=j.func;typeof A=="number"?j.arg===void 0?So.get(A)():So.get(A)(j.arg):A(j.arg===void 0?null:j.arg)}}function jl(g){if(g instanceof ys||g=="unwind")return $n;D(1,g)}var ut={mappings:{},buffers:[null,[],[]],printChar:function(g,j){var A=ut.buffers[g];j===0||j===10?((g===1?ll:_t)(Na(A,0)),A.length=0):A.push(j)},varargs:void 0,get:function(){ut.varargs+=4;var g=Q[ut.varargs-4>>2];return g},getStr:function(g){var j=wi(g);return j},get64:function(g,j){return g}};function Jn(g,j,A,C,R){}function Bl(g,j){return g=ut.getStr(g),ut.doAccess(g,j)}function Il(){_t("missing function: $SOCKFS"),It(-1)}function Or(){_t("missing function: $FS"),It(-1)}function Yt(g){var j=Il.getSocket(g);if(!j)throw new Or.ErrnoError(8);return j}function Zn(g){return Q[Qa()>>2]=g,g}function Co(g){return(g&255)+"."+(g>>8&255)+"."+(g>>16&255)+"."+(g>>24&255)}function mn(g){var j="",A=0,C=0,R=0,X=0,$=0,H=0,ae=[g[0]&65535,g[0]>>16,g[1]&65535,g[1]>>16,g[2]&65535,g[2]>>16,g[3]&65535,g[3]>>16],Fe=!0,ke="";for(H=0;H<5;H++)if(ae[H]!==0){Fe=!1;break}if(Fe){if(ke=Co(ae[6]|ae[7]<<16),ae[5]===-1)return j="::ffff:",j+=ke,j;if(ae[5]===0)return j="::",ke==="0.0.0.0"&&(ke=""),ke==="0.0.0.1"&&(ke="1"),j+=ke,j}for(A=0;A<8;A++)ae[A]===0&&(A-R>1&&($=0),R=A,$++),$>C&&(C=$,X=A-C+1);for(A=0;A<8;A++){if(C>1&&ae[A]===0&&A>=X&&A<X+C){A===X&&(j+=":",X===0&&(j+=":"));continue}j+=Number(Wo(ae[A]&65535)).toString(16),j+=A<7?":":""}return j}function Ya(g,j){var A=Ii[g>>1],C=Wo(Ht[g+2>>1]),R;switch(A){case 2:if(j!==16)return{errno:28};R=Q[g+4>>2],R=Co(R);break;case 10:if(j!==28)return{errno:28};R=[Q[g+8>>2],Q[g+12>>2],Q[g+16>>2],Q[g+20>>2]],R=mn(R);break;default:return{errno:5}}return{family:A,addr:R,port:C}}function Zt(g,j,A){if(A&&g===0)return null;var C=Ya(g,j);if(C.errno)throw new Or.ErrnoError(C.errno);return C.addr=Ue.lookup_addr(C.addr)||C.addr,C}function $a(g,j,A){var C=Yt(g),R=Zt(j,A);return C.sock_ops.bind(C,R.addr,R.port),0}function Tl(g,j,A){var C=Yt(g),R=Zt(j,A);return C.sock_ops.connect(C,R.addr,R.port),0}function Sl(g,j,A){return ut.varargs=A,0}function Dl(g,j){}function Al(g,j,A,C){}function Ol(g,j,A){}function Xn(g){for(var j=g.split("."),A=0;A<4;A++){var C=Number(j[A]);if(isNaN(C))return null;j[A]=C}return(j[0]|j[1]<<8|j[2]<<16|j[3]<<24)>>>0}function Qn(g){return parseInt(g)}function Uo(g){var j,A,C,R,X=/^((?=.*::)(?!.*::.+::)(::)?([\dA-F]{1,4}:(:|\b)|){5}|([\dA-F]{1,4}:){6})((([\dA-F]{1,4}((?!\3)::|:\b|$))|(?!\2\3)){2}|(((2[0-4]|1\d|[1-9])?\d|25[0-5])\.?\b){4})$/i,$=[];if(!X.test(g))return null;if(g==="::")return[0,0,0,0,0,0,0,0];for(g.startsWith("::")?g=g.replace("::","Z:"):g=g.replace("::",":Z:"),g.indexOf(".")>0?(g=g.replace(new RegExp("[.]","g"),":"),j=g.split(":"),j[j.length-4]=Qn(j[j.length-4])+Qn(j[j.length-3])*256,j[j.length-3]=Qn(j[j.length-2])+Qn(j[j.length-1])*256,j=j.slice(0,j.length-2)):j=g.split(":"),C=0,R=0,A=0;A<j.length;A++)if(typeof j[A]=="string")if(j[A]==="Z"){for(R=0;R<8-j.length+1;R++)$[A+R]=0;C=R-1}else $[A+C]=ps(parseInt(j[A],16));else $[A+C]=j[A];return[$[1]<<16|$[0],$[3]<<16|$[2],$[5]<<16|$[4],$[7]<<16|$[6]]}function Ga(g,j){Ar.fill(0,g,g+j)}function Vo(g,j,A,C,R){switch(j){case 2:A=Xn(A),Ga(g,16),R&&(Q[R>>2]=16),Ii[g>>1]=j,Q[g+4>>2]=A,Ii[g+2>>1]=ps(C);break;case 10:A=Uo(A),Ga(g,28),R&&(Q[R>>2]=28),Q[g>>2]=j,Q[g+8>>2]=A[0],Q[g+12>>2]=A[1],Q[g+16>>2]=A[2],Q[g+20>>2]=A[3],Ii[g+2>>1]=ps(C);break;default:return 5}return 0}var Ue={address_map:{id:1,addrs:{},names:{}},lookup_name:function(g){var j=Xn(g);if(j!==null||(j=Uo(g),j!==null))return g;var A;if(Ue.address_map.addrs[g])A=Ue.address_map.addrs[g];else{var C=Ue.address_map.id++;Qr(C<65535,"exceeded max address mappings of 65535"),A="172.29."+(C&255)+"."+(C&65280),Ue.address_map.names[A]=g,Ue.address_map.addrs[g]=A}return A},lookup_addr:function(g){return Ue.address_map.names[g]?Ue.address_map.names[g]:null}};function Fl(g,j,A){var C=Yt(g);if(!C.daddr)return-53;var R=Vo(j,C.family,Ue.lookup_name(C.daddr),C.dport,A);return 0}function kl(){return 42}function Ml(g,j,A,C,R){var X=Yt(g);return j===1&&A===4?(Q[C>>2]=X.error,Q[R>>2]=4,X.error=null,0):-50}function Ka(g,j,A){return ut.varargs=A,0}function Ti(g,j,A){return 0}function Cl(g,j){return g=ut.getStr(g),ut.doMkdir(g,j)}function Eo(g,j,A){ut.varargs=A}function Ja(g,j,A,C,R,X){var $=Yt(g),H=$.sock_ops.recvmsg($,A);if(!H)return 0;if(R)var ae=Vo(R,$.family,Ue.lookup_name(H.addr),H.port,X);return Ar.set(H.buffer,j),H.buffer.byteLength}function Za(g,j){}function Xa(g){}function Ul(g,j,A,C,R,X){}function Vl(g){return-50}function El(g,j){return Yt(g),-52}function Rl(g,j,A){}function Nl(g,j){}function Pl(g){}function es(g,j){It("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")}function ts(g,j){It("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")}function Ro(){It("")}var rs;J?rs=function(){var g=process.hrtime();return g[0]*1e3+g[1]/1e6}:rs=function(){return performance.now()};var No=!0;function Pt(g,j){var A;if(g===0)A=Date.now();else if((g===1||g===4)&&No)A=rs();else return Zn(28),-1;return Q[j>>2]=A/1e3|0,Q[j+4>>2]=A%1e3*1e3*1e3|0,0}function Ll(g,j){return globalThis.DUCKDB_RUNTIME.createDirectory(t,g,j)}function xl(g,j){return globalThis.DUCKDB_RUNTIME.checkDirectory(t,g,j)}function ql(g,j){return globalThis.DUCKDB_RUNTIME.listDirectoryEntries(t,g,j)}function zl(g,j){return globalThis.DUCKDB_RUNTIME.removeDirectory(t,g,j)}function Wl(g){return globalThis.DUCKDB_RUNTIME.closeFile(t,g)}function Hl(g,j){return globalThis.DUCKDB_RUNTIME.checkFile(t,g,j)}function Yl(g){return globalThis.DUCKDB_RUNTIME.getLastFileModificationTime(t,g)}function $l(g,j,A,C){return globalThis.DUCKDB_RUNTIME.moveFile(t,g,j,A,C)}function Gl(g){return globalThis.DUCKDB_RUNTIME.openFile(t,g)}function Kl(g,j,A,C){return globalThis.DUCKDB_RUNTIME.readFile(t,g,j,A,C)}function Jl(g,j){return globalThis.DUCKDB_RUNTIME.truncateFile(t,g,j)}function Zl(g,j,A,C){return globalThis.DUCKDB_RUNTIME.writeFile(t,g,j,A,C)}function Xl(g,j){return globalThis.DUCKDB_RUNTIME.glob(t,g,j)}function Ql(g){return globalThis.DUCKDB_RUNTIME.testPlatformFeature(t,g)}function ed(){return 2147483648}function td(g,j,A){Ar.copyWithin(g,j,j+A)}function rd(g){try{return Yn.grow(g-To.byteLength+65535>>>16),La(Yn.buffer),1}catch(j){}}function id(g){var j=Ar.length;g=g>>>0;var A=2147483648;if(g>A)return!1;for(var C=1;C<=4;C*=2){var R=j*(1+.2/C);R=Math.min(R,g+100663296);var X=Math.min(A,dl(Math.max(g,R),65536)),$=rd(X);if($)return!0}return!1}var Po={};function Lo(){return w||"./this.program"}function bn(){if(!bn.strings){var g=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",j={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:g,_:Lo()};for(var A in Po)Po[A]===void 0?delete j[A]:j[A]=Po[A];var C=[];for(var A in j)C.push(A+"="+j[A]);bn.strings=C}return bn.strings}function nd(g,j){var A=0;return bn().forEach(function(C,R){var X=j+A;Q[g+R*4>>2]=X,Io(C,X),A+=C.length+1}),0}function sd(g,j){var A=bn();Q[g>>2]=A.length;var C=0;return A.forEach(function(R){C+=R.length+1}),Q[j>>2]=C,0}function od(g){return 0}function ad(g,j){var A=g==1||g==2?2:It();return Bi[j>>0]=A,0}function ud(g,j,A,C,R,X){var $=ut.getStreamFromFD(g),H=ut.doReadv($,j,A,C);return Q[X>>2]=H,0}function cd(g,j,A,C,R,X){var $=ut.getStreamFromFD(g),H=ut.doWritev($,j,A,C);return Q[X>>2]=H,0}function ld(g,j,A,C){var R=ut.getStreamFromFD(g),X=ut.doReadv(R,j,A);return Q[C>>2]=X,0}function dd(g,j,A,C,R){}function fd(g){var j=ut.getStreamFromFD(g);return j.stream_ops&&j.stream_ops.fsync?-j.stream_ops.fsync(j):0}function hd(g,j,A,C){for(var R=0,X=0;X<A;X++){for(var $=Q[j+X*8>>2],H=Q[j+(X*8+4)>>2],ae=0;ae<H;ae++)ut.printChar(g,Ar[$+ae]);R+=H}return Q[C>>2]=R,0}function pd(g,j,A,C){var R=0,X=0,$=0,H=0,ae=0,Fe=0,ke;function Tt(B,I,ze,T,Ft,Si){var L,ue,Me,Ce;return ue=B===10?28:16,Ft=B===10?mn(Ft):Co(Ft),L=Yo(ue),Ce=Vo(L,B,Ft,Si),Qr(!Ce),Me=Yo(32),Q[Me+4>>2]=B,Q[Me+8>>2]=I,Q[Me+12>>2]=ze,Q[Me+24>>2]=T,Q[Me+20>>2]=L,B===10?Q[Me+16>>2]=28:Q[Me+16>>2]=16,Q[Me+28>>2]=0,Me}if(A&&($=Q[A>>2],H=Q[A+4>>2],ae=Q[A+8>>2],Fe=Q[A+12>>2]),ae&&!Fe&&(Fe=ae===2?17:6),!ae&&Fe&&(ae=Fe===17?2:1),Fe===0&&(Fe=6),ae===0&&(ae=1),!g&&!j)return-2;if($&~(1|2|4|1024|8|16|32)||A!==0&&Q[A>>2]&2&&!g)return-1;if($&32)return-2;if(ae!==0&&ae!==1&&ae!==2)return-7;if(H!==0&&H!==2&&H!==10)return-6;if(j&&(j=wi(j),X=parseInt(j,10),isNaN(X)))return $&1024?-2:-8;if(!g)return H===0&&(H=2),($&1)===0&&(H===2?R=hs(2130706433):R=[0,0,0,1]),ke=Tt(H,ae,Fe,null,R,X),Q[C>>2]=ke,0;if(g=wi(g),R=Xn(g),R!==null)if(H===0||H===2)H=2;else if(H===10&&$&8)R=[0,0,hs(65535),R],H=10;else return-2;else if(R=Uo(g),R!==null)if(H===0||H===10)H=10;else return-2;return R!=null?(ke=Tt(H,ae,Fe,g,R,X),Q[C>>2]=ke,0):$&4?-2:(g=Ue.lookup_name(g),R=Xn(g),H===0?H=2:H===10&&(R=[0,0,hs(65535),R]),ke=Tt(H,ae,Fe,null,R,X),Q[C>>2]=ke,0)}function _d(){if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function"){var g=new Uint8Array(1);return function(){return crypto.getRandomValues(g),g[0]}}else if(J)try{var j=sg("crypto");return function(){return j.randomBytes(1)[0]}}catch(A){}return function(){It("randomDevice")}}function is(g,j){is.randomDevice||(is.randomDevice=_d());for(var A=0;A<j;A++)Bi[g+A>>0]=is.randomDevice();return 0}function yd(g,j,A,C,R,X,$){var H=Ya(g,j);if(H.errno)return-6;var ae=H.port,Fe=H.addr,ke=!1;if(A&&C){var Tt;if($&1||!(Tt=Ue.lookup_addr(Fe))){if($&8)return-2}else Fe=Tt;var B=Kn(Fe,A,C);B+1>=C&&(ke=!0)}if(R&&X){ae=""+ae;var B=Kn(ae,R,X);B+1>=X&&(ke=!0)}return ke?-12:0}function ns(g){return g%4===0&&(g%100!==0||g%400===0)}function xo(g,j){for(var A=0,C=0;C<=j;A+=g[C++]);return A}var ss=[31,29,31,30,31,30,31,31,30,31,30,31],os=[31,28,31,30,31,30,31,31,30,31,30,31];function as(g,j){for(var A=new Date(g.getTime());j>0;){var C=ns(A.getFullYear()),R=A.getMonth(),X=(C?ss:os)[R];if(j>X-A.getDate())j-=X-A.getDate()+1,A.setDate(1),R<11?A.setMonth(R+1):(A.setMonth(0),A.setFullYear(A.getFullYear()+1));else return A.setDate(A.getDate()+j),A}return A}function qo(g,j,A,C){var R=Q[C+40>>2],X={tm_sec:Q[C>>2],tm_min:Q[C+4>>2],tm_hour:Q[C+8>>2],tm_mday:Q[C+12>>2],tm_mon:Q[C+16>>2],tm_year:Q[C+20>>2],tm_wday:Q[C+24>>2],tm_yday:Q[C+28>>2],tm_isdst:Q[C+32>>2],tm_gmtoff:Q[C+36>>2],tm_zone:R?wi(R):""},$=wi(A),H={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var ae in H)$=$.replace(new RegExp(ae,"g"),H[ae]);var Fe=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ke=["January","February","March","April","May","June","July","August","September","October","November","December"];function Tt(L,ue,Me){for(var Ce=typeof L=="number"?L.toString():L||"";Ce.length<ue;)Ce=Me[0]+Ce;return Ce}function B(L,ue){return Tt(L,ue,"0")}function I(L,ue){function Me($t){return $t<0?-1:$t>0?1:0}var Ce;return(Ce=Me(L.getFullYear()-ue.getFullYear()))===0&&(Ce=Me(L.getMonth()-ue.getMonth()))===0&&(Ce=Me(L.getDate()-ue.getDate())),Ce}function ze(L){switch(L.getDay()){case 0:return new Date(L.getFullYear()-1,11,29);case 1:return L;case 2:return new Date(L.getFullYear(),0,3);case 3:return new Date(L.getFullYear(),0,2);case 4:return new Date(L.getFullYear(),0,1);case 5:return new Date(L.getFullYear()-1,11,31);case 6:return new Date(L.getFullYear()-1,11,30)}}function T(L){var ue=as(new Date(L.tm_year+1900,0,1),L.tm_yday),Me=new Date(ue.getFullYear(),0,4),Ce=new Date(ue.getFullYear()+1,0,4),$t=ze(Me),br=ze(Ce);return I($t,ue)<=0?I(br,ue)<=0?ue.getFullYear()+1:ue.getFullYear():ue.getFullYear()-1}var Ft={"%a":function(L){return Fe[L.tm_wday].substring(0,3)},"%A":function(L){return Fe[L.tm_wday]},"%b":function(L){return ke[L.tm_mon].substring(0,3)},"%B":function(L){return ke[L.tm_mon]},"%C":function(L){var ue=L.tm_year+1900;return B(ue/100|0,2)},"%d":function(L){return B(L.tm_mday,2)},"%e":function(L){return Tt(L.tm_mday,2," ")},"%g":function(L){return T(L).toString().substring(2)},"%G":function(L){return T(L)},"%H":function(L){return B(L.tm_hour,2)},"%I":function(L){var ue=L.tm_hour;return ue==0?ue=12:ue>12&&(ue-=12),B(ue,2)},"%j":function(L){return B(L.tm_mday+xo(ns(L.tm_year+1900)?ss:os,L.tm_mon-1),3)},"%m":function(L){return B(L.tm_mon+1,2)},"%M":function(L){return B(L.tm_min,2)},"%n":function(){return`
19
- `},"%p":function(L){return L.tm_hour>=0&&L.tm_hour<12?"AM":"PM"},"%S":function(L){return B(L.tm_sec,2)},"%t":function(){return" "},"%u":function(L){return L.tm_wday||7},"%U":function(L){var ue=new Date(L.tm_year+1900,0,1),Me=ue.getDay()===0?ue:as(ue,7-ue.getDay()),Ce=new Date(L.tm_year+1900,L.tm_mon,L.tm_mday);if(I(Me,Ce)<0){var $t=xo(ns(Ce.getFullYear())?ss:os,Ce.getMonth()-1)-31,br=31-Me.getDate(),Fr=br+$t+Ce.getDate();return B(Math.ceil(Fr/7),2)}return I(Me,ue)===0?"01":"00"},"%V":function(L){var ue=new Date(L.tm_year+1900,0,4),Me=new Date(L.tm_year+1901,0,4),Ce=ze(ue),$t=ze(Me),br=as(new Date(L.tm_year+1900,0,1),L.tm_yday);if(I(br,Ce)<0)return"53";if(I($t,br)<=0)return"01";var Fr;return Ce.getFullYear()<L.tm_year+1900?Fr=L.tm_yday+32-Ce.getDate():Fr=L.tm_yday+1-Ce.getDate(),B(Math.ceil(Fr/7),2)},"%w":function(L){return L.tm_wday},"%W":function(L){var ue=new Date(L.tm_year,0,1),Me=ue.getDay()===1?ue:as(ue,ue.getDay()===0?1:7-ue.getDay()+1),Ce=new Date(L.tm_year+1900,L.tm_mon,L.tm_mday);if(I(Me,Ce)<0){var $t=xo(ns(Ce.getFullYear())?ss:os,Ce.getMonth()-1)-31,br=31-Me.getDate(),Fr=br+$t+Ce.getDate();return B(Math.ceil(Fr/7),2)}return I(Me,ue)===0?"01":"00"},"%y":function(L){return(L.tm_year+1900).toString().substring(2)},"%Y":function(L){return L.tm_year+1900},"%z":function(L){var ue=L.tm_gmtoff,Me=ue>=0;return ue=Math.abs(ue)/60,ue=ue/60*100+ue%60,(Me?"+":"-")+String("0000"+ue).slice(-4)},"%Z":function(L){return L.tm_zone},"%%":function(){return"%"}};for(var ae in Ft)$.includes(ae)&&($=$.replace(new RegExp(ae,"g"),Ft[ae](X)));var Si=gn($,!1);return Si.length>j?0:(Bo(Si,g),Si.length-1)}function md(g,j,A,C){return qo(g,j,A,C)}function gn(g,j,A){var C=A>0?A:ji(g)+1,R=new Array(C),X=jo(g,R,0,R.length);return j&&(R.length=X),R}var bd={X:Jn,N:Bl,Z:$a,Y:Tl,a:Sl,P:Dl,O:Al,L:Ol,T:Fl,i:kl,W:Ml,q:Ka,H:Ti,M:Cl,f:Eo,U:Ja,J:Za,j:Xa,V:Ul,_:Vl,$:El,m:Rl,l:Nl,k:Pl,ba:es,aa:ts,c:Ro,o:Pt,B:Ll,C:xl,y:ql,z:zl,h:Wl,w:Hl,E:Yl,x:$l,G:Gl,d:Kl,D:Jl,F:Zl,v:Xl,g:Ql,r:ed,da:td,ea:id,I:nd,Q:sd,b:od,ca:ad,t:ud,s:cd,p:ld,u:dd,K:fd,e:hd,n:pd,R:is,S:yd,A:md},U_=Nt(),gd=t.___wasm_call_ctors=function(){return(gd=t.___wasm_call_ctors=t.asm.ga).apply(null,arguments)},vd=t._main=function(){return(vd=t._main=t.asm.ha).apply(null,arguments)},wd=t._duckdb_web_fs_glob_add_path=function(){return(wd=t._duckdb_web_fs_glob_add_path=t.asm.ja).apply(null,arguments)},jd=t._duckdb_web_clear_response=function(){return(jd=t._duckdb_web_clear_response=t.asm.ka).apply(null,arguments)},Bd=t._duckdb_web_fail_with=function(){return(Bd=t._duckdb_web_fail_with=t.asm.la).apply(null,arguments)},Id=t._duckdb_web_reset=function(){return(Id=t._duckdb_web_reset=t.asm.ma).apply(null,arguments)},Td=t._duckdb_web_connect=function(){return(Td=t._duckdb_web_connect=t.asm.na).apply(null,arguments)},Sd=t._duckdb_web_disconnect=function(){return(Sd=t._duckdb_web_disconnect=t.asm.oa).apply(null,arguments)},Dd=t._duckdb_web_flush_files=function(){return(Dd=t._duckdb_web_flush_files=t.asm.pa).apply(null,arguments)},Ad=t._duckdb_web_flush_file=function(){return(Ad=t._duckdb_web_flush_file=t.asm.qa).apply(null,arguments)},Od=t._duckdb_web_open=function(){return(Od=t._duckdb_web_open=t.asm.ra).apply(null,arguments)},us=t._duckdb_web_collect_file_stats=function(){return(us=t._duckdb_web_collect_file_stats=t.asm.sa).apply(null,arguments)},Fd=t._duckdb_web_export_file_stats=function(){return(Fd=t._duckdb_web_export_file_stats=t.asm.ta).apply(null,arguments)},kd=t._duckdb_web_fs_drop_file=function(){return(kd=t._duckdb_web_fs_drop_file=t.asm.ua).apply(null,arguments)},Md=t._duckdb_web_fs_drop_files=function(){return(Md=t._duckdb_web_fs_drop_files=t.asm.va).apply(null,arguments)},cs=t._duckdb_web_fs_glob_file_infos=function(){return(cs=t._duckdb_web_fs_glob_file_infos=t.asm.wa).apply(null,arguments)},zo=t._duckdb_web_fs_get_file_info_by_id=function(){return(zo=t._duckdb_web_fs_get_file_info_by_id=t.asm.xa).apply(null,arguments)},ls=t._duckdb_web_fs_get_file_info_by_name=function(){return(ls=t._duckdb_web_fs_get_file_info_by_name=t.asm.ya).apply(null,arguments)},ds=t._duckdb_web_fs_set_file_descriptor=function(){return(ds=t._duckdb_web_fs_set_file_descriptor=t.asm.za).apply(null,arguments)},fs=t._duckdb_web_fs_register_file_url=function(){return(fs=t._duckdb_web_fs_register_file_url=t.asm.Aa).apply(null,arguments)},Cd=t._duckdb_web_fs_register_file_buffer=function(){return(Cd=t._duckdb_web_fs_register_file_buffer=t.asm.Ba).apply(null,arguments)},Ud=t._duckdb_web_copy_file_to_buffer=function(){return(Ud=t._duckdb_web_copy_file_to_buffer=t.asm.Ca).apply(null,arguments)},Vd=t._duckdb_web_copy_file_to_path=function(){return(Vd=t._duckdb_web_copy_file_to_path=t.asm.Da).apply(null,arguments)},Ed=t._duckdb_web_get_version=function(){return(Ed=t._duckdb_web_get_version=t.asm.Ea).apply(null,arguments)},V_=t._duckdb_web_get_feature_flags=function(){return(V_=t._duckdb_web_get_feature_flags=t.asm.Fa).apply(null,arguments)},Rd=t._duckdb_web_tokenize=function(){return(Rd=t._duckdb_web_tokenize=t.asm.Ga).apply(null,arguments)},Nd=t._duckdb_web_prepared_create=function(){return(Nd=t._duckdb_web_prepared_create=t.asm.Ha).apply(null,arguments)},Pd=t._duckdb_web_prepared_close=function(){return(Pd=t._duckdb_web_prepared_close=t.asm.Ia).apply(null,arguments)},Ld=t._duckdb_web_prepared_run=function(){return(Ld=t._duckdb_web_prepared_run=t.asm.Ja).apply(null,arguments)},xd=t._duckdb_web_prepared_send=function(){return(xd=t._duckdb_web_prepared_send=t.asm.Ka).apply(null,arguments)},qd=t._duckdb_web_query_run=function(){return(qd=t._duckdb_web_query_run=t.asm.La).apply(null,arguments)},zd=t._duckdb_web_query_send=function(){return(zd=t._duckdb_web_query_send=t.asm.Ma).apply(null,arguments)},Wd=t._duckdb_web_query_fetch_results=function(){return(Wd=t._duckdb_web_query_fetch_results=t.asm.Na).apply(null,arguments)},Hd=t._duckdb_web_get_tablenames=function(){return(Hd=t._duckdb_web_get_tablenames=t.asm.Oa).apply(null,arguments)},Yd=t._duckdb_web_insert_arrow_from_ipc_stream=function(){return(Yd=t._duckdb_web_insert_arrow_from_ipc_stream=t.asm.Pa).apply(null,arguments)},$d=t._duckdb_web_insert_csv_from_path=function(){return($d=t._duckdb_web_insert_csv_from_path=t.asm.Qa).apply(null,arguments)},Gd=t._duckdb_web_insert_json_from_path=function(){return(Gd=t._duckdb_web_insert_json_from_path=t.asm.Ra).apply(null,arguments)},hs=t._htonl=function(){return(hs=t._htonl=t.asm.Sa).apply(null,arguments)},ps=t._htons=function(){return(ps=t._htons=t.asm.Ta).apply(null,arguments)},Wo=t._ntohs=function(){return(Wo=t._ntohs=t.asm.Ua).apply(null,arguments)},Qa=t.___errno_location=function(){return(Qa=t.___errno_location=t.asm.Va).apply(null,arguments)},eu=t.stackSave=function(){return(eu=t.stackSave=t.asm.Wa).apply(null,arguments)},tu=t.stackRestore=function(){return(tu=t.stackRestore=t.asm.Xa).apply(null,arguments)},Ho=t.stackAlloc=function(){return(Ho=t.stackAlloc=t.asm.Ya).apply(null,arguments)},Yo=t._malloc=function(){return(Yo=t._malloc=t.asm.Za).apply(null,arguments)},Kd=t._free=function(){return(Kd=t._free=t.asm._a).apply(null,arguments)};t.ccall=Gn;var _s;function ys(g){this.name="ExitStatus",this.message="Program terminated with exit("+g+")",this.status=g}var Jd=!1;_n=function g(){_s||$o(),_s||(_n=g)};function Zd(g){var j=t._main,A=0,C=0;try{var R=j(A,C);return Xd(R,!0),R}catch(X){return jl(X)}finally{Jd=!0}}function $o(g){if(g=g||y,ei>0||(pl(),ei>0))return;function j(){_s||(_s=!0,t.calledRun=!0,!Xr&&(_l(),Fo(),i(t),t.onRuntimeInitialized&&t.onRuntimeInitialized(),ru&&Zd(g),ml()))}t.setStatus?(t.setStatus("Running..."),setTimeout(function(){setTimeout(function(){t.setStatus("")},1),j()},1)):j()}t.run=$o;function Xd(g,j){$n=g,Oo()||yl(),Qd(g)}function Qd(g){$n=g,Oo()||(t.onExit&&t.onExit(g),Xr=!0),D(g,new ys(g))}if(t.preInit)for(typeof t.preInit=="function"&&(t.preInit=[t.preInit]);t.preInit.length>0;)t.preInit.pop()();var ru=!0;return t.noInitialRun&&(ru=!1),$o(),e.ready}}(),F1=UU;var M_=class extends Ra{constructor(e,t,i,n=null){super(e,t,i,n)}instantiateImpl(e){return F1(ms(ri({},e),{instantiateWasm:this.instantiateWasm.bind(this),locateFile:this.locateFile.bind(this)}))}};async function SR(r,e,t){return(await F_()).wasmExceptions&&r.eh?new M_(e,t,r.eh.mainModule):new k_(e,t,r.mvp.mainModule)}export{qt as BROWSER_RUNTIME,dU as ConsoleLogger,tU as DEFAULT_RUNTIME,B_ as DuckDBBindingsBase,v_ as DuckDBConnection,j1 as DuckDBDataProtocol,iU as DuckDBFeature,j_ as FileStatistics,sU as InsertMode,nU as JSONTableShape,uU as LogEvent,oU as LogLevel,cU as LogOrigin,aU as LogTopic,w1 as PreparedStatement,w_ as ResultStreamIterator,X2 as StatusCode,lU as VoidLogger,Le as callSRet,vo as copyBuffer,SR as createDuckDB,eU as decodeText,it as dropResponseBuffers,gi as failWith,tR as getJsDelivrBundles,WE as getLogEventLabel,zE as getLogLevelLabel,YE as getLogOriginLabel,HE as getLogTopicLabel,F_ as getPlatformFeatures,Te as readString,rR as selectBundle};
20
- /*! *****************************************************************************
21
- Copyright (c) Microsoft Corporation.
1
+ var hd=Object.create;var It=Object.defineProperty,vd=Object.defineProperties,bd=Object.getOwnPropertyDescriptor,jd=Object.getOwnPropertyDescriptors,gd=Object.getOwnPropertyNames,yl=Object.getOwnPropertySymbols,wd=Object.getPrototypeOf,vl=Object.prototype.hasOwnProperty,kd=Object.prototype.propertyIsEnumerable;var hl=(_,c,i)=>c in _?It(_,c,{enumerable:!0,configurable:!0,writable:!0,value:i}):_[c]=i,Ki=(_,c)=>{for(var i in c||(c={}))vl.call(c,i)&&hl(_,i,c[i]);if(yl)for(var i of yl(c))kd.call(c,i)&&hl(_,i,c[i]);return _},fe=(_,c)=>vd(_,jd(c));var bl=(_=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(_,{get:(c,i)=>(typeof require!="undefined"?require:c)[i]}):_)(function(_){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+_+'" is not supported')});var Ut=(_,c)=>()=>(c||_((c={exports:{}}).exports,c),c.exports);var Cd=(_,c,i,m)=>{if(c&&typeof c=="object"||typeof c=="function")for(let h of gd(c))!vl.call(_,h)&&h!==i&&It(_,h,{get:()=>c[h],enumerable:!(m=bd(c,h))||m.enumerable});return _};var Ed=(_,c,i)=>(i=_!=null?hd(wd(_)):{},Cd(c||!_||!_.__esModule?It(i,"default",{value:_,enumerable:!0}):i,_));var Ml=Ut((exports,module)=>{(function(){"use strict";var ERROR="input is invalid type",WINDOW=typeof window=="object",root=WINDOW?window:{};root.JS_SHA256_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&typeof self=="object",NODE_JS=!root.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;NODE_JS?root=global:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_SHA256_NO_COMMON_JS&&typeof module=="object"&&module.exports,AMD=typeof define=="function"&&define.amd,ARRAY_BUFFER=!root.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",HEX_CHARS="0123456789abcdef".split(""),EXTRA=[-2147483648,8388608,32768,128],SHIFT=[24,16,8,0],K=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],OUTPUT_TYPES=["hex","array","digest","arrayBuffer"],blocks=[];(root.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(_){return Object.prototype.toString.call(_)==="[object Array]"}),ARRAY_BUFFER&&(root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(_){return typeof _=="object"&&_.buffer&&_.buffer.constructor===ArrayBuffer});var createOutputMethod=function(_,c){return function(i){return new Sha256(c,!0).update(i)[_]()}},createMethod=function(_){var c=createOutputMethod("hex",_);NODE_JS&&(c=nodeWrap(c,_)),c.create=function(){return new Sha256(_)},c.update=function(h){return c.create().update(h)};for(var i=0;i<OUTPUT_TYPES.length;++i){var m=OUTPUT_TYPES[i];c[m]=createOutputMethod(m,_)}return c},nodeWrap=function(method,is224){var crypto=eval("require('crypto')"),Buffer=eval("require('buffer').Buffer"),algorithm=is224?"sha224":"sha256",nodeMethod=function(_){if(typeof _=="string")return crypto.createHash(algorithm).update(_,"utf8").digest("hex");if(_==null)throw new Error(ERROR);return _.constructor===ArrayBuffer&&(_=new Uint8Array(_)),Array.isArray(_)||ArrayBuffer.isView(_)||_.constructor===Buffer?crypto.createHash(algorithm).update(new Buffer(_)).digest("hex"):method(_)};return nodeMethod},createHmacOutputMethod=function(_,c){return function(i,m){return new HmacSha256(i,c,!0).update(m)[_]()}},createHmacMethod=function(_){var c=createHmacOutputMethod("hex",_);c.create=function(h){return new HmacSha256(h,_)},c.update=function(h,b){return c.create(h).update(b)};for(var i=0;i<OUTPUT_TYPES.length;++i){var m=OUTPUT_TYPES[i];c[m]=createHmacOutputMethod(m,_)}return c};function Sha256(_,c){c?(blocks[0]=blocks[16]=blocks[1]=blocks[2]=blocks[3]=blocks[4]=blocks[5]=blocks[6]=blocks[7]=blocks[8]=blocks[9]=blocks[10]=blocks[11]=blocks[12]=blocks[13]=blocks[14]=blocks[15]=0,this.blocks=blocks):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],_?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=_}Sha256.prototype.update=function(_){if(!this.finalized){var c,i=typeof _;if(i!=="string"){if(i==="object"){if(_===null)throw new Error(ERROR);if(ARRAY_BUFFER&&_.constructor===ArrayBuffer)_=new Uint8Array(_);else if(!Array.isArray(_)&&(!ARRAY_BUFFER||!ArrayBuffer.isView(_)))throw new Error(ERROR)}else throw new Error(ERROR);c=!0}for(var m,h=0,b,C=_.length,S=this.blocks;h<C;){if(this.hashed&&(this.hashed=!1,S[0]=this.block,S[16]=S[1]=S[2]=S[3]=S[4]=S[5]=S[6]=S[7]=S[8]=S[9]=S[10]=S[11]=S[12]=S[13]=S[14]=S[15]=0),c)for(b=this.start;h<C&&b<64;++h)S[b>>2]|=_[h]<<SHIFT[b++&3];else for(b=this.start;h<C&&b<64;++h)m=_.charCodeAt(h),m<128?S[b>>2]|=m<<SHIFT[b++&3]:m<2048?(S[b>>2]|=(192|m>>6)<<SHIFT[b++&3],S[b>>2]|=(128|m&63)<<SHIFT[b++&3]):m<55296||m>=57344?(S[b>>2]|=(224|m>>12)<<SHIFT[b++&3],S[b>>2]|=(128|m>>6&63)<<SHIFT[b++&3],S[b>>2]|=(128|m&63)<<SHIFT[b++&3]):(m=65536+((m&1023)<<10|_.charCodeAt(++h)&1023),S[b>>2]|=(240|m>>18)<<SHIFT[b++&3],S[b>>2]|=(128|m>>12&63)<<SHIFT[b++&3],S[b>>2]|=(128|m>>6&63)<<SHIFT[b++&3],S[b>>2]|=(128|m&63)<<SHIFT[b++&3]);this.lastByteIndex=b,this.bytes+=b-this.start,b>=64?(this.block=S[16],this.start=b-64,this.hash(),this.hashed=!0):this.start=b}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Sha256.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var _=this.blocks,c=this.lastByteIndex;_[16]=this.block,_[c>>2]|=EXTRA[c&3],this.block=_[16],c>=56&&(this.hashed||this.hash(),_[0]=this.block,_[16]=_[1]=_[2]=_[3]=_[4]=_[5]=_[6]=_[7]=_[8]=_[9]=_[10]=_[11]=_[12]=_[13]=_[14]=_[15]=0),_[14]=this.hBytes<<3|this.bytes>>>29,_[15]=this.bytes<<3,this.hash()}},Sha256.prototype.hash=function(){var _=this.h0,c=this.h1,i=this.h2,m=this.h3,h=this.h4,b=this.h5,C=this.h6,S=this.h7,R=this.blocks,M,L,ii,z,$,_i,bi,fi,Ii,Ui,Ci;for(M=16;M<64;++M)$=R[M-15],L=($>>>7|$<<25)^($>>>18|$<<14)^$>>>3,$=R[M-2],ii=($>>>17|$<<15)^($>>>19|$<<13)^$>>>10,R[M]=R[M-16]+L+R[M-7]+ii<<0;for(Ci=c&i,M=0;M<64;M+=4)this.first?(this.is224?(fi=300032,$=R[0]-1413257819,S=$-150054599<<0,m=$+24177077<<0):(fi=704751109,$=R[0]-210244248,S=$-1521486534<<0,m=$+143694565<<0),this.first=!1):(L=(_>>>2|_<<30)^(_>>>13|_<<19)^(_>>>22|_<<10),ii=(h>>>6|h<<26)^(h>>>11|h<<21)^(h>>>25|h<<7),fi=_&c,z=fi^_&i^Ci,bi=h&b^~h&C,$=S+ii+bi+K[M]+R[M],_i=L+z,S=m+$<<0,m=$+_i<<0),L=(m>>>2|m<<30)^(m>>>13|m<<19)^(m>>>22|m<<10),ii=(S>>>6|S<<26)^(S>>>11|S<<21)^(S>>>25|S<<7),Ii=m&_,z=Ii^m&c^fi,bi=S&h^~S&b,$=C+ii+bi+K[M+1]+R[M+1],_i=L+z,C=i+$<<0,i=$+_i<<0,L=(i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10),ii=(C>>>6|C<<26)^(C>>>11|C<<21)^(C>>>25|C<<7),Ui=i&m,z=Ui^i&_^Ii,bi=C&S^~C&h,$=b+ii+bi+K[M+2]+R[M+2],_i=L+z,b=c+$<<0,c=$+_i<<0,L=(c>>>2|c<<30)^(c>>>13|c<<19)^(c>>>22|c<<10),ii=(b>>>6|b<<26)^(b>>>11|b<<21)^(b>>>25|b<<7),Ci=c&i,z=Ci^c&m^Ui,bi=b&C^~b&S,$=h+ii+bi+K[M+3]+R[M+3],_i=L+z,h=_+$<<0,_=$+_i<<0;this.h0=this.h0+_<<0,this.h1=this.h1+c<<0,this.h2=this.h2+i<<0,this.h3=this.h3+m<<0,this.h4=this.h4+h<<0,this.h5=this.h5+b<<0,this.h6=this.h6+C<<0,this.h7=this.h7+S<<0},Sha256.prototype.hex=function(){this.finalize();var _=this.h0,c=this.h1,i=this.h2,m=this.h3,h=this.h4,b=this.h5,C=this.h6,S=this.h7,R=HEX_CHARS[_>>28&15]+HEX_CHARS[_>>24&15]+HEX_CHARS[_>>20&15]+HEX_CHARS[_>>16&15]+HEX_CHARS[_>>12&15]+HEX_CHARS[_>>8&15]+HEX_CHARS[_>>4&15]+HEX_CHARS[_&15]+HEX_CHARS[c>>28&15]+HEX_CHARS[c>>24&15]+HEX_CHARS[c>>20&15]+HEX_CHARS[c>>16&15]+HEX_CHARS[c>>12&15]+HEX_CHARS[c>>8&15]+HEX_CHARS[c>>4&15]+HEX_CHARS[c&15]+HEX_CHARS[i>>28&15]+HEX_CHARS[i>>24&15]+HEX_CHARS[i>>20&15]+HEX_CHARS[i>>16&15]+HEX_CHARS[i>>12&15]+HEX_CHARS[i>>8&15]+HEX_CHARS[i>>4&15]+HEX_CHARS[i&15]+HEX_CHARS[m>>28&15]+HEX_CHARS[m>>24&15]+HEX_CHARS[m>>20&15]+HEX_CHARS[m>>16&15]+HEX_CHARS[m>>12&15]+HEX_CHARS[m>>8&15]+HEX_CHARS[m>>4&15]+HEX_CHARS[m&15]+HEX_CHARS[h>>28&15]+HEX_CHARS[h>>24&15]+HEX_CHARS[h>>20&15]+HEX_CHARS[h>>16&15]+HEX_CHARS[h>>12&15]+HEX_CHARS[h>>8&15]+HEX_CHARS[h>>4&15]+HEX_CHARS[h&15]+HEX_CHARS[b>>28&15]+HEX_CHARS[b>>24&15]+HEX_CHARS[b>>20&15]+HEX_CHARS[b>>16&15]+HEX_CHARS[b>>12&15]+HEX_CHARS[b>>8&15]+HEX_CHARS[b>>4&15]+HEX_CHARS[b&15]+HEX_CHARS[C>>28&15]+HEX_CHARS[C>>24&15]+HEX_CHARS[C>>20&15]+HEX_CHARS[C>>16&15]+HEX_CHARS[C>>12&15]+HEX_CHARS[C>>8&15]+HEX_CHARS[C>>4&15]+HEX_CHARS[C&15];return this.is224||(R+=HEX_CHARS[S>>28&15]+HEX_CHARS[S>>24&15]+HEX_CHARS[S>>20&15]+HEX_CHARS[S>>16&15]+HEX_CHARS[S>>12&15]+HEX_CHARS[S>>8&15]+HEX_CHARS[S>>4&15]+HEX_CHARS[S&15]),R},Sha256.prototype.toString=Sha256.prototype.hex,Sha256.prototype.digest=function(){this.finalize();var _=this.h0,c=this.h1,i=this.h2,m=this.h3,h=this.h4,b=this.h5,C=this.h6,S=this.h7,R=[_>>24&255,_>>16&255,_>>8&255,_&255,c>>24&255,c>>16&255,c>>8&255,c&255,i>>24&255,i>>16&255,i>>8&255,i&255,m>>24&255,m>>16&255,m>>8&255,m&255,h>>24&255,h>>16&255,h>>8&255,h&255,b>>24&255,b>>16&255,b>>8&255,b&255,C>>24&255,C>>16&255,C>>8&255,C&255];return this.is224||R.push(S>>24&255,S>>16&255,S>>8&255,S&255),R},Sha256.prototype.array=Sha256.prototype.digest,Sha256.prototype.arrayBuffer=function(){this.finalize();var _=new ArrayBuffer(this.is224?28:32),c=new DataView(_);return c.setUint32(0,this.h0),c.setUint32(4,this.h1),c.setUint32(8,this.h2),c.setUint32(12,this.h3),c.setUint32(16,this.h4),c.setUint32(20,this.h5),c.setUint32(24,this.h6),this.is224||c.setUint32(28,this.h7),_};function HmacSha256(_,c,i){var m,h=typeof _;if(h==="string"){var b=[],C=_.length,S=0,R;for(m=0;m<C;++m)R=_.charCodeAt(m),R<128?b[S++]=R:R<2048?(b[S++]=192|R>>6,b[S++]=128|R&63):R<55296||R>=57344?(b[S++]=224|R>>12,b[S++]=128|R>>6&63,b[S++]=128|R&63):(R=65536+((R&1023)<<10|_.charCodeAt(++m)&1023),b[S++]=240|R>>18,b[S++]=128|R>>12&63,b[S++]=128|R>>6&63,b[S++]=128|R&63);_=b}else if(h==="object"){if(_===null)throw new Error(ERROR);if(ARRAY_BUFFER&&_.constructor===ArrayBuffer)_=new Uint8Array(_);else if(!Array.isArray(_)&&(!ARRAY_BUFFER||!ArrayBuffer.isView(_)))throw new Error(ERROR)}else throw new Error(ERROR);_.length>64&&(_=new Sha256(c,!0).update(_).array());var M=[],L=[];for(m=0;m<64;++m){var ii=_[m]||0;M[m]=92^ii,L[m]=54^ii}Sha256.call(this,c,i),this.update(L),this.oKeyPad=M,this.inner=!0,this.sharedMemory=i}HmacSha256.prototype=new Sha256,HmacSha256.prototype.finalize=function(){if(Sha256.prototype.finalize.call(this),this.inner){this.inner=!1;var _=this.array();Sha256.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(_),Sha256.prototype.finalize.call(this)}};var exports=createMethod();exports.sha256=exports,exports.sha224=createMethod(!0),exports.sha256.hmac=createHmacMethod(),exports.sha224.hmac=createHmacMethod(!0),COMMON_JS?module.exports=exports:(root.sha256=exports.sha256,root.sha224=exports.sha224,AMD&&define(function(){return exports}))})()});var $e=Ut(()=>{});var Yt=Ut(()=>{});import*as Yi from"apache-arrow";var xr=class{constructor(c,i){this._bindings=c,this._conn=i}close(){this._bindings.disconnect(this._conn)}useUnsafe(c){return c(this._bindings,this._conn)}query(c){let i=this._bindings.runQuery(this._conn,c),m=Yi.RecordBatchReader.from(i);return console.assert(m.isSync()),console.assert(m.isFile()),new Yi.Table(m)}send(c){let i=this._bindings.sendQuery(this._conn,c),m=new Ir(this._bindings,this._conn,i),h=Yi.RecordBatchReader.from(m);return console.assert(h.isSync()),console.assert(h.isStream()),h}getTableNames(c){return this._bindings.getTableNames(this._conn,c)}prepare(c){let i=this._bindings.createPrepared(this._conn,c);return new Nt(this._bindings,this._conn,i)}createScalarFunction(c,i,m){this._bindings.createScalarFunction(this._conn,c,i,m)}insertArrowTable(c,i){let m=new Yi.RecordBatchStreamWriter;m.writeAll(c);let h=m.toUint8Array(!0);this.insertArrowFromIPCStream(h,i)}insertArrowFromIPCStream(c,i){this._bindings.insertArrowFromIPCStream(this._conn,c,i)}insertCSVFromPath(c,i){this._bindings.insertCSVFromPath(this._conn,c,i)}insertJSONFromPath(c,i){this._bindings.insertJSONFromPath(this._conn,c,i)}},Ir=class{constructor(c,i,m){this.bindings=c;this.conn=i;this.header=m;this._first=!0,this._depleted=!1}next(){if(this._first)return this._first=!1,{done:!1,value:this.header};if(this._depleted)return{done:!0,value:null};let c=this.bindings.fetchQueryResults(this.conn);return this._depleted=c.length==0,{done:this._depleted,value:c}}[Symbol.iterator](){return this}},Nt=class{constructor(c,i,m){this.bindings=c,this.connectionId=i,this.statementId=m}close(){this.bindings.closePrepared(this.connectionId,this.statementId)}query(...c){let i=this.bindings.runPrepared(this.connectionId,this.statementId,c),m=Yi.RecordBatchReader.from(i);return console.assert(m.isSync()),console.assert(m.isFile()),new Yi.Table(m)}send(...c){let i=this.bindings.sendPrepared(this.connectionId,this.statementId,c),m=new Ir(this.bindings,this.connectionId,i),h=Yi.RecordBatchReader.from(m);return console.assert(h.isSync()),console.assert(h.isStream()),h}};var Sd=(c=>(c[c.SUCCESS=0]="SUCCESS",c))(Sd||{});var wl=new TextEncoder,jl=new TextDecoder("utf-8");function Bt(_,c,i){let m=wl.encode(i),h=_._malloc(m.byteLength),b=_.HEAPU8.subarray(h,h+m.byteLength);b.set(m),_.HEAPF64[(c>>3)+0]=1,_.HEAPF64[(c>>3)+1]=h,_.HEAPF64[(c>>3)+2]=b.byteLength}function Ht(_){switch(_){case"UINT8":case"INT8":return 1;case"INT32":case"FLOAT":return 4;case"INT64":case"UINT64":case"DOUBLE":case"VARCHAR":return 8;default:return 0}}function Mt(_,c,i,m){let h=_.HEAPU8.subarray(c,c+m*Ht(i));switch(i){case"UINT8":return new Uint8Array(h.buffer,h.byteOffset,m);case"INT8":return new Int8Array(h.buffer,h.byteOffset,m);case"INT32":return new Int32Array(h.buffer,h.byteOffset,m);case"FLOAT":return new Float32Array(h.buffer,h.byteOffset,m);case"DOUBLE":return new Float64Array(h.buffer,h.byteOffset,m);case"VARCHAR":return new Float64Array(h.buffer,h.byteOffset,m);default:return new Array(0)}}function gl(_,c,i){let m=_.HEAPU8.subarray(c,c+i);return new Uint8Array(m.buffer,m.byteOffset,i)}function Ur(_,c,i){let m=_.HEAPU8.subarray(c,c+i*8);return new Float64Array(m.buffer,m.byteOffset,i)}function Nr(_,c,i,m,h,b,C,S){try{let R=_._udfFunctions.get(m);if(!R){Bt(c,i,"Unknown UDF with id: "+m);return}let M=jl.decode(c.HEAPU8.subarray(h,h+b)),L=JSON.parse(M),ii=Ur(c,C,S/8),z=X=>{var yi;let ji=null;switch(X.validityBuffer!==void 0&&(ji=gl(c,ii[X.validityBuffer],L.rows)),X.physicalType){case"VARCHAR":{if(X.dataBuffer===null||X.dataBuffer===void 0)throw new Error("malformed data view, expected data buffer for VARCHAR argument");if(X.lengthBuffer===null||X.lengthBuffer===void 0)throw new Error("malformed data view, expected data length buffer for VARCHAR argument");let wi=Mt(c,ii[X.dataBuffer],X.physicalType,L.rows),mi=[],hi=Ur(c,ii[X.lengthBuffer],L.rows);for(let ri=0;ri<L.rows;++ri){if(ji!=null&&!ji[ri]){mi.push(null);continue}let Ei=c.HEAPU8.subarray(wi[ri],wi[ri]+hi[ri]),Gi=jl.decode(Ei);mi.push(Gi)}return ri=>mi[ri]}case"STRUCT<?>":{let wi={},mi=[];for(let hi=0;hi<(((yi=X.children)==null?void 0:yi.length)||0);++hi){let ri=X.children[hi],Ei=z(ri);mi.push(Gi=>{wi[ri.name]=Ei(Gi)})}return ji!=null?hi=>{if(!ji[hi])return null;for(let ri of mi)ri(hi);return wi}:hi=>{for(let ri of mi)ri(hi);return wi}}default:{if(X.dataBuffer===void 0)throw new Error("malformed data view, expected data buffer for argument of type: "+X.physicalType);let wi=Mt(c,ii[X.dataBuffer],X.physicalType,L.rows);return ji!=null?mi=>ji[mi]?wi[mi]:null:mi=>wi[mi]}}},$=[];for(let X=0;X<L.args.length;++X)$.push(z(L.args[X]));let _i=L.rows*Ht(L.ret.physicalType),bi=c._malloc(_i),fi=Mt(c,bi,L.ret.physicalType,L.rows),Ii=c._malloc(L.rows),Ui=gl(c,Ii,L.rows);if(fi.length==0||Ui.length==0){Bt(c,i,"Can't create physical arrays for result");return}let Ci=fi;L.ret.physicalType=="VARCHAR"&&(Ci=new Array(L.rows));let Ni=[];for(let X=0;X<L.args.length;++X)Ni.push(null);for(let X=0;X<L.rows;++X){for(let yi=0;yi<L.args.length;++yi)Ni[yi]=$[yi](X);let ji=R.func(...Ni);Ci[X]=ji,Ui[X]=ji==null?0:1}let Oi=0;switch(L.ret.physicalType){case"VARCHAR":{let X=new Array(0);Oi=c._malloc(L.rows*Ht("DOUBLE"));let ji=Ur(c,Oi,L.rows),yi=0;for(let ri=0;ri<L.rows;++ri){let Ei=wl.encode(Ci[ri]||"");X.push(Ei),ji[ri]=Ei.length,yi+=Ei.length}let wi=c._malloc(yi),mi=c.HEAPU8.subarray(wi,wi+yi),hi=0;for(let ri=0;ri<L.rows;++ri){fi[ri]=hi;let Ei=X[ri];mi.subarray(hi,hi+Ei.length).set(Ei),hi+=Ei.length}}}let Re=3*8,pi=c._malloc(Re),Bi=Ur(c,pi,3);Bi[0]=bi,Bi[1]=Ii,Bi[2]=Oi,c.HEAPF64[(i>>3)+0]=0,c.HEAPF64[(i>>3)+1]=pi,c.HEAPF64[(i>>3)+2]=0}catch(R){Bt(c,i,R.toString())}}function Dd(){let _=new TextDecoder;return c=>(typeof SharedArrayBuffer<"u"&&c.buffer instanceof SharedArrayBuffer&&(c=new Uint8Array(c)),_.decode(c))}var Ad=Dd();function zi(_,c){_.ccall("duckdb_web_fail_with",null,["string"],[c])}function De(_,c,i){let m=_.HEAPU8.subarray(c,c+i),h=new Uint8Array(new ArrayBuffer(m.byteLength));return h.set(m),h}function V(_,c,i){return Ad(_.HEAPU8.subarray(c,c+i))}var Cl=(h=>(h[h.BUFFER=0]="BUFFER",h[h.NATIVE=1]="NATIVE",h[h.HTTP=3]="HTTP",h[h.S3=4]="S3",h))(Cl||{}),El=(C=>(C[C.FILE_FLAGS_READ=1]="FILE_FLAGS_READ",C[C.FILE_FLAGS_WRITE=2]="FILE_FLAGS_WRITE",C[C.FILE_FLAGS_DIRECT_IO=4]="FILE_FLAGS_DIRECT_IO",C[C.FILE_FLAGS_FILE_CREATE=8]="FILE_FLAGS_FILE_CREATE",C[C.FILE_FLAGS_FILE_CREATE_NEW=16]="FILE_FLAGS_FILE_CREATE_NEW",C[C.FILE_FLAGS_APPEND=32]="FILE_FLAGS_APPEND",C))(El||{});function ni(_,c,i,m){let h=_.stackSave(),b=_.stackAlloc(3*8);i.unshift("number"),m.unshift(b),_.ccall(c,null,i,m);let C=_.HEAPF64[(b>>3)+0],S=_.HEAPF64[(b>>3)+1],R=_.HEAPF64[(b>>3)+2];return _.stackRestore(h),[C,S,R]}function ci(_){_.ccall("duckdb_web_clear_response",null,[],[])}var Sl={_udfFunctions:new Map,testPlatformFeature:(_,c)=>!1,openFile:(_,c,i)=>{},syncFile:(_,c)=>{},closeFile:(_,c)=>{},getLastFileModificationTime:(_,c)=>0,truncateFile:(_,c,i)=>{},readFile:(_,c,i,m,h)=>0,writeFile:(_,c,i,m,h)=>0,removeDirectory:(_,c,i)=>{},checkDirectory:(_,c,i)=>!1,createDirectory:(_,c,i)=>{},listDirectoryEntries:(_,c,i)=>!1,glob:(_,c,i)=>{},moveFile:(_,c,i,m,h)=>{},checkFile:(_,c,i)=>!1,removeFile:(_,c,i)=>{},callScalarUDF:(_,c,i,m,h,b,C)=>{Nr(Sl,_,c,i,m,h,b,C)}};var Br=class{constructor(c){let i=new Float64Array(c.buffer,c.byteOffset,c.byteLength/8),m=new Uint8Array(new ArrayBuffer(c.byteLength));m.set(c.subarray(7*8)),this.totalFileReadsCold=i[0],this.totalFileReadsAhead=i[1],this.totalFileReadsCached=i[2],this.totalFileWrites=i[3],this.totalPageAccesses=i[4],this.totalPageLoads=i[5],this.blockSize=i[6],this.blockStats=m}getBlockStats(c,i){return i=i||{file_reads_cold:0,file_reads_ahead:0,file_reads_cached:0,file_writes:0,page_accesses:0,page_loads:0},i.file_writes=this.blockStats[c*3+0]&15,i.file_reads_cold=this.blockStats[c*3+0]>>4,i.file_reads_ahead=this.blockStats[c*3+1]&15,i.file_reads_cached=this.blockStats[c*3+1]>>4,i.page_accesses=this.blockStats[c*3+1]&15,i.page_loads=this.blockStats[c*3+1]>>4,i}};import*as Q from"apache-arrow";function Ae(_){switch(_.typeId){case Q.Type.Binary:return{sqlType:"binary"};case Q.Type.Bool:return{sqlType:"bool"};case Q.Type.Date:return{sqlType:"date"};case Q.Type.DateDay:return{sqlType:"date32[d]"};case Q.Type.DateMillisecond:return{sqlType:"date64[ms]"};case Q.Type.Decimal:{let c=_;return{sqlType:"decimal",precision:c.precision,scale:c.scale}}case Q.Type.Float:return{sqlType:"float"};case Q.Type.Float16:return{sqlType:"float16"};case Q.Type.Float32:return{sqlType:"float32"};case Q.Type.Float64:return{sqlType:"float64"};case Q.Type.Int:return{sqlType:"int32"};case Q.Type.Int16:return{sqlType:"int16"};case Q.Type.Int32:return{sqlType:"int32"};case Q.Type.Int64:return{sqlType:"int64"};case Q.Type.Uint16:return{sqlType:"uint16"};case Q.Type.Uint32:return{sqlType:"uint32"};case Q.Type.Uint64:return{sqlType:"uint64"};case Q.Type.Uint8:return{sqlType:"uint8"};case Q.Type.IntervalDayTime:return{sqlType:"interval[dt]"};case Q.Type.IntervalYearMonth:return{sqlType:"interval[m]"};case Q.Type.List:return{sqlType:"list",valueType:Ae(_.valueType)};case Q.Type.FixedSizeBinary:return{sqlType:"fixedsizebinary",byteWidth:_.byteWidth};case Q.Type.Null:return{sqlType:"null"};case Q.Type.Utf8:return{sqlType:"utf8"};case Q.Type.Struct:return{sqlType:"struct",fields:_.children.map(i=>Mr(i.name,i.type))};case Q.Type.Map:{let c=_;return{sqlType:"map",keyType:Ae(c.keyType),valueType:Ae(c.valueType)}}case Q.Type.Time:return{sqlType:"time[s]"};case Q.Type.TimeMicrosecond:return{sqlType:"time[us]"};case Q.Type.TimeMillisecond:return{sqlType:"time[ms]"};case Q.Type.TimeNanosecond:return{sqlType:"time[ns]"};case Q.Type.TimeSecond:return{sqlType:"time[s]"};case Q.Type.Timestamp:return{sqlType:"timestamp",timezone:_.timezone||void 0};case Q.Type.TimestampSecond:return{sqlType:"timestamp[s]",timezone:_.timezone||void 0};case Q.Type.TimestampMicrosecond:return{sqlType:"timestamp[us]",timezone:_.timezone||void 0};case Q.Type.TimestampNanosecond:return{sqlType:"timestamp[ns]",timezone:_.timezone||void 0};case Q.Type.TimestampMillisecond:return{sqlType:"timestamp[ms]",timezone:_.timezone||void 0}}throw new Error(`unsupported arrow type: ${_.toString()}`)}function Mr(_,c){let i=Ae(c);return i.name=_,i}var Td=new TextEncoder,Rd=(b=>(b[b.WASM_EXCEPTIONS=1]="WASM_EXCEPTIONS",b[b.WASM_THREADS=2]="WASM_THREADS",b[b.WASM_SIMD=4]="WASM_SIMD",b[b.WASM_BULK_MEMORY=8]="WASM_BULK_MEMORY",b[b.EMIT_BIGINT=16]="EMIT_BIGINT",b))(Rd||{}),Hr=class{constructor(c,i){this._instance=null;this._initPromise=null;this._initPromiseResolver=()=>{};this.onInstantiationProgress=[];this._logger=c,this._runtime=i,this._nextUDFId=1}get logger(){return this._logger}get mod(){return this._instance}get pthread(){return this.mod.PThread||null}async instantiate(c=i=>{}){return this._instance!=null?this:(this._initPromise!=null&&(this.onInstantiationProgress.push(c),await this._initPromise),this._initPromise=new Promise(i=>{this._initPromiseResolver=i}),this.onInstantiationProgress=[c],this._instance=await this.instantiateImpl({print:console.log.bind(console),printErr:console.log.bind(console),onRuntimeInitialized:this._initPromiseResolver}),await this._initPromise,this._initPromise=null,this.onInstantiationProgress=this.onInstantiationProgress.filter(i=>i!=c),this)}open(c){let[i,m,h]=ni(this.mod,"duckdb_web_open",["string"],[JSON.stringify(c)]);if(i!==0)throw new Error(V(this.mod,m,h));ci(this.mod)}reset(){let[c,i,m]=ni(this.mod,"duckdb_web_reset",[],[]);if(c!==0)throw new Error(V(this.mod,i,m));ci(this.mod)}getVersion(){let[c,i,m]=ni(this.mod,"duckdb_web_get_version",[],[]);if(c!==0)throw new Error(V(this.mod,i,m));let h=V(this.mod,i,m);return ci(this.mod),h}getFeatureFlags(){return this.mod.ccall("duckdb_web_get_feature_flags","number",[],[])}tokenize(c){let[i,m,h]=ni(this.mod,"duckdb_web_tokenize",["string"],[c]);if(i!==0)throw new Error(V(this.mod,m,h));let b=V(this.mod,m,h);return ci(this.mod),JSON.parse(b)}connect(){let c=this.mod.ccall("duckdb_web_connect","number",[],[]);return new xr(this,c)}disconnect(c){if(this.mod.ccall("duckdb_web_disconnect",null,["number"],[c]),this.pthread)for(let i of[...this.pthread.runningWorkers,...this.pthread.unusedWorkers])i.postMessage({cmd:"dropUDFFunctions",connectionId:c})}runQuery(c,i){let[m,h,b]=ni(this.mod,"duckdb_web_query_run",["number","string"],[c,i]);if(m!==0)throw new Error(V(this.mod,h,b));let C=De(this.mod,h,b);return ci(this.mod),C}sendQuery(c,i){let[m,h,b]=ni(this.mod,"duckdb_web_query_send",["number","string"],[c,i]);if(m!==0)throw new Error(V(this.mod,h,b));let C=De(this.mod,h,b);return ci(this.mod),C}fetchQueryResults(c){let[i,m,h]=ni(this.mod,"duckdb_web_query_fetch_results",["number"],[c]);if(i!==0)throw new Error(V(this.mod,m,h));let b=De(this.mod,m,h);return ci(this.mod),b}getTableNames(c,i){let[m,h,b]=ni(this.mod,"duckdb_web_get_tablenames",["number","string"],[c,i]);if(m!==0)throw new Error(V(this.mod,h,b));let C=V(this.mod,h,b);return ci(this.mod),JSON.parse(C)}createScalarFunction(c,i,m,h){let b={functionId:this._nextUDFId,name:i,returnType:Ae(m)},C={functionId:b.functionId,connectionId:c,name:i,returnType:m,func:h};this._nextUDFId+=1;let[S,R,M]=ni(this.mod,"duckdb_web_udf_scalar_create",["number","string"],[c,JSON.stringify(b)]);if(S!==0)throw new Error(V(this.mod,R,M));if(ci(this.mod),globalThis.DUCKDB_RUNTIME._udfFunctions=(globalThis.DUCKDB_RUNTIME._udfFunctions||new Map).set(C.functionId,C),this.pthread)for(let L of[...this.pthread.runningWorkers,...this.pthread.unusedWorkers])L.postMessage({cmd:"registerUDFFunction",udf:C})}createPrepared(c,i){let[m,h,b]=ni(this.mod,"duckdb_web_prepared_create",["number","string"],[c,i]);if(m!==0)throw new Error(V(this.mod,h,b));return ci(this.mod),h}closePrepared(c,i){let[m,h,b]=ni(this.mod,"duckdb_web_prepared_close",["number","number"],[c,i]);if(m!==0)throw new Error(V(this.mod,h,b));ci(this.mod)}runPrepared(c,i,m){let[h,b,C]=ni(this.mod,"duckdb_web_prepared_run",["number","number","string"],[c,i,JSON.stringify(m)]);if(h!==0)throw new Error(V(this.mod,b,C));let S=De(this.mod,b,C);return ci(this.mod),S}sendPrepared(c,i,m){let[h,b,C]=ni(this.mod,"duckdb_web_prepared_send",["number","number","string"],[c,i,JSON.stringify(m)]);if(h!==0)throw new Error(V(this.mod,b,C));let S=De(this.mod,b,C);return ci(this.mod),S}insertArrowFromIPCStream(c,i,m){if(i.length==0)return;let h=this.mod._malloc(i.length);this.mod.HEAPU8.subarray(h,h+i.length).set(i);let C=m?JSON.stringify(m):"",[S,R,M]=ni(this.mod,"duckdb_web_insert_arrow_from_ipc_stream",["number","number","number","string"],[c,h,i.length,C]);if(S!==0)throw new Error(V(this.mod,R,M))}insertCSVFromPath(c,i,m){if(m.columns!==void 0){m.columnsFlat=[];for(let M in m.columns)m.columnsFlat.push(Mr(M,m.columns[M]))}let h=Ki({},m);h.columns=h.columnsFlat,delete h.columnsFlat;let b=JSON.stringify(h),[C,S,R]=ni(this.mod,"duckdb_web_insert_csv_from_path",["number","string","string"],[c,i,b]);if(C!==0)throw new Error(V(this.mod,S,R))}insertJSONFromPath(c,i,m){if(m.columns!==void 0){m.columnsFlat=[];for(let M in m.columns)m.columnsFlat.push(Mr(M,m.columns[M]))}let h=Ki({},m);h.columns=h.columnsFlat,delete h.columnsFlat;let b=JSON.stringify(h),[C,S,R]=ni(this.mod,"duckdb_web_insert_json_from_path",["number","string","string"],[c,i,b]);if(C!==0)throw new Error(V(this.mod,S,R))}globFiles(c){let[i,m,h]=ni(this.mod,"duckdb_web_fs_glob_file_infos",["string"],[c]);if(i!==0)throw new Error(V(this.mod,m,h));let b=V(this.mod,m,h);ci(this.mod);let C=JSON.parse(b);return C==null?[]:C}registerFileURL(c,i){i===void 0&&(i=c);let[m,h,b]=ni(this.mod,"duckdb_web_fs_register_file_url",["string","string","number"],[c,i,-1]);if(m!==0)throw new Error(V(this.mod,h,b));ci(this.mod)}registerFileText(c,i){let m=Td.encode(i);this.registerFileBuffer(c,m)}registerFileBuffer(c,i){let m=this.mod._malloc(i.length);this.mod.HEAPU8.subarray(m,m+i.length).set(i);let[b,C,S]=ni(this.mod,"duckdb_web_fs_register_file_buffer",["string","number","number"],[c,m,i.length]);if(b!==0)throw new Error(V(this.mod,C,S));ci(this.mod)}registerFileHandle(c,i){let[m,h,b]=ni(this.mod,"duckdb_web_fs_register_file_url",["string","string","number"],[c,c,-1]);if(m!==0)throw new Error(V(this.mod,h,b));if(ci(this.mod),globalThis.DUCKDB_RUNTIME._files=(globalThis.DUCKDB_RUNTIME._files||new Map).set(c,i),this.pthread){for(let C of this.pthread.runningWorkers)C.postMessage({cmd:"registerFileHandle",fileName:c,fileHandle:i});for(let C of this.pthread.unusedWorkers)C.postMessage({cmd:"dropFileHandle",fileName:c})}}dropFile(c){let[i,m,h]=ni(this.mod,"duckdb_web_fs_drop_file",["string"],[c]);if(i!==0)throw new Error(V(this.mod,m,h));ci(this.mod)}dropFiles(){let[c,i,m]=ni(this.mod,"duckdb_web_fs_drop_files",[],[]);if(c!==0)throw new Error(V(this.mod,i,m));ci(this.mod)}flushFiles(){this.mod.ccall("duckdb_web_flush_files",null,[],[])}copyFileToPath(c,i){let[m,h,b]=ni(this.mod,"duckdb_web_copy_file_to_path",["string","string"],[c,i]);if(m!==0)throw new Error(V(this.mod,h,b));ci(this.mod)}copyFileToBuffer(c){let[i,m,h]=ni(this.mod,"duckdb_web_copy_file_to_buffer",["string"],[c]);if(i!==0)throw new Error(V(this.mod,m,h));let b=this.mod.HEAPU8.subarray(m,m+h),C=new Uint8Array(b.length);return C.set(b),ci(this.mod),C}collectFileStatistics(c,i){let[m,h,b]=ni(this.mod,"duckdb_web_collect_file_stats",["string","boolean"],[c,i]);if(m!==0)throw new Error(V(this.mod,h,b))}exportFileStatistics(c){let[i,m,h]=ni(this.mod,"duckdb_web_export_file_stats",["string"],[c]);if(i!==0)throw new Error(V(this.mod,m,h));return new Br(this.mod.HEAPU8.subarray(m,m+h))}};var Fd=(i=>(i.ROW_ARRAY="row-array",i.COLUMN_OBJECT="column-object",i))(Fd||{});var xd=(b=>(b[b.NONE=0]="NONE",b[b.DEBUG=1]="DEBUG",b[b.INFO=2]="INFO",b[b.WARNING=3]="WARNING",b[b.ERROR=4]="ERROR",b))(xd||{}),Id=(C=>(C[C.NONE=0]="NONE",C[C.CONNECT=1]="CONNECT",C[C.DISCONNECT=2]="DISCONNECT",C[C.OPEN=3]="OPEN",C[C.QUERY=4]="QUERY",C[C.INSTANTIATE=5]="INSTANTIATE",C))(Id||{}),Ud=(C=>(C[C.NONE=0]="NONE",C[C.OK=1]="OK",C[C.ERROR=2]="ERROR",C[C.START=3]="START",C[C.RUN=4]="RUN",C[C.CAPTURE=5]="CAPTURE",C))(Ud||{}),Nd=(b=>(b[b.NONE=0]="NONE",b[b.WEB_WORKER=1]="WEB_WORKER",b[b.NODE_WORKER=2]="NODE_WORKER",b[b.BINDINGS=3]="BINDINGS",b[b.ASYNC_DUCKDB=4]="ASYNC_DUCKDB",b))(Nd||{}),Dl=class{log(c){}},Al=class{constructor(c=2){this.level=c}log(c){c.level>=this.level&&console.log(c)}};function jp(_){switch(_){case 0:return"NONE";case 1:return"DEBUG";case 2:return"INFO";case 3:return"WARNING";case 4:return"ERROR";default:return"?"}}function gp(_){switch(_){case 0:return"NONE";case 1:return"OK";case 2:return"ERROR";case 3:return"START";case 4:return"RUN";case 5:return"CAPTURE";default:return"?"}}function wp(_){switch(_){case 1:return"CONNECT";case 2:return"DISCONNECT";case 5:return"INSTANTIATE";case 3:return"OPEN";case 4:return"QUERY";default:return"?"}}function kp(_){switch(_){case 0:return"NONE";case 1:return"WEB WORKER";case 2:return"NODE WORKER";case 3:return"DUCKDB BINDINGS";case 4:return"DUCKDB";default:return"?"}}var Tl=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,3,1,0,1,10,14,1,12,0,65,0,65,0,65,0,252,10,0,0,11])),Rl=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,8,1,6,0,6,64,25,11,11]));var Fl=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11]));var xl=()=>(async _=>{try{return typeof MessageChannel<"u"&&new MessageChannel().port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(_)}catch(c){return!1}})(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]));var Md="@duckdb/duckdb-wasm",Hd="1.14.0",Od="DuckDB powered by WebAssembly",Pd="MPL-2.0",Ld={type:"git",url:"https://github.com/duckdb/duckdb-wasm.git"},Wd=["sql","duckdb","relational","database","data","query","wasm","analytics","olap","arrow","parquet","json","csv"],qd={"apache-arrow":"^7.0.0"},Xd={"@types/emscripten":"^1.39.6","@types/jasmine":"^4.0.3","@typescript-eslint/eslint-plugin":"^5.21.0","@typescript-eslint/parser":"^5.21.0",esbuild:"^0.14.38",eslint:"^8.14.0","eslint-plugin-jasmine":"^4.1.3","eslint-plugin-react":"^7.29.4","fast-glob":"^3.2.11",jasmine:"^4.1.0","jasmine-core":"^4.0.1","jasmine-spec-reporter":"^7.0.0","js-sha256":"^0.9.0",karma:"^6.3.19","karma-chrome-launcher":"^3.1.1","karma-coverage":"^2.2.0","karma-firefox-launcher":"^2.1.2","karma-jasmine":"^5.0.0","karma-jasmine-html-reporter":"^1.7.0","karma-sourcemap-loader":"^0.3.8","karma-spec-reporter":"^0.0.34","make-dir":"^3.1.0",nyc:"^15.1.0",prettier:"^2.6.2",puppeteer:"^13.7.0",rimraf:"^3.0.2",s3rver:"^3.7.1",typedoc:"^0.22.15",typescript:"^4.6.4","wasm-feature-detect":"^1.2.11","web-worker":"^1.2.0"},Kd={"build:debug":"node bundle.mjs debug && tsc --emitDeclarationOnly","build:release":"node bundle.mjs release && tsc --emitDeclarationOnly",docs:"typedoc",report:"node ./coverage.mjs","test:node":"node --enable-source-maps --experimental-wasm-eh ../../node_modules/jasmine/bin/jasmine ./dist/tests-node.cjs","test:node:debug":"node --inspect-brk --enable-source-maps --experimental-wasm-eh ../../node_modules/jasmine/bin/jasmine ./dist/tests-node.cjs","test:node:coverage":"nyc -r json --report-dir ./coverage/node node --experimental-wasm-eh ../../node_modules/jasmine/bin/jasmine ./dist/tests-node.cjs","test:firefox":"karma start ./karma/tests-firefox.cjs","test:chrome":"karma start ./karma/tests-chrome.cjs","test:chrome:eh":"karma start ./karma/tests-chrome-eh.cjs","test:chrome:coverage":"karma start ./karma/tests-chrome-coverage.cjs","test:browser":"karma start ./karma/tests-all.cjs","test:browser:debug":"karma start ./karma/tests-debug.cjs",test:"npm run test:chrome && npm run test:node","test:coverage":"npm run test:chrome:coverage && npm run test:node:coverage && npm run report",lint:"eslint src test"},Yd=["dist","!dist/types/test"],zd="dist/duckdb-browser.cjs",Gd="dist/duckdb-browser.mjs",Vd="dist/duckdb-browser.d.ts",$d="dist/duckdb-browser.cjs",Jd="dist/duckdb-browser.mjs",Qd=!1,Zd={fs:!1,path:!1,perf_hooks:!1,os:!1,worker_threads:!1},ip={"./dist/duckdb-mvp.wasm":"./dist/duckdb-mvp.wasm","./dist/duckdb-eh.wasm":"./dist/duckdb-eh.wasm","./dist/duckdb-coi.wasm":"./dist/duckdb-coi.wasm","./dist/duckdb-browser":"./dist/duckdb-browser.mjs","./dist/duckdb-browser.cjs":"./dist/duckdb-browser.cjs","./dist/duckdb-browser.mjs":"./dist/duckdb-browser.mjs","./dist/duckdb-browser-blocking":"./dist/duckdb-browser-blocking.mjs","./dist/duckdb-browser-blocking.mjs":"./dist/duckdb-browser-blocking.mjs","./dist/duckdb-browser-blocking.cjs":"./dist/duckdb-browser-blocking.cjs","./dist/duckdb-browser-coi.pthread.worker.js":"./dist/duckdb-browser-coi.pthread.worker.js","./dist/duckdb-browser-coi.worker.js":"./dist/duckdb-browser-coi.worker.js","./dist/duckdb-browser-eh.worker.js":"./dist/duckdb-browser-eh.worker.js","./dist/duckdb-browser-mvp.worker.js":"./dist/duckdb-browser-mvp.worker.js","./dist/duckdb-node":"./dist/duckdb-node.cjs","./dist/duckdb-node.cjs":"./dist/duckdb-node.cjs","./dist/duckdb-node-blocking":"./dist/duckdb-node-blocking.cjs","./dist/duckdb-node-blocking.cjs":"./dist/duckdb-node-blocking.cjs","./dist/duckdb-node-eh.worker.cjs":"./dist/duckdb-node-eh.worker.cjs","./dist/duckdb-node-mvp.worker.cjs":"./dist/duckdb-node-mvp.worker.cjs","./blocking":{browser:{types:"./dist/duckdb-browser-blocking.d.ts",import:"./dist/duckdb-browser-blocking.mjs",require:"./dist/duckdb-browser-blocking.cjs"},node:{types:"./dist/duckdb-node-blocking.d.ts",require:"./dist/duckdb-node-blocking.cjs",import:"./dist/duckdb-node-blocking.cjs"},types:"./dist/duckdb-browser-blocking.d.ts",import:"./dist/duckdb-browser-blocking.mjs",require:"./dist/duckdb-browser-blocking.cjs"},".":{browser:{types:"./dist/duckdb-browser.d.ts",import:"./dist/duckdb-browser.mjs",require:"./dist/duckdb-browser.cjs"},node:{types:"./dist/duckdb-node.d.ts",import:"./dist/duckdb-node.cjs",require:"./dist/duckdb-node.cjs"},types:"./dist/duckdb-browser.d.ts",import:"./dist/duckdb-browser.mjs",require:"./dist/duckdb-browser.cjs"}},Or={name:Md,version:Hd,description:Od,license:Pd,repository:Ld,keywords:Wd,dependencies:qd,devDependencies:Xd,scripts:Kd,files:Yd,main:zd,module:Gd,types:Vd,jsdelivr:$d,unpkg:Jd,sideEffects:Qd,browser:Zd,exports:ip};var Il=Or.name,Ul=Or.version,Ot=Or.version.split("."),Dp=Ot[0],Ap=Ot[1],Tp=Ot[2];var Nl=()=>typeof navigator>"u",Bl=()=>Nl()?"node":navigator.userAgent,xp=()=>Bl().includes("Firefox"),Ip=()=>/^((?!chrome|android).)*safari/i.test(Bl());function Up(){let _=`https://cdn.jsdelivr.net/npm/${Il}@${Ul}/dist/`;return{mvp:{mainModule:`${_}duckdb-mvp.wasm`,mainWorker:`${_}duckdb-browser-mvp.worker.js`},eh:{mainModule:`${_}duckdb-eh.wasm`,mainWorker:`${_}duckdb-browser-eh.worker.js`}}}var Pt=null,Lt=null,Wt=null,qt=null,Xt=null;async function Kt(){return Pt==null&&(Pt=typeof BigInt64Array<"u"),Lt==null&&(Lt=await Rl()),Wt==null&&(Wt=await xl()),qt==null&&(qt=await Fl()),Xt==null&&(Xt=await Tl()),{bigInt64Array:Pt,crossOriginIsolated:Nl()||globalThis.crossOriginIsolated||!1,wasmExceptions:Lt,wasmSIMD:qt,wasmThreads:Wt,wasmBulkMemory:Xt}}async function Np(_){let c=await Kt();if(c.wasmExceptions){if(c.wasmSIMD&&c.wasmThreads&&c.crossOriginIsolated&&_.coi)return{mainModule:_.coi.mainModule,mainWorker:_.coi.mainWorker,pthreadWorker:_.coi.pthreadWorker};if(_.eh)return{mainModule:_.eh.mainModule,mainWorker:_.eh.mainWorker,pthreadWorker:null}}return{mainModule:_.mvp.mainModule,mainWorker:_.mvp.mainWorker,pthreadWorker:null}}var ie=Ed(Ml()),Hl=function(_,c,i){var m;if((m=_==null?void 0:_.endpoint)!=null&&m.startsWith("http")){let h=`${_==null?void 0:_.endpoint}`,b=h.indexOf("://")+3;return h.substring(b)}else return _!=null&&_.endpoint?`${i}.${_==null?void 0:_.endpoint}`:`${i}.s3.amazonaws.com`};function ep(_,c,i){var h,b,C,S;let m=Ol(c);return{url:m.path,query:"",host:Hl(_,c,m.bucket),region:(h=_==null?void 0:_.region)!=null?h:"",service:"s3",method:i,accessKeyId:(b=_==null?void 0:_.accessKeyId)!=null?b:"",secretAccessKey:(C=_==null?void 0:_.secretAccessKey)!=null?C:"",sessionToken:(S=_==null?void 0:_.sessionToken)!=null?S:"",dateNow:new Date().toISOString().replace(/-/g,"").split("T")[0],datetimeNow:new Date().toISOString().replace(/-/g,"").replace(/:/g,"").split(".")[0]+"Z"}}function rp(_,c=!1){let i="0123456789ABCDEF",m="";for(let h=0;h<_.length;h++){let b=_[h];b>="A"&&b<="Z"||b>="a"&&b<="z"||b>="0"&&b<="9"||b=="_"||b=="-"||b=="~"||b=="."?m+=b:b=="/"?c?m+="%2F":m+=b:(m+="%",m+=i[b.charCodeAt(0)>>4],m+=i[b.charCodeAt(0)&15])}return m}function np(_,c=null){var _i;let i=(_i=c==null?void 0:c.contentHash)!=null?_i:"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",m=new Map;m.set("x-amz-date",_.datetimeNow),m.set("x-amz-content-sha256",i),_.sessionToken&&m.set("x-amz-security-token",_.sessionToken);let h="";c!=null&&c.contentType&&(h+="content-type;"),h+="host;x-amz-content-sha256;x-amz-date",_.sessionToken&&(h+=";x-amz-security-token");let b=_.method+`
2
+ `+rp(_.url)+`
3
+ `+_.query;c!=null&&c.contentType&&(b+=`
4
+ content-type:`+(c==null?void 0:c.contentType)),b+=`
5
+ host:`+_.host+`
6
+ x-amz-content-sha256:`+i+`
7
+ x-amz-date:`+_.datetimeNow,_.sessionToken&&_.sessionToken.length>0&&(b+=`
8
+ x-amz-security-token:`+_.sessionToken),b+=`
22
9
 
23
- Permission to use, copy, modify, and/or distribute this software for any
24
- purpose with or without fee is hereby granted.
25
-
26
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
27
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
28
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
29
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
30
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
31
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
32
- PERFORMANCE OF THIS SOFTWARE.
33
- ***************************************************************************** */
10
+ `+h+`
11
+ `+i;let C=(0,ie.sha256)(b),S=`AWS4-HMAC-SHA256
12
+ `+_.datetimeNow+`
13
+ `+_.dateNow+"/"+_.region+"/"+_.service+`/aws4_request
14
+ `+C,R="AWS4"+_.secretAccessKey,M=ie.sha256.hmac.arrayBuffer(R,_.dateNow),L=ie.sha256.hmac.arrayBuffer(M,_.region),ii=ie.sha256.hmac.arrayBuffer(L,_.service),z=ie.sha256.hmac.arrayBuffer(ii,"aws4_request"),$=ie.sha256.hmac(z,S);return m.set("Authorization","AWS4-HMAC-SHA256 Credential="+_.accessKeyId+"/"+_.dateNow+"/"+_.region+"/"+_.service+"/aws4_request, SignedHeaders="+h+", Signature="+$),m}var tp=function(_,c,i,m=null,h=null){let b=ep(_,c,i),C={contentType:m,contentHash:h?ie.sha256.hex(h):null};return np(b,C)};function ee(_,c,i,m,h=null,b=null){((c==null?void 0:c.accessKeyId)||(c==null?void 0:c.sessionToken))&&(tp(c,i,m,h,b).forEach((S,R)=>{_.setRequestHeader(R,S)}),h&&_.setRequestHeader("content-type",h))}function Ol(_){if(_.indexOf("s3://")!=0)throw new Error("URL needs to start with s3://");let c=_.indexOf("/",5);if(c==-1)throw new Error("URL needs to contain a '/' after the host");let i=_.substring(5,c);if(!i)throw new Error("URL needs to contain a bucket name");let m=_.substring(c);if(!m)throw new Error("URL needs to contain key");return{bucket:i,path:m}}function re(_,c){var m;let i=Ol(c);return(m=_==null?void 0:_.endpoint)!=null&&m.startsWith("http")?`${_==null?void 0:_.endpoint}/${i.bucket}`+i.path:"https://"+Hl(_,c,i.bucket)+i.path}var si={_files:new Map,_fileInfoCache:new Map,_udfFunctions:new Map,_globalFileInfo:null,getFileInfo(_,c){try{let i=si._fileInfoCache.get(c),[m,h,b]=ni(_,"duckdb_web_fs_get_file_info_by_id",["number","number"],[c,(i==null?void 0:i.cacheEpoch)||0]);if(m!==0)return null;if(b===0)return i;let C=V(_,h,b);ci(_);let S=JSON.parse(C);if(S==null)return null;let R=fe(Ki({},S),{blob:null});return si._fileInfoCache.set(c,R),R}catch(i){return null}},getGlobalFileInfo(_){var c;try{let[i,m,h]=ni(_,"duckdb_web_get_global_file_info",["number"],[((c=si._globalFileInfo)==null?void 0:c.cacheEpoch)||0]);if(i!==0)return null;if(h===0)return si._globalFileInfo;let b=V(_,m,h);ci(_);let C=JSON.parse(b);return C==null?null:(si._globalFileInfo=fe(Ki({},C),{blob:null}),si._globalFileInfo)}catch(i){return null}},testPlatformFeature:(_,c)=>{switch(c){case 1:return typeof BigInt64Array<"u";default:return console.warn(`test for unknown feature: ${c}`),!1}},openFile:(_,c,i)=>{var m;try{si._fileInfoCache.delete(c);let h=si.getFileInfo(_,c);switch(h==null?void 0:h.dataProtocol){case 3:case 4:{if(i&1&&i&2)throw new Error(`Opening file ${h.fileName} failed: cannot open file with both read and write flags set`);if(i&32)throw new Error(`Opening file ${h.fileName} failed: appending to HTTP/S3 files is not supported`);if(i&2){let C=new XMLHttpRequest;if(h.dataProtocol==4?(C.open("HEAD",re(h.s3Config,h.dataUrl),!1),ee(C,h.s3Config,h.dataUrl,"HEAD")):C.open("HEAD",h.dataUrl,!1),C.send(null),C.status!=200&&C.status!=404)throw new Error(`Opening file ${h.fileName} failed: Unexpected return status from server (${C.status})`);if(C.status==404&&!(i&8||i&16))throw new Error(`Opening file ${h.fileName} failed: Cannot write to non-existent file without FILE_FLAGS_FILE_CREATE or FILE_FLAGS_FILE_CREATE_NEW flag.`);let S=_._malloc(1),R=new Uint8Array;_.HEAPU8.set(R,S);let M=_._malloc(2*8);return _.HEAPF64[(M>>3)+0]=1,_.HEAPF64[(M>>3)+1]=S,M}else if(i!=1)throw new Error(`Opening file ${h.fileName} failed: unsupported file flags: ${i}`);let b=null;try{let C=new XMLHttpRequest;h.dataProtocol==4?(C.open("HEAD",re(h.s3Config,h.dataUrl),!1),ee(C,h.s3Config,h.dataUrl,"HEAD")):C.open("HEAD",h.dataUrl,!1),C.setRequestHeader("Range","bytes=0-"),C.send(null);let S=C.getResponseHeader("Content-Length");if(C.status==206&&S!==null){let R=_._malloc(16);return _.HEAPF64[(R>>3)+0]=+S,_.HEAPF64[(R>>3)+1]=0,R}}catch(C){b=C,console.warn(`HEAD request with range header failed: ${C}`)}if(h.allowFullHttpReads){console.warn(`falling back to full HTTP read for: ${h.dataUrl}`);let C=new XMLHttpRequest;if(h.dataProtocol==4?(C.open("GET",re(h.s3Config,h.dataUrl),!1),ee(C,h.s3Config,h.dataUrl,"GET")):C.open("GET",h.dataUrl,!1),C.responseType="arraybuffer",C.send(null),C.status==200){let S=_._malloc(C.response.byteLength),R=new Uint8Array(C.response,0,C.response.byteLength);_.HEAPU8.set(R,S);let M=_._malloc(2*8);return _.HEAPF64[(M>>3)+0]=C.response.byteLength,_.HEAPF64[(M>>3)+1]=S,M}}if(b!=null)throw new Error(`Reading file ${h.fileName} failed with error: ${b}`);return 0}case 1:{let b=(m=si._files)==null?void 0:m.get(h.fileName);if(b){let R=_._malloc(16);return _.HEAPF64[(R>>3)+0]=b.size,_.HEAPF64[(R>>3)+1]=0,R}console.warn(`Buffering missing file: ${h.fileName}`);let C=_._malloc(2*8),S=_._malloc(1);return _.HEAPF64[(C>>3)+0]=1,_.HEAPF64[(C>>3)+1]=S,C}}}catch(h){console.error(h.toString()),zi(_,h.toString())}return 0},glob:(_,c,i)=>{try{let m=V(_,c,i);if(m.startsWith("http")||m.startsWith("s3://")){let h=new XMLHttpRequest;if(m.startsWith("s3://")){let b=si.getGlobalFileInfo(_);h.open("HEAD",re(b==null?void 0:b.s3Config,m),!1),ee(h,b==null?void 0:b.s3Config,m,"HEAD")}else h.open("HEAD",m,!1);if(h.send(null),h.status!=200&&h.status!==206){zi(_,`HEAD request failed: ${m}`);return}_.ccall("duckdb_web_fs_glob_add_path",null,["string"],[m])}}catch(m){return zi(_,m.toString()),0}},checkFile:(_,c,i)=>{try{let m=V(_,c,i);if(m.startsWith("http")||m.startsWith("s3://")){let h=new XMLHttpRequest;if(m.startsWith("s3://")){let b=si.getGlobalFileInfo(_);h.open("HEAD",re(b==null?void 0:b.s3Config,m),!1),ee(h,b==null?void 0:b.s3Config,m,"HEAD")}else h.open("HEAD",m,!1);return h.send(null),h.status==206||h.status==200}}catch(m){return!1}return!1},syncFile:(_,c)=>{},closeFile:(_,c)=>{let i=si.getFileInfo(_,c);switch(si._fileInfoCache.delete(c),i==null?void 0:i.dataProtocol){case 3:case 4:break;case 1:return}},truncateFile:(_,c,i)=>{let m=si.getFileInfo(_,c);switch(m==null?void 0:m.dataProtocol){case 3:zi(_,"Cannot truncate a http file");return;case 4:zi(_,"Cannot truncate an s3 file");return;case 1:zi(_,"truncateFile not implemented");return}return 0},readFile(_,c,i,m,h){var b;try{let C=si.getFileInfo(_,c);switch(C==null?void 0:C.dataProtocol){case 3:case 4:{if(!C.dataUrl)throw new Error(`Missing data URL for file ${c}`);try{let S=new XMLHttpRequest;if(C.dataProtocol==4?(S.open("GET",re(C==null?void 0:C.s3Config,C.dataUrl),!1),ee(S,C==null?void 0:C.s3Config,C.dataUrl,"GET")):S.open("GET",C.dataUrl,!1),S.responseType="arraybuffer",S.setRequestHeader("Range",`bytes=${h}-${h+m-1}`),S.send(null),S.status==206||S.status==200&&m==S.response.byteLength&&h==0){let R=new Uint8Array(S.response,0,Math.min(S.response.byteLength,m));return _.HEAPU8.set(R,i),R.byteLength}else throw S.status==200?new Error(`Range request for ${C.dataUrl} did not return a partial response: ${S.status} "${S.statusText}"`):new Error(`Range request for ${C.dataUrl} did returned non-success status: ${S.status} "${S.statusText}"`)}catch(S){throw new Error(`Range request for ${C.dataUrl} failed with error: ${S}"`)}}case 1:{let S=(b=si._files)==null?void 0:b.get(C.fileName);if(!S)throw new Error(`No handle available for file: ${C.fileName}`);let R=S.slice(h,h+m),M=new Uint8Array(new FileReaderSync().readAsArrayBuffer(R));return _.HEAPU8.set(M,i),M.byteLength}}return 0}catch(C){return zi(_,C.toString()),0}},writeFile:(_,c,i,m,h)=>{let b=si.getFileInfo(_,c);switch(b==null?void 0:b.dataProtocol){case 3:return zi(_,"Cannot write to HTTP file"),0;case 4:{let C=_.HEAPU8.subarray(i,i+m),S=new XMLHttpRequest;return S.open("PUT",re(b==null?void 0:b.s3Config,b.dataUrl),!1),ee(S,b==null?void 0:b.s3Config,b.dataUrl,"PUT","",C),S.send(C),m}case 1:return zi(_,"writefile not implemented"),0}return 0},getLastFileModificationTime:(_,c)=>{var m;let i=si.getFileInfo(_,c);switch(i==null?void 0:i.dataProtocol){case 1:{if(!((m=si._files)==null?void 0:m.get(i.fileName)))throw Error(`No handle available for file: ${i.fileName}`);return 0}case 3:case 4:return new Date().getTime()}return 0},checkDirectory:(_,c,i)=>{let m=V(_,c,i);return console.log(`checkDirectory: ${m}`),!1},createDirectory:(_,c,i)=>{let m=V(_,c,i);console.log(`createDirectory: ${m}`)},removeDirectory:(_,c,i)=>{let m=V(_,c,i);console.log(`removeDirectory: ${m}`)},listDirectoryEntries:(_,c,i)=>{let m=V(_,c,i);return console.log(`listDirectoryEntries: ${m}`),!1},moveFile:(_,c,i,m,h)=>{var R,M;let b=V(_,c,i),C=V(_,m,h),S=(R=si._files)==null?void 0:R.get(b);S!==void 0&&(si._files.delete(S),si._files.set(C,S));for(let[L,ii]of((M=si._fileInfoCache)==null?void 0:M.entries())||[])if(ii.dataUrl==b){si._fileInfoCache.delete(L);break}return!0},removeFile:(_,c,i)=>{},callScalarUDF:(_,c,i,m,h,b,C)=>{Nr(si,_,c,i,m,h,b,C)}};var ap=(()=>{var _=import.meta.url;return function(c){c=c||{};var i=typeof c<"u"?c:{},m,h;i.ready=new Promise(function(e,r){m=e,h=r});var b=Object.assign({},i),C=[],S="./this.program",R=(e,r)=>{throw r},M=typeof window=="object",L=typeof importScripts=="function",ii=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",z="";function $(e){return i.locateFile?i.locateFile(e,z):z+e}var _i,bi,fi,Ii;function Ui(e){if(e instanceof Fr)return;pi("exiting due to exception: "+e)}var Ci,Ni,Oi;ii?(L?z=$e().dirname(z)+"/":z=__dirname+"/",Oi=()=>{Ni||(Ci=Yt(),Ni=$e())},_i=function(r,n){return Oi(),r=Ni.normalize(r),Ci.readFileSync(r,n?void 0:"utf8")},fi=e=>{var r=_i(e,!0);return r.buffer||(r=new Uint8Array(r)),r},bi=(e,r,n)=>{Oi(),e=Ni.normalize(e),Ci.readFile(e,function(t,a){t?n(t):r(a.buffer)})},process.argv.length>1&&(S=process.argv[1].replace(/\\/g,"/")),C=process.argv.slice(2),process.on("uncaughtException",function(e){if(!(e instanceof Fr))throw e}),process.on("unhandledRejection",function(e){throw e}),R=(e,r)=>{if(ar())throw process.exitCode=e,r;Ui(r),process.exit(e)},i.inspect=function(){return"[Emscripten Module object]"}):(M||L)&&(L?z=self.location.href:typeof document<"u"&&document.currentScript&&(z=document.currentScript.src),_&&(z=_),z.indexOf("blob:")!==0?z=z.substr(0,z.replace(/[?#].*/,"").lastIndexOf("/")+1):z="",_i=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.send(null),r.responseText},L&&(fi=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.responseType="arraybuffer",r.send(null),new Uint8Array(r.response)}),bi=(e,r,n)=>{var t=new XMLHttpRequest;t.open("GET",e,!0),t.responseType="arraybuffer",t.onload=()=>{if(t.status==200||t.status==0&&t.response){r(t.response);return}n()},t.onerror=n,t.send(null)},Ii=e=>document.title=e);var Re=i.print||console.log.bind(console),pi=i.printErr||console.warn.bind(console);Object.assign(i,b),b=null,i.arguments&&(C=i.arguments),i.thisProgram&&(S=i.thisProgram),i.quit&&(R=i.quit);var Bi=0,X=e=>{Bi=e},ji=()=>Bi,yi;i.wasmBinary&&(yi=i.wasmBinary);var wi=i.noExitRuntime||!0;typeof WebAssembly!="object"&&li("no native wasm support detected");var mi,hi=!1,ri;function Ei(e,r){e||li(r)}function Gi(e){var r=i["_"+e];return r}function Pi(e,r,n,t,a){var o={string:function(N){var G=0;if(N!=null&&N!==0){var Z=(N.length<<2)+1;G=xi(Z),Ie(N,G,Z)}return G},array:function(N){var G=xi(N.length);return Ji(N,G),G}};function s(N){return r==="string"?Li(N):r==="boolean"?Boolean(N):N}var l=Gi(e),u=[],f=0;if(t)for(var p=0;p<t.length;p++){var w=o[n[p]];w?(f===0&&(f=v()),u[p]=w(t[p])):u[p]=t[p]}var E=l.apply(null,u);function x(N){return f!==0&&j(f),s(N)}return E=x(E),E}var Fe=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function de(e,r,n){for(var t=r+n,a=r;e[a]&&!(a>=t);)++a;if(a-r>16&&e.buffer&&Fe)return Fe.decode(e.subarray(r,a));for(var o="";r<a;){var s=e[r++];if(!(s&128)){o+=String.fromCharCode(s);continue}var l=e[r++]&63;if((s&224)==192){o+=String.fromCharCode((s&31)<<6|l);continue}var u=e[r++]&63;if((s&240)==224?s=(s&15)<<12|l<<6|u:s=(s&7)<<18|l<<12|u<<6|e[r++]&63,s<65536)o+=String.fromCharCode(s);else{var f=s-65536;o+=String.fromCharCode(55296|f>>10,56320|f&1023)}}return o}function Li(e,r){return e?de(P,e,r):""}function xe(e,r,n,t){if(!(t>0))return 0;for(var a=n,o=n+t-1,s=0;s<e.length;++s){var l=e.charCodeAt(s);if(l>=55296&&l<=57343){var u=e.charCodeAt(++s);l=65536+((l&1023)<<10)|u&1023}if(l<=127){if(n>=o)break;r[n++]=l}else if(l<=2047){if(n+1>=o)break;r[n++]=192|l>>6,r[n++]=128|l&63}else if(l<=65535){if(n+2>=o)break;r[n++]=224|l>>12,r[n++]=128|l>>6&63,r[n++]=128|l&63}else{if(n+3>=o)break;r[n++]=240|l>>18,r[n++]=128|l>>12&63,r[n++]=128|l>>6&63,r[n++]=128|l&63}}return r[n]=0,n-a}function Ie(e,r,n){return xe(e,P,r,n)}function Je(e){for(var r=0,n=0;n<e.length;++n){var t=e.charCodeAt(n);t>=55296&&t<=57343&&(t=65536+((t&1023)<<10)|e.charCodeAt(++n)&1023),t<=127?++r:t<=2047?r+=2:t<=65535?r+=3:r+=4}return r}function Ji(e,r){Mi.set(e,r)}function qi(e,r,n){for(var t=0;t<e.length;++t)Mi[r++>>0]=e.charCodeAt(t);n||(Mi[r>>0]=0)}var Qi,Mi,P,ne,Qe,H,Ze,zt,ir;function Ue(e){Qi=e,i.HEAP8=Mi=new Int8Array(e),i.HEAP16=ne=new Int16Array(e),i.HEAP32=H=new Int32Array(e),i.HEAPU8=P=new Uint8Array(e),i.HEAPU16=Qe=new Uint16Array(e),i.HEAPU32=Ze=new Uint32Array(e),i.HEAPF32=zt=new Float32Array(e),i.HEAPF64=ir=new Float64Array(e)}var Wr=i.INITIAL_MEMORY||16777216,er,Ne=[],rr=[],nr=[],tr=[],qr=!1;function ar(){return wi}function Xr(){if(i.preRun)for(typeof i.preRun=="function"&&(i.preRun=[i.preRun]);i.preRun.length;)Vi(i.preRun.shift());me(Ne)}function Kr(){qr=!0,me(rr)}function Yr(){me(nr)}function zr(){if(i.postRun)for(typeof i.postRun=="function"&&(i.postRun=[i.postRun]);i.postRun.length;)te(i.postRun.shift());me(tr)}function Vi(e){Ne.unshift(e)}function Be(e){rr.unshift(e)}function te(e){tr.unshift(e)}var $i=0,Me=null,Si=null;function Gr(e){$i++,i.monitorRunDependencies&&i.monitorRunDependencies($i)}function or(e){if($i--,i.monitorRunDependencies&&i.monitorRunDependencies($i),$i==0&&(Me!==null&&(clearInterval(Me),Me=null),Si)){var r=Si;Si=null,r()}}function li(e){i.onAbort&&i.onAbort(e),e="Aborted("+e+")",pi(e),hi=!0,ri=1,e+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(e);throw h(r),r}var sr="data:application/octet-stream;base64,";function lr(e){return e.startsWith(sr)}var Ai;i.locateFile?(Ai="./duckdb-mvp.wasm",lr(Ai)||(Ai=$(Ai))):Ai=new URL("./duckdb-mvp.wasm",import.meta.url).toString();function ae(e){try{if(e==Ai&&yi)return new Uint8Array(yi);if(fi)return fi(e);throw"both async and sync fetching of the wasm failed"}catch(r){li(r)}}function pe(){return!yi&&(M||L)&&typeof fetch=="function"?fetch(Ai,{credentials:"same-origin"}).then(function(e){if(!e.ok)throw"failed to load wasm binary file at '"+Ai+"'";return e.arrayBuffer()}).catch(function(){return ae(Ai)}):Promise.resolve().then(function(){return ae(Ai)})}function ur(){var e={a:_t};function r(s,l){var u=s.exports;i.asm=u,mi=i.asm.Te,Ue(mi.buffer),er=i.asm.Rf,Be(i.asm.Ue),or("wasm-instantiate")}Gr("wasm-instantiate");function n(s){r(s.instance)}function t(s){return pe().then(function(l){return WebAssembly.instantiate(l,e)}).then(function(l){return l}).then(s,function(l){pi("failed to asynchronously prepare wasm: "+l),li(l)})}function a(){return!yi&&typeof WebAssembly.instantiateStreaming=="function"&&!lr(Ai)&&typeof fetch=="function"?fetch(Ai,{credentials:"same-origin"}).then(function(s){var l=WebAssembly.instantiateStreaming(s,e);return l.then(n,function(u){return pi("wasm streaming compile failed: "+u),pi("falling back to ArrayBuffer instantiation"),t(n)})}):t(n)}if(i.instantiateWasm)try{var o=i.instantiateWasm(e,r);return o}catch(s){return pi("Module.instantiateWasm callback failed with error: "+s),!1}return a().catch(h),{}}function me(e){for(;e.length>0;){var r=e.shift();if(typeof r=="function"){r(i);continue}var n=r.func;typeof n=="number"?r.arg===void 0?B(n)():B(n)(r.arg):n(r.arg===void 0?null:r.arg)}}var ye=[];function B(e){var r=ye[e];return r||(e>=ye.length&&(ye.length=e+1),ye[e]=r=er.get(e)),r}function Vr(e){if(e instanceof Fr||e=="unwind")return ri;R(1,e)}function $r(e,r,n,t){li("Assertion failed: "+Li(e)+", at: "+[r?Li(r):"unknown filename",n,t?Li(t):"unknown function"])}function cr(e){return Di(e+24)+24}var Xi=[];function He(e){e.add_ref()}var oe=0;function _r(e){var r=new Hi(e);return r.get_caught()||(r.set_caught(!0),oe--),r.set_rethrown(!1),Xi.push(r),He(r),r.get_exception_ptr()}var Ti=0;function Hi(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(r){H[this.ptr+4>>2]=r},this.get_type=function(){return H[this.ptr+4>>2]},this.set_destructor=function(r){H[this.ptr+8>>2]=r},this.get_destructor=function(){return H[this.ptr+8>>2]},this.set_refcount=function(r){H[this.ptr>>2]=r},this.set_caught=function(r){r=r?1:0,Mi[this.ptr+12>>0]=r},this.get_caught=function(){return Mi[this.ptr+12>>0]!=0},this.set_rethrown=function(r){r=r?1:0,Mi[this.ptr+13>>0]=r},this.get_rethrown=function(){return Mi[this.ptr+13>>0]!=0},this.init=function(r,n){this.set_adjusted_ptr(0),this.set_type(r),this.set_destructor(n),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var r=H[this.ptr>>2];H[this.ptr>>2]=r+1},this.release_ref=function(){var r=H[this.ptr>>2];return H[this.ptr>>2]=r-1,r===1},this.set_adjusted_ptr=function(r){H[this.ptr+16>>2]=r},this.get_adjusted_ptr=function(){return H[this.ptr+16>>2]},this.get_exception_ptr=function(){var r=F(this.get_type());if(r)return H[this.excPtr>>2];var n=this.get_adjusted_ptr();return n!==0?n:this.excPtr}}function he(e){return ti(new Hi(e).ptr)}function Ri(e){if(e.release_ref()&&!e.get_rethrown()){var r=e.get_destructor();r&&B(r)(e.excPtr),he(e.excPtr)}}function fr(){g(0);var e=Xi.pop();Ri(e),Ti=0}function Jr(e){throw Ti||(Ti=e),e}function Qr(){var e=Ti;if(!e)return X(0),0;var r=new Hi(e);r.set_adjusted_ptr(e);var n=r.get_type();if(!n)return X(0),e|0;for(var t=Array.prototype.slice.call(arguments),a=0;a<t.length;a++){var o=t[a];if(o===0||o===n)break;var s=r.ptr+16;if(Wi(o,n,s))return X(o),e|0}return X(n),e|0}function Zr(){var e=Ti;if(!e)return X(0),0;var r=new Hi(e);r.set_adjusted_ptr(e);var n=r.get_type();if(!n)return X(0),e|0;for(var t=Array.prototype.slice.call(arguments),a=0;a<t.length;a++){var o=t[a];if(o===0||o===n)break;var s=r.ptr+16;if(Wi(o,n,s))return X(o),e|0}return X(n),e|0}function en(){var e=Ti;if(!e)return X(0),0;var r=new Hi(e);r.set_adjusted_ptr(e);var n=r.get_type();if(!n)return X(0),e|0;for(var t=Array.prototype.slice.call(arguments),a=0;a<t.length;a++){var o=t[a];if(o===0||o===n)break;var s=r.ptr+16;if(Wi(o,n,s))return X(o),e|0}return X(n),e|0}function rn(){var e=Ti;if(!e)return X(0),0;var r=new Hi(e);r.set_adjusted_ptr(e);var n=r.get_type();if(!n)return X(0),e|0;for(var t=Array.prototype.slice.call(arguments),a=0;a<t.length;a++){var o=t[a];if(o===0||o===n)break;var s=r.ptr+16;if(Wi(o,n,s))return X(o),e|0}return X(n),e|0}function nn(){var e=Xi.pop();e||li("no exception to throw");var r=e.excPtr;throw e.get_rethrown()||(Xi.push(e),e.set_rethrown(!0),e.set_caught(!1),oe++),Ti=r,r}function tn(e,r,n){var t=new Hi(e);throw t.init(r,n),Ti=e,oe++,e}function dr(){return oe}var vi={buffers:[null,[],[]],printChar:function(e,r){var n=vi.buffers[e];r===0||r===10?((e===1?Re:pi)(de(n,0)),n.length=0):n.push(r)},varargs:void 0,get:function(){vi.varargs+=4;var e=H[vi.varargs-4>>2];return e},getStr:function(e){var r=Li(e);return r}};function an(e,r,n,t,a){}function on(){pi("missing function: $SOCKFS"),li(-1)}function pr(){pi("missing function: $FS"),li(-1)}function se(e){var r=on.getSocket(e);if(!r)throw new pr.ErrnoError(8);return r}function Oe(e){return(e&255)+"."+(e>>8&255)+"."+(e>>16&255)+"."+(e>>24&255)}function mr(e){var r="",n=0,t=0,a=0,o=0,s=0,l=0,u=[e[0]&65535,e[0]>>16,e[1]&65535,e[1]>>16,e[2]&65535,e[2]>>16,e[3]&65535,e[3]>>16],f=!0,p="";for(l=0;l<5;l++)if(u[l]!==0){f=!1;break}if(f){if(p=Oe(u[6]|u[7]<<16),u[5]===-1)return r="::ffff:",r+=p,r;if(u[5]===0)return r="::",p==="0.0.0.0"&&(p=""),p==="0.0.0.1"&&(p="1"),r+=p,r}for(n=0;n<8;n++)u[n]===0&&(n-a>1&&(s=0),a=n,s++),s>t&&(t=s,o=n-t+1);for(n=0;n<8;n++){if(t>1&&u[n]===0&&n>=o&&n<o+t){n===o&&(r+=":",o===0&&(r+=":"));continue}r+=Number(ei(u[n]&65535)).toString(16),r+=n<7?":":""}return r}function yr(e,r){var n=ne[e>>1],t=ei(Qe[e+2>>1]),a;switch(n){case 2:if(r!==16)return{errno:28};a=H[e+4>>2],a=Oe(a);break;case 10:if(r!==28)return{errno:28};a=[H[e+8>>2],H[e+12>>2],H[e+16>>2],H[e+20>>2]],a=mr(a);break;default:return{errno:5}}return{family:n,addr:a,port:t}}function ve(e){for(var r=e.split("."),n=0;n<4;n++){var t=Number(r[n]);if(isNaN(t))return null;r[n]=t}return(r[0]|r[1]<<8|r[2]<<16|r[3]<<24)>>>0}function be(e){return parseInt(e)}function Pe(e){var r,n,t,a,o=/^((?=.*::)(?!.*::.+::)(::)?([\dA-F]{1,4}:(:|\b)|){5}|([\dA-F]{1,4}:){6})((([\dA-F]{1,4}((?!\3)::|:\b|$))|(?!\2\3)){2}|(((2[0-4]|1\d|[1-9])?\d|25[0-5])\.?\b){4})$/i,s=[];if(!o.test(e))return null;if(e==="::")return[0,0,0,0,0,0,0,0];for(e.startsWith("::")?e=e.replace("::","Z:"):e=e.replace("::",":Z:"),e.indexOf(".")>0?(e=e.replace(new RegExp("[.]","g"),":"),r=e.split(":"),r[r.length-4]=be(r[r.length-4])+be(r[r.length-3])*256,r[r.length-3]=be(r[r.length-2])+be(r[r.length-1])*256,r=r.slice(0,r.length-2)):r=e.split(":"),t=0,a=0,n=0;n<r.length;n++)if(typeof r[n]=="string")if(r[n]==="Z"){for(a=0;a<8-r.length+1;a++)s[n+a]=0;t=a-1}else s[n+t]=J(parseInt(r[n],16));else s[n+t]=r[n];return[s[1]<<16|s[0],s[3]<<16|s[2],s[5]<<16|s[4],s[7]<<16|s[6]]}var Fi={address_map:{id:1,addrs:{},names:{}},lookup_name:function(e){var r=ve(e);if(r!==null||(r=Pe(e),r!==null))return e;var n;if(Fi.address_map.addrs[e])n=Fi.address_map.addrs[e];else{var t=Fi.address_map.id++;Ei(t<65535,"exceeded max address mappings of 65535"),n="172.29."+(t&255)+"."+(t&65280),Fi.address_map.names[n]=e,Fi.address_map.addrs[e]=n}return n},lookup_addr:function(e){return Fi.address_map.names[e]?Fi.address_map.names[e]:null}};function hr(e,r,n){if(n&&e===0)return null;var t=yr(e,r);if(t.errno)throw new pr.ErrnoError(t.errno);return t.addr=Fi.lookup_addr(t.addr)||t.addr,t}function sn(e,r,n){var t=se(e),a=hr(r,n);return t.sock_ops.bind(t,a.addr,a.port),0}function ln(e,r,n){var t=se(e),a=hr(r,n);return t.sock_ops.connect(t,a.addr,a.port),0}function un(e,r,n,t){return r=vi.getStr(r),r=vi.calculateAt(e,r),vi.doAccess(r,n)}function vr(e,r,n){return vi.varargs=n,0}function cn(e,r){}function _n(e,r,n){}function fn(e,r,n){}function br(e,r){P.fill(0,e,e+r)}function Le(e,r,n,t,a){switch(r){case 2:n=ve(n),br(e,16),a&&(H[a>>2]=16),ne[e>>1]=r,H[e+4>>2]=n,ne[e+2>>1]=J(t);break;case 10:n=Pe(n),br(e,28),a&&(H[a>>2]=28),H[e>>2]=r,H[e+8>>2]=n[0],H[e+12>>2]=n[1],H[e+16>>2]=n[2],H[e+20>>2]=n[3],ne[e+2>>1]=J(t);break;default:return 5}return 0}function dn(e,r,n){var t=se(e);if(!t.daddr)return-53;var a=Le(r,t.family,Fi.lookup_name(t.daddr),t.dport,n);return 0}function pn(e,r,n,t,a){var o=se(e);return r===1&&n===4?(H[t>>2]=o.error,H[a>>2]=4,o.error=null,0):-50}function mn(e,r,n){return vi.varargs=n,0}function yn(e,r){}function hn(e,r,n){}function vn(e,r,n,t){}function bn(e,r,n,t){vi.varargs=t}function jn(e,r,n,t,a,o){var s=se(e),l=s.sock_ops.recvmsg(s,n);if(!l)return 0;if(a)var u=Le(a,s.family,Fi.lookup_name(l.addr),l.port,o);return P.set(l.buffer,r),l.buffer.byteLength}function gn(e,r,n,t){}function wn(e){}function kn(e,r,n,t,a,o){}function Cn(e,r,n){}function En(e,r){}function Sn(e,r,n){}function Dn(e){}var jr="To use dlopen, you need enable dynamic linking, see https://github.com/emscripten-core/emscripten/wiki/Linking";function gr(e,r){li(jr)}function We(e,r){li(jr)}function An(){return Date.now()}var Tn=!0;function Rn(){return Tn}function qe(){li("")}function Fn(e,r){return globalThis.DUCKDB_RUNTIME.createDirectory(i,e,r)}function le(e,r){return globalThis.DUCKDB_RUNTIME.checkDirectory(i,e,r)}function xn(e,r){return globalThis.DUCKDB_RUNTIME.listDirectoryEntries(i,e,r)}function In(e,r){return globalThis.DUCKDB_RUNTIME.removeDirectory(i,e,r)}function Un(e){return globalThis.DUCKDB_RUNTIME.closeFile(i,e)}function Nn(e,r){return globalThis.DUCKDB_RUNTIME.checkFile(i,e,r)}function Bn(e){return globalThis.DUCKDB_RUNTIME.getLastFileModificationTime(i,e)}function Mn(e,r,n,t){return globalThis.DUCKDB_RUNTIME.moveFile(i,e,r,n,t)}function Hn(e,r){return globalThis.DUCKDB_RUNTIME.openFile(i,e,r)}function On(e,r,n,t){return globalThis.DUCKDB_RUNTIME.readFile(i,e,r,n,t)}function Pn(e,r){return globalThis.DUCKDB_RUNTIME.truncateFile(i,e,r)}function Ln(e,r,n,t){return globalThis.DUCKDB_RUNTIME.writeFile(i,e,r,n,t)}function Wn(e,r){return globalThis.DUCKDB_RUNTIME.glob(i,e,r)}function je(e){return globalThis.DUCKDB_RUNTIME.testPlatformFeature(i,e)}function qn(e,r,n,t,a,o){return globalThis.DUCKDB_RUNTIME.callScalarUDF(i,e,r,n,t,a,o)}function ue(){return 2147483648}var Xe;ii?Xe=()=>{var e=process.hrtime();return e[0]*1e3+e[1]/1e6}:Xe=()=>performance.now();function wr(e,r,n){P.copyWithin(e,r,r+n)}function kr(e){try{return mi.grow(e-Qi.byteLength+65535>>>16),Ue(mi.buffer),1}catch(r){}}function Xn(e){var r=P.length;e=e>>>0;var n=ue();if(e>n)return!1;let t=(u,f)=>u+(f-u%f)%f;for(var a=1;a<=4;a*=2){var o=r*(1+.2/a);o=Math.min(o,e+100663296);var s=Math.min(n,t(Math.max(e,o),65536)),l=kr(s);if(l)return!0}return!1}var Ke={};function Kn(){return S||"./this.program"}function ce(){if(!ce.strings){var e=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",r={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:e,_:Kn()};for(var n in Ke)Ke[n]===void 0?delete r[n]:r[n]=Ke[n];var t=[];for(var n in r)t.push(n+"="+r[n]);ce.strings=t}return ce.strings}function Yn(e,r){var n=0;return ce().forEach(function(t,a){var o=r+n;H[e+a*4>>2]=o,qi(t,o),n+=t.length+1}),0}function Gt(e,r){var n=ce();H[e>>2]=n.length;var t=0;return n.forEach(function(a){t+=a.length+1}),H[r>>2]=t,0}function zn(e){return 0}function Gn(e,r,n,t,a,o){var s=vi.getStreamFromFD(e),l=vi.doReadv(s,r,n,t);return H[o>>2]=l,0}function Vn(e,r,n,t,a,o){var s=vi.getStreamFromFD(e),l=vi.doWritev(s,r,n,t);return H[o>>2]=l,0}function $n(e,r,n,t){var a=vi.getStreamFromFD(e),o=vi.doReadv(a,r,n);return H[t>>2]=o,0}function Jn(e,r,n,t,a){}function Qn(e){var r=vi.getStreamFromFD(e);return r.stream_ops&&r.stream_ops.fsync?-r.stream_ops.fsync(r):0}function Zn(e,r,n,t){for(var a=0,o=0;o<n;o++){var s=H[r>>2],l=H[r+4>>2];r+=8;for(var u=0;u<l;u++)vi.printChar(e,P[s+u]);a+=l}return H[t>>2]=a,0}function it(){return ji()}function et(e,r,n,t){var a=0,o=0,s=0,l=0,u=0,f=0,p;function w(E,x,N,G,Z,ui){var T,q,ai,di;return q=E===10?28:16,Z=E===10?mr(Z):Oe(Z),T=Di(q),di=Le(T,E,Z,ui),Ei(!di),ai=Di(32),H[ai+4>>2]=E,H[ai+8>>2]=x,H[ai+12>>2]=N,H[ai+24>>2]=G,H[ai+20>>2]=T,E===10?H[ai+16>>2]=28:H[ai+16>>2]=16,H[ai+28>>2]=0,ai}if(n&&(s=H[n>>2],l=H[n+4>>2],u=H[n+8>>2],f=H[n+12>>2]),u&&!f&&(f=u===2?17:6),!u&&f&&(u=f===17?2:1),f===0&&(f=6),u===0&&(u=1),!e&&!r)return-2;if(s&-1088||n!==0&&H[n>>2]&2&&!e)return-1;if(s&32)return-2;if(u!==0&&u!==1&&u!==2)return-7;if(l!==0&&l!==2&&l!==10)return-6;if(r&&(r=Li(r),o=parseInt(r,10),isNaN(o)))return s&1024?-2:-8;if(!e)return l===0&&(l=2),(s&1)===0&&(l===2?a=W(2130706433):a=[0,0,0,1]),p=w(l,u,f,null,a,o),H[t>>2]=p,0;if(e=Li(e),a=ve(e),a!==null)if(l===0||l===2)l=2;else if(l===10&&s&8)a=[0,0,W(65535),a],l=10;else return-2;else if(a=Pe(e),a!==null)if(l===0||l===10)l=10;else return-2;return a!=null?(p=w(l,u,f,e,a,o),H[t>>2]=p,0):s&4?-2:(e=Fi.lookup_name(e),a=ve(e),l===0?l=2:l===10&&(a=[0,0,W(65535),a]),p=w(l,u,f,null,a,o),H[t>>2]=p,0)}function rt(){if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function"){var e=new Uint8Array(1);return function(){return crypto.getRandomValues(e),e[0]}}else if(ii)try{var r=bl("crypto");return function(){return r.randomBytes(1)[0]}}catch(n){}return function(){li("randomDevice")}}function ge(e,r){ge.randomDevice||(ge.randomDevice=rt());for(var n=0;n<r;n++)Mi[e+n>>0]=ge.randomDevice();return 0}function nt(e,r,n,t,a,o,s){var l=yr(e,r);if(l.errno)return-6;var u=l.port,f=l.addr,p=!1;if(n&&t){var w;if(s&1||!(w=Fi.lookup_addr(f))){if(s&8)return-2}else f=w;var E=Ie(f,n,t);E+1>=t&&(p=!0)}if(a&&o){u=""+u;var E=Ie(u,a,o);E+1>=o&&(p=!0)}return p?-12:0}function tt(e){return e}function at(e){X(e)}function we(e){return e%4===0&&(e%100!==0||e%400===0)}function ot(e,r){for(var n=0,t=0;t<=r;n+=e[t++]);return n}var Cr=[31,29,31,30,31,30,31,31,30,31,30,31],Er=[31,28,31,30,31,30,31,31,30,31,30,31];function st(e,r){for(var n=new Date(e.getTime());r>0;){var t=we(n.getFullYear()),a=n.getMonth(),o=(t?Cr:Er)[a];if(r>o-n.getDate())r-=o-n.getDate()+1,n.setDate(1),a<11?n.setMonth(a+1):(n.setMonth(0),n.setFullYear(n.getFullYear()+1));else return n.setDate(n.getDate()+r),n}return n}function lt(e,r,n,t){var a=H[t+40>>2],o={tm_sec:H[t>>2],tm_min:H[t+4>>2],tm_hour:H[t+8>>2],tm_mday:H[t+12>>2],tm_mon:H[t+16>>2],tm_year:H[t+20>>2],tm_wday:H[t+24>>2],tm_yday:H[t+28>>2],tm_isdst:H[t+32>>2],tm_gmtoff:H[t+36>>2],tm_zone:a?Li(a):""},s=Li(n),l={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var u in l)s=s.replace(new RegExp(u,"g"),l[u]);var f=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],p=["January","February","March","April","May","June","July","August","September","October","November","December"];function w(T,q,ai){for(var di=typeof T=="number"?T.toString():T||"";di.length<q;)di=ai[0]+di;return di}function E(T,q){return w(T,q,"0")}function x(T,q){function ai(Zi){return Zi<0?-1:Zi>0?1:0}var di;return(di=ai(T.getFullYear()-q.getFullYear()))===0&&(di=ai(T.getMonth()-q.getMonth()))===0&&(di=ai(T.getDate()-q.getDate())),di}function N(T){switch(T.getDay()){case 0:return new Date(T.getFullYear()-1,11,29);case 1:return T;case 2:return new Date(T.getFullYear(),0,3);case 3:return new Date(T.getFullYear(),0,2);case 4:return new Date(T.getFullYear(),0,1);case 5:return new Date(T.getFullYear()-1,11,31);case 6:return new Date(T.getFullYear()-1,11,30)}}function G(T){var q=st(new Date(T.tm_year+1900,0,1),T.tm_yday),ai=new Date(q.getFullYear(),0,4),di=new Date(q.getFullYear()+1,0,4),Zi=N(ai),yd=N(di);return x(Zi,q)<=0?x(yd,q)<=0?q.getFullYear()+1:q.getFullYear():q.getFullYear()-1}var Z={"%a":function(T){return f[T.tm_wday].substring(0,3)},"%A":function(T){return f[T.tm_wday]},"%b":function(T){return p[T.tm_mon].substring(0,3)},"%B":function(T){return p[T.tm_mon]},"%C":function(T){var q=T.tm_year+1900;return E(q/100|0,2)},"%d":function(T){return E(T.tm_mday,2)},"%e":function(T){return w(T.tm_mday,2," ")},"%g":function(T){return G(T).toString().substring(2)},"%G":function(T){return G(T)},"%H":function(T){return E(T.tm_hour,2)},"%I":function(T){var q=T.tm_hour;return q==0?q=12:q>12&&(q-=12),E(q,2)},"%j":function(T){return E(T.tm_mday+ot(we(T.tm_year+1900)?Cr:Er,T.tm_mon-1),3)},"%m":function(T){return E(T.tm_mon+1,2)},"%M":function(T){return E(T.tm_min,2)},"%n":function(){return`
15
+ `},"%p":function(T){return T.tm_hour>=0&&T.tm_hour<12?"AM":"PM"},"%S":function(T){return E(T.tm_sec,2)},"%t":function(){return" "},"%u":function(T){return T.tm_wday||7},"%U":function(T){var q=T.tm_yday+7-T.tm_wday;return E(Math.floor(q/7),2)},"%V":function(T){var q=Math.floor((T.tm_yday+7-(T.tm_wday+6)%7)/7);if((T.tm_wday+371-T.tm_yday-2)%7<=2&&q++,q){if(q==53){var di=(T.tm_wday+371-T.tm_yday)%7;di!=4&&(di!=3||!we(T.tm_year))&&(q=1)}}else{q=52;var ai=(T.tm_wday+7-T.tm_yday-1)%7;(ai==4||ai==5&&we(T.tm_year%400-1))&&q++}return E(q,2)},"%w":function(T){return T.tm_wday},"%W":function(T){var q=T.tm_yday+7-(T.tm_wday+6)%7;return E(Math.floor(q/7),2)},"%y":function(T){return(T.tm_year+1900).toString().substring(2)},"%Y":function(T){return T.tm_year+1900},"%z":function(T){var q=T.tm_gmtoff,ai=q>=0;return q=Math.abs(q)/60,q=q/60*100+q%60,(ai?"+":"-")+String("0000"+q).slice(-4)},"%Z":function(T){return T.tm_zone},"%%":function(){return"%"}};s=s.replace(/%%/g,"\0\0");for(var u in Z)s.includes(u)&&(s=s.replace(new RegExp(u,"g"),Z[u](o)));s=s.replace(/\0\0/g,"%");var ui=ct(s,!1);return ui.length>r?0:(Ji(ui,e),ui.length-1)}function ut(e,r,n,t){return lt(e,r,n,t)}function ct(e,r,n){var t=n>0?n:Je(e)+1,a=new Array(t),o=xe(e,a,0,a.length);return r&&(a.length=o),a}var _t={p:$r,j:cr,C:_r,H:fr,b:Qr,n:Zr,K:en,$:rn,i:he,ha:nn,w:tn,G:dr,e:Jr,Ca:an,Ea:sn,Da:ln,Se:un,V:vr,Qa:cn,se:_n,Ma:fn,ya:dn,Ba:pn,Sa:mn,Na:yn,Ra:hn,Oa:vn,na:bn,za:jn,Qe:gn,la:wn,Aa:kn,ka:Cn,Pa:En,ma:Sn,Ga:Dn,Ia:gr,Ha:We,Ua:An,Ta:Rn,da:qe,Ie:Fn,Je:le,Ge:xn,He:In,ua:Un,Ee:Nn,Le:Bn,Fe:Mn,Me:Hn,ja:On,Ke:Pn,va:Ln,De:Wn,ta:je,Ne:qn,Va:ue,oe:Xe,nb:wr,hd:Xn,Xa:Yn,Ya:Gt,_:zn,re:Gn,ub:Vn,pa:$n,Ae:Jn,Re:Qn,ia:Zn,a:it,Fa:et,La:ge,xa:nt,ra:Lu,S:Cu,Z:Ql,Yb:mf,sa:Pu,aa:Su,qa:Jl,Zb:pf,x:au,Ka:Fu,q:yu,ba:bu,r:mu,d:Xl,ea:Nu,F:ju,Qb:kf,c:Kl,X:Eu,h:zl,Ob:Ef,m:$l,oa:fu,o:Gl,y:su,B:ru,P:vu,W:hu,cb:nu,z:lu,A:tu,T:Mu,u:Ru,U:Uu,L:Iu,ic:nf,pc:V_,sc:Y_,yc:L_,jc:rf,Pb:Cf,Xb:yf,qc:G_,zc:P_,db:od,we:zu,Qd:Cc,Kd:Rc,lc:Z_,ve:Gu,Vb:vf,jd:n_,_a:cd,Za:_d,Wd:vc,Pd:Ec,Bb:Hf,Xc:y_,ae:fc,Gc:I_,Wb:hf,Nb:Sf,ge:oc,Ud:jc,_b:df,Ld:Tc,vd:Kc,Td:gc,rb:zf,Vd:bc,me:ic,Rd:kc,id:t_,Db:Bf,lb:Qf,bb:sd,ue:Vu,$d:dc,yd:Wc,Ab:Of,zd:Lc,mb:Jf,Jb:Rf,Sd:wc,Fd:Nc,Id:xc,Hd:Ic,Gd:Uc,Cd:Hc,wc:q_,fc:of,ee:lc,Ac:O_,_d:pc,pe:Qu,Dc:B_,Cc:M_,ze:Xu,ye:Ku,Od:Sc,Ce:Wu,qd:$c,Bc:H_,kc:ef,Hc:x_,mc:Q_,Kb:Tf,Tc:j_,zb:Pf,Mb:Df,sd:Gc,md:i_,Nc:S_,Lb:Af,Cb:Mf,oc:$_,gc:af,od:Qc,dd:l_,Oc:E_,td:zc,ad:__,$a:ud,sb:Yf,_c:d_,Ec:N_,Gb:If,bc:cf,Hb:xf,$b:ff,v:Wl,k:Yl,E:ku,fa:Tu,wb:qf,M:wu,ga:Au,xb:Wf,f:ql,Q:iu,Y:gu,uc:Zl,g:eu,l:Vl,Pe:Hu,t:pu,s:_u,wa:Bu,D:ou,N:du,R:Du,O:uu,Oe:Ou,Ja:xu,ca:cu,Ed:Bc,vb:Xf,kd:r_,hc:tf,cc:uf,xc:W_,Rb:wf,pb:Vf,je:nc,Fc:U_,wd:Xc,jb:id,Ad:Pc,Bd:Oc,dc:lf,Uc:b_,Yc:m_,Tb:jf,Sb:gf,Pc:C_,ie:tc,Yd:yc,Dd:Mc,Wc:h_,Kc:T_,Eb:Nf,ab:ld,Fb:Uf,ob:$f,ce:cc,ud:Yc,Ub:bf,Ic:F_,Sc:g_,he:ac,kb:Zf,qe:Ju,te:$u,xe:Yu,Jd:Fc,ib:ed,cd:u_,Mc:D_,Lc:A_,bd:c_,Zc:p_,nd:Zc,qb:Gf,gd:a_,hb:rd,Jc:R_,nc:J_,Be:qu,le:ec,ed:s_,Qc:k_,be:_c,rc:z_,ke:rc,de:uc,fd:o_,Nd:Dc,Md:Ac,$c:f_,yb:Lf,ld:e_,vc:X_,fe:sc,gb:nd,Rc:w_,tb:Kf,Zd:mc,Vc:v_,eb:ad,fb:td,tc:K_,ne:Zu,rd:Vc,Xd:hc,ac:_f,ec:sf,Ib:Ff,xd:qc,pd:Jc,I:tt,J:at,Wa:ut},Vt=ur(),ft=i.___wasm_call_ctors=function(){return(ft=i.___wasm_call_ctors=i.asm.Ue).apply(null,arguments)},dt=i._main=function(){return(dt=i._main=i.asm.Ve).apply(null,arguments)},pt=i._duckdb_web_fs_glob_add_path=function(){return(pt=i._duckdb_web_fs_glob_add_path=i.asm.We).apply(null,arguments)},mt=i._duckdb_web_clear_response=function(){return(mt=i._duckdb_web_clear_response=i.asm.Xe).apply(null,arguments)},yt=i._duckdb_web_fail_with=function(){return(yt=i._duckdb_web_fail_with=i.asm.Ye).apply(null,arguments)},ht=i._duckdb_web_reset=function(){return(ht=i._duckdb_web_reset=i.asm.Ze).apply(null,arguments)},vt=i._duckdb_web_connect=function(){return(vt=i._duckdb_web_connect=i.asm._e).apply(null,arguments)},bt=i._duckdb_web_disconnect=function(){return(bt=i._duckdb_web_disconnect=i.asm.$e).apply(null,arguments)},jt=i._duckdb_web_flush_files=function(){return(jt=i._duckdb_web_flush_files=i.asm.af).apply(null,arguments)},gt=i._duckdb_web_flush_file=function(){return(gt=i._duckdb_web_flush_file=i.asm.bf).apply(null,arguments)},wt=i._duckdb_web_open=function(){return(wt=i._duckdb_web_open=i.asm.cf).apply(null,arguments)},kt=i._duckdb_web_get_global_file_info=function(){return(kt=i._duckdb_web_get_global_file_info=i.asm.df).apply(null,arguments)},Ct=i._duckdb_web_collect_file_stats=function(){return(Ct=i._duckdb_web_collect_file_stats=i.asm.ef).apply(null,arguments)},Et=i._duckdb_web_export_file_stats=function(){return(Et=i._duckdb_web_export_file_stats=i.asm.ff).apply(null,arguments)},St=i._duckdb_web_fs_drop_file=function(){return(St=i._duckdb_web_fs_drop_file=i.asm.gf).apply(null,arguments)},ke=i._duckdb_web_fs_drop_files=function(){return(ke=i._duckdb_web_fs_drop_files=i.asm.hf).apply(null,arguments)},Ce=i._duckdb_web_fs_glob_file_infos=function(){return(Ce=i._duckdb_web_fs_glob_file_infos=i.asm.jf).apply(null,arguments)},Ye=i._duckdb_web_fs_get_file_info_by_id=function(){return(Ye=i._duckdb_web_fs_get_file_info_by_id=i.asm.kf).apply(null,arguments)},ze=i._duckdb_web_fs_get_file_info_by_name=function(){return(ze=i._duckdb_web_fs_get_file_info_by_name=i.asm.lf).apply(null,arguments)},Dt=i._duckdb_web_fs_set_file_descriptor=function(){return(Dt=i._duckdb_web_fs_set_file_descriptor=i.asm.mf).apply(null,arguments)},Sr=i._duckdb_web_fs_register_file_url=function(){return(Sr=i._duckdb_web_fs_register_file_url=i.asm.nf).apply(null,arguments)},Dr=i._duckdb_web_fs_register_file_buffer=function(){return(Dr=i._duckdb_web_fs_register_file_buffer=i.asm.of).apply(null,arguments)},Ge=i._duckdb_web_copy_file_to_buffer=function(){return(Ge=i._duckdb_web_copy_file_to_buffer=i.asm.pf).apply(null,arguments)},Ee=i._duckdb_web_copy_file_to_path=function(){return(Ee=i._duckdb_web_copy_file_to_path=i.asm.qf).apply(null,arguments)},Se=i._duckdb_web_get_version=function(){return(Se=i._duckdb_web_get_version=i.asm.rf).apply(null,arguments)},At=i._duckdb_web_get_feature_flags=function(){return(At=i._duckdb_web_get_feature_flags=i.asm.sf).apply(null,arguments)},Tt=i._duckdb_web_tokenize=function(){return(Tt=i._duckdb_web_tokenize=i.asm.tf).apply(null,arguments)},Ve=i._duckdb_web_udf_scalar_create=function(){return(Ve=i._duckdb_web_udf_scalar_create=i.asm.uf).apply(null,arguments)},Rt=i._duckdb_web_prepared_create=function(){return(Rt=i._duckdb_web_prepared_create=i.asm.vf).apply(null,arguments)},Ft=i._duckdb_web_prepared_close=function(){return(Ft=i._duckdb_web_prepared_close=i.asm.wf).apply(null,arguments)},Ar=i._duckdb_web_prepared_run=function(){return(Ar=i._duckdb_web_prepared_run=i.asm.xf).apply(null,arguments)},d=i._duckdb_web_prepared_send=function(){return(d=i._duckdb_web_prepared_send=i.asm.yf).apply(null,arguments)},y=i._duckdb_web_query_run=function(){return(y=i._duckdb_web_query_run=i.asm.zf).apply(null,arguments)},k=i._duckdb_web_query_send=function(){return(k=i._duckdb_web_query_send=i.asm.Af).apply(null,arguments)},D=i._duckdb_web_query_fetch_results=function(){return(D=i._duckdb_web_query_fetch_results=i.asm.Bf).apply(null,arguments)},A=i._duckdb_web_get_tablenames=function(){return(A=i._duckdb_web_get_tablenames=i.asm.Cf).apply(null,arguments)},O=i._duckdb_web_insert_arrow_from_ipc_stream=function(){return(O=i._duckdb_web_insert_arrow_from_ipc_stream=i.asm.Df).apply(null,arguments)},U=i._duckdb_web_insert_csv_from_path=function(){return(U=i._duckdb_web_insert_csv_from_path=i.asm.Ef).apply(null,arguments)},I=i._duckdb_web_insert_json_from_path=function(){return(I=i._duckdb_web_insert_json_from_path=i.asm.Ff).apply(null,arguments)},W=i._htonl=function(){return(W=i._htonl=i.asm.Gf).apply(null,arguments)},J=i._htons=function(){return(J=i._htons=i.asm.Hf).apply(null,arguments)},ei=i._ntohs=function(){return(ei=i._ntohs=i.asm.If).apply(null,arguments)},Di=i._malloc=function(){return(Di=i._malloc=i.asm.Jf).apply(null,arguments)},ti=i._free=function(){return(ti=i._free=i.asm.Kf).apply(null,arguments)},g=i._setThrew=function(){return(g=i._setThrew=i.asm.Lf).apply(null,arguments)},v=i.stackSave=function(){return(v=i.stackSave=i.asm.Mf).apply(null,arguments)},j=i.stackRestore=function(){return(j=i.stackRestore=i.asm.Nf).apply(null,arguments)},xi=i.stackAlloc=function(){return(xi=i.stackAlloc=i.asm.Of).apply(null,arguments)},Wi=i.___cxa_can_catch=function(){return(Wi=i.___cxa_can_catch=i.asm.Pf).apply(null,arguments)},F=i.___cxa_is_pointer_type=function(){return(F=i.___cxa_is_pointer_type=i.asm.Qf).apply(null,arguments)},Y=i.dynCall_jiiii=function(){return(Y=i.dynCall_jiiii=i.asm.Sf).apply(null,arguments)},oi=i.dynCall_iiiiij=function(){return(oi=i.dynCall_iiiiij=i.asm.Tf).apply(null,arguments)},gi=i.dynCall_iiiiijj=function(){return(gi=i.dynCall_iiiiijj=i.asm.Uf).apply(null,arguments)},_e=i.dynCall_viijii=function(){return(_e=i.dynCall_viijii=i.asm.Vf).apply(null,arguments)},Tr=i.dynCall_j=function(){return(Tr=i.dynCall_j=i.asm.Wf).apply(null,arguments)},$t=i.dynCall_ji=function(){return($t=i.dynCall_ji=i.asm.Xf).apply(null,arguments)},Jt=i.dynCall_iij=function(){return(Jt=i.dynCall_iij=i.asm.Yf).apply(null,arguments)},Qt=i.dynCall_viij=function(){return(Qt=i.dynCall_viij=i.asm.Zf).apply(null,arguments)},Zt=i.dynCall_viijji=function(){return(Zt=i.dynCall_viijji=i.asm._f).apply(null,arguments)},ia=i.dynCall_viijj=function(){return(ia=i.dynCall_viijj=i.asm.$f).apply(null,arguments)},ea=i.dynCall_viiijj=function(){return(ea=i.dynCall_viiijj=i.asm.ag).apply(null,arguments)},ra=i.dynCall_viiji=function(){return(ra=i.dynCall_viiji=i.asm.bg).apply(null,arguments)},na=i.dynCall_vijjj=function(){return(na=i.dynCall_vijjj=i.asm.cg).apply(null,arguments)},ta=i.dynCall_iiijj=function(){return(ta=i.dynCall_iiijj=i.asm.dg).apply(null,arguments)},aa=i.dynCall_viiij=function(){return(aa=i.dynCall_viiij=i.asm.eg).apply(null,arguments)},oa=i.dynCall_viijij=function(){return(oa=i.dynCall_viijij=i.asm.fg).apply(null,arguments)},sa=i.dynCall_viiijjj=function(){return(sa=i.dynCall_viiijjj=i.asm.gg).apply(null,arguments)},la=i.dynCall_iiij=function(){return(la=i.dynCall_iiij=i.asm.hg).apply(null,arguments)},ua=i.dynCall_vijijj=function(){return(ua=i.dynCall_vijijj=i.asm.ig).apply(null,arguments)},ca=i.dynCall_iji=function(){return(ca=i.dynCall_iji=i.asm.jg).apply(null,arguments)},_a=i.dynCall_viji=function(){return(_a=i.dynCall_viji=i.asm.kg).apply(null,arguments)},fa=i.dynCall_vij=function(){return(fa=i.dynCall_vij=i.asm.lg).apply(null,arguments)},da=i.dynCall_iiji=function(){return(da=i.dynCall_iiji=i.asm.mg).apply(null,arguments)},pa=i.dynCall_viiiij=function(){return(pa=i.dynCall_viiiij=i.asm.ng).apply(null,arguments)},ma=i.dynCall_jii=function(){return(ma=i.dynCall_jii=i.asm.og).apply(null,arguments)},ya=i.dynCall_viiiji=function(){return(ya=i.dynCall_viiiji=i.asm.pg).apply(null,arguments)},ha=i.dynCall_vijj=function(){return(ha=i.dynCall_vijj=i.asm.qg).apply(null,arguments)},va=i.dynCall_vj=function(){return(va=i.dynCall_vj=i.asm.rg).apply(null,arguments)},ba=i.dynCall_iiiij=function(){return(ba=i.dynCall_iiiij=i.asm.sg).apply(null,arguments)},ja=i.dynCall_iiiiiji=function(){return(ja=i.dynCall_iiiiiji=i.asm.tg).apply(null,arguments)},ga=i.dynCall_iiiji=function(){return(ga=i.dynCall_iiiji=i.asm.ug).apply(null,arguments)},wa=i.dynCall_iiiiji=function(){return(wa=i.dynCall_iiiiji=i.asm.vg).apply(null,arguments)},ka=i.dynCall_jiii=function(){return(ka=i.dynCall_jiii=i.asm.wg).apply(null,arguments)},Ca=i.dynCall_jij=function(){return(Ca=i.dynCall_jij=i.asm.xg).apply(null,arguments)},Ea=i.dynCall_iijjijj=function(){return(Ea=i.dynCall_iijjijj=i.asm.yg).apply(null,arguments)},Sa=i.dynCall_viiiijiiiii=function(){return(Sa=i.dynCall_viiiijiiiii=i.asm.zg).apply(null,arguments)},Da=i.dynCall_viiiijiiii=function(){return(Da=i.dynCall_viiiijiiii=i.asm.Ag).apply(null,arguments)},Aa=i.dynCall_viiijii=function(){return(Aa=i.dynCall_viiijii=i.asm.Bg).apply(null,arguments)},Ta=i.dynCall_viiiiiij=function(){return(Ta=i.dynCall_viiiiiij=i.asm.Cg).apply(null,arguments)},Ra=i.dynCall_iiijiii=function(){return(Ra=i.dynCall_iiijiii=i.asm.Dg).apply(null,arguments)},Fa=i.dynCall_iiiiijii=function(){return(Fa=i.dynCall_iiiiijii=i.asm.Eg).apply(null,arguments)},xa=i.dynCall_viijiii=function(){return(xa=i.dynCall_viijiii=i.asm.Fg).apply(null,arguments)},Ia=i.dynCall_iiijiij=function(){return(Ia=i.dynCall_iiijiij=i.asm.Gg).apply(null,arguments)},Ua=i.dynCall_vijiii=function(){return(Ua=i.dynCall_vijiii=i.asm.Hg).apply(null,arguments)},Na=i.dynCall_iijjii=function(){return(Na=i.dynCall_iijjii=i.asm.Ig).apply(null,arguments)},Ba=i.dynCall_iijjiii=function(){return(Ba=i.dynCall_iijjiii=i.asm.Jg).apply(null,arguments)},Ma=i.dynCall_iijjiiii=function(){return(Ma=i.dynCall_iijjiiii=i.asm.Kg).apply(null,arguments)},Ha=i.dynCall_iijji=function(){return(Ha=i.dynCall_iijji=i.asm.Lg).apply(null,arguments)},Oa=i.dynCall_vijiiii=function(){return(Oa=i.dynCall_vijiiii=i.asm.Mg).apply(null,arguments)},Pa=i.dynCall_iijiiii=function(){return(Pa=i.dynCall_iijiiii=i.asm.Ng).apply(null,arguments)},La=i.dynCall_iijii=function(){return(La=i.dynCall_iijii=i.asm.Og).apply(null,arguments)},Wa=i.dynCall_vijij=function(){return(Wa=i.dynCall_vijij=i.asm.Pg).apply(null,arguments)},qa=i.dynCall_iiijiiii=function(){return(qa=i.dynCall_iiijiiii=i.asm.Qg).apply(null,arguments)},Xa=i.dynCall_jiiij=function(){return(Xa=i.dynCall_jiiij=i.asm.Rg).apply(null,arguments)},Ka=i.dynCall_jiiiii=function(){return(Ka=i.dynCall_jiiiii=i.asm.Sg).apply(null,arguments)},Ya=i.dynCall_iiiiijjiijj=function(){return(Ya=i.dynCall_iiiiijjiijj=i.asm.Tg).apply(null,arguments)},za=i.dynCall_viijiiji=function(){return(za=i.dynCall_viijiiji=i.asm.Ug).apply(null,arguments)},Ga=i.dynCall_iijj=function(){return(Ga=i.dynCall_iijj=i.asm.Vg).apply(null,arguments)},Va=i.dynCall_iiijjii=function(){return(Va=i.dynCall_iiijjii=i.asm.Wg).apply(null,arguments)},$a=i.dynCall_iiijji=function(){return($a=i.dynCall_iiijji=i.asm.Xg).apply(null,arguments)},Ja=i.dynCall_vijii=function(){return(Ja=i.dynCall_vijii=i.asm.Yg).apply(null,arguments)},Qa=i.dynCall_vjjijij=function(){return(Qa=i.dynCall_vjjijij=i.asm.Zg).apply(null,arguments)},Za=i.dynCall_vijjji=function(){return(Za=i.dynCall_vijjji=i.asm._g).apply(null,arguments)},io=i.dynCall_vjjii=function(){return(io=i.dynCall_vjjii=i.asm.$g).apply(null,arguments)},eo=i.dynCall_viiiiiji=function(){return(eo=i.dynCall_viiiiiji=i.asm.ah).apply(null,arguments)},ro=i.dynCall_jiiiji=function(){return(ro=i.dynCall_jiiiji=i.asm.bh).apply(null,arguments)},no=i.dynCall_viijjii=function(){return(no=i.dynCall_viijjii=i.asm.ch).apply(null,arguments)},to=i.dynCall_iiiijj=function(){return(to=i.dynCall_iiiijj=i.asm.dh).apply(null,arguments)},ao=i.dynCall_viiiijj=function(){return(ao=i.dynCall_viiiijj=i.asm.eh).apply(null,arguments)},oo=i.dynCall_jijjij=function(){return(oo=i.dynCall_jijjij=i.asm.fh).apply(null,arguments)},so=i.dynCall_jiijii=function(){return(so=i.dynCall_jiijii=i.asm.gh).apply(null,arguments)},lo=i.dynCall_jijiii=function(){return(lo=i.dynCall_jijiii=i.asm.hh).apply(null,arguments)},uo=i.dynCall_viijiiiii=function(){return(uo=i.dynCall_viijiiiii=i.asm.ih).apply(null,arguments)},co=i.dynCall_viijiiij=function(){return(co=i.dynCall_viijiiij=i.asm.jh).apply(null,arguments)},_o=i.dynCall_vijiiiji=function(){return(_o=i.dynCall_vijiiiji=i.asm.kh).apply(null,arguments)},fo=i.dynCall_jiiji=function(){return(fo=i.dynCall_jiiji=i.asm.lh).apply(null,arguments)},po=i.dynCall_viiijij=function(){return(po=i.dynCall_viiijij=i.asm.mh).apply(null,arguments)},mo=i.dynCall_viijiij=function(){return(mo=i.dynCall_viijiij=i.asm.nh).apply(null,arguments)},yo=i.dynCall_viiiiijj=function(){return(yo=i.dynCall_viiiiijj=i.asm.oh).apply(null,arguments)},ho=i.dynCall_viiijji=function(){return(ho=i.dynCall_viiijji=i.asm.ph).apply(null,arguments)},vo=i.dynCall_viiiijii=function(){return(vo=i.dynCall_viiiijii=i.asm.qh).apply(null,arguments)},bo=i.dynCall_iiiijiii=function(){return(bo=i.dynCall_iiiijiii=i.asm.rh).apply(null,arguments)},jo=i.dynCall_iiijij=function(){return(jo=i.dynCall_iiijij=i.asm.sh).apply(null,arguments)},go=i.dynCall_viiijiii=function(){return(go=i.dynCall_viiijiii=i.asm.th).apply(null,arguments)},wo=i.dynCall_vijji=function(){return(wo=i.dynCall_vijji=i.asm.uh).apply(null,arguments)},ko=i.dynCall_viiiijij=function(){return(ko=i.dynCall_viiiijij=i.asm.vh).apply(null,arguments)},Co=i.dynCall_jiiiij=function(){return(Co=i.dynCall_jiiiij=i.asm.wh).apply(null,arguments)},Eo=i.dynCall_jiiijii=function(){return(Eo=i.dynCall_jiiijii=i.asm.xh).apply(null,arguments)},So=i.dynCall_jiijiii=function(){return(So=i.dynCall_jiijiii=i.asm.yh).apply(null,arguments)},Do=i.dynCall_viiijjij=function(){return(Do=i.dynCall_viiijjij=i.asm.zh).apply(null,arguments)},Ao=i.dynCall_vijijjiij=function(){return(Ao=i.dynCall_vijijjiij=i.asm.Ah).apply(null,arguments)},To=i.dynCall_viijjij=function(){return(To=i.dynCall_viijjij=i.asm.Bh).apply(null,arguments)},Ro=i.dynCall_viiijjiij=function(){return(Ro=i.dynCall_viiijjiij=i.asm.Ch).apply(null,arguments)},Fo=i.dynCall_viiiijjjj=function(){return(Fo=i.dynCall_viiiijjjj=i.asm.Dh).apply(null,arguments)},xo=i.dynCall_viijiiiiij=function(){return(xo=i.dynCall_viijiiiiij=i.asm.Eh).apply(null,arguments)},Io=i.dynCall_viijiiiijj=function(){return(Io=i.dynCall_viijiiiijj=i.asm.Fh).apply(null,arguments)},Uo=i.dynCall_viiijiiiijjj=function(){return(Uo=i.dynCall_viiijiiiijjj=i.asm.Gh).apply(null,arguments)},No=i.dynCall_viijijiiiijjj=function(){return(No=i.dynCall_viijijiiiijjj=i.asm.Hh).apply(null,arguments)},Bo=i.dynCall_jj=function(){return(Bo=i.dynCall_jj=i.asm.Ih).apply(null,arguments)},Mo=i.dynCall_jd=function(){return(Mo=i.dynCall_jd=i.asm.Jh).apply(null,arguments)},Ho=i.dynCall_jf=function(){return(Ho=i.dynCall_jf=i.asm.Kh).apply(null,arguments)},Oo=i.dynCall_iijjj=function(){return(Oo=i.dynCall_iijjj=i.asm.Lh).apply(null,arguments)},Po=i.dynCall_vijijiiiijjj=function(){return(Po=i.dynCall_vijijiiiijjj=i.asm.Mh).apply(null,arguments)},Lo=i.dynCall_iiiiiiji=function(){return(Lo=i.dynCall_iiiiiiji=i.asm.Nh).apply(null,arguments)},Wo=i.dynCall_iiiiiiiiji=function(){return(Wo=i.dynCall_iiiiiiiiji=i.asm.Oh).apply(null,arguments)},qo=i.dynCall_viijjj=function(){return(qo=i.dynCall_viijjj=i.asm.Ph).apply(null,arguments)},Xo=i.dynCall_vijjij=function(){return(Xo=i.dynCall_vijjij=i.asm.Qh).apply(null,arguments)},Ko=i.dynCall_viijjji=function(){return(Ko=i.dynCall_viijjji=i.asm.Rh).apply(null,arguments)},Yo=i.dynCall_iiiiiij=function(){return(Yo=i.dynCall_iiiiiij=i.asm.Sh).apply(null,arguments)},zo=i.dynCall_iiiiiiiiiiji=function(){return(zo=i.dynCall_iiiiiiiiiiji=i.asm.Th).apply(null,arguments)},Go=i.dynCall_jiiijjj=function(){return(Go=i.dynCall_jiiijjj=i.asm.Uh).apply(null,arguments)},Vo=i.dynCall_viijijj=function(){return(Vo=i.dynCall_viijijj=i.asm.Vh).apply(null,arguments)},$o=i.dynCall_jiiiiij=function(){return($o=i.dynCall_jiiiiij=i.asm.Wh).apply(null,arguments)},Jo=i.dynCall_iiiiijij=function(){return(Jo=i.dynCall_iiiiijij=i.asm.Xh).apply(null,arguments)},Qo=i.dynCall_jiiiiiii=function(){return(Qo=i.dynCall_jiiiiiii=i.asm.Yh).apply(null,arguments)},Zo=i.dynCall_jijj=function(){return(Zo=i.dynCall_jijj=i.asm.Zh).apply(null,arguments)},is=i.dynCall_viiiijiiiiiiii=function(){return(is=i.dynCall_viiiijiiiiiiii=i.asm._h).apply(null,arguments)},es=i.dynCall_ij=function(){return(es=i.dynCall_ij=i.asm.$h).apply(null,arguments)},rs=i.dynCall_jjj=function(){return(rs=i.dynCall_jjj=i.asm.ai).apply(null,arguments)},ns=i.dynCall_vjii=function(){return(ns=i.dynCall_vjii=i.asm.bi).apply(null,arguments)},ts=i.dynCall_jjjjjjd=function(){return(ts=i.dynCall_jjjjjjd=i.asm.ci).apply(null,arguments)},as=i.dynCall_viiiiijiiii=function(){return(as=i.dynCall_viiiiijiiii=i.asm.di).apply(null,arguments)},os=i.dynCall_vjiiii=function(){return(os=i.dynCall_vjiiii=i.asm.ei).apply(null,arguments)},ss=i.dynCall_iiijii=function(){return(ss=i.dynCall_iiijii=i.asm.fi).apply(null,arguments)},ls=i.dynCall_fiijii=function(){return(ls=i.dynCall_fiijii=i.asm.gi).apply(null,arguments)},us=i.dynCall_diijii=function(){return(us=i.dynCall_diijii=i.asm.hi).apply(null,arguments)},cs=i.dynCall_iiiiiiijii=function(){return(cs=i.dynCall_iiiiiiijii=i.asm.ii).apply(null,arguments)},_s=i.dynCall_viiiiijiii=function(){return(_s=i.dynCall_viiiiijiii=i.asm.ji).apply(null,arguments)},fs=i.dynCall_jiij=function(){return(fs=i.dynCall_jiij=i.asm.ki).apply(null,arguments)},ds=i.dynCall_iiiijjii=function(){return(ds=i.dynCall_iiiijjii=i.asm.li).apply(null,arguments)},ps=i.dynCall_iiiiijji=function(){return(ps=i.dynCall_iiiiijji=i.asm.mi).apply(null,arguments)},ms=i.dynCall_viiiiji=function(){return(ms=i.dynCall_viiiiji=i.asm.ni).apply(null,arguments)},ys=i.dynCall_viiijjii=function(){return(ys=i.dynCall_viiijjii=i.asm.oi).apply(null,arguments)},hs=i.dynCall_viiiijji=function(){return(hs=i.dynCall_viiiijji=i.asm.pi).apply(null,arguments)},vs=i.dynCall_viiiijjii=function(){return(vs=i.dynCall_viiiijjii=i.asm.qi).apply(null,arguments)},bs=i.dynCall_viiiiijji=function(){return(bs=i.dynCall_viiiiijji=i.asm.ri).apply(null,arguments)},js=i.dynCall_iidj=function(){return(js=i.dynCall_iidj=i.asm.si).apply(null,arguments)},gs=i.dynCall_ijji=function(){return(gs=i.dynCall_ijji=i.asm.ti).apply(null,arguments)},ws=i.dynCall_iiiiiiiij=function(){return(ws=i.dynCall_iiiiiiiij=i.asm.ui).apply(null,arguments)},ks=i.dynCall_iiiiiiij=function(){return(ks=i.dynCall_iiiiiiij=i.asm.vi).apply(null,arguments)},Cs=i.dynCall_iiiiiiiiiiiij=function(){return(Cs=i.dynCall_iiiiiiiiiiiij=i.asm.wi).apply(null,arguments)},Es=i.dynCall_iiiiiiiji=function(){return(Es=i.dynCall_iiiiiiiji=i.asm.xi).apply(null,arguments)},Ss=i.dynCall_iiiidjj=function(){return(Ss=i.dynCall_iiiidjj=i.asm.yi).apply(null,arguments)},Ds=i.dynCall_iiiijjj=function(){return(Ds=i.dynCall_iiiijjj=i.asm.zi).apply(null,arguments)},As=i.dynCall_jiiiiiijii=function(){return(As=i.dynCall_jiiiiiijii=i.asm.Ai).apply(null,arguments)},Ts=i.dynCall_iiiijji=function(){return(Ts=i.dynCall_iiiijji=i.asm.Bi).apply(null,arguments)},Rs=i.dynCall_jiiiiii=function(){return(Rs=i.dynCall_jiiiiii=i.asm.Ci).apply(null,arguments)},Fs=i.dynCall_jiiiijii=function(){return(Fs=i.dynCall_jiiiijii=i.asm.Di).apply(null,arguments)},xs=i.dynCall_jiiijiii=function(){return(xs=i.dynCall_jiiijiii=i.asm.Ei).apply(null,arguments)},Is=i.dynCall_jiiiiijiiii=function(){return(Is=i.dynCall_jiiiiijiiii=i.asm.Fi).apply(null,arguments)},Us=i.dynCall_iijiji=function(){return(Us=i.dynCall_iijiji=i.asm.Gi).apply(null,arguments)},Ns=i.dynCall_vjiiiji=function(){return(Ns=i.dynCall_vjiiiji=i.asm.Hi).apply(null,arguments)},Bs=i.dynCall_jjjii=function(){return(Bs=i.dynCall_jjjii=i.asm.Ii).apply(null,arguments)},Ms=i.dynCall_jji=function(){return(Ms=i.dynCall_jji=i.asm.Ji).apply(null,arguments)},Hs=i.dynCall_viiijijiji=function(){return(Hs=i.dynCall_viiijijiji=i.asm.Ki).apply(null,arguments)},Os=i.dynCall_iiijjj=function(){return(Os=i.dynCall_iiijjj=i.asm.Li).apply(null,arguments)},Ps=i.dynCall_jiiijj=function(){return(Ps=i.dynCall_jiiijj=i.asm.Mi).apply(null,arguments)},Ls=i.dynCall_iiiijii=function(){return(Ls=i.dynCall_iiiijii=i.asm.Ni).apply(null,arguments)},Ws=i.dynCall_iijiii=function(){return(Ws=i.dynCall_iijiii=i.asm.Oi).apply(null,arguments)},qs=i.dynCall_jiiiiji=function(){return(qs=i.dynCall_jiiiiji=i.asm.Pi).apply(null,arguments)},Xs=i.dynCall_vijiijj=function(){return(Xs=i.dynCall_vijiijj=i.asm.Qi).apply(null,arguments)},Ks=i.dynCall_vifiijj=function(){return(Ks=i.dynCall_vifiijj=i.asm.Ri).apply(null,arguments)},Ys=i.dynCall_vidiijj=function(){return(Ys=i.dynCall_vidiijj=i.asm.Si).apply(null,arguments)},zs=i.dynCall_viiiiij=function(){return(zs=i.dynCall_viiiiij=i.asm.Ti).apply(null,arguments)},Gs=i.dynCall_ijjiii=function(){return(Gs=i.dynCall_ijjiii=i.asm.Ui).apply(null,arguments)},Vs=i.dynCall_vijijjji=function(){return(Vs=i.dynCall_vijijjji=i.asm.Vi).apply(null,arguments)},$s=i.dynCall_viijiijj=function(){return($s=i.dynCall_viijiijj=i.asm.Wi).apply(null,arguments)},Js=i.dynCall_viiiiijjji=function(){return(Js=i.dynCall_viiiiijjji=i.asm.Xi).apply(null,arguments)},Qs=i.dynCall_iiijiijj=function(){return(Qs=i.dynCall_iiijiijj=i.asm.Yi).apply(null,arguments)},Zs=i.dynCall_viiijijjj=function(){return(Zs=i.dynCall_viiijijjj=i.asm.Zi).apply(null,arguments)},il=i.dynCall_iijiijj=function(){return(il=i.dynCall_iijiijj=i.asm._i).apply(null,arguments)},el=i.dynCall_viiijjjji=function(){return(el=i.dynCall_viiijjjji=i.asm.$i).apply(null,arguments)},rl=i.dynCall_viiiijiii=function(){return(rl=i.dynCall_viiiijiii=i.asm.aj).apply(null,arguments)},nl=i.dynCall_viijiiii=function(){return(nl=i.dynCall_viijiiii=i.asm.bj).apply(null,arguments)},tl=i.dynCall_vijjiiii=function(){return(tl=i.dynCall_vijjiiii=i.asm.cj).apply(null,arguments)},al=i.dynCall_vijijjiiiii=function(){return(al=i.dynCall_vijijjiiiii=i.asm.dj).apply(null,arguments)},ol=i.dynCall_vijjiiiii=function(){return(ol=i.dynCall_vijjiiiii=i.asm.ej).apply(null,arguments)},sl=i.dynCall_iiijjji=function(){return(sl=i.dynCall_iiijjji=i.asm.fj).apply(null,arguments)},ll=i.dynCall_iiiiiijji=function(){return(ll=i.dynCall_iiiiiijji=i.asm.gj).apply(null,arguments)},ul=i.dynCall_iiiiijjj=function(){return(ul=i.dynCall_iiiiijjj=i.asm.hj).apply(null,arguments)},cl=i.dynCall_jijiiii=function(){return(cl=i.dynCall_jijiiii=i.asm.ij).apply(null,arguments)},_l=i.dynCall_viiijiji=function(){return(_l=i.dynCall_viiijiji=i.asm.jj).apply(null,arguments)},fl=i.dynCall_iiijjjii=function(){return(fl=i.dynCall_iiijjjii=i.asm.kj).apply(null,arguments)},dl=i.dynCall_iiiiijjji=function(){return(dl=i.dynCall_iiiiijjji=i.asm.lj).apply(null,arguments)},pl=i.dynCall_viijiji=function(){return(pl=i.dynCall_viijiji=i.asm.mj).apply(null,arguments)};function Wl(e){var r=v();try{B(e)()}catch(n){if(j(r),n!==n+0)throw n;g(1,0)}}function ql(e,r,n){var t=v();try{B(e)(r,n)}catch(a){if(j(t),a!==a+0)throw a;g(1,0)}}function Xl(e,r){var n=v();try{return B(e)(r)}catch(t){if(j(n),t!==t+0)throw t;g(1,0)}}function Kl(e,r,n){var t=v();try{return B(e)(r,n)}catch(a){if(j(t),a!==a+0)throw a;g(1,0)}}function Yl(e,r){var n=v();try{B(e)(r)}catch(t){if(j(n),t!==t+0)throw t;g(1,0)}}function zl(e,r,n,t){var a=v();try{return B(e)(r,n,t)}catch(o){if(j(a),o!==o+0)throw o;g(1,0)}}function Gl(e,r,n,t,a,o){var s=v();try{return B(e)(r,n,t,a,o)}catch(l){if(j(s),l!==l+0)throw l;g(1,0)}}function Vl(e,r,n,t,a){var o=v();try{B(e)(r,n,t,a)}catch(s){if(j(o),s!==s+0)throw s;g(1,0)}}function $l(e,r,n,t,a){var o=v();try{return B(e)(r,n,t,a)}catch(s){if(j(o),s!==s+0)throw s;g(1,0)}}function Jl(e,r,n,t){var a=v();try{return B(e)(r,n,t)}catch(o){if(j(a),o!==o+0)throw o;g(1,0)}}function Ql(e,r,n,t){var a=v();try{return B(e)(r,n,t)}catch(o){if(j(a),o!==o+0)throw o;g(1,0)}}function Zl(e,r,n,t){var a=v();try{B(e)(r,n,t)}catch(o){if(j(a),o!==o+0)throw o;g(1,0)}}function iu(e,r,n,t){var a=v();try{B(e)(r,n,t)}catch(o){if(j(a),o!==o+0)throw o;g(1,0)}}function eu(e,r,n,t){var a=v();try{B(e)(r,n,t)}catch(o){if(j(a),o!==o+0)throw o;g(1,0)}}function ru(e,r,n,t,a,o,s,l){var u=v();try{return B(e)(r,n,t,a,o,s,l)}catch(f){if(j(u),f!==f+0)throw f;g(1,0)}}function nu(e,r,n,t,a,o,s,l,u,f,p){var w=v();try{return B(e)(r,n,t,a,o,s,l,u,f,p)}catch(E){if(j(w),E!==E+0)throw E;g(1,0)}}function tu(e,r,n,t,a,o,s,l,u,f,p,w,E){var x=v();try{return B(e)(r,n,t,a,o,s,l,u,f,p,w,E)}catch(N){if(j(x),N!==N+0)throw N;g(1,0)}}function au(e){var r=v();try{return B(e)()}catch(n){if(j(r),n!==n+0)throw n;g(1,0)}}function ou(e,r,n,t,a,o,s,l){var u=v();try{B(e)(r,n,t,a,o,s,l)}catch(f){if(j(u),f!==f+0)throw f;g(1,0)}}function su(e,r,n,t,a,o,s){var l=v();try{return B(e)(r,n,t,a,o,s)}catch(u){if(j(l),u!==u+0)throw u;g(1,0)}}function lu(e,r,n,t,a,o,s,l,u,f,p,w){var E=v();try{return B(e)(r,n,t,a,o,s,l,u,f,p,w)}catch(x){if(j(E),x!==x+0)throw x;g(1,0)}}function uu(e,r,n,t,a,o,s,l,u,f,p){var w=v();try{B(e)(r,n,t,a,o,s,l,u,f,p)}catch(E){if(j(w),E!==E+0)throw E;g(1,0)}}function cu(e,r,n,t,a,o,s,l,u,f,p,w,E,x,N,G){var Z=v();try{B(e)(r,n,t,a,o,s,l,u,f,p,w,E,x,N,G)}catch(ui){if(j(Z),ui!==ui+0)throw ui;g(1,0)}}function _u(e,r,n,t,a,o,s){var l=v();try{B(e)(r,n,t,a,o,s)}catch(u){if(j(l),u!==u+0)throw u;g(1,0)}}function fu(e,r,n,t,a,o){var s=v();try{return B(e)(r,n,t,a,o)}catch(l){if(j(s),l!==l+0)throw l;g(1,0)}}function du(e,r,n,t,a,o,s,l,u){var f=v();try{B(e)(r,n,t,a,o,s,l,u)}catch(p){if(j(f),p!==p+0)throw p;g(1,0)}}function pu(e,r,n,t,a,o){var s=v();try{B(e)(r,n,t,a,o)}catch(l){if(j(s),l!==l+0)throw l;g(1,0)}}function mu(e,r,n){var t=v();try{return B(e)(r,n)}catch(a){if(j(t),a!==a+0)throw a;g(1,0)}}function yu(e,r,n){var t=v();try{return B(e)(r,n)}catch(a){if(j(t),a!==a+0)throw a;g(1,0)}}function hu(e,r,n,t,a,o,s,l,u,f){var p=v();try{return B(e)(r,n,t,a,o,s,l,u,f)}catch(w){if(j(p),w!==w+0)throw w;g(1,0)}}function vu(e,r,n,t,a,o,s,l,u){var f=v();try{return B(e)(r,n,t,a,o,s,l,u)}catch(p){if(j(f),p!==p+0)throw p;g(1,0)}}function bu(e,r,n,t,a){var o=v();try{return B(e)(r,n,t,a)}catch(s){if(j(o),s!==s+0)throw s;g(1,0)}}function ju(e,r,n,t,a){var o=v();try{return B(e)(r,n,t,a)}catch(s){if(j(o),s!==s+0)throw s;g(1,0)}}function gu(e,r,n,t,a,o){var s=v();try{B(e)(r,n,t,a,o)}catch(l){if(j(s),l!==l+0)throw l;g(1,0)}}function wu(e,r,n){var t=v();try{B(e)(r,n)}catch(a){if(j(t),a!==a+0)throw a;g(1,0)}}function ku(e,r,n){var t=v();try{B(e)(r,n)}catch(a){if(j(t),a!==a+0)throw a;g(1,0)}}function Cu(e,r){var n=v();try{return B(e)(r)}catch(t){if(j(n),t!==t+0)throw t;g(1,0)}}function Eu(e,r,n,t){var a=v();try{return B(e)(r,n,t)}catch(o){if(j(a),o!==o+0)throw o;g(1,0)}}function Su(e,r){var n=v();try{return B(e)(r)}catch(t){if(j(n),t!==t+0)throw t;g(1,0)}}function Du(e,r,n,t,a,o,s,l,u,f){var p=v();try{B(e)(r,n,t,a,o,s,l,u,f)}catch(w){if(j(p),w!==w+0)throw w;g(1,0)}}function Au(e,r,n,t){var a=v();try{B(e)(r,n,t)}catch(o){if(j(a),o!==o+0)throw o;g(1,0)}}function Tu(e,r,n,t){var a=v();try{B(e)(r,n,t)}catch(o){if(j(a),o!==o+0)throw o;g(1,0)}}function Ru(e,r,n,t,a,o,s,l,u,f,p,w,E,x,N,G){var Z=v();try{return B(e)(r,n,t,a,o,s,l,u,f,p,w,E,x,N,G)}catch(ui){if(j(Z),ui!==ui+0)throw ui;g(1,0)}}function Fu(e,r){var n=v();try{return B(e)(r)}catch(t){if(j(n),t!==t+0)throw t;g(1,0)}}function xu(e,r,n,t,a,o,s,l,u,f,p,w,E,x){var N=v();try{B(e)(r,n,t,a,o,s,l,u,f,p,w,E,x)}catch(G){if(j(N),G!==G+0)throw G;g(1,0)}}function Iu(e,r,n,t,a,o,s,l,u,f,p,w,E,x,N,G,Z,ui,T,q,ai){var di=v();try{return B(e)(r,n,t,a,o,s,l,u,f,p,w,E,x,N,G,Z,ui,T,q,ai)}catch(Zi){if(j(di),Zi!==Zi+0)throw Zi;g(1,0)}}function Uu(e,r,n,t,a,o,s,l,u,f,p,w,E,x,N,G,Z,ui,T,q){var ai=v();try{return B(e)(r,n,t,a,o,s,l,u,f,p,w,E,x,N,G,Z,ui,T,q)}catch(di){if(j(ai),di!==di+0)throw di;g(1,0)}}function Nu(e,r,n){var t=v();try{return B(e)(r,n)}catch(a){if(j(t),a!==a+0)throw a;g(1,0)}}function Bu(e,r,n,t,a,o,s,l,u,f,p){var w=v();try{B(e)(r,n,t,a,o,s,l,u,f,p)}catch(E){if(j(w),E!==E+0)throw E;g(1,0)}}function Mu(e,r,n,t,a,o,s,l,u,f,p,w,E,x,N){var G=v();try{return B(e)(r,n,t,a,o,s,l,u,f,p,w,E,x,N)}catch(Z){if(j(G),Z!==Z+0)throw Z;g(1,0)}}function Hu(e,r,n,t,a,o,s,l,u,f){var p=v();try{B(e)(r,n,t,a,o,s,l,u,f)}catch(w){if(j(p),w!==w+0)throw w;g(1,0)}}function Ou(e,r,n,t,a,o,s,l,u,f,p,w){var E=v();try{B(e)(r,n,t,a,o,s,l,u,f,p,w)}catch(x){if(j(E),x!==x+0)throw x;g(1,0)}}function Pu(e){var r=v();try{return B(e)()}catch(n){if(j(r),n!==n+0)throw n;g(1,0)}}function Lu(e){var r=v();try{return B(e)()}catch(n){if(j(r),n!==n+0)throw n;g(1,0)}}function Wu(e,r,n,t,a){var o=v();try{return Y(e,r,n,t,a)}catch(s){if(j(o),s!==s+0)throw s;g(1,0)}}function qu(e,r,n,t,a,o,s){var l=v();try{ia(e,r,n,t,a,o,s)}catch(u){if(j(l),u!==u+0)throw u;g(1,0)}}function Xu(e,r){var n=v();try{return $t(e,r)}catch(t){if(j(n),t!==t+0)throw t;g(1,0)}}function Ku(e,r,n){var t=v();try{return ma(e,r,n)}catch(a){if(j(t),a!==a+0)throw a;g(1,0)}}function Yu(e,r,n,t,a,o,s){var l=v();try{_e(e,r,n,t,a,o,s)}catch(u){if(j(l),u!==u+0)throw u;g(1,0)}}function zu(e,r,n,t,a,o,s){var l=v();try{return oi(e,r,n,t,a,o,s)}catch(u){if(j(l),u!==u+0)throw u;g(1,0)}}function Gu(e,r,n,t,a,o,s,l,u){var f=v();try{return gi(e,r,n,t,a,o,s,l,u)}catch(p){if(j(f),p!==p+0)throw p;g(1,0)}}function Vu(e,r,n,t){var a=v();try{return Jt(e,r,n,t)}catch(o){if(j(a),o!==o+0)throw o;g(1,0)}}function $u(e,r,n,t,a,o){var s=v();try{ra(e,r,n,t,a,o)}catch(l){if(j(s),l!==l+0)throw l;g(1,0)}}function Ju(e,r,n,t,a){var o=v();try{Qt(e,r,n,t,a)}catch(s){if(j(o),s!==s+0)throw s;g(1,0)}}function Qu(e){var r=v();try{return Tr(e)}catch(n){if(j(r),n!==n+0)throw n;g(1,0)}}function Zu(e,r,n,t,a,o,s,l){var u=v();try{na(e,r,n,t,a,o,s,l)}catch(f){if(j(u),f!==f+0)throw f;g(1,0)}}function ic(e,r,n,t,a,o,s){var l=v();try{return ta(e,r,n,t,a,o,s)}catch(u){if(j(l),u!==u+0)throw u;g(1,0)}}function ec(e,r,n,t,a,o,s,l){var u=v();try{Zt(e,r,n,t,a,o,s,l)}catch(f){if(j(u),f!==f+0)throw f;g(1,0)}}function rc(e,r,n,t){var a=v();try{fa(e,r,n,t)}catch(o){if(j(a),o!==o+0)throw o;g(1,0)}}function nc(e,r,n,t,a,o,s){var l=v();try{pa(e,r,n,t,a,o,s)}catch(u){if(j(l),u!==u+0)throw u;g(1,0)}}function tc(e,r,n,t,a,o){var s=v();try{aa(e,r,n,t,a,o)}catch(l){if(j(s),l!==l+0)throw l;g(1,0)}}function ac(e,r,n,t,a,o,s,l,u,f){var p=v();try{sa(e,r,n,t,a,o,s,l,u,f)}catch(w){if(j(p),w!==w+0)throw w;g(1,0)}}function oc(e,r,n,t,a){var o=v();try{return la(e,r,n,t,a)}catch(s){if(j(o),s!==s+0)throw s;g(1,0)}}function sc(e,r,n,t,a,o,s,l,u){var f=v();try{ua(e,r,n,t,a,o,s,l,u)}catch(p){if(j(f),p!==p+0)throw p;g(1,0)}}function lc(e,r,n,t){var a=v();try{return ca(e,r,n,t)}catch(o){if(j(a),o!==o+0)throw o;g(1,0)}}function uc(e,r,n,t,a){var o=v();try{_a(e,r,n,t,a)}catch(s){if(j(o),s!==s+0)throw s;g(1,0)}}function cc(e,r,n,t,a,o,s,l){var u=v();try{ea(e,r,n,t,a,o,s,l)}catch(f){if(j(u),f!==f+0)throw f;g(1,0)}}function _c(e,r,n,t,a,o,s,l,u){var f=v();try{qo(e,r,n,t,a,o,s,l,u)}catch(p){if(j(f),p!==p+0)throw p;g(1,0)}}function fc(e,r,n,t,a,o,s,l){var u=v();try{return to(e,r,n,t,a,o,s,l)}catch(f){if(j(u),f!==f+0)throw f;g(1,0)}}function dc(e,r,n,t,a){var o=v();try{return da(e,r,n,t,a)}catch(s){if(j(o),s!==s+0)throw s;g(1,0)}}function pc(e,r,n,t,a,o,s,l){var u=v();try{return Gs(e,r,n,t,a,o,s,l)}catch(f){if(j(u),f!==f+0)throw f;g(1,0)}}function mc(e,r,n,t,a,o){var s=v();try{ha(e,r,n,t,a,o)}catch(l){if(j(s),l!==l+0)throw l;g(1,0)}}function yc(e,r,n,t,a,o,s){var l=v();try{ya(e,r,n,t,a,o,s)}catch(u){if(j(l),u!==u+0)throw u;g(1,0)}}function hc(e,r,n){var t=v();try{va(e,r,n)}catch(a){if(j(t),a!==a+0)throw a;g(1,0)}}function vc(e,r,n,t,a,o){var s=v();try{return ba(e,r,n,t,a,o)}catch(l){if(j(s),l!==l+0)throw l;g(1,0)}}function bc(e,r,n,t,a,o,s,l){var u=v();try{return jo(e,r,n,t,a,o,s,l)}catch(f){if(j(u),f!==f+0)throw f;g(1,0)}}function jc(e,r,n,t,a,o){var s=v();try{return ga(e,r,n,t,a,o)}catch(l){if(j(s),l!==l+0)throw l;g(1,0)}}function gc(e,r,n,t,a,o,s,l,u){var f=v();try{return Ia(e,r,n,t,a,o,s,l,u)}catch(p){if(j(f),p!==p+0)throw p;g(1,0)}}function wc(e,r,n,t,a,o){var s=v();try{return Ga(e,r,n,t,a,o)}catch(l){if(j(s),l!==l+0)throw l;g(1,0)}}function kc(e,r,n,t,a,o,s,l){var u=v();try{return $a(e,r,n,t,a,o,s,l)}catch(f){if(j(u),f!==f+0)throw f;g(1,0)}}function Cc(e,r,n,t,a,o,s,l){var u=v();try{return ja(e,r,n,t,a,o,s,l)}catch(f){if(j(u),f!==f+0)throw f;g(1,0)}}function Ec(e,r,n,t,a,o,s){var l=v();try{return wa(e,r,n,t,a,o,s)}catch(u){if(j(l),u!==u+0)throw u;g(1,0)}}function Sc(e,r,n,t){var a=v();try{return ka(e,r,n,t)}catch(o){if(j(a),o!==o+0)throw o;g(1,0)}}function Dc(e,r,n,t,a,o,s){var l=v();try{Ua(e,r,n,t,a,o,s)}catch(u){if(j(l),u!==u+0)throw u;g(1,0)}}function Ac(e,r,n,t,a,o,s,l){var u=v();try{Oa(e,r,n,t,a,o,s,l)}catch(f){if(j(u),f!==f+0)throw f;g(1,0)}}function Tc(e,r,n,t,a,o,s,l){var u=v();try{return Ra(e,r,n,t,a,o,s,l)}catch(f){if(j(u),f!==f+0)throw f;g(1,0)}}function Rc(e,r,n,t,a,o,s,l,u){var f=v();try{return Fa(e,r,n,t,a,o,s,l,u)}catch(p){if(j(f),p!==p+0)throw p;g(1,0)}}function Fc(e,r,n,t,a,o,s,l){var u=v();try{xa(e,r,n,t,a,o,s,l)}catch(f){if(j(u),f!==f+0)throw f;g(1,0)}}function xc(e,r,n,t,a,o,s,l){var u=v();try{return Na(e,r,n,t,a,o,s,l)}catch(f){if(j(u),f!==f+0)throw f;g(1,0)}}function Ic(e,r,n,t,a,o,s,l,u){var f=v();try{return Ba(e,r,n,t,a,o,s,l,u)}catch(p){if(j(f),p!==p+0)throw p;g(1,0)}}function Uc(e,r,n,t,a,o,s,l,u,f){var p=v();try{return Ma(e,r,n,t,a,o,s,l,u,f)}catch(w){if(j(p),w!==w+0)throw w;g(1,0)}}function Nc(e,r,n,t,a,o,s){var l=v();try{return Ha(e,r,n,t,a,o,s)}catch(u){if(j(l),u!==u+0)throw u;g(1,0)}}function Bc(e,r,n,t,a,o,s,l,u){var f=v();try{Ta(e,r,n,t,a,o,s,l,u)}catch(p){if(j(f),p!==p+0)throw p;g(1,0)}}function Mc(e,r,n,t,a,o,s,l){var u=v();try{Aa(e,r,n,t,a,o,s,l)}catch(f){if(j(u),f!==f+0)throw f;g(1,0)}}function Hc(e,r,n,t,a,o,s,l,u,f,p){var w=v();try{return Ea(e,r,n,t,a,o,s,l,u,f,p)}catch(E){if(j(w),E!==E+0)throw E;g(1,0)}}function Oc(e,r,n,t,a,o,s,l,u,f,p,w){var E=v();try{Sa(e,r,n,t,a,o,s,l,u,f,p,w)}catch(x){if(j(E),x!==x+0)throw x;g(1,0)}}function Pc(e,r,n,t,a,o,s,l,u,f,p){var w=v();try{Da(e,r,n,t,a,o,s,l,u,f,p)}catch(E){if(j(w),E!==E+0)throw E;g(1,0)}}function Lc(e,r,n,t,a,o,s,l){var u=v();try{return Pa(e,r,n,t,a,o,s,l)}catch(f){if(j(u),f!==f+0)throw f;g(1,0)}}function Wc(e,r,n,t,a,o){var s=v();try{return La(e,r,n,t,a,o)}catch(l){if(j(s),l!==l+0)throw l;g(1,0)}}function qc(e,r,n,t,a,o,s){var l=v();try{io(e,r,n,t,a,o,s)}catch(u){if(j(l),u!==u+0)throw u;g(1,0)}}function Xc(e,r,n,t,a,o,s,l,u){var f=v();try{vo(e,r,n,t,a,o,s,l,u)}catch(p){if(j(f),p!==p+0)throw p;g(1,0)}}function Kc(e,r,n,t,a,o,s,l,u){var f=v();try{return qa(e,r,n,t,a,o,s,l,u)}catch(p){if(j(f),p!==p+0)throw p;g(1,0)}}function Yc(e,r,n,t,a,o,s,l,u){var f=v();try{ho(e,r,n,t,a,o,s,l,u)}catch(p){if(j(f),p!==p+0)throw p;g(1,0)}}function zc(e,r,n,t){var a=v();try{return Ca(e,r,n,t)}catch(o){if(j(a),o!==o+0)throw o;g(1,0)}}function Gc(e,r,n,t,a,o){var s=v();try{return Xa(e,r,n,t,a,o)}catch(l){if(j(s),l!==l+0)throw l;g(1,0)}}function Vc(e,r,n,t,a,o,s,l,u){var f=v();try{Za(e,r,n,t,a,o,s,l,u)}catch(p){if(j(f),p!==p+0)throw p;g(1,0)}}function $c(e,r,n,t,a,o){var s=v();try{return Ka(e,r,n,t,a,o)}catch(l){if(j(s),l!==l+0)throw l;g(1,0)}}function Jc(e,r,n,t,a,o,s,l,u,f,p){var w=v();try{Qa(e,r,n,t,a,o,s,l,u,f,p)}catch(E){if(j(w),E!==E+0)throw E;g(1,0)}}function Qc(e,r,n,t,a,o){var s=v();try{return fo(e,r,n,t,a,o)}catch(l){if(j(s),l!==l+0)throw l;g(1,0)}}function Zc(e,r,n,t,a,o,s,l,u,f){var p=v();try{za(e,r,n,t,a,o,s,l,u,f)}catch(w){if(j(p),w!==w+0)throw w;g(1,0)}}function i_(e,r,n,t,a,o,s){var l=v();try{return ro(e,r,n,t,a,o,s)}catch(u){if(j(l),u!==u+0)throw u;g(1,0)}}function e_(e,r,n,t,a,o,s){var l=v();try{Wa(e,r,n,t,a,o,s)}catch(u){if(j(l),u!==u+0)throw u;g(1,0)}}function r_(e,r,n,t,a,o,s,l,u){var f=v();try{eo(e,r,n,t,a,o,s,l,u)}catch(p){if(j(f),p!==p+0)throw p;g(1,0)}}function n_(e,r,n,t,a,o,s,l,u,f,p,w,E,x,N){var G=v();try{return Ya(e,r,n,t,a,o,s,l,u,f,p,w,E,x,N)}catch(Z){if(j(G),Z!==Z+0)throw Z;g(1,0)}}function t_(e,r,n,t,a,o,s,l,u){var f=v();try{return Va(e,r,n,t,a,o,s,l,u)}catch(p){if(j(f),p!==p+0)throw p;g(1,0)}}function a_(e,r,n,t,a,o,s,l){var u=v();try{oa(e,r,n,t,a,o,s,l)}catch(f){if(j(u),f!==f+0)throw f;g(1,0)}}function o_(e,r,n,t,a,o){var s=v();try{Ja(e,r,n,t,a,o)}catch(l){if(j(s),l!==l+0)throw l;g(1,0)}}function s_(e,r,n,t,a,o,s,l,u){var f=v();try{no(e,r,n,t,a,o,s,l,u)}catch(p){if(j(f),p!==p+0)throw p;g(1,0)}}function l_(e,r,n,t,a,o,s){var l=v();try{return so(e,r,n,t,a,o,s)}catch(u){if(j(l),u!==u+0)throw u;g(1,0)}}function u_(e,r,n,t,a,o,s,l,u,f){var p=v();try{uo(e,r,n,t,a,o,s,l,u,f)}catch(w){if(j(p),w!==w+0)throw w;g(1,0)}}function c_(e,r,n,t,a,o,s,l,u,f){var p=v();try{co(e,r,n,t,a,o,s,l,u,f)}catch(w){if(j(p),w!==w+0)throw w;g(1,0)}}function __(e,r,n,t,a,o,s){var l=v();try{return lo(e,r,n,t,a,o,s)}catch(u){if(j(l),u!==u+0)throw u;g(1,0)}}function f_(e,r,n,t,a,o,s,l,u,f){var p=v();try{_o(e,r,n,t,a,o,s,l,u,f)}catch(w){if(j(p),w!==w+0)throw w;g(1,0)}}function d_(e,r,n,t,a,o,s,l,u){var f=v();try{return oo(e,r,n,t,a,o,s,l,u)}catch(p){if(j(f),p!==p+0)throw p;g(1,0)}}function p_(e,r,n,t,a,o,s,l,u){var f=v();try{mo(e,r,n,t,a,o,s,l,u)}catch(p){if(j(f),p!==p+0)throw p;g(1,0)}}function m_(e,r,n,t,a,o,s,l,u){var f=v();try{ao(e,r,n,t,a,o,s,l,u)}catch(p){if(j(f),p!==p+0)throw p;g(1,0)}}function y_(e,r,n,t,a,o,s,l,u){var f=v();try{return bo(e,r,n,t,a,o,s,l,u)}catch(p){if(j(f),p!==p+0)throw p;g(1,0)}}function h_(e,r,n,t,a,o,s,l,u){var f=v();try{go(e,r,n,t,a,o,s,l,u)}catch(p){if(j(f),p!==p+0)throw p;g(1,0)}}function v_(e,r,n,t,a,o,s){var l=v();try{wo(e,r,n,t,a,o,s)}catch(u){if(j(l),u!==u+0)throw u;g(1,0)}}function b_(e,r,n,t,a,o,s,l,u,f){var p=v();try{ko(e,r,n,t,a,o,s,l,u,f)}catch(w){if(j(p),w!==w+0)throw w;g(1,0)}}function j_(e,r,n,t,a,o,s){var l=v();try{return Co(e,r,n,t,a,o,s)}catch(u){if(j(l),u!==u+0)throw u;g(1,0)}}function g_(e,r,n,t,a,o,s,l,u,f,p){var w=v();try{Do(e,r,n,t,a,o,s,l,u,f,p)}catch(E){if(j(w),E!==E+0)throw E;g(1,0)}}function w_(e,r,n,t,a,o,s,l,u,f,p,w,E){var x=v();try{Ao(e,r,n,t,a,o,s,l,u,f,p,w,E)}catch(N){if(j(x),N!==N+0)throw N;g(1,0)}}function k_(e,r,n,t,a,o,s,l,u,f){var p=v();try{To(e,r,n,t,a,o,s,l,u,f)}catch(w){if(j(p),w!==w+0)throw w;g(1,0)}}function C_(e,r,n,t,a,o,s,l,u,f,p,w,E){var x=v();try{Fo(e,r,n,t,a,o,s,l,u,f,p,w,E)}catch(N){if(j(x),N!==N+0)throw N;g(1,0)}}function E_(e,r,n,t,a,o,s,l){var u=v();try{return So(e,r,n,t,a,o,s,l)}catch(f){if(j(u),f!==f+0)throw f;g(1,0)}}function S_(e,r,n,t,a,o,s,l){var u=v();try{return Eo(e,r,n,t,a,o,s,l)}catch(f){if(j(u),f!==f+0)throw f;g(1,0)}}function D_(e,r,n,t,a,o,s,l,u,f,p,w){var E=v();try{xo(e,r,n,t,a,o,s,l,u,f,p,w)}catch(x){if(j(E),x!==x+0)throw x;g(1,0)}}function A_(e,r,n,t,a,o,s,l,u,f,p,w,E){var x=v();try{Io(e,r,n,t,a,o,s,l,u,f,p,w,E)}catch(N){if(j(x),N!==N+0)throw N;g(1,0)}}function T_(e,r,n,t,a,o,s,l,u,f,p,w,E,x,N,G){var Z=v();try{Uo(e,r,n,t,a,o,s,l,u,f,p,w,E,x,N,G)}catch(ui){if(j(Z),ui!==ui+0)throw ui;g(1,0)}}function R_(e,r,n,t,a,o,s,l,u,f,p,w,E,x,N,G,Z,ui){var T=v();try{No(e,r,n,t,a,o,s,l,u,f,p,w,E,x,N,G,Z,ui)}catch(q){if(j(T),q!==q+0)throw q;g(1,0)}}function F_(e,r,n,t,a,o,s,l,u,f,p,w){var E=v();try{Ro(e,r,n,t,a,o,s,l,u,f,p,w)}catch(x){if(j(E),x!==x+0)throw x;g(1,0)}}function x_(e,r,n,t,a,o,s,l,u,f,p){var w=v();try{return As(e,r,n,t,a,o,s,l,u,f,p)}catch(E){if(j(w),E!==E+0)throw E;g(1,0)}}function I_(e,r,n,t,a,o,s,l,u){var f=v();try{return Ts(e,r,n,t,a,o,s,l,u)}catch(p){if(j(f),p!==p+0)throw p;g(1,0)}}function U_(e,r,n,t,a,o,s,l){var u=v();try{ms(e,r,n,t,a,o,s,l)}catch(f){if(j(u),f!==f+0)throw f;g(1,0)}}function N_(e,r,n){var t=v();try{return Bo(e,r,n)}catch(a){if(j(t),a!==a+0)throw a;g(1,0)}}function B_(e,r){var n=v();try{return Mo(e,r)}catch(t){if(j(n),t!==t+0)throw t;g(1,0)}}function M_(e,r){var n=v();try{return Ho(e,r)}catch(t){if(j(n),t!==t+0)throw t;g(1,0)}}function H_(e,r,n,t,a,o,s){var l=v();try{return Rs(e,r,n,t,a,o,s)}catch(u){if(j(l),u!==u+0)throw u;g(1,0)}}function O_(e,r,n,t,a,o){var s=v();try{return gs(e,r,n,t,a,o)}catch(l){if(j(s),l!==l+0)throw l;g(1,0)}}function P_(e,r,n,t,a,o,s,l,u){var f=v();try{return Lo(e,r,n,t,a,o,s,l,u)}catch(p){if(j(f),p!==p+0)throw p;g(1,0)}}function L_(e,r,n,t,a,o,s,l,u,f,p){var w=v();try{return Wo(e,r,n,t,a,o,s,l,u,f,p)}catch(E){if(j(w),E!==E+0)throw E;g(1,0)}}function W_(e,r,n,t,a,o,s,l,u,f){var p=v();try{yo(e,r,n,t,a,o,s,l,u,f)}catch(w){if(j(p),w!==w+0)throw w;g(1,0)}}function q_(e,r,n,t,a,o,s,l){var u=v();try{return Oo(e,r,n,t,a,o,s,l)}catch(f){if(j(u),f!==f+0)throw f;g(1,0)}}function X_(e,r,n,t,a,o,s,l,u,f,p,w,E,x,N,G,Z){var ui=v();try{Po(e,r,n,t,a,o,s,l,u,f,p,w,E,x,N,G,Z)}catch(T){if(j(ui),T!==T+0)throw T;g(1,0)}}function K_(e,r,n,t,a,o,s,l,u){var f=v();try{Xo(e,r,n,t,a,o,s,l,u)}catch(p){if(j(f),p!==p+0)throw p;g(1,0)}}function Y_(e,r,n,t,a,o,s,l,u,f){var p=v();try{return ws(e,r,n,t,a,o,s,l,u,f)}catch(w){if(j(p),w!==w+0)throw w;g(1,0)}}function z_(e,r,n,t,a,o,s,l,u,f){var p=v();try{Ko(e,r,n,t,a,o,s,l,u,f)}catch(w){if(j(p),w!==w+0)throw w;g(1,0)}}function G_(e,r,n,t,a,o,s,l){var u=v();try{return Yo(e,r,n,t,a,o,s,l)}catch(f){if(j(u),f!==f+0)throw f;g(1,0)}}function V_(e,r,n,t,a,o,s,l,u,f,p,w,E){var x=v();try{return zo(e,r,n,t,a,o,s,l,u,f,p,w,E)}catch(N){if(j(x),N!==N+0)throw N;g(1,0)}}function $_(e,r,n,t,a,o,s,l,u,f){var p=v();try{return Go(e,r,n,t,a,o,s,l,u,f)}catch(w){if(j(p),w!==w+0)throw w;g(1,0)}}function J_(e,r,n,t,a,o,s,l,u,f){var p=v();try{Vo(e,r,n,t,a,o,s,l,u,f)}catch(w){if(j(p),w!==w+0)throw w;g(1,0)}}function Q_(e,r,n,t,a,o,s,l){var u=v();try{return $o(e,r,n,t,a,o,s,l)}catch(f){if(j(u),f!==f+0)throw f;g(1,0)}}function Z_(e,r,n,t,a,o,s,l,u,f){var p=v();try{return Jo(e,r,n,t,a,o,s,l,u,f)}catch(w){if(j(p),w!==w+0)throw w;g(1,0)}}function ef(e,r,n,t,a,o,s,l){var u=v();try{return Qo(e,r,n,t,a,o,s,l)}catch(f){if(j(u),f!==f+0)throw f;g(1,0)}}function rf(e,r,n,t,a,o,s,l,u){var f=v();try{return ks(e,r,n,t,a,o,s,l,u)}catch(p){if(j(f),p!==p+0)throw p;g(1,0)}}function nf(e,r,n,t,a,o,s,l,u,f,p,w,E,x){var N=v();try{return Cs(e,r,n,t,a,o,s,l,u,f,p,w,E,x)}catch(G){if(j(N),G!==G+0)throw G;g(1,0)}}function tf(e,r,n,t,a,o,s,l,u,f,p){var w=v();try{_s(e,r,n,t,a,o,s,l,u,f,p)}catch(E){if(j(w),E!==E+0)throw E;g(1,0)}}function af(e,r,n,t,a){var o=v();try{return fs(e,r,n,t,a)}catch(s){if(j(o),s!==s+0)throw s;g(1,0)}}function of(e,r,n){var t=v();try{return es(e,r,n)}catch(a){if(j(t),a!==a+0)throw a;g(1,0)}}function sf(e,r,n,t,a,o,s){var l=v();try{os(e,r,n,t,a,o,s)}catch(u){if(j(l),u!==u+0)throw u;g(1,0)}}function lf(e,r,n,t,a,o,s,l,u,f,p,w,E,x,N){var G=v();try{is(e,r,n,t,a,o,s,l,u,f,p,w,E,x,N)}catch(Z){if(j(G),Z!==Z+0)throw Z;g(1,0)}}function uf(e,r,n,t,a,o,s,l,u,f,p,w){var E=v();try{as(e,r,n,t,a,o,s,l,u,f,p,w)}catch(x){if(j(E),x!==x+0)throw x;g(1,0)}}function cf(e,r,n,t,a){var o=v();try{return rs(e,r,n,t,a)}catch(s){if(j(o),s!==s+0)throw s;g(1,0)}}function _f(e,r,n,t,a){var o=v();try{ns(e,r,n,t,a)}catch(s){if(j(o),s!==s+0)throw s;g(1,0)}}function ff(e,r,n,t,a,o,s,l,u,f,p,w){var E=v();try{return ts(e,r,n,t,a,o,s,l,u,f,p,w)}catch(x){if(j(E),x!==x+0)throw x;g(1,0)}}function df(e,r,n,t,a,o,s){var l=v();try{return ss(e,r,n,t,a,o,s)}catch(u){if(j(l),u!==u+0)throw u;g(1,0)}}function pf(e,r,n,t,a,o,s){var l=v();try{return ls(e,r,n,t,a,o,s)}catch(u){if(j(l),u!==u+0)throw u;g(1,0)}}function mf(e,r,n,t,a,o,s){var l=v();try{return us(e,r,n,t,a,o,s)}catch(u){if(j(l),u!==u+0)throw u;g(1,0)}}function yf(e,r,n,t,a,o,s,l,u,f,p){var w=v();try{return cs(e,r,n,t,a,o,s,l,u,f,p)}catch(E){if(j(w),E!==E+0)throw E;g(1,0)}}function hf(e,r,n,t,a,o,s,l,u,f){var p=v();try{return ds(e,r,n,t,a,o,s,l,u,f)}catch(w){if(j(p),w!==w+0)throw w;g(1,0)}}function vf(e,r,n,t,a,o,s,l,u,f){var p=v();try{return ps(e,r,n,t,a,o,s,l,u,f)}catch(w){if(j(p),w!==w+0)throw w;g(1,0)}}function bf(e,r,n,t,a,o,s,l,u,f){var p=v();try{ys(e,r,n,t,a,o,s,l,u,f)}catch(w){if(j(p),w!==w+0)throw w;g(1,0)}}function jf(e,r,n,t,a,o,s,l,u,f){var p=v();try{hs(e,r,n,t,a,o,s,l,u,f)}catch(w){if(j(p),w!==w+0)throw w;g(1,0)}}function gf(e,r,n,t,a,o,s,l,u,f,p){var w=v();try{vs(e,r,n,t,a,o,s,l,u,f,p)}catch(E){if(j(w),E!==E+0)throw E;g(1,0)}}function wf(e,r,n,t,a,o,s,l,u,f,p){var w=v();try{bs(e,r,n,t,a,o,s,l,u,f,p)}catch(E){if(j(w),E!==E+0)throw E;g(1,0)}}function kf(e,r,n,t,a){var o=v();try{return js(e,r,n,t,a)}catch(s){if(j(o),s!==s+0)throw s;g(1,0)}}function Cf(e,r,n,t,a,o,s,l,u,f){var p=v();try{return Es(e,r,n,t,a,o,s,l,u,f)}catch(w){if(j(p),w!==w+0)throw w;g(1,0)}}function Ef(e,r,n,t,a,o,s,l,u){var f=v();try{return Ss(e,r,n,t,a,o,s,l,u)}catch(p){if(j(f),p!==p+0)throw p;g(1,0)}}function Sf(e,r,n,t,a,o,s,l,u,f){var p=v();try{return Ds(e,r,n,t,a,o,s,l,u,f)}catch(w){if(j(p),w!==w+0)throw w;g(1,0)}}function Df(e,r,n,t,a,o,s,l,u){var f=v();try{return Fs(e,r,n,t,a,o,s,l,u)}catch(p){if(j(f),p!==p+0)throw p;g(1,0)}}function Af(e,r,n,t,a,o,s,l,u){var f=v();try{return xs(e,r,n,t,a,o,s,l,u)}catch(p){if(j(f),p!==p+0)throw p;g(1,0)}}function Tf(e,r,n,t,a,o,s,l,u,f,p,w){var E=v();try{return Is(e,r,n,t,a,o,s,l,u,f,p,w)}catch(x){if(j(E),x!==x+0)throw x;g(1,0)}}function Rf(e,r,n,t,a,o,s,l){var u=v();try{return Us(e,r,n,t,a,o,s,l)}catch(f){if(j(u),f!==f+0)throw f;g(1,0)}}function Ff(e,r,n,t,a,o,s,l,u){var f=v();try{Ns(e,r,n,t,a,o,s,l,u)}catch(p){if(j(f),p!==p+0)throw p;g(1,0)}}function xf(e,r,n,t,a,o,s){var l=v();try{return Bs(e,r,n,t,a,o,s)}catch(u){if(j(l),u!==u+0)throw u;g(1,0)}}function If(e,r,n,t){var a=v();try{return Ms(e,r,n,t)}catch(o){if(j(a),o!==o+0)throw o;g(1,0)}}function Uf(e,r,n,t,a,o,s,l,u,f,p,w,E){var x=v();try{Hs(e,r,n,t,a,o,s,l,u,f,p,w,E)}catch(N){if(j(x),N!==N+0)throw N;g(1,0)}}function Nf(e,r,n,t,a,o,s,l,u){var f=v();try{po(e,r,n,t,a,o,s,l,u)}catch(p){if(j(f),p!==p+0)throw p;g(1,0)}}function Bf(e,r,n,t,a,o,s,l,u){var f=v();try{return Os(e,r,n,t,a,o,s,l,u)}catch(p){if(j(f),p!==p+0)throw p;g(1,0)}}function Mf(e,r,n,t,a,o,s,l){var u=v();try{return Ps(e,r,n,t,a,o,s,l)}catch(f){if(j(u),f!==f+0)throw f;g(1,0)}}function Hf(e,r,n,t,a,o,s,l){var u=v();try{return Ls(e,r,n,t,a,o,s,l)}catch(f){if(j(u),f!==f+0)throw f;g(1,0)}}function Of(e,r,n,t,a,o,s){var l=v();try{return Ws(e,r,n,t,a,o,s)}catch(u){if(j(l),u!==u+0)throw u;g(1,0)}}function Pf(e,r,n,t,a,o,s,l){var u=v();try{return qs(e,r,n,t,a,o,s,l)}catch(f){if(j(u),f!==f+0)throw f;g(1,0)}}function Lf(e,r,n,t,a,o,s,l,u,f){var p=v();try{Xs(e,r,n,t,a,o,s,l,u,f)}catch(w){if(j(p),w!==w+0)throw w;g(1,0)}}function Wf(e,r,n,t,a,o,s,l,u){var f=v();try{Ks(e,r,n,t,a,o,s,l,u)}catch(p){if(j(f),p!==p+0)throw p;g(1,0)}}function qf(e,r,n,t,a,o,s,l,u){var f=v();try{Ys(e,r,n,t,a,o,s,l,u)}catch(p){if(j(f),p!==p+0)throw p;g(1,0)}}function Xf(e,r,n,t,a,o,s,l){var u=v();try{zs(e,r,n,t,a,o,s,l)}catch(f){if(j(u),f!==f+0)throw f;g(1,0)}}function Kf(e,r,n,t,a,o,s,l,u,f,p,w){var E=v();try{Vs(e,r,n,t,a,o,s,l,u,f,p,w)}catch(x){if(j(E),x!==x+0)throw x;g(1,0)}}function Yf(e,r,n,t,a,o){var s=v();try{return Zo(e,r,n,t,a,o)}catch(l){if(j(s),l!==l+0)throw l;g(1,0)}}function zf(e,r,n,t,a,o,s,l,u,f,p){var w=v();try{return Qs(e,r,n,t,a,o,s,l,u,f,p)}catch(E){if(j(w),E!==E+0)throw E;g(1,0)}}function Gf(e,r,n,t,a,o,s,l,u,f,p){var w=v();try{$s(e,r,n,t,a,o,s,l,u,f,p)}catch(E){if(j(w),E!==E+0)throw E;g(1,0)}}function Vf(e,r,n,t,a,o,s,l,u,f,p,w,E){var x=v();try{Js(e,r,n,t,a,o,s,l,u,f,p,w,E)}catch(N){if(j(x),N!==N+0)throw N;g(1,0)}}function $f(e,r,n,t,a,o,s,l,u,f,p,w,E){var x=v();try{Zs(e,r,n,t,a,o,s,l,u,f,p,w,E)}catch(N){if(j(x),N!==N+0)throw N;g(1,0)}}function Jf(e,r,n,t,a,o,s,l,u,f){var p=v();try{return il(e,r,n,t,a,o,s,l,u,f)}catch(w){if(j(p),w!==w+0)throw w;g(1,0)}}function Qf(e,r,n,t,a,o,s,l,u,f){var p=v();try{return sl(e,r,n,t,a,o,s,l,u,f)}catch(w){if(j(p),w!==w+0)throw w;g(1,0)}}function Zf(e,r,n,t,a,o,s,l,u,f,p,w,E){var x=v();try{el(e,r,n,t,a,o,s,l,u,f,p,w,E)}catch(N){if(j(x),N!==N+0)throw N;g(1,0)}}function id(e,r,n,t,a,o,s,l,u,f){var p=v();try{rl(e,r,n,t,a,o,s,l,u,f)}catch(w){if(j(p),w!==w+0)throw w;g(1,0)}}function ed(e,r,n,t,a,o,s,l,u){var f=v();try{nl(e,r,n,t,a,o,s,l,u)}catch(p){if(j(f),p!==p+0)throw p;g(1,0)}}function rd(e,r,n,t,a,o,s,l,u){var f=v();try{pl(e,r,n,t,a,o,s,l,u)}catch(p){if(j(f),p!==p+0)throw p;g(1,0)}}function nd(e,r,n,t,a,o,s,l,u,f,p,w,E,x){var N=v();try{al(e,r,n,t,a,o,s,l,u,f,p,w,E,x)}catch(G){if(j(N),G!==G+0)throw G;g(1,0)}}function td(e,r,n,t,a,o,s,l,u,f,p){var w=v();try{ol(e,r,n,t,a,o,s,l,u,f,p)}catch(E){if(j(w),E!==E+0)throw E;g(1,0)}}function ad(e,r,n,t,a,o,s,l,u,f){var p=v();try{tl(e,r,n,t,a,o,s,l,u,f)}catch(w){if(j(p),w!==w+0)throw w;g(1,0)}}function od(e,r,n,t,a,o,s,l,u,f,p){var w=v();try{return ll(e,r,n,t,a,o,s,l,u,f,p)}catch(E){if(j(w),E!==E+0)throw E;g(1,0)}}function sd(e,r,n,t,a,o,s,l,u,f,p){var w=v();try{return fl(e,r,n,t,a,o,s,l,u,f,p)}catch(E){if(j(w),E!==E+0)throw E;g(1,0)}}function ld(e,r,n,t,a,o,s,l,u,f){var p=v();try{_l(e,r,n,t,a,o,s,l,u,f)}catch(w){if(j(p),w!==w+0)throw w;g(1,0)}}function ud(e,r,n,t,a,o,s,l){var u=v();try{return cl(e,r,n,t,a,o,s,l)}catch(f){if(j(u),f!==f+0)throw f;g(1,0)}}function cd(e,r,n,t,a,o,s,l,u,f,p){var w=v();try{return ul(e,r,n,t,a,o,s,l,u,f,p)}catch(E){if(j(w),E!==E+0)throw E;g(1,0)}}function _d(e,r,n,t,a,o,s,l,u,f,p,w){var E=v();try{return dl(e,r,n,t,a,o,s,l,u,f,p,w)}catch(x){if(j(E),x!==x+0)throw x;g(1,0)}}i.ccall=Pi;var Rr;function Fr(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}var fd=!1;Si=function e(){Rr||xt(),Rr||(Si=e)};function dd(e){var r=i._main,n=0,t=0;try{var a=r(n,t);return pd(a,!0),a}catch(o){return Vr(o)}finally{fd=!0}}function xt(e){if(e=e||C,$i>0||(Xr(),$i>0))return;function r(){Rr||(Rr=!0,i.calledRun=!0,!hi&&(Kr(),Yr(),m(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),ml&&dd(e),zr()))}i.setStatus?(i.setStatus("Running..."),setTimeout(function(){setTimeout(function(){i.setStatus("")},1),r()},1)):r()}i.run=xt;function pd(e,r){ri=e,md(e)}function md(e){ri=e,ar()||(i.onExit&&i.onExit(e),hi=!0),R(e,new Fr(e))}if(i.preInit)for(typeof i.preInit=="function"&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();var ml=!0;return i.noInitialRun&&(ml=!1),xt(),c.ready}})(),Pl=ap;var Te=class extends Hr{constructor(i,m,h,b){super(i,m);this.mainModuleURL=h,this.pthreadWorkerURL=b}locateFile(i,m){if(i.endsWith(".wasm"))return this.mainModuleURL;if(i.endsWith(".worker.js")){if(!this.pthreadWorkerURL)throw new Error("Missing DuckDB worker URL!");return this.pthreadWorkerURL}throw new Error(`WASM instantiation requested unexpected file: prefix=${m} path=${i}`)}instantiateWasm(i,m){globalThis.DUCKDB_RUNTIME=this._runtime;let h=this.onInstantiationProgress;if(typeof TransformStream=="function"&&ReadableStream.prototype.pipeThrough&&WebAssembly.instantiateStreaming){let C=(async()=>{var bi;let S=new Request(this.mainModuleURL),R=await fetch(S),M=R.headers.get("content-length"),L=M&&parseInt(M,10)||0,ii=new Date,z={startedAt:ii,updatedAt:ii,bytesTotal:L||0,bytesLoaded:0},$={transform(fi,Ii){z.bytesLoaded+=fi.byteLength;let Ui=new Date;if(Ui.getTime()-z.updatedAt.getTime()<20){z.updatedAt=Ui,Ii.enqueue(fi);return}for(let Ci of h)Ci(z);Ii.enqueue(fi)}},_i=new TransformStream($);return new Response((bi=R.body)==null?void 0:bi.pipeThrough(_i),R)})();WebAssembly.instantiateStreaming(C,i).then(S=>{m(S.instance,S.module)})}else{let b=new XMLHttpRequest,C=this.mainModuleURL,S=new Date,R={startedAt:S,updatedAt:S,bytesTotal:0,bytesLoaded:0};b.open("GET",C),b.responseType="arraybuffer",b.onerror=M=>{throw this.logger.log({timestamp:new Date,level:4,origin:3,topic:5,event:2,value:"Failed to load WASM: "+M}),new Error(M.toString())},b.onprogress=M=>{R.bytesTotal=M.total,R.bytesLoaded=M.loaded;let L=new Date;if(L.getTime()-R.updatedAt.getTime()<20){R.updatedAt=L;return}for(let ii of h)ii(R)},b.onload=()=>{WebAssembly.instantiate(b.response,i).then(M=>{m(M.instance,M.module)}).catch(M=>{throw this.logger.log({timestamp:new Date,level:4,origin:3,topic:5,event:2,value:"Failed to instantiate WASM: "+M}),new Error(M)})},b.send()}return[]}};var Pr=class extends Te{constructor(c,i,m,h=null){super(c,i,m,h)}instantiateImpl(c){return Pl(fe(Ki({},c),{instantiateWasm:this.instantiateWasm.bind(this),locateFile:this.locateFile.bind(this)}))}};var op=(()=>{var _=import.meta.url;return function(c){c=c||{};var i=typeof c<"u"?c:{},m,h;i.ready=new Promise(function(d,y){m=d,h=y});var b=Object.assign({},i),C=[],S="./this.program",R=(d,y)=>{throw y},M=typeof window=="object",L=typeof importScripts=="function",ii=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",z="";function $(d){return i.locateFile?i.locateFile(d,z):z+d}var _i,bi,fi,Ii;function Ui(d){if(d instanceof Se)return;pi("exiting due to exception: "+d)}var Ci,Ni,Oi;ii?(L?z=$e().dirname(z)+"/":z=__dirname+"/",Oi=()=>{Ni||(Ci=Yt(),Ni=$e())},_i=function(y,k){return Oi(),y=Ni.normalize(y),Ci.readFileSync(y,k?void 0:"utf8")},fi=d=>{var y=_i(d,!0);return y.buffer||(y=new Uint8Array(y)),y},bi=(d,y,k)=>{Oi(),d=Ni.normalize(d),Ci.readFile(d,function(D,A){D?k(D):y(A.buffer)})},process.argv.length>1&&(S=process.argv[1].replace(/\\/g,"/")),C=process.argv.slice(2),process.on("uncaughtException",function(d){if(!(d instanceof Se))throw d}),process.on("unhandledRejection",function(d){throw d}),R=(d,y)=>{if(nr())throw process.exitCode=d,y;Ui(y),process.exit(d)},i.inspect=function(){return"[Emscripten Module object]"}):(M||L)&&(L?z=self.location.href:typeof document<"u"&&document.currentScript&&(z=document.currentScript.src),_&&(z=_),z.indexOf("blob:")!==0?z=z.substr(0,z.replace(/[?#].*/,"").lastIndexOf("/")+1):z="",_i=d=>{var y=new XMLHttpRequest;return y.open("GET",d,!1),y.send(null),y.responseText},L&&(fi=d=>{var y=new XMLHttpRequest;return y.open("GET",d,!1),y.responseType="arraybuffer",y.send(null),new Uint8Array(y.response)}),bi=(d,y,k)=>{var D=new XMLHttpRequest;D.open("GET",d,!0),D.responseType="arraybuffer",D.onload=()=>{if(D.status==200||D.status==0&&D.response){y(D.response);return}k()},D.onerror=k,D.send(null)},Ii=d=>document.title=d);var Re=i.print||console.log.bind(console),pi=i.printErr||console.warn.bind(console);Object.assign(i,b),b=null,i.arguments&&(C=i.arguments),i.thisProgram&&(S=i.thisProgram),i.quit&&(R=i.quit);var Bi;i.wasmBinary&&(Bi=i.wasmBinary);var X=i.noExitRuntime||!0;typeof WebAssembly!="object"&&Si("no native wasm support detected");var ji,yi=!1,wi;function mi(d,y){d||Si(y)}function hi(d){var y=i["_"+d];return y}function ri(d,y,k,D,A){var O={string:function(v){var j=0;if(v!=null&&v!==0){var xi=(v.length<<2)+1;j=Ge(xi),de(v,j,xi)}return j},array:function(v){var j=Ge(v.length);return xe(v,j),j}};function U(v){return y==="string"?Pi(v):y==="boolean"?Boolean(v):v}var I=hi(d),W=[],J=0;if(D)for(var ei=0;ei<D.length;ei++){var Di=O[k[ei]];Di?(J===0&&(J=Sr()),W[ei]=Di(D[ei])):W[ei]=D[ei]}var ti=I.apply(null,W);function g(v){return J!==0&&Dr(J),U(v)}return ti=g(ti),ti}var Ei=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function Gi(d,y,k){for(var D=y+k,A=y;d[A]&&!(A>=D);)++A;if(A-y>16&&d.buffer&&Ei)return Ei.decode(d.subarray(y,A));for(var O="";y<A;){var U=d[y++];if(!(U&128)){O+=String.fromCharCode(U);continue}var I=d[y++]&63;if((U&224)==192){O+=String.fromCharCode((U&31)<<6|I);continue}var W=d[y++]&63;if((U&240)==224?U=(U&15)<<12|I<<6|W:U=(U&7)<<18|I<<12|W<<6|d[y++]&63,U<65536)O+=String.fromCharCode(U);else{var J=U-65536;O+=String.fromCharCode(55296|J>>10,56320|J&1023)}}return O}function Pi(d,y){return d?Gi(qi,d,y):""}function Fe(d,y,k,D){if(!(D>0))return 0;for(var A=k,O=k+D-1,U=0;U<d.length;++U){var I=d.charCodeAt(U);if(I>=55296&&I<=57343){var W=d.charCodeAt(++U);I=65536+((I&1023)<<10)|W&1023}if(I<=127){if(k>=O)break;y[k++]=I}else if(I<=2047){if(k+1>=O)break;y[k++]=192|I>>6,y[k++]=128|I&63}else if(I<=65535){if(k+2>=O)break;y[k++]=224|I>>12,y[k++]=128|I>>6&63,y[k++]=128|I&63}else{if(k+3>=O)break;y[k++]=240|I>>18,y[k++]=128|I>>12&63,y[k++]=128|I>>6&63,y[k++]=128|I&63}}return y[k]=0,k-A}function de(d,y,k){return Fe(d,qi,y,k)}function Li(d){for(var y=0,k=0;k<d.length;++k){var D=d.charCodeAt(k);D>=55296&&D<=57343&&(D=65536+((D&1023)<<10)|d.charCodeAt(++k)&1023),D<=127?++y:D<=2047?y+=2:D<=65535?y+=3:y+=4}return y}function xe(d,y){Ji.set(d,y)}function Ie(d,y,k){for(var D=0;D<d.length;++D)Ji[y++>>0]=d.charCodeAt(D);k||(Ji[y>>0]=0)}var Je,Ji,qi,Qi,Mi,P,ne,Qe,H;function Ze(d){Je=d,i.HEAP8=Ji=new Int8Array(d),i.HEAP16=Qi=new Int16Array(d),i.HEAP32=P=new Int32Array(d),i.HEAPU8=qi=new Uint8Array(d),i.HEAPU16=Mi=new Uint16Array(d),i.HEAPU32=ne=new Uint32Array(d),i.HEAPF32=Qe=new Float32Array(d),i.HEAPF64=H=new Float64Array(d)}var zt=i.INITIAL_MEMORY||16777216,ir,Ue=[],Wr=[],er=[],Ne=[],rr=!1;function nr(){return X}function tr(){if(i.preRun)for(typeof i.preRun=="function"&&(i.preRun=[i.preRun]);i.preRun.length;)Kr(i.preRun.shift());ae(Ue)}function qr(){rr=!0,ae(Wr)}function ar(){ae(er)}function Xr(){if(i.postRun)for(typeof i.postRun=="function"&&(i.postRun=[i.postRun]);i.postRun.length;)zr(i.postRun.shift());ae(Ne)}function Kr(d){Ue.unshift(d)}function Yr(d){Wr.unshift(d)}function zr(d){Ne.unshift(d)}var Vi=0,Be=null,te=null;function $i(d){Vi++,i.monitorRunDependencies&&i.monitorRunDependencies(Vi)}function Me(d){if(Vi--,i.monitorRunDependencies&&i.monitorRunDependencies(Vi),Vi==0&&(Be!==null&&(clearInterval(Be),Be=null),te)){var y=te;te=null,y()}}function Si(d){i.onAbort&&i.onAbort(d),d="Aborted("+d+")",pi(d),yi=!0,wi=1,d+=". Build with -sASSERTIONS for more info.";var y=new WebAssembly.RuntimeError(d);throw h(y),y}var Gr="data:application/octet-stream;base64,";function or(d){return d.startsWith(Gr)}var li;i.locateFile?(li="./duckdb-eh.wasm",or(li)||(li=$(li))):li=new URL("./duckdb-eh.wasm",import.meta.url).toString();function sr(d){try{if(d==li&&Bi)return new Uint8Array(Bi);if(fi)return fi(d);throw"both async and sync fetching of the wasm failed"}catch(y){Si(y)}}function lr(){return!Bi&&(M||L)&&typeof fetch=="function"?fetch(li,{credentials:"same-origin"}).then(function(d){if(!d.ok)throw"failed to load wasm binary file at '"+li+"'";return d.arrayBuffer()}).catch(function(){return sr(li)}):Promise.resolve().then(function(){return sr(li)})}function Ai(){var d={a:Yn};function y(U,I){var W=U.exports;i.asm=W,ji=i.asm.ha,Ze(ji.buffer),ir=i.asm.bb,Yr(i.asm.ia),Me("wasm-instantiate")}$i("wasm-instantiate");function k(U){y(U.instance)}function D(U){return lr().then(function(I){return WebAssembly.instantiate(I,d)}).then(function(I){return I}).then(U,function(I){pi("failed to asynchronously prepare wasm: "+I),Si(I)})}function A(){return!Bi&&typeof WebAssembly.instantiateStreaming=="function"&&!or(li)&&typeof fetch=="function"?fetch(li,{credentials:"same-origin"}).then(function(U){var I=WebAssembly.instantiateStreaming(U,d);return I.then(k,function(W){return pi("wasm streaming compile failed: "+W),pi("falling back to ArrayBuffer instantiation"),D(k)})}):D(k)}if(i.instantiateWasm)try{var O=i.instantiateWasm(d,y);return O}catch(U){return pi("Module.instantiateWasm callback failed with error: "+U),!1}return A().catch(h),{}}function ae(d){for(;d.length>0;){var y=d.shift();if(typeof y=="function"){y(i);continue}var k=y.func;typeof k=="number"?y.arg===void 0?ur(k)():ur(k)(y.arg):k(y.arg===void 0?null:y.arg)}}var pe=[];function ur(d){var y=pe[d];return y||(d>=pe.length&&(pe.length=d+1),pe[d]=y=ir.get(d)),y}function me(d){if(d instanceof Se||d=="unwind")return wi;R(1,d)}function ye(d,y,k,D){Si("Assertion failed: "+Pi(d)+", at: "+[y?Pi(y):"unknown filename",k,D?Pi(D):"unknown function"])}var B={buffers:[null,[],[]],printChar:function(d,y){var k=B.buffers[d];y===0||y===10?((d===1?Re:pi)(Gi(k,0)),k.length=0):k.push(y)},varargs:void 0,get:function(){B.varargs+=4;var d=P[B.varargs-4>>2];return d},getStr:function(d){var y=Pi(d);return y}};function Vr(d,y,k,D,A){}function $r(){pi("missing function: $SOCKFS"),Si(-1)}function cr(){pi("missing function: $FS"),Si(-1)}function Xi(d){var y=$r.getSocket(d);if(!y)throw new cr.ErrnoError(8);return y}function He(d){return(d&255)+"."+(d>>8&255)+"."+(d>>16&255)+"."+(d>>24&255)}function oe(d){var y="",k=0,D=0,A=0,O=0,U=0,I=0,W=[d[0]&65535,d[0]>>16,d[1]&65535,d[1]>>16,d[2]&65535,d[2]>>16,d[3]&65535,d[3]>>16],J=!0,ei="";for(I=0;I<5;I++)if(W[I]!==0){J=!1;break}if(J){if(ei=He(W[6]|W[7]<<16),W[5]===-1)return y="::ffff:",y+=ei,y;if(W[5]===0)return y="::",ei==="0.0.0.0"&&(ei=""),ei==="0.0.0.1"&&(ei="1"),y+=ei,y}for(k=0;k<8;k++)W[k]===0&&(k-A>1&&(U=0),A=k,U++),U>D&&(D=U,O=k-D+1);for(k=0;k<8;k++){if(D>1&&W[k]===0&&k>=O&&k<O+D){k===O&&(y+=":",O===0&&(y+=":"));continue}y+=Number(Ye(W[k]&65535)).toString(16),y+=k<7?":":""}return y}function _r(d,y){var k=Qi[d>>1],D=Ye(Mi[d+2>>1]),A;switch(k){case 2:if(y!==16)return{errno:28};A=P[d+4>>2],A=He(A);break;case 10:if(y!==28)return{errno:28};A=[P[d+8>>2],P[d+12>>2],P[d+16>>2],P[d+20>>2]],A=oe(A);break;default:return{errno:5}}return{family:k,addr:A,port:D}}function Ti(d){for(var y=d.split("."),k=0;k<4;k++){var D=Number(y[k]);if(isNaN(D))return null;y[k]=D}return(y[0]|y[1]<<8|y[2]<<16|y[3]<<24)>>>0}function Hi(d){return parseInt(d)}function he(d){var y,k,D,A,O=/^((?=.*::)(?!.*::.+::)(::)?([\dA-F]{1,4}:(:|\b)|){5}|([\dA-F]{1,4}:){6})((([\dA-F]{1,4}((?!\3)::|:\b|$))|(?!\2\3)){2}|(((2[0-4]|1\d|[1-9])?\d|25[0-5])\.?\b){4})$/i,U=[];if(!O.test(d))return null;if(d==="::")return[0,0,0,0,0,0,0,0];for(d.startsWith("::")?d=d.replace("::","Z:"):d=d.replace("::",":Z:"),d.indexOf(".")>0?(d=d.replace(new RegExp("[.]","g"),":"),y=d.split(":"),y[y.length-4]=Hi(y[y.length-4])+Hi(y[y.length-3])*256,y[y.length-3]=Hi(y[y.length-2])+Hi(y[y.length-1])*256,y=y.slice(0,y.length-2)):y=d.split(":"),D=0,A=0,k=0;k<y.length;k++)if(typeof y[k]=="string")if(y[k]==="Z"){for(A=0;A<8-y.length+1;A++)U[k+A]=0;D=A-1}else U[k+D]=Ce(parseInt(y[k],16));else U[k+D]=y[k];return[U[1]<<16|U[0],U[3]<<16|U[2],U[5]<<16|U[4],U[7]<<16|U[6]]}var Ri={address_map:{id:1,addrs:{},names:{}},lookup_name:function(d){var y=Ti(d);if(y!==null||(y=he(d),y!==null))return d;var k;if(Ri.address_map.addrs[d])k=Ri.address_map.addrs[d];else{var D=Ri.address_map.id++;mi(D<65535,"exceeded max address mappings of 65535"),k="172.29."+(D&255)+"."+(D&65280),Ri.address_map.names[k]=d,Ri.address_map.addrs[d]=k}return k},lookup_addr:function(d){return Ri.address_map.names[d]?Ri.address_map.names[d]:null}};function fr(d,y,k){if(k&&d===0)return null;var D=_r(d,y);if(D.errno)throw new cr.ErrnoError(D.errno);return D.addr=Ri.lookup_addr(D.addr)||D.addr,D}function Jr(d,y,k){var D=Xi(d),A=fr(y,k);return D.sock_ops.bind(D,A.addr,A.port),0}function Qr(d,y,k){var D=Xi(d),A=fr(y,k);return D.sock_ops.connect(D,A.addr,A.port),0}function Zr(d,y,k,D){return y=B.getStr(y),y=B.calculateAt(d,y),B.doAccess(y,k)}function en(d,y,k){return B.varargs=k,0}function rn(d,y){}function nn(d,y,k){}function tn(d,y,k){}function dr(d,y){qi.fill(0,d,d+y)}function vi(d,y,k,D,A){switch(y){case 2:k=Ti(k),dr(d,16),A&&(P[A>>2]=16),Qi[d>>1]=y,P[d+4>>2]=k,Qi[d+2>>1]=Ce(D);break;case 10:k=he(k),dr(d,28),A&&(P[A>>2]=28),P[d>>2]=y,P[d+8>>2]=k[0],P[d+12>>2]=k[1],P[d+16>>2]=k[2],P[d+20>>2]=k[3],Qi[d+2>>1]=Ce(D);break;default:return 5}return 0}function an(d,y,k){var D=Xi(d);if(!D.daddr)return-53;var A=vi(y,D.family,Ri.lookup_name(D.daddr),D.dport,k);return 0}function on(d,y,k,D,A){var O=Xi(d);return y===1&&k===4?(P[D>>2]=O.error,P[A>>2]=4,O.error=null,0):-50}function pr(d,y,k){return B.varargs=k,0}function se(d,y){}function Oe(d,y,k){}function mr(d,y,k,D){}function yr(d,y,k,D){B.varargs=D}function ve(d,y,k,D,A,O){var U=Xi(d),I=U.sock_ops.recvmsg(U,k);if(!I)return 0;if(A)var W=vi(A,U.family,Ri.lookup_name(I.addr),I.port,O);return qi.set(I.buffer,y),I.buffer.byteLength}function be(d,y,k,D){}function Pe(d){}function Fi(d,y,k,D,A,O){}function hr(d,y,k){}function sn(d,y){}function ln(d,y,k){}function un(d){}var vr="To use dlopen, you need enable dynamic linking, see https://github.com/emscripten-core/emscripten/wiki/Linking";function cn(d,y){Si(vr)}function _n(d,y){Si(vr)}function fn(){return Date.now()}var br=!0;function Le(){return br}function dn(){Si("")}function pn(d,y){return globalThis.DUCKDB_RUNTIME.createDirectory(i,d,y)}function mn(d,y){return globalThis.DUCKDB_RUNTIME.checkDirectory(i,d,y)}function yn(d,y){return globalThis.DUCKDB_RUNTIME.listDirectoryEntries(i,d,y)}function hn(d,y){return globalThis.DUCKDB_RUNTIME.removeDirectory(i,d,y)}function vn(d){return globalThis.DUCKDB_RUNTIME.closeFile(i,d)}function bn(d,y){return globalThis.DUCKDB_RUNTIME.checkFile(i,d,y)}function jn(d){return globalThis.DUCKDB_RUNTIME.getLastFileModificationTime(i,d)}function gn(d,y,k,D){return globalThis.DUCKDB_RUNTIME.moveFile(i,d,y,k,D)}function wn(d,y){return globalThis.DUCKDB_RUNTIME.openFile(i,d,y)}function kn(d,y,k,D){return globalThis.DUCKDB_RUNTIME.readFile(i,d,y,k,D)}function Cn(d,y){return globalThis.DUCKDB_RUNTIME.truncateFile(i,d,y)}function En(d,y,k,D){return globalThis.DUCKDB_RUNTIME.writeFile(i,d,y,k,D)}function Sn(d,y){return globalThis.DUCKDB_RUNTIME.glob(i,d,y)}function Dn(d){return globalThis.DUCKDB_RUNTIME.testPlatformFeature(i,d)}function jr(d,y,k,D,A,O){return globalThis.DUCKDB_RUNTIME.callScalarUDF(i,d,y,k,D,A,O)}function gr(){return 2147483648}var We;ii?We=()=>{var d=process.hrtime();return d[0]*1e3+d[1]/1e6}:We=()=>performance.now();function An(d,y,k){qi.copyWithin(d,y,y+k)}function Tn(d){try{return ji.grow(d-Je.byteLength+65535>>>16),Ze(ji.buffer),1}catch(y){}}function Rn(d){var y=qi.length;d=d>>>0;var k=gr();if(d>k)return!1;let D=(W,J)=>W+(J-W%J)%J;for(var A=1;A<=4;A*=2){var O=y*(1+.2/A);O=Math.min(O,d+100663296);var U=Math.min(k,D(Math.max(d,O),65536)),I=Tn(U);if(I)return!0}return!1}var qe={};function Fn(){return S||"./this.program"}function le(){if(!le.strings){var d=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",y={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:d,_:Fn()};for(var k in qe)qe[k]===void 0?delete y[k]:y[k]=qe[k];var D=[];for(var k in y)D.push(k+"="+y[k]);le.strings=D}return le.strings}function xn(d,y){var k=0;return le().forEach(function(D,A){var O=y+k;P[d+A*4>>2]=O,Ie(D,O),k+=D.length+1}),0}function In(d,y){var k=le();P[d>>2]=k.length;var D=0;return k.forEach(function(A){D+=A.length+1}),P[y>>2]=D,0}function Un(d){return 0}function Nn(d,y,k,D,A,O){var U=B.getStreamFromFD(d),I=B.doReadv(U,y,k,D);return P[O>>2]=I,0}function Bn(d,y,k,D,A,O){var U=B.getStreamFromFD(d),I=B.doWritev(U,y,k,D);return P[O>>2]=I,0}function Mn(d,y,k,D){var A=B.getStreamFromFD(d),O=B.doReadv(A,y,k);return P[D>>2]=O,0}function Hn(d,y,k,D,A){}function On(d){var y=B.getStreamFromFD(d);return y.stream_ops&&y.stream_ops.fsync?-y.stream_ops.fsync(y):0}function Pn(d,y,k,D){for(var A=0,O=0;O<k;O++){var U=P[y>>2],I=P[y+4>>2];y+=8;for(var W=0;W<I;W++)B.printChar(d,qi[U+W]);A+=I}return P[D>>2]=A,0}function Ln(d,y,k,D){var A=0,O=0,U=0,I=0,W=0,J=0,ei;function Di(ti,g,v,j,xi,Wi){var F,Y,oi,gi;return Y=ti===10?28:16,xi=ti===10?oe(xi):He(xi),F=ze(Y),gi=vi(F,ti,xi,Wi),mi(!gi),oi=ze(32),P[oi+4>>2]=ti,P[oi+8>>2]=g,P[oi+12>>2]=v,P[oi+24>>2]=j,P[oi+20>>2]=F,ti===10?P[oi+16>>2]=28:P[oi+16>>2]=16,P[oi+28>>2]=0,oi}if(k&&(U=P[k>>2],I=P[k+4>>2],W=P[k+8>>2],J=P[k+12>>2]),W&&!J&&(J=W===2?17:6),!W&&J&&(W=J===17?2:1),J===0&&(J=6),W===0&&(W=1),!d&&!y)return-2;if(U&-1088||k!==0&&P[k>>2]&2&&!d)return-1;if(U&32)return-2;if(W!==0&&W!==1&&W!==2)return-7;if(I!==0&&I!==2&&I!==10)return-6;if(y&&(y=Pi(y),O=parseInt(y,10),isNaN(O)))return U&1024?-2:-8;if(!d)return I===0&&(I=2),(U&1)===0&&(I===2?A=ke(2130706433):A=[0,0,0,1]),ei=Di(I,W,J,null,A,O),P[D>>2]=ei,0;if(d=Pi(d),A=Ti(d),A!==null)if(I===0||I===2)I=2;else if(I===10&&U&8)A=[0,0,ke(65535),A],I=10;else return-2;else if(A=he(d),A!==null)if(I===0||I===10)I=10;else return-2;return A!=null?(ei=Di(I,W,J,d,A,O),P[D>>2]=ei,0):U&4?-2:(d=Ri.lookup_name(d),A=Ti(d),I===0?I=2:I===10&&(A=[0,0,ke(65535),A]),ei=Di(I,W,J,null,A,O),P[D>>2]=ei,0)}function Wn(){if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function"){var d=new Uint8Array(1);return function(){return crypto.getRandomValues(d),d[0]}}else if(ii)try{var y=bl("crypto");return function(){return y.randomBytes(1)[0]}}catch(k){}return function(){Si("randomDevice")}}function je(d,y){je.randomDevice||(je.randomDevice=Wn());for(var k=0;k<y;k++)Ji[d+k>>0]=je.randomDevice();return 0}function qn(d,y,k,D,A,O,U){var I=_r(d,y);if(I.errno)return-6;var W=I.port,J=I.addr,ei=!1;if(k&&D){var Di;if(U&1||!(Di=Ri.lookup_addr(J))){if(U&8)return-2}else J=Di;var ti=de(J,k,D);ti+1>=D&&(ei=!0)}if(A&&O){W=""+W;var ti=de(W,A,O);ti+1>=O&&(ei=!0)}return ei?-12:0}function ue(d){return d%4===0&&(d%100!==0||d%400===0)}function Xe(d,y){for(var k=0,D=0;D<=y;k+=d[D++]);return k}var wr=[31,29,31,30,31,30,31,31,30,31,30,31],kr=[31,28,31,30,31,30,31,31,30,31,30,31];function Xn(d,y){for(var k=new Date(d.getTime());y>0;){var D=ue(k.getFullYear()),A=k.getMonth(),O=(D?wr:kr)[A];if(y>O-k.getDate())y-=O-k.getDate()+1,k.setDate(1),A<11?k.setMonth(A+1):(k.setMonth(0),k.setFullYear(k.getFullYear()+1));else return k.setDate(k.getDate()+y),k}return k}function Ke(d,y,k,D){var A=P[D+40>>2],O={tm_sec:P[D>>2],tm_min:P[D+4>>2],tm_hour:P[D+8>>2],tm_mday:P[D+12>>2],tm_mon:P[D+16>>2],tm_year:P[D+20>>2],tm_wday:P[D+24>>2],tm_yday:P[D+28>>2],tm_isdst:P[D+32>>2],tm_gmtoff:P[D+36>>2],tm_zone:A?Pi(A):""},U=Pi(k),I={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var W in I)U=U.replace(new RegExp(W,"g"),I[W]);var J=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ei=["January","February","March","April","May","June","July","August","September","October","November","December"];function Di(F,Y,oi){for(var gi=typeof F=="number"?F.toString():F||"";gi.length<Y;)gi=oi[0]+gi;return gi}function ti(F,Y){return Di(F,Y,"0")}function g(F,Y){function oi(_e){return _e<0?-1:_e>0?1:0}var gi;return(gi=oi(F.getFullYear()-Y.getFullYear()))===0&&(gi=oi(F.getMonth()-Y.getMonth()))===0&&(gi=oi(F.getDate()-Y.getDate())),gi}function v(F){switch(F.getDay()){case 0:return new Date(F.getFullYear()-1,11,29);case 1:return F;case 2:return new Date(F.getFullYear(),0,3);case 3:return new Date(F.getFullYear(),0,2);case 4:return new Date(F.getFullYear(),0,1);case 5:return new Date(F.getFullYear()-1,11,31);case 6:return new Date(F.getFullYear()-1,11,30)}}function j(F){var Y=Xn(new Date(F.tm_year+1900,0,1),F.tm_yday),oi=new Date(Y.getFullYear(),0,4),gi=new Date(Y.getFullYear()+1,0,4),_e=v(oi),Tr=v(gi);return g(_e,Y)<=0?g(Tr,Y)<=0?Y.getFullYear()+1:Y.getFullYear():Y.getFullYear()-1}var xi={"%a":function(F){return J[F.tm_wday].substring(0,3)},"%A":function(F){return J[F.tm_wday]},"%b":function(F){return ei[F.tm_mon].substring(0,3)},"%B":function(F){return ei[F.tm_mon]},"%C":function(F){var Y=F.tm_year+1900;return ti(Y/100|0,2)},"%d":function(F){return ti(F.tm_mday,2)},"%e":function(F){return Di(F.tm_mday,2," ")},"%g":function(F){return j(F).toString().substring(2)},"%G":function(F){return j(F)},"%H":function(F){return ti(F.tm_hour,2)},"%I":function(F){var Y=F.tm_hour;return Y==0?Y=12:Y>12&&(Y-=12),ti(Y,2)},"%j":function(F){return ti(F.tm_mday+Xe(ue(F.tm_year+1900)?wr:kr,F.tm_mon-1),3)},"%m":function(F){return ti(F.tm_mon+1,2)},"%M":function(F){return ti(F.tm_min,2)},"%n":function(){return`
16
+ `},"%p":function(F){return F.tm_hour>=0&&F.tm_hour<12?"AM":"PM"},"%S":function(F){return ti(F.tm_sec,2)},"%t":function(){return" "},"%u":function(F){return F.tm_wday||7},"%U":function(F){var Y=F.tm_yday+7-F.tm_wday;return ti(Math.floor(Y/7),2)},"%V":function(F){var Y=Math.floor((F.tm_yday+7-(F.tm_wday+6)%7)/7);if((F.tm_wday+371-F.tm_yday-2)%7<=2&&Y++,Y){if(Y==53){var gi=(F.tm_wday+371-F.tm_yday)%7;gi!=4&&(gi!=3||!ue(F.tm_year))&&(Y=1)}}else{Y=52;var oi=(F.tm_wday+7-F.tm_yday-1)%7;(oi==4||oi==5&&ue(F.tm_year%400-1))&&Y++}return ti(Y,2)},"%w":function(F){return F.tm_wday},"%W":function(F){var Y=F.tm_yday+7-(F.tm_wday+6)%7;return ti(Math.floor(Y/7),2)},"%y":function(F){return(F.tm_year+1900).toString().substring(2)},"%Y":function(F){return F.tm_year+1900},"%z":function(F){var Y=F.tm_gmtoff,oi=Y>=0;return Y=Math.abs(Y)/60,Y=Y/60*100+Y%60,(oi?"+":"-")+String("0000"+Y).slice(-4)},"%Z":function(F){return F.tm_zone},"%%":function(){return"%"}};U=U.replace(/%%/g,"\0\0");for(var W in xi)U.includes(W)&&(U=U.replace(new RegExp(W,"g"),xi[W](O)));U=U.replace(/\0\0/g,"%");var Wi=ce(U,!1);return Wi.length>y?0:(xe(Wi,d),Wi.length-1)}function Kn(d,y,k,D){return Ke(d,y,k,D)}function ce(d,y,k){var D=k>0?k:Li(d)+1,A=new Array(D),O=Fe(d,A,0,A.length);return y&&(A.length=O),A}var Yn={a:ye,P:Vr,R:Jr,Q:Qr,J:Zr,b:en,$:rn,u:nn,X:tn,L:an,O:on,ba:pr,Y:se,aa:Oe,Z:mr,o:yr,M:ve,H:be,m:Pe,N:Fi,k:hr,_:sn,n:ln,T:un,V:cn,U:_n,da:fn,ca:Le,d:dn,B:pn,C:mn,z:yn,A:hn,i:vn,x:bn,E:jn,y:gn,F:wn,f:kn,D:Cn,j:En,w:Sn,g:Dn,G:jr,ea:gr,S:We,fa:An,ga:Rn,q:xn,r:In,c:Un,t:Nn,s:Bn,h:Mn,v:Hn,I:On,e:Pn,l:Ln,W:je,K:qn,p:Kn},Gt=Ai(),zn=i.___wasm_call_ctors=function(){return(zn=i.___wasm_call_ctors=i.asm.ia).apply(null,arguments)},Gn=i._main=function(){return(Gn=i._main=i.asm.ja).apply(null,arguments)},Vn=i._duckdb_web_fs_glob_add_path=function(){return(Vn=i._duckdb_web_fs_glob_add_path=i.asm.ka).apply(null,arguments)},$n=i._duckdb_web_clear_response=function(){return($n=i._duckdb_web_clear_response=i.asm.la).apply(null,arguments)},Jn=i._duckdb_web_fail_with=function(){return(Jn=i._duckdb_web_fail_with=i.asm.ma).apply(null,arguments)},Qn=i._duckdb_web_reset=function(){return(Qn=i._duckdb_web_reset=i.asm.na).apply(null,arguments)},Zn=i._duckdb_web_connect=function(){return(Zn=i._duckdb_web_connect=i.asm.oa).apply(null,arguments)},it=i._duckdb_web_disconnect=function(){return(it=i._duckdb_web_disconnect=i.asm.pa).apply(null,arguments)},et=i._duckdb_web_flush_files=function(){return(et=i._duckdb_web_flush_files=i.asm.qa).apply(null,arguments)},rt=i._duckdb_web_flush_file=function(){return(rt=i._duckdb_web_flush_file=i.asm.ra).apply(null,arguments)},ge=i._duckdb_web_open=function(){return(ge=i._duckdb_web_open=i.asm.sa).apply(null,arguments)},nt=i._duckdb_web_get_global_file_info=function(){return(nt=i._duckdb_web_get_global_file_info=i.asm.ta).apply(null,arguments)},tt=i._duckdb_web_collect_file_stats=function(){return(tt=i._duckdb_web_collect_file_stats=i.asm.ua).apply(null,arguments)},at=i._duckdb_web_export_file_stats=function(){return(at=i._duckdb_web_export_file_stats=i.asm.va).apply(null,arguments)},we=i._duckdb_web_fs_drop_file=function(){return(we=i._duckdb_web_fs_drop_file=i.asm.wa).apply(null,arguments)},ot=i._duckdb_web_fs_drop_files=function(){return(ot=i._duckdb_web_fs_drop_files=i.asm.xa).apply(null,arguments)},Cr=i._duckdb_web_fs_glob_file_infos=function(){return(Cr=i._duckdb_web_fs_glob_file_infos=i.asm.ya).apply(null,arguments)},Er=i._duckdb_web_fs_get_file_info_by_id=function(){return(Er=i._duckdb_web_fs_get_file_info_by_id=i.asm.za).apply(null,arguments)},st=i._duckdb_web_fs_get_file_info_by_name=function(){return(st=i._duckdb_web_fs_get_file_info_by_name=i.asm.Aa).apply(null,arguments)},lt=i._duckdb_web_fs_set_file_descriptor=function(){return(lt=i._duckdb_web_fs_set_file_descriptor=i.asm.Ba).apply(null,arguments)},ut=i._duckdb_web_fs_register_file_url=function(){return(ut=i._duckdb_web_fs_register_file_url=i.asm.Ca).apply(null,arguments)},ct=i._duckdb_web_fs_register_file_buffer=function(){return(ct=i._duckdb_web_fs_register_file_buffer=i.asm.Da).apply(null,arguments)},_t=i._duckdb_web_copy_file_to_buffer=function(){return(_t=i._duckdb_web_copy_file_to_buffer=i.asm.Ea).apply(null,arguments)},Vt=i._duckdb_web_copy_file_to_path=function(){return(Vt=i._duckdb_web_copy_file_to_path=i.asm.Fa).apply(null,arguments)},ft=i._duckdb_web_get_version=function(){return(ft=i._duckdb_web_get_version=i.asm.Ga).apply(null,arguments)},dt=i._duckdb_web_get_feature_flags=function(){return(dt=i._duckdb_web_get_feature_flags=i.asm.Ha).apply(null,arguments)},pt=i._duckdb_web_tokenize=function(){return(pt=i._duckdb_web_tokenize=i.asm.Ia).apply(null,arguments)},mt=i._duckdb_web_udf_scalar_create=function(){return(mt=i._duckdb_web_udf_scalar_create=i.asm.Ja).apply(null,arguments)},yt=i._duckdb_web_prepared_create=function(){return(yt=i._duckdb_web_prepared_create=i.asm.Ka).apply(null,arguments)},ht=i._duckdb_web_prepared_close=function(){return(ht=i._duckdb_web_prepared_close=i.asm.La).apply(null,arguments)},vt=i._duckdb_web_prepared_run=function(){return(vt=i._duckdb_web_prepared_run=i.asm.Ma).apply(null,arguments)},bt=i._duckdb_web_prepared_send=function(){return(bt=i._duckdb_web_prepared_send=i.asm.Na).apply(null,arguments)},jt=i._duckdb_web_query_run=function(){return(jt=i._duckdb_web_query_run=i.asm.Oa).apply(null,arguments)},gt=i._duckdb_web_query_send=function(){return(gt=i._duckdb_web_query_send=i.asm.Pa).apply(null,arguments)},wt=i._duckdb_web_query_fetch_results=function(){return(wt=i._duckdb_web_query_fetch_results=i.asm.Qa).apply(null,arguments)},kt=i._duckdb_web_get_tablenames=function(){return(kt=i._duckdb_web_get_tablenames=i.asm.Ra).apply(null,arguments)},Ct=i._duckdb_web_insert_arrow_from_ipc_stream=function(){return(Ct=i._duckdb_web_insert_arrow_from_ipc_stream=i.asm.Sa).apply(null,arguments)},Et=i._duckdb_web_insert_csv_from_path=function(){return(Et=i._duckdb_web_insert_csv_from_path=i.asm.Ta).apply(null,arguments)},St=i._duckdb_web_insert_json_from_path=function(){return(St=i._duckdb_web_insert_json_from_path=i.asm.Ua).apply(null,arguments)},ke=i._htonl=function(){return(ke=i._htonl=i.asm.Va).apply(null,arguments)},Ce=i._htons=function(){return(Ce=i._htons=i.asm.Wa).apply(null,arguments)},Ye=i._ntohs=function(){return(Ye=i._ntohs=i.asm.Xa).apply(null,arguments)},ze=i._malloc=function(){return(ze=i._malloc=i.asm.Ya).apply(null,arguments)},Dt=i._free=function(){return(Dt=i._free=i.asm.Za).apply(null,arguments)},Sr=i.stackSave=function(){return(Sr=i.stackSave=i.asm._a).apply(null,arguments)},Dr=i.stackRestore=function(){return(Dr=i.stackRestore=i.asm.$a).apply(null,arguments)},Ge=i.stackAlloc=function(){return(Ge=i.stackAlloc=i.asm.ab).apply(null,arguments)};i.ccall=ri;var Ee;function Se(d){this.name="ExitStatus",this.message="Program terminated with exit("+d+")",this.status=d}var At=!1;te=function d(){Ee||Ve(),Ee||(te=d)};function Tt(d){var y=i._main,k=0,D=0;try{var A=y(k,D);return Rt(A,!0),A}catch(O){return me(O)}finally{At=!0}}function Ve(d){if(d=d||C,Vi>0||(tr(),Vi>0))return;function y(){Ee||(Ee=!0,i.calledRun=!0,!yi&&(qr(),ar(),m(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),Ar&&Tt(d),Xr()))}i.setStatus?(i.setStatus("Running..."),setTimeout(function(){setTimeout(function(){i.setStatus("")},1),y()},1)):y()}i.run=Ve;function Rt(d,y){wi=d,Ft(d)}function Ft(d){wi=d,nr()||(i.onExit&&i.onExit(d),yi=!0),R(d,new Se(d))}if(i.preInit)for(typeof i.preInit=="function"&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();var Ar=!0;return i.noInitialRun&&(Ar=!1),Ve(),c.ready}})(),Ll=op;var Lr=class extends Te{constructor(c,i,m,h=null){super(c,i,m,h)}instantiateImpl(c){return Ll(fe(Ki({},c),{instantiateWasm:this.instantiateWasm.bind(this),locateFile:this.locateFile.bind(this)}))}};async function lm(_,c,i){return(await Kt()).wasmExceptions&&_.eh?new Lr(c,i,_.eh.mainModule):new Pr(c,i,_.mvp.mainModule)}export{si as BROWSER_RUNTIME,Al as ConsoleLogger,Sl as DEFAULT_RUNTIME,Hr as DuckDBBindingsBase,xr as DuckDBConnection,Cl as DuckDBDataProtocol,Rd as DuckDBFeature,El as FileFlags,Br as FileStatistics,Fd as JSONTableShape,Ud as LogEvent,xd as LogLevel,Nd as LogOrigin,Id as LogTopic,Il as PACKAGE_NAME,Ul as PACKAGE_VERSION,Dp as PACKAGE_VERSION_MAJOR,Ap as PACKAGE_VERSION_MINOR,Tp as PACKAGE_VERSION_PATCH,Nt as PreparedStatement,Ir as ResultStreamIterator,Sd as StatusCode,Dl as VoidLogger,ni as callSRet,De as copyBuffer,lm as createDuckDB,Ad as decodeText,ci as dropResponseBuffers,zi as failWith,Up as getJsDelivrBundles,gp as getLogEventLabel,jp as getLogLevelLabel,kp as getLogOriginLabel,wp as getLogTopicLabel,Kt as getPlatformFeatures,xp as isFirefox,Nl as isNode,Ip as isSafari,V as readString,Np as selectBundle};
17
+ /**
18
+ * [js-sha256]{@link https://github.com/emn178/js-sha256}
19
+ *
20
+ * @version 0.9.0
21
+ * @author Chen, Yi-Cyuan [emn178@gmail.com]
22
+ * @copyright Chen, Yi-Cyuan 2014-2017
23
+ * @license MIT
24
+ */
34
25
  //# sourceMappingURL=duckdb-browser-blocking.mjs.map