PageSourceSearch

https://swiftfi-beta.vercel.app/_next/static/chunks/4823-eb77740df967748d.js

js swiftfi-beta.vercel.app collected 2026-10-03 07:50:26 UTC 178,586 bytes, 15 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4823],{19824:function(t,e){"use strict";let r=-8,n=-4,i=0,o=1,s=1,a=2,u=5,l=1024,c=2048,f=8192,h=0,d=4,p=8,y=12,g=12,b=16,m="undefined"!=typeof BigUint64Array,w=Symbol(),D=1024;function E(t,e){let r=new Uint32Array(t),i=new Uint16Array(t);var o=r[e+n>>>2]>>>1,s=e>>>1;if(o<=D)return String.fromCharCode.apply(String,i.subarray(s,s+o));let a=[];do{let u=i[s+D-1],l=u>=55296&&u<56320?D-1:D;a.push(String.fromCharCode.apply(String,i.subarray(s,s+=l))),o-=l}while(o>D);return a.join("")+String.fromCharCode.apply(String,i.subarray(s,s+o))}function _(t){let e={};function r(t,e){return t?E(t.buffer,e):"<yet unknown>"}let n=t.env=t.env||{};return n.abort=n.abort||function(t,i,o,s){let a=e.memory||n.memory;throw Error("abort: "+r(a,t)+" at "+r(a,i)+":"+o+":"+s)},n.trace=n.trace||function(t,i){let o=e.memory||n.memory;console.log("trace: "+r(o,t)+(i?" ":"")+Array.prototype.slice.call(arguments,2,2+i).join(", "))},t.Math=t.Math||Math,t.Date=t.Date||Date,e}function v(t,e){let w=e.exports,D=w.memory,_=w.table,v=w.__alloc,A=w.__retain,k=w.__rtti_base||-1;function C(t){let e=new Uint32Array(D.buffer),r=e[k>>>2];if((t>>>=0)>=r)throw Error("invalid id: "+t);return e[(k+4>>>2)+2*t]}function x(t){let e=new Uint32Array(D.buffer),r=e[k>>>2];if((t>>>=0)>=r)throw Error("invalid id: "+t);return e[(k+4>>>2)+2*t+1]}function T(t){return 31-Math.clz32(t>>>u&31)}function B(t){let e=t.length,r=v(e<<1,o),n=new Uint16Array(D.buffer);for(var i=0,s=r>>>1;i<e;++i)n[s+i]=t.charCodeAt(i);return r}function N(t){let e=D.buffer,n=new Uint32Array(e)[t+r>>>2];if(n!==o)throw Error("not a string: "+t);return E(e,t)}function I(t,e,r){let n=D.buffer;if(r)switch(t){case 2:return new Float32Array(n);case 3:return new Float64Array(n)}else switch(t){case 0:return new(e?Int8Array:Uint8Array)(n);case 1:return new(e?Int16Array:Uint16Array)(n);case 2:return new(e?Int32Array:Uint32Array)(n);case 3:return new(e?BigInt64Array:BigUint64Array)(n)}throw Error("unsupported align: "+t)}function z(t,e){let r=C(t);if(!(r&(s|a)))throw Error("not an array: "+t+" @ "+r);let n=T(r),o=e.length,u=v(o<<n,i),m=v(r&a?b:y,t),w=new Uint32Array(D.buffer);w[m+h>>>2]=A(u),w[m+d>>>2]=u,w[m+p>>>2]=o<<n,r&a&&(w[m+g>>>2]=o);let E=I(n,r&l,r&c);if(r&f)for(let _=0;_<o;++_)E[(u>>>n)+_]=A(e[_]);else E.set(e,u>>>n);return m}function U(t){let e=new Uint32Array(D.buffer),i=e[t+r>>>2],o=C(i);if(!(o&s))throw Error("not an array: "+i);let u=T(o);var f=e[t+d>>>2];let h=o&a?e[t+g>>>2]:e[f+n>>>2]>>>u;return I(u,o&l,o&c).subarray(f>>>=u,f+h)}function L(t){let e=U(t),r=e.length,n=Array(r);for(let i=0;i<r;i++)n[i]=e[i];return n}function P(t){let e=D.buffer,r=new Uint32Array(e)[t+n>>>2];return e.slice(t,t+r)}function O(t,e,r){return new t(j(t,e,r))}function j(t,e,r){let i=D.buffer,o=new Uint32Array(i),s=o[r+d>>>2];return new t(i,s,o[s+n>>>2]>>>e)}function R(t,e){let n=new Uint32Array(D.buffer);var i=n[t+r>>>2];if(i<=n[k>>>2])do if(i==e)return!0;while(i=x(i));return!1}return t.__allocString=B,t.__getString=N,t.__allocArray=z,t.__getArrayView=U,t.__getArray=L,t.__getArrayBuffer=P,t.__getInt8Array=O.bind(null,Int8Array,0),t.__getInt8ArrayView=j.bind(null,Int8Array,0),t.__getUint8Array=O.bind(null,Uint8Array,0),t.__getUint8ArrayView=j.bind(null,Uint8Array,0),t.__getUint8ClampedArray=O.bind(null,Uint8ClampedArray,0),t.__getUint8ClampedArrayView=j.bind(null,Uint8ClampedArray,0),t.__getInt16Array=O.bind(null,Int16Array,1),t.__getInt16ArrayView=j.bind(null,Int16Array,1),t.__getUint16Array=O.bind(null,Uint16Array,1),t.__getUint16ArrayView=j.bind(null,Uint16Array,1),t.__getInt32Array=O.bind(null,Int32Array,2),t.__getInt32ArrayView=j.bind(null,Int32Array,2),t.__getUint32Array=O.bind(null,Uint32Array,2),t.__getUint32ArrayView=j.bind(null,Uint32Array,2),m&&(t.__getInt64Array=O.bind(null,BigInt64Array,3),t.__getInt64ArrayView=j.bind(null,BigInt64Array,3),t.__getUint64Array=O.bind(null,BigUint64Array,3),t.__getUint64ArrayView=j.bind(null,BigUint64Array,3)),t.__getFloat32Array=O.bind(null,Float32Array,2),t.__getFloat32ArrayView=j.bind(null,Float32Array,2),t.__getFloat64Array=O.bind(null,Float64Array,3),t.__getFloat64ArrayView=j.bind(null,Float64Array,3),t.__instanceof=R,t.memory=t.memory||D,t.table=t.table||_,S(w,t)}function A(t){return"undefined"!=typeof Response&&t instanceof Response}async function k(t,e){return A(t=await t)?x(t,e):v(_(e||(e={})),await WebAssembly.instantiate(t instanceof WebAssembly.Module?t:await WebAssembly.compile(t),e))}function C(t,e){return v(_(e||(e={})),new WebAssembly.Instance(t instanceof WebAssembly.Module?t:new WebAssembly.Module(t),e))}async function x(t,e){return WebAssembly.instantiateStreaming?v(_(e||(e={})),(await WebAssembly.instantiateStreaming(t,e)).instance):k(A(t=await t)?t.arrayBuffer():t,e)}function S(t,e){var r=e?Object.create(e):{},n=t.__argumentsLength?function(e){t.__argumentsLength.value=e}:t.__setArgumentsLength||t.__setargc||function(){};for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i))continue;let o=t[i],s=i.split("."),a=r;for(;s.length>1;){let u=s.shift();Object.prototype.hasOwnProperty.call(a,u)||(a[u]={}),a=a[u]}let l=s[0],c=l.indexOf("#");if(c>=0){let f=l.substring(0,c),h=a[f];if(void 0===h||!h.prototype){let d=function(...t){return d.wrap(d.prototype.constructor(0,...t))};d.prototype={valueOf:function(){return this[w]}},d.wrap=function(t){return Object.create(d.prototype,{[w]:{value:t,writable:!1}})}
1,h&&Object.getOwnPropertyNames(h).forEach(t=>Object.defineProperty(d,t,Object.getOwnPropertyDescriptor(h,t))),a[f]=d}if(l=l.substring(c+1),a=a[f].prototype,/^(get|set):/.test(l)){if(!Object.prototype.hasOwnProperty.call(a,l=l.substring(4))){let p=t[i.replace("set:","get:")],y=t[i.replace("get:","set:")];Object.defineProperty(a,l,{get:function(){return p(this[w])},set:function(t){y(this[w],t)},enumerable:!0})}}else"constructor"===l?(a[l]=(...t)=>(n(t.length),o(...t))).original=o:(a[l]=function(...t){return n(t.length),o(this[w],...t)}).original=o}else/^(get|set):/.test(l)?Object.prototype.hasOwnProperty.call(a,l=l.substring(4))||Object.defineProperty(a,l,{get:t[i.replace("set:","get:")],set:t[i.replace("get:","set:")],enumerable:!0}):"function"==typeof o&&o!==n?(a[l]=(...t)=>(n(t.length),o(...t))).original=o:a[l]=o}return r}e.instantiate=k,e.instantiateSync=C,e.instantiateStreaming=x,e.demangle=S},34537:function(t){"use strict";function e(t,e){for(var r=Array(arguments.length-1),n=0,i=2,o=!0;i<arguments.length;)r[n++]=arguments[i++];return new Promise(function(i,s){r[n]=function(t){if(o){if(o=!1,t)s(t);else{for(var e=Array(arguments.length-1),r=0;r<e.length;)e[r++]=arguments[r];i.apply(null,e)}}};try{t.apply(e||null,r)}catch(a){o&&(o=!1,s(a))}})}t.exports=e},97419:function(t,e){"use strict";var r=e;r.length=function(t){var e=t.length;if(!e)return 0;for(var r=0;--e%4>1&&"="===t.charAt(e);)++r;return Math.ceil(3*t.length)/4-r};for(var n=Array(64),i=Array(123),o=0;o<64;)i[n[o]=o<26?o+65:o<52?o+71:o<62?o-4:o-59|43]=o++;r.encode=function(t,e,r){for(var i,o=null,s=[],a=0,u=0;e<r;){var l=t[e++];switch(u){case 0:s[a++]=n[l>>2],i=(3&l)<<4,u=1;break;case 1:s[a++]=n[i|l>>4],i=(15&l)<<2,u=2;break;case 2:s[a++]=n[i|l>>6],s[a++]=n[63&l],u=0}a>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,s)),a=0)}return(u&&(s[a++]=n[i],s[a++]=61,1===u&&(s[a++]=61)),o)?(a&&o.push(String.fromCharCode.apply(String,s.slice(0,a))),o.join("")):String.fromCharCode.apply(String,s.slice(0,a))};var s="invalid encoding";r.decode=function(t,e,r){for(var n,o=r,a=0,u=0;u<t.length;){var l=t.charCodeAt(u++);if(61===l&&a>1)break;if(void 0===(l=i[l]))throw Error(s);switch(a){case 0:n=l,a=1;break;case 1:e[r++]=n<<2|(48&l)>>4,n=l,a=2;break;case 2:e[r++]=(15&n)<<4|(60&l)>>2,n=l,a=3;break;case 3:e[r++]=(3&n)<<6|l,a=0}}if(1===a)throw Error(s);return r-o},r.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}},19211:function(t){"use strict";function e(){this._listeners={}}t.exports=e,e.prototype.on=function(t,e,r){return(this._listeners[t]||(this._listeners[t]=[])).push({fn:e,ctx:r||this}),this},e.prototype.off=function(t,e){if(void 0===t)this._listeners={};else if(void 0===e)this._listeners[t]=[];else for(var r=this._listeners[t],n=0;n<r.length;)r[n].fn===e?r.splice(n,1):++n;return this},e.prototype.emit=function(t){var e=this._listeners[t];if(e){for(var r=[],n=1;n<arguments.length;)r.push(arguments[n++]);for(n=0;n<e.length;)e[n].fn.apply(e[n++].ctx,r)}return this}},10945:function(t){"use strict";function e(t){return"undefined"!=typeof Float32Array?function(){var e=new Float32Array([-0]),r=new Uint8Array(e.buffer),n=128===r[3];function i(t,n,i){e[0]=t,n[i]=r[0],n[i+1]=r[1],n[i+2]=r[2],n[i+3]=r[3]}function o(t,n,i){e[0]=t,n[i]=r[3],n[i+1]=r[2],n[i+2]=r[1],n[i+3]=r[0]}function s(t,n){return r[0]=t[n],r[1]=t[n+1],r[2]=t[n+2],r[3]=t[n+3],e[0]}function a(t,n){return r[3]=t[n],r[2]=t[n+1],r[1]=t[n+2],r[0]=t[n+3],e[0]}t.writeFloatLE=n?i:o,t.writeFloatBE=n?o:i,t.readFloatLE=n?s:a,t.readFloatBE=n?a:s}():function(){function e(t,e,r,n){var i=e<0?1:0;if(i&&(e=-e),0===e)t(1/e>0?0:2147483648,r,n);else if(isNaN(e))t(2143289344,r,n);else if(e>34028234663852886e22)t((i<<31|2139095040)>>>0,r,n);else if(e<11754943508222875e-54)t((i<<31|Math.round(e/1401298464324817e-60))>>>0,r,n);else{var o=Math.floor(Math.log(e)/Math.LN2),s=8388607&Math.round(e*Math.pow(2,-o)*8388608);t((i<<31|o+127<<23|s)>>>0,r,n)}}function s(t,e,r){var n=t(e,r),i=(n>>31)*2+1,o=n>>>23&255,s=8388607&n;return 255===o?s?NaN:i*(1/0):0===o?1401298464324817e-60*i*s:i*Math.pow(2,o-150)*(s+8388608)}t.writeFloatLE=e.bind(null,r),t.writeFloatBE=e.bind(null,n),t.readFloatLE=s.bind(null,i),t.readFloatBE=s.bind(null,o)}(),"undefined"!=typeof Float64Array?function(){var e=new Float64Array([-0]),r=new 
1Uint8Array(e.buffer),n=128===r[7];function i(t,n,i){e[0]=t,n[i]=r[0],n[i+1]=r[1],n[i+2]=r[2],n[i+3]=r[3],n[i+4]=r[4],n[i+5]=r[5],n[i+6]=r[6],n[i+7]=r[7]}function o(t,n,i){e[0]=t,n[i]=r[7],n[i+1]=r[6],n[i+2]=r[5],n[i+3]=r[4],n[i+4]=r[3],n[i+5]=r[2],n[i+6]=r[1],n[i+7]=r[0]}function s(t,n){return r[0]=t[n],r[1]=t[n+1],r[2]=t[n+2],r[3]=t[n+3],r[4]=t[n+4],r[5]=t[n+5],r[6]=t[n+6],r[7]=t[n+7],e[0]}function a(t,n){return r[7]=t[n],r[6]=t[n+1],r[5]=t[n+2],r[4]=t[n+3],r[3]=t[n+4],r[2]=t[n+5],r[1]=t[n+6],r[0]=t[n+7],e[0]}t.writeDoubleLE=n?i:o,t.writeDoubleBE=n?o:i,t.readDoubleLE=n?s:a,t.readDoubleBE=n?a:s}():function(){function e(t,e,r,n,i,o){var s,a=n<0?1:0;if(a&&(n=-n),0===n)t(0,i,o+e),t(1/n>0?0:2147483648,i,o+r);else if(isNaN(n))t(0,i,o+e),t(2146959360,i,o+r);else if(n>17976931348623157e292)t(0,i,o+e),t((a<<31|2146435072)>>>0,i,o+r);else if(n<22250738585072014e-324)t((s=n/5e-324)>>>0,i,o+e),t((a<<31|s/4294967296)>>>0,i,o+r);else{var u=Math.floor(Math.log(n)/Math.LN2);1024===u&&(u=1023),t(4503599627370496*(s=n*Math.pow(2,-u))>>>0,i,o+e),t((a<<31|u+1023<<20|1048576*s&1048575)>>>0,i,o+r)}}function s(t,e,r,n,i){var o=t(n,i+e),s=t(n,i+r),a=(s>>31)*2+1,u=s>>>20&2047,l=4294967296*(1048575&s)+o;return 2047===u?l?NaN:a*(1/0):0===u?5e-324*a*l:a*Math.pow(2,u-1075)*(l+4503599627370496)}t.writeDoubleLE=e.bind(null,r,0,4),t.writeDoubleBE=e.bind(null,n,4,0),t.readDoubleLE=s.bind(null,i,0,4),t.readDoubleBE=s.bind(null,o,4,0)}(),t}function r(t,e,r){e[r]=255&t,e[r+1]=t>>>8&255,e[r+2]=t>>>16&255,e[r+3]=t>>>24}function n(t,e,r){e[r]=t>>>24,e[r+1]=t>>>16&255,e[r+2]=t>>>8&255,e[r+3]=255&t}function i(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0}function o(t,e){return(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])>>>0}t.exports=e(e)},67199:function(module){"use strict";function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}module.exports=inquire},76662:function(t){"use strict";function e(t,e,r){var n=r||8192,i=n>>>1,o=null,s=n;return function(r){if(r<1||r>i)return t(r);s+r>n&&(o=t(n),s=0);var a=e.call(o,s,s+=r);return 7&s&&(s=(7|s)+1),a}}t.exports=e},94997:function(t,e){"use strict";var r=e;r.length=function(t){for(var e=0,r=0,n=0;n<t.length;++n)(r=t.charCodeAt(n))<128?e+=1:r<2048?e+=2:(64512&r)==55296&&(64512&t.charCodeAt(n+1))==56320?(++n,e+=4):e+=3;return e},r.read=function(t,e,r){if(r-e<1)return"";for(var n,i=null,o=[],s=0;e<r;)(n=t[e++])<128?o[s++]=n:n>191&&n<224?o[s++]=(31&n)<<6|63&t[e++]:n>239&&n<365?(n=((7&n)<<18|(63&t[e++])<<12|(63&t[e++])<<6|63&t[e++])-65536,o[s++]=55296+(n>>10),o[s++]=56320+(1023&n)):o[s++]=(15&n)<<12|(63&t[e++])<<6|63&t[e++],s>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,o)),s=0);return i?(s&&i.push(String.fromCharCode.apply(String,o.slice(0,s))),i.join("")):String.fromCharCode.apply(String,o.slice(0,s))},r.write=function(t,e,r){for(var n,i,o=r,s=0;s<t.length;++s)(n=t.charCodeAt(s))<128?e[r++]=n:n<2048?(e[r++]=n>>6|192,e[r++]=63&n|128):(64512&n)==55296&&(64512&(i=t.charCodeAt(s+1)))==56320?(n=65536+((1023&n)<<10)+(1023&i),++s,e[r++]=n>>18|240,e[r++]=n>>12&63|128,e[r++]=n>>6&63|128,e[r++]=63&n|128):(e[r++]=n>>12|224,e[r++]=n>>6&63|128,e[r++]=63&n|128);return r-o}},9668:function(t,e,r){"use strict";let{Buffer:n}=r(48764),i=Symbol.for("BufferList");function o(t){if(!(this instanceof o))return new o(t);o._init.call(this,t)}o._init=function(t){Object.defineProperty(this,i,{value:!0}),this._bufs=[],this.length=0,t&&this.append(t)},o.prototype._new=function(t){return new o(t)},o.prototype._offset=function(t){if(0===t)return[0,0];let e=0;for(let r=0;r<this._bufs.length;r++){let n=e+this._bufs[r].length;if(t<n||r===this._bufs.length-1)return[r,t-e];e=n}},o.prototype._reverseOffset=function(t){let e=t[0],r=t[1];for(let n=0;n<e;n++)r+=this._bufs[n].length;return r},o.prototype.get=function(t){if(t>this.length||t<0)return;let e=this._offset(t);return this._bufs[e[0]][e[1]]},o.prototype.slice=function(t,e){return"number"==typeof t&&t<0&&(t+=this.length),"number"==typeof e&&e<0&&(e+=this.length),this.copy(null,0,t,e)},o.prototype.copy=function(t,e,r,i){if(("number"!=typeof r||r<0)&&(r=0),("number"!=typeof i||i>this.length)&&(i=this.length),r>=this.length||i<=0)return t||n.alloc(0);let o=!!t,s=this._offset(r),a=i-r,u=a,l=o&&e||0,c=s[1];if(0===r&&i===this.length){if(!o)return 1===this._bufs.length?this._bufs[0]:n.concat(this._bufs,this.length);for(let f=0;f<this._bufs.length;f++)this._bufs[f].copy(t,l),l+=this._bufs[f].length;return t}if(u<=this._bufs[s[0]].length-c)return o?this._bufs[s[0]].copy(t,e,c,c+u):this._bufs[s[0]].slice(c,c+u);o||(t=n.allocUnsafe(a));for(let h=s[0];h<this._bufs.length;h++){let d=this._bufs[h].length-c;if(u>d)this._bufs[h].copy(t,l,c),l+=d;else{this._bufs[h].copy(t,l,c,c+u),l+=d;break}u-=d,c&&(c=0)}return t.length>l?t.slice(0,l):t},o.prototype.shallowSlice=function(t,e){if(t=t||0,e="number"!=typeof e?this.length:e,t<0&&(t+=this.length),e<0&&(e+=this.length),t===e)return this._new();let r=this._offset(t),n=this._offset(e),i=this._bufs.slice(r[0],n[0]+1);return 0===n[1]?i.pop():i[i.length-1]=i[i.length-1].slice(0,n[1]),0!==r[1]&&(i[0]=i[0].slice(r[1])),this._new(i)},o.prototype.toString=function(t,e,r){return this.slice(e,r).toString(t)},o.prototype.consume=function(t){if(Number.isNaN(t=Math.trunc(t))||t<=0)return this;for(;this._bufs.length;)if(t>=this._bufs[0].length)t-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else{this._bufs[0]=this._bufs[0].slice(t),this.length-=t;break}return this},o.prototype.duplicate=function(){let t=this._new();for(let e=0;e<this._bufs.length;e++)t.append(this._bufs[e]);return t},o.prototype.append=function(t){if(null==t)return this;if(t.buffer)this._appendBuffer(n.from(t.buffer,t.byteOffset,t.byteLength));else if(Array.isArray(t))for(let e=0;e<t.length;e++)this.append(t[e]);else if(this._isBufferList(t))for(let r=0;r<t._bufs.length;r++)this.append(t._bufs[r]);else"number"==typeof t&&(t=t.toString()),this._appendBuffer(n.from(t));return this},o.prototype._appendBuffer=function(t){this._bufs.push(t),this.length+=t.length},o.prototype.indexOf=function(t,e,r){if(void 0===r&&"string"==typeof e&&(r=e,e=void 0),"function"==typeof t||Array.isArray(t))throw TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if("number"==typeof t?t=n.from([t]):"string"==typeof t?t=n.from(t,r):this._isBufferList(t)?t=t.slice():Array.isArray(t.buffer)?t=n.from(t.buffer,t.byteOffset,t.byteLength):n.isBuffer(t)||(t=n.from(t)),isNaN(e=Number(e||0))&&
1(e=0),e<0&&(e=this.length+e),e<0&&(e=0),0===t.length)return e>this.length?this.length:e;let i=this._offset(e),o=i[0],s=i[1];for(;o<this._bufs.length;o++){let a=this._bufs[o];for(;s<a.length;){let u=a.length-s;if(u>=t.length){let l=a.indexOf(t,s);if(-1!==l)return this._reverseOffset([o,l]);s=a.length-t.length+1}else{let c=this._reverseOffset([o,s]);if(this._match(c,t))return c;s++}}s=0}return -1},o.prototype._match=function(t,e){if(this.length-t<e.length)return!1;for(let r=0;r<e.length;r++)if(this.get(t+r)!==e[r])return!1;return!0},function(){let t={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(let e in t)!function(e){null===t[e]?o.prototype[e]=function(t,r){return this.slice(t,t+r)[e](0,r)}:o.prototype[e]=function(r=0){return this.slice(r,r+t[e])[e](0)}}(e)}(),o.prototype._isBufferList=function(t){return t instanceof o||o.isBufferList(t)},o.isBufferList=function(t){return null!=t&&t[i]},t.exports=o},23294:function(t,e,r){"use strict";let n=r(86154);function i(t){return"function"==typeof t.stream?n(t.stream()):n(new Response(t).body)}t.exports=i},86154:function(t){"use strict";async function*e(t,e={}){let r=t.getReader();try{for(;;){let n=await r.read();if(n.done)return;yield n.value}}finally{!0!==e.preventCancel&&r.cancel(),r.releaseLock()}}t.exports=e},32114:function(t){"use strict";function e(t,e){for(let r in e)Object.defineProperty(t,r,{value:e[r],enumerable:!0,configurable:!0});return t}function r(t,r,n){if(!t||"string"==typeof t)throw TypeError("Please pass an Error to err-code");n||(n={}),"object"==typeof r&&(n=r,r=""),r&&(n.code=r);try{return e(t,n)}catch(s){n.message=t.message,n.stack=t.stack;let i=function(){};i.prototype=Object.create(Object.getPrototypeOf(t));let o=e(new i,n);return o}}t.exports=r},30043:function(t,e,r){"use strict";let n=r(20544),{fromString:i}=r(41113);class o{constructor(t,e,r=0){this._options=t,this._popCount=0,this._parent=e,this._posAtParent=r,this._children=new n,this.key=null}async put(t,e){let r=await this._findNewBucketAndPos(t);await r.bucket._putAt(r,t,e)}async get(t){let e=await this._findChild(t);if(e)return e.value}async del(t){let e=await this._findPlace(t),r=e.bucket._at(e.pos);r&&r.key===t&&e.bucket._delAt(e.pos)}leafCount(){let t=this._children.compactArray();return t.reduce((t,e)=>e instanceof o?t+e.leafCount():t+1,0)}childrenCount(){return this._children.length}onlyChild(){return this._children.get(0)}*eachLeafSeries(){let t=this._children.compactArray();for(let e of t)e instanceof o?yield*e.eachLeafSeries():yield e;return[]}serialize(t,e){let r=[];return e(this._children.reduce((r,n,i)=>(n&&(n instanceof o?r.push(n.serialize(t,e)):r.push(t(n,i))),r),r))}asyncTransform(t,e){return l(this,t,e)}toJSON(){return this.serialize(a,u)}prettyPrint(){return JSON.stringify(this.toJSON(),null,"  ")}tableSize(){return Math.pow(2,this._options.bits)}async _findChild(t){let e=await this._findPlace(t),r=e.bucket._at(e.pos);if(!(r instanceof o)&&r&&r.key===t)return r}async _findPlace(t){let e=this._options.hash("string"==typeof t?i(t):t),r=await e.take(this._options.bits),n=this._children.get(r);return n instanceof o?n._findPlace(e):{bucket:this,pos:r,hash:e,existingChild:n}}async _findNewBucketAndPos(t){let e=await this._findPlace(t);if(e.existingChild&&e.existingChild.key!==t){let r=new o(this._options,e.bucket,e.pos);e.bucket._putObjectAt(e.pos,r);let n=await r._findPlace(e.existingChild.hash);return n.bucket._putAt(n,e.existingChild.key,e.existingChild.value),r._findNewBucketAndPos(e.hash)}return e}_putAt(t,e,r){this._putObjectAt(t.pos,{key:e,value:r,hash:t.hash})}_putObjectAt(t,e){!this._children.get(t)&&this._popCount++,this._children.set(t,e)}_delAt(t){if(-1===t)throw Error("Invalid position");this._children.get(t)&&this._popCount--,this._children.unset(t),this._level()}_level(){if(this._parent&&this._popCount<=1){if(1===this._popCount){let t=this._children.find(s);if(t&&!(t instanceof o)){let e=t.hash;e.untake(this._options.bits);let r={pos:this._posAtParent,hash:e,bucket:this._parent};this._parent._putAt(r,t.key,t.value)}}else this._parent._delAt(this._posAtParent)}}_at(t){return this._children.get(t)}}function s(t){return Boolean(t)}function a(t,e){return t.key}function u(t){return t}async function l(t,e,r){let n=[];for(let i of t._children.compactArray())if(i instanceof o)await l(i,e,r);else{let s=await e(i);n.push({bitField:t._children.bitField(),children:s})}return r(n)}t.exports=o}
1,51536:function(t){"use strict";let e=[255,254,252,248,240,224,192,128],r=[1,3,7,15,31,63,127,255];function n(t,e,r){let n=i(e,r);return(t&n)>>>e}function i(t,n){return e[t]&r[Math.min(n+t-1,7)]}t.exports=class{constructor(t){this._value=t,this._currentBytePos=t.length-1,this._currentBitPos=7}availableBits(){return this._currentBitPos+1+8*this._currentBytePos}totalBits(){return 8*this._value.length}take(t){let e=t,r=0;for(;e&&this._haveBits();){let i=this._value[this._currentBytePos],o=this._currentBitPos+1,s=Math.min(o,e),a=n(i,o-s,s);r=(r<<s)+a,e-=s,this._currentBitPos-=s,this._currentBitPos<0&&(this._currentBitPos=7,this._currentBytePos--)}return r}untake(t){for(this._currentBitPos+=t;this._currentBitPos>7;)this._currentBitPos-=8,this._currentBytePos+=1}_haveBits(){return this._currentBytePos>=0}}},31712:function(t,e,r){"use strict";let n=r(51536),{concat:i}=r(20605);function o(t){return function(e){return e instanceof s?e:new s(e,t)}}class s{constructor(t,e){if(!(t instanceof Uint8Array))throw Error("can only hash Uint8Arrays");this._value=t,this._hashFn=e,this._depth=-1,this._availableBits=0,this._currentBufferIndex=0,this._buffers=[]}async take(t){let e=t;for(;this._availableBits<e;)await this._produceMoreBits();let r=0;for(;e>0;){let n=this._buffers[this._currentBufferIndex],i=Math.min(n.availableBits(),e),o=n.take(i);r=(r<<i)+o,e-=i,this._availableBits-=i,0===n.availableBits()&&this._currentBufferIndex++}return r}untake(t){let e=t;for(;e>0;){let r=this._buffers[this._currentBufferIndex],n=Math.min(r.totalBits()-r.availableBits(),e);r.untake(n),e-=n,this._availableBits+=n,this._currentBufferIndex>0&&r.totalBits()===r.availableBits()&&(this._depth--,this._currentBufferIndex--)}}async _produceMoreBits(){this._depth++;let t=this._depth?i([this._value,Uint8Array.from([this._depth])]):this._value,e=await this._hashFn(t),r=new n(e);this._buffers.push(r),this._availableBits+=r.availableBits()}}t.exports=o,t.exports.InfiniteHash=s},54563:function(t,e,r){"use strict";let n=r(30043),i=r(31712);function o(t){if(!t||!t.hashFn)throw Error("please define an options.hashFn");let e={bits:t.bits||8,hash:i(t.hashFn)};return new n(e)}t.exports={createHAMT:o,Bucket:n}},31303:function(t){"use strict";let e=async t=>{let e=[];for await(let r of t)e.push(r);return e};t.exports=e},78165:function(t){"use strict";async function*e(t,e=1){let r=[];for await(let n of(e<1&&(e=1),t))for(r.push(n);r.length>=e;)yield r.slice(0,e),r=r.slice(e);for(;r.length;)yield r.slice(0,e),r=r.slice(e)}t.exports=e},64593:function(t){"use strict";let e=async t=>{for await(let e of t);};t.exports=e},55565:function(t){"use strict";let e=async function*(t,e){for await(let r of t)await e(r)&&(yield r)};t.exports=e},93093:function(t){"use strict";let e=async t=>{let e;for await(let r of t)e=r;return e};t.exports=e},32121:function(t){"use strict";let e=async function*(t,e){for await(let r of t)yield e(r)};t.exports=e},84810:function(t,e,r){"use strict";let n=r(78165);async function*i(t,e=1){for await(let r of n(t,e)){let i=r.map(t=>t().then(t=>({ok:!0,value:t}),t=>({ok:!1,err:t})));for(let o=0;o<i.length;o++){let s=await i[o];if(s.ok)yield s.value;else throw s.err}}}t.exports=i},28132:function(t){"use strict";function e(t){let[e,r]=t[Symbol.asyncIterator]?[t[Symbol.asyncIterator](),Symbol.asyncIterator]:[t[Symbol.iterator](),Symbol.iterator],n=[];return{peek:()=>e.next(),push(t){n.push(t)},next:()=>n.length?{done:!1,value:n.shift()}:e.next(),[r](){return this}}}t.exports=e},60618:function(t){let e=(...t)=>{let e;for(;t.length;)e=t.shift()(e);return e},r=t=>t&&("function"==typeof t[Symbol.asyncIterator]||"function"==typeof t[Symbol.iterator]||"function"==typeof t.next),n=t=>t&&"function"==typeof t.sink&&r(t.source),i=t=>e=>(t.sink(e),t.source),o=(...t)=>{if(n(t[0])){let o=t[0];t[0]=()=>o.source}else if(r(t[0])){let s=t[0];t[0]=()=>s}if(t.length>1&&n(t[t.length-1])&&(t[t.length-1]=t[t.length-1].sink),t.length>2)for(let a=1;a<t.length-1;
1a++)n(t[a])&&(t[a]=i(t[a]));return e(...t)};t.exports=o,t.exports.pipe=o,t.exports.rawPipe=e,t.exports.isIterable=r,t.exports.isDuplex=n},37939:function(t){"use strict";let e=async function*(t,e){let r=0;if(!(e<1)){for await(let n of t)if(yield n,++r===e)return}};t.exports=e},70942:function(t,e,r){"use strict";let n=r(49727),{hasOwnProperty:i}=Object.prototype,{propertyIsEnumerable:o}=Object,s=(t,e,r)=>Object.defineProperty(t,e,{value:r,writable:!0,enumerable:!0,configurable:!0}),a=this,u={concatArrays:!1,ignoreUndefined:!1},l=t=>{let e=[];for(let r in t)i.call(t,r)&&e.push(r);if(Object.getOwnPropertySymbols){let n=Object.getOwnPropertySymbols(t);for(let s of n)o.call(t,s)&&e.push(s)}return e};function c(t){return Array.isArray(t)?f(t):n(t)?h(t):t}function f(t){let e=t.slice(0,0);return l(t).forEach(r=>{s(e,r,c(t[r]))}),e}function h(t){let e=null===Object.getPrototypeOf(t)?Object.create(null):{};return l(t).forEach(r=>{s(e,r,c(t[r]))}),e}let d=(t,e,r,n)=>(r.forEach(r=>{void 0===e[r]&&n.ignoreUndefined||(r in t&&t[r]!==Object.getPrototypeOf(t)?s(t,r,y(t[r],e[r],n)):s(t,r,c(e[r])))}),t),p=(t,e,r)=>{let n=t.slice(0,0),o=0;return[t,e].forEach(e=>{let a=[];for(let u=0;u<e.length;u++)i.call(e,u)&&(a.push(String(u)),e===t?s(n,o++,e[u]):s(n,o++,c(e[u])));n=d(n,e,l(e).filter(t=>!a.includes(t)),r)}),n};function y(t,e,r){return r.concatArrays&&Array.isArray(t)&&Array.isArray(e)?p(t,e,r):n(e)&&n(t)?d(t,e,l(e),r):c(e)}t.exports=function(...t){let e=y(c(u),this!==a&&this||{},u),r={_:{}};for(let i of t)if(void 0!==i){if(!n(i))throw TypeError("`"+i+"` is not an Option Object");r=y(r,{_:i},e)}return r._}},49727:function(t){"use strict";t.exports=t=>{if("[object Object]"!==Object.prototype.toString.call(t))return!1;let e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}},40469:function(t,e,r){t.exports=r(18027)},18027:function(t,e){!function(r,n){"use strict";var i={version:"3.0.0",x86:{},x64:{},inputValidation:!0};function o(t){if(!Array.isArray(t)&&!ArrayBuffer.isView(t))return!1;for(var e=0;e<t.length;e++)if(!Number.isInteger(t[e])||t[e]<0||t[e]>255)return!1;return!0}function s(t,e){return(65535&t)*e+(((t>>>16)*e&65535)<<16)}function a(t,e){return t<<e|t>>>32-e}function u(t){return t^=t>>>16,t=s(t,2246822507),t^=t>>>13,t=s(t,3266489909),t^=t>>>16}function l(t,e){t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]],e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]];var r=[0,0,0,0];return r[3]+=t[3]+e[3],r[2]+=r[3]>>>16,r[3]&=65535,r[2]+=t[2]+e[2],r[1]+=r[2]>>>16,r[2]&=65535,r[1]+=t[1]+e[1],r[0]+=r[1]>>>16,r[1]&=65535,r[0]+=t[0]+e[0],r[0]&=65535,[r[0]<<16|r[1],r[2]<<16|r[3]]}function c(t,e){t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]],e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]];var r=[0,0,0,0];return r[3]+=t[3]*e[3],r[2]+=r[3]>>>16,r[3]&=65535,r[2]+=t[2]*e[3],r[1]+=r[2]>>>16,r[2]&=65535,r[2]+=t[3]*e[2],r[1]+=r[2]>>>16,r[2]&=65535,r[1]+=t[1]*e[3],r[0]+=r[1]>>>16,r[1]&=65535,r[1]+=t[2]*e[2],r[0]+=r[1]>>>16,r[1]&=65535,r[1]+=t[3]*e[1],r[0]+=r[1]>>>16,r[1]&=65535,r[0]+=t[0]*e[3]+t[1]*e[2]+t[2]*e[1]+t[3]*e[0],r[0]&=65535,[r[0]<<16|r[1],r[2]<<16|r[3]]}function f(t,e){return 32==(e%=64)?[t[1],t[0]]:e<32?[t[0]<<e|t[1]>>>32-e,t[1]<<e|t[0]>>>32-e]:(e-=32,[t[1]<<e|t[0]>>>32-e,t[0]<<e|t[1]>>>32-e])}function h(t,e){return 0==(e%=64)?t:e<32?[t[0]<<e|t[1]>>>32-e,t[1]<<e]:[t[1]<<e-32,0]}function d(t,e){return[t[0]^e[0],t[1]^e[1]]}function p(t){return t=c(t=d(t,[0,t[0]>>>1]),[4283543511,3981806797]),t=c(t=d(t,[0,t[0]>>>1]),[3301882366,444984403]),t=d(t,[0,t[0]>>>1])}i.x86.hash32=function(t,e){if(!i.inputValidation||o(t)){e=e||0;for(var r=t.length%4,n=t.length-r,l=e,c=0,f=3432918353,h=461845907,d=0;d<n;d+=4)c=a(c=s(c=t[d]|t[d+1]<<8|t[d+2]<<16|t[d+3]<<24,f),15),l^=c=s(c,h),l=s(l=a(l,13),5)+3864292196;switch(c=0,r){case 3:c^=t[d+2]<<16;case 2:c^=t[d+1]<<8;case 1:c^=t[d],c=a(c=s(c,f),15),l^=c=s(c,h)}return l^=t.length,(l=u(l))>>>0}},i.x86.hash128=function(t,e){if(!i.inputValidation||o(t)){e=e||0;for(var r=t.length%16,n=t.length-r,l=e,c=e,f=e,h=e,d=0,p=0,y=0,g=0,b=597399067,m=2869860233,w=951274213,D=2716044179,E=0;E<n;E+=16)d=t[E]|t[E+1]<<8|t[E+2]<<16|t[E+3]<<24,p=t[E+4]|t[E+5]<<8|t[E+6]<<16|t[
1E+7]<<24,y=t[E+8]|t[E+9]<<8|t[E+10]<<16|t[E+11]<<24,g=t[E+12]|t[E+13]<<8|t[E+14]<<16|t[E+15]<<24,d=a(d=s(d,b),15),l^=d=s(d,m),l=a(l,19),l+=c,l=s(l,5)+1444728091,p=a(p=s(p,m),16),c^=p=s(p,w),c=a(c,17),c+=f,c=s(c,5)+197830471,y=a(y=s(y,w),17),f^=y=s(y,D),f=a(f,15),f+=h,f=s(f,5)+2530024501,g=a(g=s(g,D),18),h^=g=s(g,b),h=a(h,13),h+=l,h=s(h,5)+850148119;switch(d=0,p=0,y=0,g=0,r){case 15:g^=t[E+14]<<16;case 14:g^=t[E+13]<<8;case 13:g^=t[E+12],g=a(g=s(g,D),18),h^=g=s(g,b);case 12:y^=t[E+11]<<24;case 11:y^=t[E+10]<<16;case 10:y^=t[E+9]<<8;case 9:y^=t[E+8],y=a(y=s(y,w),17),f^=y=s(y,D);case 8:p^=t[E+7]<<24;case 7:p^=t[E+6]<<16;case 6:p^=t[E+5]<<8;case 5:p^=t[E+4],p=a(p=s(p,m),16),c^=p=s(p,w);case 4:d^=t[E+3]<<24;case 3:d^=t[E+2]<<16;case 2:d^=t[E+1]<<8;case 1:d^=t[E],d=a(d=s(d,b),15),l^=d=s(d,m)}return l^=t.length,c^=t.length,f^=t.length,h^=t.length,l+=c,l+=f,l+=h,c+=l,f+=l,h+=l,l=u(l),c=u(c),f=u(f),h=u(h),l+=c,l+=f,l+=h,c+=l,f+=l,h+=l,("00000000"+(l>>>0).toString(16)).slice(-8)+("00000000"+(c>>>0).toString(16)).slice(-8)+("00000000"+(f>>>0).toString(16)).slice(-8)+("00000000"+(h>>>0).toString(16)).slice(-8)}},i.x64.hash128=function(t,e){if(!i.inputValidation||o(t)){e=e||0;for(var r=t.length%16,n=t.length-r,s=[0,e],a=[0,e],u=[0,0],y=[0,0],g=[2277735313,289559509],b=[1291169091,658871167],m=0;m<n;m+=16)u=[t[m+4]|t[m+5]<<8|t[m+6]<<16|t[m+7]<<24,t[m]|t[m+1]<<8|t[m+2]<<16|t[m+3]<<24],y=[t[m+12]|t[m+13]<<8|t[m+14]<<16|t[m+15]<<24,t[m+8]|t[m+9]<<8|t[m+10]<<16|t[m+11]<<24],u=f(u=c(u,g),31),s=l(s=f(s=d(s,u=c(u,b)),27),a),s=l(c(s,[0,5]),[0,1390208809]),y=f(y=c(y,b),33),a=l(a=f(a=d(a,y=c(y,g)),31),s),a=l(c(a,[0,5]),[0,944331445]);switch(u=[0,0],y=[0,0],r){case 15:y=d(y,h([0,t[m+14]],48));case 14:y=d(y,h([0,t[m+13]],40));case 13:y=d(y,h([0,t[m+12]],32));case 12:y=d(y,h([0,t[m+11]],24));case 11:y=d(y,h([0,t[m+10]],16));case 10:y=d(y,h([0,t[m+9]],8));case 9:y=f(y=c(y=d(y,[0,t[m+8]]),b),33),a=d(a,y=c(y,g));case 8:u=d(u,h([0,t[m+7]],56));case 7:u=d(u,h([0,t[m+6]],48));
1case 6:u=d(u,h([0,t[m+5]],40));case 5:u=d(u,h([0,t[m+4]],32));case 4:u=d(u,h([0,t[m+3]],24));case 3:u=d(u,h([0,t[m+2]],16));case 2:u=d(u,h([0,t[m+1]],8));case 1:u=f(u=c(u=d(u,[0,t[m]]),g),31),s=d(s,u=c(u,b))}return s=d(s,[0,t.length]),a=d(a,[0,t.length]),s=l(s,a),a=l(a,s),s=p(s),a=p(a),s=l(s,a),a=l(a,s),("00000000"+(s[0]>>>0).toString(16)).slice(-8)+("00000000"+(s[1]>>>0).toString(16)).slice(-8)+("00000000"+(a[0]>>>0).toString(16)).slice(-8)+("00000000"+(a[1]>>>0).toString(16)).slice(-8)}},t.exports&&(e=t.exports=i),e.murmurHash3=i}(0)},42693:function(t,e,r){"use strict";let n=r(99353),i=["Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed"];class o extends Error{constructor(t){super(),t instanceof Error?(this.originalError=t,{message:t}=t):(this.originalError=Error(t),this.originalError.stack=this.stack),this.name="AbortError",this.message=t}}let s=(t,e,r)=>{let n=r.retries-(e-1);return t.attemptNumber=e,t.retriesLeft=n,t},a=t=>i.includes(t),u=(t,e)=>new Promise((r,i)=>{e={onFailedAttempt(){},retries:10,...e};let u=n.operation(e);u.attempt(async n=>{try{r(await t(n))}catch(c){if(!(c instanceof Error)){i(TypeError(`Non-error was thrown: "${c}". You should only throw errors.`));return}if(c instanceof o)u.stop(),i(c.originalError);else if(c instanceof TypeError&&!a(c.message))u.stop(),i(c);else{s(c,n,e);try{await e.onFailedAttempt(c)}catch(l){i(l);return}u.retry(c)||i(u.mainError())}}})});t.exports=u,t.exports.default=u,t.exports.AbortError=o},62100:function(t,e,r){"use strict";t.exports=r(89482)},89482:function(t,e,r){"use strict";var n=e;function i(){n.util._configure(),n.Writer._configure(n.BufferWriter),n.Reader._configure(n.BufferReader)}n.build="minimal",n.Writer=r(41173),n.BufferWriter=r(43155),n.Reader=r(51408),n.BufferReader=r(50593),n.util=r(99693),n.rpc=r(35994),n.roots=r(85054),n.configure=i,i()},51408:function(t,e,r){"use strict";t.exports=l;var n,i,o=r(99693),s=o.LongBits,a=o.utf8;function u(t,e){return RangeError("index out of range: "+t.pos+" + "+(e||1)+" > "+t.len)}function l(t){this.buf=t,this.pos=0,this.len=t.length}var c="undefined"!=typeof Uint8Array?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new l(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new l(t);throw Error("illegal buffer")},f=function(){return o.Buffer?function(t){return(l.create=function(t){return o.Buffer.isBuffer(t)?new i(t):c(t)})(t)}:c};function h(){var t=new s(0,0),e=0;if(this.len-this.pos>4){for(;e<4;++e)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*e)>>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t;e=0}else{for(;e<3;++e){if(this.pos>=this.len)throw u(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*e)>>>0,this.buf[this.pos++]<128)return t}return t.lo=(t.lo|(127&this.buf[this.pos++])<<7*e)>>>0,t}if(this.len-this.pos>4){for(;e<5;++e)if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*e+3)>>>0,this.buf[this.pos++]<128)return t}else for(;e<5;++e){if(this.pos>=this.len)throw u(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*e+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function d(t,e){return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0}function p(){if(this.pos+8>this.len)throw u(this,8);return new s(d(this.buf,this.pos+=4),d(this.buf,this.pos+=4))}l.create=f(),l.prototype._slice=o.Array.prototype.subarray||o.Array.prototype.slice,l.prototype.uint32=(n=4294967295,function(){if(n=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128||(n=(n|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)||(n=(n|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)||(n=(n|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)||(n=(n|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128))return n;if((this.pos+=5)>this.len)throw this.pos=this.len,u(this,10);return n}),l.prototype.int32=function(){return 0|this.uint32()},l.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)|0},l.prototype.bool=function(){return 0!==this.uint32()},l.prototype.fixed32=function(){if(this.pos+4>this.len)throw u(this,4);return d(this.buf,this.pos+=4)},l.prototype.sfixed32=function(){if(this.pos+4>this.len)throw u(this,4);return 0|d(this.buf,this.pos+=4)},l.prototype.float=function(){if(this.pos+4>this.len)throw u(this,4);var t=o.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t},l.prototype.double=function(){if(this.pos+8>this.len)throw u(this,4);var t=o.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t},l.prototype.bytes=function(){var t=this.uint32(),e=this.pos,r=this.pos+t;if(r>this.len)throw u(this,t);return(this.pos+=t,Array.isArray(this.buf))?this.buf.slice(e,r):e===r?new this.buf.constructor(0):this._slice.call(this.buf,e,r)},l.prototype.string=function(){var t=this.bytes();return a.read(t,0,t.length)},l.prototype.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw u(this,t);this.pos+=t}else do if(this.pos>=this.len)throw u(this);while(128&this.buf[this.pos++]);return this},l.prototype.skipType=function(t){switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(t=7&this.uint32());)this.skipType(t);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},l._configure=function(t){i=t,l.create=f(),i._configure();var e=o.Long?"toLong":"toNumber";o.merge(l.prototype,{int64:function(){return h.call(this)[e](!1)},uint64:function(){return h.call(this)[e](!0)},sint64:function(){return h.call(this).zzDecode()[e](!1)},fixed64:function(){return p.call(this)[e](!0)},sfixed64:function(){return p.call(this)[e](!1)}})}},50593:function(t,e,r){"use strict";
vendor: 6,444 bytes, line 1
1t.exports=o;var n=r(51408);(o.prototype=Object.create(n.prototype)).constructor=o;var i=r(99693);function o(t){n.call(this,t)}o._configure=function(){i.Buffer&&(o.prototype._slice=i.Buffer.prototype.slice)},o.prototype.string=function(){var t=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+t,this.len))},o._configure()},85054:function(t){"use strict";t.exports={}},35994:function(t,e,r){"use strict";e.Service=r(77948)},77948:function(t,e,r){"use strict";t.exports=i;var n=r(99693);function i(t,e,r){if("function"!=typeof t)throw TypeError("rpcImpl must be a function");n.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=Boolean(e),this.responseDelimited=Boolean(r)}(i.prototype=Object.create(n.EventEmitter.prototype)).constructor=i,i.prototype.rpcCall=function t(e,r,i,o,s){if(!o)throw TypeError("request must be specified");var a=this;if(!s)return n.asPromise(t,a,e,r,i,o);if(!a.rpcImpl){setTimeout(function(){s(Error("already ended"))},0);return}try{return a.rpcImpl(e,r[a.requestDelimited?"encodeDelimited":"encode"](o).finish(),function(t,r){if(t)return a.emit("error",t,e),s(t);if(null===r){a.end(!0);return}if(!(r instanceof i))try{r=i[a.responseDelimited?"decodeDelimited":"decode"](r)}catch(n){return a.emit("error",n,e),s(n)}return a.emit("data",r,e),s(null,r)})}catch(u){a.emit("error",u,e),setTimeout(function(){s(u)},0);return}},i.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},1945:function(t,e,r){"use strict";t.exports=i;var n=r(99693);function i(t,e){this.lo=t>>>0,this.hi=e>>>0}var o=i.zero=new i(0,0);o.toNumber=function(){return 0},o.zzEncode=o.zzDecode=function(){return this},o.length=function(){return 1};var s=i.zeroHash="\0\0\0\0\0\0\0\0";i.fromNumber=function(t){if(0===t)return o;var e=t<0;e&&(t=-t);var r=t>>>0,n=(t-r)/4294967296>>>0;return e&&(n=~n>>>0,r=~r>>>0,++r>4294967295&&(r=0,++n>4294967295&&(n=0))),new i(r,n)},i.from=function(t){if("number"==typeof t)return i.fromNumber(t);if(n.isString(t)){if(!n.Long)return i.fromNumber(parseInt(t,10));t=n.Long.fromString(t)}return t.low||t.high?new i(t.low>>>0,t.high>>>0):o},i.prototype.toNumber=function(t){if(!t&&this.hi>>>31){var e=~this.lo+1>>>0,r=~this.hi>>>0;return e||(r=r+1>>>0),-(e+4294967296*r)}return this.lo+4294967296*this.hi},i.prototype.toLong=function(t){return n.Long?new n.Long(0|this.lo,0|this.hi,Boolean(t)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(t)}};var a=String.prototype.charCodeAt;i.fromHash=function(t){return t===s?o:new i((a.call(t,0)|a.call(t,1)<<8|a.call(t,2)<<16|a.call(t,3)<<24)>>>0,(a.call(t,4)|a.call(t,5)<<8|a.call(t,6)<<16|a.call(t,7)<<24)>>>0)},i.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},i.prototype.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this},i.prototype.zzDecode=function(){var t=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this},i.prototype.length=function(){var t=this.lo,e=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0===r?0===e?t<16384?t<128?1:2:t<2097152?3:4:e<16384?e<128?5:6:e<2097152?7:8:r<128?9:10}},99693:function(t,e,r){"use strict";var n=e;function i(t,e,r){for(var n=Object.keys(e),i=0;i<n.length;++i)void 0!==t[n[i]]&&r||(t[n[i]]=e[n[i]]);return t}function o(t){function e(t,r){if(!(this instanceof e))return new e(t,r);Object.defineProperty(this,"message",{get:function(){return t}}),Error.captureStackTrace?Error.captureStackTrace(this,e):Object.defineProperty(this,"stack",{value:Error().stack||""}),r&&i(this,r)}return(e.prototype=Object.create(Error.prototype)).constructor=e,Object.defineProperty(e.prototype,"name",{get:function(){return t}}),e.prototype.toString=function(){return this.name+": "+this.message},e}n.asPromise=r(34537),n.base64=r(97419),n.EventEmitter=r(19211),n.float=r(10945),n.inquire=r(67199),n.utf8=r(94997),n.pool=r(76662),n.LongBits=r(1945),n.isNode=Boolean(void 0!==r.g&&r.g&&r.g.process&&r.g.process.versions&&r.g.process.versions.node),n.global=n.isNode&&r.g||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||this,n.emptyArray=Object.freeze?Object.freeze([]):[],n.emptyObject=Object.freeze?Object.freeze({}):{},n.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},n.isString=function(t){return"string"==typeof t||t instanceof String},n.isObject=function(t){return t&&"object"==typeof t},n.isset=n.isSet=function(t,e){var r=t[e];return!!(null!=r&&t.hasOwnProperty(e))&&("object"!=typeof r||(Array.isArray(r)?r.length:Object.keys(r).length)>0)},n.Buffer=function(){try{var t=n.inquire("buffer").Buffer;return t.prototype.utf8Write?t:null}catch(e){return null}}(),n._Buffer_from=null,n._Buffer_allocUnsafe=null,n.newBuffer=function(t){return"number"==typeof t?n.Buffer?n._Buffer_allocUnsafe(t):new n.Array(t):n.Buffer?n._Buffer_from(t):"undefined"==typeof Uint8Array?t:new Uint8Array(t)},n.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,n.Long=n.global.dcodeIO&&n.global.dcodeIO.Long||n.global.Long||n.inquire("long"),n.key2Re=/^true|false|0|1$/,n.key32Re=/^-?(?:0|[1-9][0-9]*)$/,n.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,n.longToHash=function(t){return t?n.LongBits.from(t).toHash():n.LongBits.zeroHash},n.longFromHash=function(t,e){var r=n.LongBits.fromHash(t);return n.Long?n.Long.fromBits(r.lo,r.hi,e):r.toNumber(Boolean(e))},n.merge=i,n.lcFirst=function(t){return t.charAt(0).toLowerCase()+t.substring(1)},n.newError=o,n.ProtocolError=o("ProtocolError"),n.oneOfGetter=function(t){for(var e={},r=0;r<t.length;++r)e[t[r]]=1;return function(){for(var t=Object.keys(this),r=t.length-1;r>-1;--r)if(1===e[t[r]]&&void 0!==this[t[r]]&&null!==this[t[r]])return t[r]}},n.oneOfSetter=function(t){return function(e){for(var r=0;r<t.length;++r)t[r]!==e&&delete this[t[r]]}},n.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},n._configure=function(){var t=n.Buffer;if(!t){n._Buffer_from=n._Buffer_allocUnsafe=null;return}n._Buffer_from=t.from!==Uint8Array.from&&t.from||function(e,r){return new t(e,r)},n._Buffer_allocUnsafe=t.allocUnsafe||function(e){return new t(e)}}},41173:function(t,e,r){"use strict";
vendor: 4,933 bytes, line 1
1t.exports=f;var n,i=r(99693),o=i.LongBits,s=i.base64,a=i.utf8;function u(t,e,r){this.fn=t,this.len=e,this.next=void 0,this.val=r}function l(){}function c(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}function f(){this.len=0,this.head=new u(l,0,0),this.tail=this.head,this.states=null}var h=function(){return i.Buffer?function(){return(f.create=function(){return new n})()}:function(){return new f}};function d(t,e,r){e[r]=255&t}function p(t,e,r){for(;t>127;)e[r++]=127&t|128,t>>>=7;e[r]=t}function y(t,e){this.len=t,this.next=void 0,this.val=e}function g(t,e,r){for(;t.hi;)e[r++]=127&t.lo|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;t.lo>127;)e[r++]=127&t.lo|128,t.lo=t.lo>>>7;e[r++]=t.lo}function b(t,e,r){e[r]=255&t,e[r+1]=t>>>8&255,e[r+2]=t>>>16&255,e[r+3]=t>>>24}f.create=h(),f.alloc=function(t){return new i.Array(t)},i.Array!==Array&&(f.alloc=i.pool(f.alloc,i.Array.prototype.subarray)),f.prototype._push=function(t,e,r){return this.tail=this.tail.next=new u(t,e,r),this.len+=e,this},y.prototype=Object.create(u.prototype),y.prototype.fn=p,f.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new y((t>>>=0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this},f.prototype.int32=function(t){return t<0?this._push(g,10,o.fromNumber(t)):this.uint32(t)},f.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},f.prototype.uint64=function(t){var e=o.from(t);return this._push(g,e.length(),e)},f.prototype.int64=f.prototype.uint64,f.prototype.sint64=function(t){var e=o.from(t).zzEncode();return this._push(g,e.length(),e)},f.prototype.bool=function(t){return this._push(d,1,t?1:0)},f.prototype.fixed32=function(t){return this._push(b,4,t>>>0)},f.prototype.sfixed32=f.prototype.fixed32,f.prototype.fixed64=function(t){var e=o.from(t);return this._push(b,4,e.lo)._push(b,4,e.hi)},f.prototype.sfixed64=f.prototype.fixed64,f.prototype.float=function(t){return this._push(i.float.writeFloatLE,4,t)},f.prototype.double=function(t){return this._push(i.float.writeDoubleLE,8,t)};var m=i.Array.prototype.set?function(t,e,r){e.set(t,r)}:function(t,e,r){for(var n=0;n<t.length;++n)e[r+n]=t[n]};f.prototype.bytes=function(t){var e=t.length>>>0;if(!e)return this._push(d,1,0);if(i.isString(t)){var r=f.alloc(e=s.length(t));s.decode(t,r,0),t=r}return this.uint32(e)._push(m,e,t)},f.prototype.string=function(t){var e=a.length(t);return e?this.uint32(e)._push(a.write,e,t):this._push(d,1,0)},f.prototype.fork=function(){return this.states=new c(this),this.head=this.tail=new u(l,0,0),this.len=0,this},f.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new u(l,0,0),this.len=0),this},f.prototype.ldelim=function(){var t=this.head,e=this.tail,r=this.len;return this.reset().uint32(r),r&&(this.tail.next=t.next,this.tail=e,this.len+=r),this},f.prototype.finish=function(){for(var t=this.head.next,e=this.constructor.alloc(this.len),r=0;t;)t.fn(t.val,e,r),r+=t.len,t=t.next;return e},f._configure=function(t){n=t,f.create=h(),n._configure()}},43155:function(t,e,r){"use strict";t.exports=o;var n=r(41173);(o.prototype=Object.create(n.prototype)).constructor=o;var i=r(99693);function o(){n.call(this)}function s(t,e,r){t.length<40?i.utf8.write(t,e,r):e.utf8Write?e.utf8Write(t,r):e.write(t,r)}o._configure=function(){o.alloc=i._Buffer_allocUnsafe,o.writeBytesBuffer=i.Buffer&&i.Buffer.prototype instanceof Uint8Array&&"set"===i.Buffer.prototype.set.name?function(t,e,r){e.set(t,r)}:function(t,e,r){if(t.copy)t.copy(e,r,0,t.length);else for(var n=0;n<t.length;)e[r++]=t[n++]}},o.prototype.bytes=function(t){i.isString(t)&&(t=i._Buffer_from(t,"base64"));var e=t.length>>>0;return this.uint32(e),e&&this._push(o.writeBytesBuffer,e,t),this},o.prototype.string=function(t){var e=i.Buffer.byteLength(t);return this.uint32(e),e&&this._push(s,e,t),this},o._configure()},33286:function(t,e,r){let{instantiate:n}=r(19824);function i(t={}){if(!i.supported)return null;var e=new Uint8Array([0,97,115,109,1,0,0,0,1,78,14,96,2,127,126,0,96,1,127,1,126,96,2,127,127,0,96,1,127,1,127,96,1,127,0,96,2,127,127,1,127,96,3,127,127,127,1,127,96,0,0,96,3,127,127,127,0,96,0,1,127,96,4,127,127,127,127,0,96,5,127,127,127,127,127,1,127,96,1,126,1,127,96,2,126,126,1,126,2,13,1,3,101,110,118,5,97,98,111,114,116,0,10,3,54,53,2,2,8,9,3,5,2,8,6,5,3,4,2,6,9,12,13,2,5,11,3,2,3,2,3,2,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,6,7,7,4,4,5,3,1,0,1,6,47,9,127,1,65,0,11,127,1,65,0,11,127,0,65,3,11,127,0,65,4,11,127,1,65,0,11,127,1,65,0,11,127,1,65,0,11,127,0,65,240,2,11,127,0,65,6,11,7,240,5,41,6,109,101,109,111,114,121,2,0,7,95,95,97,108,108,111,99,0,10,8,95,95,114,101,116,97,105,110,0,11,9,95,95,114,101,108,101,97,115,101,0,12,9,95,95,99,111,108,108,101,99,116,0,51,11,95,95,114,116,116,105,95,98,97,115,101,3,7,13,73,110,116,51,50,65,114,114,97,121,95,73,68,3,2,13,85,105,110,
1116,56,65,114,114,97,121,95,73,68,3,3,6,100,101,103,114,101,101,0,16,3,109,111,100,0,17,5,82,97,98,105,110,3,8,16,82,97,98,105,110,35,103,101,116,58,119,105,110,100,111,119,0,21,16,82,97,98,105,110,35,115,101,116,58,119,105,110,100,111,119,0,22,21,82,97,98,105,110,35,103,101,116,58,119,105,110,100,111,119,95,115,105,122,101,0,23,21,82,97,98,105,110,35,115,101,116,58,119,105,110,100,111,119,95,115,105,122,101,0,24,14,82,97,98,105,110,35,103,101,116,58,119,112,111,115,0,25,14,82,97,98,105,110,35,115,101,116,58,119,112,111,115,0,26,15,82,97,98,105,110,35,103,101,116,58,99,111,117,110,116,0,27,15,82,97,98,105,110,35,115,101,116,58,99,111,117,110,116,0,28,13,82,97,98,105,110,35,103,101,116,58,112,111,115,0,29,13,82,97,98,105,110,35,115,101,116,58,112,111,115,0,30,15,82,97,98,105,110,35,103,101,116,58,115,116,97,114,116,0,31,15,82,97,98,105,110,35,115,101,116,58,115,116,97,114,116,0,32,16,82,97,98,105,110,35,103,101,116,58,100,105,103,101,115,116,0,33,16,82,97,98,105,110,35,115,101,116,58,100,105,103,101,115,116,0,34,21,82,97,98,105,110,35,103,101,116,58,99,104,117,110,107,95,115,116,97,114,116,0,35,21,82,97,98,105,110,35,115,101,116,58,99,104,117,110,107,95,115,116,97,114,116,0,36,22,82,97,98,105,110,35,103,101,116,58,99,104,117,110,107,95,108,101,110,103,116,104,0,37,22,82,97,98,105,110,35,115,101,116,58,99,104,117,110,107,95,108,101,110,103,116,104,0,38,31,82,97,98,105,110,35,103,101,116,58,99,104,117,110,107,95,99,117,116,95,102,105,110,103,101,114,112,114,105,110,116,0,39,31,82,97,98,105,110,35,115,101,116,58,99,104,117,110,107,95,99,117,116,95,102,105,110,103,101,114,112,114,105,110,116,0,40,20,82,97,98,105,110,35,103,101,116,58,112,111,108,121,110,111,109,105,97,108,0,41,20,82,97,98,105,110,35,115,101,116,58,112,111,108,121,110,111,109,105,97,108,0,42,17,82,97,98,105,110,35,103,101,116,58,109,105,110,115,105,122,101,0,43,17,82,97,98,105,110,35,115,101,116,58,109,105,110,115,105,122,101,0,44,17,82,97,98,105,110,35,103,101,116,58,109,97,120,115,105,122,101,0,45,17,82,97,98,105,110,35,115,101,116,58,109,97,120,115,105,122,101,0,46,14,82,97,98,105,110,35,103,101,116,58,109,97,115,107,0,47,14,82,97,98,105,110,35,115,101,116,58,109,97,115,107,0,48,17,82,97,98,105,110,35,99,111,110,115,116,114,117,99,116,111,114,0,20,17,82,97,98,105,110,35,102,105,110,103,101,114,112,114,105,110,116,0,49,8,1,50,10,165,31,53,199,1,1,4,127,32,1,40,2,0,65,124,113,34,2,65,128,2,73,4,127,32,2,65,4,118,33,4,65,0,5,32,2,65,31,32,2,103,107,34,3,65,4,107,118,65,16,115,33,4,32,3,65,7,107,11,33,3,32,1,40,2,20,33,2,32,1,40,2,16,34,5,4,64,32,5,32,2,54,2,20,11,32,2,4,64,32,2,32,5,54,2,16,11,32,1,32,0,32,4,32,3,65,4,116,106,65,2,116,106,40,2,96,70,4,64,32,0,32,4,32,3,65,4,116,106,65,2,116,106,32,2,54,2,96,32,2,69,4,64,32,0,32,3,65,2,116,106,32,0,32,3,65,2,116,106,40,2,4,65,1,32,4,116,65,127,115,113,34,1,54,2,4,32,1,69,4,64,32,0,32,0,40,2,0,65,1,32,3,116,65,127,115,113,54,2,0,11,11,11,11,226,2,1,6,127,32,1,40,2,0,33,3,32,1,65,16,106,32,1,40,2,0,65,124,113,106,34,4,40,2,0,34,5,65,1,113,4,64,32,3,65,124,113,65,16,106,32,5,65,124,113,106,34,2,65,240,255,255,255,3,73,4,64,32,0,32,4,16,1,32,1,32,2,32,3,65,3,113,114,34,3,54,2,0,32,1,65,16,106,32,1,40,2,0,65,124,113,106,34,4,40,2,0,33,5,11,11,32,3,65,2,113,4,64,32,1,65,4,107,40,2,0,34,2,40,2,0,34,6,65,124,113,65,16,106,32,3,65,124,113,106,34,7,65,240,255,255,255,3,73,4,64,32,0,32,2,16,1,32,2,32,7,32,6,65,3,113,114,34,3,54,2,0,32,2,33,1,11,11,32,4,32,5,65,2,114,54,2,0,32,4,65,4,107,32,1,54,2,0,32,0,32,3,65,124,113,34,2,65,128,2,73,4,127,32,2,65,4,118,33,4,65,0,5,32,2,65,31,32,2,103,107,34,2,65,4,107,118,65,16,115,33,4,32,2,65,7,107,11,34,3,65,4,116,32,4,106,65,2,116,106,40,2,96,33,2,32,1,65,0,54,2,16,32,1,32,2,54,2,20,32,2,4,64,32,2,32,1,54,2,16,11,32,0,32,4,32,3,65,4,116,106,65,2,116,106,32,1,54,2,96,32,0,32,0,40,2,0,65,1,32,3,116,114,54,2,0,32,0,32,3,65,2,116,106,32,0,32,3,65,2,116,106,40,2,4,65,1,32,4,116,114,54,2,4,11,119,1,1,127,32,2,2,127,32,0,40,2,160,12,34,2,4,64,32,2,32,1,65,16,107,70,4,64,32,2,40,2,0,33,3,32,1,65,16,107,33,1,11,11,32,1,11,107,34,2,65,48,73,4,64,15,11,32,1,32,3,65,2,113,32,2,65,32,107,65,1,114,114,54,2,0,32,1,65,0,54,2,16,32,1,65,0,54,2,20,32,1,32,2,106,65,16,107,34,2,65,2,54,2,0,32,0,32,2,54,2,160,12,32,0,32,1,16,2,11,155,1,1,3,127,35,0,34,0,69,4,64,65,1,63,0,34,0,74,4,127,65,1,32,0,107,64,0,65,0,72,5,65,0,11,4,64,0,11,65,176,3,34,0,65,0,54,2,0,65,208,15,65,0,54,2,0,3,64,32,1,65,23,73,4,64,32,1,65,2,116,65,176,3,106,65,0,54,2,4,65,0,33,2,3,64,32,2,65,16,73,4,64,32,1,65,4,116,32,2,106,65,2,116,65,176,3,106,65,0,54,2,96,32,2,65,1,106,33,2,12,1,11,11,32,1,65,1,106,33,1,12,1,11,11,65,176,3,65,224,15,63,0,65,16,116,16,3,65,176,3,36,0,11,32,0,11,45,0,32,0,65,240,255,255,255,3,79,4,64,65,32,65,224,0,65,201,3,65,29,16,0,0,11,32,0,65,15,106,65,112,113,34,0,65,16,32,0,65,16,75,27,11,169,1,1,1,127,32,0,32,1,65,128,2,73,4,127,32,1,65,4,118,33,1,65,0,5,32,1,65,248,255,255,255,1,73,4,64,32,1,65,1,65,27,32,1,103,107,116,106,65,1,107,33,1,11,32,1,65,31,32,1,103,107,34,2,65,4,107,118,65,16,115,33,1,32,2,65,7,107,11,34,2,65,2,116,106,40,2,4,65,127,32,1,116,113,34,1,4,127,32,0,32,1,104,32,2,65,4,116,
1106,65,2,116,106,40,2,96,5,32,0,40,2,0,65,127,32,2,65,1,106,116,113,34,1,4,127,32,0,32,0,32,1,104,34,0,65,2,116,106,40,2,4,104,32,0,65,4,116,106,65,2,116,106,40,2,96,5,65,0,11,11,11,111,1,1,127,63,0,34,2,32,1,65,248,255,255,255,1,73,4,127,32,1,65,1,65,27,32,1,103,107,116,65,1,107,106,5,32,1,11,65,16,32,0,40,2,160,12,32,2,65,16,116,65,16,107,71,116,106,65,255,255,3,106,65,128,128,124,113,65,16,118,34,1,32,2,32,1,74,27,64,0,65,0,72,4,64,32,1,64,0,65,0,72,4,64,0,11,11,32,0,32,2,65,16,116,63,0,65,16,116,16,3,11,113,1,2,127,32,1,40,2,0,34,3,65,124,113,32,2,107,34,4,65,32,79,4,64,32,1,32,2,32,3,65,2,113,114,54,2,0,32,2,32,1,65,16,106,106,34,1,32,4,65,16,107,65,1,114,54,2,0,32,0,32,1,16,2,5,32,1,32,3,65,126,113,54,2,0,32,1,65,16,106,32,1,40,2,0,65,124,113,106,32,1,65,16,106,32,1,40,2,0,65,124,113,106,40,2,0,65,125,113,54,2,0,11,11,91,1,2,127,32,0,32,1,16,5,34,4,16,6,34,3,69,4,64,65,1,36,1,65,0,36,1,32,0,32,4,16,6,34,3,69,4,64,32,0,32,4,16,7,32,0,32,4,16,6,33,3,11,11,32,3,65,0,54,2,4,32,3,32,2,54,2,8,32,3,32,1,54,2,12,32,0,32,3,16,1,32,0,32,3,32,4,16,8,32,3,11,13,0,16,4,32,0,32,1,16,9,65,16,106,11,33,1,1,127,32,0,65,172,3,75,4,64,32,0,65,16,107,34,1,32,1,40,2,4,65,1,106,54,2,4,11,32,0,11,18,0,32,0,65,172,3,75,4,64,32,0,65,16,107,16,52,11,11,140,3,1,1,127,2,64,32,1,69,13,0,32,0,65,0,58,0,0,32,0,32,1,106,65,1,107,65,0,58,0,0,32,1,65,2,77,13,0,32,0,65,1,106,65,0,58,0,0,32,0,65,2,106,65,0,58,0,0,32,0,32,1,106,34,2,65,2,107,65,0,58,0,0,32,2,65,3,107,65,0,58,0,0,32,1,65,6,77,13,0,32,0,65,3,106,65,0,58,0,0,32,0,32,1,106,65,4,107,65,0,58,0,0,32,1,65,8,77,13,0,32,1,65,0,32,0,107,65,3,113,34,1,107,33,2,32,0,32,1,106,34,0,65,0,54,2,0,32,0,32,2,65,124,113,34,1,106,65,4,107,65,0,54,2,0,32,1,65,8,77,13,0,32,0,65,4,106,65,0,54,2,0,32,0,65,8,106,65,0,54,2,0,32,0,32,1,106,34,2,65,12,107,65,0,54,2,0,32,2,65,8,107,65,0,54,2,0,32,1,65,24,77,13,0,32,0,65,12,106,65,0,54,2,0,32,0,65,16,106,65,0,54,2,0,32,0,65,20,106,65,0,54,2,0,32,0,65,24,106,65,0,54,2,0,32,0,32,1,106,34,2,65,28,107,65,0,54,2,0,32,2,65,24,107,65,0,54,2,0,32,2,65,20,107,65,0,54,2,0,32,2,65,16,107,65,0,54,2,0,32,0,32,0,65,4,113,65,24,106,34,2,106,33,0,32,1,32,2,107,33,1,3,64,32,1,65,32,79,4,64,32,0,66,0,55,3,0,32,0,65,8,106,66,0,55,3,0,32,0,65,16,106,66,0,55,3,0,32,0,65,24,106,66,0,55,3,0,32,1,65,32,107,33,1,32,0,65,32,106,33,0,12,1,11,11,11,11,178,1,1,3,127,32,1,65,240,255,255,255,3,32,2,118,75,4,64,65,144,1,65,192,1,65,23,65,56,16,0,0,11,32,1,32,2,116,34,3,65,0,16,10,34,2,32,3,16,13,32,0,69,4,64,65,12,65,2,16,10,34,0,65,172,3,75,4,64,32,0,65,16,107,34,1,32,1,40,2,4,65,1,106,54,2,4,11,11,32,0,65,0,54,2,0,32,0,65,0,54,2,4,32,0,65,0,54,2,8,32,2,34,1,32,0,40,2,0,34,4,71,4,64,32,1,65,172,3,75,4,64,32,1,65,16,107,34,5,32,5,40,2,4,65,1,106,54,2,4,11,32,4,16,12,11,32,0,32,1,54,2,0,32,0,32,2,54,2,4,32,0,32,3,54,2,8,32,0,11,46,1,2,127,65,12,65,5,16,10,34,0,65,172,3,75,4,64,32,0,65,16,107,34,1,32,1,40,2,4,65,1,106,54,2,4,11,32,0,65,128,2,65,3,16,14,11,9,0,65,63,32,0,121,167,107,11,49,1,2,127,65,63,32,1,121,167,107,33,2,3,64,65,63,32,0,121,167,107,32,2,107,34,3,65,0,78,4,64,32,0,32,1,32,3,172,134,133,33,0,12,1,11,11,32,0,11,40,0,32,1,32,0,40,2,8,79,4,64,65,128,2,65,192,2,65,163,1,65,44,16,0,0,11,32,1,32,0,40,2,4,106,65,0,58,0,0,11,38,0,32,1,32,0,40,2,8,79,4,64,65,128,2,65,192,2,65,152,1,65,44,16,0,0,11,32,1,32,0,40,2,4,106,45,0,0,11,254,5,2,1,127,4,126,32,0,69,4,64,65,232,0,65,6,16,10,34,0,65,172,3,75,4,64,32,0,65,16,107,34,5,32,5,40,2,4,65,1,106,54,2,4,11,11,32,0,65,0,54,2,0,32,0,65,0,54,2,4,32,0,65,0,54,2,8,32,0,66,0,55,3,16,32,0,66,0,55,3,24,32,0,66,0,55,3,32,32,0,66,0,55,3,40,32,0,66,0,55,3,48,32,0,66,0,55,3,56,32,0,66,0,55,3,64,32,0,66,0,55,3,72,32,0,66,0,55,3,80,32,0,66,0,55,3,88,32,0,66,0,55,3,96,32,0,32,2,173,55,3,80,32,0,32,3,173,55,3,88,65,12,65,4,16,10,34,2,65,172,3,75,4,64,32,2,65,16,107,34,3,32,3,40,2,4,65,1,106,54,2,4,11,32,2,32,4,65,0,16,14,33,2,32,0,40,2,0,16,12,32,0,32,2,54,2,0,32,0,32,4,54,2,4,32,0,66,1,32,1,173,134,66,1,125,55,3,96,32,0,66,243,130,183,218,216,230,232,30,55,3,72,35,4,69,4,64,65,0,33,2,3,64,32,2,65,128,2,72,4,64,32,2,65,255,1,113,173,33,6,32,0,41,3,72,34,7,33,8,65,63,32,7,121,167,107,33,1,3,64,65,63,32,6,121,167,107,32,1,107,34,3,65,0,78,4,64,32,6,32,8,32,3,172,134,133,33,6,12,1,11,11,65,0,33,4,3,64,32,4,32,0,40,2,4,65,1,107,72,4,64,32,6,66,8,134,33,6,32,0,41,3,72,34,7,33,8,65,63,32,7,121,167,107,33,1,3,64,65,63,32,6,121,167,107,32,1,107,34,3,65,0,78,4,64,32,6,32,8,32,3,172,134,133,33,6,12,1,11,11,32,4,65,1,106,33,4,12,1,11,11,35,6,40,2,4,32,2,65,3,116,106,32,6,55,3,0,32,2,65,1,106,33,2,12,1,11,11,65,63,32,0,41,3,72,121,167,107,172,33,7,65,0,33,2,3,64,32,2,65,128,2,72,4,64,35,5,33,1,32,2,172,32,7,134,34,8,33,6,65,63,32,0,41,3,72,34,9,121,167,107,33,3,3,64,65,63,32,6,121,167,107,32,3,107,34,4,65,0,78,4,64,32,6,32,9,32,4,172,134,133,33,6,12,1,11,11,32,1,40,2,4,32,2,65,3,116,106,32,6,32,8,132,55,3,0,32,2,65,1,106,33,2,12,1,11,11,65,1,36,4,11,32,0,66,0,55,3,24,32,0,66,0,55,3,32,65,0,33,2,3,64,32,2,32,0,40,2,4,72,4,64,32,0,40,2,0,32,2,16,18,32,2,65,1,106,33,2,12,1,11,11,32,0,66,0,55,3,40,32,0,65,0,54,2,8,32,0,66,0,55,3,16,32,0,66,0,55,3,40,32,0,40,2,0,32,0,40,2,8,16,19,33,1,32,0,40,2,8,32,0,40,2,0,40,2,4,106,65,1,58,0,0,32,0,32,0,41,3,40,35,6,40,2,4,32,1,65,3,116,106,41,3,0,133,55,3,40,32,0,32,0,40,2,8,65,1,106,32,0,40,2,4,111,54,2,8,32,0,35,5,40,2,4,32,0,41,3,40,34,6,66,45,136,167,65,3,116,106,41,3,0,32,6,66,8,134,66,1,132,133,55,3,40,32,0,11,38,1,1,127,32,0,40,2,0,34,0,65,172,3,75,4,64,32,0,65,16,107,34,1,32,1,40,2,4,65,1,106,54,2,4,11,32,0,11,55,1,2,127,32,1,32,0,40,2,0,34,2,71,4,64,32,1,65,172,3,75,4,64,32,1,65,16,107,34,3,32,3,40,2,4,65,1,106,54,2,4,11,32,2,16,12,11,32,0,32,1,54,2,0,11,7,0,32,0,40,2,4,11,9,0,32,0,32,1,54,2,4,11,7,0,32,0,40,2,8,11,9,0,32,0,32,1,54,2,8,11,7,0,32,0,41,3,16,11,9,0,32,0,32,1,55,3,16,11,7,0,32,0,41,3,24,11,9,0,32,0,32,1,55,3,24,11,7,0,32,0,41,3,32,11,9,0,32,0,32,1,55,3,32,11,7,0,32,0,41,3,40,11,9,0,32,0,32,1,55,3,40,11,7,0,32,0,41,3,48,11,9,0,32,0,32,1,55,3,48,11,7,0,32,0,41,3,56,11,9,0,32,0,32,1,55,3,56,11,7,0,32,0,41,3,64,11,9,0,32,0,32,1,55,3,64,11,7,0,32,0,41,3,72,11,9,0,32,0,32,1,55,3,72,11,7,0,32,0,41,3,80,11,9,0,32,0,32,1,55,3,80,11,7,0,32,0,41,3,88,11,9,0,32,0,32,1,55,3,88,11,7,0,32,0,41,3,96,11,9,0,32,0,32,1,55,3,96,11,172,4,2,5,127,1,126,32,2,65,172,3,75,4,64,32,2,65,16,107,34,4,32,4,40,2,4,65,1,106,54,2,4,11,32,2,33,4,65,0,33,2,32,1,40,2,8,33,5,32,1,40,2,4,33,6,3,64,2,127,65,0,33,3,3,64,32,3,32,5,72,4,64,32,3,32,6,106,45,0,0,33,1,32,0,40,2,0,32,0,40,2,8,16,19,33,7,32,0,40,2,8,32,0,40,2,0,40,2,4,106,32,1,58,0,0,32,0,32,0,41,3,40,35,6,40,2,4,32,7,65,3,116,106,41,3,0,133,55,3,40,32,0,32,0,40,2,8,65,1,106,32,0,40,2,4,111,54,2,8,32,0,35,5,40,2,4,32,0,41,3,40,34,8,66,45,136,167,65,3,116,106,41,3,0,32,1,173,32,8,66,8,134,132,133,55,3,40,32,0,32,0,41,3,16,66,1,124,55,3,16,32,0,32,0,41,3,24,66,1,124,55,3,24,32,0,41,3,16,32,0,41,3,80,90,4,127,32,0,41,3,40,32,0,41,3,96,131,80,5,65,0,11,4,127,65,1,5,32,0,41,3,16,32,0,41,3,88,90,11,4,64,32,0,32,0,41,3,32,55,3,48,32,0,32,0,41,3,16,55,3,56,32,0,32,0,41,3,40,55,3,64,65,0,33,1,3,64,32,1,32,0,40,2,4,72,4,64,32,0,40,2,0,32,1,16,18,32,1,65,1,106,33,1,12,1,11,11,32,0,66,0,55,3,40,32,0,65,0,54,2,8,32,0,66,0,55,3,16,32,0,66,0,55,3,40,32,0,40,2,0,32,0,40,2,8,16,19,33,1,32,0,40,2,8,32,0,40,2,0,40,2,4,106,65,1,58,0,0,32,0,32,0,41,3,40,35,6,40,2,4,32,1,65,3,116,106,41,3,0,133,55,3,40,32,0,32,0,40,2,8,65,1,106,32,0,40,2,4,111,54,2,8,32,0,35,5,40,2,4,32,0,41,3,40,34,8,66,45,136,167,65,3,116,106,41,3,0,32,8,66,8,134,66,1,132,133,55,3,40,32,3,65,1,106,12,3,11,32,3,65,1,106,33,3,12,1,11,11,65,127,11,34,1,65,0,78,4,64,32,5,32,1,107,33,5,32,1,32,6,106,33,6,32,2,34,1,65,1,106,33,2,32,4,40,2,4,32,1,65,2,116,106,32,0,41,3,56,62,2,0,12,1,11,11,32,4,11,10,0,16,15,36,5,16,15,36,6,11,3,0,1,11,73,1,2,127,32,0,40,2,4,34,1,65,255,255,255,255,0,113,34,2,65,1,70,4,64,32,0,65,16,106,16,53,32,0,32,0,40,2,0,65,1,114,54,2,0,35,0,32,0,16,2,5,32,0,32,2,65,1,107,32,1,65,128,128,128,128,127,113,114,54,2,4,11,11,58,0,2,64,2,64,2,64,32,0,65,8,107,40,2,0,14,7,0,0,1,1,1,1,1,2,11,15,11,32,0,40,2,0,34,0,4,64,32,0,65,172,3,79,4,64,32,0,65,16,107,16,52,11,11,15,11,0,11,11,137,3,7,0,65,16,11,55,40,0,0,0,1,0,0,0,1,0,0,0,40,0,0,0,97,0,108,0,108,0,111,0,99,0,97,0,116,0,105,0,111,0,110,0,32,0,116,0,111,0,111,0,32,0,108,0,97,0,114,0,103,0,101,0,65,208,0,11,45,30,0,0,0,1,0,0,0,1,0,0,0,30,0,0,0,126,0,108,0,105,0,98,0,47,0,114,0,116,0,47,
10,116,0,108,0,115,0,102,0,46,0,116,0,115,0,65,128,1,11,43,28,0,0,0,1,0,0,0,1,0,0,0,28,0,0,0,73,0,110,0,118,0,97,0,108,0,105,0,100,0,32,0,108,0,101,0,110,0,103,0,116,0,104,0,65,176,1,11,53,38,0,0,0,1,0,0,0,1,0,0,0,38,0,0,0,126,0,108,0,105,0,98,0,47,0,97,0,114,0,114,0,97,0,121,0,98,0,117,0,102,0,102,0,101,0,114,0,46,0,116,0,115,0,65,240,1,11,51,36,0,0,0,1,0,0,0,1,0,0,0,36,0,0,0,73,0,110,0,100,0,101,0,120,0,32,0,111,0,117,0,116,0,32,0,111,0,102,0,32,0,114,0,97,0,110,0,103,0,101,0,65,176,2,11,51,36,0,0,0,1,0,0,0,1,0,0,0,36,0,0,0,126,0,108,0,105,0,98,0,47,0,116,0,121,0,112,0,101,0,100,0,97,0,114,0,114,0,97,0,121,0,46,0,116,0,115,0,65,240,2,11,53,7,0,0,0,16,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,145,4,0,0,2,0,0,0,49,0,0,0,2,0,0,0,17,1,0,0,2,0,0,0,16,0,34,16,115,111,117,114,99,101,77,97,112,112,105,110,103,85,82,76,16,46,47,114,97,98,105,110,46,119,97,115,109,46,109,97,112]);return n(new Response(new Blob([e],{type:"application/wasm"})),t)}i.supported="undefined"!=typeof WebAssembly,t.exports=i},63060:function(t,e,r){let n=r(57118),i=r(33286),o=async(t,e,r,o,s)=>{let a=await i();return new n(a,t,e,r,o,s)};t.exports={Rabin:n,create:o}},57118:function(t){class e{constructor(t,e=12,r=8192,n=32768,i=64,o){this.bits=e,this.min=r,this.max=n,this.asModule=t,this.rabin=new t.Rabin(e,r,n,i,o),this.polynomial=o}fingerprint(t){let{__retain:e,__release:r,__allocArray:n,__getInt32Array:i,Int32Array_ID:o,Uint8Array_ID:s}=this.asModule,a=new Int32Array(Math.ceil(t.length/this.min)),u=e(n(o,a)),l=e(n(s,t)),c=this.rabin.fingerprint(l,u),f=i(c);r(l),r(u);let h=f.indexOf(0);return h>=0?f.subarray(0,h):f}}t.exports=e},99353:function(t,e,r){t.exports=r(71846)},71846:function(t,e,r){var n=r(41960);e.operation=function(t){var r=e.timeouts(t);return new n(r,{forever:t&&(t.forever||t.retries===1/0),unref:t&&t.unref,maxRetryTime:t&&t.maxRetryTime})},e.timeouts=function(t){if(t instanceof Array)return[].concat(t);var e={retries:10,factor:2,minTimeout:1e3,maxTimeout:1/0,randomize:!1};for(var r in t)e[r]=t[r];if(e.minTimeout>e.maxTimeout)throw Error("minTimeout is greater than maxTimeout");for(var n=[],i=0;i<e.retries;i++)n.push(this.createTimeout(i,e));return t&&t.forever&&!n.length&&n.push(this.createTimeout(i,e)),n.sort(function(t,e){return t-e}),n},e.createTimeout=function(t,e){return Math.min(Math.round((e.randomize?Math.random()+1:1)*Math.max(e.minTimeout,1)*Math.pow(e.factor,t)),e.maxTimeout)},e.wrap=function(t,r,n){if(r instanceof Array&&(n=r,r=null),!n)for(var i in n=[],t)"function"==typeof t[i]&&n.push(i);for(var o=0;o<n.length;o++){var s=n[o],a=t[s];t[s]=(function(n){var i=e.operation(r),o=Array.prototype.slice.call(arguments,1),s=o.pop();o.push(function(t){i.retry(t)||(t&&(arguments[0]=i.mainError()),s.apply(this,arguments))}),i.attempt(function(){n.apply(t,o)})}
1).bind(t,a),t[s].options=r}}},41960:function(t){function e(t,e){"boolean"==typeof e&&(e={forever:e}),this._originalTimeouts=JSON.parse(JSON.stringify(t)),this._timeouts=t,this._options=e||{},this._maxRetryTime=e&&e.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}t.exports=e,e.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)},e.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null},e.prototype.retry=function(t){if(this._timeout&&clearTimeout(this._timeout),!t)return!1;var e=new Date().getTime();if(t&&e-this._operationStart>=this._maxRetryTime)return this._errors.push(t),this._errors.unshift(Error("RetryOperation timeout occurred")),!1;this._errors.push(t);var r=this._timeouts.shift();if(void 0===r){if(!this._cachedTimeouts)return!1;this._errors.splice(0,this._errors.length-1),r=this._cachedTimeouts.slice(-1)}var n=this;return this._timer=setTimeout(function(){n._attempts++,n._operationTimeoutCb&&(n._timeout=setTimeout(function(){n._operationTimeoutCb(n._attempts)},n._operationTimeout),n._options.unref&&n._timeout.unref()),n._fn(n._attempts)},r),this._options.unref&&this._timer.unref(),!0},e.prototype.attempt=function(t,e){this._fn=t,e&&(e.timeout&&(this._operationTimeout=e.timeout),e.cb&&(this._operationTimeoutCb=e.cb));var r=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){r._operationTimeoutCb()},r._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)},e.prototype.try=function(t){console.log("Using RetryOperation.try() is deprecated"),this.attempt(t)},e.prototype.start=function(t){console.log("Using RetryOperation.start() is deprecated"),this.attempt(t)},e.prototype.start=e.prototype.try,e.prototype.errors=function(){return this._errors},e.prototype.attempts=function(){return this._attempts},e.prototype.mainError=function(){if(0===this._errors.length)return null;for(var t={},e=null,r=0,n=0;n<this._errors.length;n++){var i=this._errors[n],o=i.message,s=(t[o]||0)+1;t[o]=s,s>=r&&(e=i,r=s)}return e}},20544:function(t){"use strict";let e=7;function r(t,e){return t+n(e)}function n(t){let e=t;return e-=e>>1&1431655765,((e=(858993459&e)+(e>>2&858993459))+(e>>4)&252645135)*16843009>>24}function i(t,e){return t[0]-e[0]}function o(t){return t[1]}t.exports=class{constructor(){this._bitArrays=[],this._data=[],this._length=0,this._changedLength=!1,this._changedData=!1}set(t,e){let r=this._internalPositionFor(t,!1);if(void 0===e)-1!==r&&(this._unsetInternalPos(r),this._unsetBit(t),this._changedLength=!0,this._changedData=!0);else{let n=!1;-1===r?(r=this._data.length,this._setBit(t),this._changedData=!0):n=!0,this._setInternalPos(r,t,e,n),this._changedLength=!0}}unset(t){this.set(t,void 0)}get(t){this._sortData();let e=this._internalPositionFor(t,!0);if(-1!==e)return this._data[e][1]}push(t){return this.set(this.length,t),this.length}get length(){if(this._sortData(),this._changedLength){let t=this._data[this._data.length-1];this._length=t?t[0]+1:0,this._changedLength=!1}return this._length}forEach(t){let e=0;for(;e<this.length;)t(this.get(e),e,this),e++}map(t){let e=0,r=Array(this.length);for(;e<this.length;)r[e]=t(this.get(e),e,this),e++;return r}reduce(t,e){let r=0,n=e;for(;r<this.length;){let i=this.get(r);n=t(n,i,r),r++}return n}find(t){let e=0,r,n;for(;e<this.length&&!r;)r=t(n=this.get(e)),e++;return r?n:void 0}_internalPositionFor(t,i){let o=this._bytePosFor(t,i);if(o>=this._bitArrays.length)return -1;let s=this._bitArrays[o],a=t-o*e,u=(s&1<<a)>0;if(!u)return -1;let l=this._bitArrays.slice(0,o).reduce(r,0),c=~(4294967295<<a+1),f=n(s&c),h=l+f-1;return h}_bytePosFor(t,r){let n=Math.floor(t/e),i=n+1;for(;!r&&this._bitArrays.length<i;)this._bitArrays.push(0);return n}_setBit(t){let r=this._bytePosFor(t,!1);this._bitArrays[r]|=1<<t-r*e}_unsetBit(t){let r=this._bytePosFor(t,!1);this._bitArrays[r]&=~(1<<t-r*e)}_setInternalPos(t,e,r,n){let i=this._data,o=[e,r];if(n)this._sortData(),i[t]=o;else{if(i.length){if(i[i.length-1][0]>=e)i.push(o);else if(i[0][0]<=e)i.unshift(o);else{let s=Math.round(i.length/2);this._data=i.slice(0,s).concat(o).concat(i.slice(s))}}else this._data.push(o);this._changedData=!0,this._changedLength=!0}}_unsetInternalPos(t){this._data.splice(t,1)}_sortData(){this._changedData&&this._data.sort(i),this._changedData=!1}bitField(){let t;let e=[],r=8,n=0,i=0,o=this._bitArrays.slice();for(;o.length||n;){0===n&&(t=o.shift(),n=7);
1let s=Math.min(n,r),a=~(255<<s),u=t&a;i|=u<<8-r,t>>>=s,n-=s,(r-=s)&&(n||o.length)||(e.push(i),i=0,r=8)}for(var l=e.length-1;l>0;l--){let c=e[l];if(0===c)e.pop();else break}return e}compactArray(){return this._sortData(),this._data.map(o)}}},28230:function(t,e){"use strict";function r(t,e,r){void 0===r&&(r=!1),r&&(e/=t,t=1);var n,i=[],o=0,s=0,a=function(){var r=o+e,u=Date.now();if(u<r){void 0!==n&&clearTimeout(n),n=setTimeout(a,r-u);return}o=u,s=0;for(var l=0,c=i.splice(0,t);l<c.length;l++){var f=c[l];s++,f()}n=i.length?setTimeout(a,e):void 0};return function(r){return new Promise(function(u,l){var c=function(){return Promise.resolve().then(r).then(u).catch(l)},f=Date.now();void 0===n&&f-o>e&&(o=f,s=0),s++<t?c():(i.push(c),void 0===n&&(n=setTimeout(a,o+e-f)))})}}Object.defineProperty(e,"__esModule",{value:!0}),t.exports=r,e.default=r},26988:function(t){t.exports=n;var e=128,r=127;function n(t,i){var o,s=0,i=i||0,a=0,u=i,l=t.length;do{if(u>=l||a>49)throw n.bytes=0,RangeError("Could not decode varint");o=t[u++],s+=a<28?(o&r)<<a:(o&r)*Math.pow(2,a),a+=7}while(o>=e);return n.bytes=u-i,s}},1312:function(t){t.exports=i;var e=128,r=-128,n=2147483648;function i(t,o,s){if(Number.MAX_SAFE_INTEGER&&t>Number.MAX_SAFE_INTEGER)throw i.bytes=0,RangeError("Could not encode varint");o=o||[];for(var a=s=s||0;t>=n;)o[s++]=255&t|e,t/=128;for(;t&r;)o[s++]=255&t|e,t>>>=7;return o[s]=0|t,i.bytes=s-a+1,o}},94676:function(t,e,r){t.exports={encode:r(1312),decode:r(26988),encodingLength:r(10082)}},10082:function(t){var e=128,r=16384,n=2097152,i=268435456,o=34359738368,s=4398046511104,a=562949953421312,u=72057594037927940,l=0x7fffffffffffffff;t.exports=function(t){return t<e?1:t<r?2:t<n?3:t<i?4:t<o?5:t<s?6:t<a?7:t<u?8:t<l?9:10}},31114:function(t,e,r){"use strict";r.d(e,{kU:function(){return f},Dp:function(){return c},ET:function(){return p}});var n=function(t,e){if(t.length>=255)throw TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var i=0;i<t.length;i++){var o=t.charAt(i),s=o.charCodeAt(0);if(255!==r[s])throw TypeError(o+" is ambiguous");r[s]=i}var a=t.length,u=t.charAt(0),l=Math.log(a)/Math.log(256),c=Math.log(256)/Math.log(a);function f(t){if("string"!=typeof t)throw TypeError("Expected String");if(0===t.length)return new Uint8Array;var e=0;if(" "!==t[0]){for(var n=0,i=0;t[e]===u;)n++,e++;for(var o=(t.length-e)*l+1>>>0,s=new Uint8Array(o);t[e];){var c=r[t.charCodeAt(e)];if(255===c)return;for(var f=0,h=o-1;(0!==c||f<i)&&-1!==h;h--,f++)c+=a*s[h]>>>0,s[h]=c%256>>>0,c=c/256>>>0;if(0!==c)throw Error("Non-zero carry");i=f,e++}if(" "!==t[e]){for(var d=o-i;d!==o&&0===s[d];)d++;for(var p=new Uint8Array(n+(o-d)),y=n;d!==o;)p[y++]=s[d++];return p}}}function h(t){var r=f(t);if(r)return r;throw Error(`Non-${e} character`)}return{encode:function(e){if(e instanceof Uint8Array||(ArrayBuffer.isView(e)?e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength):Array.isArray(e)&&(e=Uint8Array.from(e))),!(e instanceof Uint8Array))throw TypeError("Expected Uint8Array");if(0===e.length)return"";for(var r=0,n=0,i=0,o=e.length;i!==o&&0===e[i];)i++,r++;for(var s=(o-i)*c+1>>>0,l=new Uint8Array(s);i!==o;){for(var f=e[i],h=0,d=s-1;(0!==f||h<n)&&-1!==d;d--,h++)f+=256*l[d]>>>0,l[d]=f%a>>>0,f=f/a>>>0;if(0!==f)throw Error("Non-zero carry");n=h,i++}for(var p=s-n;p!==s&&0===l[p];)p++;for(var y=u.repeat(r);p<s;++p)y+=t.charAt(l[p]);return y},decodeUnsafe:f,decode:h}},i=r(95934);class o{constructor(t,e,r){this.name=t,this.prefix=e,this.baseEncode=r}encode(t){if(t instanceof Uint8Array)return`${this.prefix}${this.baseEncode(t)}`;throw Error("Unknown type, must be binary type")}}class s{constructor(t,e,r){if(this.name=t,this.prefix=e,void 0===e.codePointAt(0))throw Error("Invalid prefix character");this.prefixCodePoint=e.codePointAt(0),this.baseDecode=r}decode(t){if("string"==typeof t){if(t.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(t)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(t.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(t){return u(this,t)}}class a{constructor(t){this.decoders=t}or(t){return u(this,t)}decode(t){let e=t[0],r=this.decoders[e];if(r)return r.decode(t);throw RangeError(`Unable to decode multibase string ${JSON.stringify(t)}
1, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}let u=(t,e)=>new a({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});class l{constructor(t,e,r,n){this.name=t,this.prefix=e,this.baseEncode=r,this.baseDecode=n,this.encoder=new o(t,e,r),this.decoder=new s(t,e,n)}encode(t){return this.encoder.encode(t)}decode(t){return this.decoder.decode(t)}}let c=({name:t,prefix:e,encode:r,decode:n})=>new l(t,e,r,n),f=({prefix:t,name:e,alphabet:r})=>{let{encode:o,decode:s}=n(r,e);return c({prefix:t,name:e,encode:o,decode:t=>(0,i.coerce)(s(t))})},h=(t,e,r,n)=>{let i={};for(let o=0;o<e.length;++o)i[e[o]]=o;let s=t.length;for(;"="===t[s-1];)--s;let a=new Uint8Array(s*r/8|0),u=0,l=0,c=0;for(let f=0;f<s;++f){let h=i[t[f]];if(void 0===h)throw SyntaxError(`Non-${n} character`);l=l<<r|h,(u+=r)>=8&&(u-=8,a[c++]=255&l>>u)}if(u>=r||255&l<<8-u)throw SyntaxError("Unexpected end of data");return a},d=(t,e,r)=>{let n="="===e[e.length-1],i=(1<<r)-1,o="",s=0,a=0;for(let u=0;u<t.length;++u)for(a=a<<8|t[u],s+=8;s>r;)s-=r,o+=e[i&a>>s];if(s&&(o+=e[i&a<<r-s]),n)for(;o.length*r&7;)o+="=";return o},p=({name:t,prefix:e,bitsPerChar:r,alphabet:n})=>c({prefix:e,name:t,encode:t=>d(t,n,r),decode:e=>h(e,n,r,t)})},22817:function(t,e,r){"use strict";r.r(e),r.d(e,{base32:function(){return i},base32hex:function(){return u},base32hexpad:function(){return c},base32hexpadupper:function(){return f},base32hexupper:function(){return l},base32pad:function(){return s},base32padupper:function(){return a},base32upper:function(){return o},base32z:function(){return h}});var n=r(31114);let i=(0,n.ET)({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),o=(0,n.ET)({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),s=(0,n.ET)({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),a=(0,n.ET)({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),u=(0,n.ET)({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),l=(0,n.ET)({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),c=(0,n.ET)({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),f=(0,n.ET)({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),h=(0,n.ET)({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5})},99086:function(t,e,r){"use strict";r.r(e),r.d(e,{base58btc:function(){return i},base58flickr:function(){return o}});var n=r(31114);let i=(0,n.kU)({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),o=(0,n.kU)({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"})},95934:function(t,e,r){"use strict";r.r(e),r.d(e,{coerce:function(){return a},empty:function(){return n},equals:function(){return s},fromHex:function(){return o},fromString:function(){return l},isBinary:function(){return u},toHex:function(){return i},toString:function(){return c}});let n=new Uint8Array(0),i=t=>t.reduce((t,e)=>t+e.toString(16).padStart(2,"0"),""),o=t=>{let e=t.match(/../g);return e?new Uint8Array(e.map(t=>parseInt(t,16))):n},s=(t,e)=>{if(t===e)return!0;if(t.byteLength!==e.byteLength)return!1;for(let r=0;r<t.byteLength;r++)if(t[r]!==e[r])return!1;return!0},a=t=>{if(t instanceof Uint8Array&&"Uint8Array"===t.constructor.name)return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw Error("Unknown type, must be binary type")},u=t=>t instanceof ArrayBuffer||ArrayBuffer.isView(t),l=t=>new TextEncoder().encode(t),c=t=>new TextDecoder().decode(t)},81362:function(t,e,r){"use strict";r.d(e,{k:function(){return u}});var n=r(15216),i=r(28924),o=r(99086),s=r(22817),a=r(95934);class u{constructor(t,e,r,n){this.code=e,this.version=t,this.multihash=r,this.bytes=n,this.byteOffset=n.byteOffset,this.byteLength=n.byteLength,this.asCID=this,this._baseCache=new Map,Object.defineProperties(this,{byteOffset:b,byteLength:b,code:g,ver
1sion:g,multihash:g,bytes:g,_baseCache:b,asCID:b})}toV0(){if(0===this.version)return this;{let{code:t,multihash:e}=this;if(t!==h)throw Error("Cannot convert a non dag-pb CID to CIDv0");if(e.code!==d)throw Error("Cannot convert non sha2-256 multihash CID to CIDv0");return u.createV0(e)}}toV1(){switch(this.version){case 0:{let{code:t,digest:e}=this.multihash,r=i.Ue(t,e);return u.createV1(this.code,r)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}equals(t){return t&&this.code===t.code&&this.version===t.version&&i.fS(this.multihash,t.multihash)}toString(t){let{bytes:e,version:r,_baseCache:n}=this;return 0===r?c(e,n,t||o.base58btc.encoder):f(e,n,t||s.base32.encoder)}toJSON(){return{code:this.code,version:this.version,hash:this.multihash.bytes}}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return"CID("+this.toString()+")"}static isCID(t){return w(/^0\.0/,D),!!(t&&(t[y]||t.asCID===t))}get toBaseEncodedString(){throw Error("Deprecated, use .toString()")}get codec(){throw Error('"codec" property is deprecated, use integer "code" property instead')}get buffer(){throw Error("Deprecated .buffer property, use .bytes to get Uint8Array instead")}get multibaseName(){throw Error('"multibaseName" property is deprecated')}get prefix(){throw Error('"prefix" property is deprecated')}static asCID(t){if(t instanceof u)return t;if(null!=t&&t.asCID===t){let{version:e,code:r,multihash:n,bytes:o}=t;return new u(e,r,n,o||p(e,r,n.bytes))}if(null==t||!0!==t[y])return null;{let{version:s,multihash:a,code:l}=t,c=i.Jx(a);return u.create(s,l,c)}}static create(t,e,r){if("number"!=typeof e)throw Error("String codecs are no longer supported");switch(t){case 0:if(e===h)return new u(t,e,r,r.bytes);throw Error(`Version 0 CID must use dag-pb (code: ${h}) block encoding`);case 1:{let n=p(t,e,r.bytes);return new u(t,e,r,n)}default:throw Error("Invalid version")}}static createV0(t){return u.create(0,h,t)}static createV1(t,e){return u.create(1,t,e)}static decode(t){let[e,r]=u.decodeFirst(t);if(r.length)throw Error("Incorrect length");return e}static decodeFirst(t){let e=u.inspectBytes(t),r=e.size-e.multihashSize,n=(0,a.coerce)(t.subarray(r,r+e.multihashSize));if(n.byteLength!==e.multihashSize)throw Error("Incorrect length");let o=n.subarray(e.multihashSize-e.digestSize),s=new i.zZ(e.multihashCode,e.digestSize,o,n),l=0===e.version?u.createV0(s):u.createV1(e.codec,s);return[l,t.subarray(e.size)]}static inspectBytes(t){let e=0,r=()=>{let[r,i]=n.Jx(t.subarray(e));return e+=i,r},i=r(),o=h;if(18===i?(i=0,e=0):1===i&&(o=r()),0!==i&&1!==i)throw RangeError(`Invalid CID version ${i}`);let s=e,a=r(),u=r(),l=e+u,c=l-s;return{version:i,codec:o,multihashCode:a,digestSize:u,multihashSize:c,size:l}}static parse(t,e){let[r,n]=l(t,e),i=u.decode(n);return i._baseCache.set(r,t),i}}let l=(t,e)=>{switch(t[0]){case"Q":{let r=e||o.base58btc;return[o.base58btc.prefix,r.decode(`${o.base58btc.prefix}${t}`)]}case o.base58btc.prefix:{let n=e||o.base58btc;return[o.base58btc.prefix,n.decode(t)]}case s.base32.prefix:{let i=e||s.base32;return[s.base32.prefix,i.decode(t)]}default:if(null==e)throw Error("To parse non base32 or base58btc encoded CID multibase decoder must be provided");return[t[0],e.decode(t)]}},c=(t,e,r)=>{let{prefix:n}=r;if(n!==o.base58btc.prefix)throw Error(`Cannot string encode V0 in ${r.name} encoding`);let i=e.get(n);if(null!=i)return i;{let s=r.encode(t).slice(1);return e.set(n,s),s}},f=(t,e,r)=>{let{prefix:n}=r,i=e.get(n);if(null!=i)return i;{let o=r.encode(t);return e.set(n,o),o}},h=112,d=18,p=(t,e,r)=>{let i=n.P$(t),o=i+n.P$(e),s=new Uint8Array(o+r.byteLength);return n.mL(t,s,0),n.mL(e,s,i),s.set(r,o),s},y=Symbol.for("@ipld/js-cid/CID"),g={writable:!1,configurable:!1,enumerable:!0},b={writable:!1,enumerable:!1,configurable:!1},m="0.0.0-dev",w=(t,e)=>{if(t.test(m))console.warn(e);else throw Error(e)},D=`CID.isCID(v) is deprecated and will be removed in the next major release.
2Following code pattern:
3
4if (CID.isCID(value)) {
5  doSomethingWithCID(value)
6}
7
8Is replaced with:
9
10const cid = CID.asCID(value)
11if (cid) {
12  // Make sure to use cid instead of value
13  doSomethingWithCID(cid)
14}
15`},96945:function(t,e,r){"use strict";r.r(e),r.d(e,{code:function(){return o},decode:function(){return a},encode:function(){return s},name:function(){return i}});var n=r(95934);let i="raw",o=85,s=t=>(0,n.coerce)(t),a=t=>(0,n.coerce)(t)},28924:function(t,e,r){"use strict";r.d(e,{Jx:function(){return s},Ue:function(){return o},fS:function(){return a},zZ:function(){return u}});var n=r(95934),i=r(15216);let o=(t,e)=>{let r=e.byteLength,n=i.P$(t),o=n+i.P$(r),s=new Uint8Array(o+r);return i.mL(t,s,0),i.mL(r,s,n),s.set(e,o),new u(t,r,e,s)},s=t=>{let e=(0,n.coerce)(t),[r,o]=i.Jx(e),[s,a]=i.Jx(e.subarray(o)),l=e.subarray(o+a);if(l.byteLength!==s)throw Error("Incorrect length");return new u(r,s,l,e)},a=(t,e)=>t===e||t.code===e.code&&t.size===e.size&&(0,n.equals)(t.bytes,e.bytes);
15class u{constructor(t,e,r,n){this.code=t,this.size=e,this.digest=r,this.bytes=n}}},7225:function(t,e,r){"use strict";r.d(e,{D:function(){return i}});var n=r(28924);let i=({name:t,code:e,encode:r})=>new o(t,e,r);class o{constructor(t,e,r){this.name=t,this.code=e,this.encode=r}digest(t){if(t instanceof Uint8Array){let e=this.encode(t);return e instanceof Uint8Array?n.Ue(this.code,e):e.then(t=>n.Ue(this.code,t))}throw Error("Unknown type, must be binary type")}}},78103:function(t,e,r){"use strict";r.r(e),r.d(e,{identity:function(){return l}});var n=r(95934),i=r(28924);let o=0,s="identity",a=n.coerce,u=t=>i.Ue(o,a(t)),l={code:o,name:s,encode:a,digest:u}},56155:function(t,e,r){"use strict";r.r(e),r.d(e,{sha256:function(){return o},sha512:function(){return s}});var n=r(7225);let i=t=>async e=>new Uint8Array(await crypto.subtle.digest(t,e)),o=(0,n.D)({name:"sha2-256",code:18,encode:i("SHA-256")}),s=(0,n.D)({name:"sha2-512",code:19,encode:i("SHA-512")})},87232:function(t,e,r){"use strict";r.d(e,{aI:function(){return i},k0:function(){return n.k}});var n=r(81362);r(15216);var i=r(95934);r(7225),r(28924)},15216:function(t,e,r){"use strict";r.d(e,{Jx:function(){return D},mL:function(){return E},P$:function(){return _}});var n=128,i=-128,o=2147483648;function s(t,e,r){e=e||[];for(var a=r=r||0;t>=o;)e[r++]=255&t|n,t/=128;for(;t&i;)e[r++]=255&t|n,t>>>=7;return e[r]=0|t,s.bytes=r-a+1,e}var a=128,u=127;function l(t,e){var r,n=0,e=e||0,i=0,o=e,s=t.length;do{if(o>=s)throw l.bytes=0,RangeError("Could not decode varint");r=t[o++],n+=i<28?(r&u)<<i:(r&u)*Math.pow(2,i),i+=7}while(r>=a);return l.bytes=o-e,n}var c=128,f=16384,h=2097152,d=268435456,p=34359738368,y=4398046511104,g=562949953421312,b=72057594037927940,m=0x7fffffffffffffff,w={encode:s,decode:l,encodingLength:function(t){return t<c?1:t<f?2:t<h?3:t<d?4:t<p?5:t<y?6:t<g?7:t<b?8:t<m?9:10}};let D=(t,e=0)=>{let r=w.decode(t,e);return[r,w.decode.bytes]},E=(t,e,r=0)=>(w.encode(t,e,r),e),_=t=>w.encodingLength(t)},53160:function(t,e,r){"use strict";r.d(e,{E:function(){return i}});var n=r(16867);function i(t=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?(0,n.P)(globalThis.Buffer.allocUnsafe(t)):new Uint8Array(t)}},20605:function(t,e,r){"use strict";r.r(e),r.d(e,{concat:function(){return o}});var n=r(53160),i=r(16867);function o(t,e){e||(e=t.reduce((t,e)=>t+e.length,0));let r=(0,n.E)(e),o=0;for(let s of t)r.set(s,o),o+=s.length;return(0,i.P)(r)}},41113:function(t,e,r){"use strict";r.r(e),r.d(e,{fromString:function(){return J}});var n={};r.r(n),r.d(n,{identity:function(){return p}});var i={};r.r(i),r.d(i,{base2:function(){return y}});var o={};r.r(o),r.d(o,{base8:function(){return g}});var s={};r.r(s),r.d(s,{base10:function(){return b}});var a={};r.r(a),r.d(a,{base16:function(){return m},base16upper:function(){return w}});var u={};r.r(u),r.d(u,{base36:function(){return E},base36upper:function(){return _}});var l={};r.r(l),r.d(l,{base64:function(){return A},base64pad:function(){return k},base64url:function(){return C},base64urlpad:function(){return x}});var c={};r.r(c),r.d(c,{base256emoji:function(){return z}});var f={};r.r(f),r.d(f,{code:function(){return O},decode:function(){return R},encode:function(){return j},name:function(){return P}});var h=r(31114),d=r(95934);let p=(0,h.Dp)({prefix:"\0",name:"identity",encode:t=>(0,d.toString)(t),decode:t=>(0,d.fromString)(t)}),y=(0,h.ET)({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),g=(0,h.ET)({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),b=(0,h.kU)({prefix:"9",name:"base10",alphabet:"0123456789"}),m=(0,h.ET)({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),w=(0,h.ET)({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var D=r(22817);let E=(0,h.kU)({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),_=(0,h.kU)({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var v=r(99086);let A=(0,h.ET)({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),k=(0,h.ET)({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
15+/=",bitsPerChar:6}),C=(0,h.ET)({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),x=(0,h.ET)({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),S=Array.from("\uD83D\uDE80\uD83E\uDE90☄\uD83D\uDEF0\uD83C\uDF0C\uD83C\uDF11\uD83C\uDF12\uD83C\uDF13\uD83C\uDF14\uD83C\uDF15\uD83C\uDF16\uD83C\uDF17\uD83C\uDF18\uD83C\uDF0D\uD83C\uDF0F\uD83C\uDF0E\uD83D\uDC09☀\uD83D\uDCBB\uD83D\uDDA5\uD83D\uDCBE\uD83D\uDCBF\uD83D\uDE02❤\uD83D\uDE0D\uD83E\uDD23\uD83D\uDE0A\uD83D\uDE4F\uD83D\uDC95\uD83D\uDE2D\uD83D\uDE18\uD83D\uDC4D\uD83D\uDE05\uD83D\uDC4F\uD83D\uDE01\uD83D\uDD25\uD83E\uDD70\uD83D\uDC94\uD83D\uDC96\uD83D\uDC99\uD83D\uDE22\uD83E\uDD14\uD83D\uDE06\uD83D\uDE44\uD83D\uDCAA\uD83D\uDE09☺\uD83D\uDC4C\uD83E\uDD17\uD83D\uDC9C\uD83D\uDE14\uD83D\uDE0E\uD83D\uDE07\uD83C\uDF39\uD83E\uDD26\uD83C\uDF89\uD83D\uDC9E✌✨\uD83E\uDD37\uD83D\uDE31\uD83D\uDE0C\uD83C\uDF38\uD83D\uDE4C\uD83D\uDE0B\uD83D\uDC97\uD83D\uDC9A\uD83D\uDE0F\uD83D\uDC9B\uD83D\uDE42\uD83D\uDC93\uD83E\uDD29\uD83D\uDE04\uD83D\uDE00\uD83D\uDDA4\uD83D\uDE03\uD83D\uDCAF\uD83D\uDE48\uD83D\uDC47\uD83C\uDFB6\uD83D\uDE12\uD83E\uDD2D❣\uD83D\uDE1C\uD83D\uDC8B\uD83D\uDC40\uD83D\uDE2A\uD83D\uDE11\uD83D\uDCA5\uD83D\uDE4B\uD83D\uDE1E\uD83D\uDE29\uD83D\uDE21\uD83E\uDD2A\uD83D\uDC4A\uD83E\uDD73\uD83D\uDE25\uD83E\uDD24\uD83D\uDC49\uD83D\uDC83\uD83D\uDE33✋\uD83D\uDE1A\uD83D\uDE1D\uD83D\uDE34\uD83C\uDF1F\uD83D\uDE2C\uD83D\uDE43\uD83C\uDF40\uD83C\uDF37\uD83D\uDE3B\uD83D\uDE13⭐✅\uD83E\uDD7A\uD83C\uDF08\uD83D\uDE08\uD83E\uDD18\uD83D\uDCA6✔\uD83D\uDE23\uD83C\uDFC3\uD83D\uDC90☹\uD83C\uDF8A\uD83D\uDC98\uD83D\uDE20☝\uD83D\uDE15\uD83C\uDF3A\uD83C\uDF82\uD83C\uDF3B\uD83D\uDE10\uD83D\uDD95\uD83D\uDC9D\uD83D\uDE4A\uD83D\uDE39\uD83D\uDDE3\uD83D\uDCAB\uD83D\uDC80\uD83D\uDC51\uD83C\uDFB5\uD83E\uDD1E\uD83D\uDE1B\uD83D\uDD34\uD83D\uDE24\uD83C\uDF3C\uD83D\uDE2B⚽\uD83E\uDD19☕\uD83C\uDFC6\uD83E\uDD2B\uD83D\uDC48\uD83D\uDE2E\uD83D\uDE46\uD83C\uDF7B\uD83C\uDF43\uD83D\uDC36\uD83D\uDC81\uD83D\uDE32\uD83C\uDF3F\uD83E\uDDE1\uD83C\uDF81⚡\uD83C\uDF1E\uD83C\uDF88❌✊\uD83D\uDC4B\uD83D\uDE30\uD83E\uDD28\uD83D\uDE36\uD83E\uDD1D\uD83D\uDEB6\uD83D\uDCB0\uD83C\uDF53\uD83D\uDCA2\uD83E\uDD1F\uD83D\uDE41\uD83D\uDEA8\uD83D\uDCA8\uD83E\uDD2C✈\uD83C\uDF80\uD83C\uDF7A\uD83E\uDD13\uD83D\uDE19\uD83D\uDC9F\uD83C\uDF31\uD83D\uDE16\uD83D\uDC76\uD83E\uDD74▶➡❓\uD83D\uDC8E\uD83D\uDCB8⬇\uD83D\uDE28\uD83C\uDF1A\uD83E\uDD8B\uD83D\uDE37\uD83D\uDD7A⚠\uD83D\uDE45\uD83D\uDE1F\uD83D\uDE35\uD83D\uDC4E\uD83E\uDD32\uD83E\uDD20\uD83E\uDD27\uD83D\uDCCC\uD83D\uDD35\uD83D\uDC85\uD83E\uDDD0\uD83D\uDC3E\uD83C\uDF52\uD83D\uDE17\uD83E\uDD11\uD83C\uDF0A\uD83E\uDD2F\uD83D\uDC37☎\uD83D\uDCA7\uD83D\uDE2F\uD83D\uDC86\uD83D\uDC46\uD83C\uDFA4\uD83D\uDE47\uD83C\uDF51❄\uD83C\uDF34\uD83D\uDCA3\uD83D\uDC38\uD83D\uDC8C\uD83D\uDCCD\uD83E\uDD40\uD83E\uDD22\uD83D\uDC45\uD83D\uDCA1\uD83D\uDCA9\uD83D\uDC50\uD83D\uDCF8\uD83D\uDC7B\uD83E\uDD10\uD83E\uDD2E\uD83C\uDFBC\uD83E\uDD75\uD83D\uDEA9\uD83C\uDF4E\uD83C\uDF4A\uD83D\uDC7C\uD83D\uDC8D\uD83D\uDCE3\uD83E\uDD42"),T=S.reduce((t,e,r)=>(t[r]=e,t),[]),B=S.reduce((t,e,r)=>(t[e.codePointAt(0)]=r,t),[]);function N(t){return t.reduce((t,e)=>t+=T[e],"")}function I(t){let e=[];for(let r of t){let n=B[r.codePointAt(0)];if(void 0===n)throw Error(`Non-base256emoji character: ${r}`);e.push(n)}return new Uint8Array(e)}let z=(0,h.Dp)({prefix:"\uD83D\uDE80",name:"base256emoji",encode:N,decode:I});r(56155),r(78103),r(96945);let U=new TextEncoder,L=new TextDecoder,P="json",O=512,j=t=>U.encode(JSON.stringify(t)),R=t=>JSON.parse(L.decode(t));r(87232);let F={...n,...i,...o,...s,...a,...D,...u,...v,...l,...c};var M=r(53160);function $(t,e,r,n){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:r},decoder:{decode:n}}}let H=$("utf8","u",t=>{let e=new TextDecoder("utf8");return"u"+e.decode(t)},t=>{let e=new TextEncoder;return e.encode(t.substring(1))}),V=$("ascii","a",t=>{let e="a";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e},t=>{t=t.substring(1);let e=(0,M.E)(t.length);for(let r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return e}),G={utf8:H,"utf-8":H,hex:F.base16,latin1:V,ascii:V,binary:V,...F};var W=G,q=r(16867);function J(t,e="utf8"){let r=W[e];if(!r)throw Error(`Unsupported encoding "${e}"`);return("utf8"===e||"utf-8"===e)&&null!=globalThis.Buffer&&null!=globalThis.Buffer.from?(0,q.P)(globalThis.Buffer.from(t,"utf-8")):r.decoder.decode(`${r.prefix}${t}`)}},16867:function(t,e,r){"use strict";function n(t){return null!=globalThis.Buffer?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t}r.d(e,{P:function(){return n}})},64823:function(t,e,r){"use strict";r.d(e,{xk:function(){return oG}});var n={};r.r(n),r.d(n,{code:function(){return nn},createLink:function(){return ne},createNode:function(){return nt},decode:function(){return no},encode:function(){return ni},name:function(){return nr},prepare:function(){return r7},validate:function(){return r9}});var i={};r.r(i),r.d(i,{abortedError:function(){return ih},notFoundError:function(){return ic}});var o={};function s(t){if("function"==typeof t.next)return t;if("function"==typeof t[Symbol.iterator])return t[Symbol.iterator]();if("function"==typeof t[Symbol.asyncIterator])return t[Symbol.asyncIterator]();throw TypeError('"values" does not to conform to any of the iterator or iterable protocols')}function a(){let t,e;let r=new Promise((r,n)=>{e=r,t=n});return{promise:r,reject:t,resolve:e}}function u(t,e,r){let n=s(r),i=[],o=[],u=!1,l=!1,c=0,f=null;function h(){for(;o.length>0&&i.length>0;){let{resolve:t}=o.shift(),e=i.shift();t({done:!1,value:e})}for(;o.length>0&&0===c&&u;){let{resolve:r,reject:n}=o.shift();f?(n(f),f=null):r({done:!0,value:void 0})}}async function d(){if(u){h();return}if(!l&&!(c+i.length>
15=t)){l=!0,c++;try{let{done:e,value:r}=await n.next();e?(u=!0,c--,h()):p(r)}catch(o){u=!0,c--,f=o,h()}l=!1,d()}}async function p(t){try{let r=await e(t);i.push(r)}catch(n){u=!0,f=n}c--,h(),d()}async function y(){if(0===i.length){let t=a();return o.push(t),d(),t.promise}let e=i.shift();return d(),{done:!1,value:e}}let g={next:y,[Symbol.asyncIterator]:()=>g};return g}function l(t,e,r){return void 0===e?(e,r)=>r?l(t,e,r):l(t,e):void 0===r?r=>l(t,e,r):u(t,e,r)}r.r(o),r.d(o,{code:function(){return oC},decode:function(){return oS},encode:function(){return ox},name:function(){return ok}}),r(83454),Symbol("TIMEOUT");var c=r(42693),f=r(93093),h=r(60618),d=r(94676),p=r(81362),y=r(28924);let g=["string","number","bigint","symbol"],b=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","HTMLElement","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function m(t){if(null===t)return"null";if(void 0===t)return"undefined";if(!0===t||!1===t)return"boolean";let e=typeof t;if(g.includes(e))return e;if("function"===e)return"Function";if(Array.isArray(t))return"Array";if(w(t))return"Buffer";let r=D(t);return r||"Object"}function w(t){return t&&t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer.call(null,t)}function D(t){let e=Object.prototype.toString.call(t).slice(8,-1);if(b.includes(e))return e}class E{constructor(t,e,r){this.major=t,this.majorEncoded=t<<5,this.name=e,this.terminal=r}toString(){return`Type[${this.major}].${this.name}`}compare(t){return this.major<t.major?-1:this.major>t.major?1:0}}E.uint=new E(0,"uint",!0),E.negint=new E(1,"negint",!0),E.bytes=new E(2,"bytes",!0),E.string=new E(3,"string",!0),E.array=new E(4,"array",!1),E.map=new E(5,"map",!1),E.tag=new E(6,"tag",!1),E.float=new E(7,"float",!0),E.false=new E(7,"false",!0),E.true=new E(7,"true",!0),E.null=new E(7,"null",!0),E.undefined=new E(7,"undefined",!0),E.break=new E(7,"break",!0);class _{constructor(t,e,r){this.type=t,this.value=e,this.encodedLength=r,this.encodedBytes=void 0,this.byteValue=void 0}toString(){return`Token[${this.type}].${this.value}`}}let v=globalThis.process&&!globalThis.process.browser&&globalThis.Buffer&&"function"==typeof globalThis.Buffer.isBuffer,A=new TextDecoder,k=new TextEncoder;function C(t){return v&&globalThis.Buffer.isBuffer(t)}function x(t){return t instanceof Uint8Array?C(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t:Uint8Array.from(t)}let S=v?(t,e,r)=>r-e>64?globalThis.Buffer.from(t.subarray(e,r)).toString("utf8"):P(t,e,r):(t,e,r)=>r-e>64?A.decode(t.subarray(e,r)):P(t,e,r),T=v?t=>t.length>64?globalThis.Buffer.from(t):L(t):t=>t.length>64?k.encode(t):L(t),B=t=>Uint8Array.from(t),N=v?(t,e,r)=>C(t)?new Uint8Array(t.subarray(e,r)):t.slice(e,r):(t,e,r)=>t.slice(e,r),I=v?(t,e)=>(t=t.map(t=>t instanceof Uint8Array?t:globalThis.Buffer.from(t)),x(globalThis.Buffer.concat(t,e))):(t,e)=>{let r=new Uint8Array(e),n=0;for(let i of t)n+i.length>r.length&&(i=i.subarray(0,r.length-n)),r.set(i,n),n+=i.length;return r},z=v?t=>globalThis.Buffer.allocUnsafe(t):t=>new Uint8Array(t);function U(t,e){if(C(t)&&C(e))return t.compare(e);for(let r=0;r<t.length;r++)if(t[r]!==e[r])return t[r]<e[r]?-1:1;return 0}function L(t,e=1/0){let r;let n=t.length,i=null,o=[];for(let s=0;s<n;++s){if((r=t.charCodeAt(s))>55295&&r<57344){if(!i){if(r>56319||s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return o}function P(t,e,r){let n=[];for(;e<r;){let i=t[e],o=null,s=i>239?4:i>223?3:i>191?2:1;if(e+s<=r){let a,u,l,c;switch(s){case 1:i<128&&(o=i);break;case 2:(192&(a=t[e+1]))==128&&(c=(31&i)<<6|63&a)>127&&(o=c);break;case 3:a=t[e+1],u=t[e+2],(192&a)==128&&(192&u)==128&&(c=(15&i)<<12|(63&a)<<6|63&u)>2047&&(c<55296||c>57343)&&(o=c);break;case 4:a=t[e+1],u=t[e+2],l=t[e+3],(192&a)==128&&(192&u)==128&&(192&l)==128&&(c=(15&i)<<18|(63&a)<<12|(63&u)<<6|63&l)>65535&&c<1114112&&(o=c)}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),e+=s}return j(n)}let O=4096;function j(t){let e=t.length;if(e<=O)return String.fromCharCode.apply(String,t);let r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=O));return r}let R=256;class F{constructor(t=R){this.chunkSize=t,this.cursor=0,this.maxCursor=-1,this.chunks=[],this._initReuseChunk=null}reset(){this.cursor=0,this.maxCursor=-1,this.chunks.length&&(this.chunks=[]),null!==this._initReuseChunk&&(this.chunks.push(this._initReuseChunk),this.maxCursor=this._initReuseChunk.length-1)}push(t){let e=this.chunks[this.chunks.length-1],r=this.cursor+t.length;if(r<=this.maxCursor+1){let n=e.length-(this.maxCursor-this.cursor)-1;e.set(t,n)}else{if(e){let i=e.length-(this.maxCursor-this.cursor)-1;i<e.length&&(this.chunks[this.chunks.length-1]=e.subarray(0,i),this.maxCursor=this.cursor-1)}t.length<64&&t.length<this.chunkSize?(e=z(this.chunkSize),this.chunks.push(e),this.maxCursor+=e.length,null===this._initReuseChunk&&(this._initReuseChunk=e),e.set(t,0)):(this.chunks.push(t),this.maxCursor+=t.length)}this.cursor+=t.length}toBytes(t=!1){let e;if(1===this.chunks.length){let r=this.chunks[0];t&&this.cursor>r.length/2?(e=this.cursor===r.length?r:r.subarray(0,this.cursor),this._initReuseChunk=null,this.chunks=[]):e=N(r,0,this.cursor)}else e=I(this.chunks,this.cursor);return t&&this.reset(),e}}let M="CBOR decode error:",$="CBOR encode error:",H=[];function V(t,e,r){if(t.length-e<r)throw Error(`${M} not enough data for type`)}H[23]=1,H[24]=2,H[25]=3,H[26]=5,H[27]=9;let G=[24,256,65536,4294967296,BigInt("18446744073709551616")];function W(t,e,r){V(t,e,1);let n=t[e];if(!0===r.strict&&n<G[0])throw Error(`${M}
15 integer encoded in more bytes than necessary (strict decode)`);return n}function q(t,e,r){V(t,e,2);let n=t[e]<<8|t[e+1];if(!0===r.strict&&n<G[1])throw Error(`${M} integer encoded in more bytes than necessary (strict decode)`);return n}function J(t,e,r){V(t,e,4);let n=16777216*t[e]+(t[e+1]<<16)+(t[e+2]<<8)+t[e+3];if(!0===r.strict&&n<G[2])throw Error(`${M} integer encoded in more bytes than necessary (strict decode)`);return n}function K(t,e,r){V(t,e,8);let n=16777216*t[e]+(t[e+1]<<16)+(t[e+2]<<8)+t[e+3],i=16777216*t[e+4]+(t[e+5]<<16)+(t[e+6]<<8)+t[e+7],o=(BigInt(n)<<BigInt(32))+BigInt(i);if(!0===r.strict&&o<G[3])throw Error(`${M} integer encoded in more bytes than necessary (strict decode)`);if(o<=Number.MAX_SAFE_INTEGER)return Number(o);if(!0===r.allowBigInt)return o;throw Error(`${M} integers outside of the safe integer range are not supported`)}function X(t,e,r,n){return new _(E.uint,W(t,e+1,n),2)}function Z(t,e,r,n){return new _(E.uint,q(t,e+1,n),3)}function Y(t,e,r,n){return new _(E.uint,J(t,e+1,n),5)}function Q(t,e,r,n){return new _(E.uint,K(t,e+1,n),9)}function tt(t,e){return te(t,0,e.value)}function te(t,e,r){if(r<G[0]){let n=Number(r);t.push([e|n])}else if(r<G[1]){let i=Number(r);t.push([24|e,i])}else if(r<G[2]){let o=Number(r);t.push([25|e,o>>>8,255&o])}else if(r<G[3]){let s=Number(r);t.push([26|e,s>>>24&255,s>>>16&255,s>>>8&255,255&s])}else{let a=BigInt(r);if(a<G[4]){let u=[27|e,0,0,0,0,0,0,0],l=Number(a&BigInt(4294967295)),c=Number(a>>BigInt(32)&BigInt(4294967295));u[8]=255&l,l>>=8,u[7]=255&l,l>>=8,u[6]=255&l,l>>=8,u[5]=255&l,u[4]=255&c,c>>=8,u[3]=255&c,c>>=8,u[2]=255&c,c>>=8,u[1]=255&c,t.push(u)}else throw Error(`${M} encountered BigInt larger than allowable range`)}}function tr(t,e,r,n){return new _(E.negint,-1-W(t,e+1,n),2)}function tn(t,e,r,n){return new _(E.negint,-1-q(t,e+1,n),3)}function ti(t,e,r,n){return new _(E.negint,-1-J(t,e+1,n),5)}tt.encodedSize=function(t){return te.encodedSize(t.value)},te.encodedSize=function(t){return t<G[0]?1:t<G[1]?2:t<G[2]?3:t<G[3]?5:9},tt.compareTokens=function(t,e){return t.value<e.value?-1:t.value>e.value?1:0};let to=BigInt(-1),ts=BigInt(1);function ta(t,e,r,n){let i=K(t,e+1,n);if("bigint"!=typeof i){let o=-1-i;if(o>=Number.MIN_SAFE_INTEGER)return new _(E.negint,o,9)}if(!0!==n.allowBigInt)throw Error(`${M} integers outside of the safe integer range are not supported`);return new _(E.negint,to-BigInt(i),9)}function tu(t,e){let r=e.value,n="bigint"==typeof r?r*to-ts:-1*r-1;te(t,e.type.majorEncoded,n)}function tl(t,e,r,n){V(t,e,r+n);let i=N(t,e+r,e+r+n);return new _(E.bytes,i,r+n)}function tc(t,e,r,n){return tl(t,e,1,r)}function tf(t,e,r,n){return tl(t,e,2,W(t,e+1,n))}function th(t,e,r,n){return tl(t,e,3,q(t,e+1,n))}function td(t,e,r,n){return tl(t,e,5,J(t,e+1,n))}function tp(t,e,r,n){let i=K(t,e+1,n);if("bigint"==typeof i)throw Error(`${M} 64-bit integer bytes lengths not supported`);return tl(t,e,9,i)}function ty(t){return void 0===t.encodedBytes&&(t.encodedBytes=t.type===E.string?T(t.value):t.value),t.encodedBytes}function tg(t,e){let r=ty(e);te(t,e.type.majorEncoded,r.length),t.push(r)}function tb(t,e){return t.length<e.length?-1:t.length>e.length?1:U(t,e)}function tm(t,e,r,n,i){let o=r+n;V(t,e,o);let s=new _(E.string,S(t,e+r,e+o),o);return!0===i.retainStringBytes&&(s.byteValue=N(t,e+r,e+o)),s}function tw(t,e,r,n){return tm(t,e,1,r,n)}function tD(t,e,r,n){return tm(t,e,2,W(t,e+1,n),n)}function tE(t,e,r,n){return tm(t,e,3,q(t,e+1,n),n)}function t_(t,e,r,n){return tm(t,e,5,J(t,e+1,n),n)}function tv(t,e,r,n){let i=K(t,e+1,n);if("bigint"==typeof i)throw Error(`${M} 64-bit integer string lengths not supported`);return tm(t,e,9,i,n)}tu.encodedSize=function(t){let e=t.value,r="bigint"==typeof e?e*to-ts:-1*e-1;return r<G[0]?1:r<G[1]?2:r<G[2]?3:r<G[3]?5:9},tu.compareTokens=function(t,e){return t.value<e.value?1:t.value>e.value?-1:0},tg.encodedSize=function(t){let e=ty(t);return te.encodedSize(e.length)+e.length},tg.compareTokens=function(t,e){return tb(ty(t),ty(e))};let tA=tg;function tk(t,e,r,n){return new _(E.array,n,r)}function tC(t,e,r,n){return tk(t,e,1,r)}function tx(t,e,r,n){return tk(t,e,2,W(t,e+1,n))}function tS(t,e,r,n){return tk(t,e,3,q(t,e+1,n))}function tT(t,e,r,n){return tk(t,e,5,J(t,e+1,n))}function tB(t,e,r,n){let i=K(t,e+1,n);if("bigint"==typeof i)throw Error(`${M} 64-bit integer array lengths not supported`);return tk(t,e,9,i)}function tN(t,e,r,n){if(!1===n.allowIndefinite)throw Error(`${M} indefinite length items not allowed`);return tk(t,e,1,1/0)}function tI(t,e){te(t,E.array.majorEncoded,e.value)}function tz(t,e,r,n){return new _(E.map,n,r)}function tU(t,e,r,n){return tz(t,e,1,r)}function tL(t,e,r,n){return tz(t,e,2,W(t,e+1,n))}function tP(t,e,r,n){return tz(t,e,3,q(t,e+1,n))}function tO(t,e,r,n){return tz(t,e,5,J(t,e+1,n))}function tj(t,e,r,n){let i=K(t,e+1,n);if("bigint"==typeof i)throw Error(`${M} 64-bit integer map lengths not supported`);return tz(t,e,9,i)}function tR(t,e,r,n){if(!1===n.allowIndefinite)throw Error(`${M} indefinite length items not allowed`);return tz(t,e,1,1/0)}function tF(t,e){te(t,E.map.majorEncoded,e.value)}function tM(t,e,r,n){return new _(E.tag,r,1)}function t$(t,e,r,n){return new _(E.tag,W(t,e+1,n),2)}function tH(t,e,r,n){return new _(E.tag,q(t,e+1,n),3)}function tV(t,e,r,n){return new _(E.tag,J(t,e+1,n),5)}function tG(t,e,r,n){return new _(E.tag,K(t,e+1,n),9)}function tW(t,e){te(t,E.tag.majorEncoded,e.value)}tI.compareTokens=tt.compareTokens,tI.encodedSize=function(t){return te.encodedSize(t.value)},tF.compareTokens=tt.compareTokens,tF.encodedSize=function(t){return te.encodedSize(t.value)},tW.compareTokens=tt.compareTokens,tW.encodedSize=function(t){return te.encodedSize(t.value)};let tq=20,tJ=21,tK=22,tX=23;function tZ(t,e,r,n){if(!1===n.allowUndefined)throw Error(`${M} undefined values are not supported`);return!0===n.coerceUndefinedToNull?new _(E.null,null,1):new _(E.undefined,void 0,1)}function tY(t,e,r,n){if(!1===n.allowIndefinite)throw Error(`${M} indefinite length items not allowed`);return new _(E.break,void 0,1)}function tQ(t,e,r){if(r){if(!1===r.allowNaN&&Number.isNaN(t))throw Error(`${M} NaN values are not supported`);if(!1===r.allowInfinity&&(t===1/0||t===-1/0))throw Error(`${M} Infinity values are not supported`)}return new _(E.float,t,e)}function t1(t,e,r,n){return tQ(t7(t,e+1),3,n)}function t0(t,e,r,n){return tQ(et(t,e+1),5,n)}function t2(t,e,r,n){return tQ(er(t,e+1),9,n)}function t3(t,e,r){let n=e.value;if(!1===n)t.push([E.float.majorEncoded|tq]);else if(!0===n)t.push([E.float.majorEncoded|tJ]);else if(null===n)t.push([E.float.majorEncoded|tK]);else if(void 0===n)t.push([E.float.majorEncoded|tX]);else{let i;let o=!1;r&&!0===r.float64||(t8(n),n===(i=t7(t4,1))||Number.isNaN(n)?(t4[0]=249,t.push(t4.slice(0,3)),o=!0):(t9(n),n!==(i=et(t4,1))||(t4[0]=250,t.push(t4.slice(0,5)),o=!0))),o||(ee(n),i=er(t4,1),t4[0]=251,t.push(t4.slice(0,9)))}}t3.encodedSize=function(t,e){let r=t.value;if(!1===r||!0===r||null==r)return 1;if(!e||!0!==e.float64){t8(r);let n=t7(t4,1);if(r===n||Number.isNaN(r))return 3;if(t9(r),r===(n=et(t4,1)))return 5}return 9};let t6=new ArrayBuffer(9),t5=new DataView(t6,1),t4=new Uint8Array(t6,0);function t8(t){if(t===1/0)t5.setUint16(0,31744,!1);else if(t===-1/0)t5.setUint16(0,64512,!1);else if(Number.isNaN(t))t5.setUint16(0,32256,!1);else{t5.setFloat32(0,t);let e=t5.getUint32(0),r=(2139095040&e)>>23,n=8388607&e;if(255===r)t5.setUint16(0,31744,!1);else if(0===r)t5.setUint16(0,(2147483648&t)>>16|n>>13,!1);else{let i=r-127;i<-24?t5.setUint16(0,0):i<-14?t5.setUint16(0,(2147483648&e)>>16|1<<24+i,!1):t5.setUint16(0,(2147483648&e)>>16|i+15<<10|n>>13,!1)}}}function t7(t,e){let r;if(t.length-e<2)throw Error(`${M} not enough data for float16`);let n=(t[e]<<8)+t[e+1];if(31744===n)return 1/0;if(64512===n)return-1/0;if(32256===n)return NaN;let i=n>>10&31,o=1023&n;return r=0===i?5960464477539063e-23*o:31!==i?(o+1024)*2**(i-25):0===o?1/0:NaN,32768&n?-r:r}function t9(t){t5.setFloat32(0,t,!1)}function et(t,e){if(t.length-e<4)throw Error(`${M} not enough data for float32`);let r=(t.byteOffset||0)+e;return new DataView(t.buffer,r,4).getFloat32(0,!1)}function ee(t){t5.setFloat64(0,t,!1)}function er(t,e){if(t.length-e<8)throw Error(`${M} not enough data for float64`);let r=(t.byteOffset||0)+e;return new DataView(t.buffer,r,8).getFloat64(0,!1)}function en(t,e,r){throw Error(`${M}
15 encountered invalid minor (${r}) for major ${t[e]>>>5}`)}function ei(t){return()=>{throw Error(`${M} ${t}`)}}t3.compareTokens=tt.compareTokens;let eo=[];for(let es=0;es<=23;es++)eo[es]=en;eo[24]=X,eo[25]=Z,eo[26]=Y,eo[27]=Q,eo[28]=en,eo[29]=en,eo[30]=en,eo[31]=en;for(let ea=32;ea<=55;ea++)eo[ea]=en;eo[56]=tr,eo[57]=tn,eo[58]=ti,eo[59]=ta,eo[60]=en,eo[61]=en,eo[62]=en,eo[63]=en;for(let eu=64;eu<=87;eu++)eo[eu]=tc;eo[88]=tf,eo[89]=th,eo[90]=td,eo[91]=tp,eo[92]=en,eo[93]=en,eo[94]=en,eo[95]=ei("indefinite length bytes/strings are not supported");for(let el=96;el<=119;el++)eo[el]=tw;eo[120]=tD,eo[121]=tE,eo[122]=t_,eo[123]=tv,eo[124]=en,eo[125]=en,eo[126]=en,eo[127]=ei("indefinite length bytes/strings are not supported");for(let ec=128;ec<=151;ec++)eo[ec]=tC;eo[152]=tx,eo[153]=tS,eo[154]=tT,eo[155]=tB,eo[156]=en,eo[157]=en,eo[158]=en,eo[159]=tN;for(let ef=160;ef<=183;ef++)eo[ef]=tU;eo[184]=tL,eo[185]=tP,eo[186]=tO,eo[187]=tj,eo[188]=en,eo[189]=en,eo[190]=en,eo[191]=tR;for(let eh=192;eh<=215;eh++)eo[eh]=tM;eo[216]=t$,eo[217]=tH,eo[218]=tV,eo[219]=tG,eo[220]=en,eo[221]=en,eo[222]=en,eo[223]=en;for(let ed=224;ed<=243;ed++)eo[ed]=ei("simple values are not supported");eo[244]=en,eo[245]=en,eo[246]=en,eo[247]=tZ,eo[248]=ei("simple values are not supported"),eo[249]=t1,eo[250]=t0,eo[251]=t2,eo[252]=en,eo[253]=en,eo[254]=en,eo[255]=tY;let ep=[];for(let ey=0;ey<24;ey++)ep[ey]=new _(E.uint,ey,1);for(let eg=-1;eg>=-24;eg--)ep[31-eg]=new _(E.negint,eg,1);function eb(t){switch(t.type){case E.false:return B([244]);case E.true:return B([245]);case E.null:return B([246]);case E.bytes:if(!t.value.length)return B([64]);return;case E.string:if(""===t.value)return B([96]);return;case E.array:if(0===t.value)return B([128]);return;case E.map:if(0===t.value)return B([160]);return;case E.uint:if(t.value<24)return B([Number(t.value)]);return;case E.negint:if(t.value>=-24)return B([31-Number(t.value)])}}ep[64]=new _(E.bytes,new Uint8Array(0),1),ep[96]=new _(E.string,"",1),ep[128]=new _(E.array,0,1),ep[160]=new _(E.map,0,1),ep[244]=new _(E.false,!1,1),ep[245]=new _(E.true,!0,1),ep[246]=new _(E.null,null,1);let em={float64:!1,mapSorter:eS,quickEncodeToken:eb};function ew(){let t=[];return t[E.uint.major]=tt,t[E.negint.major]=tu,t[E.bytes.major]=tg,t[E.string.major]=tA,t[E.array.major]=tI,t[E.map.major]=tF,t[E.tag.major]=tW,t[E.float.major]=t3,t}let eD=ew(),eE=new F;class e_{constructor(t,e){this.obj=t,this.parent=e}includes(t){let e=this;do if(e.obj===t)return!0;while(e=e.parent);return!1}static createCheck(t,e){if(t&&t.includes(e))throw Error(`${$} object contains circular references`);return new e_(e,t)}}let ev={null:new _(E.null,null),undefined:new _(E.undefined,void 0),true:new _(E.true,!0),false:new _(E.false,!1),emptyArray:new _(E.array,0),emptyMap:new _(E.map,0)},eA={number:(t,e,r,n)=>Number.isInteger(t)&&Number.isSafeInteger(t)?t>=0?new _(E.uint,t):new _(E.negint,t):new _(E.float,t),bigint:(t,e,r,n)=>t>=BigInt(0)?new _(E.uint,t):new _(E.negint,t),Uint8Array:(t,e,r,n)=>new _(E.bytes,t),string:(t,e,r,n)=>new _(E.string,t),boolean:(t,e,r,n)=>t?ev.true:ev.false,null:(t,e,r,n)=>ev.null,undefined:(t,e,r,n)=>ev.undefined,ArrayBuffer:(t,e,r,n)=>new _(E.bytes,new Uint8Array(t)),DataView:(t,e,r,n)=>new _(E.bytes,new Uint8Array(t.buffer,t.byteOffset,t.byteLength)),Array(t,e,r,n){if(!t.length)return!0===r.addBreakTokens?[ev.emptyArray,new _(E.break)]:ev.emptyArray;n=e_.createCheck(n,t);let i=[],o=0;for(let s of t)i[o++]=eC(s,r,n);return r.addBreakTokens?[new _(E.array,t.length),i,new _(E.break)]:[new _(E.array,t.length),i]},Object(t,e,r,n){let i="Object"!==e,o=i?t.keys():Object.keys(t),s=i?t.size:o.length;if(!s)return!0===r.addBreakTokens?[ev.emptyMap,new _(E.break)]:ev.emptyMap;n=e_.createCheck(n,t);let a=[],u=0;for(let l of o)a[u++]=[eC(l,r,n),eC(i?t.get(l):t[l],r,n)];return(ex(a,r),r.addBreakTokens)?[new _(E.map,s),a,new _(E.break)]:[new _(E.map,s),a]}};for(let ek of(eA.Map=eA.Object,eA.Buffer=eA.Uint8Array,"Uint8Clamped Uint16 Uint32 Int8 Int16 Int32 BigUint64 BigInt64 Float32 Float64".split(" ")))eA[`${ek}Array`]=eA.DataView;function eC(t,e={},r){let n=m(t),i=e&&e.typeEncoders&&e.typeEncoders[n]||eA[n];if("function"==typeof i){let o=i(t,n,e,r);if(null!=o)return o}let s=eA[n];if(!s)throw Error(`${$} unsupported type: ${n}`);return s(t,n,e,r)}function ex(t,e){e.mapSorter&&t.sort(e.mapSorter)}function eS(t,e){let r=Array.isArray(t[0])?t[0][0]:t[0],n=Array.isArray(e[0])?e[0][0]:e[0];if(r.type!==n.type)return r.type.compare(n.type);let i=r.type.major,o=eD[i].compareTokens(r,n);return 0===o&&console.warn("WARNING: complex key types used, CBOR key sorting guarantees are gone"),o}function eT(t,e,r,n){if(Array.isArray(e))for(let i of e)eT(t,i,r,n);else r[e.type.major](t,e,n)}function eB(t,e,r){let n=eC(t,r);if(!Array.isArray(n)&&r.quickEncodeToken){let i=r.quickEncodeToken(n);if(i)return i;let o=e[n.type.major];if(o.encodedSize){let s=o.encodedSize(n,r),a=new F(s);if(o(a,n,r),1!==a.chunks.length)throw Error(`Unexpected error: pre-calculated length for ${n} was wrong`);return x(a.chunks[0])}}return eE.reset(),eT(eE,n,e,r),eE.toBytes(!0)}function eN(t,e){return eB(t,eD,e=Object.assign({},em,e))}let eI={strict:!1,allowIndefinite:!0,allowUndefined:!0,allowBigInt:!0};class ez{constructor(t,e={}){this.pos=0,this.data=t,this.options=e}done(){return this.pos>=this.data.length}
15next(){let t=this.data[this.pos],e=ep[t];if(void 0===e){let r=eo[t];if(!r)throw Error(`${M} no decoder for major type ${t>>>5} (byte 0x${t.toString(16).padStart(2,"0")})`);let n=31&t;e=r(this.data,this.pos,n,this.options)}return this.pos+=e.encodedLength,e}}let eU=Symbol.for("DONE"),eL=Symbol.for("BREAK");function eP(t,e,r){let n=[];for(let i=0;i<t.value;i++){let o=ej(e,r);if(o===eL){if(t.value===1/0)break;throw Error(`${M} got unexpected break to lengthed array`)}if(o===eU)throw Error(`${M} found array but not enough entries (got ${i}, expected ${t.value})`);n[i]=o}return n}function eO(t,e,r){let n=!0===r.useMaps,i=n?void 0:{},o=n?new Map:void 0;for(let s=0;s<t.value;s++){let a=ej(e,r);if(a===eL){if(t.value===1/0)break;throw Error(`${M} got unexpected break to lengthed map`)}if(a===eU)throw Error(`${M} found map but not enough entries (got ${s} [no key], expected ${t.value})`);if(!0!==n&&"string"!=typeof a)throw Error(`${M} non-string keys not supported (got ${typeof a})`);let u=ej(e,r);if(u===eU)throw Error(`${M} found map but not enough entries (got ${s} [no value], expected ${t.value})`);n?o.set(a,u):i[a]=u}return n?o:i}function ej(t,e){if(t.done())return eU;let r=t.next();if(r.type===E.break)return eL;if(r.type.terminal)return r.value;if(r.type===E.array)return eP(r,t,e);if(r.type===E.map)return eO(r,t,e);if(r.type===E.tag){if(e.tags&&"function"==typeof e.tags[r.value]){let n=ej(t,e);return e.tags[r.value](n)}throw Error(`${M} tag not supported (${r.value})`)}throw Error("unsupported")}function eR(t,e){if(!(t instanceof Uint8Array))throw Error(`${M} data to decode must be a Uint8Array`);e=Object.assign({},eI,e);let r=e.tokenizer||new ez(t,e),n=ej(r,e);if(n===eU)throw Error(`${M} did not find any content to decode`);if(n===eL)throw Error(`${M} got unexpected break`);if(!r.done())throw Error(`${M} too many terminals, data makes no sense`);return n}let eF=42;function eM(t){if(t.asCID!==t)return null;let e=p.k.asCID(t);if(!e)return null;let r=new Uint8Array(e.bytes.byteLength+1);return r.set(e.bytes,1),[new _(E.tag,eF),new _(E.bytes,r)]}function e$(){throw Error("`undefined` is not supported by the IPLD Data Model and cannot be encoded")}function eH(t){if(Number.isNaN(t))throw Error("`NaN` is not supported by the IPLD Data Model and cannot be encoded");if(t===1/0||t===-1/0)throw Error("`Infinity` and `-Infinity` is not supported by the IPLD Data Model and cannot be encoded");return null}let eV={float64:!0,typeEncoders:{Object:eM,undefined:e$,number:eH}};function eG(t){if(0!==t[0])throw Error("Invalid CID for CBOR tag 42; expected leading 0x00");return p.k.decode(t.subarray(1))}let eW={allowIndefinite:!1,coerceUndefinedToNull:!0,allowNaN:!1,allowInfinity:!1,allowBigInt:!0,strict:!0,useMaps:!1,tags:[]};eW.tags[eF]=eG;let eq=t=>eN(t,eV),eJ=t=>eR(t,eW),eK={SHA2_256:18,LENGTH:32,DAG_PB:112};async function eX(t){let e=await t.upTo(8),r=d.decode(e);return t.seek(d.decode.bytes),r}async function eZ(t){let e=await eX(t);if(0===e)throw Error("Invalid CAR header (zero length)");let r=await t.exactly(e);t.seek(e);let n=eJ(r);if(null==n||Array.isArray(n)||"object"!=typeof n)throw Error("Invalid CAR header format");if(1!==n.version){if("string"==typeof n.version)throw Error(`Invalid CAR version: "${n.version}"`);throw Error(`Invalid CAR version: ${n.version}`)}if(!Array.isArray(n.roots)||Object.keys(n).filter(t=>"roots"!==t&&"version"!==t).length)throw Error("Invalid CAR header format");return n}async function eY(t){let e=await t.upTo(8);d.decode(e);let r=d.decode.bytes,n=d.decode(e.subarray(d.decode.bytes)),i=d.decode.bytes,o=r+i+n,s=await t.exactly(o);return t.seek(o),s}async function eQ(t){let e=await t.exactly(2);if(e[0]===eK.SHA2_256&&e[1]===eK.LENGTH){let r=await t.exactly(34);t.seek(34);let n=y.Jx(r);return p.k.create(0,eK.DAG_PB,n)}let i=await eX(t);if(1!==i)throw Error(`Unexpected CID version (${i})`);let o=await eX(t),s=await eY(t),a=y.Jx(s);return p.k.create(i,o,a)}async function e1(t){let e=t.pos,r=await eX(t);if(0===r)throw Error("Invalid CAR section (zero length)");r+=t.pos-e;let n=await eQ(t),i=r-(t.pos-e);return{cid:n,length:r,blockLength:i}}async function e0(t){let{cid:e,blockLength:r}=await e1(t),n=await t.exactly(r);return t.seek(r),{bytes:n,cid:e}}async function e2(t){let e=t.pos,{cid:r,length:n,blockLength:i}=await e1(t),o={cid:r,length:n,blockLength:i,offset:e,blockOffset:t.pos};return t.seek(o.blockLength),o}function e3(t){let e=eZ(t);return{header:()=>e,async *blocks(){for(await e;(await t.upTo(8)).length>0;)yield await e0(t)},async *blocksIndex(){for(await e;(await t.upTo(8)).length>0;)yield await e2(t)}}}function e6(t){let e=0;return{upTo:async r=>
15t.subarray(e,e+Math.min(r,t.length-e)),async exactly(r){if(r>t.length-e)throw Error("Unexpected end of data");return t.subarray(e,e+r)},seek(t){e+=t},get pos(){return e}}}function e5(t){let e=0,r=0,n=0,i=new Uint8Array(0),o=async e=>{r=i.length-n;let o=[i.subarray(n)];for(;r<e;){let s=await t();if(null==s)break;r<0?s.length>r&&o.push(s.subarray(-r)):o.push(s),r+=s.length}i=new Uint8Array(o.reduce((t,e)=>t+e.length,0));let a=0;for(let u of o)i.set(u,a),a+=u.length;n=0};return{upTo:async t=>(i.length-n<t&&await o(t),i.subarray(n,n+Math.min(i.length-n,t))),async exactly(t){if(i.length-n<t&&await o(t),i.length-n<t)throw Error("Unexpected end of data");return i.subarray(n,n+t)},seek(t){e+=t,n+=t},get pos(){return e}}}function e4(t){let e=t[Symbol.asyncIterator]();return e5(async function(){let t=await e.next();return t.done?null:t.value})}class e8{constructor(t,e,r){this._version=t,this._roots=e,this._blocks=r,this._keys=r.map(t=>t.cid.toString())}get version(){return this._version}async getRoots(){return this._roots}async has(t){return this._keys.indexOf(t.toString())>-1}async get(t){let e=this._keys.indexOf(t.toString());return e>-1?this._blocks[e]:void 0}async *blocks(){for(let t of this._blocks)yield t}async *cids(){for(let t of this._blocks)yield t.cid}static async fromBytes(t){if(!(t instanceof Uint8Array))throw TypeError("fromBytes() requires a Uint8Array");return e7(e6(t))}static async fromIterable(t){if(!t||"function"!=typeof t[Symbol.asyncIterator])throw TypeError("fromIterable() requires an async iterable");return e7(e4(t))}}async function e7(t){let e=e3(t),{version:r,roots:n}=await e.header(),i=[];for await(let o of e.blocks())i.push(o);return new e8(r,n,i)}class e9{constructor(t,e,r){this._version=t,this._roots=e,this._iterable=r,this._decoded=!1}get version(){return this._version}async getRoots(){return this._roots}}class rt extends e9{[Symbol.asyncIterator](){if(this._decoded)throw Error("Cannot decode more than once");if(!this._iterable)throw Error("Block iterable not found");return this._decoded=!0,this._iterable[Symbol.asyncIterator]()}static async fromBytes(t){let{version:e,roots:r,iterator:n}=await rr(t);return new rt(e,r,n)}static async fromIterable(t){let{version:e,roots:r,iterator:n}=await rn(t);return new rt(e,r,n)}}class re extends null{[Symbol.asyncIterator](){if(this._decoded)throw Error("Cannot decode more than once");if(!this._iterable)throw Error("Block iterable not found");this._decoded=!0;let t=this._iterable[Symbol.asyncIterator]();return{async next(){let e=await t.next();return e.done?e:{done:!1,value:e.value.cid}}}}static async fromBytes(t){let{version:e,roots:r,iterator:n}=await rr(t);return new re(e,r,n)}static async fromIterable(t){let{version:e,roots:r,iterator:n}=await rn(t);return new re(e,r,n)}}async function rr(t){if(!(t instanceof Uint8Array))throw TypeError("fromBytes() requires a Uint8Array");return ri(e6(t))}async function rn(t){if(!t||"function"!=typeof t[Symbol.asyncIterator])throw TypeError("fromIterable() requires an async iterable");return ri(e4(t))}async function ri(t){let e=e3(t),{version:r,roots:n}=await e.header();return{version:r,roots:n,iterator:e.blocks()}}function ro(t){let e=eq({version:1,roots:t}),r=d.encode(e.length),n=new Uint8Array(r.length+e.length);return n.set(r,0),n.set(e,r.length),n}function rs(t){return{async setRoots(e){let r=ro(e);await t.write(r)},async writeBlock(e){let{cid:r,bytes:n}=e;await t.write(new Uint8Array(d.encode(r.bytes.length+n.length))),await t.write(r.bytes),n.length&&await t.write(n)},close:async()=>t.end()}}function ra(){}function ru(){let t=[],e=null,r=ra,n=!1,i=null,o=ra,s=()=>(e||(e=new Promise(t=>{r=()=>{e=null,r=ra,t()}})),e),a={write(e){t.push(e);let r=s();return o(),r},async end(){n=!0;let t=s();return o(),t}},u={async next(){let e=t.shift();return e?(0===t.length&&r(),{done:!1,value:e}):n?(r(),{done:!0,value:void 0}):(i||(i=new Promise(t=>{o=()=>(i=null,o=ra,t(u.next()))})),i)}};return{writer:a,iterator:u}}class rl{constructor(t,e){this._encoder=e,this._mutex=e.setRoots(t),this._ended=!1}async put(t){if(!(t.bytes instanceof Uint8Array)||!t.cid)throw TypeError("Can only write {cid, bytes} objects");if(this._ended)throw Error("Already closed");let e=p.k.asCID(t.cid);if(!e)throw TypeError("Can only write {cid, bytes} objects");return this._mutex=this._mutex.then(()=>this._encoder.writeBlock({cid:e,bytes:t.bytes})),this._mutex}async close(){if(this._ended)throw Error("Already closed");return await this._mutex,this._ended=!0,this._encoder.close()}static create(t){t=rh(t);let{encoder:e,iterator:r}=rf(),n=new rl(t,e),i=new rc(r);return{writer:n,out:i}}static createAppender(){let{encoder:t,iterator:e}=rf();t.setRoots=()=>Promise.resolve();let r=new rl([],t),n=new rc(e);return{writer:r,out:n}}static async updateRootsInBytes(t,e){let r=e6(t);await eZ(r);let n=ro(e);if(r.pos!==n.length)throw Error(`updateRoots() can only overwrite a header of the same length (old header is ${r.pos} bytes, new header is ${n.length} bytes)`);return t.set(n,0),t}}class rc{constructor(t){this._iterator=t}[Symbol.asyncIterator](){if(this._iterating)throw Error("Multiple iterator not supported");return this._iterating=!0,this._iterator}}function rf(){let t=ru(),{writer:e,iterator:r}=t,n=rs(e);return{encoder:n,iterator:r}}function rh(t){if(void 0===t)return[];if(!Array.isArray(t)){let e=p.k.asCID(t);if(!e)throw TypeError("roots must be a single CID or an array of CIDs");return[e]}let r=[];
15for(let n of t){let i=p.k.asCID(n);if(!i)throw TypeError("roots must be a single CID or an array of CIDs");r.push(i)}return r}var rd=r(84810),rp=r(70942),ry=r(56155),rg=r(7225),rb=r(87232),rm=r(40469);function rw(t){let e=[,,,,];for(let r=0;r<4;r++)e[r]=255&t,t>>=8;return new Uint8Array(e)}(0,rg.D)({name:"murmur3-32",code:35,encode:t=>rw(rm.x86.hash32(t))});let rD=(0,rg.D)({name:"murmur3-128",code:34,encode:t=>rb.aI.fromHex(rm.x64.hash128(t))});async function rE(t){return(await rD.encode(t)).slice(0,8).reverse()}let r_={chunker:"fixed",strategy:"balanced",rawLeaves:!1,onlyHash:!1,reduceSingleLeafToSelf:!0,hasher:ry.sha256,leafType:"file",cidVersion:0,progress:()=>()=>{},shardSplitThreshold:1e3,fileImportConcurrency:50,blockWriteConcurrency:10,minChunkSize:262144,maxChunkSize:262144,avgChunkSize:262144,window:16,polynomial:0x3df305dfb2a804,maxChildrenPerNode:174,layerRepeat:4,wrapWithDirectory:!1,recursive:!1,hidden:!1,timeout:void 0,hamtHashFn:rE,hamtHashCode:34,hamtBucketBits:8};var rv=(t={})=>{let e=rp.bind({ignoreUndefined:!0});return e(r_,t)},rA=r(32114),rk=r(62100);let rC=rk.Reader,rx=rk.Writer,rS=rk.util,rT=rk.roots["ipfs-unixfs"]||(rk.roots["ipfs-unixfs"]={}),rB=rT.Data=(()=>{function t(t){if(this.blocksizes=[],t)for(var e=Object.keys(t),r=0;r<e.length;++r)null!=t[e[r]]&&(this[e[r]]=t[e[r]])}return t.prototype.Type=0,t.prototype.Data=rS.newBuffer([]),t.prototype.filesize=rS.Long?rS.Long.fromBits(0,0,!0):0,t.prototype.blocksizes=rS.emptyArray,t.prototype.hashType=rS.Long?rS.Long.fromBits(0,0,!0):0,t.prototype.fanout=rS.Long?rS.Long.fromBits(0,0,!0):0,t.prototype.mode=0,t.prototype.mtime=null,t.encode=function(t,e){if(e||(e=rx.create()),e.uint32(8).int32(t.Type),null!=t.Data&&Object.hasOwnProperty.call(t,"Data")&&e.uint32(18).bytes(t.Data),null!=t.filesize&&Object.hasOwnProperty.call(t,"filesize")&&e.uint32(24).uint64(t.filesize),null!=t.blocksizes&&t.blocksizes.length)for(var r=0;r<t.blocksizes.length;++r)e.uint32(32).uint64(t.blocksizes[r]);return null!=t.hashType&&Object.hasOwnProperty.call(t,"hashType")&&e.uint32(40).uint64(t.hashType),null!=t.fanout&&Object.hasOwnProperty.call(t,"fanout")&&e.uint32(48).uint64(t.fanout),null!=t.mode&&Object.hasOwnProperty.call(t,"mode")&&e.uint32(56).uint32(t.mode),null!=t.mtime&&Object.hasOwnProperty.call(t,"mtime")&&rT.UnixTime.encode(t.mtime,e.uint32(66).fork()).ldelim(),e},t.decode=function(t,e){t instanceof rC||(t=rC.create(t));for(var r=void 0===e?t.len:t.pos+e,n=new rT.Data;t.pos<r;){var i=t.uint32();switch(i>>>3){case 1:n.Type=t.int32();break;case 2:n.Data=t.bytes();break;case 3:n.filesize=t.uint64();break;case 4:if(n.blocksizes&&n.blocksizes.length||(n.blocksizes=[]),(7&i)==2)for(var o=t.uint32()+t.pos;t.pos<o;)n.blocksizes.push(t.uint64());else n.blocksizes.push(t.uint64());break;case 5:n.hashType=t.uint64();break;case 6:n.fanout=t.uint64();break;case 7:n.mode=t.uint32();break;case 8:n.mtime=rT.UnixTime.decode(t,t.uint32());break;default:t.skipType(7&i)}}if(!n.hasOwnProperty("Type"))throw rS.ProtocolError("missing required 'Type'",{instance:n});return n},t.fromObject=function(t){if(t instanceof rT.Data)return t;var e=new rT.Data;switch(t.Type){case"Raw":case 0:e.Type=0;break;case"Directory":case 1:e.Type=1;break;case"File":case 2:e.Type=2;break;case"Metadata":case 3:e.Type=3;break;case"Symlink":case 4:e.Type=4;break;case"HAMTShard":case 5:e.Type=5}if(null!=t.Data&&("string"==typeof t.Data?rS.base64.decode(t.Data,e.Data=rS.newBuffer(rS.base64.length(t.Data)),0):t.Data.length&&(e.Data=t.Data)),null!=t.filesize&&(rS.Long?(e.filesize=rS.Long.fromValue(t.filesize)).unsigned=!0:"string"==typeof t.filesize?e.filesize=parseInt(t.filesize,10):"number"==typeof t.filesize?e.filesize=t.filesize:"object"==typeof t.filesize&&(e.filesize=new rS.LongBits(t.filesize.low>>>0,t.filesize.high>>>0).toNumber(!0))),t.blocksizes){if(!Array.isArray(t.blocksizes))throw TypeError(".Data.blocksizes: array expected");e.blocksizes=[];for(var r=0;r<t.blocksizes.length;++r)rS.Long?(e.blocksizes[r]=rS.Long.fromValue(t.blocksizes[r])).unsigned=!0:"string"==typeof t.blocksizes[r]?e.blocksizes[r]=parseInt(t.blocksizes[r],10):"number"==typeof t.blocksizes[r]?e.blocksizes[r]=t.blocksizes[r]:"object"==typeof t.blocksizes[r]&&(e.blocksizes[r]=new rS.LongBits(t.blocksizes[r].low>>>0,t.blocksizes[r].high>>>0).toNumber(!0))}if(null!=t.hashType&&(rS.Long?(e.hashType=rS.Long.fromValue(t.hashType)).unsigned=!0:"string"==typeof t.hashType?e.hashType=parseInt(t.hashType,10):"number"==typeof t.hashType?e.hashType=t.hashType:"object"==typeof t.hashType&&(e.hashType=new rS.LongBits(t.hashType.low>>>0,t.hashType.high>>>0).toNumber(!0))),null!=t.fanout&&(rS.Long?(e.fanout=rS.Long.fromValue(t.fanout)).unsigned=!0:"string"==typeof t.fanout?e.fanout=parseInt(t.fanout,10):"number"==typeof t.fanout?e.fanout=t.fanout:"object"==typeof t.fanout&&(e.fanout=new rS.LongBits(t.fanout.low>>>0,t.fanout.high>>>0).toNumber(!0))),null!=t.mode&&(e.mode=t.mode>>>0),null!=t.mtime){if("object"!=typeof t.mtime)throw TypeError(".Data.mtime: object expected");e.mtime=rT.UnixTime.fromObject(t.mtime)}return e},t.toObject=function(t,e){e||(e={});var r={};if((e.arrays||e.defaults)&&(r.blocksizes=[]),e.defaults){if(r.Type=e.enums===String?"Raw":0,e.bytes===String?r.Data="":(r.Data=[],e.bytes!==Array&&(r.Data=rS.newBuffer(r.Data))),rS.Long){var n=new rS.Long(0,0,!0);r.filesize=e.longs===String?n.toString():e.longs===Number?n.toNumber():n}
15else r.filesize=e.longs===String?"0":0;if(rS.Long){var n=new rS.Long(0,0,!0);r.hashType=e.longs===String?n.toString():e.longs===Number?n.toNumber():n}else r.hashType=e.longs===String?"0":0;if(rS.Long){var n=new rS.Long(0,0,!0);r.fanout=e.longs===String?n.toString():e.longs===Number?n.toNumber():n}else r.fanout=e.longs===String?"0":0;r.mode=0,r.mtime=null}if(null!=t.Type&&t.hasOwnProperty("Type")&&(r.Type=e.enums===String?rT.Data.DataType[t.Type]:t.Type),null!=t.Data&&t.hasOwnProperty("Data")&&(r.Data=e.bytes===String?rS.base64.encode(t.Data,0,t.Data.length):e.bytes===Array?Array.prototype.slice.call(t.Data):t.Data),null!=t.filesize&&t.hasOwnProperty("filesize")&&("number"==typeof t.filesize?r.filesize=e.longs===String?String(t.filesize):t.filesize:r.filesize=e.longs===String?rS.Long.prototype.toString.call(t.filesize):e.longs===Number?new rS.LongBits(t.filesize.low>>>0,t.filesize.high>>>0).toNumber(!0):t.filesize),t.blocksizes&&t.blocksizes.length){r.blocksizes=[];for(var i=0;i<t.blocksizes.length;++i)"number"==typeof t.blocksizes[i]?r.blocksizes[i]=e.longs===String?String(t.blocksizes[i]):t.blocksizes[i]:r.blocksizes[i]=e.longs===String?rS.Long.prototype.toString.call(t.blocksizes[i]):e.longs===Number?new rS.LongBits(t.blocksizes[i].low>>>0,t.blocksizes[i].high>>>0).toNumber(!0):t.blocksizes[i]}return null!=t.hashType&&t.hasOwnProperty("hashType")&&("number"==typeof t.hashType?r.hashType=e.longs===String?String(t.hashType):t.hashType:r.hashType=e.longs===String?rS.Long.prototype.toString.call(t.hashType):e.longs===Number?new rS.LongBits(t.hashType.low>>>0,t.hashType.high>>>0).toNumber(!0):t.hashType),null!=t.fanout&&t.hasOwnProperty("fanout")&&("number"==typeof t.fanout?r.fanout=e.longs===String?String(t.fanout):t.fanout:r.fanout=e.longs===String?rS.Long.prototype.toString.call(t.fanout):e.longs===Number?new rS.LongBits(t.fanout.low>>>0,t.fanout.high>>>0).toNumber(!0):t.fanout),null!=t.mode&&t.hasOwnProperty("mode")&&(r.mode=t.mode),null!=t.mtime&&t.hasOwnProperty("mtime")&&(r.mtime=rT.UnixTime.toObject(t.mtime,e)),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,rk.util.toJSONOptions)},t.DataType=function(){let t={},e=Object.create(t);return e[t[0]="Raw"]=0,e[t[1]="Directory"]=1,e[t[2]="File"]=2,e[t[3]="Metadata"]=3,e[t[4]="Symlink"]=4,e[t[5]="HAMTShard"]=5,e}(),t})();rT.UnixTime=(()=>{function t(t){if(t)for(var e=Object.keys(t),r=0;r<e.length;++r)null!=t[e[r]]&&(this[e[r]]=t[e[r]])}return t.prototype.Seconds=rS.Long?rS.Long.fromBits(0,0,!1):0,t.prototype.FractionalNanoseconds=0,t.encode=function(t,e){return e||(e=rx.create()),e.uint32(8).int64(t.Seconds),null!=t.FractionalNanoseconds&&Object.hasOwnProperty.call(t,"FractionalNanoseconds")&&e.uint32(21).fixed32(t.FractionalNanoseconds),e},t.decode=function(t,e){t instanceof rC||(t=rC.create(t));for(var r=void 0===e?t.len:t.pos+e,n=new rT.UnixTime;t.pos<r;){var i=t.uint32();switch(i>>>3){case 1:n.Seconds=t.int64();break;case 2:n.FractionalNanoseconds=t.fixed32();break;default:t.skipType(7&i)}}if(!n.hasOwnProperty("Seconds"))throw rS.ProtocolError("missing required 'Seconds'",{instance:n});return n},t.fromObject=function(t){if(t instanceof rT.UnixTime)return t;var e=new rT.UnixTime;return null!=t.Seconds&&(rS.Long?(e.Seconds=rS.Long.fromValue(t.Seconds)).unsigned=!1:"string"==typeof t.Seconds?e.Seconds=parseInt(t.Seconds,10):"number"==typeof t.Seconds?e.Seconds=t.Seconds:"object"==typeof t.Seconds&&(e.Seconds=new rS.LongBits(t.Seconds.low>>>0,t.Seconds.high>>>0).toNumber())),null!=t.FractionalNanoseconds&&(e.FractionalNanoseconds=t.FractionalNanoseconds>>>0),e},t.toObject=function(t,e){e||(e={});var r={};if(e.defaults){if(rS.Long){var n=new rS.Long(0,0,!1);r.Seconds=e.longs===String?n.toString():e.longs===Number?n.toNumber():n}else r.Seconds=e.longs===String?"0":0;r.FractionalNanoseconds=0}return null!=t.Seconds&&t.hasOwnProperty("Seconds")&&("number"==typeof t.Seconds?r.Seconds=e.longs===String?String(t.Seconds):t.Seconds:r.Seconds=e.longs===String?rS.Long.prototype.toString.call(t.Seconds):e.longs===Number?new rS.LongBits(t.Seconds.low>>>0,t.Seconds.high>>>0).toNumber():t.Seconds),null!=t.FractionalNanoseconds&&t.hasOwnProperty("FractionalNanoseconds")&&(r.FractionalNanoseconds=t.FractionalNanoseconds),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,rk.util.toJSONOptions)},t})(),rT.Metadata=(()=>{function t(t){if(t)for(var e=Object.keys(t),r=0;r<e.length;++r)null!=t[e[r]]&&(this[e[r]]=t[e[r]])}return t.prototype.MimeType="",t.encode=function(t,e){return e||(e=rx.create()),null!=t.MimeType&&Object.hasOwnProperty.call(t,"MimeType")&&e.uint32(10).string(t.MimeType),e},t.decode=function(t,e){t instanceof rC||(t=rC.create(t));for(var r=void 0===e?t.len:t.pos+e,n=new rT.Metadata;t.pos<r;){var i=t.uint32();i>>>3==1?n.MimeType=t.string():t.skipType(7&i)}return n},t.fromObject=function(t){if(t instanceof rT.Metadata)return t;var e=new rT.Metadata;return null!=t.MimeType&&(e.MimeType=String(t.MimeType)),e},t.toObject=function(t,e){e||(e={});var r={};return e.defaults&&(r.MimeType=""),null!=t.MimeType&&t.hasOwnProperty("MimeType")&&(r.MimeType=t.MimeType),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,rk.util.toJSONOptions)},t})();
15let rN=rB,rI=["raw","directory","file","metadata","symlink","hamt-sharded-directory"],rz=["directory","hamt-sharded-directory"],rU=parseInt("0644",8),rL=parseInt("0755",8);function rP(t){return null==t?void 0:"number"==typeof t?4095&t:"0"===(t=t.toString()).substring(0,1)?4095&parseInt(t,8):4095&parseInt(t,10)}function rO(t){let e;if(null!=t){if(null!=t.secs&&(e={secs:t.secs,nsecs:t.nsecs}),null!=t.Seconds&&(e={secs:t.Seconds,nsecs:t.FractionalNanoseconds}),Array.isArray(t)&&(e={secs:t[0],nsecs:t[1]}),t instanceof Date){let r=t.getTime(),n=Math.floor(r/1e3);e={secs:n,nsecs:(r-1e3*n)*1e3}}if(Object.prototype.hasOwnProperty.call(e,"secs")){if(null!=e&&null!=e.nsecs&&(e.nsecs<0||e.nsecs>999999999))throw rA(Error("mtime-nsecs must be within the range [0,999999999]"),"ERR_INVALID_MTIME_NSECS");return e}}}class rj{static unmarshal(t){let e=rN.decode(t),r=rN.toObject(e,{defaults:!1,arrays:!0,longs:Number,objects:!1}),n=new rj({type:rI[r.Type],data:r.Data,blockSizes:r.blocksizes,mode:r.mode,mtime:r.mtime?{secs:r.mtime.Seconds,nsecs:r.mtime.FractionalNanoseconds}:void 0});return n._originalMode=r.mode||0,n}constructor(t={type:"file"}){let{type:e,data:r,blockSizes:n,hashType:i,fanout:o,mtime:s,mode:a}=t;if(e&&!rI.includes(e))throw rA(Error("Type: "+e+" is not valid"),"ERR_INVALID_TYPE");this.type=e||"file",this.data=r,this.hashType=i,this.fanout=o,this.blockSizes=n||[],this._originalMode=0,this.mode=rP(a),s&&(this.mtime=rO(s),this.mtime&&!this.mtime.nsecs&&(this.mtime.nsecs=0))}set mode(t){this._mode=this.isDirectory()?rL:rU;let e=rP(t);void 0!==e&&(this._mode=e)}get mode(){return this._mode}isDirectory(){return Boolean(this.type&&rz.includes(this.type))}addBlockSize(t){this.blockSizes.push(t)}removeBlockSize(t){this.blockSizes.splice(t,1)}fileSize(){if(this.isDirectory())return 0;let t=0;return this.blockSizes.forEach(e=>{t+=e}),this.data&&(t+=this.data.length),t}marshal(){let t,e,r;switch(this.type){case"raw":t=rN.DataType.Raw;break;case"directory":t=rN.DataType.Directory;break;case"file":t=rN.DataType.File;break;case"metadata":t=rN.DataType.Metadata;break;case"symlink":t=rN.DataType.Symlink;break;case"hamt-sharded-directory":t=rN.DataType.HAMTShard;break;default:throw rA(Error("Type: "+t+" is not valid"),"ERR_INVALID_TYPE")}let n=this.data;if(this.data&&this.data.length||(n=void 0),null!=this.mode&&((e=4294963200&this._originalMode|(rP(this.mode)||0))!==rU||this.isDirectory()||(e=void 0),e===rL&&this.isDirectory()&&(e=void 0)),null!=this.mtime){let i=rO(this.mtime);i&&0===(r={Seconds:i.secs,FractionalNanoseconds:i.nsecs}).FractionalNanoseconds&&delete r.FractionalNanoseconds}let o={Type:t,Data:n,filesize:this.isDirectory()?void 0:this.fileSize(),blocksizes:this.blockSizes,hashType:this.hashType,fanout:this.fanout,mode:e,mtime:r};return rN.encode(o).finish()}}let rR=new TextDecoder;function rF(t,e){let r=0;for(let n=0;;n+=7){if(n>=64)throw Error("protobuf: varint overflow");if(e>=t.length)throw Error("protobuf: unexpected end of data");let i=t[e++];if(r+=n<28?(127&i)<<n:(127&i)*2**n,i<128)break}return[r,e]}function rM(t,e){let r;[r,e]=rF(t,e);let n=e+r;if(r<0||n<0)throw Error("protobuf: invalid length");if(n>t.length)throw Error("protobuf: unexpected end of data");return[t.subarray(e,n),n]}function r$(t,e){let r;return[r,e]=rF(t,e),[7&r,r>>3,e]}function rH(t){let e={},r=t.length,n=0;for(;n<r;){let i,o;if([i,o,n]=r$(t,n),1===o){if(e.Hash)throw Error("protobuf: (PBLink) duplicate Hash section");if(2!==i)throw Error(`protobuf: (PBLink) wrong wireType (${i}) for Hash`);if(void 0!==e.Name)throw Error("protobuf: (PBLink) invalid order, found Name before Hash");if(void 0!==e.Tsize)throw Error("protobuf: (PBLink) invalid order, found Tsize before Hash");[e.Hash,n]=rM(t,n)}else if(2===o){let s;if(void 0!==e.Name)throw Error("protobuf: (PBLink) duplicate Name section");if(2!==i)throw Error(`protobuf: (PBLink) wrong wireType (${i}) for Name`);if(void 0!==e.Tsize)throw Error("protobuf: (PBLink) invalid order, found Tsize before Name");[s,n]=rM(t,n),e.Name=rR.decode(s)}else if(3===o){if(void 0!==e.Tsize)throw Error("protobuf: (PBLink) duplicate Tsize section");if(0!==i)throw Error(`protobuf: (PBLink) wrong wireType (${i}) for Tsize`);[e.Tsize,n]=rF(t,n)}else throw Error(`protobuf: (PBLink) invalid fieldNumber, expected 1, 2 or 3, got ${o}`)}if(n>r)throw Error("protobuf: (PBLink) unexpected end of data");return e}function rV(t){let e,r;let n=t.length,i=0,o=!1;for(;i<n;){let s,a;
15if([s,a,i]=r$(t,i),2!==s)throw Error(`protobuf: (PBNode) invalid wireType, expected 2, got ${s}`);if(1===a){if(r)throw Error("protobuf: (PBNode) duplicate Data section");[r,i]=rM(t,i),e&&(o=!0)}else if(2===a){let u;if(o)throw Error("protobuf: (PBNode) duplicate Links section");e||(e=[]),[u,i]=rM(t,i),e.push(rH(u))}else throw Error(`protobuf: (PBNode) invalid fieldNumber, expected 1 or 2, got ${a}`)}if(i>n)throw Error("protobuf: (PBNode) unexpected end of data");let l={};return r&&(l.Data=r),l.Links=e||[],l}let rG=new TextEncoder,rW=4294967296,rq=2147483648;function rJ(t,e){let r=e.length;if("number"==typeof t.Tsize){if(t.Tsize<0)throw Error("Tsize cannot be negative");if(!Number.isSafeInteger(t.Tsize))throw Error("Tsize too large for encoding");e[r=rY(e,r,t.Tsize)-1]=24}if("string"==typeof t.Name){let n=rG.encode(t.Name);r-=n.length,e.set(n,r),e[r=rY(e,r,n.length)-1]=18}return t.Hash&&(r-=t.Hash.length,e.set(t.Hash,r),e[r=rY(e,r,t.Hash.length)-1]=10),e.length-r}function rK(t){let e=rZ(t),r=new Uint8Array(e),n=e;if(t.Data&&(n-=t.Data.length,r.set(t.Data,n),r[n=rY(r,n,t.Data.length)-1]=10),t.Links)for(let i=t.Links.length-1;i>=0;i--){let o=rJ(t.Links[i],r.subarray(0,n));n-=o,r[n=rY(r,n,o)-1]=18}return r}function rX(t){let e=0;if(t.Hash){let r=t.Hash.length;e+=1+r+rQ(r)}if("string"==typeof t.Name){let n=rG.encode(t.Name).length;e+=1+n+rQ(n)}return"number"==typeof t.Tsize&&(e+=1+rQ(t.Tsize)),e}function rZ(t){let e=0;if(t.Data){let r=t.Data.length;e+=1+r+rQ(r)}if(t.Links)for(let n of t.Links){let i=rX(n);e+=1+i+rQ(i)}return e}function rY(t,e,r){e-=rQ(r);let n=e;for(;r>=rq;)t[e++]=127&r|128,r/=128;for(;r>=128;)t[e++]=127&r|128,r>>>=7;return t[e]=r,n}function rQ(t){return t%2==0&&t++,Math.floor((r1(t)+6)/7)}function r1(t){let e=0;return t>=rW&&(t=Math.floor(t/rW),e=32),t>=65536&&(t>>>=16,e+=16),t>=256&&(t>>>=8,e+=8),e+r0[t]}let r0=[0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8],r2=["Data","Links"],r3=["Hash","Name","Tsize"],r6=new TextEncoder;function r5(t,e){if(t===e)return 0;let r=t.Name?r6.encode(t.Name):[],n=e.Name?r6.encode(e.Name):[],i=r.length,o=n.length;for(let s=0,a=Math.min(i,o);s<a;++s)if(r[s]!==n[s]){i=r[s],o=n[s];break}return i<o?-1:o<i?1:0}function r4(t,e){return!Object.keys(t).some(t=>!e.includes(t))}function r8(t){if("object"==typeof t.asCID){let e=p.k.asCID(t);if(!e)throw TypeError("Invalid DAG-PB form");return{Hash:e}}if("object"!=typeof t||Array.isArray(t))throw TypeError("Invalid DAG-PB form");let r={};if(t.Hash){let n=p.k.asCID(t.Hash);try{!n&&("string"==typeof t.Hash?n=p.k.parse(t.Hash):t.Hash instanceof Uint8Array&&(n=p.k.decode(t.Hash)))}catch(i){throw TypeError(`Invalid DAG-PB form: ${i.message}`)}n&&(r.Hash=n)}if(!r.Hash)throw TypeError("Invalid DAG-PB form");return"string"==typeof t.Name&&(r.Name=t.Name),"number"==typeof t.Tsize&&(r.Tsize=t.Tsize),r}function r7(t){if((t instanceof Uint8Array||"string"==typeof t)&&(t={Data:t}),"object"!=typeof t||Array.isArray(t))throw TypeError("Invalid DAG-PB form");let e={};if(void 0!==t.Data){if("string"==typeof t.Data)e.Data=r6.encode(t.Data);else if(t.Data instanceof Uint8Array)e.Data=t.Data;else throw TypeError("Invalid DAG-PB form")}if(void 0!==t.Links){if(Array.isArray(t.Links))e.Links=t.Links.map(r8),e.Links.sort(r5);else throw TypeError("Invalid DAG-PB form")}else e.Links=[];return e}function r9(t){if(!t||"object"!=typeof t||Array.isArray(t))throw TypeError("Invalid DAG-PB form");if(!r4(t,r2))throw TypeError("Invalid DAG-PB form (extraneous properties)");if(void 0!==t.Data&&!(t.Data instanceof Uint8Array))throw TypeError("Invalid DAG-PB form (Data must be a Uint8Array)");if(!Array.isArray(t.Links))throw TypeError("Invalid DAG-PB form (Links must be an array)");for(let e=0;e<t.Links.length;e++){let r=t.Links[e];if(!r||"object"!=typeof r||Array.isArray(r))throw TypeError("Invalid DAG-PB form (bad link object)");if(!r4(r,r3))throw TypeError("Invalid DAG-PB form (extraneous properties on link object)");if(!r.Hash)throw TypeError("Invalid DAG-PB form (link must have a Hash)");if(r.Hash.asCID!==r.Hash)throw TypeError("Invalid DAG-PB form (link Hash must be a CID)");if(void 0!==r.Name&&"string"!=typeof r.Name)throw TypeError("Invalid DAG-PB form (link Name must be a string)");if(void 0!==r.Tsize&&("number"!=typeof r.Tsize||r.Tsize%1!=0))throw TypeError("Invalid DAG-PB form (link Tsize must be an integer)");if(e>0&&-1===r5(r,t.Links[e-1]))throw TypeError("Invalid DAG-PB form (links must be sorted by Name bytes)")}}function nt(t,e=[]){return r7({Data:t,Links:e})}function ne(t,e,r){return r8({Hash:r,Name:t,Tsize:e})}let nr="dag-pb",nn=112;function ni(t){r9(t);let e={};return t.Links&&(e.Links=t.Links.map(t=>{let e={};
15return t.Hash&&(e.Hash=t.Hash.bytes),void 0!==t.Name&&(e.Name=t.Name),void 0!==t.Tsize&&(e.Tsize=t.Tsize),e})),t.Data&&(e.Data=t.Data),rK(e)}function no(t){let e=rV(t),r={};return e.Data&&(r.Data=e.Data),e.Links&&(r.Links=e.Links.map(t=>{let e={};try{e.Hash=p.k.decode(t.Hash)}catch(r){}if(!e.Hash)throw Error("Invalid Hash field found in link, expected CID");return void 0!==t.Name&&(e.Name=t.Name),void 0!==t.Tsize&&(e.Tsize=t.Tsize),e})),r}let ns=async(t,e,r)=>{r.codec||(r.codec=n),r.hasher||(r.hasher=ry.sha256),void 0===r.cidVersion&&(r.cidVersion=1),r.codec===n&&r.hasher!==ry.sha256&&(r.cidVersion=1);let i=await r.hasher.digest(t),o=p.k.create(r.cidVersion,r.codec.code,i);return r.onlyHash||await e.put(o,t,{signal:r.signal}),o};var na=ns;let nu=async(t,e,r)=>{let n=new rj({type:"directory",mtime:t.mtime,mode:t.mode}),i=ni(r7({Data:n.marshal()})),o=await na(i,e,r),s=t.path;return{cid:o,path:s,unixfs:n,size:i.length}};var nl=nu,nc=r(96945),nf=r(31303),nh=async function(t,e){return e(await nf(t))},nd=r(78165);async function np(t,e,r){let n=[];for await(let i of nd(t,r.maxChildrenPerNode))n.push(await e(i));return n.length>1?np(n,e,r):n[0]}var ny=function(t,e,r){return np(t,e,r)},ng=async function(t,e,r){let n=new nm(r.layerRepeat),i=0,o=1,s=n;for await(let a of nd(t,r.maxChildrenPerNode))s.isFull()&&(s!==n&&n.addChild(await s.reduce(e)),i&&i%r.layerRepeat==0&&o++,s=new nb(o,r.layerRepeat,i),i++),s.append(a);return s&&s!==n&&n.addChild(await s.reduce(e)),n.reduce(e)};class nb{constructor(t,e,r=0){this.maxDepth=t,this.layerRepeat=e,this.currentDepth=1,this.iteration=r,this.root=this.node=this.parent={children:[],depth:this.currentDepth,maxDepth:t,maxChildren:(this.maxDepth-this.currentDepth)*this.layerRepeat}}isFull(){if(!this.root.data)return!1;if(this.currentDepth<this.maxDepth&&this.node.maxChildren)return this._addNextNodeToParent(this.node),!1;let t=this._findParent(this.node,this.currentDepth);return!t||(this._addNextNodeToParent(t),!1)}_addNextNodeToParent(t){this.parent=t;let e={children:[],depth:t.depth+1,parent:t,maxDepth:this.maxDepth,maxChildren:Math.floor(t.children.length/this.layerRepeat)*this.layerRepeat};t.children.push(e),this.currentDepth=e.depth,this.node=e}append(t){this.node.data=t}reduce(t){return this._reduce(this.root,t)}async _reduce(t,e){let r=[];return t.children.length&&(r=await Promise.all(t.children.filter(t=>t.data).map(t=>this._reduce(t,e)))),e((t.data||[]).concat(r))}_findParent(t,e){let r=t.parent;return r&&0!==r.depth?r.children.length!==r.maxChildren&&r.maxChildren?r:this._findParent(r,e):void 0}}class nm extends nb{constructor(t){super(0,t),this.root.depth=0,this.currentDepth=1}addChild(t){this.root.children.push(t)}reduce(t){return t((this.root.data||[]).concat(this.root.children))}}var nw=async function*(t,e,r){for await(let i of t.content)yield async()=>{let o;r.progress(i.length,t.path);let s={codec:n,cidVersion:r.cidVersion,hasher:r.hasher,onlyHash:r.onlyHash};return r.rawLeaves?(s.codec=nc,s.cidVersion=1):i=ni({Data:(o=new rj({type:r.leafType,data:i})).marshal(),Links:[]}),{cid:await na(i,e,s),unixfs:o,size:i.length}}};let nD={flat:nh,balanced:ny,trickle:ng};async function*nE(t,e,r){let n,i=-1;for await(let o of rd(("function"==typeof r.bufferImporter?r.bufferImporter:nw)(t,e,r),r.blockWriteConcurrency)){if(0==++i){n=o;continue}1===i&&n&&(yield n,n=null),yield o}n&&(n.single=!0,yield n)}let n_=(t,e,r)=>async function(i){if(1===i.length&&i[0].single&&r.reduceSingleLeafToSelf){let o=i[0];if(void 0!==t.mtime||void 0!==t.mode){let s=await e.get(o.cid);o.unixfs=new rj({type:"file",mtime:t.mtime,mode:t.mode,data:s}),s=ni(r7({Data:o.unixfs.marshal()})),o.cid=await na(s,e,{...r,codec:n,hasher:r.hasher,cidVersion:r.cidVersion}),o.size=s.length}return{cid:o.cid,path:t.path,unixfs:o.unixfs,size:o.size}}let a=new rj({type:"file",mtime:t.mtime,mode:t.mode}),u=i.filter(t=>!!(t.cid.code===nc.code&&t.size||t.unixfs&&!t.unixfs.data&&t.unixfs.fileSize())||Boolean(t.unixfs&&t.unixfs.data&&t.unixfs.data.length)).map(t=>t.cid.code===nc.code?(a.addBlockSize(t.size),{Name:"",Tsize:t.size,Hash:t.cid}):(t.unixfs&&t.unixfs.data?a.addBlockSize(t.unixfs.data.length):a.addBlockSize(t.unixfs&&t.unixfs.fileSize()||0),{Name:"",Tsize:t.size,Hash:t.cid})),l={Data:a.marshal(),Links:u},c=ni(r7(l)),f=await na(c,e,r);return{cid:f,path:t.path,unixfs:a,size:c.length+l.Links.reduce((t,e)=>t+e.Tsize,0)}};var nv=function(t,e,r){let n=nD[r.strategy];if(!n)throw rA(Error(`Unknown importer build strategy name: ${r.strategy}`),"ERR_BAD_STRATEGY");return n(nE(t,e,r),n_(t,e,r),r)},nA=r(9668),nk=r(63060),nC=async function*(t,e){let r,n,i;if(e.minChunkSize&&e.maxChunkSize&&e.avgChunkSize)i=e.avgChunkSize,r=e.minChunkSize,n=e.maxChunkSize;else if(e.avgChunkSize)r=(i=e.avgChunkSize)/3,n=i+i/2;else throw rA(Error("please specify an average chunk size"),"ERR_INVALID_AVG_CHUNK_SIZE");if(r<16)throw rA(Error("rabin min must be greater than 16"),"ERR_INVALID_MIN_CHUNK_SIZE");n<r&&(n=r),i<r&&(i=r);let o=Math.floor(Math.log2(i));for await(let s of nx(t,{min:r,max:n,bits:o,window:e.window,polynomial:e.polynomial}))yield s};async function*nx(t,e){let r=await (0,nk.create)(e.bits,e.min,e.max,e.window),n=new nA;for await(let i of t){n.append(i);let o=r.fingerprint(i);for(let s=0;s<o.length;s++){let a=o[s],u=n.slice(0,a);n.consume(a),yield u}}n.length&&(yield n.slice(0))}var nS=async function*(t,e){let r=new nA,n=0,i=!1,o=e.maxChunkSize;for await(let s of t)for(r.append(s),n+=s.length;n>=o;)if(yield r.slice(0,o),i=!0,o===r.length)r=new nA,n=0;else{let a=new nA;a.append(r.shallowSlice(o)),r=a,n-=o}(!i||n)&&(yield r.slice(0,n))},nT=r(41113),nB=async function*(t){for await(let e of t){if(void 0===e.length)throw rA(Error("Content was invali
15d"),"ERR_INVALID_CONTENT");if("string"==typeof e||e instanceof String)yield(0,nT.fromString)(e.toString());else if(Array.isArray(e))yield Uint8Array.from(e);else if(e instanceof Uint8Array)yield e;else throw rA(Error("Content was invalid"),"ERR_INVALID_CONTENT")}};function nN(t){return Symbol.iterator in t}function nI(t){return Symbol.asyncIterator in t}function nz(t){try{if(t instanceof Uint8Array)return async function*(){yield t}();if(nN(t))return async function*(){yield*t}();if(nI(t))return t}catch{throw rA(Error("Content was invalid"),"ERR_INVALID_CONTENT")}throw rA(Error("Content was invalid"),"ERR_INVALID_CONTENT")}var nU=async function*(t,e,r){for await(let n of t)if(n.path&&("./"===n.path.substring(0,2)&&(r.wrapWithDirectory=!0),n.path=n.path.split("/").filter(t=>t&&"."!==t).join("/")),n.content){let i,o;i="function"==typeof r.chunker?r.chunker:"rabin"===r.chunker?nC:nS,o="function"==typeof r.chunkValidator?r.chunkValidator:nB;let s={path:n.path,mtime:n.mtime,mode:n.mode,content:i(o(nz(n.content),r),r)};yield()=>nv(s,e,r)}else if(n.path){let a={path:n.path,mtime:n.mtime,mode:n.mode};yield()=>nl(a,e,r)}else throw Error("Import candidate must have content or path or both")};class nL{constructor(t,e){this.options=e||{},this.root=t.root,this.dir=t.dir,this.path=t.path,this.dirty=t.dirty,this.flat=t.flat,this.parent=t.parent,this.parentKey=t.parentKey,this.unixfs=t.unixfs,this.mode=t.mode,this.mtime=t.mtime,this.cid=void 0,this.size=void 0}async put(t,e){}get(t){return Promise.resolve(this)}async *eachChildSeries(){}async *flush(t){}}var nP=nL;class nO extends nP{constructor(t,e){super(t,e),this._children={}}async put(t,e){this.cid=void 0,this.size=void 0,this._children[t]=e}get(t){return Promise.resolve(this._children[t])}childCount(){return Object.keys(this._children).length}directChildrenCount(){return this.childCount()}onlyChild(){return this._children[Object.keys(this._children)[0]]}async *eachChildSeries(){let t=Object.keys(this._children);for(let e=0;e<t.length;e++){let r=t[e];yield{key:r,child:this._children[r]}}}async *flush(t){let e=Object.keys(this._children),r=[];for(let n=0;n<e.length;n++){let i=this._children[e[n]];if(i instanceof nP)for await(let o of i.flush(t))yield i=o;null!=i.size&&i.cid&&r.push({Name:e[n],Tsize:i.size,Hash:i.cid})}let s=new rj({type:"directory",mtime:this.mtime,mode:this.mode}),a={Data:s.marshal(),Links:r},u=ni(r7(a)),l=await na(u,t,this.options),c=u.length+a.Links.reduce((t,e)=>t+(null==e.Tsize?0:e.Tsize),0);this.cid=l,this.size=c,yield{cid:l,unixfs:s,path:this.path,size:c}}}var nj=nO,nR=r(54563);class nF extends nP{constructor(t,e){super(t,e),this._bucket=(0,nR.createHAMT)({hashFn:e.hamtHashFn,bits:e.hamtBucketBits})}async put(t,e){await this._bucket.put(t,e)}get(t){return this._bucket.get(t)}childCount(){return this._bucket.leafCount()}directChildrenCount(){return this._bucket.childrenCount()}onlyChild(){return this._bucket.onlyChild()}async *eachChildSeries(){for await(let{key:t,value:e}of this._bucket.eachLeafSeries())yield{key:t,child:e}}async *flush(t){for await(let e of n$(this._bucket,t,this,this.options))yield{...e,path:this.path}}}var nM=nF;async function*n$(t,e,r,n){let i=t._children,o=[],s=0;for(let a=0;a<i.length;a++){let u=i.get(a);if(!u)continue;let l=a.toString(16).toUpperCase().padStart(2,"0");if(u instanceof nR.Bucket){let c;for await(let f of(await n$(u,e,null,n)))c=f;if(!c)throw Error("Could not flush sharded directory, no subshard found");o.push({Name:l,Tsize:c.size,Hash:c.cid}),s+=c.size}else if("function"==typeof u.value.flush){let h;let d=u.value;for await(let p of d.flush(e))yield h=p;let y=l+u.key;o.push({Name:y,Tsize:h.size,Hash:h.cid}),s+=h.size}else{let g=u.value;if(!g.cid)continue;let b=l+u.key,m=g.size;o.push({Name:b,Tsize:m,Hash:g.cid}),s+=m}}let w=Uint8Array.from(i.bitField().reverse()),D=new rj({type:"hamt-sharded-directory",data:w,fanout:t.tableSize(),hashType:n.hamtHashCode,mtime:r&&r.mtime,mode:r&&r.mode}),E={Data:D.marshal(),Links:o},_=ni(r7(E)),v=await na(_,e,n),A=_.length+s;yield{cid:v,unixfs:D,size:A}}async function nH(t,e,r,n){let i=e;e instanceof nj&&e.directChildrenCount()>=r&&(i=await nV(e,n));let o=i.parent;if(o){if(i!==e){if(t&&(t.parent=i),!i.parentKey)throw Error("No parent key found");await o.put(i.parentKey,i)}return nH(i,o,r,n)}return i}async function nV(t,e){let r=new nM({root:t.root,dir:!0,parent:t.parent,parentKey:t.parentKey,path:t.path,dirty:t.dirty,flat:!1,mtime:t.mtime,mode:t.mode},e);for await(let{key:n,child:i}of t.eachChildSeries())await r.put(n,i);return r}var nG=nH;let nW=(t="")=>
15(t.trim().match(/([^\\/]|\\\/)+/g)||[]).filter(Boolean);var nq=nW;async function nJ(t,e,r){let n=nq(t.path||""),i=n.length-1,o=e,s="";for(let a=0;a<n.length;a++){let u=n[a];s+=`${s?"/":""}${u}`;let l=a===i;if(o.dirty=!0,o.cid=void 0,o.size=void 0,l)await o.put(u,t),e=await nG(null,o,r.shardSplitThreshold,r);else{let c=await o.get(u);c&&c instanceof nP||(c=new nj({root:!1,dir:!0,parent:o,parentKey:u,path:s,dirty:!0,flat:!0,mtime:c&&c.unixfs&&c.unixfs.mtime,mode:c&&c.unixfs&&c.unixfs.mode},r)),await o.put(u,c),o=c}}return e}async function*nK(t,e){if(!(t instanceof nP)){t&&t.unixfs&&t.unixfs.isDirectory()&&(yield t);return}yield*t.flush(e)}var nX=async function*(t,e,r){let n=new nj({root:!0,dir:!0,path:"",dirty:!0,flat:!0},r);for await(let i of t)i&&(n=await nJ(i,n,r),i.unixfs&&i.unixfs.isDirectory()||(yield i));if(r.wrapWithDirectory)yield*nK(n,e);else for await(let o of n.eachChildSeries())o&&(yield*nK(o.child,e))};async function*nZ(t,e,r={}){let n;let i=rv(r);for await(let o of(n="function"==typeof r.dagBuilder?r.dagBuilder:nU,("function"==typeof r.treeBuilder?r.treeBuilder:nX)(rd(n(Symbol.asyncIterator in t||Symbol.iterator in t?t:[t],e,i),i.fileImportConcurrency),e,i)))yield{cid:o.cid,path:o.path,unixfs:o.unixfs,size:o.size}}var nY=r(86154),nQ=r(23294),n1=r(28132),n0=r(32121);function n2(t){return ArrayBuffer.isView(t)||t instanceof ArrayBuffer}function n3(t){return t.constructor&&("Blob"===t.constructor.name||"File"===t.constructor.name)&&"function"==typeof t.stream}function n6(t){return"object"==typeof t&&(t.path||t.content)}let n5=t=>t&&"function"==typeof t.getReader;async function*n4(t){yield t}async function n8(t){if(n2(t))return n4(n7(t));if("string"==typeof t||t instanceof String)return n4(n7(t.toString()));if(n3(t))return nQ(t);if(n5(t)&&(t=nY(t)),Symbol.iterator in t||Symbol.asyncIterator in t){let e=n1(t),{value:r,done:n}=await e.peek();if(n)return n4(new Uint8Array(0));if(e.push(r),Number.isInteger(r))return n4(Uint8Array.from(await nf(e)));if(n2(r)||"string"==typeof r||r instanceof String)return n0(e,n7)}throw rA(Error(`Unexpected input: ${t}`),"ERR_UNEXPECTED_INPUT")}function n7(t){return t instanceof Uint8Array?t:ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t instanceof ArrayBuffer?new Uint8Array(t):Array.isArray(t)?Uint8Array.from(t):(0,nT.fromString)(t.toString())}async function*n9(t,e){if(null==t)throw rA(Error(`Unexpected input: ${t}`),"ERR_UNEXPECTED_INPUT");if("string"==typeof t||t instanceof String){yield it(t.toString(),e);return}if(n2(t)||n3(t)){yield it(t,e);return}if(n5(t)&&(t=nY(t)),Symbol.iterator in t||Symbol.asyncIterator in t){let r=n1(t),{value:n,done:i}=await r.peek();if(i){yield{content:[]};return}if(r.push(n),Number.isInteger(n)||n2(n)||"string"==typeof n||n instanceof String){yield it(r,e);return}throw rA(Error("Unexpected input: multiple items passed - if you are using ipfs.add, please use ipfs.addAll instead"),"ERR_UNEXPECTED_INPUT")}if(n6(t)){yield it(t,e);return}throw rA(Error('Unexpected input: cannot convert "'+typeof t+'" into ImportCandidate'),"ERR_UNEXPECTED_INPUT")}async function it(t,e){let{path:r,mode:n,mtime:i,content:o}=t,s={path:r||"",mode:rP(n),mtime:rO(i)};return o?s.content=await e(o):r||(s.content=await e(t)),s}function ie(t){return n9(t,n8)}async function*ir(t,e){if("string"==typeof t||t instanceof String||n2(t)||n3(t)||t._readableState)throw rA(Error("Unexpected input: single item passed - if you are using ipfs.addAll, please use ipfs.add instead"),"ERR_UNEXPECTED_INPUT");if(n5(t)&&(t=nY(t)),Symbol.iterator in t||Symbol.asyncIterator in t){let r=n1(t),{value:n,done:i}=await r.peek();if(i){yield*[];return}if(r.push(n),Number.isInteger(n))throw rA(Error("Unexpected input: single item passed - if you are using ipfs.addAll, please use ipfs.add instead"),"ERR_UNEXPECTED_INPUT");if(n._readableState){yield*n0(r,t=>ii({content:t},e));return}if(n2(n)){yield ii({content:r},e);return}if(n6(n)||n[Symbol.iterator]||n[Symbol.asyncIterator]||n5(n)||n3(n)){yield*n0(r,t=>ii(t,e));return}}if(n6(t))throw rA(Error("Unexpected input: single item passed - if you are using ipfs.addAll, please use ipfs.add instead"),"ERR_UNEXPECTED_INPUT");throw rA(Error("Unexpected input: "+typeof t),"ERR_UNEXPECTED_INPUT")}async function ii(t,e){let{path:r,mode:n,mtime:i,content:o}=t,s={path:r||"",mode:rP(n),mtime:rO(i)};return o?s.content=await e(o):r||(s.content=await e(t)),s}function io(t){return ir(t,n8)}function is(t){return ArrayBuffer.isView(t)||t instanceof ArrayBuffer}function ia(t){return Boolean(t.constructor)&&("Blob"===t.constructor.name||"File"===t.constructor.name)&&"function"==typeof t.stream}function iu(t){return"string"==typeof t||t instanceof String||is(t)||ia(t)||"_readableState"in t}function il(t){return iu(t)?ie(t):io(t)}function ic(t){return rA(t=t||Error("Not Found"),"ERR_NOT_FOUND")}
15function ih(t){return rA(t=t||Error("Aborted"),"ERR_ABORTED")}var id=r(64593),ip=r(55565),iy=r(37939);let ig=(t,e)=>(async function*(){let r=await nf(t);yield*r.sort(e)})();class ib{open(){return Promise.reject(Error(".open is not implemented"))}close(){return Promise.reject(Error(".close is not implemented"))}put(t,e,r){return Promise.reject(Error(".put is not implemented"))}get(t,e){return Promise.reject(Error(".get is not implemented"))}has(t,e){return Promise.reject(Error(".has is not implemented"))}delete(t,e){return Promise.reject(Error(".delete is not implemented"))}async *putMany(t,e={}){for await(let{key:r,value:n}of t)await this.put(r,n,e),yield{key:r,value:n}}async *getMany(t,e={}){for await(let r of t)yield this.get(r,e)}async *deleteMany(t,e={}){for await(let r of t)await this.delete(r,e),yield r}batch(){let t=[],e=[];return{put(e,r){t.push({key:e,value:r})},delete(t){e.push(t)},commit:async r=>{await id(this.putMany(t,r)),t=[],await id(this.deleteMany(e,r)),e=[]}}}async *_all(t,e){throw Error("._all is not implemented")}async *_allKeys(t,e){throw Error("._allKeys is not implemented")}query(t,e){let r=this._all(t,e);if(null!=t.prefix&&(r=ip(r,e=>e.key.toString().startsWith(t.prefix||""))),Array.isArray(t.filters)&&(r=t.filters.reduce((t,e)=>ip(t,e),r)),Array.isArray(t.orders)&&(r=t.orders.reduce((t,e)=>ig(t,e),r)),null!=t.offset){let n=0;r=ip(r,()=>n++>=(t.offset||0))}return null!=t.limit&&(r=iy(r,t.limit)),r}queryKeys(t,e){let r=this._allKeys(t,e);if(null!=t.prefix&&(r=ip(r,e=>e.toString().startsWith(t.prefix||""))),Array.isArray(t.filters)&&(r=t.filters.reduce((t,e)=>ip(t,e),r)),Array.isArray(t.orders)&&(r=t.orders.reduce((t,e)=>ig(t,e),r)),null!=t.offset){let n=0;r=ip(r,()=>n++>=t.offset)}return null!=t.limit&&(r=iy(r,t.limit)),r}}r(22817);class im extends ib{constructor(){super(),this.store=new Map}async *blocks(){for(let[t,e]of this.store.entries())yield{cid:rb.k0.parse(t),bytes:e}}put(t,e){return this.store.set(t.toString(),e),Promise.resolve()}get(t){let e=this.store.get(t.toString());if(!e)throw Error(`block with cid ${t.toString()} no found`);return Promise.resolve(e)}has(t){return Promise.resolve(this.store.has(t.toString()))}close(){return this.store.clear(),Promise.resolve()}}let iw={cidVersion:1,chunker:"fixed",maxChunkSize:262144,hasher:ry.sha256,rawLeaves:!0,wrapWithDirectory:!0,maxChildrenPerNode:174};async function iD({input:t,blockstore:e,hasher:r,maxChunkSize:n,maxChildrenPerNode:i,wrapWithDirectory:o,rawLeaves:s}){let a;if(!t||Array.isArray(t)&&!t.length)throw Error("missing input file(s)");let u=e||new im,l=await f(h(il(t),t=>nZ(t,u,{...iw,hasher:r||iw.hasher,maxChunkSize:n||iw.maxChunkSize,maxChildrenPerNode:i||iw.maxChildrenPerNode,wrapWithDirectory:!1!==o&&iw.wrapWithDirectory,rawLeaves:null==s?iw.rawLeaves:s})));if(!l||!l.cid)throw Error("given input could not be parsed correctly");let c=l.cid,{writer:d,out:p}=await rl.create([c]),y=p[Symbol.asyncIterator](),g=async()=>{for await(let t of u.blocks())await d.put(t);await d.close(),e||await u.close()},b={[Symbol.asyncIterator](){if(null!=a)throw Error("Multiple iterator not supported");return a=g(),{async next(){let t=await y.next();return t.done&&await a,t}}}};return{root:c,out:b}}let iE=2e3,i_=!1;function iv(t){return t&&t.rel}function iA(t,e){function r(r){t[r]=Object.assign({},e,{rel:r})}return e.rel.split(/\s+/).forEach(r),t}function ik(t,e){let r=e.match(/\s*(.+)\s*=\s*"?([^"]+)"?/);return r&&(t[r[1]]=r[2]),t}function iC(t){try{let e=t.match(/<?([^>]*)>(.*)/),r=e[1],n=e[2].split(";"),i={},o=new URL(r,"https://example.com");for(let[s,a]of o.searchParams)i[s]=a;n.shift();let u=n.reduce(ik,{});return(u=Object.assign({},i,u)).url=r,u}catch{return null}}function ix(t,e){if(!t)return!1;e=e||{};let r=e.maxHeaderLength||iE,n=e.throwOnMaxHeaderLengthExceeded||i_;if(t.length>r){if(!n)return!1;throw Error("Input string too long, it should be under "+r+" characters.")}return!0}function iS(t,e){return ix(t,e)?t.split(/,\s*</).map(iC).filter(iv).reduce(iA,{}):null}let iT=42;function iB(t){if(0!==t[0])throw Error("Invalid CID for CBOR tag 42; expected leading 0x00");return p.k.decode(t.subarray(1))}let iN={allowIndefinite:!1,coerceUndefinedToNull:!0,allowNaN:!1,allowInfinity:!1,allowBigInt:!0,strict:!0,useMaps:!1,tags:[]};iN.tags[iT]=iB;let iI=113,iz=t=>eR(t,iN);var iU=r(78103);let iL=async function(t){return(await rD.encode(t)).slice(0,8).reverse()},iP=(t,e,r)=>Promise.all(t.map(t=>{if(null==t.Name)throw Error("Unexpected Link without a Name");if(2===t.Name.length){let n=parseInt(t.Name,16);return e._putObjectAt(n,new nR.Bucket({hash:r._options.hash,bits:r._options.bits},e,n))}return r.put(t.Name.substring(2),!0)})),iO=t=>t.toString(16).toUpperCase().padStart(2,"0").substring(0,2),ij=t=>{let e=t.bucket,r=[];for(;e._parent;)r.push(e),e=e._parent;return r.push(e),r.reverse()},iR=async(t,e,r,n,i)=>{if(!n){let o=(0,nR.createHAMT)({hashFn:iL});n={rootBucket:o,hamtDepth:1,lastBucket:o}}await iP(t.Links,n.lastBucket,n.rootBucket);let s=await n.rootBucket._findNewBucketAndPos(e),a=iO(s.pos),u=ij(s);u.length>n.hamtDepth&&(n.lastBucket=u[n.hamtDepth],a=iO(n.lastBucket._posAtParent));let l=t.Links.find(t=>{if(null==t.Name)return!1;let r=t.Name.substring(0,2),n=t.Name.substring(2);return r===a&&(!n||n===e)});if(!l)return null;if(null!=l.Name&&l.Name.substring(2)===e)return l.Hash;n.hamtDepth++;let c=await r.get(l.Hash,i);return iR(t=no(c),e,r,n,i)};var iF=iR,iM=function(t,e,r,n){let i=t.length,o=e+i;return r>=o||n<e?new Uint8Array(0):(n>=e&&n<o&&(t=t.slice(0,n-e)),r>=e&&r<o&&(t=t.slice(r-e)),t)};let i$=(t,e,r)=>{if(e||(e=0),e<0)throw rA(Error("Offset must be greater than or equal to 0"),"ERR_INVALID_PARAMS");if(e>t)throw rA(Error("Offset must be less than the file size"),"ERR_INVALID_PARAMS");if(r||0===r||(r=t-e),r<0)throw rA(Error("Length must be greater than or equal to 0"),"ERR_INVALID_PARAMS");return e+r>t&&(r=t-e),{offset:e,length:r}};var iH=i$;async function*iV(t,e,r,n,i=0,o){let s;if(e instanceof Uint8Array){let a=iM(e,i,r,n);return a.length&&(yield a),i+=a.length}if(null==e.Data)throw rA(Error("no data in PBNode"),"ERR_NOT_UNIXFS");try{s=rj.unmarshal(e.Data)}catch(u){throw rA(u,"ERR_NOT_UNIXFS")}
15if(s.data&&s.data.length){let l=iM(s.data,i,r,n);l.length&&(yield l),i+=s.data.length}let c=i;for(let f=0;f<e.Links.length;f++){let h=e.Links[f],d=i+s.blockSizes[f];if(r>=c&&r<d||n>c&&n<=d||r<c&&n>d){let p;let y=await t.get(h.Hash,{signal:o.signal});switch(h.Hash.code){case nn:p=await no(y);break;case nc.code:p=y;break;case iI:p=await iz(y);break;default:throw Error(`Unsupported codec: ${h.Hash.code}`)}for await(let g of iV(t,p,r,n,i,o))i+=g.length,yield g}i=d,c=d+1}}let iG=(t,e,r,n,i,o,s)=>function(t={}){let n=r.fileSize();if(void 0===n)throw Error("File was a directory");let{offset:i,length:o}=iH(n,t.offset,t.length),a=i,u=i+o;return iV(s,e,a,u,0,t)};var iW=iG;let iq=(t,e,r,n,i,o,s)=>async function*(t={}){let r=t.offset||0,a=t.length||e.Links.length,u=e.Links.slice(r,a);for(let l of u){let c=await i(l.Hash,l.Name||"",`${n}/${l.Name||""}`,[],o+1,s,t);c.entry&&(yield c.entry)}};var iJ=iq;let iK=(t,e,r,n,i,o,s)=>function(t={}){return iX(e,n,i,o,s,t)};async function*iX(t,e,r,n,i,o){let s=t.Links;for(let a of s){let u=null!=a.Name?a.Name.substring(2):null;if(u){let l=await r(a.Hash,u,`${e}/${u}`,[],n+1,i,o);yield l.entry}else{let c=await i.get(a.Hash);for await(let f of iX(t=no(c),e,r,n,i,o))yield f}}}var iZ=iK;let iY=(t,e)=>{let r=t.Links.find(t=>t.Name===e);return r&&r.Hash},iQ={raw:iW,file:iW,directory:iJ,"hamt-sharded-directory":iZ,metadata:(t,e,r,n,i,o,s)=>()=>[],symlink:(t,e,r,n,i,o,s)=>()=>[]},i1=async(t,e,r,n,i,o,s,a)=>{let u,l;let c=await s.get(t,a),f=no(c);if(e||(e=t.toString()),null==f.Data)throw rA(Error("no data in PBNode"),"ERR_NOT_UNIXFS");try{u=rj.unmarshal(f.Data)}catch(h){throw rA(h,"ERR_NOT_UNIXFS")}if(r||(r=e),n.length){let d;if(!(d=u&&"hamt-sharded-directory"===u.type?await iF(f,n[0],s):iY(f,n[0])))throw rA(Error("file does not exist"),"ERR_NOT_FOUND");let p=n.shift(),y=`${r}/${p}`;l={cid:d,toResolve:n,name:p||"",path:y}}return{entry:{type:u.isDirectory()?"directory":"file",name:e,path:r,cid:t,content:iQ[u.type](t,f,u,r,i,o,s),unixfs:u,depth:o,node:f,size:u.fileSize()},next:l}};var i0=i1;let i2=t=>async function*(e={}){let{offset:r,length:n}=iH(t.length,e.offset,e.length);yield iM(t,0,r,r+n)},i3=async(t,e,r,n,i,o,s,a)=>{if(n.length)throw rA(Error(`No link named ${r} found in raw node ${t}`),"ERR_NOT_FOUND");let u=await s.get(t,a);return{entry:{type:"raw",name:e,path:r,cid:t,content:i2(u),depth:o,size:u.length,node:u}}};var i6=i3;let i5=async(t,e,r,n,i,o,s,a)=>{let u=await s.get(t),l=iz(u),c=l,f=r;for(;n.length;){let h=n[0];if(h in c){n.shift(),f=`${f}/${h}`;let d=p.k.asCID(c[h]);if(d)return{entry:{type:"object",name:e,path:r,cid:t,node:u,depth:o,size:u.length,content:async function*(){yield l}},next:{cid:d,name:h,path:f,toResolve:n}};c=c[h]}else throw rA(Error(`No property named ${h} found in cbor node ${t}`),"ERR_NO_PROP")}return{entry:{type:"object",name:e,path:r,cid:t,node:u,depth:o,size:u.length,content:async function*(){yield l}}}};var i4=i5;let i8=t=>async function*(e={}){let{offset:r,length:n}=iH(t.length,e.offset,e.length);yield iM(t,0,r,r+n)},i7=async(t,e,r,n,i,o,s,a)=>{if(n.length)throw rA(Error(`No link named ${r} found in raw node ${t}`),"ERR_NOT_FOUND");let u=await y.Jx(t.multihash.bytes);return{entry:{type:"identity",name:e,path:r,cid:t,content:i8(u.digest),depth:o,size:u.digest.length,node:u.digest}}};var i9=i7;let ot={[nn]:i0,[nc.code]:i6,[iI]:i4,[iU.identity.code]:i9};function oe(t,e,r,n,i,o,s){let a=ot[t.code];if(!a)throw rA(Error(`No resolver for code ${t.code}`),"ERR_NO_RESOLVER");return a(t,e,r,n,oe,i,o,s)}var or=oe;let on=(t="")=>(t.trim().match(/([^\\^/]|\\\/)+/g)||[]).filter(Boolean),oi=t=>{if(t instanceof Uint8Array)return{cid:p.k.decode(t),toResolve:[]};let e=p.k.asCID(t);if(e)return{cid:e,toResolve:[]};if("string"==typeof t){0===t.indexOf("/ipfs/")&&(t=t.substring(6));let r=on(t);return{cid:p.k.parse(r[0]),toResolve:r.slice(1)}}throw rA(Error(`Unknown path type ${t}`),"ERR_BAD_PATH")};async function*oo(t,e,r={}){let{cid:n,toResolve:i}=oi(t),o=n.toString(),s=o,a=i.length;for(;;){let u=await or(n,o,s,i,a,e,r);if(!u.entry&&!u.next)throw rA(Error(`Could not resolve ${t}`),"ERR_NOT_FOUND");if(u.entry&&(yield u.entry),!u.next)return;i=u.next.toResolve,n=u.next.cid,o=u.next.name,s=u.next.path}}async function os(t,e,r={}){let n=await f(oo(t,e,r));if(!n)throw rA(Error(`Could not resolve ${t}`),"ERR_NOT_FOUND");return n}async function*oa(t,e,r={}){let n=await os(t,e,r);
15if(n&&(yield n,"directory"===n.type))for await(let i of o(n,r))yield i;async function*o(t,e){for await(let r of t.content(e))yield r,r instanceof Uint8Array||"directory"!==r.type||(yield*o(r,e))}}function ou(t,e){if(t===e)return!0;if(t.byteLength!==e.byteLength)return!1;for(let r=0;r<t.byteLength;r++)if(t[r]!==e[r])return!1;return!0}class ol extends ib{constructor(t){super(),this.store=t}async get(t){let e=await this.store.get(t);if(!e)throw Error(`Incomplete CAR. Block missing for CID ${t}`);if(!oc({cid:t,bytes:e}))throw Error(`Invalid CAR. Hash of block data does not match CID ${t}`);return e}static fromBlockstore(t){return new ol(t)}static fromCarReader(t){return new ol({async get(e){let r=await t.get(e);return null==r?void 0:r.bytes}})}}async function oc({cid:t,bytes:e}){let r=await ry.sha256.digest(e);return ou(r.digest,t.multihash.digest)}async function*of(t,{roots:e,blockstore:r}={}){let n=await rt.fromIterable(oh(t)),i=r||new im;for await(let o of n)await i.put(o.cid,o.bytes);let s=ol.fromBlockstore(i);for(let a of(e&&0!==e.length||(e=await n.getRoots()),e))yield*oa(a,s)}function oh(t){return Symbol.asyncIterator in t?t:nY(t)}let od=({enumerable:t=!0,configurable:e=!1}={})=>({enumerable:t,configurable:e,writable:!1}),op=function*(t,e){if(null!=t&&!(t instanceof Uint8Array))for(let[r,n]of Object.entries(t)){let i=[...e,r];if(null!=n&&"object"==typeof n){if(Array.isArray(n))for(let[o,s]of n.entries()){let a=[...i,o],u=rb.k0.asCID(s);u?yield[a.join("/"),u]:"object"==typeof s&&(yield*op(s,a))}else{let l=rb.k0.asCID(n);l?yield[i.join("/"),l]:yield*op(n,i)}}}},oy=function*(t,e){if(null!=t)for(let[r,n]of Object.entries(t)){let i=[...e,r];if(yield i.join("/"),null!=n&&!(n instanceof Uint8Array)&&"object"==typeof n&&!rb.k0.asCID(n)){if(Array.isArray(n))for(let[o,s]of n.entries()){let a=[...i,o];yield a.join("/"),"object"!=typeof s||rb.k0.asCID(s)||(yield*oy(s,a))}else yield*oy(n,i)}}},og=(t,e)=>{let r=t;for(let[n,i]of e.entries()){if(null==(r=r[i]))throw Error(`Object has no property at ${e.slice(0,n+1).map(t=>`[${JSON.stringify(t)}]`).join("")}`);let o=rb.k0.asCID(r);if(o)return{value:o,remaining:e.slice(n+1).join("/")}}return{value:r}};class ob{constructor({cid:t,bytes:e,value:r}){if(!t||!e||void 0===r)throw Error("Missing required argument");this.cid=t,this.bytes=e,this.value=r,this.asBlock=this,Object.defineProperties(this,{cid:od(),bytes:od(),value:od(),asBlock:od()})}links(){return op(this.value,[])}tree(){return oy(this.value,[])}get(t="/"){return og(this.value,t.split("/").filter(Boolean))}}let om=42;function ow(t){if(t.asCID!==t)return null;let e=p.k.asCID(t);if(!e)return null;let r=new Uint8Array(e.bytes.byteLength+1);return r.set(e.bytes,1),[new _(E.tag,om),new _(E.bytes,r)]}function oD(){throw Error("`undefined` is not supported by the IPLD Data Model and cannot be encoded")}function oE(t){if(Number.isNaN(t))throw Error("`NaN` is not supported by the IPLD Data Model and cannot be encoded");if(t===1/0||t===-1/0)throw Error("`Infinity` and `-Infinity` is not supported by the IPLD Data Model and cannot be encoded");return null}let o_={float64:!0,typeEncoders:{Object:ow,undefined:oD,number:oE}};function ov(t){if(0!==t[0])throw Error("Invalid CID for CBOR tag 42; expected leading 0x00");return p.k.decode(t.subarray(1))}let oA={allowIndefinite:!1,allowUndefined:!1,allowNaN:!1,allowInfinity:!1,allowBigInt:!0,strict:!0,useMaps:!1,tags:[]};oA.tags[om]=ov;let ok="dag-cbor",oC=113,ox=t=>eN(t,o_),oS=t=>eR(t,oA);class oT{constructor(t,e,r={}){if("number"!=typeof e||e<=0)throw Error("invalid target chunk size");this._reader=t,this._targetSize=e,this._decoders=[n,nc,o,...r.decoders||[]]}async *cars(){let t;let e=await this._reader.getRoots();if(1!==e.length)throw Error(`unexpected number of roots: ${e.length}`);for await(let r of this._cars(e[0]))t=r.channel,r.out&&(yield r.out);if(!t)throw Error("missing CAR writer channel");t.writer.close(),yield t.out}async _get(t){let e=await this._reader.get(t);if(!e)throw Error(`missing block for ${t}`);let{bytes:r}=e,n=this._decoders.find(e=>e.code===t.code);if(!n)throw Error(`missing decoder for ${t.code}`);return new ob({cid:t,bytes:r,value:n.decode(r)})}async *_cars(t,e=[],r){let n=await this._get(t);if((r=r||Object.assign(rl.create(t),{size:0})).size>0&&r.size+n.bytes.byteLength>=this._targetSize){r.writer.close();let{out:i}=r;yield{channel:r=oB(e),out:i}}for(let[,o]of(e=e.concat(n),r.size+=n.bytes.byteLength,r.writer.put(n),n.links()))for await(let s of this._cars(o,e,r))r=s.channel,yield s;if(!r)throw Error("missing CAR writer channel");yield{channel:r}}static async fromIterable(t,e,r){let n=await e8.fromIterable(t);return new oT(n,e,r)}static async fromBlob(t,e,r){let n=await t.arrayBuffer(),i=await e8.fromBytes(new Uint8Array(n));return new oT(i,e,r)}}function oB(t){let e=Object.assign(rl.create(t[0].cid),{size:t.reduce((t,e)=>t+e.bytes.byteLength,0)});for(let r of t)e.writer.put(r);return e}var oN=r(28230);let oI=globalThis.fetch,oz=globalThis.Blob,oU=globalThis.File,oL=im,oP=5,oO=3,oj=10485760,oR=1048576,oF=104857600,oM=30,o$=1e4;
15function oH(){let t=oN(oM,o$);return()=>t(()=>{})}let oV=oH();class oG{constructor({token:t,endpoint:e=new URL("https://api.web3.storage"),rateLimiter:r,fetch:n=oI}){this.token=t,this.endpoint=e,this.rateLimiter=r||oH(),this.fetch=n}static headers(t){if(!t)throw Error("missing token");return{Authorization:`Bearer ${t}`,"X-Client":"web3.storage/js"}}static async put({endpoint:t,token:e,rateLimiter:r=oV,fetch:n=oI},i,{onRootCidReady:o,onStoredChunk:s,maxRetries:a=oP,maxChunkSize:u=oj,wrapWithDirectory:l=!0,name:c,signal:f}={}){if(u>=oF||u<oR)throw Error("maximum chunk size must be less than 100MiB and greater than or equal to 1MB");let h=new oL;try{let{out:d,root:p}=await iD({input:Array.from(i).map(oK),blockstore:h,wrapWithDirectory:l,maxChunkSize:oR,maxChildrenPerNode:1024});o&&o(p.toString());let y=await e8.fromIterable(d);return await oG.putCar({endpoint:t,token:e,rateLimiter:r,fetch:n},y,{onStoredChunk:s,maxRetries:a,maxChunkSize:u,name:c,signal:f})}finally{await h.close()}}static async putCar({endpoint:t,token:e,rateLimiter:r=oV,fetch:n=oI},i,{name:o,onStoredChunk:s,maxRetries:a=oP,maxChunkSize:u=oj,decoders:f,signal:h}={}){if(u>=oF||u<oR)throw Error("maximum chunk size must be less than 100MiB and greater than or equal to 1MB");let d=u,p=new URL("car",t),y=oG.headers(e);o&&(y={...y,"X-Name":encodeURIComponent(o)});let g=await i.getRoots();if(null==g[0])throw Error("missing root CID");if(g.length>1)throw Error("too many roots");let b=g[0].toString(),m=new oT(i,d,{decoders:f}),w=async t=>{let e=[];for await(let i of t)e.push(i);let o=new oz(e,{type:"application/vnd.ipld.car"}),u=await c(async()=>{let t;await r();try{t=await n(p.toString(),{method:"POST",headers:y,body:o,signal:h})}catch(e){throw h&&h.aborted?new c.AbortError(e):e}if(429===t.status)throw Error("rate limited");let i=await t.json();if(!t.ok)throw Error(i.message);if(i.cid!==b)throw Error(`root CID mismatch, expected: ${b}, received: ${i.cid}`);return i.cid},{retries:a});return s&&s(o.size),u},D=l(oO,w);for await(let E of D(m.cars()));return b}static async get({endpoint:t,token:e,rateLimiter:r=oV,fetch:n=oI},i,o={}){let s=new URL(`car/${i}`,t);await r();let a=await n(s.toString(),{method:"GET",headers:oG.headers(e),signal:o.signal});if(429===a.status)throw Error("rate limited");return oJ(a)}static async delete({endpoint:t,token:e,rateLimiter:r=oV},n,i={}){throw console.log("Not deleting",n,t,e,r,i),Error(".delete not implemented yet")}static async status({endpoint:t,token:e,rateLimiter:r=oV,fetch:n=oI},i,o={}){let s=new URL(`status/${i}`,t);await r();let a=await n(s.toString(),{method:"GET",headers:oG.headers(e),signal:o.signal});if(429===a.status)throw Error("rate limited");if(404!==a.status){if(!a.ok)throw Error(a.statusText);return a.json()}}static async *list(t,{before:e=new Date().toISOString(),maxResults:r=1/0,signal:n}={}){async function i({endpoint:t,token:e,rateLimiter:r=oV,fetch:i=oI},{before:o,size:s}){let a=new URLSearchParams({before:o,size:s.toString()}),u=new URL(`user/uploads?${a}`,t);return await r(),i(u.toString(),{method:"GET",headers:{...oG.headers(e),"Access-Control-Request-Headers":"Link"},signal:n})}let o=0,s=r>100?100:r;for await(let a of oX(i,t,{before:e,size:s})){if(!a.ok){if(429===a.status)throw Error("rate limited");let u=await a.json();throw Error(`${a.status} ${a.statusText} ${u?"- "+u.message:""}`)}let l=await a.json();for(let c of l){if(++o>r)return;yield c}}}put(t,e){return oG.put(this,t,e)}putCar(t,e){return oG.putCar(this,t,e)}get(t,e){return oG.get(this,t,e)}delete(t,e){return oG.delete(this,t,e)}status(t,e){return oG.status(this,t,e)}list(t){return oG.list(this,t)}}async function oW({content:t,path:e,cid:r}){let n=[];for await(let i of t())n.push(i);let o=new oU(n,oq(e));return Object.assign(o,{cid:r.toString()})}function oq(t){let e=t.indexOf("/");return -1===e?t:t.substring(e+1)}function oJ(t){let e=Object.assign(t,{unixFsIterator:async function*(){if(!t.ok)throw Error(`Response was not ok: ${t.status} ${t.statusText} - Check for { "ok": false } on the Response object before calling .unixFsIterator`);if(!t.body)throw Error("No body on response");let e=new oL;try{for await(let r of of(t.body,{blockstore:e}))yield r}finally{await e.close()}},async files(){if(!t.ok)throw Error(`Response was not ok: ${t.status} ${t.statusText} - Check for { "ok": false } on the Response object before calling .files`);let r=[];for await(let n of e.unixFsIterator()){if("directory"===n.type)continue;let i=await oW(n);
15r.push(i)}return r}});return e}function oK(t){let e;return{path:t.name,get content(){return e=e||t.stream()}}}async function*oX(t,e,r){let n=await t(e,r);yield n;let i=iS(n.headers.get("Link")||"");for(;i&&i.next;)yield n=await t(e,i.next),i=iS(n.headers.get("Link")||"")}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.