2 lines
28 KiB
JavaScript
Raw Permalink Normal View History

2025-09-05 14:59:21 +08:00
"use strict";const a$1=[],l=[],x$1=typeof Uint8Array>"u"?Array:Uint8Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(let t=0,e=i.length;t<e;++t)a$1[t]=i[t],l[i.charCodeAt(t)]=t;l[45]=62,l[95]=63;function d$1(t){const e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");let n=t.indexOf("=");n===-1&&(n=e);const o=n===e?0:4-n%4;return[n,o]}function p(t,e,n){return(e+n)*3/4-n}function toByteArray(t){let e;const n=d$1(t),o=n[0],r=n[1],f=new x$1(p(t,o,r));let h=0;const E=r>0?o-4:o;let U;for(U=0;U<E;U+=4)e=l[t.charCodeAt(U)]<<18|l[t.charCodeAt(U+1)]<<12|l[t.charCodeAt(U+2)]<<6|l[t.charCodeAt(U+3)],f[h++]=e>>16&255,f[h++]=e>>8&255,f[h++]=e&255;return r===2&&(e=l[t.charCodeAt(U)]<<2|l[t.charCodeAt(U+1)]>>4,f[h++]=e&255),r===1&&(e=l[t.charCodeAt(U)]<<10|l[t.charCodeAt(U+1)]<<4|l[t.charCodeAt(U+2)]>>2,f[h++]=e>>8&255,f[h++]=e&255),f}function u(t){return a$1[t>>18&63]+a$1[t>>12&63]+a$1[t>>6&63]+a$1[t&63]}function A$1(t,e,n){let o;const r=[];for(let f=e;f<n;f+=3)o=(t[f]<<16&16711680)+(t[f+1]<<8&65280)+(t[f+2]&255),r.push(u(o));return r.join("")}function fromByteArray(t){let e;const n=t.length,o=n%3,r=[],f=16383;for(let h=0,E=n-o;h<E;h+=f)r.push(A$1(t,h,h+f>E?E:h+f));return o===1?(e=t[n-1],r.push(a$1[e>>2]+a$1[e<<4&63]+"==")):o===2&&(e=(t[n-2]<<8)+t[n-1],r.push(a$1[e>>10]+a$1[e>>4&63]+a$1[e<<2&63]+"=")),r.join("")}/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */function read(t,e,n,o,r){let f,h;const E=r*8-o-1,U=(1<<E)-1,et=U>>1;let c=-7,tt=n?r-1:0;const ot=n?-1:1;let nt=t[e+tt];for(tt+=ot,f=nt&(1<<-c)-1,nt>>=-c,c+=E;c>0;)f=f*256+t[e+tt],tt+=ot,c-=8;for(h=f&(1<<-c)-1,f>>=-c,c+=o;c>0;)h=h*256+t[e+tt],tt+=ot,c-=8;if(f===0)f=1-et;else{if(f===U)return h?Number.NaN:(nt?-1:1)*Number.POSITIVE_INFINITY;h=h+Math.pow(2,o),f=f-et}return(nt?-1:1)*h*Math.pow(2,f-o)}function write(t,e,n,o,r,f){let h,E,U,et=f*8-r-1;const c=(1<<et)-1,tt=c>>1,ot=r===23?Math.pow(2,-24)-Math.pow(2,-77):0;let nt=o?0:f-1;const rt=o?1:-1,it=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),Number.isNaN(e)||e===Number.POSITIVE_INFINITY?(E=Number.isNaN(e)?1:0,h=c):(h=Math.floor(Math.log2(e)),e*(U=Math.pow(2,-h))<1&&(h--,U*=2),e+=h+tt>=1?ot/U:ot*Math.pow(2,1-tt),e*U>=2&&(h++,U/=2),h+tt>=c?(E=0,h=c):h+tt>=1?(E=(e*U-1)*Math.pow(2,r),h=h+tt):(E=e*Math.pow(2,tt-1)*Math.pow(2,r),h=0));r>=8;)t[n+nt]=E&255,nt+=rt,E/=256,r-=8;for(h=h<<r|E,et+=r;et>0;)t[n+nt]=h&255,nt+=rt,h/=256,et-=8;t[n+nt-rt]|=it*128}const $=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null,INSPECT_MAX_BYTES=50,I=2147483647;Buffer.TYPED_ARRAY_SUPPORT=J(),!Buffer.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This environment lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function J(){try{const t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),t.foo()===42}catch{return!1}}Object.defineProperty(Buffer.prototype,"parent",{enumerable:!0,get:function(){if(Buffer.isBuffer(this))return this.buffer}}),Object.defineProperty(Buffer.prototype,"offset",{enumerable:!0,get:function(){if(Buffer.isBuffer(this))return this.byteOffset}});function w(t){if(t>I)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,Buffer.prototype),e}function Buffer(t,e,n){if(typeof t=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return A(t)}return k(t,e,n)}Buffer.poolSize=8192;function k(t,e,n){if(typeof t=="string")return K(t,e);if(ArrayBuffer.isView(t))return Q(t);if(t==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(a(t,ArrayBuffer)||t&&a(t.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(a(t,SharedArrayBuffer)||t&&a(t.buffer,SharedArrayBuffer)))re