🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

msgpackr

Package Overview
Dependencies
Maintainers
1
Versions
119
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

msgpackr - npm Package Compare versions

Comparing version

to
1.11.3

2

dist/index-no-eval.min.js

@@ -1,2 +0,2 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).msgpackr={})}(this,(function(t){"use strict";var e,r,n;try{e=new TextDecoder}catch(t){}var i,s,o,u,a,l=0,c={},f=0,h=0,g=[],p={useRecords:!1,mapsAsObjects:!0};class d{}const y=new d;y.name="MessagePack 0xC1";var w,b=!1,m=2;try{new w("")}catch(t){m=1/0}class S{constructor(t){t&&(!1===t.useRecords&&void 0===t.mapsAsObjects&&(t.mapsAsObjects=!0),t.sequential&&!1!==t.trusted&&(t.trusted=!0,t.structures||0==t.useRecords||(t.structures=[],t.maxSharedStructures||(t.maxSharedStructures=0))),t.structures?t.structures.sharedLength=t.structures.length:t.getStructures&&((t.structures=[]).uninitialized=!0,t.structures.sharedLength=0),t.int64AsNumber&&(t.int64AsType="number")),Object.assign(this,t)}unpack(t,e){if(r)return Z((()=>(G(),this?this.unpack(t,e):S.prototype.unpack.call(p,t,e))));t.buffer||t.constructor!==ArrayBuffer||(t="undefined"!=typeof Buffer?Buffer.from(t):new Uint8Array(t)),"object"==typeof e?(n=e.end||t.length,l=e.start||0):(l=0,n=e>-1?e:t.length),h=0,s=null,o=null,r=t;try{a=t.dataView||(t.dataView=new DataView(t.buffer,t.byteOffset,t.byteLength))}catch(e){if(r=null,t instanceof Uint8Array)throw e;throw new Error("Source must be a Uint8Array or Buffer but was a "+(t&&"object"==typeof t?t.constructor.name:typeof t))}if(this instanceof S){if(c=this,this.structures)return i=this.structures,I(e);(!i||i.length>0)&&(i=[])}else c=p,(!i||i.length>0)&&(i=[]);return I(e)}unpackMultiple(t,e){let r,n=0;try{b=!0;let i=t.length,s=this?this.unpack(t,i):X.unpack(t,i);if(!e){for(r=[s];l<i;)n=l,r.push(I());return r}if(!1===e(s,n,l))return;for(;l<i;)if(n=l,!1===e(I(),n,l))return}catch(t){throw t.lastPosition=n,t.values=r,t}finally{b=!1,G()}}_mergeStructures(t,e){t=t||[],Object.isFrozen(t)&&(t=t.map((t=>t.slice(0))));for(let e=0,r=t.length;e<r;e++){let r=t[e];r&&(r.isShared=!0,e>=32&&(r.highByte=e-32>>5))}t.sharedLength=t.length;for(let r in e||[])if(r>=0){let n=t[r],i=e[r];i&&(n&&((t.restoreStructures||(t.restoreStructures=[]))[r]=n),t[r]=i)}return this.structures=t}decode(t,e){return this.unpack(t,e)}}function I(t){try{if(!c.trusted&&!b){let t=i.sharedLength||0;t<i.length&&(i.length=t)}let t;if(c.randomAccessStructure&&r[l]<64&&r[l],t=A(),o&&(l=o.postBundlePosition,o=null),b&&(i.restoreStructures=null),l==n)i&&i.restoreStructures&&U(),i=null,r=null,u&&(u=null);else{if(l>n)throw new Error("Unexpected end of MessagePack data");if(!b){let e;try{e=JSON.stringify(t,((t,e)=>"bigint"==typeof e?`${e}n`:e)).slice(0,100)}catch(t){e="(JSON view not available "+t+")"}throw new Error("Data read, but end of buffer not reached "+e)}}return t}catch(t){throw i&&i.restoreStructures&&U(),G(),(t instanceof RangeError||t.message.startsWith("Unexpected end of buffer")||l>n)&&(t.incomplete=!0),t}}function U(){for(let t in i.restoreStructures)i[t]=i.restoreStructures[t];i.restoreStructures=null}function A(){let t=r[l++];if(t<160){if(t<128){if(t<64)return t;{let e=i[63&t]||c.getStructures&&v()[63&t];return e?(e.read||(e.read=B(e,63&t)),e.read()):t}}if(t<144){if(t-=128,c.mapsAsObjects){let e={};for(let r=0;r<t;r++){let t=C();"__proto__"===t&&(t="__proto_"),e[t]=A()}return e}{let e=new Map;for(let r=0;r<t;r++)e.set(A(),A());return e}}{t-=144;let e=new Array(t);for(let r=0;r<t;r++)e[r]=A();return c.freezeData?Object.freeze(e):e}}if(t<192){let e=t-160;if(h>=l)return s.slice(l-f,(l+=e)-f);if(0==h&&n<140){let t=e<16?L(e):V(e);if(null!=t)return t}return O(e)}{let e;switch(t){case 192:return null;case 193:return o?(e=A(),e>0?o[1].slice(o.position1,o.position1+=e):o[0].slice(o.position0,o.position0-=e)):y;case 194:return!1;case 195:return!0;case 196:if(e=r[l++],void 0===e)throw new Error("Unexpected end of buffer");return F(e);case 197:return e=a.getUint16(l),l+=2,F(e);case 198:return e=a.getUint32(l),l+=4,F(e);case 199:return P(r[l++]);case 200:return e=a.getUint16(l),l+=2,P(e);case 201:return e=a.getUint32(l),l+=4,P(e);case 202:if(e=a.getFloat32(l),c.useFloat32>2){let t=H[(127&r[l])<<1|r[l+1]>>7];return l+=4,(t*e+(e>0?.5:-.5)>>0)/t}return l+=4,e;case 203:return e=a.getFloat64(l),l+=8,e;case 204:return r[l++];case 205:return e=a.getUint16(l),l+=2,e;case 206:return e=a.getUint32(l),l+=4,e;case 207:return"number"===c.int64AsType?(e=4294967296*a.getUint32(l),e+=a.getUint32(l+4)):"string"===c.int64AsType?e=a.getBigUint64(l).toString():"auto"===c.int64AsType?(e=a.getBigUint64(l),e<=BigInt(2)<<BigInt(52)&&(e=Number(e))):e=a.getBigUint64(l),l+=8,e;case 208:return a.getInt8(l++);case 209:return e=a.getInt16(l),l+=2,e;case 210:return e=a.getInt32(l),l+=4,e;case 211:return"number"===c.int64AsType?(e=4294967296*a.getInt32(l),e+=a.getUint32(l+4)):"string"===c.int64AsType?e=a.getBigInt64(l).toString():"auto"===c.int64AsType?(e=a.getBigInt64(l),e>=BigInt(-2)<<BigInt(52)&&e<=BigInt(2)<<BigInt(52)&&(e=Number(e))):e=a.getBigInt64(l),l+=8,e;case 212:if(e=r[l++],114==e)return J(63&r[l++]);{let t=g[e];if(t)return t.read?(l++,t.read(A())):t.noBuffer?(l++,t()):t(r.subarray(l,++l));throw new Error("Unknown extension "+e)}case 213:return e=r[l],114==e?(l++,J(63&r[l++],r[l++])):P(2);case 214:return P(4);case 215:return P(8);case 216:return P(16);case 217:return e=r[l++],h>=l?s.slice(l-f,(l+=e)-f):_(e);case 218:return e=a.getUint16(l),h>=(l+=2)?s.slice(l-f,(l+=e)-f):x(e);case 219:return e=a.getUint32(l),h>=(l+=4)?s.slice(l-f,(l+=e)-f):T(e);case 220:return e=a.getUint16(l),l+=2,M(e);case 221:return e=a.getUint32(l),l+=4,M(e);case 222:return e=a.getUint16(l),l+=2,D(e);case 223:return e=a.getUint32(l),l+=4,D(e);default:if(t>=224)return t-256;if(void 0===t){let t=new Error("Unexpected end of MessagePack data");throw t.incomplete=!0,t}throw new Error("Unknown MessagePack token "+t)}}}const E=/^[a-zA-Z_$][a-zA-Z\d_$]*$/;function B(t,e){function r(){if(r.count++>m){let r=t.read=new w("r","return function(){return "+(c.freezeData?"Object.freeze":"")+"({"+t.map((t=>"__proto__"===t?"__proto_:r()":E.test(t)?t+":r()":"["+JSON.stringify(t)+"]:r()")).join(",")+"})}")(A);return 0===t.highByte&&(t.read=k(e,t.read)),r()}let n={};for(let e=0,r=t.length;e<r;e++){let r=t[e];"__proto__"===r&&(r="__proto_"),n[r]=A()}return c.freezeData?Object.freeze(n):n}return r.count=0,0===t.highByte?k(e,r):r}const k=(t,e)=>function(){let n=r[l++];if(0===n)return e();let s=t<32?-(t+(n<<5)):t+(n<<5),o=i[s]||v()[s];if(!o)throw new Error("Record id is not defined for "+s);return o.read||(o.read=B(o,t)),o.read()};function v(){let t=Z((()=>(r=null,c.getStructures())));return i=c._mergeStructures(t,i)}var O=j,_=j,x=j,T=j;function j(t){let n;if(t<16&&(n=L(t)))return n;if(t>64&&e)return e.decode(r.subarray(l,l+=t));const i=l+t,s=[];for(n="";l<i;){const t=r[l++];if(0==(128&t))s.push(t);else if(192==(224&t)){const e=63&r[l++];s.push((31&t)<<6|e)}else if(224==(240&t)){const e=63&r[l++],n=63&r[l++];s.push((31&t)<<12|e<<6|n)}else if(240==(248&t)){let e=(7&t)<<18|(63&r[l++])<<12|(63&r[l++])<<6|63&r[l++];e>65535&&(e-=65536,s.push(e>>>10&1023|55296),e=56320|1023&e),s.push(e)}else s.push(t);s.length>=4096&&(n+=R.apply(String,s),s.length=0)}return s.length>0&&(n+=R.apply(String,s)),n}function M(t){let e=new Array(t);for(let r=0;r<t;r++)e[r]=A();return c.freezeData?Object.freeze(e):e}function D(t){if(c.mapsAsObjects){let e={};for(let r=0;r<t;r++){let t=C();"__proto__"===t&&(t="__proto_"),e[t]=A()}return e}{let e=new Map;for(let r=0;r<t;r++)e.set(A(),A());return e}}var R=String.fromCharCode;function V(t){let e=l,n=new Array(t);for(let i=0;i<t;i++){const t=r[l++];if((128&t)>0)return void(l=e);n[i]=t}return R.apply(String,n)}function L(t){if(t<4){if(t<2){if(0===t)return"";{let t=r[l++];return(128&t)>1?void(l-=1):R(t)}}{let e=r[l++],n=r[l++];if((128&e)>0||(128&n)>0)return void(l-=2);if(t<3)return R(e,n);let i=r[l++];return(128&i)>0?void(l-=3):R(e,n,i)}}{let e=r[l++],n=r[l++],i=r[l++],s=r[l++];if((128&e)>0||(128&n)>0||(128&i)>0||(128&s)>0)return void(l-=4);if(t<6){if(4===t)return R(e,n,i,s);{let t=r[l++];return(128&t)>0?void(l-=5):R(e,n,i,s,t)}}if(t<8){let o=r[l++],u=r[l++];if((128&o)>0||(128&u)>0)return void(l-=6);if(t<7)return R(e,n,i,s,o,u);let a=r[l++];return(128&a)>0?void(l-=7):R(e,n,i,s,o,u,a)}{let o=r[l++],u=r[l++],a=r[l++],c=r[l++];if((128&o)>0||(128&u)>0||(128&a)>0||(128&c)>0)return void(l-=8);if(t<10){if(8===t)return R(e,n,i,s,o,u,a,c);{let t=r[l++];return(128&t)>0?void(l-=9):R(e,n,i,s,o,u,a,c,t)}}if(t<12){let f=r[l++],h=r[l++];if((128&f)>0||(128&h)>0)return void(l-=10);if(t<11)return R(e,n,i,s,o,u,a,c,f,h);let g=r[l++];return(128&g)>0?void(l-=11):R(e,n,i,s,o,u,a,c,f,h,g)}{let f=r[l++],h=r[l++],g=r[l++],p=r[l++];if((128&f)>0||(128&h)>0||(128&g)>0||(128&p)>0)return void(l-=12);if(t<14){if(12===t)return R(e,n,i,s,o,u,a,c,f,h,g,p);{let t=r[l++];return(128&t)>0?void(l-=13):R(e,n,i,s,o,u,a,c,f,h,g,p,t)}}{let d=r[l++],y=r[l++];if((128&d)>0||(128&y)>0)return void(l-=14);if(t<15)return R(e,n,i,s,o,u,a,c,f,h,g,p,d,y);let w=r[l++];return(128&w)>0?void(l-=15):R(e,n,i,s,o,u,a,c,f,h,g,p,d,y,w)}}}}}function N(){let t,e=r[l++];if(e<192)t=e-160;else switch(e){case 217:t=r[l++];break;case 218:t=a.getUint16(l),l+=2;break;case 219:t=a.getUint32(l),l+=4;break;default:throw new Error("Expected string")}return j(t)}function F(t){return c.copyBuffers?Uint8Array.prototype.slice.call(r,l,l+=t):r.subarray(l,l+=t)}function P(t){let e=r[l++];if(g[e]){let n;return g[e](r.subarray(l,n=l+=t),(t=>{l=t;try{return A()}finally{l=n}}))}throw new Error("Unknown extension type "+e)}var z=new Array(4096);function C(){let t=r[l++];if(!(t>=160&&t<192))return l--,W(A());if(t-=160,h>=l)return s.slice(l-f,(l+=t)-f);if(!(0==h&&n<180))return O(t);let e,i=4095&(t<<5^(t>1?a.getUint16(l):t>0?r[l]:0)),o=z[i],u=l,c=l+t-3,g=0;if(o&&o.bytes==t){for(;u<c;){if(e=a.getUint32(u),e!=o[g++]){u=1879048192;break}u+=4}for(c+=3;u<c;)if(e=r[u++],e!=o[g++]){u=1879048192;break}if(u===c)return l=u,o.string;c-=3,u=l}for(o=[],z[i]=o,o.bytes=t;u<c;)e=a.getUint32(u),o.push(e),u+=4;for(c+=3;u<c;)e=r[u++],o.push(e);let p=t<16?L(t):V(t);return o.string=null!=p?p:O(t)}function W(t){if("string"==typeof t)return t;if("number"==typeof t||"boolean"==typeof t||"bigint"==typeof t)return t.toString();if(null==t)return t+"";throw new Error("Invalid property type for record",typeof t)}const J=(t,e)=>{let r=A().map(W),n=t;void 0!==e&&(t=t<32?-((e<<5)+t):(e<<5)+t,r.highByte=e);let s=i[t];return s&&(s.isShared||b)&&((i.restoreStructures||(i.restoreStructures=[]))[t]=s),i[t]=r,r.read=B(r,n),r.read()};g[0]=()=>{},g[0].noBuffer=!0,g[66]=t=>{let e=t.length,r=BigInt(128&t[0]?t[0]-256:t[0]);for(let n=1;n<e;n++)r<<=BigInt(8),r+=BigInt(t[n]);return r};let $={Error:Error,TypeError:TypeError,ReferenceError:ReferenceError};g[101]=()=>{let t=A();return($[t[0]]||Error)(t[1],{cause:t[2]})},g[105]=t=>{if(!1===c.structuredClone)throw new Error("Structured clone extension is disabled");let e=a.getUint32(l-4);u||(u=new Map);let n,i=r[l];n=i>=144&&i<160||220==i||221==i?[]:{};let s={target:n};u.set(e,s);let o=A();return s.used?Object.assign(n,o):(s.target=o,o)},g[112]=t=>{if(!1===c.structuredClone)throw new Error("Structured clone extension is disabled");let e=a.getUint32(l-4),r=u.get(e);return r.used=!0,r.target},g[115]=()=>new Set(A());const Y=["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64","BigInt64","BigUint64"].map((t=>t+"Array"));let q="object"==typeof globalThis?globalThis:window;g[116]=t=>{let e=t[0],r=Y[e];if(!r){if(16===e){let e=new ArrayBuffer(t.length-1);return new Uint8Array(e).set(t.subarray(1)),e}throw new Error("Could not find typed array for code "+e)}return new q[r](Uint8Array.prototype.slice.call(t,1).buffer)},g[120]=()=>{let t=A();return new RegExp(t[0],t[1])};const K=[];function Z(t){let e=n,g=l,p=f,d=h,y=s,w=u,m=o,S=new Uint8Array(r.slice(0,n)),I=i,U=i.slice(0,i.length),A=c,E=b,B=t();return n=e,l=g,f=p,h=d,s=y,u=w,o=m,r=S,b=E,(i=I).splice(0,i.length,...U),c=A,a=new DataView(r.buffer,r.byteOffset,r.byteLength),B}function G(){r=null,u=null,i=null}g[98]=t=>{let e=(t[0]<<24)+(t[1]<<16)+(t[2]<<8)+t[3],r=l;return l+=e-t.length,o=K,(o=[N(),N()]).position0=0,o.position1=0,o.postBundlePosition=l,l=r,A()},g[255]=t=>4==t.length?new Date(1e3*(16777216*t[0]+(t[1]<<16)+(t[2]<<8)+t[3])):8==t.length?new Date(((t[0]<<22)+(t[1]<<14)+(t[2]<<6)+(t[3]>>2))/1e6+1e3*(4294967296*(3&t[3])+16777216*t[4]+(t[5]<<16)+(t[6]<<8)+t[7])):12==t.length?new Date(((t[0]<<24)+(t[1]<<16)+(t[2]<<8)+t[3])/1e6+1e3*((128&t[4]?-281474976710656:0)+1099511627776*t[6]+4294967296*t[7]+16777216*t[8]+(t[9]<<16)+(t[10]<<8)+t[11])):new Date("invalid");const H=new Array(147);for(let t=0;t<256;t++)H[t]=+("1e"+Math.floor(45.15-.30103*t));const Q=S;var X=new S({useRecords:!1});const tt=X.unpack,et=X.unpackMultiple,rt=X.unpack,nt={NEVER:0,ALWAYS:1,DECIMAL_ROUND:3,DECIMAL_FIT:4};let it,st,ot,ut=new Float32Array(1),at=new Uint8Array(ut.buffer,0,4);try{it=new TextEncoder}catch(t){}const lt="undefined"!=typeof Buffer,ct=lt?function(t){return Buffer.allocUnsafeSlow(t)}:Uint8Array,ft=lt?Buffer:Uint8Array,ht=lt?4294967296:2144337920;let gt,pt,dt,yt,wt=0,bt=null;const mt=/[\u0080-\uFFFF]/,St=Symbol("record-id");class It extends S{constructor(t){let e,r,n,i;super(t),this.offset=0;let s=ft.prototype.utf8Write?function(t,e){return gt.utf8Write(t,e,gt.byteLength-e)}:!(!it||!it.encodeInto)&&function(t,e){return it.encodeInto(t,gt.subarray(e)).written},o=this;t||(t={});let u=t&&t.sequential,a=t.structures||t.saveStructures,l=t.maxSharedStructures;if(null==l&&(l=a?32:0),l>8160)throw new Error("Maximum maxSharedStructure is 8160");t.structuredClone&&null==t.moreTypes&&(this.moreTypes=!0);let c=t.maxOwnStructures;null==c&&(c=a?32:64),this.structures||0==t.useRecords||(this.structures=[]);let f=l>32||c+l>64,h=l+64,g=l+c+64;if(g>8256)throw new Error("Maximum maxSharedStructure + maxOwnStructure is 8192");let p=[],d=0,y=0;this.pack=this.encode=function(t,s){if(gt||(gt=new ct(8192),dt=gt.dataView||(gt.dataView=new DataView(gt.buffer,0,8192)),wt=0),yt=gt.length-10,yt-wt<2048?(gt=new ct(gt.length),dt=gt.dataView||(gt.dataView=new DataView(gt.buffer,0,gt.length)),yt=gt.length-10,wt=0):wt=wt+7&2147483640,e=wt,s&Vt&&(wt+=255&s),i=o.structuredClone?new Map:null,o.bundleStrings&&"string"!=typeof t?(bt=[],bt.size=1/0):bt=null,n=o.structures,n){n.uninitialized&&(n=o._mergeStructures(o.getStructures()));let t=n.sharedLength||0;if(t>l)throw new Error("Shared structures is larger than maximum shared structures, try increasing maxSharedStructures to "+n.sharedLength);if(!n.transitions){n.transitions=Object.create(null);for(let e=0;e<t;e++){let t=n[e];if(!t)continue;let r,i=n.transitions;for(let e=0,n=t.length;e<n;e++){let n=t[e];r=i[n],r||(r=i[n]=Object.create(null)),i=r}i[St]=e+64}this.lastNamedStructuresLength=t}u||(n.nextId=t+64)}let a;r&&(r=!1);try{o.randomAccessStructure&&t&&t.constructor&&t.constructor===Object?v(t):m(t);let u=bt;if(bt&&Bt(e,m,0),i&&i.idsToInsert){let t=i.idsToInsert.sort(((t,e)=>t.offset>e.offset?1:-1)),r=t.length,n=-1;for(;u&&r>0;){let i=t[--r].offset+e;i<u.stringsPosition+e&&-1===n&&(n=0),i>u.position+e?n>=0&&(n+=6):(n>=0&&(dt.setUint32(u.position+e,dt.getUint32(u.position+e)+n),n=-1),u=u.previous,r++)}n>=0&&u&&dt.setUint32(u.position+e,dt.getUint32(u.position+e)+n),wt+=6*t.length,wt>yt&&E(wt),o.offset=wt;let s=function(t,e){let r,n=6*e.length,i=t.length-n;for(;r=e.pop();){let e=r.offset,s=r.id;t.copyWithin(e+n,e,i),n-=6;let o=e+n;t[o++]=214,t[o++]=105,t[o++]=s>>24,t[o++]=s>>16&255,t[o++]=s>>8&255,t[o++]=255&s,i=e}return t}(gt.subarray(e,wt),t);return i=null,s}return o.offset=wt,s&Dt?(gt.start=e,gt.end=wt,gt):gt.subarray(e,wt)}catch(t){throw a=t,t}finally{if(n&&(w(),r&&o.saveStructures)){let r=n.sharedLength||0,i=gt.subarray(e,wt),u=function(t,e){return t.isCompatible=t=>{let r=!t||(e.lastNamedStructuresLength||0)===t.length;return r||e._mergeStructures(t),r},t}(n,o);if(!a)return!1===o.saveStructures(u,u.isCompatible)?o.pack(t,s):(o.lastNamedStructuresLength=r,gt.length>1073741824&&(gt=null),i)}gt.length>1073741824&&(gt=null),s&Rt&&(wt=e)}};const w=()=>{y<10&&y++;let t=n.sharedLength||0;if(n.length>t&&!u&&(n.length=t),d>1e4)n.transitions=null,y=0,d=0,p.length>0&&(p=[]);else if(p.length>0&&!u){for(let t=0,e=p.length;t<e;t++)p[t][St]=0;p=[]}},b=t=>{var e=t.length;e<16?gt[wt++]=144|e:e<65536?(gt[wt++]=220,gt[wt++]=e>>8,gt[wt++]=255&e):(gt[wt++]=221,dt.setUint32(wt,e),wt+=4);for(let r=0;r<e;r++)m(t[r])},m=t=>{wt>yt&&(gt=E(wt));var r,n=typeof t;if("string"===n){let n,i=t.length;if(bt&&i>=4&&i<4096){if((bt.size+=i)>21760){let t,r,n=(bt[0]?3*bt[0].length+bt[1].length:0)+10;wt+n>yt&&(gt=E(wt+n)),bt.position?(r=bt,gt[wt]=200,wt+=3,gt[wt++]=98,t=wt-e,wt+=4,Bt(e,m,0),dt.setUint16(t+e-3,wt-e-t)):(gt[wt++]=214,gt[wt++]=98,t=wt-e,wt+=4),bt=["",""],bt.previous=r,bt.size=0,bt.position=t}let r=mt.test(t);return bt[r?0:1]+=t,gt[wt++]=193,void m(r?-i:i)}n=i<32?1:i<256?2:i<65536?3:5;let o=3*i;if(wt+o>yt&&(gt=E(wt+o)),i<64||!s){let e,s,o,u=wt+n;for(e=0;e<i;e++)s=t.charCodeAt(e),s<128?gt[u++]=s:s<2048?(gt[u++]=s>>6|192,gt[u++]=63&s|128):55296==(64512&s)&&56320==(64512&(o=t.charCodeAt(e+1)))?(s=65536+((1023&s)<<10)+(1023&o),e++,gt[u++]=s>>18|240,gt[u++]=s>>12&63|128,gt[u++]=s>>6&63|128,gt[u++]=63&s|128):(gt[u++]=s>>12|224,gt[u++]=s>>6&63|128,gt[u++]=63&s|128);r=u-wt-n}else r=s(t,wt+n);r<32?gt[wt++]=160|r:r<256?(n<2&&gt.copyWithin(wt+2,wt+1,wt+1+r),gt[wt++]=217,gt[wt++]=r):r<65536?(n<3&&gt.copyWithin(wt+3,wt+2,wt+2+r),gt[wt++]=218,gt[wt++]=r>>8,gt[wt++]=255&r):(n<5&&gt.copyWithin(wt+5,wt+3,wt+3+r),gt[wt++]=219,dt.setUint32(wt,r),wt+=4),wt+=r}else if("number"===n)if(t>>>0===t)t<32||t<128&&!1===this.useRecords||t<64&&!this.randomAccessStructure?gt[wt++]=t:t<256?(gt[wt++]=204,gt[wt++]=t):t<65536?(gt[wt++]=205,gt[wt++]=t>>8,gt[wt++]=255&t):(gt[wt++]=206,dt.setUint32(wt,t),wt+=4);else if(t>>0===t)t>=-32?gt[wt++]=256+t:t>=-128?(gt[wt++]=208,gt[wt++]=t+256):t>=-32768?(gt[wt++]=209,dt.setInt16(wt,t),wt+=2):(gt[wt++]=210,dt.setInt32(wt,t),wt+=4);else{let e;if((e=this.useFloat32)>0&&t<4294967296&&t>=-2147483648){let r;if(gt[wt++]=202,dt.setFloat32(wt,t),e<4||(r=t*H[(127&gt[wt])<<1|gt[wt+1]>>7])>>0===r)return void(wt+=4);wt--}gt[wt++]=203,dt.setFloat64(wt,t),wt+=8}else if("object"===n||"function"===n)if(t){if(i){let r=i.get(t);if(r){if(!r.id){let t=i.idsToInsert||(i.idsToInsert=[]);r.id=t.push(r)}return gt[wt++]=214,gt[wt++]=112,dt.setUint32(wt,r.id),void(wt+=4)}i.set(t,{offset:wt-e})}let s=t.constructor;if(s===Object)A(t);else if(s===Array)b(t);else if(s===Map)if(this.mapAsEmptyObject)gt[wt++]=128;else{(r=t.size)<16?gt[wt++]=128|r:r<65536?(gt[wt++]=222,gt[wt++]=r>>8,gt[wt++]=255&r):(gt[wt++]=223,dt.setUint32(wt,r),wt+=4);for(let[e,r]of t)m(e),m(r)}else{for(let e=0,r=st.length;e<r;e++){if(t instanceof ot[e]){let r=st[e];if(r.write){r.type&&(gt[wt++]=212,gt[wt++]=r.type,gt[wt++]=0);let e=r.write.call(this,t);return void(e===t?Array.isArray(t)?b(t):A(t):m(e))}let n,i=gt,s=dt,o=wt;gt=null;try{n=r.pack.call(this,t,(t=>(gt=i,i=null,wt+=t,wt>yt&&E(wt),{target:gt,targetView:dt,position:wt-t})),m)}finally{i&&(gt=i,dt=s,wt=o,yt=gt.length-10)}return void(n&&(n.length+wt>yt&&E(n.length+wt),wt=Et(n,gt,wt,r.type)))}}if(Array.isArray(t))b(t);else{if(t.toJSON){const e=t.toJSON();if(e!==t)return m(e)}if("function"===n)return m(this.writeFunction&&this.writeFunction(t));A(t)}}}else gt[wt++]=192;else if("boolean"===n)gt[wt++]=t?195:194;else if("bigint"===n){if(t<BigInt(1)<<BigInt(63)&&t>=-(BigInt(1)<<BigInt(63)))gt[wt++]=211,dt.setBigInt64(wt,t);else if(t<BigInt(1)<<BigInt(64)&&t>0)gt[wt++]=207,dt.setBigUint64(wt,t);else{if(!this.largeBigIntToFloat){if(this.largeBigIntToString)return m(t.toString());if(this.useBigIntExtension&&t<BigInt(2)**BigInt(1023)&&t>-(BigInt(2)**BigInt(1023))){gt[wt++]=199,wt++,gt[wt++]=66;let e,r=[];do{let n=t&BigInt(255);e=(n&BigInt(128))===(t<BigInt(0)?BigInt(128):BigInt(0)),r.push(n),t>>=BigInt(8)}while(t!==BigInt(0)&&t!==BigInt(-1)||!e);gt[wt-2]=r.length;for(let t=r.length;t>0;)gt[wt++]=Number(r[--t]);return}throw new RangeError(t+" was too large to fit in MessagePack 64-bit integer format, use useBigIntExtension, or set largeBigIntToFloat to convert to float-64, or set largeBigIntToString to convert to string")}gt[wt++]=203,dt.setFloat64(wt,Number(t))}wt+=8}else{if("undefined"!==n)throw new Error("Unknown type: "+n);this.encodeUndefinedAsNil?gt[wt++]=192:(gt[wt++]=212,gt[wt++]=0,gt[wt++]=0)}},S=this.variableMapSize||this.coercibleKeyAsNumber||this.skipValues?t=>{let e;if(this.skipValues){e=[];for(let r in t)"function"==typeof t.hasOwnProperty&&!t.hasOwnProperty(r)||this.skipValues.includes(t[r])||e.push(r)}else e=Object.keys(t);let r,n=e.length;if(n<16?gt[wt++]=128|n:n<65536?(gt[wt++]=222,gt[wt++]=n>>8,gt[wt++]=255&n):(gt[wt++]=223,dt.setUint32(wt,n),wt+=4),this.coercibleKeyAsNumber)for(let i=0;i<n;i++){r=e[i];let n=Number(r);m(isNaN(n)?r:n),m(t[r])}else for(let i=0;i<n;i++)m(r=e[i]),m(t[r])}:t=>{gt[wt++]=222;let r=wt-e;wt+=2;let n=0;for(let e in t)("function"!=typeof t.hasOwnProperty||t.hasOwnProperty(e))&&(m(e),m(t[e]),n++);if(n>65535)throw new Error('Object is too large to serialize with fast 16-bit map size, use the "variableMapSize" option to serialize this object');gt[r+++e]=n>>8,gt[r+e]=255&n},I=!1===this.useRecords?S:t.progressiveRecords&&!f?t=>{let r,i,s=n.transitions||(n.transitions=Object.create(null)),o=wt++-e;for(let u in t)if("function"!=typeof t.hasOwnProperty||t.hasOwnProperty(u)){if(r=s[u],r)s=r;else{let a=Object.keys(t),l=s;s=n.transitions;let c=0;for(let t=0,e=a.length;t<e;t++){let e=a[t];r=s[e],r||(r=s[e]=Object.create(null),c++),s=r}o+e+1==wt?(wt--,B(s,a,c)):k(s,a,o,c),i=!0,s=l[u]}m(t[u])}if(!i){let r=s[St];r?gt[o+e]=r:k(s,Object.keys(t),o,0)}}:t=>{let e,r=n.transitions||(n.transitions=Object.create(null)),i=0;for(let n in t)("function"!=typeof t.hasOwnProperty||t.hasOwnProperty(n))&&(e=r[n],e||(e=r[n]=Object.create(null),i++),r=e);let s=r[St];s?s>=96&&f?(gt[wt++]=96+(31&(s-=96)),gt[wt++]=s>>5):gt[wt++]=s:B(r,r.__keys__||Object.keys(t),i);for(let e in t)("function"!=typeof t.hasOwnProperty||t.hasOwnProperty(e))&&m(t[e])},U="function"==typeof this.useRecords&&this.useRecords,A=U?t=>{U(t)?I(t):S(t)}:I,E=t=>{let r;if(t>16777216){if(t-e>ht)throw new Error("Packed buffer would be larger than maximum buffer size");r=Math.min(ht,4096*Math.round(Math.max((t-e)*(t>67108864?1.25:2),4194304)/4096))}else r=1+(Math.max(t-e<<2,gt.length-1)>>12)<<12;let n=new ct(r);return dt=n.dataView||(n.dataView=new DataView(n.buffer,0,r)),t=Math.min(t,gt.length),gt.copy?gt.copy(n,0,e,t):n.set(gt.slice(e,t)),wt-=e,e=0,yt=n.length-10,gt=n},B=(t,e,i)=>{let s=n.nextId;s||(s=64),s<h&&this.shouldShareStructure&&!this.shouldShareStructure(e)?(s=n.nextOwnId,s<g||(s=h),n.nextOwnId=s+1):(s>=g&&(s=h),n.nextId=s+1);let o=e.highByte=s>=96&&f?s-96>>5:-1;t[St]=s,t.__keys__=e,n[s-64]=e,s<h?(e.isShared=!0,n.sharedLength=s-63,r=!0,o>=0?(gt[wt++]=96+(31&s),gt[wt++]=o):gt[wt++]=s):(o>=0?(gt[wt++]=213,gt[wt++]=114,gt[wt++]=96+(31&s),gt[wt++]=o):(gt[wt++]=212,gt[wt++]=114,gt[wt++]=s),i&&(d+=y*i),p.length>=c&&(p.shift()[St]=0),p.push(t),m(e))},k=(t,r,n,i)=>{let s=gt,o=wt,u=yt,a=e;gt=pt,wt=0,e=0,gt||(pt=gt=new ct(8192)),yt=gt.length-10,B(t,r,i),pt=gt;let l=wt;if(gt=s,wt=o,yt=u,e=a,l>1){let t=wt+l-1;t>yt&&E(t);let r=n+e;gt.copyWithin(r+l,r+1,wt),gt.set(pt.slice(0,l),r),wt=t}else gt[n+e]=pt[0]},v=t=>{let i=undefined(t,gt,e,wt,n,E,((t,e,n)=>{if(n)return r=!0;wt=e;let i=gt;return m(t),w(),i!==gt?{position:wt,targetView:dt,target:gt}:wt}),this);if(0===i)return A(t);wt=i}}useBuffer(t){gt=t,gt.dataView||(gt.dataView=new DataView(gt.buffer,gt.byteOffset,gt.byteLength)),wt=0}set position(t){wt=t}get position(){return wt}clearSharedData(){this.structures&&(this.structures=[]),this.typedStructs&&(this.typedStructs=[])}}function Ut(t,e,r,n){let i=t.byteLength;if(i+1<256){var{target:s,position:o}=r(4+i);s[o++]=199,s[o++]=i+1}else if(i+1<65536){var{target:s,position:o}=r(5+i);s[o++]=200,s[o++]=i+1>>8,s[o++]=i+1&255}else{var{target:s,position:o,targetView:u}=r(7+i);s[o++]=201,u.setUint32(o,i+1),o+=4}s[o++]=116,s[o++]=e,t.buffer||(t=new Uint8Array(t)),s.set(new Uint8Array(t.buffer,t.byteOffset,t.byteLength),o)}function At(t,e){let r=t.byteLength;var n,i;if(r<256){var{target:n,position:i}=e(r+2);n[i++]=196,n[i++]=r}else if(r<65536){var{target:n,position:i}=e(r+3);n[i++]=197,n[i++]=r>>8,n[i++]=255&r}else{var{target:n,position:i,targetView:s}=e(r+5);n[i++]=198,s.setUint32(i,r),i+=4}n.set(t,i)}function Et(t,e,r,n){let i=t.length;switch(i){case 1:e[r++]=212;break;case 2:e[r++]=213;break;case 4:e[r++]=214;break;case 8:e[r++]=215;break;case 16:e[r++]=216;break;default:i<256?(e[r++]=199,e[r++]=i):i<65536?(e[r++]=200,e[r++]=i>>8,e[r++]=255&i):(e[r++]=201,e[r++]=i>>24,e[r++]=i>>16&255,e[r++]=i>>8&255,e[r++]=255&i)}return e[r++]=n,e.set(t,r),r+=i}function Bt(t,e,r){if(bt.length>0){dt.setUint32(bt.position+t,wt+r-bt.position-t),bt.stringsPosition=wt-t;let n=bt;bt=null,e(n[0]),e(n[1])}}ot=[Date,Set,Error,RegExp,ArrayBuffer,Object.getPrototypeOf(Uint8Array.prototype).constructor,d],st=[{pack(t,e,r){let n=t.getTime()/1e3;if((this.useTimestamp32||0===t.getMilliseconds())&&n>=0&&n<4294967296){let{target:t,targetView:r,position:i}=e(6);t[i++]=214,t[i++]=255,r.setUint32(i,n)}else if(n>0&&n<4294967296){let{target:r,targetView:i,position:s}=e(10);r[s++]=215,r[s++]=255,i.setUint32(s,4e6*t.getMilliseconds()+(n/1e3/4294967296>>0)),i.setUint32(s+4,n)}else if(isNaN(n)){if(this.onInvalidDate)return e(0),r(this.onInvalidDate());let{target:t,targetView:n,position:i}=e(3);t[i++]=212,t[i++]=255,t[i++]=255}else{let{target:r,targetView:i,position:s}=e(15);r[s++]=199,r[s++]=12,r[s++]=255,i.setUint32(s,1e6*t.getMilliseconds()),i.setBigInt64(s+4,BigInt(Math.floor(n)))}}},{pack(t,e,r){if(this.setAsEmptyObject)return e(0),r({});let n=Array.from(t),{target:i,position:s}=e(this.moreTypes?3:0);this.moreTypes&&(i[s++]=212,i[s++]=115,i[s++]=0),r(n)}},{pack(t,e,r){let{target:n,position:i}=e(this.moreTypes?3:0);this.moreTypes&&(n[i++]=212,n[i++]=101,n[i++]=0),r([t.name,t.message,t.cause])}},{pack(t,e,r){let{target:n,position:i}=e(this.moreTypes?3:0);this.moreTypes&&(n[i++]=212,n[i++]=120,n[i++]=0),r([t.source,t.flags])}},{pack(t,e){this.moreTypes?Ut(t,16,e):At(lt?Buffer.from(t):new Uint8Array(t),e)}},{pack(t,e){let r=t.constructor;r!==ft&&this.moreTypes?Ut(t,Y.indexOf(r.name),e):At(t,e)}},{pack(t,e){let{target:r,position:n}=e(1);r[n]=193}}];let kt=new It({useRecords:!1});const vt=kt.pack,Ot=kt.pack,_t=It,{NEVER:xt,ALWAYS:Tt,DECIMAL_ROUND:jt,DECIMAL_FIT:Mt}=nt,Dt=512,Rt=1024,Vt=2048;const Lt=function(t,e={}){if(!t||"object"!=typeof t)throw new Error("first argument must be an Iterable, Async Iterable, Iterator, Async Iterator, or a promise");const r=new S(e);let n;const i=t=>{let e;n&&(t=Buffer.concat([n,t]),n=void 0);try{e=r.unpackMultiple(t)}catch(r){if(!r.incomplete)throw r;n=t.slice(r.lastPosition),e=r.values}return e};return"function"==typeof t[Symbol.iterator]?function*(){for(const e of t)yield*i(e)}():"function"==typeof t[Symbol.asyncIterator]?async function*(){for await(const e of t)yield*i(e)}():void 0},Nt=function(t,e={}){if(t&&"object"==typeof t){if("function"==typeof t[Symbol.iterator])return function*(t,e){const r=new It(e);for(const e of t)yield r.pack(e)}(t,e);if("function"==typeof t.then||"function"==typeof t[Symbol.asyncIterator])return async function*(t,e){const r=new It(e);for await(const e of t)yield r.pack(e)}(t,e);throw new Error("first argument must be an Iterable, Async Iterable, Iterator, Async Iterator, or a Promise")}throw new Error("first argument must be an Iterable, Async Iterable, or a Promise for an Async Iterable")};t.ALWAYS=Tt,t.C1=y,t.DECIMAL_FIT=Mt,t.DECIMAL_ROUND=jt,t.Decoder=Q,t.Encoder=_t,t.FLOAT32_OPTIONS=nt,t.NEVER=xt,t.Packr=It,t.RESERVE_START_SPACE=Vt,t.RESET_BUFFER_MODE=Rt,t.REUSE_BUFFER_MODE=Dt,t.Unpackr=S,t.addExtension=function(t){if(t.Class){if(!t.pack&&!t.write)throw new Error("Extension has no pack or write function");if(t.pack&&!t.type)throw new Error("Extension has no type (numeric code to identify the extension)");ot.unshift(t.Class),st.unshift(t)}!function(t){t.unpack?g[t.type]=t.unpack:g[t.type]=t}(t)},t.clearSource=G,t.decode=rt,t.decodeIter=Lt,t.encode=Ot,t.encodeIter=Nt,t.isNativeAccelerationEnabled=!1,t.mapsAsObjects=!0,t.pack=vt,t.roundFloat32=function(t){ut[0]=t;let e=H[(127&at[3])<<1|at[2]>>7];return(e*t+(t>0?.5:-.5)>>0)/e},t.unpack=tt,t.unpackMultiple=et,t.useRecords=!1}));
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).msgpackr={})}(this,(function(e){"use strict";var t,r,n;try{t=new TextDecoder}catch(e){}var i,s,o,a,u,l=0,f={},c=0,g=0,h=[],p={useRecords:!1,mapsAsObjects:!0};class d{}const y=new d;y.name="MessagePack 0xC1";var w,b=!1,m=2;try{new w("")}catch(e){m=1/0}class S{constructor(e){e&&(!1===e.useRecords&&void 0===e.mapsAsObjects&&(e.mapsAsObjects=!0),e.sequential&&!1!==e.trusted&&(e.trusted=!0,e.structures||0==e.useRecords||(e.structures=[],e.maxSharedStructures||(e.maxSharedStructures=0))),e.structures?e.structures.sharedLength=e.structures.length:e.getStructures&&((e.structures=[]).uninitialized=!0,e.structures.sharedLength=0),e.int64AsNumber&&(e.int64AsType="number")),Object.assign(this,e)}unpack(e,t){if(r)return Z((()=>(G(),this?this.unpack(e,t):S.prototype.unpack.call(p,e,t))));e.buffer||e.constructor!==ArrayBuffer||(e="undefined"!=typeof Buffer?Buffer.from(e):new Uint8Array(e)),"object"==typeof t?(n=t.end||e.length,l=t.start||0):(l=0,n=t>-1?t:e.length),g=0,s=null,o=null,r=e;try{u=e.dataView||(e.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength))}catch(t){if(r=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 S){if(f=this,this.structures)return i=this.structures,A(t);(!i||i.length>0)&&(i=[])}else f=p,(!i||i.length>0)&&(i=[]);return A(t)}unpackMultiple(e,t){let r,n=0;try{b=!0;let i=e.length,s=this?this.unpack(e,i):X.unpack(e,i);if(!t){for(r=[s];l<i;)n=l,r.push(A());return r}if(!1===t(s,n,l))return;for(;l<i;)if(n=l,!1===t(A(),n,l))return}catch(e){throw e.lastPosition=n,e.values=r,e}finally{b=!1,G()}}_mergeStructures(e,t){e=e||[],Object.isFrozen(e)&&(e=e.map((e=>e.slice(0))));for(let t=0,r=e.length;t<r;t++){let r=e[t];r&&(r.isShared=!0,t>=32&&(r.highByte=t-32>>5))}e.sharedLength=e.length;for(let r in t||[])if(r>=0){let n=e[r],i=t[r];i&&(n&&((e.restoreStructures||(e.restoreStructures=[]))[r]=n),e[r]=i)}return this.structures=e}decode(e,t){return this.unpack(e,t)}}function A(e){try{if(!f.trusted&&!b){let e=i.sharedLength||0;e<i.length&&(i.length=e)}let e;if(f.randomAccessStructure&&r[l]<64&&r[l],e=E(),o&&(l=o.postBundlePosition,o=null),b&&(i.restoreStructures=null),l==n)i&&i.restoreStructures&&U(),i=null,r=null,a&&(a=null);else{if(l>n)throw new Error("Unexpected end of MessagePack data");if(!b){let t;try{t=JSON.stringify(e,((e,t)=>"bigint"==typeof t?`${t}n`:t)).slice(0,100)}catch(e){t="(JSON view not available "+e+")"}throw new Error("Data read, but end of buffer not reached "+t)}}return e}catch(e){throw i&&i.restoreStructures&&U(),G(),(e instanceof RangeError||e.message.startsWith("Unexpected end of buffer")||l>n)&&(e.incomplete=!0),e}}function U(){for(let e in i.restoreStructures)i[e]=i.restoreStructures[e];i.restoreStructures=null}function E(){let e=r[l++];if(e<160){if(e<128){if(e<64)return e;{let t=i[63&e]||f.getStructures&&B()[63&e];return t?(t.read||(t.read=k(t,63&e)),t.read()):e}}if(e<144){if(e-=128,f.mapsAsObjects){let t={};for(let r=0;r<e;r++){let e=C();"__proto__"===e&&(e="__proto_"),t[e]=E()}return t}{let t=new Map;for(let r=0;r<e;r++)t.set(E(),E());return t}}{e-=144;let t=new Array(e);for(let r=0;r<e;r++)t[r]=E();return f.freezeData?Object.freeze(t):t}}if(e<192){let t=e-160;if(g>=l)return s.slice(l-c,(l+=t)-c);if(0==g&&n<140){let e=t<16?V(t):L(t);if(null!=e)return e}return O(t)}{let t;switch(e){case 192:return null;case 193:return o?(t=E(),t>0?o[1].slice(o.position1,o.position1+=t):o[0].slice(o.position0,o.position0-=t)):y;case 194:return!1;case 195:return!0;case 196:if(t=r[l++],void 0===t)throw new Error("Unexpected end of buffer");return N(t);case 197:return t=u.getUint16(l),l+=2,N(t);case 198:return t=u.getUint32(l),l+=4,N(t);case 199:return P(r[l++]);case 200:return t=u.getUint16(l),l+=2,P(t);case 201:return t=u.getUint32(l),l+=4,P(t);case 202:if(t=u.getFloat32(l),f.useFloat32>2){let e=H[(127&r[l])<<1|r[l+1]>>7];return l+=4,(e*t+(t>0?.5:-.5)>>0)/e}return l+=4,t;case 203:return t=u.getFloat64(l),l+=8,t;case 204:return r[l++];case 205:return t=u.getUint16(l),l+=2,t;case 206:return t=u.getUint32(l),l+=4,t;case 207:return"number"===f.int64AsType?(t=4294967296*u.getUint32(l),t+=u.getUint32(l+4)):"string"===f.int64AsType?t=u.getBigUint64(l).toString():"auto"===f.int64AsType?(t=u.getBigUint64(l),t<=BigInt(2)<<BigInt(52)&&(t=Number(t))):t=u.getBigUint64(l),l+=8,t;case 208:return u.getInt8(l++);case 209:return t=u.getInt16(l),l+=2,t;case 210:return t=u.getInt32(l),l+=4,t;case 211:return"number"===f.int64AsType?(t=4294967296*u.getInt32(l),t+=u.getUint32(l+4)):"string"===f.int64AsType?t=u.getBigInt64(l).toString():"auto"===f.int64AsType?(t=u.getBigInt64(l),t>=BigInt(-2)<<BigInt(52)&&t<=BigInt(2)<<BigInt(52)&&(t=Number(t))):t=u.getBigInt64(l),l+=8,t;case 212:if(t=r[l++],114==t)return J(63&r[l++]);{let e=h[t];if(e)return e.read?(l++,e.read(E())):e.noBuffer?(l++,e()):e(r.subarray(l,++l));throw new Error("Unknown extension "+t)}case 213:return t=r[l],114==t?(l++,J(63&r[l++],r[l++])):P(2);case 214:return P(4);case 215:return P(8);case 216:return P(16);case 217:return t=r[l++],g>=l?s.slice(l-c,(l+=t)-c):_(t);case 218:return t=u.getUint16(l),g>=(l+=2)?s.slice(l-c,(l+=t)-c):x(t);case 219:return t=u.getUint32(l),g>=(l+=4)?s.slice(l-c,(l+=t)-c):T(t);case 220:return t=u.getUint16(l),l+=2,j(t);case 221:return t=u.getUint32(l),l+=4,j(t);case 222:return t=u.getUint16(l),l+=2,R(t);case 223:return t=u.getUint32(l),l+=4,R(t);default:if(e>=224)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)}}}const I=/^[a-zA-Z_$][a-zA-Z\d_$]*$/;function k(e,t){function r(){if(r.count++>m){let r=e.read=new w("r","return function(){return "+(f.freezeData?"Object.freeze":"")+"({"+e.map((e=>"__proto__"===e?"__proto_:r()":I.test(e)?e+":r()":"["+JSON.stringify(e)+"]:r()")).join(",")+"})}")(E);return 0===e.highByte&&(e.read=v(t,e.read)),r()}let n={};for(let t=0,r=e.length;t<r;t++){let r=e[t];"__proto__"===r&&(r="__proto_"),n[r]=E()}return f.freezeData?Object.freeze(n):n}return r.count=0,0===e.highByte?v(t,r):r}const v=(e,t)=>function(){let n=r[l++];if(0===n)return t();let s=e<32?-(e+(n<<5)):e+(n<<5),o=i[s]||B()[s];if(!o)throw new Error("Record id is not defined for "+s);return o.read||(o.read=k(o,e)),o.read()};function B(){let e=Z((()=>(r=null,f.getStructures())));return i=f._mergeStructures(e,i)}var O=M,_=M,x=M,T=M;function M(e){let n;if(e<16&&(n=V(e)))return n;if(e>64&&t)return t.decode(r.subarray(l,l+=e));const i=l+e,s=[];for(n="";l<i;){const e=r[l++];if(0==(128&e))s.push(e);else if(192==(224&e)){const t=63&r[l++];s.push((31&e)<<6|t)}else if(224==(240&e)){const t=63&r[l++],n=63&r[l++];s.push((31&e)<<12|t<<6|n)}else if(240==(248&e)){let t=(7&e)<<18|(63&r[l++])<<12|(63&r[l++])<<6|63&r[l++];t>65535&&(t-=65536,s.push(t>>>10&1023|55296),t=56320|1023&t),s.push(t)}else s.push(e);s.length>=4096&&(n+=D.apply(String,s),s.length=0)}return s.length>0&&(n+=D.apply(String,s)),n}function j(e){let t=new Array(e);for(let r=0;r<e;r++)t[r]=E();return f.freezeData?Object.freeze(t):t}function R(e){if(f.mapsAsObjects){let t={};for(let r=0;r<e;r++){let e=C();"__proto__"===e&&(e="__proto_"),t[e]=E()}return t}{let t=new Map;for(let r=0;r<e;r++)t.set(E(),E());return t}}var D=String.fromCharCode;function L(e){let t=l,n=new Array(e);for(let i=0;i<e;i++){const e=r[l++];if((128&e)>0)return void(l=t);n[i]=e}return D.apply(String,n)}function V(e){if(e<4){if(e<2){if(0===e)return"";{let e=r[l++];return(128&e)>1?void(l-=1):D(e)}}{let t=r[l++],n=r[l++];if((128&t)>0||(128&n)>0)return void(l-=2);if(e<3)return D(t,n);let i=r[l++];return(128&i)>0?void(l-=3):D(t,n,i)}}{let t=r[l++],n=r[l++],i=r[l++],s=r[l++];if((128&t)>0||(128&n)>0||(128&i)>0||(128&s)>0)return void(l-=4);if(e<6){if(4===e)return D(t,n,i,s);{let e=r[l++];return(128&e)>0?void(l-=5):D(t,n,i,s,e)}}if(e<8){let o=r[l++],a=r[l++];if((128&o)>0||(128&a)>0)return void(l-=6);if(e<7)return D(t,n,i,s,o,a);let u=r[l++];return(128&u)>0?void(l-=7):D(t,n,i,s,o,a,u)}{let o=r[l++],a=r[l++],u=r[l++],f=r[l++];if((128&o)>0||(128&a)>0||(128&u)>0||(128&f)>0)return void(l-=8);if(e<10){if(8===e)return D(t,n,i,s,o,a,u,f);{let e=r[l++];return(128&e)>0?void(l-=9):D(t,n,i,s,o,a,u,f,e)}}if(e<12){let c=r[l++],g=r[l++];if((128&c)>0||(128&g)>0)return void(l-=10);if(e<11)return D(t,n,i,s,o,a,u,f,c,g);let h=r[l++];return(128&h)>0?void(l-=11):D(t,n,i,s,o,a,u,f,c,g,h)}{let c=r[l++],g=r[l++],h=r[l++],p=r[l++];if((128&c)>0||(128&g)>0||(128&h)>0||(128&p)>0)return void(l-=12);if(e<14){if(12===e)return D(t,n,i,s,o,a,u,f,c,g,h,p);{let e=r[l++];return(128&e)>0?void(l-=13):D(t,n,i,s,o,a,u,f,c,g,h,p,e)}}{let d=r[l++],y=r[l++];if((128&d)>0||(128&y)>0)return void(l-=14);if(e<15)return D(t,n,i,s,o,a,u,f,c,g,h,p,d,y);let w=r[l++];return(128&w)>0?void(l-=15):D(t,n,i,s,o,a,u,f,c,g,h,p,d,y,w)}}}}}function F(){let e,t=r[l++];if(t<192)e=t-160;else switch(t){case 217:e=r[l++];break;case 218:e=u.getUint16(l),l+=2;break;case 219:e=u.getUint32(l),l+=4;break;default:throw new Error("Expected string")}return M(e)}function N(e){return f.copyBuffers?Uint8Array.prototype.slice.call(r,l,l+=e):r.subarray(l,l+=e)}function P(e){let t=r[l++];if(h[t]){let n;return h[t](r.subarray(l,n=l+=e),(e=>{l=e;try{return E()}finally{l=n}}))}throw new Error("Unknown extension type "+t)}var z=new Array(4096);function C(){let e=r[l++];if(!(e>=160&&e<192))return l--,W(E());if(e-=160,g>=l)return s.slice(l-c,(l+=e)-c);if(!(0==g&&n<180))return O(e);let t,i=4095&(e<<5^(e>1?u.getUint16(l):e>0?r[l]:0)),o=z[i],a=l,f=l+e-3,h=0;if(o&&o.bytes==e){for(;a<f;){if(t=u.getUint32(a),t!=o[h++]){a=1879048192;break}a+=4}for(f+=3;a<f;)if(t=r[a++],t!=o[h++]){a=1879048192;break}if(a===f)return l=a,o.string;f-=3,a=l}for(o=[],z[i]=o,o.bytes=e;a<f;)t=u.getUint32(a),o.push(t),a+=4;for(f+=3;a<f;)t=r[a++],o.push(t);let p=e<16?V(e):L(e);return o.string=null!=p?p:O(e)}function W(e){if("string"==typeof e)return e;if("number"==typeof e||"boolean"==typeof e||"bigint"==typeof e)return e.toString();if(null==e)return e+"";if(f.allowArraysInMapKeys&&Array.isArray(e)&&e.flat().every((e=>["string","number","boolean","bigint"].includes(typeof e))))return e.flat().toString();throw new Error("Invalid property type for record: "+typeof e)}const J=(e,t)=>{let r=E().map(W),n=e;void 0!==t&&(e=e<32?-((t<<5)+e):(t<<5)+e,r.highByte=t);let s=i[e];return s&&(s.isShared||b)&&((i.restoreStructures||(i.restoreStructures=[]))[e]=s),i[e]=r,r.read=k(r,n),r.read()};h[0]=()=>{},h[0].noBuffer=!0,h[66]=e=>{let t=e.byteLength%8||8,r=BigInt(128&e[0]?e[0]-256:e[0]);for(let n=1;n<t;n++)r<<=BigInt(8),r+=BigInt(e[n]);if(e.byteLength!==t){let n=new DataView(e.buffer,e.byteOffset,e.byteLength),i=(e,t)=>{let r=t-e;if(r<=40){let r=n.getBigUint64(e);for(let i=e+8;i<t;i+=8)r<<=BigInt(64n),r|=n.getBigUint64(i);return r}let s=e+(r>>4<<3),o=i(e,s),a=i(s,t);return o<<BigInt(8*(t-s))|a};r=r<<BigInt(8*(n.byteLength-t))|i(t,n.byteLength)}return r};let $={Error:Error,EvalError:EvalError,RangeError:RangeError,ReferenceError:ReferenceError,SyntaxError:SyntaxError,TypeError:TypeError,URIError:URIError,AggregateError:"function"==typeof AggregateError?AggregateError:null};h[101]=()=>{let e=E();if(!$[e[0]]){let t=Error(e[1],{cause:e[2]});return t.name=e[0],t}return $[e[0]](e[1],{cause:e[2]})},h[105]=e=>{if(!1===f.structuredClone)throw new Error("Structured clone extension is disabled");let t=u.getUint32(l-4);a||(a=new Map);let n,i=r[l];n=i>=144&&i<160||220==i||221==i?[]:i>=128&&i<144||222==i||223==i?new Map:(i>=199&&i<=201||i>=212&&i<=216)&&115===r[l+1]?new Set:{};let s={target:n};a.set(t,s);let o=E();if(!s.used)return s.target=o;if(Object.assign(n,o),n instanceof Map)for(let[e,t]of o.entries())n.set(e,t);if(n instanceof Set)for(let e of Array.from(o))n.add(e);return n},h[112]=e=>{if(!1===f.structuredClone)throw new Error("Structured clone extension is disabled");let t=u.getUint32(l-4),r=a.get(t);return r.used=!0,r.target},h[115]=()=>new Set(E());const K=["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64","BigInt64","BigUint64"].map((e=>e+"Array"));let Y="object"==typeof globalThis?globalThis:window;h[116]=e=>{let t=e[0],r=Uint8Array.prototype.slice.call(e,1).buffer,n=K[t];if(!n){if(16===t)return r;if(17===t)return new DataView(r);throw new Error("Could not find typed array for code "+t)}return new Y[n](r)},h[120]=()=>{let e=E();return new RegExp(e[0],e[1])};const q=[];function Z(e){let t=n,h=l,p=c,d=g,y=s,w=a,m=o,S=new Uint8Array(r.slice(0,n)),A=i,U=i.slice(0,i.length),E=f,I=b,k=e();return n=t,l=h,c=p,g=d,s=y,a=w,o=m,r=S,b=I,(i=A).splice(0,i.length,...U),f=E,u=new DataView(r.buffer,r.byteOffset,r.byteLength),k}function G(){r=null,a=null,i=null}h[98]=e=>{let t=(e[0]<<24)+(e[1]<<16)+(e[2]<<8)+e[3],r=l;return l+=t-e.length,o=q,(o=[F(),F()]).position0=0,o.position1=0,o.postBundlePosition=l,l=r,E()},h[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 H=new Array(147);for(let e=0;e<256;e++)H[e]=+("1e"+Math.floor(45.15-.30103*e));const Q=S;var X=new S({useRecords:!1});const ee=X.unpack,te=X.unpackMultiple,re=X.unpack,ne={NEVER:0,ALWAYS:1,DECIMAL_ROUND:3,DECIMAL_FIT:4};let ie,se,oe,ae=new Float32Array(1),ue=new Uint8Array(ae.buffer,0,4);try{ie=new TextEncoder}catch(e){}const le="undefined"!=typeof Buffer,fe=le?function(e){return Buffer.allocUnsafeSlow(e)}:Uint8Array,ce=le?Buffer:Uint8Array,ge=le?4294967296:2144337920;let he,pe,de,ye,we=0,be=null;const me=/[\u0080-\uFFFF]/,Se=Symbol("record-id");class Ae extends S{constructor(e){let t,r,n,i;super(e),this.offset=0;let s=ce.prototype.utf8Write?function(e,t){return he.utf8Write(e,t,he.byteLength-t)}:!(!ie||!ie.encodeInto)&&function(e,t){return ie.encodeInto(e,he.subarray(t)).written},o=this;e||(e={});let a=e&&e.sequential,u=e.structures||e.saveStructures,l=e.maxSharedStructures;if(null==l&&(l=u?32:0),l>8160)throw new Error("Maximum maxSharedStructure is 8160");e.structuredClone&&null==e.moreTypes&&(this.moreTypes=!0);let f=e.maxOwnStructures;null==f&&(f=u?32:64),this.structures||0==e.useRecords||(this.structures=[]);let c=l>32||f+l>64,g=l+64,h=l+f+64;if(h>8256)throw new Error("Maximum maxSharedStructure + maxOwnStructure is 8192");let p=[],d=0,y=0;this.pack=this.encode=function(e,s){if(he||(he=new fe(8192),de=he.dataView||(he.dataView=new DataView(he.buffer,0,8192)),we=0),ye=he.length-10,ye-we<2048?(he=new fe(he.length),de=he.dataView||(he.dataView=new DataView(he.buffer,0,he.length)),ye=he.length-10,we=0):we=we+7&2147483640,t=we,s&Le&&(we+=255&s),i=o.structuredClone?new Map:null,o.bundleStrings&&"string"!=typeof e?(be=[],be.size=1/0):be=null,n=o.structures,n){n.uninitialized&&(n=o._mergeStructures(o.getStructures()));let e=n.sharedLength||0;if(e>l)throw new Error("Shared structures is larger than maximum shared structures, try increasing maxSharedStructures to "+n.sharedLength);if(!n.transitions){n.transitions=Object.create(null);for(let t=0;t<e;t++){let e=n[t];if(!e)continue;let r,i=n.transitions;for(let t=0,n=e.length;t<n;t++){let n=e[t];r=i[n],r||(r=i[n]=Object.create(null)),i=r}i[Se]=t+64}this.lastNamedStructuresLength=e}a||(n.nextId=e+64)}let u;r&&(r=!1);try{o.randomAccessStructure&&e&&e.constructor&&e.constructor===Object?B(e):m(e);let a=be;if(be&&ke(t,m,0),i&&i.idsToInsert){let e=i.idsToInsert.sort(((e,t)=>e.offset>t.offset?1:-1)),r=e.length,n=-1;for(;a&&r>0;){let i=e[--r].offset+t;i<a.stringsPosition+t&&-1===n&&(n=0),i>a.position+t?n>=0&&(n+=6):(n>=0&&(de.setUint32(a.position+t,de.getUint32(a.position+t)+n),n=-1),a=a.previous,r++)}n>=0&&a&&de.setUint32(a.position+t,de.getUint32(a.position+t)+n),we+=6*e.length,we>ye&&I(we),o.offset=we;let s=function(e,t){let r,n=6*t.length,i=e.length-n;for(;r=t.pop();){let t=r.offset,s=r.id;e.copyWithin(t+n,t,i),n-=6;let o=t+n;e[o++]=214,e[o++]=105,e[o++]=s>>24,e[o++]=s>>16&255,e[o++]=s>>8&255,e[o++]=255&s,i=t}return e}(he.subarray(t,we),e);return i=null,s}return o.offset=we,s&Re?(he.start=t,he.end=we,he):he.subarray(t,we)}catch(e){throw u=e,e}finally{if(n&&(w(),r&&o.saveStructures)){let r=n.sharedLength||0,i=he.subarray(t,we),a=function(e,t){return e.isCompatible=e=>{let r=!e||(t.lastNamedStructuresLength||0)===e.length;return r||t._mergeStructures(e),r},e}(n,o);if(!u)return!1===o.saveStructures(a,a.isCompatible)?o.pack(e,s):(o.lastNamedStructuresLength=r,he.length>1073741824&&(he=null),i)}he.length>1073741824&&(he=null),s&De&&(we=t)}};const w=()=>{y<10&&y++;let e=n.sharedLength||0;if(n.length>e&&!a&&(n.length=e),d>1e4)n.transitions=null,y=0,d=0,p.length>0&&(p=[]);else if(p.length>0&&!a){for(let e=0,t=p.length;e<t;e++)p[e][Se]=0;p=[]}},b=e=>{var t=e.length;t<16?he[we++]=144|t:t<65536?(he[we++]=220,he[we++]=t>>8,he[we++]=255&t):(he[we++]=221,de.setUint32(we,t),we+=4);for(let r=0;r<t;r++)m(e[r])},m=e=>{we>ye&&(he=I(we));var r,n=typeof e;if("string"===n){let n,i=e.length;if(be&&i>=4&&i<4096){if((be.size+=i)>21760){let e,r,n=(be[0]?3*be[0].length+be[1].length:0)+10;we+n>ye&&(he=I(we+n)),be.position?(r=be,he[we]=200,we+=3,he[we++]=98,e=we-t,we+=4,ke(t,m,0),de.setUint16(e+t-3,we-t-e)):(he[we++]=214,he[we++]=98,e=we-t,we+=4),be=["",""],be.previous=r,be.size=0,be.position=e}let r=me.test(e);return be[r?0:1]+=e,he[we++]=193,void m(r?-i:i)}n=i<32?1:i<256?2:i<65536?3:5;let o=3*i;if(we+o>ye&&(he=I(we+o)),i<64||!s){let t,s,o,a=we+n;for(t=0;t<i;t++)s=e.charCodeAt(t),s<128?he[a++]=s:s<2048?(he[a++]=s>>6|192,he[a++]=63&s|128):55296==(64512&s)&&56320==(64512&(o=e.charCodeAt(t+1)))?(s=65536+((1023&s)<<10)+(1023&o),t++,he[a++]=s>>18|240,he[a++]=s>>12&63|128,he[a++]=s>>6&63|128,he[a++]=63&s|128):(he[a++]=s>>12|224,he[a++]=s>>6&63|128,he[a++]=63&s|128);r=a-we-n}else r=s(e,we+n);r<32?he[we++]=160|r:r<256?(n<2&&he.copyWithin(we+2,we+1,we+1+r),he[we++]=217,he[we++]=r):r<65536?(n<3&&he.copyWithin(we+3,we+2,we+2+r),he[we++]=218,he[we++]=r>>8,he[we++]=255&r):(n<5&&he.copyWithin(we+5,we+3,we+3+r),he[we++]=219,de.setUint32(we,r),we+=4),we+=r}else if("number"===n)if(e>>>0===e)e<32||e<128&&!1===this.useRecords||e<64&&!this.randomAccessStructure?he[we++]=e:e<256?(he[we++]=204,he[we++]=e):e<65536?(he[we++]=205,he[we++]=e>>8,he[we++]=255&e):(he[we++]=206,de.setUint32(we,e),we+=4);else if(e>>0===e)e>=-32?he[we++]=256+e:e>=-128?(he[we++]=208,he[we++]=e+256):e>=-32768?(he[we++]=209,de.setInt16(we,e),we+=2):(he[we++]=210,de.setInt32(we,e),we+=4);else{let t;if((t=this.useFloat32)>0&&e<4294967296&&e>=-2147483648){let r;if(he[we++]=202,de.setFloat32(we,e),t<4||(r=e*H[(127&he[we])<<1|he[we+1]>>7])>>0===r)return void(we+=4);we--}he[we++]=203,de.setFloat64(we,e),we+=8}else if("object"===n||"function"===n)if(e){if(i){let r=i.get(e);if(r){if(!r.id){let e=i.idsToInsert||(i.idsToInsert=[]);r.id=e.push(r)}return he[we++]=214,he[we++]=112,de.setUint32(we,r.id),void(we+=4)}i.set(e,{offset:we-t})}let s=e.constructor;if(s===Object)E(e);else if(s===Array)b(e);else if(s===Map)if(this.mapAsEmptyObject)he[we++]=128;else{(r=e.size)<16?he[we++]=128|r:r<65536?(he[we++]=222,he[we++]=r>>8,he[we++]=255&r):(he[we++]=223,de.setUint32(we,r),we+=4);for(let[t,r]of e)m(t),m(r)}else{for(let t=0,r=se.length;t<r;t++){if(e instanceof oe[t]){let r=se[t];if(r.write){r.type&&(he[we++]=212,he[we++]=r.type,he[we++]=0);let t=r.write.call(this,e);return void(t===e?Array.isArray(e)?b(e):E(e):m(t))}let n,i=he,s=de,o=we;he=null;try{n=r.pack.call(this,e,(e=>(he=i,i=null,we+=e,we>ye&&I(we),{target:he,targetView:de,position:we-e})),m)}finally{i&&(he=i,de=s,we=o,ye=he.length-10)}return void(n&&(n.length+we>ye&&I(n.length+we),we=Ie(n,he,we,r.type)))}}if(Array.isArray(e))b(e);else{if(e.toJSON){const t=e.toJSON();if(t!==e)return m(t)}if("function"===n)return m(this.writeFunction&&this.writeFunction(e));E(e)}}}else he[we++]=192;else if("boolean"===n)he[we++]=e?195:194;else if("bigint"===n){if(e<0x8000000000000000&&e>=-0x8000000000000000)he[we++]=211,de.setBigInt64(we,e);else if(e<0x10000000000000000&&e>0)he[we++]=207,de.setBigUint64(we,e);else{if(!this.largeBigIntToFloat){if(this.largeBigIntToString)return m(e.toString());if(this.useBigIntExtension||this.moreTypes){let t,r=e<0?BigInt(-1):BigInt(0);if(e>>BigInt(65536)===r){let n=BigInt(0x10000000000000000)-BigInt(1),i=[];do{i.push(e&n),e>>=BigInt(64)}while(e!==r);t=new Uint8Array(new BigUint64Array(i).buffer),t.reverse()}else{let r=e<0,n=(r?~e:e).toString(16);if(n.length%2?n="0"+n:parseInt(n.charAt(0),16)>=8&&(n="00"+n),le)t=Buffer.from(n,"hex");else{t=new Uint8Array(n.length/2);for(let e=0;e<t.length;e++)t[e]=parseInt(n.slice(2*e,2*e+2),16)}if(r)for(let e=0;e<t.length;e++)t[e]=~t[e]}return t.length+we>ye&&I(t.length+we),void(we=Ie(t,he,we,66))}throw new RangeError(e+" was too large to fit in MessagePack 64-bit integer format, use useBigIntExtension, or set largeBigIntToFloat to convert to float-64, or set largeBigIntToString to convert to string")}he[we++]=203,de.setFloat64(we,Number(e))}we+=8}else{if("undefined"!==n)throw new Error("Unknown type: "+n);this.encodeUndefinedAsNil?he[we++]=192:(he[we++]=212,he[we++]=0,he[we++]=0)}},S=this.variableMapSize||this.coercibleKeyAsNumber||this.skipValues?e=>{let t;if(this.skipValues){t=[];for(let r in e)"function"==typeof e.hasOwnProperty&&!e.hasOwnProperty(r)||this.skipValues.includes(e[r])||t.push(r)}else t=Object.keys(e);let r,n=t.length;if(n<16?he[we++]=128|n:n<65536?(he[we++]=222,he[we++]=n>>8,he[we++]=255&n):(he[we++]=223,de.setUint32(we,n),we+=4),this.coercibleKeyAsNumber)for(let i=0;i<n;i++){r=t[i];let n=Number(r);m(isNaN(n)?r:n),m(e[r])}else for(let i=0;i<n;i++)m(r=t[i]),m(e[r])}:e=>{he[we++]=222;let r=we-t;we+=2;let n=0;for(let t in e)("function"!=typeof e.hasOwnProperty||e.hasOwnProperty(t))&&(m(t),m(e[t]),n++);if(n>65535)throw new Error('Object is too large to serialize with fast 16-bit map size, use the "variableMapSize" option to serialize this object');he[r+++t]=n>>8,he[r+t]=255&n},A=!1===this.useRecords?S:e.progressiveRecords&&!c?e=>{let r,i,s=n.transitions||(n.transitions=Object.create(null)),o=we++-t;for(let a in e)if("function"!=typeof e.hasOwnProperty||e.hasOwnProperty(a)){if(r=s[a],r)s=r;else{let u=Object.keys(e),l=s;s=n.transitions;let f=0;for(let e=0,t=u.length;e<t;e++){let t=u[e];r=s[t],r||(r=s[t]=Object.create(null),f++),s=r}o+t+1==we?(we--,k(s,u,f)):v(s,u,o,f),i=!0,s=l[a]}m(e[a])}if(!i){let r=s[Se];r?he[o+t]=r:v(s,Object.keys(e),o,0)}}:e=>{let t,r=n.transitions||(n.transitions=Object.create(null)),i=0;for(let n in e)("function"!=typeof e.hasOwnProperty||e.hasOwnProperty(n))&&(t=r[n],t||(t=r[n]=Object.create(null),i++),r=t);let s=r[Se];s?s>=96&&c?(he[we++]=96+(31&(s-=96)),he[we++]=s>>5):he[we++]=s:k(r,r.__keys__||Object.keys(e),i);for(let t in e)("function"!=typeof e.hasOwnProperty||e.hasOwnProperty(t))&&m(e[t])},U="function"==typeof this.useRecords&&this.useRecords,E=U?e=>{U(e)?A(e):S(e)}:A,I=e=>{let r;if(e>16777216){if(e-t>ge)throw new Error("Packed buffer would be larger than maximum buffer size");r=Math.min(ge,4096*Math.round(Math.max((e-t)*(e>67108864?1.25:2),4194304)/4096))}else r=1+(Math.max(e-t<<2,he.length-1)>>12)<<12;let n=new fe(r);return de=n.dataView||(n.dataView=new DataView(n.buffer,0,r)),e=Math.min(e,he.length),he.copy?he.copy(n,0,t,e):n.set(he.slice(t,e)),we-=t,t=0,ye=n.length-10,he=n},k=(e,t,i)=>{let s=n.nextId;s||(s=64),s<g&&this.shouldShareStructure&&!this.shouldShareStructure(t)?(s=n.nextOwnId,s<h||(s=g),n.nextOwnId=s+1):(s>=h&&(s=g),n.nextId=s+1);let o=t.highByte=s>=96&&c?s-96>>5:-1;e[Se]=s,e.__keys__=t,n[s-64]=t,s<g?(t.isShared=!0,n.sharedLength=s-63,r=!0,o>=0?(he[we++]=96+(31&s),he[we++]=o):he[we++]=s):(o>=0?(he[we++]=213,he[we++]=114,he[we++]=96+(31&s),he[we++]=o):(he[we++]=212,he[we++]=114,he[we++]=s),i&&(d+=y*i),p.length>=f&&(p.shift()[Se]=0),p.push(e),m(t))},v=(e,r,n,i)=>{let s=he,o=we,a=ye,u=t;he=pe,we=0,t=0,he||(pe=he=new fe(8192)),ye=he.length-10,k(e,r,i),pe=he;let l=we;if(he=s,we=o,ye=a,t=u,l>1){let e=we+l-1;e>ye&&I(e);let r=n+t;he.copyWithin(r+l,r+1,we),he.set(pe.slice(0,l),r),we=e}else he[n+t]=pe[0]},B=e=>{let i=undefined(e,he,t,we,n,I,((e,t,n)=>{if(n)return r=!0;we=t;let i=he;return m(e),w(),i!==he?{position:we,targetView:de,target:he}:we}),this);if(0===i)return E(e);we=i}}useBuffer(e){he=e,he.dataView||(he.dataView=new DataView(he.buffer,he.byteOffset,he.byteLength)),we=0}set position(e){we=e}get position(){return we}clearSharedData(){this.structures&&(this.structures=[]),this.typedStructs&&(this.typedStructs=[])}}function Ue(e,t,r,n){let i=e.byteLength;if(i+1<256){var{target:s,position:o}=r(4+i);s[o++]=199,s[o++]=i+1}else if(i+1<65536){var{target:s,position:o}=r(5+i);s[o++]=200,s[o++]=i+1>>8,s[o++]=i+1&255}else{var{target:s,position:o,targetView:a}=r(7+i);s[o++]=201,a.setUint32(o,i+1),o+=4}s[o++]=116,s[o++]=t,e.buffer||(e=new Uint8Array(e)),s.set(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),o)}function Ee(e,t){let r=e.byteLength;var n,i;if(r<256){var{target:n,position:i}=t(r+2);n[i++]=196,n[i++]=r}else if(r<65536){var{target:n,position:i}=t(r+3);n[i++]=197,n[i++]=r>>8,n[i++]=255&r}else{var{target:n,position:i,targetView:s}=t(r+5);n[i++]=198,s.setUint32(i,r),i+=4}n.set(e,i)}function Ie(e,t,r,n){let i=e.length;switch(i){case 1:t[r++]=212;break;case 2:t[r++]=213;break;case 4:t[r++]=214;break;case 8:t[r++]=215;break;case 16:t[r++]=216;break;default:i<256?(t[r++]=199,t[r++]=i):i<65536?(t[r++]=200,t[r++]=i>>8,t[r++]=255&i):(t[r++]=201,t[r++]=i>>24,t[r++]=i>>16&255,t[r++]=i>>8&255,t[r++]=255&i)}return t[r++]=n,t.set(e,r),r+=i}function ke(e,t,r){if(be.length>0){de.setUint32(be.position+e,we+r-be.position-e),be.stringsPosition=we-e;let n=be;be=null,t(n[0]),t(n[1])}}oe=[Date,Set,Error,RegExp,ArrayBuffer,Object.getPrototypeOf(Uint8Array.prototype).constructor,DataView,d],se=[{pack(e,t,r){let n=e.getTime()/1e3;if((this.useTimestamp32||0===e.getMilliseconds())&&n>=0&&n<4294967296){let{target:e,targetView:r,position:i}=t(6);e[i++]=214,e[i++]=255,r.setUint32(i,n)}else if(n>0&&n<4294967296){let{target:r,targetView:i,position:s}=t(10);r[s++]=215,r[s++]=255,i.setUint32(s,4e6*e.getMilliseconds()+(n/1e3/4294967296>>0)),i.setUint32(s+4,n)}else if(isNaN(n)){if(this.onInvalidDate)return t(0),r(this.onInvalidDate());let{target:e,targetView:n,position:i}=t(3);e[i++]=212,e[i++]=255,e[i++]=255}else{let{target:r,targetView:i,position:s}=t(15);r[s++]=199,r[s++]=12,r[s++]=255,i.setUint32(s,1e6*e.getMilliseconds()),i.setBigInt64(s+4,BigInt(Math.floor(n)))}}},{pack(e,t,r){if(this.setAsEmptyObject)return t(0),r({});let n=Array.from(e),{target:i,position:s}=t(this.moreTypes?3:0);this.moreTypes&&(i[s++]=212,i[s++]=115,i[s++]=0),r(n)}},{pack(e,t,r){let{target:n,position:i}=t(this.moreTypes?3:0);this.moreTypes&&(n[i++]=212,n[i++]=101,n[i++]=0),r([e.name,e.message,e.cause])}},{pack(e,t,r){let{target:n,position:i}=t(this.moreTypes?3:0);this.moreTypes&&(n[i++]=212,n[i++]=120,n[i++]=0),r([e.source,e.flags])}},{pack(e,t){this.moreTypes?Ue(e,16,t):Ee(le?Buffer.from(e):new Uint8Array(e),t)}},{pack(e,t){let r=e.constructor;r!==ce&&this.moreTypes?Ue(e,K.indexOf(r.name),t):Ee(e,t)}},{pack(e,t){this.moreTypes?Ue(e,17,t):Ee(le?Buffer.from(e):new Uint8Array(e),t)}},{pack(e,t){let{target:r,position:n}=t(1);r[n]=193}}];let ve=new Ae({useRecords:!1});const Be=ve.pack,Oe=ve.pack,_e=Ae,{NEVER:xe,ALWAYS:Te,DECIMAL_ROUND:Me,DECIMAL_FIT:je}=ne,Re=512,De=1024,Le=2048;const Ve=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 r=new S(t);let n;const i=e=>{let t;n&&(e=Buffer.concat([n,e]),n=void 0);try{t=r.unpackMultiple(e)}catch(r){if(!r.incomplete)throw r;n=e.slice(r.lastPosition),t=r.values}return t};return"function"==typeof e[Symbol.iterator]?function*(){for(const t of e)yield*i(t)}():"function"==typeof e[Symbol.asyncIterator]?async function*(){for await(const t of e)yield*i(t)}():void 0},Fe=function(e,t={}){if(e&&"object"==typeof e){if("function"==typeof e[Symbol.iterator])return function*(e,t){const r=new Ae(t);for(const t of e)yield r.pack(t)}(e,t);if("function"==typeof e.then||"function"==typeof e[Symbol.asyncIterator])return async function*(e,t){const r=new Ae(t);for await(const t of e)yield r.pack(t)}(e,t);throw new Error("first argument must be an Iterable, Async Iterable, Iterator, Async Iterator, or a Promise")}throw new Error("first argument must be an Iterable, Async Iterable, or a Promise for an Async Iterable")};e.ALWAYS=Te,e.C1=y,e.DECIMAL_FIT=je,e.DECIMAL_ROUND=Me,e.Decoder=Q,e.Encoder=_e,e.FLOAT32_OPTIONS=ne,e.NEVER=xe,e.Packr=Ae,e.RESERVE_START_SPACE=Le,e.RESET_BUFFER_MODE=De,e.REUSE_BUFFER_MODE=Re,e.Unpackr=S,e.addExtension=function(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)");oe.unshift(e.Class),se.unshift(e)}!function(e){e.unpack?h[e.type]=e.unpack:h[e.type]=e}(e)},e.clearSource=G,e.decode=re,e.decodeIter=Ve,e.encode=Oe,e.encodeIter=Fe,e.isNativeAccelerationEnabled=!1,e.mapsAsObjects=!0,e.pack=Be,e.roundFloat32=function(e){ae[0]=e;let t=H[(127&ue[3])<<1|ue[2]>>7];return(t*e+(e>0?.5:-.5)>>0)/t},e.unpack=ee,e.unpackMultiple=te,e.useRecords=!1}));
//# sourceMappingURL=index-no-eval.min.js.map

@@ -1,2 +0,2 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).msgpackr={})}(this,(function(t){"use strict";var e,r,n;try{e=new TextDecoder}catch(t){}var i,s,o,u,a,l=0,c={},f=0,h=0,g=[],p={useRecords:!1,mapsAsObjects:!0};class d{}const y=new d;y.name="MessagePack 0xC1";var w=!1,b=2;try{new Function("")}catch(t){b=1/0}class m{constructor(t){t&&(!1===t.useRecords&&void 0===t.mapsAsObjects&&(t.mapsAsObjects=!0),t.sequential&&!1!==t.trusted&&(t.trusted=!0,t.structures||0==t.useRecords||(t.structures=[],t.maxSharedStructures||(t.maxSharedStructures=0))),t.structures?t.structures.sharedLength=t.structures.length:t.getStructures&&((t.structures=[]).uninitialized=!0,t.structures.sharedLength=0),t.int64AsNumber&&(t.int64AsType="number")),Object.assign(this,t)}unpack(t,e){if(r)return K((()=>(Z(),this?this.unpack(t,e):m.prototype.unpack.call(p,t,e))));t.buffer||t.constructor!==ArrayBuffer||(t="undefined"!=typeof Buffer?Buffer.from(t):new Uint8Array(t)),"object"==typeof e?(n=e.end||t.length,l=e.start||0):(l=0,n=e>-1?e:t.length),h=0,s=null,o=null,r=t;try{a=t.dataView||(t.dataView=new DataView(t.buffer,t.byteOffset,t.byteLength))}catch(e){if(r=null,t instanceof Uint8Array)throw e;throw new Error("Source must be a Uint8Array or Buffer but was a "+(t&&"object"==typeof t?t.constructor.name:typeof t))}if(this instanceof m){if(c=this,this.structures)return i=this.structures,S(e);(!i||i.length>0)&&(i=[])}else c=p,(!i||i.length>0)&&(i=[]);return S(e)}unpackMultiple(t,e){let r,n=0;try{w=!0;let i=t.length,s=this?this.unpack(t,i):Q.unpack(t,i);if(!e){for(r=[s];l<i;)n=l,r.push(S());return r}if(!1===e(s,n,l))return;for(;l<i;)if(n=l,!1===e(S(),n,l))return}catch(t){throw t.lastPosition=n,t.values=r,t}finally{w=!1,Z()}}_mergeStructures(t,e){t=t||[],Object.isFrozen(t)&&(t=t.map((t=>t.slice(0))));for(let e=0,r=t.length;e<r;e++){let r=t[e];r&&(r.isShared=!0,e>=32&&(r.highByte=e-32>>5))}t.sharedLength=t.length;for(let r in e||[])if(r>=0){let n=t[r],i=e[r];i&&(n&&((t.restoreStructures||(t.restoreStructures=[]))[r]=n),t[r]=i)}return this.structures=t}decode(t,e){return this.unpack(t,e)}}function S(t){try{if(!c.trusted&&!w){let t=i.sharedLength||0;t<i.length&&(i.length=t)}let t;if(c.randomAccessStructure&&r[l]<64&&r[l],t=U(),o&&(l=o.postBundlePosition,o=null),w&&(i.restoreStructures=null),l==n)i&&i.restoreStructures&&I(),i=null,r=null,u&&(u=null);else{if(l>n)throw new Error("Unexpected end of MessagePack data");if(!w){let e;try{e=JSON.stringify(t,((t,e)=>"bigint"==typeof e?`${e}n`:e)).slice(0,100)}catch(t){e="(JSON view not available "+t+")"}throw new Error("Data read, but end of buffer not reached "+e)}}return t}catch(t){throw i&&i.restoreStructures&&I(),Z(),(t instanceof RangeError||t.message.startsWith("Unexpected end of buffer")||l>n)&&(t.incomplete=!0),t}}function I(){for(let t in i.restoreStructures)i[t]=i.restoreStructures[t];i.restoreStructures=null}function U(){let t=r[l++];if(t<160){if(t<128){if(t<64)return t;{let e=i[63&t]||c.getStructures&&k()[63&t];return e?(e.read||(e.read=E(e,63&t)),e.read()):t}}if(t<144){if(t-=128,c.mapsAsObjects){let e={};for(let r=0;r<t;r++){let t=z();"__proto__"===t&&(t="__proto_"),e[t]=U()}return e}{let e=new Map;for(let r=0;r<t;r++)e.set(U(),U());return e}}{t-=144;let e=new Array(t);for(let r=0;r<t;r++)e[r]=U();return c.freezeData?Object.freeze(e):e}}if(t<192){let e=t-160;if(h>=l)return s.slice(l-f,(l+=e)-f);if(0==h&&n<140){let t=e<16?V(e):R(e);if(null!=t)return t}return v(e)}{let e;switch(t){case 192:return null;case 193:return o?(e=U(),e>0?o[1].slice(o.position1,o.position1+=e):o[0].slice(o.position0,o.position0-=e)):y;case 194:return!1;case 195:return!0;case 196:if(e=r[l++],void 0===e)throw new Error("Unexpected end of buffer");return L(e);case 197:return e=a.getUint16(l),l+=2,L(e);case 198:return e=a.getUint32(l),l+=4,L(e);case 199:return N(r[l++]);case 200:return e=a.getUint16(l),l+=2,N(e);case 201:return e=a.getUint32(l),l+=4,N(e);case 202:if(e=a.getFloat32(l),c.useFloat32>2){let t=G[(127&r[l])<<1|r[l+1]>>7];return l+=4,(t*e+(e>0?.5:-.5)>>0)/t}return l+=4,e;case 203:return e=a.getFloat64(l),l+=8,e;case 204:return r[l++];case 205:return e=a.getUint16(l),l+=2,e;case 206:return e=a.getUint32(l),l+=4,e;case 207:return"number"===c.int64AsType?(e=4294967296*a.getUint32(l),e+=a.getUint32(l+4)):"string"===c.int64AsType?e=a.getBigUint64(l).toString():"auto"===c.int64AsType?(e=a.getBigUint64(l),e<=BigInt(2)<<BigInt(52)&&(e=Number(e))):e=a.getBigUint64(l),l+=8,e;case 208:return a.getInt8(l++);case 209:return e=a.getInt16(l),l+=2,e;case 210:return e=a.getInt32(l),l+=4,e;case 211:return"number"===c.int64AsType?(e=4294967296*a.getInt32(l),e+=a.getUint32(l+4)):"string"===c.int64AsType?e=a.getBigInt64(l).toString():"auto"===c.int64AsType?(e=a.getBigInt64(l),e>=BigInt(-2)<<BigInt(52)&&e<=BigInt(2)<<BigInt(52)&&(e=Number(e))):e=a.getBigInt64(l),l+=8,e;case 212:if(e=r[l++],114==e)return W(63&r[l++]);{let t=g[e];if(t)return t.read?(l++,t.read(U())):t.noBuffer?(l++,t()):t(r.subarray(l,++l));throw new Error("Unknown extension "+e)}case 213:return e=r[l],114==e?(l++,W(63&r[l++],r[l++])):N(2);case 214:return N(4);case 215:return N(8);case 216:return N(16);case 217:return e=r[l++],h>=l?s.slice(l-f,(l+=e)-f):O(e);case 218:return e=a.getUint16(l),h>=(l+=2)?s.slice(l-f,(l+=e)-f):_(e);case 219:return e=a.getUint32(l),h>=(l+=4)?s.slice(l-f,(l+=e)-f):x(e);case 220:return e=a.getUint16(l),l+=2,j(e);case 221:return e=a.getUint32(l),l+=4,j(e);case 222:return e=a.getUint16(l),l+=2,M(e);case 223:return e=a.getUint32(l),l+=4,M(e);default:if(t>=224)return t-256;if(void 0===t){let t=new Error("Unexpected end of MessagePack data");throw t.incomplete=!0,t}throw new Error("Unknown MessagePack token "+t)}}}const A=/^[a-zA-Z_$][a-zA-Z\d_$]*$/;function E(t,e){function r(){if(r.count++>b){let r=t.read=new Function("r","return function(){return "+(c.freezeData?"Object.freeze":"")+"({"+t.map((t=>"__proto__"===t?"__proto_:r()":A.test(t)?t+":r()":"["+JSON.stringify(t)+"]:r()")).join(",")+"})}")(U);return 0===t.highByte&&(t.read=B(e,t.read)),r()}let n={};for(let e=0,r=t.length;e<r;e++){let r=t[e];"__proto__"===r&&(r="__proto_"),n[r]=U()}return c.freezeData?Object.freeze(n):n}return r.count=0,0===t.highByte?B(e,r):r}const B=(t,e)=>function(){let n=r[l++];if(0===n)return e();let s=t<32?-(t+(n<<5)):t+(n<<5),o=i[s]||k()[s];if(!o)throw new Error("Record id is not defined for "+s);return o.read||(o.read=E(o,t)),o.read()};function k(){let t=K((()=>(r=null,c.getStructures())));return i=c._mergeStructures(t,i)}var v=T,O=T,_=T,x=T;function T(t){let n;if(t<16&&(n=V(t)))return n;if(t>64&&e)return e.decode(r.subarray(l,l+=t));const i=l+t,s=[];for(n="";l<i;){const t=r[l++];if(0==(128&t))s.push(t);else if(192==(224&t)){const e=63&r[l++];s.push((31&t)<<6|e)}else if(224==(240&t)){const e=63&r[l++],n=63&r[l++];s.push((31&t)<<12|e<<6|n)}else if(240==(248&t)){let e=(7&t)<<18|(63&r[l++])<<12|(63&r[l++])<<6|63&r[l++];e>65535&&(e-=65536,s.push(e>>>10&1023|55296),e=56320|1023&e),s.push(e)}else s.push(t);s.length>=4096&&(n+=D.apply(String,s),s.length=0)}return s.length>0&&(n+=D.apply(String,s)),n}function j(t){let e=new Array(t);for(let r=0;r<t;r++)e[r]=U();return c.freezeData?Object.freeze(e):e}function M(t){if(c.mapsAsObjects){let e={};for(let r=0;r<t;r++){let t=z();"__proto__"===t&&(t="__proto_"),e[t]=U()}return e}{let e=new Map;for(let r=0;r<t;r++)e.set(U(),U());return e}}var D=String.fromCharCode;function R(t){let e=l,n=new Array(t);for(let i=0;i<t;i++){const t=r[l++];if((128&t)>0)return void(l=e);n[i]=t}return D.apply(String,n)}function V(t){if(t<4){if(t<2){if(0===t)return"";{let t=r[l++];return(128&t)>1?void(l-=1):D(t)}}{let e=r[l++],n=r[l++];if((128&e)>0||(128&n)>0)return void(l-=2);if(t<3)return D(e,n);let i=r[l++];return(128&i)>0?void(l-=3):D(e,n,i)}}{let e=r[l++],n=r[l++],i=r[l++],s=r[l++];if((128&e)>0||(128&n)>0||(128&i)>0||(128&s)>0)return void(l-=4);if(t<6){if(4===t)return D(e,n,i,s);{let t=r[l++];return(128&t)>0?void(l-=5):D(e,n,i,s,t)}}if(t<8){let o=r[l++],u=r[l++];if((128&o)>0||(128&u)>0)return void(l-=6);if(t<7)return D(e,n,i,s,o,u);let a=r[l++];return(128&a)>0?void(l-=7):D(e,n,i,s,o,u,a)}{let o=r[l++],u=r[l++],a=r[l++],c=r[l++];if((128&o)>0||(128&u)>0||(128&a)>0||(128&c)>0)return void(l-=8);if(t<10){if(8===t)return D(e,n,i,s,o,u,a,c);{let t=r[l++];return(128&t)>0?void(l-=9):D(e,n,i,s,o,u,a,c,t)}}if(t<12){let f=r[l++],h=r[l++];if((128&f)>0||(128&h)>0)return void(l-=10);if(t<11)return D(e,n,i,s,o,u,a,c,f,h);let g=r[l++];return(128&g)>0?void(l-=11):D(e,n,i,s,o,u,a,c,f,h,g)}{let f=r[l++],h=r[l++],g=r[l++],p=r[l++];if((128&f)>0||(128&h)>0||(128&g)>0||(128&p)>0)return void(l-=12);if(t<14){if(12===t)return D(e,n,i,s,o,u,a,c,f,h,g,p);{let t=r[l++];return(128&t)>0?void(l-=13):D(e,n,i,s,o,u,a,c,f,h,g,p,t)}}{let d=r[l++],y=r[l++];if((128&d)>0||(128&y)>0)return void(l-=14);if(t<15)return D(e,n,i,s,o,u,a,c,f,h,g,p,d,y);let w=r[l++];return(128&w)>0?void(l-=15):D(e,n,i,s,o,u,a,c,f,h,g,p,d,y,w)}}}}}function F(){let t,e=r[l++];if(e<192)t=e-160;else switch(e){case 217:t=r[l++];break;case 218:t=a.getUint16(l),l+=2;break;case 219:t=a.getUint32(l),l+=4;break;default:throw new Error("Expected string")}return T(t)}function L(t){return c.copyBuffers?Uint8Array.prototype.slice.call(r,l,l+=t):r.subarray(l,l+=t)}function N(t){let e=r[l++];if(g[e]){let n;return g[e](r.subarray(l,n=l+=t),(t=>{l=t;try{return U()}finally{l=n}}))}throw new Error("Unknown extension type "+e)}var P=new Array(4096);function z(){let t=r[l++];if(!(t>=160&&t<192))return l--,C(U());if(t-=160,h>=l)return s.slice(l-f,(l+=t)-f);if(!(0==h&&n<180))return v(t);let e,i=4095&(t<<5^(t>1?a.getUint16(l):t>0?r[l]:0)),o=P[i],u=l,c=l+t-3,g=0;if(o&&o.bytes==t){for(;u<c;){if(e=a.getUint32(u),e!=o[g++]){u=1879048192;break}u+=4}for(c+=3;u<c;)if(e=r[u++],e!=o[g++]){u=1879048192;break}if(u===c)return l=u,o.string;c-=3,u=l}for(o=[],P[i]=o,o.bytes=t;u<c;)e=a.getUint32(u),o.push(e),u+=4;for(c+=3;u<c;)e=r[u++],o.push(e);let p=t<16?V(t):R(t);return o.string=null!=p?p:v(t)}function C(t){if("string"==typeof t)return t;if("number"==typeof t||"boolean"==typeof t||"bigint"==typeof t)return t.toString();if(null==t)return t+"";throw new Error("Invalid property type for record",typeof t)}const W=(t,e)=>{let r=U().map(C),n=t;void 0!==e&&(t=t<32?-((e<<5)+t):(e<<5)+t,r.highByte=e);let s=i[t];return s&&(s.isShared||w)&&((i.restoreStructures||(i.restoreStructures=[]))[t]=s),i[t]=r,r.read=E(r,n),r.read()};g[0]=()=>{},g[0].noBuffer=!0,g[66]=t=>{let e=t.length,r=BigInt(128&t[0]?t[0]-256:t[0]);for(let n=1;n<e;n++)r<<=BigInt(8),r+=BigInt(t[n]);return r};let J={Error:Error,TypeError:TypeError,ReferenceError:ReferenceError};g[101]=()=>{let t=U();return(J[t[0]]||Error)(t[1],{cause:t[2]})},g[105]=t=>{if(!1===c.structuredClone)throw new Error("Structured clone extension is disabled");let e=a.getUint32(l-4);u||(u=new Map);let n,i=r[l];n=i>=144&&i<160||220==i||221==i?[]:{};let s={target:n};u.set(e,s);let o=U();return s.used?Object.assign(n,o):(s.target=o,o)},g[112]=t=>{if(!1===c.structuredClone)throw new Error("Structured clone extension is disabled");let e=a.getUint32(l-4),r=u.get(e);return r.used=!0,r.target},g[115]=()=>new Set(U());const $=["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64","BigInt64","BigUint64"].map((t=>t+"Array"));let Y="object"==typeof globalThis?globalThis:window;g[116]=t=>{let e=t[0],r=$[e];if(!r){if(16===e){let e=new ArrayBuffer(t.length-1);return new Uint8Array(e).set(t.subarray(1)),e}throw new Error("Could not find typed array for code "+e)}return new Y[r](Uint8Array.prototype.slice.call(t,1).buffer)},g[120]=()=>{let t=U();return new RegExp(t[0],t[1])};const q=[];function K(t){let e=n,g=l,p=f,d=h,y=s,b=u,m=o,S=new Uint8Array(r.slice(0,n)),I=i,U=i.slice(0,i.length),A=c,E=w,B=t();return n=e,l=g,f=p,h=d,s=y,u=b,o=m,r=S,w=E,(i=I).splice(0,i.length,...U),c=A,a=new DataView(r.buffer,r.byteOffset,r.byteLength),B}function Z(){r=null,u=null,i=null}g[98]=t=>{let e=(t[0]<<24)+(t[1]<<16)+(t[2]<<8)+t[3],r=l;return l+=e-t.length,o=q,(o=[F(),F()]).position0=0,o.position1=0,o.postBundlePosition=l,l=r,U()},g[255]=t=>4==t.length?new Date(1e3*(16777216*t[0]+(t[1]<<16)+(t[2]<<8)+t[3])):8==t.length?new Date(((t[0]<<22)+(t[1]<<14)+(t[2]<<6)+(t[3]>>2))/1e6+1e3*(4294967296*(3&t[3])+16777216*t[4]+(t[5]<<16)+(t[6]<<8)+t[7])):12==t.length?new Date(((t[0]<<24)+(t[1]<<16)+(t[2]<<8)+t[3])/1e6+1e3*((128&t[4]?-281474976710656:0)+1099511627776*t[6]+4294967296*t[7]+16777216*t[8]+(t[9]<<16)+(t[10]<<8)+t[11])):new Date("invalid");const G=new Array(147);for(let t=0;t<256;t++)G[t]=+("1e"+Math.floor(45.15-.30103*t));const H=m;var Q=new m({useRecords:!1});const X=Q.unpack,tt=Q.unpackMultiple,et=Q.unpack,rt={NEVER:0,ALWAYS:1,DECIMAL_ROUND:3,DECIMAL_FIT:4};let nt,it,st,ot=new Float32Array(1),ut=new Uint8Array(ot.buffer,0,4);try{nt=new TextEncoder}catch(t){}const at="undefined"!=typeof Buffer,lt=at?function(t){return Buffer.allocUnsafeSlow(t)}:Uint8Array,ct=at?Buffer:Uint8Array,ft=at?4294967296:2144337920;let ht,gt,pt,dt,yt=0,wt=null;const bt=/[\u0080-\uFFFF]/,mt=Symbol("record-id");class St extends m{constructor(t){let e,r,n,i;super(t),this.offset=0;let s=ct.prototype.utf8Write?function(t,e){return ht.utf8Write(t,e,ht.byteLength-e)}:!(!nt||!nt.encodeInto)&&function(t,e){return nt.encodeInto(t,ht.subarray(e)).written},o=this;t||(t={});let u=t&&t.sequential,a=t.structures||t.saveStructures,l=t.maxSharedStructures;if(null==l&&(l=a?32:0),l>8160)throw new Error("Maximum maxSharedStructure is 8160");t.structuredClone&&null==t.moreTypes&&(this.moreTypes=!0);let c=t.maxOwnStructures;null==c&&(c=a?32:64),this.structures||0==t.useRecords||(this.structures=[]);let f=l>32||c+l>64,h=l+64,g=l+c+64;if(g>8256)throw new Error("Maximum maxSharedStructure + maxOwnStructure is 8192");let p=[],d=0,y=0;this.pack=this.encode=function(t,s){if(ht||(ht=new lt(8192),pt=ht.dataView||(ht.dataView=new DataView(ht.buffer,0,8192)),yt=0),dt=ht.length-10,dt-yt<2048?(ht=new lt(ht.length),pt=ht.dataView||(ht.dataView=new DataView(ht.buffer,0,ht.length)),dt=ht.length-10,yt=0):yt=yt+7&2147483640,e=yt,s&Rt&&(yt+=255&s),i=o.structuredClone?new Map:null,o.bundleStrings&&"string"!=typeof t?(wt=[],wt.size=1/0):wt=null,n=o.structures,n){n.uninitialized&&(n=o._mergeStructures(o.getStructures()));let t=n.sharedLength||0;if(t>l)throw new Error("Shared structures is larger than maximum shared structures, try increasing maxSharedStructures to "+n.sharedLength);if(!n.transitions){n.transitions=Object.create(null);for(let e=0;e<t;e++){let t=n[e];if(!t)continue;let r,i=n.transitions;for(let e=0,n=t.length;e<n;e++){let n=t[e];r=i[n],r||(r=i[n]=Object.create(null)),i=r}i[mt]=e+64}this.lastNamedStructuresLength=t}u||(n.nextId=t+64)}let a;r&&(r=!1);try{o.randomAccessStructure&&t&&t.constructor&&t.constructor===Object?v(t):m(t);let u=wt;if(wt&&Et(e,m,0),i&&i.idsToInsert){let t=i.idsToInsert.sort(((t,e)=>t.offset>e.offset?1:-1)),r=t.length,n=-1;for(;u&&r>0;){let i=t[--r].offset+e;i<u.stringsPosition+e&&-1===n&&(n=0),i>u.position+e?n>=0&&(n+=6):(n>=0&&(pt.setUint32(u.position+e,pt.getUint32(u.position+e)+n),n=-1),u=u.previous,r++)}n>=0&&u&&pt.setUint32(u.position+e,pt.getUint32(u.position+e)+n),yt+=6*t.length,yt>dt&&E(yt),o.offset=yt;let s=function(t,e){let r,n=6*e.length,i=t.length-n;for(;r=e.pop();){let e=r.offset,s=r.id;t.copyWithin(e+n,e,i),n-=6;let o=e+n;t[o++]=214,t[o++]=105,t[o++]=s>>24,t[o++]=s>>16&255,t[o++]=s>>8&255,t[o++]=255&s,i=e}return t}(ht.subarray(e,yt),t);return i=null,s}return o.offset=yt,s&Mt?(ht.start=e,ht.end=yt,ht):ht.subarray(e,yt)}catch(t){throw a=t,t}finally{if(n&&(w(),r&&o.saveStructures)){let r=n.sharedLength||0,i=ht.subarray(e,yt),u=function(t,e){return t.isCompatible=t=>{let r=!t||(e.lastNamedStructuresLength||0)===t.length;return r||e._mergeStructures(t),r},t}(n,o);if(!a)return!1===o.saveStructures(u,u.isCompatible)?o.pack(t,s):(o.lastNamedStructuresLength=r,ht.length>1073741824&&(ht=null),i)}ht.length>1073741824&&(ht=null),s&Dt&&(yt=e)}};const w=()=>{y<10&&y++;let t=n.sharedLength||0;if(n.length>t&&!u&&(n.length=t),d>1e4)n.transitions=null,y=0,d=0,p.length>0&&(p=[]);else if(p.length>0&&!u){for(let t=0,e=p.length;t<e;t++)p[t][mt]=0;p=[]}},b=t=>{var e=t.length;e<16?ht[yt++]=144|e:e<65536?(ht[yt++]=220,ht[yt++]=e>>8,ht[yt++]=255&e):(ht[yt++]=221,pt.setUint32(yt,e),yt+=4);for(let r=0;r<e;r++)m(t[r])},m=t=>{yt>dt&&(ht=E(yt));var r,n=typeof t;if("string"===n){let n,i=t.length;if(wt&&i>=4&&i<4096){if((wt.size+=i)>21760){let t,r,n=(wt[0]?3*wt[0].length+wt[1].length:0)+10;yt+n>dt&&(ht=E(yt+n)),wt.position?(r=wt,ht[yt]=200,yt+=3,ht[yt++]=98,t=yt-e,yt+=4,Et(e,m,0),pt.setUint16(t+e-3,yt-e-t)):(ht[yt++]=214,ht[yt++]=98,t=yt-e,yt+=4),wt=["",""],wt.previous=r,wt.size=0,wt.position=t}let r=bt.test(t);return wt[r?0:1]+=t,ht[yt++]=193,void m(r?-i:i)}n=i<32?1:i<256?2:i<65536?3:5;let o=3*i;if(yt+o>dt&&(ht=E(yt+o)),i<64||!s){let e,s,o,u=yt+n;for(e=0;e<i;e++)s=t.charCodeAt(e),s<128?ht[u++]=s:s<2048?(ht[u++]=s>>6|192,ht[u++]=63&s|128):55296==(64512&s)&&56320==(64512&(o=t.charCodeAt(e+1)))?(s=65536+((1023&s)<<10)+(1023&o),e++,ht[u++]=s>>18|240,ht[u++]=s>>12&63|128,ht[u++]=s>>6&63|128,ht[u++]=63&s|128):(ht[u++]=s>>12|224,ht[u++]=s>>6&63|128,ht[u++]=63&s|128);r=u-yt-n}else r=s(t,yt+n);r<32?ht[yt++]=160|r:r<256?(n<2&&ht.copyWithin(yt+2,yt+1,yt+1+r),ht[yt++]=217,ht[yt++]=r):r<65536?(n<3&&ht.copyWithin(yt+3,yt+2,yt+2+r),ht[yt++]=218,ht[yt++]=r>>8,ht[yt++]=255&r):(n<5&&ht.copyWithin(yt+5,yt+3,yt+3+r),ht[yt++]=219,pt.setUint32(yt,r),yt+=4),yt+=r}else if("number"===n)if(t>>>0===t)t<32||t<128&&!1===this.useRecords||t<64&&!this.randomAccessStructure?ht[yt++]=t:t<256?(ht[yt++]=204,ht[yt++]=t):t<65536?(ht[yt++]=205,ht[yt++]=t>>8,ht[yt++]=255&t):(ht[yt++]=206,pt.setUint32(yt,t),yt+=4);else if(t>>0===t)t>=-32?ht[yt++]=256+t:t>=-128?(ht[yt++]=208,ht[yt++]=t+256):t>=-32768?(ht[yt++]=209,pt.setInt16(yt,t),yt+=2):(ht[yt++]=210,pt.setInt32(yt,t),yt+=4);else{let e;if((e=this.useFloat32)>0&&t<4294967296&&t>=-2147483648){let r;if(ht[yt++]=202,pt.setFloat32(yt,t),e<4||(r=t*G[(127&ht[yt])<<1|ht[yt+1]>>7])>>0===r)return void(yt+=4);yt--}ht[yt++]=203,pt.setFloat64(yt,t),yt+=8}else if("object"===n||"function"===n)if(t){if(i){let r=i.get(t);if(r){if(!r.id){let t=i.idsToInsert||(i.idsToInsert=[]);r.id=t.push(r)}return ht[yt++]=214,ht[yt++]=112,pt.setUint32(yt,r.id),void(yt+=4)}i.set(t,{offset:yt-e})}let s=t.constructor;if(s===Object)A(t);else if(s===Array)b(t);else if(s===Map)if(this.mapAsEmptyObject)ht[yt++]=128;else{(r=t.size)<16?ht[yt++]=128|r:r<65536?(ht[yt++]=222,ht[yt++]=r>>8,ht[yt++]=255&r):(ht[yt++]=223,pt.setUint32(yt,r),yt+=4);for(let[e,r]of t)m(e),m(r)}else{for(let e=0,r=it.length;e<r;e++){if(t instanceof st[e]){let r=it[e];if(r.write){r.type&&(ht[yt++]=212,ht[yt++]=r.type,ht[yt++]=0);let e=r.write.call(this,t);return void(e===t?Array.isArray(t)?b(t):A(t):m(e))}let n,i=ht,s=pt,o=yt;ht=null;try{n=r.pack.call(this,t,(t=>(ht=i,i=null,yt+=t,yt>dt&&E(yt),{target:ht,targetView:pt,position:yt-t})),m)}finally{i&&(ht=i,pt=s,yt=o,dt=ht.length-10)}return void(n&&(n.length+yt>dt&&E(n.length+yt),yt=At(n,ht,yt,r.type)))}}if(Array.isArray(t))b(t);else{if(t.toJSON){const e=t.toJSON();if(e!==t)return m(e)}if("function"===n)return m(this.writeFunction&&this.writeFunction(t));A(t)}}}else ht[yt++]=192;else if("boolean"===n)ht[yt++]=t?195:194;else if("bigint"===n){if(t<BigInt(1)<<BigInt(63)&&t>=-(BigInt(1)<<BigInt(63)))ht[yt++]=211,pt.setBigInt64(yt,t);else if(t<BigInt(1)<<BigInt(64)&&t>0)ht[yt++]=207,pt.setBigUint64(yt,t);else{if(!this.largeBigIntToFloat){if(this.largeBigIntToString)return m(t.toString());if(this.useBigIntExtension&&t<BigInt(2)**BigInt(1023)&&t>-(BigInt(2)**BigInt(1023))){ht[yt++]=199,yt++,ht[yt++]=66;let e,r=[];do{let n=t&BigInt(255);e=(n&BigInt(128))===(t<BigInt(0)?BigInt(128):BigInt(0)),r.push(n),t>>=BigInt(8)}while(t!==BigInt(0)&&t!==BigInt(-1)||!e);ht[yt-2]=r.length;for(let t=r.length;t>0;)ht[yt++]=Number(r[--t]);return}throw new RangeError(t+" was too large to fit in MessagePack 64-bit integer format, use useBigIntExtension, or set largeBigIntToFloat to convert to float-64, or set largeBigIntToString to convert to string")}ht[yt++]=203,pt.setFloat64(yt,Number(t))}yt+=8}else{if("undefined"!==n)throw new Error("Unknown type: "+n);this.encodeUndefinedAsNil?ht[yt++]=192:(ht[yt++]=212,ht[yt++]=0,ht[yt++]=0)}},S=this.variableMapSize||this.coercibleKeyAsNumber||this.skipValues?t=>{let e;if(this.skipValues){e=[];for(let r in t)"function"==typeof t.hasOwnProperty&&!t.hasOwnProperty(r)||this.skipValues.includes(t[r])||e.push(r)}else e=Object.keys(t);let r,n=e.length;if(n<16?ht[yt++]=128|n:n<65536?(ht[yt++]=222,ht[yt++]=n>>8,ht[yt++]=255&n):(ht[yt++]=223,pt.setUint32(yt,n),yt+=4),this.coercibleKeyAsNumber)for(let i=0;i<n;i++){r=e[i];let n=Number(r);m(isNaN(n)?r:n),m(t[r])}else for(let i=0;i<n;i++)m(r=e[i]),m(t[r])}:t=>{ht[yt++]=222;let r=yt-e;yt+=2;let n=0;for(let e in t)("function"!=typeof t.hasOwnProperty||t.hasOwnProperty(e))&&(m(e),m(t[e]),n++);if(n>65535)throw new Error('Object is too large to serialize with fast 16-bit map size, use the "variableMapSize" option to serialize this object');ht[r+++e]=n>>8,ht[r+e]=255&n},I=!1===this.useRecords?S:t.progressiveRecords&&!f?t=>{let r,i,s=n.transitions||(n.transitions=Object.create(null)),o=yt++-e;for(let u in t)if("function"!=typeof t.hasOwnProperty||t.hasOwnProperty(u)){if(r=s[u],r)s=r;else{let a=Object.keys(t),l=s;s=n.transitions;let c=0;for(let t=0,e=a.length;t<e;t++){let e=a[t];r=s[e],r||(r=s[e]=Object.create(null),c++),s=r}o+e+1==yt?(yt--,B(s,a,c)):k(s,a,o,c),i=!0,s=l[u]}m(t[u])}if(!i){let r=s[mt];r?ht[o+e]=r:k(s,Object.keys(t),o,0)}}:t=>{let e,r=n.transitions||(n.transitions=Object.create(null)),i=0;for(let n in t)("function"!=typeof t.hasOwnProperty||t.hasOwnProperty(n))&&(e=r[n],e||(e=r[n]=Object.create(null),i++),r=e);let s=r[mt];s?s>=96&&f?(ht[yt++]=96+(31&(s-=96)),ht[yt++]=s>>5):ht[yt++]=s:B(r,r.__keys__||Object.keys(t),i);for(let e in t)("function"!=typeof t.hasOwnProperty||t.hasOwnProperty(e))&&m(t[e])},U="function"==typeof this.useRecords&&this.useRecords,A=U?t=>{U(t)?I(t):S(t)}:I,E=t=>{let r;if(t>16777216){if(t-e>ft)throw new Error("Packed buffer would be larger than maximum buffer size");r=Math.min(ft,4096*Math.round(Math.max((t-e)*(t>67108864?1.25:2),4194304)/4096))}else r=1+(Math.max(t-e<<2,ht.length-1)>>12)<<12;let n=new lt(r);return pt=n.dataView||(n.dataView=new DataView(n.buffer,0,r)),t=Math.min(t,ht.length),ht.copy?ht.copy(n,0,e,t):n.set(ht.slice(e,t)),yt-=e,e=0,dt=n.length-10,ht=n},B=(t,e,i)=>{let s=n.nextId;s||(s=64),s<h&&this.shouldShareStructure&&!this.shouldShareStructure(e)?(s=n.nextOwnId,s<g||(s=h),n.nextOwnId=s+1):(s>=g&&(s=h),n.nextId=s+1);let o=e.highByte=s>=96&&f?s-96>>5:-1;t[mt]=s,t.__keys__=e,n[s-64]=e,s<h?(e.isShared=!0,n.sharedLength=s-63,r=!0,o>=0?(ht[yt++]=96+(31&s),ht[yt++]=o):ht[yt++]=s):(o>=0?(ht[yt++]=213,ht[yt++]=114,ht[yt++]=96+(31&s),ht[yt++]=o):(ht[yt++]=212,ht[yt++]=114,ht[yt++]=s),i&&(d+=y*i),p.length>=c&&(p.shift()[mt]=0),p.push(t),m(e))},k=(t,r,n,i)=>{let s=ht,o=yt,u=dt,a=e;ht=gt,yt=0,e=0,ht||(gt=ht=new lt(8192)),dt=ht.length-10,B(t,r,i),gt=ht;let l=yt;if(ht=s,yt=o,dt=u,e=a,l>1){let t=yt+l-1;t>dt&&E(t);let r=n+e;ht.copyWithin(r+l,r+1,yt),ht.set(gt.slice(0,l),r),yt=t}else ht[n+e]=gt[0]},v=t=>{let i=undefined(t,ht,e,yt,n,E,((t,e,n)=>{if(n)return r=!0;yt=e;let i=ht;return m(t),w(),i!==ht?{position:yt,targetView:pt,target:ht}:yt}),this);if(0===i)return A(t);yt=i}}useBuffer(t){ht=t,ht.dataView||(ht.dataView=new DataView(ht.buffer,ht.byteOffset,ht.byteLength)),yt=0}set position(t){yt=t}get position(){return yt}clearSharedData(){this.structures&&(this.structures=[]),this.typedStructs&&(this.typedStructs=[])}}function It(t,e,r,n){let i=t.byteLength;if(i+1<256){var{target:s,position:o}=r(4+i);s[o++]=199,s[o++]=i+1}else if(i+1<65536){var{target:s,position:o}=r(5+i);s[o++]=200,s[o++]=i+1>>8,s[o++]=i+1&255}else{var{target:s,position:o,targetView:u}=r(7+i);s[o++]=201,u.setUint32(o,i+1),o+=4}s[o++]=116,s[o++]=e,t.buffer||(t=new Uint8Array(t)),s.set(new Uint8Array(t.buffer,t.byteOffset,t.byteLength),o)}function Ut(t,e){let r=t.byteLength;var n,i;if(r<256){var{target:n,position:i}=e(r+2);n[i++]=196,n[i++]=r}else if(r<65536){var{target:n,position:i}=e(r+3);n[i++]=197,n[i++]=r>>8,n[i++]=255&r}else{var{target:n,position:i,targetView:s}=e(r+5);n[i++]=198,s.setUint32(i,r),i+=4}n.set(t,i)}function At(t,e,r,n){let i=t.length;switch(i){case 1:e[r++]=212;break;case 2:e[r++]=213;break;case 4:e[r++]=214;break;case 8:e[r++]=215;break;case 16:e[r++]=216;break;default:i<256?(e[r++]=199,e[r++]=i):i<65536?(e[r++]=200,e[r++]=i>>8,e[r++]=255&i):(e[r++]=201,e[r++]=i>>24,e[r++]=i>>16&255,e[r++]=i>>8&255,e[r++]=255&i)}return e[r++]=n,e.set(t,r),r+=i}function Et(t,e,r){if(wt.length>0){pt.setUint32(wt.position+t,yt+r-wt.position-t),wt.stringsPosition=yt-t;let n=wt;wt=null,e(n[0]),e(n[1])}}st=[Date,Set,Error,RegExp,ArrayBuffer,Object.getPrototypeOf(Uint8Array.prototype).constructor,d],it=[{pack(t,e,r){let n=t.getTime()/1e3;if((this.useTimestamp32||0===t.getMilliseconds())&&n>=0&&n<4294967296){let{target:t,targetView:r,position:i}=e(6);t[i++]=214,t[i++]=255,r.setUint32(i,n)}else if(n>0&&n<4294967296){let{target:r,targetView:i,position:s}=e(10);r[s++]=215,r[s++]=255,i.setUint32(s,4e6*t.getMilliseconds()+(n/1e3/4294967296>>0)),i.setUint32(s+4,n)}else if(isNaN(n)){if(this.onInvalidDate)return e(0),r(this.onInvalidDate());let{target:t,targetView:n,position:i}=e(3);t[i++]=212,t[i++]=255,t[i++]=255}else{let{target:r,targetView:i,position:s}=e(15);r[s++]=199,r[s++]=12,r[s++]=255,i.setUint32(s,1e6*t.getMilliseconds()),i.setBigInt64(s+4,BigInt(Math.floor(n)))}}},{pack(t,e,r){if(this.setAsEmptyObject)return e(0),r({});let n=Array.from(t),{target:i,position:s}=e(this.moreTypes?3:0);this.moreTypes&&(i[s++]=212,i[s++]=115,i[s++]=0),r(n)}},{pack(t,e,r){let{target:n,position:i}=e(this.moreTypes?3:0);this.moreTypes&&(n[i++]=212,n[i++]=101,n[i++]=0),r([t.name,t.message,t.cause])}},{pack(t,e,r){let{target:n,position:i}=e(this.moreTypes?3:0);this.moreTypes&&(n[i++]=212,n[i++]=120,n[i++]=0),r([t.source,t.flags])}},{pack(t,e){this.moreTypes?It(t,16,e):Ut(at?Buffer.from(t):new Uint8Array(t),e)}},{pack(t,e){let r=t.constructor;r!==ct&&this.moreTypes?It(t,$.indexOf(r.name),e):Ut(t,e)}},{pack(t,e){let{target:r,position:n}=e(1);r[n]=193}}];let Bt=new St({useRecords:!1});const kt=Bt.pack,vt=Bt.pack,Ot=St,{NEVER:_t,ALWAYS:xt,DECIMAL_ROUND:Tt,DECIMAL_FIT:jt}=rt,Mt=512,Dt=1024,Rt=2048;const Vt=function(t,e={}){if(!t||"object"!=typeof t)throw new Error("first argument must be an Iterable, Async Iterable, Iterator, Async Iterator, or a promise");const r=new m(e);let n;const i=t=>{let e;n&&(t=Buffer.concat([n,t]),n=void 0);try{e=r.unpackMultiple(t)}catch(r){if(!r.incomplete)throw r;n=t.slice(r.lastPosition),e=r.values}return e};return"function"==typeof t[Symbol.iterator]?function*(){for(const e of t)yield*i(e)}():"function"==typeof t[Symbol.asyncIterator]?async function*(){for await(const e of t)yield*i(e)}():void 0},Ft=function(t,e={}){if(t&&"object"==typeof t){if("function"==typeof t[Symbol.iterator])return function*(t,e){const r=new St(e);for(const e of t)yield r.pack(e)}(t,e);if("function"==typeof t.then||"function"==typeof t[Symbol.asyncIterator])return async function*(t,e){const r=new St(e);for await(const e of t)yield r.pack(e)}(t,e);throw new Error("first argument must be an Iterable, Async Iterable, Iterator, Async Iterator, or a Promise")}throw new Error("first argument must be an Iterable, Async Iterable, or a Promise for an Async Iterable")};t.ALWAYS=xt,t.C1=y,t.DECIMAL_FIT=jt,t.DECIMAL_ROUND=Tt,t.Decoder=H,t.Encoder=Ot,t.FLOAT32_OPTIONS=rt,t.NEVER=_t,t.Packr=St,t.RESERVE_START_SPACE=Rt,t.RESET_BUFFER_MODE=Dt,t.REUSE_BUFFER_MODE=Mt,t.Unpackr=m,t.addExtension=function(t){if(t.Class){if(!t.pack&&!t.write)throw new Error("Extension has no pack or write function");if(t.pack&&!t.type)throw new Error("Extension has no type (numeric code to identify the extension)");st.unshift(t.Class),it.unshift(t)}!function(t){t.unpack?g[t.type]=t.unpack:g[t.type]=t}(t)},t.clearSource=Z,t.decode=et,t.decodeIter=Vt,t.encode=vt,t.encodeIter=Ft,t.isNativeAccelerationEnabled=!1,t.mapsAsObjects=!0,t.pack=kt,t.roundFloat32=function(t){ot[0]=t;let e=G[(127&ut[3])<<1|ut[2]>>7];return(e*t+(t>0?.5:-.5)>>0)/e},t.unpack=X,t.unpackMultiple=tt,t.useRecords=!1}));
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).msgpackr={})}(this,(function(e){"use strict";var t,r,n;try{t=new TextDecoder}catch(e){}var i,s,o,a,u,l=0,f={},c=0,g=0,h=[],p={useRecords:!1,mapsAsObjects:!0};class d{}const y=new d;y.name="MessagePack 0xC1";var w=!1,b=2;try{new Function("")}catch(e){b=1/0}class m{constructor(e){e&&(!1===e.useRecords&&void 0===e.mapsAsObjects&&(e.mapsAsObjects=!0),e.sequential&&!1!==e.trusted&&(e.trusted=!0,e.structures||0==e.useRecords||(e.structures=[],e.maxSharedStructures||(e.maxSharedStructures=0))),e.structures?e.structures.sharedLength=e.structures.length:e.getStructures&&((e.structures=[]).uninitialized=!0,e.structures.sharedLength=0),e.int64AsNumber&&(e.int64AsType="number")),Object.assign(this,e)}unpack(e,t){if(r)return q((()=>(Z(),this?this.unpack(e,t):m.prototype.unpack.call(p,e,t))));e.buffer||e.constructor!==ArrayBuffer||(e="undefined"!=typeof Buffer?Buffer.from(e):new Uint8Array(e)),"object"==typeof t?(n=t.end||e.length,l=t.start||0):(l=0,n=t>-1?t:e.length),g=0,s=null,o=null,r=e;try{u=e.dataView||(e.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength))}catch(t){if(r=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 m){if(f=this,this.structures)return i=this.structures,S(t);(!i||i.length>0)&&(i=[])}else f=p,(!i||i.length>0)&&(i=[]);return S(t)}unpackMultiple(e,t){let r,n=0;try{w=!0;let i=e.length,s=this?this.unpack(e,i):Q.unpack(e,i);if(!t){for(r=[s];l<i;)n=l,r.push(S());return r}if(!1===t(s,n,l))return;for(;l<i;)if(n=l,!1===t(S(),n,l))return}catch(e){throw e.lastPosition=n,e.values=r,e}finally{w=!1,Z()}}_mergeStructures(e,t){e=e||[],Object.isFrozen(e)&&(e=e.map((e=>e.slice(0))));for(let t=0,r=e.length;t<r;t++){let r=e[t];r&&(r.isShared=!0,t>=32&&(r.highByte=t-32>>5))}e.sharedLength=e.length;for(let r in t||[])if(r>=0){let n=e[r],i=t[r];i&&(n&&((e.restoreStructures||(e.restoreStructures=[]))[r]=n),e[r]=i)}return this.structures=e}decode(e,t){return this.unpack(e,t)}}function S(e){try{if(!f.trusted&&!w){let e=i.sharedLength||0;e<i.length&&(i.length=e)}let e;if(f.randomAccessStructure&&r[l]<64&&r[l],e=U(),o&&(l=o.postBundlePosition,o=null),w&&(i.restoreStructures=null),l==n)i&&i.restoreStructures&&A(),i=null,r=null,a&&(a=null);else{if(l>n)throw new Error("Unexpected end of MessagePack data");if(!w){let t;try{t=JSON.stringify(e,((e,t)=>"bigint"==typeof t?`${t}n`:t)).slice(0,100)}catch(e){t="(JSON view not available "+e+")"}throw new Error("Data read, but end of buffer not reached "+t)}}return e}catch(e){throw i&&i.restoreStructures&&A(),Z(),(e instanceof RangeError||e.message.startsWith("Unexpected end of buffer")||l>n)&&(e.incomplete=!0),e}}function A(){for(let e in i.restoreStructures)i[e]=i.restoreStructures[e];i.restoreStructures=null}function U(){let e=r[l++];if(e<160){if(e<128){if(e<64)return e;{let t=i[63&e]||f.getStructures&&v()[63&e];return t?(t.read||(t.read=I(t,63&e)),t.read()):e}}if(e<144){if(e-=128,f.mapsAsObjects){let t={};for(let r=0;r<e;r++){let e=z();"__proto__"===e&&(e="__proto_"),t[e]=U()}return t}{let t=new Map;for(let r=0;r<e;r++)t.set(U(),U());return t}}{e-=144;let t=new Array(e);for(let r=0;r<e;r++)t[r]=U();return f.freezeData?Object.freeze(t):t}}if(e<192){let t=e-160;if(g>=l)return s.slice(l-c,(l+=t)-c);if(0==g&&n<140){let e=t<16?L(t):D(t);if(null!=e)return e}return B(t)}{let t;switch(e){case 192:return null;case 193:return o?(t=U(),t>0?o[1].slice(o.position1,o.position1+=t):o[0].slice(o.position0,o.position0-=t)):y;case 194:return!1;case 195:return!0;case 196:if(t=r[l++],void 0===t)throw new Error("Unexpected end of buffer");return F(t);case 197:return t=u.getUint16(l),l+=2,F(t);case 198:return t=u.getUint32(l),l+=4,F(t);case 199:return N(r[l++]);case 200:return t=u.getUint16(l),l+=2,N(t);case 201:return t=u.getUint32(l),l+=4,N(t);case 202:if(t=u.getFloat32(l),f.useFloat32>2){let e=G[(127&r[l])<<1|r[l+1]>>7];return l+=4,(e*t+(t>0?.5:-.5)>>0)/e}return l+=4,t;case 203:return t=u.getFloat64(l),l+=8,t;case 204:return r[l++];case 205:return t=u.getUint16(l),l+=2,t;case 206:return t=u.getUint32(l),l+=4,t;case 207:return"number"===f.int64AsType?(t=4294967296*u.getUint32(l),t+=u.getUint32(l+4)):"string"===f.int64AsType?t=u.getBigUint64(l).toString():"auto"===f.int64AsType?(t=u.getBigUint64(l),t<=BigInt(2)<<BigInt(52)&&(t=Number(t))):t=u.getBigUint64(l),l+=8,t;case 208:return u.getInt8(l++);case 209:return t=u.getInt16(l),l+=2,t;case 210:return t=u.getInt32(l),l+=4,t;case 211:return"number"===f.int64AsType?(t=4294967296*u.getInt32(l),t+=u.getUint32(l+4)):"string"===f.int64AsType?t=u.getBigInt64(l).toString():"auto"===f.int64AsType?(t=u.getBigInt64(l),t>=BigInt(-2)<<BigInt(52)&&t<=BigInt(2)<<BigInt(52)&&(t=Number(t))):t=u.getBigInt64(l),l+=8,t;case 212:if(t=r[l++],114==t)return W(63&r[l++]);{let e=h[t];if(e)return e.read?(l++,e.read(U())):e.noBuffer?(l++,e()):e(r.subarray(l,++l));throw new Error("Unknown extension "+t)}case 213:return t=r[l],114==t?(l++,W(63&r[l++],r[l++])):N(2);case 214:return N(4);case 215:return N(8);case 216:return N(16);case 217:return t=r[l++],g>=l?s.slice(l-c,(l+=t)-c):O(t);case 218:return t=u.getUint16(l),g>=(l+=2)?s.slice(l-c,(l+=t)-c):_(t);case 219:return t=u.getUint32(l),g>=(l+=4)?s.slice(l-c,(l+=t)-c):x(t);case 220:return t=u.getUint16(l),l+=2,M(t);case 221:return t=u.getUint32(l),l+=4,M(t);case 222:return t=u.getUint16(l),l+=2,j(t);case 223:return t=u.getUint32(l),l+=4,j(t);default:if(e>=224)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)}}}const E=/^[a-zA-Z_$][a-zA-Z\d_$]*$/;function I(e,t){function r(){if(r.count++>b){let r=e.read=new Function("r","return function(){return "+(f.freezeData?"Object.freeze":"")+"({"+e.map((e=>"__proto__"===e?"__proto_:r()":E.test(e)?e+":r()":"["+JSON.stringify(e)+"]:r()")).join(",")+"})}")(U);return 0===e.highByte&&(e.read=k(t,e.read)),r()}let n={};for(let t=0,r=e.length;t<r;t++){let r=e[t];"__proto__"===r&&(r="__proto_"),n[r]=U()}return f.freezeData?Object.freeze(n):n}return r.count=0,0===e.highByte?k(t,r):r}const k=(e,t)=>function(){let n=r[l++];if(0===n)return t();let s=e<32?-(e+(n<<5)):e+(n<<5),o=i[s]||v()[s];if(!o)throw new Error("Record id is not defined for "+s);return o.read||(o.read=I(o,e)),o.read()};function v(){let e=q((()=>(r=null,f.getStructures())));return i=f._mergeStructures(e,i)}var B=T,O=T,_=T,x=T;function T(e){let n;if(e<16&&(n=L(e)))return n;if(e>64&&t)return t.decode(r.subarray(l,l+=e));const i=l+e,s=[];for(n="";l<i;){const e=r[l++];if(0==(128&e))s.push(e);else if(192==(224&e)){const t=63&r[l++];s.push((31&e)<<6|t)}else if(224==(240&e)){const t=63&r[l++],n=63&r[l++];s.push((31&e)<<12|t<<6|n)}else if(240==(248&e)){let t=(7&e)<<18|(63&r[l++])<<12|(63&r[l++])<<6|63&r[l++];t>65535&&(t-=65536,s.push(t>>>10&1023|55296),t=56320|1023&t),s.push(t)}else s.push(e);s.length>=4096&&(n+=R.apply(String,s),s.length=0)}return s.length>0&&(n+=R.apply(String,s)),n}function M(e){let t=new Array(e);for(let r=0;r<e;r++)t[r]=U();return f.freezeData?Object.freeze(t):t}function j(e){if(f.mapsAsObjects){let t={};for(let r=0;r<e;r++){let e=z();"__proto__"===e&&(e="__proto_"),t[e]=U()}return t}{let t=new Map;for(let r=0;r<e;r++)t.set(U(),U());return t}}var R=String.fromCharCode;function D(e){let t=l,n=new Array(e);for(let i=0;i<e;i++){const e=r[l++];if((128&e)>0)return void(l=t);n[i]=e}return R.apply(String,n)}function L(e){if(e<4){if(e<2){if(0===e)return"";{let e=r[l++];return(128&e)>1?void(l-=1):R(e)}}{let t=r[l++],n=r[l++];if((128&t)>0||(128&n)>0)return void(l-=2);if(e<3)return R(t,n);let i=r[l++];return(128&i)>0?void(l-=3):R(t,n,i)}}{let t=r[l++],n=r[l++],i=r[l++],s=r[l++];if((128&t)>0||(128&n)>0||(128&i)>0||(128&s)>0)return void(l-=4);if(e<6){if(4===e)return R(t,n,i,s);{let e=r[l++];return(128&e)>0?void(l-=5):R(t,n,i,s,e)}}if(e<8){let o=r[l++],a=r[l++];if((128&o)>0||(128&a)>0)return void(l-=6);if(e<7)return R(t,n,i,s,o,a);let u=r[l++];return(128&u)>0?void(l-=7):R(t,n,i,s,o,a,u)}{let o=r[l++],a=r[l++],u=r[l++],f=r[l++];if((128&o)>0||(128&a)>0||(128&u)>0||(128&f)>0)return void(l-=8);if(e<10){if(8===e)return R(t,n,i,s,o,a,u,f);{let e=r[l++];return(128&e)>0?void(l-=9):R(t,n,i,s,o,a,u,f,e)}}if(e<12){let c=r[l++],g=r[l++];if((128&c)>0||(128&g)>0)return void(l-=10);if(e<11)return R(t,n,i,s,o,a,u,f,c,g);let h=r[l++];return(128&h)>0?void(l-=11):R(t,n,i,s,o,a,u,f,c,g,h)}{let c=r[l++],g=r[l++],h=r[l++],p=r[l++];if((128&c)>0||(128&g)>0||(128&h)>0||(128&p)>0)return void(l-=12);if(e<14){if(12===e)return R(t,n,i,s,o,a,u,f,c,g,h,p);{let e=r[l++];return(128&e)>0?void(l-=13):R(t,n,i,s,o,a,u,f,c,g,h,p,e)}}{let d=r[l++],y=r[l++];if((128&d)>0||(128&y)>0)return void(l-=14);if(e<15)return R(t,n,i,s,o,a,u,f,c,g,h,p,d,y);let w=r[l++];return(128&w)>0?void(l-=15):R(t,n,i,s,o,a,u,f,c,g,h,p,d,y,w)}}}}}function V(){let e,t=r[l++];if(t<192)e=t-160;else switch(t){case 217:e=r[l++];break;case 218:e=u.getUint16(l),l+=2;break;case 219:e=u.getUint32(l),l+=4;break;default:throw new Error("Expected string")}return T(e)}function F(e){return f.copyBuffers?Uint8Array.prototype.slice.call(r,l,l+=e):r.subarray(l,l+=e)}function N(e){let t=r[l++];if(h[t]){let n;return h[t](r.subarray(l,n=l+=e),(e=>{l=e;try{return U()}finally{l=n}}))}throw new Error("Unknown extension type "+t)}var P=new Array(4096);function z(){let e=r[l++];if(!(e>=160&&e<192))return l--,C(U());if(e-=160,g>=l)return s.slice(l-c,(l+=e)-c);if(!(0==g&&n<180))return B(e);let t,i=4095&(e<<5^(e>1?u.getUint16(l):e>0?r[l]:0)),o=P[i],a=l,f=l+e-3,h=0;if(o&&o.bytes==e){for(;a<f;){if(t=u.getUint32(a),t!=o[h++]){a=1879048192;break}a+=4}for(f+=3;a<f;)if(t=r[a++],t!=o[h++]){a=1879048192;break}if(a===f)return l=a,o.string;f-=3,a=l}for(o=[],P[i]=o,o.bytes=e;a<f;)t=u.getUint32(a),o.push(t),a+=4;for(f+=3;a<f;)t=r[a++],o.push(t);let p=e<16?L(e):D(e);return o.string=null!=p?p:B(e)}function C(e){if("string"==typeof e)return e;if("number"==typeof e||"boolean"==typeof e||"bigint"==typeof e)return e.toString();if(null==e)return e+"";if(f.allowArraysInMapKeys&&Array.isArray(e)&&e.flat().every((e=>["string","number","boolean","bigint"].includes(typeof e))))return e.flat().toString();throw new Error("Invalid property type for record: "+typeof e)}const W=(e,t)=>{let r=U().map(C),n=e;void 0!==t&&(e=e<32?-((t<<5)+e):(t<<5)+e,r.highByte=t);let s=i[e];return s&&(s.isShared||w)&&((i.restoreStructures||(i.restoreStructures=[]))[e]=s),i[e]=r,r.read=I(r,n),r.read()};h[0]=()=>{},h[0].noBuffer=!0,h[66]=e=>{let t=e.byteLength%8||8,r=BigInt(128&e[0]?e[0]-256:e[0]);for(let n=1;n<t;n++)r<<=BigInt(8),r+=BigInt(e[n]);if(e.byteLength!==t){let n=new DataView(e.buffer,e.byteOffset,e.byteLength),i=(e,t)=>{let r=t-e;if(r<=40){let r=n.getBigUint64(e);for(let i=e+8;i<t;i+=8)r<<=BigInt(64n),r|=n.getBigUint64(i);return r}let s=e+(r>>4<<3),o=i(e,s),a=i(s,t);return o<<BigInt(8*(t-s))|a};r=r<<BigInt(8*(n.byteLength-t))|i(t,n.byteLength)}return r};let J={Error:Error,EvalError:EvalError,RangeError:RangeError,ReferenceError:ReferenceError,SyntaxError:SyntaxError,TypeError:TypeError,URIError:URIError,AggregateError:"function"==typeof AggregateError?AggregateError:null};h[101]=()=>{let e=U();if(!J[e[0]]){let t=Error(e[1],{cause:e[2]});return t.name=e[0],t}return J[e[0]](e[1],{cause:e[2]})},h[105]=e=>{if(!1===f.structuredClone)throw new Error("Structured clone extension is disabled");let t=u.getUint32(l-4);a||(a=new Map);let n,i=r[l];n=i>=144&&i<160||220==i||221==i?[]:i>=128&&i<144||222==i||223==i?new Map:(i>=199&&i<=201||i>=212&&i<=216)&&115===r[l+1]?new Set:{};let s={target:n};a.set(t,s);let o=U();if(!s.used)return s.target=o;if(Object.assign(n,o),n instanceof Map)for(let[e,t]of o.entries())n.set(e,t);if(n instanceof Set)for(let e of Array.from(o))n.add(e);return n},h[112]=e=>{if(!1===f.structuredClone)throw new Error("Structured clone extension is disabled");let t=u.getUint32(l-4),r=a.get(t);return r.used=!0,r.target},h[115]=()=>new Set(U());const $=["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64","BigInt64","BigUint64"].map((e=>e+"Array"));let K="object"==typeof globalThis?globalThis:window;h[116]=e=>{let t=e[0],r=Uint8Array.prototype.slice.call(e,1).buffer,n=$[t];if(!n){if(16===t)return r;if(17===t)return new DataView(r);throw new Error("Could not find typed array for code "+t)}return new K[n](r)},h[120]=()=>{let e=U();return new RegExp(e[0],e[1])};const Y=[];function q(e){let t=n,h=l,p=c,d=g,y=s,b=a,m=o,S=new Uint8Array(r.slice(0,n)),A=i,U=i.slice(0,i.length),E=f,I=w,k=e();return n=t,l=h,c=p,g=d,s=y,a=b,o=m,r=S,w=I,(i=A).splice(0,i.length,...U),f=E,u=new DataView(r.buffer,r.byteOffset,r.byteLength),k}function Z(){r=null,a=null,i=null}h[98]=e=>{let t=(e[0]<<24)+(e[1]<<16)+(e[2]<<8)+e[3],r=l;return l+=t-e.length,o=Y,(o=[V(),V()]).position0=0,o.position1=0,o.postBundlePosition=l,l=r,U()},h[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 G=new Array(147);for(let e=0;e<256;e++)G[e]=+("1e"+Math.floor(45.15-.30103*e));const H=m;var Q=new m({useRecords:!1});const X=Q.unpack,ee=Q.unpackMultiple,te=Q.unpack,re={NEVER:0,ALWAYS:1,DECIMAL_ROUND:3,DECIMAL_FIT:4};let ne,ie,se,oe=new Float32Array(1),ae=new Uint8Array(oe.buffer,0,4);try{ne=new TextEncoder}catch(e){}const ue="undefined"!=typeof Buffer,le=ue?function(e){return Buffer.allocUnsafeSlow(e)}:Uint8Array,fe=ue?Buffer:Uint8Array,ce=ue?4294967296:2144337920;let ge,he,pe,de,ye=0,we=null;const be=/[\u0080-\uFFFF]/,me=Symbol("record-id");class Se extends m{constructor(e){let t,r,n,i;super(e),this.offset=0;let s=fe.prototype.utf8Write?function(e,t){return ge.utf8Write(e,t,ge.byteLength-t)}:!(!ne||!ne.encodeInto)&&function(e,t){return ne.encodeInto(e,ge.subarray(t)).written},o=this;e||(e={});let a=e&&e.sequential,u=e.structures||e.saveStructures,l=e.maxSharedStructures;if(null==l&&(l=u?32:0),l>8160)throw new Error("Maximum maxSharedStructure is 8160");e.structuredClone&&null==e.moreTypes&&(this.moreTypes=!0);let f=e.maxOwnStructures;null==f&&(f=u?32:64),this.structures||0==e.useRecords||(this.structures=[]);let c=l>32||f+l>64,g=l+64,h=l+f+64;if(h>8256)throw new Error("Maximum maxSharedStructure + maxOwnStructure is 8192");let p=[],d=0,y=0;this.pack=this.encode=function(e,s){if(ge||(ge=new le(8192),pe=ge.dataView||(ge.dataView=new DataView(ge.buffer,0,8192)),ye=0),de=ge.length-10,de-ye<2048?(ge=new le(ge.length),pe=ge.dataView||(ge.dataView=new DataView(ge.buffer,0,ge.length)),de=ge.length-10,ye=0):ye=ye+7&2147483640,t=ye,s&De&&(ye+=255&s),i=o.structuredClone?new Map:null,o.bundleStrings&&"string"!=typeof e?(we=[],we.size=1/0):we=null,n=o.structures,n){n.uninitialized&&(n=o._mergeStructures(o.getStructures()));let e=n.sharedLength||0;if(e>l)throw new Error("Shared structures is larger than maximum shared structures, try increasing maxSharedStructures to "+n.sharedLength);if(!n.transitions){n.transitions=Object.create(null);for(let t=0;t<e;t++){let e=n[t];if(!e)continue;let r,i=n.transitions;for(let t=0,n=e.length;t<n;t++){let n=e[t];r=i[n],r||(r=i[n]=Object.create(null)),i=r}i[me]=t+64}this.lastNamedStructuresLength=e}a||(n.nextId=e+64)}let u;r&&(r=!1);try{o.randomAccessStructure&&e&&e.constructor&&e.constructor===Object?B(e):m(e);let a=we;if(we&&Ie(t,m,0),i&&i.idsToInsert){let e=i.idsToInsert.sort(((e,t)=>e.offset>t.offset?1:-1)),r=e.length,n=-1;for(;a&&r>0;){let i=e[--r].offset+t;i<a.stringsPosition+t&&-1===n&&(n=0),i>a.position+t?n>=0&&(n+=6):(n>=0&&(pe.setUint32(a.position+t,pe.getUint32(a.position+t)+n),n=-1),a=a.previous,r++)}n>=0&&a&&pe.setUint32(a.position+t,pe.getUint32(a.position+t)+n),ye+=6*e.length,ye>de&&I(ye),o.offset=ye;let s=function(e,t){let r,n=6*t.length,i=e.length-n;for(;r=t.pop();){let t=r.offset,s=r.id;e.copyWithin(t+n,t,i),n-=6;let o=t+n;e[o++]=214,e[o++]=105,e[o++]=s>>24,e[o++]=s>>16&255,e[o++]=s>>8&255,e[o++]=255&s,i=t}return e}(ge.subarray(t,ye),e);return i=null,s}return o.offset=ye,s&je?(ge.start=t,ge.end=ye,ge):ge.subarray(t,ye)}catch(e){throw u=e,e}finally{if(n&&(w(),r&&o.saveStructures)){let r=n.sharedLength||0,i=ge.subarray(t,ye),a=function(e,t){return e.isCompatible=e=>{let r=!e||(t.lastNamedStructuresLength||0)===e.length;return r||t._mergeStructures(e),r},e}(n,o);if(!u)return!1===o.saveStructures(a,a.isCompatible)?o.pack(e,s):(o.lastNamedStructuresLength=r,ge.length>1073741824&&(ge=null),i)}ge.length>1073741824&&(ge=null),s&Re&&(ye=t)}};const w=()=>{y<10&&y++;let e=n.sharedLength||0;if(n.length>e&&!a&&(n.length=e),d>1e4)n.transitions=null,y=0,d=0,p.length>0&&(p=[]);else if(p.length>0&&!a){for(let e=0,t=p.length;e<t;e++)p[e][me]=0;p=[]}},b=e=>{var t=e.length;t<16?ge[ye++]=144|t:t<65536?(ge[ye++]=220,ge[ye++]=t>>8,ge[ye++]=255&t):(ge[ye++]=221,pe.setUint32(ye,t),ye+=4);for(let r=0;r<t;r++)m(e[r])},m=e=>{ye>de&&(ge=I(ye));var r,n=typeof e;if("string"===n){let n,i=e.length;if(we&&i>=4&&i<4096){if((we.size+=i)>21760){let e,r,n=(we[0]?3*we[0].length+we[1].length:0)+10;ye+n>de&&(ge=I(ye+n)),we.position?(r=we,ge[ye]=200,ye+=3,ge[ye++]=98,e=ye-t,ye+=4,Ie(t,m,0),pe.setUint16(e+t-3,ye-t-e)):(ge[ye++]=214,ge[ye++]=98,e=ye-t,ye+=4),we=["",""],we.previous=r,we.size=0,we.position=e}let r=be.test(e);return we[r?0:1]+=e,ge[ye++]=193,void m(r?-i:i)}n=i<32?1:i<256?2:i<65536?3:5;let o=3*i;if(ye+o>de&&(ge=I(ye+o)),i<64||!s){let t,s,o,a=ye+n;for(t=0;t<i;t++)s=e.charCodeAt(t),s<128?ge[a++]=s:s<2048?(ge[a++]=s>>6|192,ge[a++]=63&s|128):55296==(64512&s)&&56320==(64512&(o=e.charCodeAt(t+1)))?(s=65536+((1023&s)<<10)+(1023&o),t++,ge[a++]=s>>18|240,ge[a++]=s>>12&63|128,ge[a++]=s>>6&63|128,ge[a++]=63&s|128):(ge[a++]=s>>12|224,ge[a++]=s>>6&63|128,ge[a++]=63&s|128);r=a-ye-n}else r=s(e,ye+n);r<32?ge[ye++]=160|r:r<256?(n<2&&ge.copyWithin(ye+2,ye+1,ye+1+r),ge[ye++]=217,ge[ye++]=r):r<65536?(n<3&&ge.copyWithin(ye+3,ye+2,ye+2+r),ge[ye++]=218,ge[ye++]=r>>8,ge[ye++]=255&r):(n<5&&ge.copyWithin(ye+5,ye+3,ye+3+r),ge[ye++]=219,pe.setUint32(ye,r),ye+=4),ye+=r}else if("number"===n)if(e>>>0===e)e<32||e<128&&!1===this.useRecords||e<64&&!this.randomAccessStructure?ge[ye++]=e:e<256?(ge[ye++]=204,ge[ye++]=e):e<65536?(ge[ye++]=205,ge[ye++]=e>>8,ge[ye++]=255&e):(ge[ye++]=206,pe.setUint32(ye,e),ye+=4);else if(e>>0===e)e>=-32?ge[ye++]=256+e:e>=-128?(ge[ye++]=208,ge[ye++]=e+256):e>=-32768?(ge[ye++]=209,pe.setInt16(ye,e),ye+=2):(ge[ye++]=210,pe.setInt32(ye,e),ye+=4);else{let t;if((t=this.useFloat32)>0&&e<4294967296&&e>=-2147483648){let r;if(ge[ye++]=202,pe.setFloat32(ye,e),t<4||(r=e*G[(127&ge[ye])<<1|ge[ye+1]>>7])>>0===r)return void(ye+=4);ye--}ge[ye++]=203,pe.setFloat64(ye,e),ye+=8}else if("object"===n||"function"===n)if(e){if(i){let r=i.get(e);if(r){if(!r.id){let e=i.idsToInsert||(i.idsToInsert=[]);r.id=e.push(r)}return ge[ye++]=214,ge[ye++]=112,pe.setUint32(ye,r.id),void(ye+=4)}i.set(e,{offset:ye-t})}let s=e.constructor;if(s===Object)E(e);else if(s===Array)b(e);else if(s===Map)if(this.mapAsEmptyObject)ge[ye++]=128;else{(r=e.size)<16?ge[ye++]=128|r:r<65536?(ge[ye++]=222,ge[ye++]=r>>8,ge[ye++]=255&r):(ge[ye++]=223,pe.setUint32(ye,r),ye+=4);for(let[t,r]of e)m(t),m(r)}else{for(let t=0,r=ie.length;t<r;t++){if(e instanceof se[t]){let r=ie[t];if(r.write){r.type&&(ge[ye++]=212,ge[ye++]=r.type,ge[ye++]=0);let t=r.write.call(this,e);return void(t===e?Array.isArray(e)?b(e):E(e):m(t))}let n,i=ge,s=pe,o=ye;ge=null;try{n=r.pack.call(this,e,(e=>(ge=i,i=null,ye+=e,ye>de&&I(ye),{target:ge,targetView:pe,position:ye-e})),m)}finally{i&&(ge=i,pe=s,ye=o,de=ge.length-10)}return void(n&&(n.length+ye>de&&I(n.length+ye),ye=Ee(n,ge,ye,r.type)))}}if(Array.isArray(e))b(e);else{if(e.toJSON){const t=e.toJSON();if(t!==e)return m(t)}if("function"===n)return m(this.writeFunction&&this.writeFunction(e));E(e)}}}else ge[ye++]=192;else if("boolean"===n)ge[ye++]=e?195:194;else if("bigint"===n){if(e<0x8000000000000000&&e>=-0x8000000000000000)ge[ye++]=211,pe.setBigInt64(ye,e);else if(e<0x10000000000000000&&e>0)ge[ye++]=207,pe.setBigUint64(ye,e);else{if(!this.largeBigIntToFloat){if(this.largeBigIntToString)return m(e.toString());if(this.useBigIntExtension||this.moreTypes){let t,r=e<0?BigInt(-1):BigInt(0);if(e>>BigInt(65536)===r){let n=BigInt(0x10000000000000000)-BigInt(1),i=[];do{i.push(e&n),e>>=BigInt(64)}while(e!==r);t=new Uint8Array(new BigUint64Array(i).buffer),t.reverse()}else{let r=e<0,n=(r?~e:e).toString(16);if(n.length%2?n="0"+n:parseInt(n.charAt(0),16)>=8&&(n="00"+n),ue)t=Buffer.from(n,"hex");else{t=new Uint8Array(n.length/2);for(let e=0;e<t.length;e++)t[e]=parseInt(n.slice(2*e,2*e+2),16)}if(r)for(let e=0;e<t.length;e++)t[e]=~t[e]}return t.length+ye>de&&I(t.length+ye),void(ye=Ee(t,ge,ye,66))}throw new RangeError(e+" was too large to fit in MessagePack 64-bit integer format, use useBigIntExtension, or set largeBigIntToFloat to convert to float-64, or set largeBigIntToString to convert to string")}ge[ye++]=203,pe.setFloat64(ye,Number(e))}ye+=8}else{if("undefined"!==n)throw new Error("Unknown type: "+n);this.encodeUndefinedAsNil?ge[ye++]=192:(ge[ye++]=212,ge[ye++]=0,ge[ye++]=0)}},S=this.variableMapSize||this.coercibleKeyAsNumber||this.skipValues?e=>{let t;if(this.skipValues){t=[];for(let r in e)"function"==typeof e.hasOwnProperty&&!e.hasOwnProperty(r)||this.skipValues.includes(e[r])||t.push(r)}else t=Object.keys(e);let r,n=t.length;if(n<16?ge[ye++]=128|n:n<65536?(ge[ye++]=222,ge[ye++]=n>>8,ge[ye++]=255&n):(ge[ye++]=223,pe.setUint32(ye,n),ye+=4),this.coercibleKeyAsNumber)for(let i=0;i<n;i++){r=t[i];let n=Number(r);m(isNaN(n)?r:n),m(e[r])}else for(let i=0;i<n;i++)m(r=t[i]),m(e[r])}:e=>{ge[ye++]=222;let r=ye-t;ye+=2;let n=0;for(let t in e)("function"!=typeof e.hasOwnProperty||e.hasOwnProperty(t))&&(m(t),m(e[t]),n++);if(n>65535)throw new Error('Object is too large to serialize with fast 16-bit map size, use the "variableMapSize" option to serialize this object');ge[r+++t]=n>>8,ge[r+t]=255&n},A=!1===this.useRecords?S:e.progressiveRecords&&!c?e=>{let r,i,s=n.transitions||(n.transitions=Object.create(null)),o=ye++-t;for(let a in e)if("function"!=typeof e.hasOwnProperty||e.hasOwnProperty(a)){if(r=s[a],r)s=r;else{let u=Object.keys(e),l=s;s=n.transitions;let f=0;for(let e=0,t=u.length;e<t;e++){let t=u[e];r=s[t],r||(r=s[t]=Object.create(null),f++),s=r}o+t+1==ye?(ye--,k(s,u,f)):v(s,u,o,f),i=!0,s=l[a]}m(e[a])}if(!i){let r=s[me];r?ge[o+t]=r:v(s,Object.keys(e),o,0)}}:e=>{let t,r=n.transitions||(n.transitions=Object.create(null)),i=0;for(let n in e)("function"!=typeof e.hasOwnProperty||e.hasOwnProperty(n))&&(t=r[n],t||(t=r[n]=Object.create(null),i++),r=t);let s=r[me];s?s>=96&&c?(ge[ye++]=96+(31&(s-=96)),ge[ye++]=s>>5):ge[ye++]=s:k(r,r.__keys__||Object.keys(e),i);for(let t in e)("function"!=typeof e.hasOwnProperty||e.hasOwnProperty(t))&&m(e[t])},U="function"==typeof this.useRecords&&this.useRecords,E=U?e=>{U(e)?A(e):S(e)}:A,I=e=>{let r;if(e>16777216){if(e-t>ce)throw new Error("Packed buffer would be larger than maximum buffer size");r=Math.min(ce,4096*Math.round(Math.max((e-t)*(e>67108864?1.25:2),4194304)/4096))}else r=1+(Math.max(e-t<<2,ge.length-1)>>12)<<12;let n=new le(r);return pe=n.dataView||(n.dataView=new DataView(n.buffer,0,r)),e=Math.min(e,ge.length),ge.copy?ge.copy(n,0,t,e):n.set(ge.slice(t,e)),ye-=t,t=0,de=n.length-10,ge=n},k=(e,t,i)=>{let s=n.nextId;s||(s=64),s<g&&this.shouldShareStructure&&!this.shouldShareStructure(t)?(s=n.nextOwnId,s<h||(s=g),n.nextOwnId=s+1):(s>=h&&(s=g),n.nextId=s+1);let o=t.highByte=s>=96&&c?s-96>>5:-1;e[me]=s,e.__keys__=t,n[s-64]=t,s<g?(t.isShared=!0,n.sharedLength=s-63,r=!0,o>=0?(ge[ye++]=96+(31&s),ge[ye++]=o):ge[ye++]=s):(o>=0?(ge[ye++]=213,ge[ye++]=114,ge[ye++]=96+(31&s),ge[ye++]=o):(ge[ye++]=212,ge[ye++]=114,ge[ye++]=s),i&&(d+=y*i),p.length>=f&&(p.shift()[me]=0),p.push(e),m(t))},v=(e,r,n,i)=>{let s=ge,o=ye,a=de,u=t;ge=he,ye=0,t=0,ge||(he=ge=new le(8192)),de=ge.length-10,k(e,r,i),he=ge;let l=ye;if(ge=s,ye=o,de=a,t=u,l>1){let e=ye+l-1;e>de&&I(e);let r=n+t;ge.copyWithin(r+l,r+1,ye),ge.set(he.slice(0,l),r),ye=e}else ge[n+t]=he[0]},B=e=>{let i=undefined(e,ge,t,ye,n,I,((e,t,n)=>{if(n)return r=!0;ye=t;let i=ge;return m(e),w(),i!==ge?{position:ye,targetView:pe,target:ge}:ye}),this);if(0===i)return E(e);ye=i}}useBuffer(e){ge=e,ge.dataView||(ge.dataView=new DataView(ge.buffer,ge.byteOffset,ge.byteLength)),ye=0}set position(e){ye=e}get position(){return ye}clearSharedData(){this.structures&&(this.structures=[]),this.typedStructs&&(this.typedStructs=[])}}function Ae(e,t,r,n){let i=e.byteLength;if(i+1<256){var{target:s,position:o}=r(4+i);s[o++]=199,s[o++]=i+1}else if(i+1<65536){var{target:s,position:o}=r(5+i);s[o++]=200,s[o++]=i+1>>8,s[o++]=i+1&255}else{var{target:s,position:o,targetView:a}=r(7+i);s[o++]=201,a.setUint32(o,i+1),o+=4}s[o++]=116,s[o++]=t,e.buffer||(e=new Uint8Array(e)),s.set(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),o)}function Ue(e,t){let r=e.byteLength;var n,i;if(r<256){var{target:n,position:i}=t(r+2);n[i++]=196,n[i++]=r}else if(r<65536){var{target:n,position:i}=t(r+3);n[i++]=197,n[i++]=r>>8,n[i++]=255&r}else{var{target:n,position:i,targetView:s}=t(r+5);n[i++]=198,s.setUint32(i,r),i+=4}n.set(e,i)}function Ee(e,t,r,n){let i=e.length;switch(i){case 1:t[r++]=212;break;case 2:t[r++]=213;break;case 4:t[r++]=214;break;case 8:t[r++]=215;break;case 16:t[r++]=216;break;default:i<256?(t[r++]=199,t[r++]=i):i<65536?(t[r++]=200,t[r++]=i>>8,t[r++]=255&i):(t[r++]=201,t[r++]=i>>24,t[r++]=i>>16&255,t[r++]=i>>8&255,t[r++]=255&i)}return t[r++]=n,t.set(e,r),r+=i}function Ie(e,t,r){if(we.length>0){pe.setUint32(we.position+e,ye+r-we.position-e),we.stringsPosition=ye-e;let n=we;we=null,t(n[0]),t(n[1])}}se=[Date,Set,Error,RegExp,ArrayBuffer,Object.getPrototypeOf(Uint8Array.prototype).constructor,DataView,d],ie=[{pack(e,t,r){let n=e.getTime()/1e3;if((this.useTimestamp32||0===e.getMilliseconds())&&n>=0&&n<4294967296){let{target:e,targetView:r,position:i}=t(6);e[i++]=214,e[i++]=255,r.setUint32(i,n)}else if(n>0&&n<4294967296){let{target:r,targetView:i,position:s}=t(10);r[s++]=215,r[s++]=255,i.setUint32(s,4e6*e.getMilliseconds()+(n/1e3/4294967296>>0)),i.setUint32(s+4,n)}else if(isNaN(n)){if(this.onInvalidDate)return t(0),r(this.onInvalidDate());let{target:e,targetView:n,position:i}=t(3);e[i++]=212,e[i++]=255,e[i++]=255}else{let{target:r,targetView:i,position:s}=t(15);r[s++]=199,r[s++]=12,r[s++]=255,i.setUint32(s,1e6*e.getMilliseconds()),i.setBigInt64(s+4,BigInt(Math.floor(n)))}}},{pack(e,t,r){if(this.setAsEmptyObject)return t(0),r({});let n=Array.from(e),{target:i,position:s}=t(this.moreTypes?3:0);this.moreTypes&&(i[s++]=212,i[s++]=115,i[s++]=0),r(n)}},{pack(e,t,r){let{target:n,position:i}=t(this.moreTypes?3:0);this.moreTypes&&(n[i++]=212,n[i++]=101,n[i++]=0),r([e.name,e.message,e.cause])}},{pack(e,t,r){let{target:n,position:i}=t(this.moreTypes?3:0);this.moreTypes&&(n[i++]=212,n[i++]=120,n[i++]=0),r([e.source,e.flags])}},{pack(e,t){this.moreTypes?Ae(e,16,t):Ue(ue?Buffer.from(e):new Uint8Array(e),t)}},{pack(e,t){let r=e.constructor;r!==fe&&this.moreTypes?Ae(e,$.indexOf(r.name),t):Ue(e,t)}},{pack(e,t){this.moreTypes?Ae(e,17,t):Ue(ue?Buffer.from(e):new Uint8Array(e),t)}},{pack(e,t){let{target:r,position:n}=t(1);r[n]=193}}];let ke=new Se({useRecords:!1});const ve=ke.pack,Be=ke.pack,Oe=Se,{NEVER:_e,ALWAYS:xe,DECIMAL_ROUND:Te,DECIMAL_FIT:Me}=re,je=512,Re=1024,De=2048;const Le=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 r=new m(t);let n;const i=e=>{let t;n&&(e=Buffer.concat([n,e]),n=void 0);try{t=r.unpackMultiple(e)}catch(r){if(!r.incomplete)throw r;n=e.slice(r.lastPosition),t=r.values}return t};return"function"==typeof e[Symbol.iterator]?function*(){for(const t of e)yield*i(t)}():"function"==typeof e[Symbol.asyncIterator]?async function*(){for await(const t of e)yield*i(t)}():void 0},Ve=function(e,t={}){if(e&&"object"==typeof e){if("function"==typeof e[Symbol.iterator])return function*(e,t){const r=new Se(t);for(const t of e)yield r.pack(t)}(e,t);if("function"==typeof e.then||"function"==typeof e[Symbol.asyncIterator])return async function*(e,t){const r=new Se(t);for await(const t of e)yield r.pack(t)}(e,t);throw new Error("first argument must be an Iterable, Async Iterable, Iterator, Async Iterator, or a Promise")}throw new Error("first argument must be an Iterable, Async Iterable, or a Promise for an Async Iterable")};e.ALWAYS=xe,e.C1=y,e.DECIMAL_FIT=Me,e.DECIMAL_ROUND=Te,e.Decoder=H,e.Encoder=Oe,e.FLOAT32_OPTIONS=re,e.NEVER=_e,e.Packr=Se,e.RESERVE_START_SPACE=De,e.RESET_BUFFER_MODE=Re,e.REUSE_BUFFER_MODE=je,e.Unpackr=m,e.addExtension=function(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)");se.unshift(e.Class),ie.unshift(e)}!function(e){e.unpack?h[e.type]=e.unpack:h[e.type]=e}(e)},e.clearSource=Z,e.decode=te,e.decodeIter=Le,e.encode=Be,e.encodeIter=Ve,e.isNativeAccelerationEnabled=!1,e.mapsAsObjects=!0,e.pack=ve,e.roundFloat32=function(e){oe[0]=e;let t=G[(127&ae[3])<<1|ae[2]>>7];return(t*e+(e>0?.5:-.5)>>0)/t},e.unpack=X,e.unpackMultiple=ee,e.useRecords=!1}));
//# sourceMappingURL=index.min.js.map

@@ -29,2 +29,3 @@ export enum FLOAT32_OPTIONS {

setAsEmptyObject?: boolean
allowArraysInMapKeys?: boolean
writeFunction?: () => any

@@ -31,0 +32,0 @@ /** @deprecated use int64AsType: 'number' */

@@ -526,7 +526,7 @@ import { Unpackr, mult10, C1Type, typedArrays, addExtension as unpackAddExtension } from './unpack.js'

} else if (type === 'bigint') {
if (value < (BigInt(1)<<BigInt(63)) && value >= -(BigInt(1)<<BigInt(63))) {
if (value < 0x8000000000000000 && value >= -0x8000000000000000) {
// use a signed int as long as it fits
target[position++] = 0xd3
targetView.setBigInt64(position, value)
} else if (value < (BigInt(1)<<BigInt(64)) && value > 0) {
} else if (value < 0x10000000000000000 && value > 0) {
// if we can fit an unsigned int, use that

@@ -542,18 +542,42 @@ target[position++] = 0xcf

return pack(value.toString());
} else if (this.useBigIntExtension && value < BigInt(2)**BigInt(1023) && value > -(BigInt(2)**BigInt(1023))) {
target[position++] = 0xc7
position++;
target[position++] = 0x42 // "B" for BigInt
let bytes = [];
let alignedSign;
do {
let byte = value & BigInt(0xff);
alignedSign = (byte & BigInt(0x80)) === (value < BigInt(0) ? BigInt(0x80) : BigInt(0));
bytes.push(byte);
value >>= BigInt(8);
} while (!((value === BigInt(0) || value === BigInt(-1)) && alignedSign));
target[position-2] = bytes.length;
for (let i = bytes.length; i > 0;) {
target[position++] = Number(bytes[--i]);
} else if (this.useBigIntExtension || this.moreTypes) {
let empty = value < 0 ? BigInt(-1) : BigInt(0)
let array
if (value >> BigInt(0x10000) === empty) {
let mask = BigInt(0x10000000000000000) - BigInt(1) // literal would overflow
let chunks = []
do {
chunks.push(value & mask)
value >>= BigInt(64)
} while (value !== empty)
array = new Uint8Array(new BigUint64Array(chunks).buffer)
array.reverse()
} else {
let invert = value < 0
let string = (invert ? ~value : value).toString(16)
if (string.length % 2) {
string = '0' + string
} else if (parseInt(string.charAt(0), 16) >= 8) {
string = '00' + string
}
if (hasNodeBuffer) {
array = Buffer.from(string, 'hex')
} else {
array = new Uint8Array(string.length / 2)
for (let i = 0; i < array.length; i++) {
array[i] = parseInt(string.slice(i * 2, i * 2 + 2), 16)
}
}
if (invert) {
for (let i = 0; i < array.length; i++) array[i] = ~array[i]
}
}
if (array.length + position > safeEnd)
makeRoom(array.length + position)
position = writeExtensionData(array, target, position, 0x42)
return

@@ -862,3 +886,3 @@ } else {

extensionClasses = [ Date, Set, Error, RegExp, ArrayBuffer, Object.getPrototypeOf(Uint8Array.prototype).constructor /*TypedArray*/, C1Type ]
extensionClasses = [ Date, Set, Error, RegExp, ArrayBuffer, Object.getPrototypeOf(Uint8Array.prototype).constructor /*TypedArray*/, DataView, C1Type ]
extensions = [{

@@ -951,2 +975,9 @@ pack(date, allocateForWrite, pack) {

}, {
pack(arrayBuffer, allocateForWrite) {
if (this.moreTypes)
writeExtBuffer(arrayBuffer, 0x11, allocateForWrite)
else
writeBuffer(hasNodeBuffer ? Buffer.from(arrayBuffer) : new Uint8Array(arrayBuffer), allocateForWrite)
}
}, {
pack(c1, allocateForWrite) { // specific 0xC1 object

@@ -1108,2 +1139,2 @@ let { target, position} = allocateForWrite(1)

export const RESET_BUFFER_MODE = 1024
export const RESERVE_START_SPACE = 2048
export const RESERVE_START_SPACE = 2048
{
"name": "msgpackr",
"author": "Kris Zyp",
"version": "1.11.2",
"version": "1.11.3",
"description": "Ultra-fast MessagePack implementation with extensions for records and structured cloning",

@@ -10,2 +10,3 @@ "license": "MIT",

"module": "./index.js",
"react-native": "./index.js",
"keywords": [

@@ -36,2 +37,3 @@ "MessagePack",

},
"browser": "./index.js",
"node": {

@@ -52,2 +54,3 @@ "require": "./dist/node.cjs",

},
"browser": "./pack.js",
"node": {

@@ -68,2 +71,3 @@ "import": "./index.js",

},
"browser": "./unpack.js",
"node": {

@@ -70,0 +74,0 @@ "import": "./index.js",

@@ -196,2 +196,3 @@ # msgpackr

* `setAsEmptyObject` - Encodes JS `Set`s as empty objects (for back-compat with older libraries).
* `allowArraysInMapKeys` - Allows arrays to be used as keys in Maps, as long as all elements are strings, numbers, booleans, or bigints. When enabled, such arrays are flattened and converted to a string representation.

@@ -198,0 +199,0 @@ ### 32-bit Float Options

@@ -518,6 +518,10 @@

var construct = structure.construct;
var fullConstruct = structure.fullConstruct;
if (!construct) {
construct = structure.construct = function LazyObject() {
}
var prototype = construct.prototype;
fullConstruct = structure.fullConstruct = function LoadedObject() {
}
fullConstruct.prototype = unpackr.structPrototype ?? {};
var prototype = construct.prototype = unpackr.structPrototype ? Object.create(unpackr.structPrototype) : {};
let properties = [];

@@ -723,3 +727,3 @@ let currentOffset = 0;

args.push(valueFunction);
objectLiteralProperties.push('[' + JSON.stringify(property.key) + ']:' + valueFunction + '(s)');
objectLiteralProperties.push('o[' + JSON.stringify(property.key) + ']=' + valueFunction + '(s)');
}

@@ -729,3 +733,3 @@ if (hasInheritedProperties) {

}
let toObject = (new Function(...args, 'return function(s){return{' + objectLiteralProperties.join(',') + '}}')).apply(null, properties.map(prop => prop.get));
let toObject = (new Function(...args, 'var c=this;return function(s){var o=new c();' + objectLiteralProperties.join(';') + ';return o;}')).apply(fullConstruct, properties.map(prop => prop.get));
Object.defineProperty(prototype, 'toJSON', {

@@ -732,0 +736,0 @@ value(omitUnderscoredProperties) {

@@ -974,3 +974,6 @@ var decoder

if (property == null) return property + '';
throw new Error('Invalid property type for record', typeof property);
if (currentUnpackr.allowArraysInMapKeys && Array.isArray(property) && property.flat().every(item => ['string', 'number', 'boolean', 'bigint'].includes(typeof item))) {
return property.flat().toString();
}
throw new Error(`Invalid property type for record: ${typeof property}`);
}

@@ -1000,17 +1003,43 @@ // the registration of the record definition extension (as "r")

currentExtensions[0x42] = (data) => {
// decode bigint
let length = data.length;
let value = BigInt(data[0] & 0x80 ? data[0] - 0x100 : data[0]);
for (let i = 1; i < length; i++) {
value <<= BigInt(8);
value += BigInt(data[i]);
currentExtensions[0x42] = data => {
let headLength = (data.byteLength % 8) || 8
let head = BigInt(data[0] & 0x80 ? data[0] - 0x100 : data[0])
for (let i = 1; i < headLength; i++) {
head <<= BigInt(8)
head += BigInt(data[i])
}
return value;
if (data.byteLength !== headLength) {
let view = new DataView(data.buffer, data.byteOffset, data.byteLength)
let decode = (start, end) => {
let length = end - start
if (length <= 40) {
let out = view.getBigUint64(start)
for (let i = start + 8; i < end; i += 8) {
out <<= BigInt(64n)
out |= view.getBigUint64(i)
}
return out
}
// if (length === 8) return view.getBigUint64(start)
let middle = start + (length >> 4 << 3)
let left = decode(start, middle)
let right = decode(middle, end)
return (left << BigInt((end - middle) * 8)) | right
}
head = (head << BigInt((view.byteLength - headLength) * 8)) | decode(headLength, view.byteLength)
}
return head
}
let errors = { Error, TypeError, ReferenceError };
let errors = {
Error, EvalError, RangeError, ReferenceError, SyntaxError, TypeError, URIError, AggregateError: typeof AggregateError === 'function' ? AggregateError : null,
}
currentExtensions[0x65] = () => {
let data = read()
return (errors[data[0]] || Error)(data[1], { cause: data[2] })
if (!errors[data[0]]) {
let error = Error(data[1], { cause: data[2] })
error.name = data[0]
return error
}
return errors[data[0]](data[1], { cause: data[2] })
}

@@ -1026,6 +1055,9 @@

let target
// TODO: handle Maps, Sets, and other types that can cycle; this is complicated, because you potentially need to read
// ahead past references to record structure definitions
// TODO: handle any other types that can cycle and make the code more robust if there are other extensions
if (token >= 0x90 && token < 0xa0 || token == 0xdc || token == 0xdd)
target = []
else if (token >= 0x80 && token < 0x90 || token == 0xde || token == 0xdf)
target = new Map()
else if ((token >= 0xc7 && token <= 0xc9 || token >= 0xd4 && token <= 0xd8) && src[position + 1] === 0x73)
target = new Set()
else

@@ -1037,6 +1069,16 @@ target = {}

let targetProperties = read() // read the next value as the target object to id
if (refEntry.used) // there is a cycle, so we have to assign properties to original target
return Object.assign(target, targetProperties)
refEntry.target = targetProperties // the placeholder wasn't used, replace with the deserialized one
return targetProperties // no cycle, can just use the returned read object
if (!refEntry.used) {
// no cycle, can just use the returned read object
return refEntry.target = targetProperties // replace the placeholder with the real one
} else {
// there is a cycle, so we have to assign properties to original target
Object.assign(target, targetProperties)
}
// copy over map/set entries if we're able to
if (target instanceof Map)
for (let [k, v] of targetProperties.entries()) target.set(k, v)
if (target instanceof Set)
for (let i of Array.from(targetProperties)) target.add(i)
return target
}

@@ -1060,14 +1102,12 @@

let typeCode = data[0]
// we always have to slice to get a new ArrayBuffer that is aligned
let buffer = Uint8Array.prototype.slice.call(data, 1).buffer
let typedArrayName = typedArrays[typeCode]
if (!typedArrayName) {
if (typeCode === 16) {
let ab = new ArrayBuffer(data.length - 1)
let u8 = new Uint8Array(ab)
u8.set(data.subarray(1))
return ab;
}
if (typeCode === 16) return buffer
if (typeCode === 17) return new DataView(buffer)
throw new Error('Could not find typed array for code ' + typeCode)
}
// we have to always slice/copy here to get a new ArrayBuffer that is word/byte aligned
return new glbl[typedArrayName](Uint8Array.prototype.slice.call(data, 1).buffer)
return new glbl[typedArrayName](buffer)
}

@@ -1100,3 +1140,3 @@ currentExtensions[0x78] = () => {

((data[3] & 0x3) * 0x100000000 + data[4] * 0x1000000 + (data[5] << 16) + (data[6] << 8) + data[7]) * 1000)
else if (data.length == 12)// TODO: Implement support for negative
else if (data.length == 12)
return new Date(

@@ -1107,3 +1147,3 @@ ((data[0] << 24) + (data[1] << 16) + (data[2] << 8) + data[3]) / 1000000 +

return new Date('invalid')
} // notepack defines extension 0 to mean undefined, so use that as the default here
}
// registration of bulk record definition?

@@ -1110,0 +1150,0 @@ // currentExtensions[0x52] = () =>

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet