msgpackr 1.5.0 → 1.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.min.js CHANGED
@@ -1,116 +1,82 @@
1
- (function(a,b){"object"==typeof exports&&"undefined"!=typeof module?b(exports):"function"==typeof define&&define.amd?define(["exports"],b):(a=a||self,b(a.msgpackr={}))})(this,function(a){'use strict';var b=Math.floor;function c(){try{if(!H.trusted&&!O){let a=C.sharedLength||0;a<C.length&&(C.length=a)}let a=e();if(G==B)C.restoreStructures&&d(),C=null,A=null,E&&(E=null);else if(G>B){// over read
2
- let a=new Error("Unexpected end of MessagePack data");throw a.incomplete=!0,a}else if(!O)throw new Error("Data read, but end of buffer not reached");// else more to read, but we are reading sequentially, so don't clear source yet
3
- return a}catch(a){throw C.restoreStructures&&d(),q(),(a instanceof RangeError||a.message.startsWith("Unexpected end of buffer"))&&(a.incomplete=!0),a}}function d(){for(let a in C.restoreStructures)C[a]=C.restoreStructures[a];C.restoreStructures=null}function e(){let a=A[G++];if(160>a){if(!(128>a)){if(!(144>a)){a-=144;let b=Array(a);for(let c=0;c<a;c++)b[c]=e();return b}if(a-=128,H.mapsAsObjects){let b={};for(let c=0;c<a;c++)b[o()]=e();return b}else{let b=new Map;for(let c=0;c<a;c++)b.set(e(),e());return b}}else if(64>a)return a;else{let b=C[63&a]||H.getStructures&&g()[63&a];return b?(b.read||(b.read=f(b,63&a)),b.read()):a}}else if(192>a){// fixstr
4
- let b=a-160;if(J>=G)return D.slice(G-I,(G+=b)-I);if(0==J&&140>B){// for small blocks, avoiding the overhead of the extract call is helpful
5
- let a=16>b?l(b):k(b);if(null!=a)return a}return S(b)}else{let b;switch(a){case 192:return null;case 193:return N;// "never-used", return special object to denote that
1
+ (function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):(e=e||self,t(e.msgpackr={}))})(this,function(e){'use strict';var t=Math.floor;function n(){try{if(!F.trusted&&!Y){let e=E.sharedLength||0;e<E.length&&(E.length=e)}let e=s();if(_&&(// bundled strings to skip past
2
+ D=_.postBundlePosition),D==R)E.restoreStructures&&r(),E=null,x=null,B&&(B=null);else if(D>R){// over read
3
+ let e=new Error("Unexpected end of MessagePack data");throw e.incomplete=!0,e}else if(!Y)throw new Error("Data read, but end of buffer not reached");// else more to read, but we are reading sequentially, so don't clear source yet
4
+ return e}catch(e){throw E.restoreStructures&&r(),b(),(e instanceof RangeError||e.message.startsWith("Unexpected end of buffer"))&&(e.incomplete=!0),e}}function r(){for(let e in E.restoreStructures)E[e]=E.restoreStructures[e];E.restoreStructures=null}function s(){let e=x[D++];if(160>e){if(!(128>e)){if(!(144>e)){e-=144;let t=Array(e);for(let n=0;n<e;n++)t[n]=s();return t}if(e-=128,F.mapsAsObjects){let t={};for(let n=0;n<e;n++)t[h()]=s();return t}else{let t=new Map;for(let n=0;n<e;n++)t.set(s(),s());return t}}else if(64>e)return e;else{let t=E[63&e]||F.getStructures&&o()[63&e];return t?(t.read||(t.read=i(t,63&e)),t.read()):e}}else if(192>e){// fixstr
5
+ let t=e-160;if(v>=D)return M.slice(D-j,(D+=t)-j);if(0==v&&140>R){// for small blocks, avoiding the overhead of the extract call is helpful
6
+ let e=16>t?g(t):c(t);if(null!=e)return e}return G(t)}else{let t;switch(e){case 192:return null;case 193:return _?(t=s(),0<t?_[1].slice(_.position1,_.position1+=t):_[0].slice(_.position0,_.position0-=t)):W;// "never-used", return special object to denote that
6
7
  case 194:return!1;case 195:return!0;case 196:// bin 8
7
- return m(A[G++]);case 197:return b=F.getUint16(G),G+=2,m(b);case 198:return b=F.getUint32(G),G+=4,m(b);case 199:// ext 8
8
- return n(A[G++]);case 200:return b=F.getUint16(G),G+=2,n(b);case 201:return b=F.getUint32(G),G+=4,n(b);case 202:if(b=F.getFloat32(G),2<H.useFloat32){// this does rounding of numbers that were encoded in 32-bit float to nearest significant decimal digit that could be preserved
9
- let a=_[(127&A[G])<<1|A[G+1]>>7];return G+=4,(a*b+(0<b?.5:-.5)>>0)/a}return G+=4,b;case 203:return b=F.getFloat64(G),G+=8,b;// uint handlers
10
- case 204:return A[G++];case 205:return b=F.getUint16(G),G+=2,b;case 206:return b=F.getUint32(G),G+=4,b;case 207:return H.int64AsNumber?(b=4294967296*F.getUint32(G),b+=F.getUint32(G+4)):b=F.getBigUint64(G),G+=8,b;// int handlers
11
- case 208:return F.getInt8(G++);case 209:return b=F.getInt16(G),G+=2,b;case 210:return b=F.getInt32(G),G+=4,b;case 211:return H.int64AsNumber?(b=4294967296*F.getInt32(G),b+=F.getUint32(G+4)):b=F.getBigInt64(G),G+=8,b;case 212:if(b=A[G++],114==b)return Y(63&A[G++]);else{let a=K[b];if(a)return a.read?(G++,a.read(e())):a.noBuffer?(G++,a()):a(A.subarray(G,++G));throw new Error("Unknown extension "+b)}case 213:return b=A[G],114==b?(G++,Y(63&A[G++],A[G++])):n(2);case 214:// fixext 4
12
- return n(4);case 215:// fixext 8
13
- return n(8);case 216:// fixext 16
14
- return n(16);case 217:return b=A[G++],J>=G?D.slice(G-I,(G+=b)-I):T(b);case 218:return b=F.getUint16(G),G+=2,J>=G?D.slice(G-I,(G+=b)-I):U(b);case 219:return b=F.getUint32(G),G+=4,J>=G?D.slice(G-I,(G+=b)-I):V(b);case 220:return b=F.getUint16(G),G+=2,i(b);case 221:return b=F.getUint32(G),G+=4,i(b);case 222:return b=F.getUint16(G),G+=2,j(b);case 223:return b=F.getUint32(G),G+=4,j(b);default:// negative int
15
- if(224<=a)return a-256;if(void 0===a){let a=new Error("Unexpected end of MessagePack data");throw a.incomplete=!0,a}throw new Error("Unknown MessagePack token "+a);}}}function f(a,b){function c(){// This initial function is quick to instantiate, but runs slower. After several iterations pay the cost to build the faster function
16
- if(2<c.count++){let c=a.read=new Function("r","return function(){return {"+a.map(a=>Q.test(a)?a+":r()":"["+JSON.stringify(a)+"]:r()").join(",")+"}}")(e);return 0===a.highByte&&(a.read=R(b,a.read)),c();// second byte is already read, if there is one so immediately read object
17
- }let d={};for(let b,c=0,f=a.length;c<f;c++)b=a[c],d[b]=e();return d}return c.count=0,0===a.highByte?R(b,c):c}function g(){let a=p(()=>(A=null,H.getStructures()));return C=H._mergeStructures(a,C)}function h(a){let b;if(16>a&&(b=l(a)))return b;if(64<a&&z)return z.decode(A.subarray(G,G+=a));const c=G+a,d=[];for(b="";G<c;){const a=A[G++];if(0==(128&a))d.push(a);else if(192==(224&a)){// 2 bytes
18
- const b=63&A[G++];d.push((31&a)<<6|b)}else if(224==(240&a)){// 3 bytes
19
- const b=63&A[G++],c=63&A[G++];d.push((31&a)<<12|b<<6|c)}else if(240==(248&a)){// 4 bytes
20
- const b=63&A[G++],c=63&A[G++],e=63&A[G++];let f=(7&a)<<18|b<<12|c<<6|e;65535<f&&(f-=65536,d.push(55296|1023&f>>>10),f=56320|1023&f),d.push(f)}else d.push(a);4096<=d.length&&(b+=W.apply(String,d),d.length=0)}return 0<d.length&&(b+=W.apply(String,d)),b}function i(a){let b=Array(a);for(let c=0;c<a;c++)b[c]=e();return b}function j(a){if(H.mapsAsObjects){let b={};for(let c=0;c<a;c++)b[o()]=e();return b}else{let b=new Map;for(let c=0;c<a;c++)b.set(e(),e());return b}}function k(a){let b=G,c=Array(a);for(let d=0;d<a;d++){const a=A[G++];if(0<(128&a))return void(G=b);c[d]=a}return W.apply(String,c)}function l(p){if(4>p){if(!(2>p)){let d=A[G++],a=A[G++];if(0<(128&d)||0<(128&a))return void(G-=2);if(3>p)return W(d,a);let b=A[G++];return 0<(128&b)?void(G-=3):W(d,a,b)}if(0===p)return"";else{let b=A[G++];return 1<(128&b)?void(G-=1):W(b)}}else{let q=A[G++],a=A[G++],b=A[G++],c=A[G++];if(0<(128&q)||0<(128&a)||0<(128&b)||0<(128&c))return void(G-=4);if(6>p){if(4===p)return W(q,a,b,c);else{let d=A[G++];return 0<(128&d)?void(G-=5):W(q,a,b,c,d)}}else if(8>p){let d=A[G++],e=A[G++];if(0<(128&d)||0<(128&e))return void(G-=6);if(7>p)return W(q,a,b,c,d,e);let f=A[G++];return 0<(128&f)?void(G-=7):W(q,a,b,c,d,e,f)}else{let d=A[G++],e=A[G++],f=A[G++],g=A[G++];if(0<(128&d)||0<(128&e)||0<(128&f)||0<(128&g))return void(G-=8);if(10>p){if(8===p)return W(q,a,b,c,d,e,f,g);else{let h=A[G++];return 0<(128&h)?void(G-=9):W(q,a,b,c,d,e,f,g,h)}}else if(12>p){let h=A[G++],i=A[G++];if(0<(128&h)||0<(128&i))return void(G-=10);if(11>p)return W(q,a,b,c,d,e,f,g,h,i);let j=A[G++];return 0<(128&j)?void(G-=11):W(q,a,b,c,d,e,f,g,h,i,j)}else{let h=A[G++],i=A[G++],j=A[G++],k=A[G++];if(0<(128&h)||0<(128&i)||0<(128&j)||0<(128&k))return void(G-=12);if(!(14>p)){let l=A[G++],m=A[G++];if(0<(128&l)||0<(128&m))return void(G-=14);if(15>p)return W(q,a,b,c,d,e,f,g,h,i,j,k,l,m);let n=A[G++];return 0<(128&n)?void(G-=15):W(q,a,b,c,d,e,f,g,h,i,j,k,l,m,n)}if(12===p)return W(q,a,b,c,d,e,f,g,h,i,j,k);else{let l=A[G++];return 0<(128&l)?void(G-=13):W(q,a,b,c,d,e,f,g,h,i,j,k,l)}}}}}function m(a){return H.copyBuffers?// specifically use the copying slice (not the node one)
21
- Uint8Array.prototype.slice.call(A,G,G+=a):A.subarray(G,G+=a)}function n(a){let b=A[G++];if(K[b])return K[b](A.subarray(G,G+=a));throw new Error("Unknown extension type "+b)}function o(){let a=A[G++];if(160<=a&&192>a){if(a-=160,J>=G)// if it has been extracted, must use it (and faster anyway)
22
- return D.slice(G-I,(G+=a)-I);if(!(0==J&&180>B))return S(a)}else return G--,e();let b,c=4095&(a<<5^(1<a?F.getUint16(G):0<a?A[G]:0)),d=X[c],f=G,g=G+a-3,h=0;if(d&&d.bytes==a){for(;f<g;){if(b=F.getUint32(f),b!=d[h++]){f=1879048192;break}f+=4}for(g+=3;f<g;)if(b=A[f++],b!=d[h++]){f=1879048192;break}if(f===g)return G=f,d.string;g-=3,f=G}for(d=[],X[c]=d,d.bytes=a;f<g;)b=F.getUint32(f),d.push(b),f+=4;for(g+=3;f<g;)b=A[f++],d.push(b);// for small blocks, avoiding the overhead of the extract call is helpful
23
- let j=16>a?l(a):k(a);return null==j?d.string=S(a):d.string=j}// the registration of the record definition extension (as "r")
8
+ return p(x[D++]);case 197:return t=P.getUint16(D),D+=2,p(t);case 198:return t=P.getUint32(D),D+=4,p(t);case 199:// ext 8
9
+ return f(x[D++]);case 200:return t=P.getUint16(D),D+=2,f(t);case 201:return t=P.getUint32(D),D+=4,f(t);case 202:if(t=P.getFloat32(D),2<F.useFloat32){// this does rounding of numbers that were encoded in 32-bit float to nearest significant decimal digit that could be preserved
10
+ let e=re[(127&x[D])<<1|x[D+1]>>7];return D+=4,(e*t+(0<t?.5:-.5)>>0)/e}return D+=4,t;case 203:return t=P.getFloat64(D),D+=8,t;// uint handlers
11
+ case 204:return x[D++];case 205:return t=P.getUint16(D),D+=2,t;case 206:return t=P.getUint32(D),D+=4,t;case 207:return F.int64AsNumber?(t=4294967296*P.getUint32(D),t+=P.getUint32(D+4)):t=P.getBigUint64(D),D+=8,t;// int handlers
12
+ case 208:return P.getInt8(D++);case 209:return t=P.getInt16(D),D+=2,t;case 210:return t=P.getInt32(D),D+=4,t;case 211:return F.int64AsNumber?(t=4294967296*P.getInt32(D),t+=P.getUint32(D+4)):t=P.getBigInt64(D),D+=8,t;case 212:if(t=x[D++],114==t)return Z(63&x[D++]);else{let e=T[t];if(e)return e.read?(D++,e.read(s())):e.noBuffer?(D++,e()):e(x.subarray(D,++D));throw new Error("Unknown extension "+t)}case 213:return t=x[D],114==t?(D++,Z(63&x[D++],x[D++])):f(2);case 214:// fixext 4
13
+ return f(4);case 215:// fixext 8
14
+ return f(8);case 216:// fixext 16
15
+ return f(16);case 217:return t=x[D++],v>=D?M.slice(D-j,(D+=t)-j):H(t);case 218:return t=P.getUint16(D),D+=2,v>=D?M.slice(D-j,(D+=t)-j):J(t);case 219:return t=P.getUint32(D),D+=4,v>=D?M.slice(D-j,(D+=t)-j):K(t);case 220:return t=P.getUint16(D),D+=2,u(t);case 221:return t=P.getUint32(D),D+=4,u(t);case 222:return t=P.getUint16(D),D+=2,d(t);case 223:return t=P.getUint32(D),D+=4,d(t);default:// negative int
16
+ if(224<=e)return e-256;if(void 0===e){let e=new Error("Unexpected end of MessagePack data");throw e.incomplete=!0,e}throw new Error("Unknown MessagePack token "+e);}}}function i(e,t){function n(){// This initial function is quick to instantiate, but runs slower. After several iterations pay the cost to build the faster function
17
+ if(2<n.count++){let n=e.read=new Function("r","return function(){return {"+e.map(e=>$.test(e)?e+":r()":"["+JSON.stringify(e)+"]:r()").join(",")+"}}")(s);return 0===e.highByte&&(e.read=q(t,e.read)),n();// second byte is already read, if there is one so immediately read object
18
+ }let r={};for(let t,n=0,i=e.length;n<i;n++)t=e[n],r[t]=s();return r}return n.count=0,0===e.highByte?q(t,n):n}function o(){let e=y(()=>(x=null,F.getStructures()));return E=F._mergeStructures(e,E)}function a(e){let t;if(16>e&&(t=g(e)))return t;if(64<e&&L)return L.decode(x.subarray(D,D+=e));const n=D+e,r=[];for(t="";D<n;){const e=x[D++];if(0==(128&e))r.push(e);else if(192==(224&e)){// 2 bytes
19
+ const t=63&x[D++];r.push((31&e)<<6|t)}else if(224==(240&e)){// 3 bytes
20
+ const t=63&x[D++],n=63&x[D++];r.push((31&e)<<12|t<<6|n)}else if(240==(248&e)){// 4 bytes
21
+ const t=63&x[D++],n=63&x[D++],s=63&x[D++];let i=(7&e)<<18|t<<12|n<<6|s;65535<i&&(i-=65536,r.push(55296|1023&i>>>10),i=56320|1023&i),r.push(i)}else r.push(e);4096<=r.length&&(t+=Q.apply(String,r),r.length=0)}return 0<r.length&&(t+=Q.apply(String,r)),t}function u(e){let t=Array(e);for(let n=0;n<e;n++)t[n]=s();return t}function d(e){if(F.mapsAsObjects){let t={};for(let n=0;n<e;n++)t[h()]=s();return t}else{let t=new Map;for(let n=0;n<e;n++)t.set(s(),s());return t}}function c(e){let t=D,n=Array(e);for(let r=0;r<e;r++){const e=x[D++];if(0<(128&e))return void(D=t);n[r]=e}return Q.apply(String,n)}function g(t){if(4>t){if(!(2>t)){let e=x[D++],n=x[D++];if(0<(128&e)||0<(128&n))return void(D-=2);if(3>t)return Q(e,n);let r=x[D++];return 0<(128&r)?void(D-=3):Q(e,n,r)}if(0===t)return"";else{let e=x[D++];return 1<(128&e)?void(D-=1):Q(e)}}else{let r=x[D++],s=x[D++],a=x[D++],u=x[D++];if(0<(128&r)||0<(128&s)||0<(128&a)||0<(128&u))return void(D-=4);if(6>t){if(4===t)return Q(r,s,a,u);else{let t=x[D++];return 0<(128&t)?void(D-=5):Q(r,s,a,u,t)}}else if(8>t){let n=x[D++],e=x[D++];if(0<(128&n)||0<(128&e))return void(D-=6);if(7>t)return Q(r,s,a,u,n,e);let i=x[D++];return 0<(128&i)?void(D-=7):Q(r,s,a,u,n,e,i)}else{let d=x[D++],e=x[D++],c=x[D++],g=x[D++];if(0<(128&d)||0<(128&e)||0<(128&c)||0<(128&g))return void(D-=8);if(10>t){if(8===t)return Q(r,s,a,u,d,e,c,g);else{let t=x[D++];return 0<(128&t)?void(D-=9):Q(r,s,a,u,d,e,c,g,t)}}else if(12>t){let n=x[D++],i=x[D++];if(0<(128&n)||0<(128&i))return void(D-=10);if(11>t)return Q(r,s,a,u,d,e,c,g,n,i);let o=x[D++];return 0<(128&o)?void(D-=11):Q(r,s,a,u,d,e,c,g,n,i,o)}else{let p=x[D++],i=x[D++],f=x[D++],h=x[D++];if(0<(128&p)||0<(128&i)||0<(128&f)||0<(128&h))return void(D-=12);if(!(14>t)){let l=x[D++],y=x[D++];if(0<(128&l)||0<(128&y))return void(D-=14);if(15>t)return Q(r,s,a,u,d,e,c,g,p,i,f,h,l,y);let n=x[D++];return 0<(128&n)?void(D-=15):Q(r,s,a,u,d,e,c,g,p,i,f,h,l,y,n)}if(12===t)return Q(r,s,a,u,d,e,c,g,p,i,f,h);else{let t=x[D++];return 0<(128&t)?void(D-=13):Q(r,s,a,u,d,e,c,g,p,i,f,h,t)}}}}}function l(){let e,t=x[D++];if(192>t)// fixstr
22
+ e=t-160;else switch(t){case 217:e=x[D++];break;case 218:e=P.getUint16(D),D+=2;break;case 219:e=P.getUint32(D),D+=4;break;default:throw new Error("Expected string");}return a(e)}function p(e){return F.copyBuffers?// specifically use the copying slice (not the node one)
23
+ Uint8Array.prototype.slice.call(x,D,D+=e):x.subarray(D,D+=e)}function f(e){let t=x[D++];if(T[t])return T[t](x.subarray(D,D+=e));throw new Error("Unknown extension type "+t)}function h(){let e=x[D++];if(160<=e&&192>e){if(e-=160,v>=D)// if it has been extracted, must use it (and faster anyway)
24
+ return M.slice(D-j,(D+=e)-j);if(!(0==v&&180>R))return G(e)}else return D--,s();let t,n=4095&(e<<5^(1<e?P.getUint16(D):0<e?x[D]:0)),r=X[n],o=D,a=D+e-3,u=0;if(r&&r.bytes==e){for(;o<a;){if(t=P.getUint32(o),t!=r[u++]){o=1879048192;break}o+=4}for(a+=3;o<a;)if(t=x[o++],t!=r[u++]){o=1879048192;break}if(o===a)return D=o,r.string;a-=3,o=D}for(r=[],X[n]=r,r.bytes=e;o<a;)t=P.getUint32(o),r.push(t),o+=4;for(a+=3;o<a;)t=x[o++],r.push(t);// for small blocks, avoiding the overhead of the extract call is helpful
25
+ let d=16>e?g(e):c(e);return null==d?r.string=G(e):r.string=d}// the registration of the record definition extension (as "r")
24
26
  // notepack defines extension 0 to mean undefined, so use that as the default here
25
27
  // registration of bulk record definition?
26
28
  // currentExtensions[0x52] = () =>
27
- function p(a){let b=B,c=G,d=I,e=J,f=D,g=E,h=new Uint8Array(A.slice(0,B)),i=C,j=C.slice(0,C.length),k=H,l=O,m=a();return B=b,G=c,I=d,J=e,D=f,E=g,A=h,O=l,C=i,C.splice(0,C.length,...j),H=k,F=new DataView(A.buffer,A.byteOffset,A.byteLength),m}function q(){A=null,E=null,C=null}function r(a){K[a.type]=a.unpack?a.unpack:a}function s(a,b,c){let d=a.byteLength;if(256>d+1){var{target:e,position:f}=c(4+d);e[f++]=199,e[f++]=d+1}else if(65536>d+1){var{target:e,position:f}=c(5+d);e[f++]=200,e[f++]=d+1>>8,e[f++]=255&d+1}else{var{target:e,position:f,targetView:g}=c(7+d);// plus one for the type byte
28
- e[f++]=201,g.setUint32(f,d+1),f+=4}// "t" for typed array
29
- e[f++]=116,e[f++]=b,e.set(new Uint8Array(a.buffer,a.byteOffset,a.byteLength),f)}function t(a,b){let c=a.byteLength;var d,e;if(256>c){var{target:d,position:e}=b(c+2);d[e++]=196,d[e++]=c}else if(65536>c){var{target:d,position:e}=b(c+3);d[e++]=197,d[e++]=c>>8,d[e++]=255&c}else{var{target:d,position:e,targetView:f}=b(c+5);d[e++]=198,f.setUint32(e,c),e+=4}d.set(a,e)}function u(a,b,c,d){let e=a.length;return 1===e?b[c++]=212:2===e?b[c++]=213:4===e?b[c++]=214:8===e?b[c++]=215:16===e?b[c++]=216:256>e?(b[c++]=199,b[c++]=e):65536>e?(b[c++]=200,b[c++]=e>>8,b[c++]=255&e):(b[c++]=201,b[c++]=e>>24,b[c++]=255&e>>16,b[c++]=255&e>>8,b[c++]=255&e),b[c++]=d,b.set(a,c),c+=e,c}function v(a,b){// insert the ids that need to be referenced for structured clones
30
- let c,d=6*b.length,e=a.length-d;for(b.sort((c,a)=>c.offset>a.offset?1:-1);c=b.pop();){let b=c.offset,f=c.id;a.copyWithin(b+d,b,e),d-=6;let g=b+d;// 'i'
31
- a[g++]=214,a[g++]=105,a[g++]=f>>24,a[g++]=255&f>>16,a[g++]=255&f>>8,a[g++]=255&f,e=b}return a}function w(a){if(a.Class){if(!a.pack&&!a.write)throw new Error("Extension has no pack or write function");if(a.pack&&!a.type)throw new Error("Extension has no type (numeric code to identify the extension)");ja.unshift(a.Class),ia.unshift(a)}r(a)}function*x(a,b){const c=new ta(b);for(const d of a)yield c.pack(d)}async function*y(a,b){const c=new ta(b);for await(const d of a)yield c.pack(d)}/**
29
+ function y(e){let t=R,n=D,r=j,s=v,i=M,o=B,a=_,u=new Uint8Array(x.slice(0,R)),d=E,c=E.slice(0,E.length),g=F,l=Y,p=e();return R=t,D=n,j=r,v=s,M=i,B=o,_=a,x=u,Y=l,E=d,E.splice(0,E.length,...c),F=g,P=new DataView(x.buffer,x.byteOffset,x.byteLength),p}function b(){x=null,B=null,E=null}function m(e){T[e.type]=e.unpack?e.unpack:e}function k(e,t,n){let r=e.byteLength;if(256>r+1){var{target:s,position:i}=n(4+r);s[i++]=199,s[i++]=r+1}else if(65536>r+1){var{target:s,position:i}=n(5+r);s[i++]=200,s[i++]=r+1>>8,s[i++]=255&r+1}else{var{target:s,position:i,targetView:o}=n(7+r);// plus one for the type byte
30
+ s[i++]=201,o.setUint32(i,r+1),i+=4}// "t" for typed array
31
+ s[i++]=116,s[i++]=t,s.set(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),i)}function U(e,t){let n=e.byteLength;var r,s;if(256>n){var{target:r,position:s}=t(n+2);r[s++]=196,r[s++]=n}else if(65536>n){var{target:r,position:s}=t(n+3);r[s++]=197,r[s++]=n>>8,r[s++]=255&n}else{var{target:r,position:s,targetView:i}=t(n+5);r[s++]=198,i.setUint32(s,n),s+=4}r.set(e,s)}function I(e,t,n,r){let s=e.length;return 1===s?t[n++]=212:2===s?t[n++]=213:4===s?t[n++]=214:8===s?t[n++]=215:16===s?t[n++]=216:256>s?(t[n++]=199,t[n++]=s):65536>s?(t[n++]=200,t[n++]=s>>8,t[n++]=255&s):(t[n++]=201,t[n++]=s>>24,t[n++]=255&s>>16,t[n++]=255&s>>8,t[n++]=255&s),t[n++]=r,t.set(e,n),n+=s,n}function S(e,t){// insert the ids that need to be referenced for structured clones
32
+ let n,r=6*t.length,s=e.length-r;for(t.sort((e,t)=>e.offset>t.offset?1:-1);n=t.pop();){let t=n.offset,i=n.id;e.copyWithin(t+r,t,s),r-=6;let o=t+r;// 'i'
33
+ e[o++]=214,e[o++]=105,e[o++]=i>>24,e[o++]=255&i>>16,e[o++]=255&i>>8,e[o++]=255&i,s=t}return e}function O(e,t){Ue.setUint32(Oe.position+e,Se-Oe.position-e);let n=Oe;Oe=null,t(n[0]),t(n[1])}function A(e){if(e.Class){if(!e.pack&&!e.write)throw new Error("Extension has no pack or write function");if(e.pack&&!e.type)throw new Error("Extension has no type (numeric code to identify the extension)");pe.unshift(e.Class),le.unshift(e)}m(e)}function*w(e,t){const n=new we(t);for(const r of e)yield n.pack(r)}async function*C(e,t){const n=new we(t);for await(const r of e)yield n.pack(r)}/**
32
34
  * Given an Iterable/Iterator input which yields buffers, returns an IterableIterator which yields sync decoded objects
33
35
  * Or, given an Async Iterable/Iterator which yields promises resolving in buffers, returns an AsyncIterableIterator.
34
36
  * @param {Iterable|Iterator|AsyncIterable|AsyncIterableIterator} bufferIterator
35
37
  * @param {object} [options] - unpackr options
36
38
  * @returns {IterableIterator|Promise.<AsyncIterableIterator}
37
- */var z;try{z=new TextDecoder}catch(a){}var A,B,C,D,E,F,G=0,H={},I=0,J=0,K=[],L={useRecords:!1,mapsAsObjects:!0};class M{}const N=new M;N.name="MessagePack 0xC1";var O=!1;class P{constructor(a){a&&(!1===a.useRecords&&a.mapsAsObjects===void 0&&(a.mapsAsObjects=!0),a.structures?a.structures.sharedLength=a.structures.length:a.getStructures&&((a.structures=[]).uninitialized=!0,a.structures.sharedLength=0)),Object.assign(this,a)}unpack(a,b){if(A)// re-entrant execution, save the state and restore it after we do this unpack
38
- return p(()=>(q(),this?this.unpack(a,b):P.prototype.unpack.call(L,a,b)));B=-1<b?b:a.length,G=0,J=0,D=null,A=a;// this provides cached access to the data view for a buffer if it is getting reused, which is a recommend
39
+ */var L;try{L=new TextDecoder}catch(e){}var x,R,E,M,_,B,P,D=0,F={},j=0,v=0,T=[],N={useRecords:!1,mapsAsObjects:!0};class V{}const W=new V;W.name="MessagePack 0xC1";var Y=!1;class z{constructor(e){e&&(!1===e.useRecords&&e.mapsAsObjects===void 0&&(e.mapsAsObjects=!0),e.structures?e.structures.sharedLength=e.structures.length:e.getStructures&&((e.structures=[]).uninitialized=!0,e.structures.sharedLength=0)),Object.assign(this,e)}unpack(e,t){if(x)// re-entrant execution, save the state and restore it after we do this unpack
40
+ return y(()=>(b(),this?this.unpack(e,t):z.prototype.unpack.call(N,e,t)));R=-1<t?t:e.length,D=0,v=0,M=null,_=null,x=e;// this provides cached access to the data view for a buffer if it is getting reused, which is a recommend
39
41
  // technique for getting data from a database where it can be copied into an existing buffer instead of creating
40
42
  // new ones
41
- try{F=a.dataView||(a.dataView=new DataView(a.buffer,a.byteOffset,a.byteLength))}catch(b){if(A=null,a instanceof Uint8Array)throw b;throw new Error("Source must be a Uint8Array or Buffer but was a "+(a&&"object"==typeof a?a.constructor.name:typeof a))}if(this instanceof P){if(H=this,this.structures)return C=this.structures,c();(!C||0<C.length)&&(C=[])}else H=L,(!C||0<C.length)&&(C=[]);return c()}unpackMultiple(a,b){let d,e=0;try{O=!0;let f=a.length,g=this?this.unpack(a,f):aa.unpack(a,f);if(b){for(b(g);G<f;)if(e=G,!1===b(c()))return;}else{for(d=[g];G<f;)e=G,d.push(c());return d}}catch(a){throw a.lastPosition=e,a.values=d,a}finally{O=!1,q()}}_mergeStructures(a,b){a=a||[];for(let c,d=0,e=a.length;d<e;d++)c=a[d],c&&(c.isShared=!0,32<=d&&(c.highByte=d-32>>5));for(let c in a.sharedLength=a.length,b||[])if(0<=c){let d=a[c],e=b[c];e&&(d&&((a.restoreStructures||(a.restoreStructures=[]))[c]=d),a[c]=e)}return this.structures=a}decode(a,b){return this.unpack(a,b)}}const Q=/^[a-zA-Z_$][a-zA-Z\d_$]*$/,R=(a,b)=>function(){let c=A[G++];if(0===c)return b();let d=32>a?-(a+(c<<5)):a+(c<<5),e=C[d]||g()[d];if(!e)throw new Error("Record id is not defined for "+d);return e.read||(e.read=f(e,a)),e.read()};var S=h,T=h,U=h,V=h;var W=String.fromCharCode,X=Array(4096);const Y=(a,b)=>{var c=e();let d=a;void 0!==b&&(a=32>a?-((b<<5)+a):(b<<5)+a,c.highByte=b);let g=C[a];return g&&g.isShared&&((C.restoreStructures||(C.restoreStructures=[]))[a]=g),C[a]=c,c.read=f(c,d),c.read()};var Z="object"==typeof self?self:global;K[0]=()=>{},K[0].noBuffer=!0,K[101]=()=>{let a=e();return(Z[a[0]]||Error)(a[1])},K[105]=()=>{// id extension (for structured clones)
42
- let a=F.getUint32(G-4);E||(E=new Map);let b,c=A[G];b=144<=c&&160>c||220==c||221==c?[]:{};let d={target:b};// a placeholder object
43
- E.set(a,d);let f=e();// read the next value as the target object to id
44
- return d.used?Object.assign(b,f):(d.target=f,f);// no cycle, can just use the returned read object
45
- },K[112]=()=>{// pointer extension (for structured clones)
46
- let a=F.getUint32(G-4),b=E.get(a);return b.used=!0,b.target},K[115]=()=>new Set(e());const $=["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64","BigInt64","BigUint64"].map(a=>a+"Array");K[116]=a=>{let b=a[0],c=$[b];if(!c)throw new Error("Could not find typed array for code "+b);// we have to always slice/copy here to get a new ArrayBuffer that is word/byte aligned
47
- return new Z[c](Uint8Array.prototype.slice.call(a,1).buffer)},K[120]=()=>{let a=e();return new RegExp(a[0],a[1])},K[255]=a=>{// 32-bit date extension
48
- if(4==a.length)return new Date(1e3*(16777216*a[0]+(a[1]<<16)+(a[2]<<8)+a[3]));if(8==a.length)return new Date(((a[0]<<22)+(a[1]<<14)+(a[2]<<6)+(a[3]>>2))/1e6+1e3*(4294967296*(3&a[3])+16777216*a[4]+(a[5]<<16)+(a[6]<<8)+a[7]));if(12==a.length)// TODO: Implement support for negative
49
- return new Date(((a[0]<<24)+(a[1]<<16)+(a[2]<<8)+a[3])/1e6+1e3*((128&a[4]?-281474976710656:0)+1099511627776*a[6]+4294967296*a[7]+16777216*a[8]+(a[9]<<16)+(a[10]<<8)+a[11]));throw new Error("Invalid timestamp length")};const _=Array(147);// this is a table matching binary exponents to the multiplier to determine significant digit rounding
50
- for(let c=0;256>c;c++)_[c]=+("1e"+b(45.15-.30103*c));var aa=new P({useRecords:!1});const ba=aa.unpack,ca=aa.unpackMultiple,da=aa.unpack,ea={NEVER:0,ALWAYS:1,DECIMAL_ROUND:3,DECIMAL_FIT:4};let fa,ga=new Float32Array(1),ha=new Uint8Array(ga.buffer,0,4);try{fa=new TextEncoder}catch(a){}let ia,ja;const ka="undefined"!=typeof Buffer,la=ka?Buffer.allocUnsafeSlow:Uint8Array,ma=ka?Buffer:Uint8Array,na=ka?4294967296:2144337920;let oa,pa,qa,ra=0;const sa=Symbol("record-id");class ta extends P{constructor(a){super(a),this.offset=0;let b,c,d,e,f,g=0,h=ma.prototype.utf8Write?function(a,b,c){return oa.utf8Write(a,b,c)}:!!(fa&&fa.encodeInto)&&function(a,b){return fa.encodeInto(a,oa.subarray(b)).written},i=this;a||(a={});let j=a&&a.sequential,k=a.structures||a.saveStructures,l=a.maxSharedStructures;if(null==l&&(l=k?32:0),8160<l)throw new Error("Maximum maxSharedStructure is 8160");let m=a.maxOwnStructures;null==m&&(m=k?32:64),j&&!a.saveStructures&&(this.structures=[]);// two byte record ids for shared structures
51
- let n=32<l||64<m+l,o=l+64,p=l+m+64;if(8256<p)throw new Error("Maximum maxSharedStructure + maxOwnStructure is 8192");let q=[],r=0,s=0;this.pack=this.encode=function(a,h){if(oa||(oa=new la(8192),pa=new DataView(oa.buffer,0,8192),ra=0),qa=oa.length-10,2048>qa-ra?(oa=new la(oa.length),pa=new DataView(oa.buffer,0,oa.length),qa=oa.length-10,ra=0):ra=2147483640&ra+7,b=ra,f=i.structuredClone?new Map:null,c=i.structures,c){c.uninitialized&&(c=i._mergeStructures(i.getStructures()));let a=c.sharedLength||0;if(a>l)//if (maxSharedStructures <= 32 && sharedStructures.sharedLength > 32) // TODO: could support this, but would need to update the limit ids
52
- throw new Error("Shared structures is larger than maximum shared structures, try increasing maxSharedStructures to "+c.sharedLength);if(!c.transitions){c.transitions=Object.create(null);for(let b,d=0;d<a;d++){if(b=c[d],!b)continue;let a,e=c.transitions;for(let c,d=0,f=b.length;d<f;d++)c=b[d],a=e[c],a||(a=e[c]=Object.create(null)),e=a;e[sa]=d+64}g=a}j||(c.nextId=a+64)}d&&(d=!1),e=c||[];try{// update the offset so next serialization doesn't write over our buffer, but can continue writing to same buffer sequentially
53
- if(t(a),i.offset=ra,f&&f.idsToInsert){ra+=6*f.idsToInsert.length,ra>qa&&x(ra),i.offset=ra;let a=v(oa.subarray(b,ra),f.idsToInsert);return f=null,a}return h===Ba?(oa.start=b,oa.end=ra,oa):oa.subarray(b,ra);// position can change if we call pack again in saveStructures, so we get the buffer now
54
- }finally{if(c){if(10>s&&s++,1e4<r)c.transitions=null,s=0,r=0,0<q.length&&(q=[]);else if(0<q.length&&!j){for(let a=0,b=q.length;a<b;a++)q[a][sa]=0;q=[]}if(d&&i.saveStructures){let d=c.sharedLength||l;c.length>d&&(c=c.slice(0,d));// we can't rely on start/end with REUSE_BUFFER_MODE since they will (probably) change when we save
55
- let e=oa.subarray(b,ra);return!1===i.saveStructures(c,g)?(i._mergeStructures(i.getStructures()),i.pack(a)):(g=d,e)}}}};const t=a=>{ra>qa&&(oa=x(ra));var c,d=typeof a;if("string"==d){let b,d=a.length;b=32>d?1:256>d?2:65536>d?3:5;let e=3*d;if(ra+e>qa&&(oa=x(ra+e)),64>d||!h){let e,f,g,h=ra+b;for(e=0;e<d;e++)f=a.charCodeAt(e),128>f?oa[h++]=f:2048>f?(oa[h++]=192|f>>6,oa[h++]=128|63&f):55296==(64512&f)&&56320==(64512&(g=a.charCodeAt(e+1)))?(f=65536+((1023&f)<<10)+(1023&g),e++,oa[h++]=240|f>>18,oa[h++]=128|63&f>>12,oa[h++]=128|63&f>>6,oa[h++]=128|63&f):(oa[h++]=224|f>>12,oa[h++]=128|63&f>>6,oa[h++]=128|63&f);c=h-ra-b}else c=h(a,ra+b,e);32>c?oa[ra++]=160|c:256>c?(2>b&&oa.copyWithin(ra+2,ra+1,ra+1+c),oa[ra++]=217,oa[ra++]=c):65536>c?(3>b&&oa.copyWithin(ra+3,ra+2,ra+2+c),oa[ra++]=218,oa[ra++]=c>>8,oa[ra++]=255&c):(5>b&&oa.copyWithin(ra+5,ra+3,ra+3+c),oa[ra++]=219,pa.setUint32(ra,c),ra+=4),ra+=c}else if("number"===d){if(a>>>0===a)64>a?oa[ra++]=a:256>a?(oa[ra++]=204,oa[ra++]=a):65536>a?(oa[ra++]=205,oa[ra++]=a>>8,oa[ra++]=255&a):(oa[ra++]=206,pa.setUint32(ra,a),ra+=4);else if(a>>0===a)-32<=a?oa[ra++]=256+a:-128<=a?(oa[ra++]=208,oa[ra++]=a+256):-32768<=a?(oa[ra++]=209,pa.setInt16(ra,a),ra+=2):(oa[ra++]=210,pa.setInt32(ra,a),ra+=4);else{let b;if(0<(b=this.useFloat32)&&4294967296>a&&-2147483648<=a){oa[ra++]=202,pa.setFloat32(ra,a);let c;if(4>b||// this checks for rounding of numbers that were encoded in 32-bit float to nearest significant decimal digit that could be preserved
56
- (c=a*_[(127&oa[ra])<<1|oa[ra+1]>>7])>>0===c)return void(ra+=4);// move back into position for writing a double
57
- ra--}oa[ra++]=203,pa.setFloat64(ra,a),ra+=8}}else if("object"===d){if(!a)oa[ra++]=192;else{if(f){let c=f.get(a);if(c){if(!c.id){let a=f.idsToInsert||(f.idsToInsert=[]);c.id=a.push(c)}return oa[ra++]=214,oa[ra++]=112,pa.setUint32(ra,c.id),void(ra+=4)}f.set(a,{offset:ra-b})}let d=a.constructor;if(d===Object)w(a,!0);else if(d===Array){c=a.length,16>c?oa[ra++]=144|c:65536>c?(oa[ra++]=220,oa[ra++]=c>>8,oa[ra++]=255&c):(oa[ra++]=221,pa.setUint32(ra,c),ra+=4);for(let b=0;b<c;b++)t(a[b])}else if(d===Map){c=a.size,16>c?oa[ra++]=128|c:65536>c?(oa[ra++]=222,oa[ra++]=c>>8,oa[ra++]=255&c):(oa[ra++]=223,pa.setUint32(ra,c),ra+=4);for(let[b,c]of a)t(b),t(c)}else{for(let b,c=0,d=ia.length;c<d;c++)if(b=ja[c],a instanceof b){let b=ia[c];if(b.write)return b.type&&(oa[ra++]=212,oa[ra++]=b.type,oa[ra++]=0),void t(b.write.call(this,a));let d=oa,e=pa,f=ra;oa=null;let g;try{g=b.pack.call(this,a,a=>(oa=d,d=null,ra+=a,ra>qa&&x(ra),{target:oa,targetView:pa,position:ra-a}),t)}finally{d&&(oa=d,pa=e,ra=f,qa=oa.length-10)}return void(g&&(g.length+ra>qa&&x(g.length+ra),ra=u(g,oa,ra,b.type)))}// no extension found, write as object
58
- w(a,!a.hasOwnProperty)}}}else if("boolean"===d)oa[ra++]=a?195:194;else if("bigint"===d){if(a<BigInt(1)<<BigInt(63)&&a>=-(BigInt(1)<<BigInt(63)))oa[ra++]=211,pa.setBigInt64(ra,a);else if(a<BigInt(1)<<BigInt(64)&&0<a)oa[ra++]=207,pa.setBigUint64(ra,a);else// overflow
59
- if(this.largeBigIntToFloat)oa[ra++]=203,pa.setFloat64(ra,+a);else throw new RangeError(a+" was too large to fit in MessagePack 64-bit integer format, set largeBigIntToFloat to convert to float-64");ra+=8}else if("undefined"===d)this.encodeUndefinedAsNil?oa[ra++]=192:(oa[ra++]=212,oa[ra++]=0,oa[ra++]=0);else if("function"===d)t(this.writeFunction&&this.writeFunction());else throw new Error("Unknown type: "+d)},w=!1===this.useRecords?this.variableMapSize?a=>{// this method is slightly slower, but generates "preferred serialization" (optimally small for smaller objects)
60
- let b=Object.keys(a),c=b.length;16>c?oa[ra++]=128|c:65536>c?(oa[ra++]=222,oa[ra++]=c>>8,oa[ra++]=255&c):(oa[ra++]=223,pa.setUint32(ra,c),ra+=4);let d;for(let e=0;e<c;e++)t(d=b[e]),t(a[d])}:(a,c)=>{oa[ra++]=222;// always using map 16, so we can preallocate and set the length afterwards
61
- let d=ra-b;ra+=2;let e=0;for(let b in a)(c||a.hasOwnProperty(b))&&(t(b),t(a[b]),e++);oa[d++ +b]=e>>8,oa[d+b]=255&e}:/* sharedStructures ? // For highly stable structures, using for-in can a little bit faster
62
- (object, safePrototype) => {
63
- let nextTransition, transition = structures.transitions || (structures.transitions = Object.create(null))
64
- let objectOffset = position++ - start
65
- let wroteKeys
66
- for (let key in object) {
67
- if (safePrototype || object.hasOwnProperty(key)) {
68
- nextTransition = transition[key]
69
- if (!nextTransition) {
70
- nextTransition = transition[key] = Object.create(null)
71
- nextTransition.__keys__ = (transition.__keys__ || []).concat([key])
72
- /*let keys = Object.keys(object)
73
- if
74
- let size = 0
75
- let startBranch = transition.__keys__ ? transition.__keys__.length : 0
76
- for (let i = 0, l = keys.length; i++) {
77
- let key = keys[i]
78
- size += key.length << 2
79
- if (i >= startBranch) {
80
- nextTransition = nextTransition[key] = Object.create(null)
81
- nextTransition.__keys__ = keys.slice(0, i + 1)
82
- }
83
- }
84
- makeRoom(position + size)
85
- nextTransition = transition[key]
86
- target.copy(target, )
87
- objectOffset
88
- }
89
- transition = nextTransition
90
- pack(object[key])
91
- }
92
- }
93
- let id = transition.id
94
- if (!id) {
95
- id = transition.id = structures.push(transition.__keys__) + 63
96
- if (sharedStructures.onUpdate)
97
- sharedStructures.onUpdate(id, transition.__keys__)
98
- }
99
- target[objectOffset + start] = id
100
- }*/a=>{let b,c=Object.keys(a),f=e.transitions||(e.transitions=Object.create(null)),g=0;for(let d,e=0,h=c.length;e<h;e++)d=c[e],b=f[d],b||(b=f[d]=Object.create(null),g++),f=b;let h=f[sa];if(h)96<=h&&n?(oa[ra++]=(31&(h-=96))+96,oa[ra++]=h>>5):oa[ra++]=h;else{h=e.nextId,h||(h=64),h<o&&this.shouldShareStructure&&!this.shouldShareStructure(c)?(h=e.nextOwnId,!(h<p)&&(h=o),e.nextOwnId=h+1):(h>=p&&(// cycle back around
101
- h=o),e.nextId=h+1);let a=c.highByte=96<=h&&n?h-96>>5:-1;f[sa]=h,e[h-64]=c,h<o?(c.isShared=!0,e.sharedLength=h-63,d=!0,0<=a?(oa[ra++]=(31&h)+96,oa[ra++]=a):oa[ra++]=h):(0<=a?(oa[ra++]=213,oa[ra++]=114,oa[ra++]=(31&h)+96,oa[ra++]=a):(oa[ra++]=212,oa[ra++]=114,oa[ra++]=h),g&&(r+=s*g),q.length>=m&&(q.shift()[sa]=0),q.push(f),t(c))}// now write the values
102
- for(let b=0,d=c.length;b<d;b++)t(a[c[b]])},x=a=>{var c=Math.min,d=Math.round,e=Math.max;let f;if(16777216<a){// special handling for really large buffers
103
- if(a-b>na)throw new Error("Packed buffer would be larger than maximum buffer size");f=c(na,4096*d(e((a-b)*(67108864<a?1.25:2),4194304)/4096))}else// faster handling for smaller buffers
104
- f=(e(a-b<<2,oa.length-1)>>12)+1<<12;let g=new la(f);return pa=new DataView(g.buffer,0,f),oa.copy?oa.copy(g,0,b,a):g.set(oa.slice(b,a)),ra-=b,b=0,qa=g.length-10,oa=g}}useBuffer(a){// this means we are finished using our own buffer and we can write over it safely
105
- oa=a,pa=new DataView(oa.buffer,oa.byteOffset,oa.byteLength),ra=0}}ja=[Date,Set,Error,RegExp,ArrayBuffer,Object.getPrototypeOf(Uint8Array.prototype).constructor/*TypedArray*/,M],ia=[{pack(a,c){let d=a.getTime()/1e3;if((this.useTimestamp32||0===a.getMilliseconds())&&0<=d&&4294967296>d){// Timestamp 32
106
- let{target:a,targetView:b,position:e}=c(6);a[e++]=214,a[e++]=255,b.setUint32(e,d)}else if(0<d&&17179869184>d){// Timestamp 64
107
- let{target:b,targetView:e,position:f}=c(10);b[f++]=215,b[f++]=255,e.setUint32(f,4e6*a.getMilliseconds()+(d/1e3/4294967296>>0)),e.setUint32(f+4,d)}else{// Timestamp 96
108
- let{target:e,targetView:f,position:g}=c(15);e[g++]=199,e[g++]=12,e[g++]=255,f.setUint32(g,1e6*a.getMilliseconds()),f.setBigInt64(g+4,BigInt(b(d)))}}},{pack(a,b,c){let d=Array.from(a),{target:e,position:f}=b(this.structuredClone?3:0);this.structuredClone&&(e[f++]=212,e[f++]=115,e[f++]=0),c(d)}},{pack(a,b,c){let{target:d,position:e}=b(this.structuredClone?3:0);this.structuredClone&&(d[e++]=212,d[e++]=101,d[e++]=0),c([a.name,a.message])}},{pack(a,b,c){let{target:d,position:e}=b(this.structuredClone?3:0);this.structuredClone&&(d[e++]=212,d[e++]=120,d[e++]=0),c([a.source,a.flags])}},{pack(a,b){this.structuredClone?s(a,16,b):t(ka?Buffer.from(a):new Uint8Array(a),b)}},{pack(a,b){let c=a.constructor;c!==ma&&this.structuredClone?s(a,$.indexOf(c.name),b):t(a,b)}},{pack(a,b){// specific 0xC1 object
109
- let{target:c,position:d}=b(1);c[d]=193}}];let ua=new ta({useRecords:!1});const va=ua.pack,wa=ua.pack,{NEVER:xa,ALWAYS:ya,DECIMAL_ROUND:za,DECIMAL_FIT:Aa}=ea,Ba=1e3;a.ALWAYS=ya,a.C1=N,a.DECIMAL_FIT=Aa,a.DECIMAL_ROUND=za,a.Decoder=P,a.Encoder=ta,a.FLOAT32_OPTIONS=ea,a.NEVER=xa,a.Packr=ta,a.REUSE_BUFFER_MODE=Ba,a.Unpackr=P,a.addExtension=w,a.clearSource=q,a.decode=da,a.decodeIter=function(a,b={}){if(!a||"object"!=typeof a)throw new Error("first argument must be an Iterable, Async Iterable, Iterator, Async Iterator, or a promise");const c=new P(b);let d;const e=a=>{let b;// if there's incomplete data from previous chunk, concatinate and try again
110
- d&&(a=Buffer.concat([d,a]),d=void 0);try{b=c.unpackMultiple(a)}catch(c){if(c.incomplete)d=a.slice(c.lastPosition),b=c.values;else throw c}return b};if("function"==typeof a[Symbol.iterator])return function*(){for(const b of a)yield*e(b)}();return"function"==typeof a[Symbol.asyncIterator]?async function*(){for await(const b of a)yield*e(b)}():void 0},a.encode=wa,a.encodeIter=/**
43
+ try{P=e.dataView||(e.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength))}catch(t){if(x=null,e instanceof Uint8Array)throw t;throw new Error("Source must be a Uint8Array or Buffer but was a "+(e&&"object"==typeof e?e.constructor.name:typeof e))}if(this instanceof z){if(F=this,this.structures)return E=this.structures,n();(!E||0<E.length)&&(E=[])}else F=N,(!E||0<E.length)&&(E=[]);return n()}unpackMultiple(e,t){let r,s=0;try{Y=!0;let i=e.length,o=this?this.unpack(e,i):se.unpack(e,i);if(t){for(t(o);D<i;)if(s=D,!1===t(n()))return;}else{for(r=[o];D<i;)s=D,r.push(n());return r}}catch(e){throw e.lastPosition=s,e.values=r,e}finally{Y=!1,b()}}_mergeStructures(e,t){e=e||[];for(let n,r=0,s=e.length;r<s;r++)n=e[r],n&&(n.isShared=!0,32<=r&&(n.highByte=r-32>>5));for(let n in e.sharedLength=e.length,t||[])if(0<=n){let r=e[n],s=t[n];s&&(r&&((e.restoreStructures||(e.restoreStructures=[]))[n]=r),e[n]=s)}return this.structures=e}decode(e,t){return this.unpack(e,t)}}const $=/^[a-zA-Z_$][a-zA-Z\d_$]*$/,q=(e,t)=>function(){let n=x[D++];if(0===n)return t();let r=32>e?-(e+(n<<5)):e+(n<<5),s=E[r]||o()[r];if(!s)throw new Error("Record id is not defined for "+r);return s.read||(s.read=i(s,e)),s.read()};var G=a,H=a,J=a,K=a;var Q=String.fromCharCode,X=Array(4096);const Z=(e,t)=>{var n=s();let r=e;void 0!==t&&(e=32>e?-((t<<5)+e):(t<<5)+e,n.highByte=t);let o=E[e];return o&&o.isShared&&((E.restoreStructures||(E.restoreStructures=[]))[e]=o),E[e]=n,n.read=i(n,r),n.read()};var ee="object"==typeof self?self:global;T[0]=()=>{},T[0].noBuffer=!0,T[101]=()=>{let e=s();return(ee[e[0]]||Error)(e[1])},T[105]=()=>{// id extension (for structured clones)
44
+ let e=P.getUint32(D-4);B||(B=new Map);let t,n=x[D];t=144<=n&&160>n||220==n||221==n?[]:{};let r={target:t};// a placeholder object
45
+ B.set(e,r);let i=s();// read the next value as the target object to id
46
+ return r.used?Object.assign(t,i):(r.target=i,i);// no cycle, can just use the returned read object
47
+ },T[112]=()=>{// pointer extension (for structured clones)
48
+ let e=P.getUint32(D-4),t=B.get(e);return t.used=!0,t.target},T[115]=()=>new Set(s());const te=["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64","BigInt64","BigUint64"].map(e=>e+"Array");T[116]=e=>{let t=e[0],n=te[t];if(!n)throw new Error("Could not find typed array for code "+t);// we have to always slice/copy here to get a new ArrayBuffer that is word/byte aligned
49
+ return new ee[n](Uint8Array.prototype.slice.call(e,1).buffer)},T[120]=()=>{let e=s();return new RegExp(e[0],e[1])};const ne=[];T[98]=e=>{let t=(e[0]<<24)+(e[1]<<16)+(e[2]<<8)+e[3],n=D;return D+=t-e.length,_=ne,_=[l(),l()],_.position0=0,_.position1=0,_.postBundlePosition=D,D=n,s()},T[255]=e=>4==e.length?new Date(1e3*(16777216*e[0]+(e[1]<<16)+(e[2]<<8)+e[3])):8==e.length?new Date(((e[0]<<22)+(e[1]<<14)+(e[2]<<6)+(e[3]>>2))/1e6+1e3*(4294967296*(3&e[3])+16777216*e[4]+(e[5]<<16)+(e[6]<<8)+e[7])):12==e.length?new Date(((e[0]<<24)+(e[1]<<16)+(e[2]<<8)+e[3])/1e6+1e3*((128&e[4]?-281474976710656:0)+1099511627776*e[6]+4294967296*e[7]+16777216*e[8]+(e[9]<<16)+(e[10]<<8)+e[11])):new Date("invalid");const re=Array(147);// this is a table matching binary exponents to the multiplier to determine significant digit rounding
50
+ for(let n=0;256>n;n++)re[n]=+("1e"+t(45.15-.30103*n));var se=new z({useRecords:!1});const ie=se.unpack,oe=se.unpackMultiple,ae=se.unpack,ue={NEVER:0,ALWAYS:1,DECIMAL_ROUND:3,DECIMAL_FIT:4};let de,ce=new Float32Array(1),ge=new Uint8Array(ce.buffer,0,4);try{de=new TextEncoder}catch(e){}let le,pe;const fe="undefined"!=typeof Buffer,he=fe?Buffer.allocUnsafeSlow:Uint8Array,ye=fe?Buffer:Uint8Array,be=fe?4294967296:2144337920;let me,ke,Ue,Ie,Se=0,Oe=null;const Ae=Symbol("record-id");class we extends z{constructor(e){super(e),this.offset=0;let t,n,r,s,i=0,o=ye.prototype.utf8Write?function(e,t,n){return me.utf8Write(e,t,n)}:!!(de&&de.encodeInto)&&function(e,t){return de.encodeInto(e,me.subarray(t)).written},a=this;e||(e={});let u=e&&e.sequential,d=e.structures||e.saveStructures,c=e.maxSharedStructures;if(null==c&&(c=d?32:0),8160<c)throw new Error("Maximum maxSharedStructure is 8160");let g=e.maxOwnStructures;null==g&&(g=d?32:64),this.structures||!1==e.useRecords||(this.structures=[]);// two byte record ids for shared structures
51
+ let l=32<c||64<g+c,p=c+64,f=c+g+64;if(8256<f)throw new Error("Maximum maxSharedStructure + maxOwnStructure is 8192");let h=[],y=0,b=0;this.pack=this.encode=function(e,o){if(me||(me=new he(8192),Ue=new DataView(me.buffer,0,8192),Se=0),Ie=me.length-10,2048>Ie-Se?(me=new he(me.length),Ue=new DataView(me.buffer,0,me.length),Ie=me.length-10,Se=0):Se=2147483640&Se+7,t=Se,s=a.structuredClone?new Map:null,a.bundleStrings&&"string"!=typeof e?(Oe=[],Oe.size=1/0):Oe=null,r=a.structures,r){r.uninitialized&&(r=a._mergeStructures(a.getStructures()));let e=r.sharedLength||0;if(e>c)//if (maxSharedStructures <= 32 && structures.sharedLength > 32) // TODO: could support this, but would need to update the limit ids
52
+ throw new Error("Shared structures is larger than maximum shared structures, try increasing maxSharedStructures to "+r.sharedLength);if(!r.transitions){r.transitions=Object.create(null);for(let t,n=0;n<e;n++){if(t=r[n],!t)continue;let e,s=r.transitions;for(let n,r=0,i=t.length;r<i;r++)n=t[r],e=s[n],e||(e=s[n]=Object.create(null)),s=e;s[Ae]=n+64}i=e}u||(r.nextId=e+64)}n&&(n=!1);try{// update the offset so next serialization doesn't write over our buffer, but can continue writing to same buffer sequentially
53
+ if(m(e),Oe&&O(t,m),a.offset=Se,s&&s.idsToInsert){Se+=6*s.idsToInsert.length,Se>Ie&&U(Se),a.offset=Se;let e=S(me.subarray(t,Se),s.idsToInsert);return s=null,e}return o&Be?(me.start=t,me.end=Se,me):me.subarray(t,Se);// position can change if we call pack again in saveStructures, so we get the buffer now
54
+ }finally{if(r){10>b&&b++;let s=r.sharedLength||c;if(r.length>s&&(r.length=s),1e4<y)r.transitions=null,b=0,y=0,0<h.length&&(h=[]);else if(0<h.length&&!u){for(let e=0,t=h.length;e<t;e++)h[e][Ae]=0;h=[]}if(n&&a.saveStructures){// we can't rely on start/end with REUSE_BUFFER_MODE since they will (probably) change when we save
55
+ let n=me.subarray(t,Se);return!1===a.saveStructures(r,i)?(a._mergeStructures(a.getStructures()),a.pack(e)):(i=s,n)}}o&Pe&&(Se=t)}};const m=e=>{Se>Ie&&(me=U(Se));var n,r=typeof e;if("string"==r){let r=e.length;if(Oe&&4<=r&&4096>r){if((Oe.size+=r)>61440){let e,n=(Oe[0]?3*Oe[0].length+Oe[1].length:0)+10;Se+n>Ie&&(me=U(Se+n)),Oe.position?(me[Se]=200,Se+=3,me[Se++]=98,e=Se-t,Se+=4,O(t,m),Ue.setUint16(e+t-3,Se-t-e)):(me[Se++]=214,me[Se++]=98,e=Se-t,Se+=4),Oe=["",""],Oe.size=0,Oe.position=e}let n=/[\u0080-\uFFFF]/.test(e);return Oe[n?0:1]+=e,me[Se++]=193,void m(n?-r:r)}let s=32>r?1:256>r?2:65536>r?3:5;// first we estimate the header size, so we can write to the correct location
56
+ let i=3*r;if(Se+i>Ie&&(me=U(Se+i)),64>r||!o){let t,i,o,a=Se+s;for(t=0;t<r;t++)i=e.charCodeAt(t),128>i?me[a++]=i:2048>i?(me[a++]=192|i>>6,me[a++]=128|63&i):55296==(64512&i)&&56320==(64512&(o=e.charCodeAt(t+1)))?(i=65536+((1023&i)<<10)+(1023&o),t++,me[a++]=240|i>>18,me[a++]=128|63&i>>12,me[a++]=128|63&i>>6,me[a++]=128|63&i):(me[a++]=224|i>>12,me[a++]=128|63&i>>6,me[a++]=128|63&i);n=a-Se-s}else n=o(e,Se+s,i);32>n?me[Se++]=160|n:256>n?(2>s&&me.copyWithin(Se+2,Se+1,Se+1+n),me[Se++]=217,me[Se++]=n):65536>n?(3>s&&me.copyWithin(Se+3,Se+2,Se+2+n),me[Se++]=218,me[Se++]=n>>8,me[Se++]=255&n):(5>s&&me.copyWithin(Se+5,Se+3,Se+3+n),me[Se++]=219,Ue.setUint32(Se,n),Se+=4),Se+=n}else if("number"===r){if(e>>>0===e)64>e?me[Se++]=e:256>e?(me[Se++]=204,me[Se++]=e):65536>e?(me[Se++]=205,me[Se++]=e>>8,me[Se++]=255&e):(me[Se++]=206,Ue.setUint32(Se,e),Se+=4);else if(e>>0===e)-32<=e?me[Se++]=256+e:-128<=e?(me[Se++]=208,me[Se++]=e+256):-32768<=e?(me[Se++]=209,Ue.setInt16(Se,e),Se+=2):(me[Se++]=210,Ue.setInt32(Se,e),Se+=4);else{let t;if(0<(t=this.useFloat32)&&4294967296>e&&-2147483648<=e){me[Se++]=202,Ue.setFloat32(Se,e);let n;if(4>t||// this checks for rounding of numbers that were encoded in 32-bit float to nearest significant decimal digit that could be preserved
57
+ (n=e*re[(127&me[Se])<<1|me[Se+1]>>7])>>0===n)return void(Se+=4);// move back into position for writing a double
58
+ Se--}me[Se++]=203,Ue.setFloat64(Se,e),Se+=8}}else if("object"===r){if(!e)me[Se++]=192;else{if(s){let n=s.get(e);if(n){if(!n.id){let e=s.idsToInsert||(s.idsToInsert=[]);n.id=e.push(n)}return me[Se++]=214,me[Se++]=112,Ue.setUint32(Se,n.id),void(Se+=4)}s.set(e,{offset:Se-t})}let r=e.constructor;if(r===Object)k(e,!0);else if(r===Array){n=e.length,16>n?me[Se++]=144|n:65536>n?(me[Se++]=220,me[Se++]=n>>8,me[Se++]=255&n):(me[Se++]=221,Ue.setUint32(Se,n),Se+=4);for(let t=0;t<n;t++)m(e[t])}else if(r===Map){n=e.size,16>n?me[Se++]=128|n:65536>n?(me[Se++]=222,me[Se++]=n>>8,me[Se++]=255&n):(me[Se++]=223,Ue.setUint32(Se,n),Se+=4);for(let[t,n]of e)m(t),m(n)}else{for(let t,n=0,r=le.length;n<r;n++)if(t=pe[n],e instanceof t){let t=le[n];if(t.write)return t.type&&(me[Se++]=212,me[Se++]=t.type,me[Se++]=0),void m(t.write.call(this,e));let r=me,s=Ue,i=Se;me=null;let o;try{o=t.pack.call(this,e,e=>(me=r,r=null,Se+=e,Se>Ie&&U(Se),{target:me,targetView:Ue,position:Se-e}),m)}finally{r&&(me=r,Ue=s,Se=i,Ie=me.length-10)}return void(o&&(o.length+Se>Ie&&U(o.length+Se),Se=I(o,me,Se,t.type)))}// no extension found, write as object
59
+ k(e,!e.hasOwnProperty)}}}else if("boolean"===r)me[Se++]=e?195:194;else if("bigint"===r){if(e<BigInt(1)<<BigInt(63)&&e>=-(BigInt(1)<<BigInt(63)))me[Se++]=211,Ue.setBigInt64(Se,e);else if(e<BigInt(1)<<BigInt(64)&&0<e)me[Se++]=207,Ue.setBigUint64(Se,e);else// overflow
60
+ if(this.largeBigIntToFloat)me[Se++]=203,Ue.setFloat64(Se,+e);else throw new RangeError(e+" was too large to fit in MessagePack 64-bit integer format, set largeBigIntToFloat to convert to float-64");Se+=8}else if("undefined"===r)this.encodeUndefinedAsNil?me[Se++]=192:(me[Se++]=212,me[Se++]=0,me[Se++]=0);else if("function"===r)m(this.writeFunction&&this.writeFunction());else throw new Error("Unknown type: "+r)},k=!1===this.useRecords?this.variableMapSize?e=>{// this method is slightly slower, but generates "preferred serialization" (optimally small for smaller objects)
61
+ let t=Object.keys(e),n=t.length;16>n?me[Se++]=128|n:65536>n?(me[Se++]=222,me[Se++]=n>>8,me[Se++]=255&n):(me[Se++]=223,Ue.setUint32(Se,n),Se+=4);let r;for(let s=0;s<n;s++)m(r=t[s]),m(e[r])}:(e,n)=>{me[Se++]=222;// always using map 16, so we can preallocate and set the length afterwards
62
+ let r=Se-t;Se+=2;let s=0;for(let t in e)(n||e.hasOwnProperty(t))&&(m(t),m(e[t]),s++);me[r++ +t]=s>>8,me[r+t]=255&s}:e.progressiveRecords&&!l?// this is about 2% faster for highly stable structures, since it only requires one for-in loop (but much more expensive when new structure needs to be written)
63
+ (e,n)=>{let s,i,o=r.transitions||(r.transitions=Object.create(null)),a=Se++-t;for(let u in e)if(n||e.hasOwnProperty(u)){if(s=o[u],s)o=s;else{// record doesn't exist, create full new record and insert it
64
+ let n=Object.keys(e),d=o;o=r.transitions;let c=0;for(let e,t=0,r=n.length;t<r;t++)e=n[t],s=o[e],s||(s=o[e]=Object.create(null),c++),o=s;a+t+1==Se?(Se--,A(o,n,c)):// otherwise we need to insert the record, moving existing data after the record
65
+ w(o,n,a,c),i=!0,o=d[u]}m(e[u])}if(!i){let n=o[Ae];n?me[a+t]=n:w(o,Object.keys(e),a,0)}}:(e,t)=>{let n,s=r.transitions||(r.transitions=Object.create(null)),i=0;for(let r in e)(t||e.hasOwnProperty(r))&&(n=s[r],n||(n=s[r]=Object.create(null),i++),s=n);let o=s[Ae];// now write the values
66
+ for(let n in o?96<=o&&l?(me[Se++]=(31&(o-=96))+96,me[Se++]=o>>5):me[Se++]=o:A(s,s.__keys__||Object.keys(e),i),e)(t||e.hasOwnProperty(n))&&m(e[n])},U=e=>{var n=Math.min,r=Math.round,s=Math.max;let i;if(16777216<e){// special handling for really large buffers
67
+ if(e-t>be)throw new Error("Packed buffer would be larger than maximum buffer size");i=n(be,4096*r(s((e-t)*(67108864<e?1.25:2),4194304)/4096))}else// faster handling for smaller buffers
68
+ i=(s(e-t<<2,me.length-1)>>12)+1<<12;let o=new he(i);return Ue=new DataView(o.buffer,0,i),me.copy?me.copy(o,0,t,e):o.set(me.slice(t,e)),Se-=t,t=0,Ie=o.length-10,me=o},A=(e,t,s)=>{let i=r.nextId;i||(i=64),i<p&&this.shouldShareStructure&&!this.shouldShareStructure(t)?(i=r.nextOwnId,!(i<f)&&(i=p),r.nextOwnId=i+1):(i>=f&&(// cycle back around
69
+ i=p),r.nextId=i+1);let o=t.highByte=96<=i&&l?i-96>>5:-1;e[Ae]=i,e.__keys__=t,r[i-64]=t,i<p?(t.isShared=!0,r.sharedLength=i-63,n=!0,0<=o?(me[Se++]=(31&i)+96,me[Se++]=o):me[Se++]=i):(0<=o?(me[Se++]=213,me[Se++]=114,me[Se++]=(31&i)+96,me[Se++]=o):(me[Se++]=212,me[Se++]=114,me[Se++]=i),s&&(y+=b*s),h.length>=g&&(h.shift()[Ae]=0),h.push(e),m(t))},w=(e,n,r,s)=>{let i=me,o=Se,a=Ie,u=t;me=ke,Se=0,t=0,me||(ke=me=new he(8192)),Ie=me.length-10,A(e,n,s),ke=me;let d=Se;if(me=i,Se=o,Ie=a,t=u,1<d){let e=Se+d-1;e>Ie&&U(e);let n=r+t;me.copyWithin(n+d,n+1,Se),me.set(ke.slice(0,d),n),Se=e}else me[r+t]=ke[0]}}useBuffer(e){// this means we are finished using our own buffer and we can write over it safely
70
+ me=e,Ue=new DataView(me.buffer,me.byteOffset,me.byteLength),Se=0}clearSharedData(){this.structures&&(this.structures=[])}}pe=[Date,Set,Error,RegExp,ArrayBuffer,Object.getPrototypeOf(Uint8Array.prototype).constructor/*TypedArray*/,V],le=[{pack(e,n,r){let s=e.getTime()/1e3;if((this.useTimestamp32||0===e.getMilliseconds())&&0<=s&&4294967296>s){// Timestamp 32
71
+ let{target:e,targetView:t,position:r}=n(6);e[r++]=214,e[r++]=255,t.setUint32(r,s)}else if(0<s&&17179869184>s){// Timestamp 64
72
+ let{target:t,targetView:r,position:i}=n(10);t[i++]=215,t[i++]=255,r.setUint32(i,4e6*e.getMilliseconds()+(s/1e3/4294967296>>0)),r.setUint32(i+4,s)}else if(isNaN(s)){if(this.onInvalidDate)return n(0),r(this.onInvalidDate());// Intentionally invalid timestamp
73
+ let{target:e,targetView:t,position:s}=n(3);e[s++]=212,e[s++]=255,e[s++]=255}else{// Timestamp 96
74
+ let{target:r,targetView:i,position:o}=n(15);r[o++]=199,r[o++]=12,r[o++]=255,i.setUint32(o,1e6*e.getMilliseconds()),i.setBigInt64(o+4,BigInt(t(s)))}}},{pack(e,t,n){let r=Array.from(e),{target:s,position:i}=t(this.structuredClone?3:0);this.structuredClone&&(s[i++]=212,s[i++]=115,s[i++]=0),n(r)}},{pack(e,t,n){let{target:r,position:s}=t(this.structuredClone?3:0);this.structuredClone&&(r[s++]=212,r[s++]=101,r[s++]=0),n([e.name,e.message])}},{pack(e,t,n){let{target:r,position:s}=t(this.structuredClone?3:0);this.structuredClone&&(r[s++]=212,r[s++]=120,r[s++]=0),n([e.source,e.flags])}},{pack(e,t){this.structuredClone?k(e,16,t):U(fe?Buffer.from(e):new Uint8Array(e),t)}},{pack(e,t){let n=e.constructor;n!==ye&&this.structuredClone?k(e,te.indexOf(n.name),t):U(e,t)}},{pack(e,t){// specific 0xC1 object
75
+ let{target:n,position:r}=t(1);n[r]=193}}];let Ce=new we({useRecords:!1});const Le=Ce.pack,xe=Ce.pack,{NEVER:Re,ALWAYS:Ee,DECIMAL_ROUND:Me,DECIMAL_FIT:_e}=ue,Be=512,Pe=1024;e.ALWAYS=Ee,e.C1=W,e.DECIMAL_FIT=_e,e.DECIMAL_ROUND=Me,e.Decoder=z,e.Encoder=we,e.FLOAT32_OPTIONS=ue,e.NEVER=Re,e.Packr=we,e.REUSE_BUFFER_MODE=Be,e.Unpackr=z,e.addExtension=A,e.clearSource=b,e.decode=ae,e.decodeIter=function(e,t={}){if(!e||"object"!=typeof e)throw new Error("first argument must be an Iterable, Async Iterable, Iterator, Async Iterator, or a promise");const n=new z(t);let r;const s=e=>{let t;// if there's incomplete data from previous chunk, concatinate and try again
76
+ r&&(e=Buffer.concat([r,e]),r=void 0);try{t=n.unpackMultiple(e)}catch(n){if(n.incomplete)r=e.slice(n.lastPosition),t=n.values;else throw n}return t};if("function"==typeof e[Symbol.iterator])return function*(){for(const t of e)yield*s(t)}();return"function"==typeof e[Symbol.asyncIterator]?async function*(){for await(const t of e)yield*s(t)}():void 0},e.encode=xe,e.encodeIter=/**
111
77
  * Given an Iterable first argument, returns an Iterable where each value is packed as a Buffer
112
78
  * If the argument is only Async Iterable, the return value will be an Async Iterable.
113
79
  * @param {Iterable|Iterator|AsyncIterable|AsyncIterator} objectIterator - iterable source, like a Readable object stream, an array, Set, or custom object
114
80
  * @param {options} [options] - msgpackr pack options
115
81
  * @returns {IterableIterator|Promise.<AsyncIterableIterator>}
116
- */function(a,b={}){if(!a||"object"!=typeof a)throw new Error("first argument must be an Iterable, Async Iterable, or a Promise for an Async Iterable");else{if("function"==typeof a[Symbol.iterator])return x(a,b);if("function"==typeof a.then||"function"==typeof a[Symbol.asyncIterator])return y(a,b);throw new Error("first argument must be an Iterable, Async Iterable, Iterator, Async Iterator, or a Promise")}},a.isNativeAccelerationEnabled=!1,a.mapsAsObjects=!0,a.pack=va,a.roundFloat32=function(a){ga[0]=a;let b=_[(127&ha[3])<<1|ha[2]>>7];return(b*a+(0<a?.5:-.5)>>0)/b},a.unpack=ba,a.unpackMultiple=ca,a.useRecords=!1,Object.defineProperty(a,"__esModule",{value:!0})});
82
+ */function(e,t={}){if(!e||"object"!=typeof e)throw new Error("first argument must be an Iterable, Async Iterable, or a Promise for an Async Iterable");else{if("function"==typeof e[Symbol.iterator])return w(e,t);if("function"==typeof e.then||"function"==typeof e[Symbol.asyncIterator])return C(e,t);throw new Error("first argument must be an Iterable, Async Iterable, Iterator, Async Iterator, or a Promise")}},e.isNativeAccelerationEnabled=!1,e.mapsAsObjects=!0,e.pack=Le,e.roundFloat32=function(e){ce[0]=e;let t=re[(127&ge[3])<<1|ge[2]>>7];return(t*e+(0<e?.5:-.5)>>0)/t},e.unpack=ie,e.unpackMultiple=oe,e.useRecords=!1,Object.defineProperty(e,"__esModule",{value:!0})});