Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cbor-x

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cbor-x - npm Package Compare versions

Comparing version 1.5.3 to 1.5.4

2

dist/index-no-eval.min.js

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

!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).CBOR={})}(this,(function(e){"use strict";let t,r,n;try{t=new TextDecoder}catch(e){}let i=0;const s={};let o,a,l,u,f,c,d,h={},y=0,p=0,g=[],b=[],w={useRecords:!1,mapsAsObjects:!0},m=!1,A=2;var v;try{new v("")}catch(e){A=1/0}class k{constructor(e){if(e&&(!e.keyMap&&!e._keyMap||e.useRecords||(e.useRecords=!1,e.mapsAsObjects=!0),!1===e.useRecords&&void 0===e.mapsAsObjects&&(e.mapsAsObjects=!0),e.getStructures&&(e.getShared=e.getStructures),e.getShared&&!e.structures&&((e.structures=[]).uninitialized=!0),e.keyMap)){this.mapKey=new Map;for(let[t,r]of Object.entries(e.keyMap))this.mapKey.set(r,t)}Object.assign(this,e)}decodeKey(e){return this.keyMap&&this.mapKey.get(e)||e}encodeKey(e){return this.keyMap&&this.keyMap.hasOwnProperty(e)?this.keyMap[e]:e}encodeKeys(e){if(!this._keyMap)return e;let t=new Map;for(let[r,n]of Object.entries(e))t.set(this._keyMap.hasOwnProperty(r)?this._keyMap[r]:r,n);return t}decodeKeys(e){if(!this._keyMap||"Map"!=e.constructor.name)return e;if(!this._mapKey){this._mapKey=new Map;for(let[e,t]of Object.entries(this._keyMap))this._mapKey.set(t,e)}let t={};return e.forEach(((e,r)=>t[O(this._mapKey.has(r)?this._mapKey.get(r):r)]=e)),t}mapDecode(e,t){let r=this.decode(e);return this._keyMap&&"Array"===r.constructor.name?r.map((e=>this.decodeKeys(e))):r}decode(e,t){if(r)return Y((()=>(J(),this?this.decode(e,t):k.prototype.decode.call(w,e,t))));n=t>-1?t:e.length,i=0,p=0,a=null,l=null,r=e;try{c=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 k){if(h=this,f=this.sharedValues&&(this.pack?new Array(this.maxPrivatePackedValues||16).concat(this.sharedValues):this.sharedValues),this.structures)return o=this.structures,U();(!o||o.length>0)&&(o=[])}else h=w,(!o||o.length>0)&&(o=[]),f=null;return U()}decodeMultiple(e,t){let r,n=0;try{let s=e.length;m=!0;let o=this?this.decode(e,s):Z.decode(e,s);if(!t){for(r=[o];i<s;)n=i,r.push(U());return r}if(!1===t(o))return;for(;i<s;)if(n=i,!1===t(U()))return}catch(e){throw e.lastPosition=n,e.values=r,e}finally{m=!1,J()}}}function U(){try{let e=I();if(l){if(i>=l.postBundlePosition){let e=new Error("Unexpected bundle position");throw e.incomplete=!0,e}i=l.postBundlePosition,l=null}if(i==n)o=null,r=null,u&&(u=null);else{if(i>n){let e=new Error("Unexpected end of CBOR data");throw e.incomplete=!0,e}if(!m)throw new Error("Data read, but end of buffer not reached")}return e}catch(e){throw J(),(e instanceof RangeError||e.message.startsWith("Unexpected end of buffer"))&&(e.incomplete=!0),e}}function I(){let e=r[i++],t=e>>5;if(e&=31,e>23)switch(e){case 24:e=r[i++];break;case 25:if(7==t)return function(){let e=r[i++],t=r[i++],n=(127&e)>>2;if(31===n)return t||3&e?NaN:128&e?-1/0:1/0;if(0===n){let r=((3&e)<<8|t)/(1<<24);return 128&e?-r:r}return _[3]=128&e|56+(n>>1),_[2]=(7&e)<<5|t>>3,_[1]=t<<5,_[0]=0,V[0]}();e=c.getUint16(i),i+=2;break;case 26:if(7==t){let e=c.getFloat32(i);if(h.useFloat32>2){let t=$[(127&r[i])<<1|r[i+1]>>7];return i+=4,(t*e+(e>0?.5:-.5)>>0)/t}return i+=4,e}e=c.getUint32(i),i+=4;break;case 27:if(7==t){let e=c.getFloat64(i);return i+=8,e}if(t>1){if(c.getUint32(i)>0)throw new Error("JavaScript does not support arrays, maps, or strings with length over 4294967295");e=c.getUint32(i+4)}else h.int64AsNumber?(e=4294967296*c.getUint32(i),e+=c.getUint32(i+4)):e=c.getBigUint64(i);i+=8;break;case 31:switch(t){case 2:case 3:throw new Error("Indefinite length not supported for byte or text strings");case 4:let e,r=[],n=0;for(;(e=I())!=s;)r[n++]=e;return 4==t?r:3==t?r.join(""):Buffer.concat(r);case 5:let i;if(h.mapsAsObjects){let e={};if(h.keyMap)for(;(i=I())!=s;)e[O(h.decodeKey(i))]=I();else for(;(i=I())!=s;)e[O(i)]=I();return e}{d&&(h.mapsAsObjects=!0,d=!1);let e=new Map;if(h.keyMap)for(;(i=I())!=s;)e.set(h.decodeKey(i),I());else for(;(i=I())!=s;)e.set(i,I());return e}case 7:return s;default:throw new Error("Invalid major type for indefinite length "+t)}default:throw new Error("Unknown token "+e)}switch(t){case 0:return e;case 1:return~e;case 2:return u=e,h.copyBuffers?Uint8Array.prototype.slice.call(r,i,i+=u):r.subarray(i,i+=u);case 3:if(p>=i)return a.slice(i-y,(i+=e)-y);if(0==p&&n<140&&e<32){let t=e<16?B(e):function(e){let t=i,n=new Array(e);for(let s=0;s<e;s++){const e=r[i++];if((128&e)>0)return void(i=t);n[s]=e}return x.apply(String,n)}(e);if(null!=t)return t}return S(e);case 4:let t=new Array(e);for(let r=0;r<e;r++)t[r]=I();return t;case 5:if(h.mapsAsObjects){let t={};if(h.keyMap)for(let r=0;r<e;r++)t[O(h.decodeKey(I()))]=I();else for(let r=0;r<e;r++)t[O(I())]=I();return t}{d&&(h.mapsAsObjects=!0,d=!1);let t=new Map;if(h.keyMap)for(let r=0;r<e;r++)t.set(h.decodeKey(I()),I());else for(let r=0;r<e;r++)t.set(I(),I());return t}case 6:if(e>=57337){let t=o[8191&e];if(t)return t.read||(t.read=M(t)),t.read();if(e<65536){if(57343==e){let e=W(),t=I(),r=I();P(t,r);let n={};if(h.keyMap)for(let t=2;t<e;t++){n[O(h.decodeKey(r[t-2]))]=I()}else for(let t=2;t<e;t++){n[O(r[t-2])]=I()}return n}if(57342==e){let e=W(),t=I();for(let r=2;r<e;r++)P(t++,I());return I()}if(57337==e)return function(){let e=W(),t=i+I();for(let t=2;t<e;t++){let e=W();i+=e}let r=i;return i=t,l=[j(W()),j(W())],l.position0=0,l.position1=0,l.postBundlePosition=i,i=r,I()}();if(h.getShared&&(H(),t=o[8191&e],t))return t.read||(t.read=M(t)),t.read()}}let s=g[e];if(s)return s.handlesRead?s(I):s(I());{let t=I();for(let r=0;r<b.length;r++){let n=b[r](e,t);if(void 0!==n)return n}return new R(t,e)}case 7:switch(e){case 20:return!1;case 21:return!0;case 22:return null;case 23:return;default:let t=(f||C())[e];if(void 0!==t)return t;throw new Error("Unknown token "+e)}default:if(isNaN(e)){let e=new Error("Unexpected end of CBOR data");throw e.incomplete=!0,e}throw new Error("Unknown CBOR token "+e)}var u}const E=/^[a-zA-Z_$][a-zA-Z\d_$]*$/;function M(e){return e.slowReads=0,function(){let e=r[i++];if(e&=31,e>23)switch(e){case 24:e=r[i++];break;case 25:e=c.getUint16(i),i+=2;break;case 26:e=c.getUint32(i),i+=4;break;default:throw new Error("Expected array header, but got "+r[i-1])}let t=this.compiledReader;for(;t;){if(t.propertyCount===e)return t(I);t=t.next}if(this.slowReads++>=A){let r=this.length==e?this:this.slice(0,e);return t=h.keyMap?new v("r","return {"+r.map((e=>h.decodeKey(e))).map((e=>E.test(e)?O(e)+":r()":"["+JSON.stringify(e)+"]:r()")).join(",")+"}"):new v("r","return {"+r.map((e=>E.test(e)?O(e)+":r()":"["+JSON.stringify(e)+"]:r()")).join(",")+"}"),this.compiledReader&&(t.next=this.compiledReader),t.propertyCount=e,this.compiledReader=t,t(I)}let n={};if(h.keyMap)for(let t=0;t<e;t++)n[O(h.decodeKey(this[t]))]=I();else for(let t=0;t<e;t++)n[O(this[t])]=I();return n}}function O(e){return"__proto__"===e?"__proto_":e}let S=j;function j(e){let n;if(e<16&&(n=B(e)))return n;if(e>64&&t)return t.decode(r.subarray(i,i+=e));const s=i+e,o=[];for(n="";i<s;){const e=r[i++];if(0==(128&e))o.push(e);else if(192==(224&e)){const t=63&r[i++];o.push((31&e)<<6|t)}else if(224==(240&e)){const t=63&r[i++],n=63&r[i++];o.push((31&e)<<12|t<<6|n)}else if(240==(248&e)){let t=(7&e)<<18|(63&r[i++])<<12|(63&r[i++])<<6|63&r[i++];t>65535&&(t-=65536,o.push(t>>>10&1023|55296),t=56320|1023&t),o.push(t)}else o.push(e);o.length>=4096&&(n+=x.apply(String,o),o.length=0)}return o.length>0&&(n+=x.apply(String,o)),n}let x=String.fromCharCode;function B(e){if(e<4){if(e<2){if(0===e)return"";{let e=r[i++];return(128&e)>1?void(i-=1):x(e)}}{let t=r[i++],n=r[i++];if((128&t)>0||(128&n)>0)return void(i-=2);if(e<3)return x(t,n);let s=r[i++];return(128&s)>0?void(i-=3):x(t,n,s)}}{let t=r[i++],n=r[i++],s=r[i++],o=r[i++];if((128&t)>0||(128&n)>0||(128&s)>0||(128&o)>0)return void(i-=4);if(e<6){if(4===e)return x(t,n,s,o);{let e=r[i++];return(128&e)>0?void(i-=5):x(t,n,s,o,e)}}if(e<8){let a=r[i++],l=r[i++];if((128&a)>0||(128&l)>0)return void(i-=6);if(e<7)return x(t,n,s,o,a,l);let u=r[i++];return(128&u)>0?void(i-=7):x(t,n,s,o,a,l,u)}{let a=r[i++],l=r[i++],u=r[i++],f=r[i++];if((128&a)>0||(128&l)>0||(128&u)>0||(128&f)>0)return void(i-=8);if(e<10){if(8===e)return x(t,n,s,o,a,l,u,f);{let e=r[i++];return(128&e)>0?void(i-=9):x(t,n,s,o,a,l,u,f,e)}}if(e<12){let c=r[i++],d=r[i++];if((128&c)>0||(128&d)>0)return void(i-=10);if(e<11)return x(t,n,s,o,a,l,u,f,c,d);let h=r[i++];return(128&h)>0?void(i-=11):x(t,n,s,o,a,l,u,f,c,d,h)}{let c=r[i++],d=r[i++],h=r[i++],y=r[i++];if((128&c)>0||(128&d)>0||(128&h)>0||(128&y)>0)return void(i-=12);if(e<14){if(12===e)return x(t,n,s,o,a,l,u,f,c,d,h,y);{let e=r[i++];return(128&e)>0?void(i-=13):x(t,n,s,o,a,l,u,f,c,d,h,y,e)}}{let p=r[i++],g=r[i++];if((128&p)>0||(128&g)>0)return void(i-=14);if(e<15)return x(t,n,s,o,a,l,u,f,c,d,h,y,p,g);let b=r[i++];return(128&b)>0?void(i-=15):x(t,n,s,o,a,l,u,f,c,d,h,y,p,g,b)}}}}}let V=new Float32Array(1),_=new Uint8Array(V.buffer,0,4);new Array(4096);class R{constructor(e,t){this.value=e,this.tag=t}}g[0]=e=>new Date(e),g[1]=e=>new Date(Math.round(1e3*e)),g[2]=e=>{let t=BigInt(0);for(let r=0,n=e.byteLength;r<n;r++)t=BigInt(e[r])+t<<BigInt(8);return t},g[3]=e=>BigInt(-1)-g[2](e),g[4]=e=>+(e[1]+"e"+e[0]),g[5]=e=>e[1]*Math.exp(e[0]*Math.log(2));const P=(e,t)=>{let r=o[e-=57344];r&&r.isShared&&((o.restoreStructures||(o.restoreStructures=[]))[e]=r),o[e]=t,t.read=M(t)};g[105]=e=>{let t=e.length,r=e[1];P(e[0],r);let n={};for(let i=2;i<t;i++){n[O(r[i-2])]=e[i]}return n},g[14]=e=>l?l[0].slice(l.position0,l.position0+=e):new R(e,14),g[15]=e=>l?l[1].slice(l.position1,l.position1+=e):new R(e,15);let T={Error:Error,RegExp:RegExp};g[27]=e=>(T[e[0]]||Error)(e[1],e[2]);const F=e=>{if(132!=r[i++])throw new Error("Packed values structure must be followed by a 4 element array");let t=e();return f=f?t.concat(f.slice(t.length)):t,f.prefixes=e(),f.suffixes=e(),e()};function D(e,t){return"string"==typeof e?e+t:e instanceof Array?e.concat(t):Object.assign({},e,t)}function C(){if(!f){if(!h.getShared)throw new Error("No packed values available");H()}return f}F.handlesRead=!0,g[51]=F,g[6]=e=>{if(!f){if(!h.getShared)return new R(e,6);H()}if("number"==typeof e)return f[16+(e>=0?2*e:-2*e-1)];throw new Error("No support for non-integer packed references yet")},g[28]=e=>{u||(u=new Map,u.id=0);let t,n=u.id++;t=r[i]>>5==4?[]:{};let s={target:t};u.set(n,s);let o=e();return s.used?Object.assign(t,o):(s.target=o,o)},g[28].handlesRead=!0,g[29]=e=>{let t=u.get(e);return t.used=!0,t.target},g[258]=e=>new Set(e),(g[259]=e=>(h.mapsAsObjects&&(h.mapsAsObjects=!1,d=!0),e())).handlesRead=!0;b.push(((e,t)=>e>=225&&e<=255?D(C().prefixes[e-224],t):e>=28704&&e<=32767?D(C().prefixes[e-28672],t):e>=1879052288&&e<=2147483647?D(C().prefixes[e-1879048192],t):e>=216&&e<=223?D(t,C().suffixes[e-216]):e>=27647&&e<=28671?D(t,C().suffixes[e-27639]):e>=1811940352&&e<=1879048191?D(t,C().suffixes[e-1811939328]):1399353956==e?{packedValues:f,structures:o.slice(0),version:t}:55799==e?t:void 0));const K=1==new Uint8Array(new Uint16Array([1]).buffer)[0],N=[Uint8Array,Uint8ClampedArray,Uint16Array,Uint32Array,"undefined"==typeof BigUint64Array?{name:"BigUint64Array"}:BigUint64Array,Int8Array,Int16Array,Int32Array,"undefined"==typeof BigInt64Array?{name:"BigInt64Array"}:BigInt64Array,Float32Array,Float64Array],L=[64,68,69,70,71,72,77,78,79,85,86];for(let e=0;e<N.length;e++)z(N[e],L[e]);function z(e,t){let r,n="get"+e.name.slice(0,-5);"function"==typeof e?r=e.BYTES_PER_ELEMENT:e=null;for(let i=0;i<2;i++){if(!i&&1==r)continue;let s=2==r?1:4==r?2:3;g[i?t:t-4]=1==r||i==K?r=>{if(!e)throw new Error("Could not find typed array for code "+t);return new e(Uint8Array.prototype.slice.call(r,0).buffer)}:r=>{if(!e)throw new Error("Could not find typed array for code "+t);let o=new DataView(r.buffer,r.byteOffset,r.byteLength),a=r.length>>s,l=new e(a),u=o[n];for(let e=0;e<a;e++)l[e]=u.call(o,e<<s,i);return l}}}function W(){let e=31&r[i++];if(e>23)switch(e){case 24:e=r[i++];break;case 25:e=c.getUint16(i),i+=2;break;case 26:e=c.getUint32(i),i+=4}return e}function H(){if(h.getShared){let e=Y((()=>(r=null,h.getShared())))||{},t=e.structures||[];h.sharedVersion=e.version,f=h.sharedValues=e.packedValues,!0===o?h.structures=o=t:o.splice.apply(o,[0,t.length].concat(t))}}function Y(e){let t=n,s=i,f=y,d=p,g=a,b=u,w=l,A=new Uint8Array(r.slice(0,n)),v=o,k=h,U=m,I=e();return n=t,i=s,y=f,p=d,a=g,u=b,l=w,r=A,m=U,o=v,h=k,c=new DataView(r.buffer,r.byteOffset,r.byteLength),I}function J(){r=null,u=null,o=null}const $=new Array(147);for(let e=0;e<256;e++)$[e]=+("1e"+Math.floor(45.15-.30103*e));let Z=new k({useRecords:!1});const q=Z.decode,G=Z.decodeMultiple,Q={NEVER:0,ALWAYS:1,DECIMAL_ROUND:3,DECIMAL_FIT:4};let X,ee,te;try{X=new TextEncoder}catch(e){}const re="object"==typeof globalThis&&globalThis.Buffer,ne=void 0!==re,ie=ne?re.allocUnsafeSlow:Uint8Array,se=ne?re:Uint8Array,oe=ne?4294967296:2144337920;let ae,le,ue,fe,ce=0,de=null;const he=/[\u0080-\uFFFF]/,ye=Symbol("record-id");class pe extends k{constructor(e){let t,r,n,i,s;super(e),this.offset=0,e=e||{};let o=se.prototype.utf8Write?function(e,t,r){return le.utf8Write(e,t,r)}:!(!X||!X.encodeInto)&&function(e,t){return X.encodeInto(e,le.subarray(t)).written},a=this,l=e.structures||e.saveStructures,u=e.maxSharedStructures;if(null==u&&(u=l?128:0),u>8190)throw new Error("Maximum maxSharedStructure is 8190");let f=e.sequential;f&&(u=0),this.structures||(this.structures=[]),this.saveStructures&&(this.saveShared=this.saveStructures);let c,d,h,y=e.sharedValues;if(y){h=Object.create(null);for(let e=0,t=y.length;e<t;e++)h[y[e]]=e}let p=[],g=0,b=0;this.mapEncode=function(e,t){if(this._keyMap&&!this._mapped&&"Array"===e.constructor.name)e=e.map((e=>this.encodeKeys(e)));return this.encode(e,t)},this.encode=function(o,l){if(le||(le=new ie(8192),ue=new DataView(le.buffer,0,8192),ce=0),fe=le.length-10,fe-ce<2048?(le=new ie(le.length),ue=new DataView(le.buffer,0,le.length),fe=le.length-10,ce=0):l===Re&&(ce=ce+7&2147483640),t=ce,a.useSelfDescribedHeader&&(ue.setUint32(ce,3654940416),ce+=3),s=a.structuredClone?new Map:null,a.bundleStrings&&"string"!=typeof o?(de=[],de.size=1/0):de=null,r=a.structures,r){if(r.uninitialized){let e=a.getShared()||{};a.structures=r=e.structures||[],a.sharedVersion=e.version;let t=a.sharedValues=e.packedValues;if(t){h={};for(let e=0,r=t.length;e<r;e++)h[t[e]]=e}}let e=r.length;if(e>u&&!f&&(e=u),!r.transitions){r.transitions=Object.create(null);for(let t=0;t<e;t++){let e=r[t];if(!e)continue;let n,i=r.transitions;for(let r=0,s=e.length;r<s;r++){void 0===i[ye]&&(i[ye]=t);let s=e[r];n=i[s],n||(n=i[s]=Object.create(null)),i=n}i[ye]=1048576|t}}f||(r.nextId=e)}if(n&&(n=!1),i=r||[],d=h,e.pack){let t=new Map;if(t.values=[],t.encoder=a,t.maxValues=e.maxPrivatePackedValues||(h?16:1/0),t.objectMap=h||!1,t.samplingPackedValues=c,ve(o,t),t.values.length>0){le[ce++]=216,le[ce++]=51,we(4);let e=t.values;w(e),we(0),we(0),d=Object.create(h||null);for(let t=0,r=e.length;t<r;t++)d[e[t]]=t}}ae=l&Te;try{if(ae)return;if(w(o),de&&Ee(t,w),a.offset=ce,s&&s.idsToInsert){ce+=2*s.idsToInsert.length,ce>fe&&A(ce),a.offset=ce;let e=function(e,t){let r,n=2*t.length,i=e.length-n;t.sort(((e,t)=>e.offset>t.offset?1:-1));for(let r=0;r<t.length;r++){let n=t[r];n.id=r;for(let t of n.references)e[t++]=r>>8,e[t]=255&r}for(;r=t.pop();){let t=r.offset;e.copyWithin(t+n,t,i),n-=2;let s=t+n;e[s++]=216,e[s++]=28,i=t}return e}(le.subarray(t,ce),s.idsToInsert);return s=null,e}return l&Re?(le.start=t,le.end=ce,le):le.subarray(t,ce)}finally{if(r)if(b<10&&b++,r.length>u&&(r.length=u),g>1e4)r.transitions=null,b=0,g=0,p.length>0&&(p=[]);else if(p.length>0&&!f){for(let e=0,t=p.length;e<t;e++)p[e][ye]=void 0;p=[]}if(n&&a.saveShared){a.structures.length>u&&(a.structures=a.structures.slice(0,u));let e=le.subarray(t,ce);return!1===a.updateSharedData()?a.encode(o):e}l&Pe&&(ce=t)}},this.findCommonStringsToPack=()=>(c=new Map,h||(h=Object.create(null)),e=>{let t=e&&e.threshold||4,r=this.pack?e.maxPrivatePackedValues||16:0;y||(y=this.sharedValues=[]);for(let[e,i]of c)i.count>t&&(h[e]=r++,y.push(e),n=!0);for(;this.saveShared&&!1===this.updateSharedData(););c=null});const w=r=>{ce>fe&&(le=A(ce));var n,i=typeof r;if("string"===i){if(d){let t=d[r];if(t>=0)return void(t<16?le[ce++]=t+224:(le[ce++]=198,w(1&t?15-t>>1:t-16>>1)));if(c&&!e.pack){let e=c.get(r);e?e.count++:c.set(r,{count:1})}}let i,s=r.length;if(de&&s>=4&&s<1024){if((de.size+=s)>61440){let e,r=(de[0]?3*de[0].length+de[1].length:0)+10;ce+r>fe&&(le=A(ce+r)),le[ce++]=217,le[ce++]=223,le[ce++]=249,le[ce++]=de.position?132:130,le[ce++]=26,e=ce-t,ce+=4,de.position&&Ee(t,w),de=["",""],de.size=0,de.position=e}let e=he.test(r);return de[e?0:1]+=r,le[ce++]=e?206:207,void w(s)}i=s<32?1:s<256?2:s<65536?3:5;let a=3*s;if(ce+a>fe&&(le=A(ce+a)),s<64||!o){let e,t,o,a=ce+i;for(e=0;e<s;e++)t=r.charCodeAt(e),t<128?le[a++]=t:t<2048?(le[a++]=t>>6|192,le[a++]=63&t|128):55296==(64512&t)&&56320==(64512&(o=r.charCodeAt(e+1)))?(t=65536+((1023&t)<<10)+(1023&o),e++,le[a++]=t>>18|240,le[a++]=t>>12&63|128,le[a++]=t>>6&63|128,le[a++]=63&t|128):(le[a++]=t>>12|224,le[a++]=t>>6&63|128,le[a++]=63&t|128);n=a-ce-i}else n=o(r,ce+i,a);n<24?le[ce++]=96|n:n<256?(i<2&&le.copyWithin(ce+2,ce+1,ce+1+n),le[ce++]=120,le[ce++]=n):n<65536?(i<3&&le.copyWithin(ce+3,ce+2,ce+2+n),le[ce++]=121,le[ce++]=n>>8,le[ce++]=255&n):(i<5&&le.copyWithin(ce+5,ce+3,ce+3+n),le[ce++]=122,ue.setUint32(ce,n),ce+=4),ce+=n}else if("number"===i)if(this.alwaysUseFloat||r>>>0!==r)if(this.alwaysUseFloat||r>>0!==r){let e;if((e=this.useFloat32)>0&&r<4294967296&&r>=-2147483648){let t;if(le[ce++]=250,ue.setFloat32(ce,r),e<4||(t=r*$[(127&le[ce])<<1|le[ce+1]>>7])>>0===t)return void(ce+=4);ce--}le[ce++]=251,ue.setFloat64(ce,r),ce+=8}else r>=-24?le[ce++]=31-r:r>=-256?(le[ce++]=56,le[ce++]=~r):r>=-65536?(le[ce++]=57,ue.setUint16(ce,~r),ce+=2):(le[ce++]=58,ue.setUint32(ce,~r),ce+=4);else r<24?le[ce++]=r:r<256?(le[ce++]=24,le[ce++]=r):r<65536?(le[ce++]=25,le[ce++]=r>>8,le[ce++]=255&r):(le[ce++]=26,ue.setUint32(ce,r),ce+=4);else if("object"===i)if(r){if(s){let e=s.get(r);if(e){if(le[ce++]=216,le[ce++]=29,le[ce++]=25,!e.references){let t=s.idsToInsert||(s.idsToInsert=[]);e.references=[],t.push(e)}return e.references.push(ce-t),void(ce+=2)}s.set(r,{offset:ce-t})}let e=r.constructor;if(e===Object)m(r,!0);else if(e===Array){(n=r.length)<24?le[ce++]=128|n:we(n);for(let e=0;e<n;e++)w(r[e])}else if(e===Map)if((this.mapsAsObjects?!1!==this.useTag259ForMaps:this.useTag259ForMaps)&&(le[ce++]=217,le[ce++]=1,le[ce++]=3),(n=r.size)<24?le[ce++]=160|n:n<256?(le[ce++]=184,le[ce++]=n):n<65536?(le[ce++]=185,le[ce++]=n>>8,le[ce++]=255&n):(le[ce++]=186,ue.setUint32(ce,n),ce+=4),a.keyMap)for(let[e,t]of r)w(a.encodeKey(e)),w(t);else for(let[e,t]of r)w(e),w(t);else{for(let e=0,t=ee.length;e<t;e++){if(r instanceof te[e]){let t=ee[e],n=t.tag;return null==n&&(n=t.getTag&&t.getTag.call(this,r)),n<24?le[ce++]=192|n:n<256?(le[ce++]=216,le[ce++]=n):n<65536?(le[ce++]=217,le[ce++]=n>>8,le[ce++]=255&n):n>-1&&(le[ce++]=218,ue.setUint32(ce,n),ce+=4),void t.encode.call(this,r,w,A)}}if(r[Symbol.iterator]){if(ae){let e=new Error("Iterable should be serialized as iterator");throw e.iteratorNotHandled=!0,e}le[ce++]=159;for(let e of r)w(e);return void(le[ce++]=255)}if(r[Symbol.asyncIterator]||Ae(r)){let e=new Error("Iterable/blob should be serialized as iterator");throw e.iteratorNotHandled=!0,e}m(r,!r.hasOwnProperty)}}else le[ce++]=246;else if("boolean"===i)le[ce++]=r?245:244;else if("bigint"===i){if(r<BigInt(1)<<BigInt(64)&&r>=0)le[ce++]=27,ue.setBigUint64(ce,r);else if(r>-(BigInt(1)<<BigInt(64))&&r<0)le[ce++]=59,ue.setBigUint64(ce,-r-BigInt(1));else{if(!this.largeBigIntToFloat)throw new RangeError(r+" was too large to fit in CBOR 64-bit integer format, set largeBigIntToFloat to convert to float-64");le[ce++]=251,ue.setFloat64(ce,Number(r))}ce+=8}else{if("undefined"!==i)throw new Error("Unknown type: "+i);le[ce++]=247}},m=!1===this.useRecords?this.variableMapSize?e=>{let t=Object.keys(e),r=Object.values(e),n=t.length;if(n<24?le[ce++]=160|n:n<256?(le[ce++]=184,le[ce++]=n):n<65536?(le[ce++]=185,le[ce++]=n>>8,le[ce++]=255&n):(le[ce++]=186,ue.setUint32(ce,n),ce+=4),a.keyMap)for(let e=0;e<n;e++)w(encodeKey(t[e])),w(r[e]);else for(let e=0;e<n;e++)w(t[e]),w(r[e])}:(e,r)=>{le[ce++]=185;let n=ce-t;ce+=2;let i=0;if(a.keyMap)for(let t in e)(r||e.hasOwnProperty(t))&&(w(a.encodeKey(t)),w(e[t]),i++);else for(let t in e)(r||e.hasOwnProperty(t))&&(w(t),w(e[t]),i++);le[n+++t]=i>>8,le[n+t]=255&i}:(e,t)=>{let r,s,o,a=i.transitions||(i.transitions=Object.create(null)),l=0,f=0;if(this.keyMap){o=Object.keys(e).map((e=>this.encodeKey(e))),f=o.length;for(let e=0;e<f;e++){let t=o[e];r=a[t],r||(r=a[t]=Object.create(null),l++),a=r}}else for(let n in e)(t||e.hasOwnProperty(n))&&(r=a[n],r||(1048576&a[ye]&&(s=65535&a[ye]),r=a[n]=Object.create(null),l++),a=r,f++);let c=a[ye];if(void 0!==c)c&=65535,le[ce++]=217,le[ce++]=c>>8|224,le[ce++]=255&c;else{if(o||(o=a.__keys__||(a.__keys__=Object.keys(e))),void 0===s?(c=i.nextId++,c||(c=0,i.nextId=1),c>=256&&(i.nextId=(c=u)+1)):c=s,i[c]=o,!(c<u)){if(a[ye]=c,ue.setUint32(ce,3655335680),ce+=3,l&&(g+=b*l),p.length>=256-u&&(p.shift()[ye]=void 0),p.push(a),we(f+2),w(57344+c),w(o),null===t)return;for(let r in e)(t||e.hasOwnProperty(r))&&w(e[r]);return}le[ce++]=217,le[ce++]=c>>8|224,le[ce++]=255&c,a=i.transitions;for(let e=0;e<f;e++)(void 0===a[ye]||1048576&a[ye])&&(a[ye]=c),a=a[o[e]];a[ye]=1048576|c,n=!0}if(f<24?le[ce++]=128|f:we(f),null!==t)for(let r in e)(t||e.hasOwnProperty(r))&&w(e[r])},A=e=>{let r;if(e>16777216){if(e-t>oe)throw new Error("Encoded buffer would be larger than maximum buffer size");r=Math.min(oe,4096*Math.round(Math.max((e-t)*(e>67108864?1.25:2),4194304)/4096))}else r=1+(Math.max(e-t<<2,le.length-1)>>12)<<12;let n=new ie(r);return ue=new DataView(n.buffer,0,r),le.copy?le.copy(n,0,t,e):n.set(le.slice(t,e)),ce-=t,t=0,fe=n.length-10,le=n};let v=100,k=1e3;function*U(e,r,n){let i=e.constructor;if(i===Object){let t=!1!==a.useRecords;t?m(e,null):ge(Object.keys(e).length,160);for(let n in e){let i=e[n];t||w(n),i&&"object"==typeof i?r[n]?yield*U(i,r[n]):yield*I(i,r,n):w(i)}}else if(i===Array){let n=e.length;we(n);for(let i=0;i<n;i++){let n=e[i];n&&("object"==typeof n||ce-t>v)?r.element?yield*U(n,r.element):yield*I(n,r,"element"):w(n)}}else if(e[Symbol.iterator]){le[ce++]=159;for(let n of e)n&&("object"==typeof n||ce-t>v)?r.element?yield*U(n,r.element):yield*I(n,r,"element"):w(n);le[ce++]=255}else Ae(e)?(ge(e.size,64),yield le.subarray(t,ce),yield e,E()):e[Symbol.asyncIterator]?(le[ce++]=159,yield le.subarray(t,ce),yield e,E(),le[ce++]=255):w(e);n&&ce>t?yield le.subarray(t,ce):ce-t>v&&(yield le.subarray(t,ce),E())}function*I(e,r,n){let i=ce-t;try{w(e),ce-t>v&&(yield le.subarray(t,ce),E())}catch(s){if(!s.iteratorNotHandled)throw s;r[n]={},ce=t+i,yield*U.call(this,e,r[n])}}function E(){v=k,a.encode(null,Te)}function M(e,t,r){return v=t&&t.chunkThreshold?k=t.chunkThreshold:100,e&&"object"==typeof e?(a.encode(null,Te),r(e,a.iterateProperties||(a.iterateProperties={}),!0)):[a.encode(e)]}async function*O(e,t){for(let r of U(e,t,!0)){let e=r.constructor;if(e===se||e===Uint8Array)yield r;else if(Ae(r)){let e,t=r.stream().getReader();for(;!(e=await t.read()).done;)yield e.value}else if(r[Symbol.asyncIterator])for await(let e of r)E(),e?yield*O(e,t.async||(t.async={})):yield a.encode(e);else yield r}}this.encodeAsIterable=function(e,t){return M(e,t,U)},this.encodeAsAsyncIterable=function(e,t){return M(e,t,O)}}useBuffer(e){le=e,ue=new DataView(le.buffer,le.byteOffset,le.byteLength),ce=0}clearSharedData(){this.structures&&(this.structures=[]),this.sharedValues&&(this.sharedValues=void 0)}updateSharedData(){let e=this.sharedVersion||0;this.sharedVersion=e+1;let t=this.structures.slice(0),r=new be(t,this.sharedValues,this.sharedVersion),n=this.saveShared(r,(t=>(t&&t.version||0)==e));return!1===n?(r=this.getShared()||{},this.structures=r.structures||[],this.sharedValues=r.packedValues,this.sharedVersion=r.version,this.structures.nextId=this.structures.length):t.forEach(((e,t)=>this.structures[t]=e)),n}}function ge(e,t){e<24?le[ce++]=t|e:e<256?(le[ce++]=24|t,le[ce++]=e):e<65536?(le[ce++]=25|t,le[ce++]=e>>8,le[ce++]=255&e):(le[ce++]=26|t,ue.setUint32(ce,e),ce+=4)}class be{constructor(e,t,r){this.structures=e,this.packedValues=t,this.version=r}}function we(e){e<24?le[ce++]=128|e:e<256?(le[ce++]=152,le[ce++]=e):e<65536?(le[ce++]=153,le[ce++]=e>>8,le[ce++]=255&e):(le[ce++]=154,ue.setUint32(ce,e),ce+=4)}const me="undefined"==typeof Blob?function(){}:Blob;function Ae(e){if(e instanceof me)return!0;let t=e[Symbol.toStringTag];return"Blob"===t||"File"===t}function ve(e,t){switch(typeof e){case"string":if(e.length>3){if(t.objectMap[e]>-1||t.values.length>=t.maxValues)return;let r=t.get(e);if(r)2==++r.count&&t.values.push(e);else if(t.set(e,{count:1}),t.samplingPackedValues){let r=t.samplingPackedValues.get(e);r?r.count++:t.samplingPackedValues.set(e,{count:1})}}break;case"object":if(e)if(e instanceof Array)for(let r=0,n=e.length;r<n;r++)ve(e[r],t);else{let n=!t.encoder.useRecords;for(var r in e)e.hasOwnProperty(r)&&(n&&ve(r,t),ve(e[r],t))}break;case"function":console.log(e)}}const ke=1==new Uint8Array(new Uint16Array([1]).buffer)[0];function Ue(e,t){return!ke&&t>1&&(e-=4),{tag:e,encode:function(e,t){let r=e.byteLength,n=e.byteOffset||0,i=e.buffer||e;t(ne?re.from(i,n,r):new Uint8Array(i,n,r))}}}function Ie(e,t){let r=e.byteLength;r<24?le[ce++]=64+r:r<256?(le[ce++]=88,le[ce++]=r):r<65536?(le[ce++]=89,le[ce++]=r>>8,le[ce++]=255&r):(le[ce++]=90,ue.setUint32(ce,r),ce+=4),ce+r>=le.length&&t(ce+r),le.set(e.buffer?e:new Uint8Array(e),ce),ce+=r}function Ee(e,t){ue.setUint32(de.position+e,ce-de.position-e+1);let r=de;de=null,t(r[0]),t(r[1])}te=[Date,Set,Error,RegExp,R,ArrayBuffer,Uint8Array,Uint8ClampedArray,Uint16Array,Uint32Array,"undefined"==typeof BigUint64Array?function(){}:BigUint64Array,Int8Array,Int16Array,Int32Array,"undefined"==typeof BigInt64Array?function(){}:BigInt64Array,Float32Array,Float64Array,be],ee=[{tag:1,encode(e,t){let r=e.getTime()/1e3;(this.useTimestamp32||0===e.getMilliseconds())&&r>=0&&r<4294967296?(le[ce++]=26,ue.setUint32(ce,r),ce+=4):(le[ce++]=251,ue.setFloat64(ce,r),ce+=8)}},{tag:258,encode(e,t){t(Array.from(e))}},{tag:27,encode(e,t){t([e.name,e.message])}},{tag:27,encode(e,t){t(["RegExp",e.source,e.flags])}},{getTag:e=>e.tag,encode(e,t){t(e.value)}},{encode(e,t,r){Ie(e,r)}},{getTag(e){if(e.constructor===Uint8Array&&(this.tagUint8Array||ne&&!1!==this.tagUint8Array))return 64},encode(e,t,r){Ie(e,r)}},Ue(68,1),Ue(69,2),Ue(70,4),Ue(71,8),Ue(72,1),Ue(77,2),Ue(78,4),Ue(79,8),Ue(85,4),Ue(86,8),{encode(e,t){let r=e.packedValues||[],n=e.structures||[];if(r.values.length>0){le[ce++]=216,le[ce++]=51,we(4);let e=r.values;t(e),we(0),we(0),packedObjectMap=Object.create(sharedPackedObjectMap||null);for(let t=0,r=e.length;t<r;t++)packedObjectMap[e[t]]=t}if(n){ue.setUint32(ce,3655335424),ce+=3;let r=n.slice(0);r.unshift(57344),r.push(new R(e.version,1399353956)),t(r)}else t(new R(e.version,1399353956))}}];let Me=new pe({useRecords:!1});const Oe=Me.encode,Se=Me.encodeAsIterable,je=Me.encodeAsAsyncIterable,{NEVER:xe,ALWAYS:Be,DECIMAL_ROUND:Ve,DECIMAL_FIT:_e}=Q,Re=512,Pe=1024,Te=2048;e.ALWAYS=Be,e.DECIMAL_FIT=_e,e.DECIMAL_ROUND=Ve,e.Decoder=k,e.Encoder=pe,e.FLOAT32_OPTIONS=Q,e.NEVER=xe,e.REUSE_BUFFER_MODE=Re,e.Tag=R,e.addExtension=function(e){if(e.Class){if(!e.encode)throw new Error("Extension has no encode function");te.unshift(e.Class),ee.unshift(e)}!function(e){g[e.tag]=e.decode}(e)},e.clearSource=J,e.decode=q,e.decodeIter=function(e,t={}){if(!e||"object"!=typeof e)throw new Error("first argument must be an Iterable, Async Iterable, Iterator, Async Iterator, or a promise");const r=new k(t);let n;const i=e=>{let t;n&&(e=Buffer.concat([n,e]),n=void 0);try{t=r.decodeMultiple(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},e.decodeMultiple=G,e.encode=Oe,e.encodeAsAsyncIterable=je,e.encodeAsIterable=Se,e.encodeIter=function(e,t={}){if(e&&"object"==typeof e){if("function"==typeof e[Symbol.iterator])return function*(e,t){const r=new pe(t);for(const t of e)yield r.encode(t)}(e,t);if("function"==typeof e.then||"function"==typeof e[Symbol.asyncIterator])return async function*(e,t){const r=new pe(t);for await(const t of e)yield r.encode(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.isNativeAccelerationEnabled=!1,e.roundFloat32=function(e){V[0]=e;let t=$[(127&_[3])<<1|_[2]>>7];return(t*e+(e>0?.5:-.5)>>0)/t}}));
!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).CBOR={})}(this,(function(e){"use strict";let t,r,n;try{t=new TextDecoder}catch(e){}let i=0;const s={};let o,a,l,u,f,c,d,h={},y=0,p=0,g=[],b=[],w={useRecords:!1,mapsAsObjects:!0},m=!1,A=2;var v;try{new v("")}catch(e){A=1/0}class k{constructor(e){if(e&&(!e.keyMap&&!e._keyMap||e.useRecords||(e.useRecords=!1,e.mapsAsObjects=!0),!1===e.useRecords&&void 0===e.mapsAsObjects&&(e.mapsAsObjects=!0),e.getStructures&&(e.getShared=e.getStructures),e.getShared&&!e.structures&&((e.structures=[]).uninitialized=!0),e.keyMap)){this.mapKey=new Map;for(let[t,r]of Object.entries(e.keyMap))this.mapKey.set(r,t)}Object.assign(this,e)}decodeKey(e){return this.keyMap&&this.mapKey.get(e)||e}encodeKey(e){return this.keyMap&&this.keyMap.hasOwnProperty(e)?this.keyMap[e]:e}encodeKeys(e){if(!this._keyMap)return e;let t=new Map;for(let[r,n]of Object.entries(e))t.set(this._keyMap.hasOwnProperty(r)?this._keyMap[r]:r,n);return t}decodeKeys(e){if(!this._keyMap||"Map"!=e.constructor.name)return e;if(!this._mapKey){this._mapKey=new Map;for(let[e,t]of Object.entries(this._keyMap))this._mapKey.set(t,e)}let t={};return e.forEach(((e,r)=>t[O(this._mapKey.has(r)?this._mapKey.get(r):r)]=e)),t}mapDecode(e,t){let r=this.decode(e);return this._keyMap&&"Array"===r.constructor.name?r.map((e=>this.decodeKeys(e))):r}decode(e,t){if(r)return H((()=>(Y(),this?this.decode(e,t):k.prototype.decode.call(w,e,t))));n=t>-1?t:e.length,i=0,p=0,a=null,l=null,r=e;try{c=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 k){if(h=this,f=this.sharedValues&&(this.pack?new Array(this.maxPrivatePackedValues||16).concat(this.sharedValues):this.sharedValues),this.structures)return o=this.structures,U();(!o||o.length>0)&&(o=[])}else h=w,(!o||o.length>0)&&(o=[]),f=null;return U()}decodeMultiple(e,t){let r,n=0;try{let s=e.length;m=!0;let o=this?this.decode(e,s):Z.decode(e,s);if(!t){for(r=[o];i<s;)n=i,r.push(U());return r}if(!1===t(o))return;for(;i<s;)if(n=i,!1===t(U()))return}catch(e){throw e.lastPosition=n,e.values=r,e}finally{m=!1,Y()}}}function U(){try{let e=I();if(l){if(i>=l.postBundlePosition){let e=new Error("Unexpected bundle position");throw e.incomplete=!0,e}i=l.postBundlePosition,l=null}if(i==n)o=null,r=null,u&&(u=null);else{if(i>n){let e=new Error("Unexpected end of CBOR data");throw e.incomplete=!0,e}if(!m)throw new Error("Data read, but end of buffer not reached")}return e}catch(e){throw Y(),(e instanceof RangeError||e.message.startsWith("Unexpected end of buffer"))&&(e.incomplete=!0),e}}function I(){let e=r[i++],t=e>>5;if(e&=31,e>23)switch(e){case 24:e=r[i++];break;case 25:if(7==t)return function(){let e=r[i++],t=r[i++],n=(127&e)>>2;if(31===n)return t||3&e?NaN:128&e?-1/0:1/0;if(0===n){let r=((3&e)<<8|t)/(1<<24);return 128&e?-r:r}return _[3]=128&e|56+(n>>1),_[2]=(7&e)<<5|t>>3,_[1]=t<<5,_[0]=0,V[0]}();e=c.getUint16(i),i+=2;break;case 26:if(7==t){let e=c.getFloat32(i);if(h.useFloat32>2){let t=$[(127&r[i])<<1|r[i+1]>>7];return i+=4,(t*e+(e>0?.5:-.5)>>0)/t}return i+=4,e}e=c.getUint32(i),i+=4;break;case 27:if(7==t){let e=c.getFloat64(i);return i+=8,e}if(t>1){if(c.getUint32(i)>0)throw new Error("JavaScript does not support arrays, maps, or strings with length over 4294967295");e=c.getUint32(i+4)}else h.int64AsNumber?(e=4294967296*c.getUint32(i),e+=c.getUint32(i+4)):e=c.getBigUint64(i);i+=8;break;case 31:switch(t){case 2:case 3:throw new Error("Indefinite length not supported for byte or text strings");case 4:let e,r=[],n=0;for(;(e=I())!=s;)r[n++]=e;return 4==t?r:3==t?r.join(""):Buffer.concat(r);case 5:let i;if(h.mapsAsObjects){let e={};if(h.keyMap)for(;(i=I())!=s;)e[O(h.decodeKey(i))]=I();else for(;(i=I())!=s;)e[O(i)]=I();return e}{d&&(h.mapsAsObjects=!0,d=!1);let e=new Map;if(h.keyMap)for(;(i=I())!=s;)e.set(h.decodeKey(i),I());else for(;(i=I())!=s;)e.set(i,I());return e}case 7:return s;default:throw new Error("Invalid major type for indefinite length "+t)}default:throw new Error("Unknown token "+e)}switch(t){case 0:return e;case 1:return~e;case 2:return u=e,h.copyBuffers?Uint8Array.prototype.slice.call(r,i,i+=u):r.subarray(i,i+=u);case 3:if(p>=i)return a.slice(i-y,(i+=e)-y);if(0==p&&n<140&&e<32){let t=e<16?B(e):function(e){let t=i,n=new Array(e);for(let s=0;s<e;s++){const e=r[i++];if((128&e)>0)return void(i=t);n[s]=e}return x.apply(String,n)}(e);if(null!=t)return t}return S(e);case 4:let t=new Array(e);for(let r=0;r<e;r++)t[r]=I();return t;case 5:if(h.mapsAsObjects){let t={};if(h.keyMap)for(let r=0;r<e;r++)t[O(h.decodeKey(I()))]=I();else for(let r=0;r<e;r++)t[O(I())]=I();return t}{d&&(h.mapsAsObjects=!0,d=!1);let t=new Map;if(h.keyMap)for(let r=0;r<e;r++)t.set(h.decodeKey(I()),I());else for(let r=0;r<e;r++)t.set(I(),I());return t}case 6:if(e>=57337){let t=o[8191&e];if(t)return t.read||(t.read=M(t)),t.read();if(e<65536){if(57343==e){let e=W(),t=I(),r=I();T(t,r);let n={};if(h.keyMap)for(let t=2;t<e;t++){n[O(h.decodeKey(r[t-2]))]=I()}else for(let t=2;t<e;t++){n[O(r[t-2])]=I()}return n}if(57342==e){let e=W(),t=I();for(let r=2;r<e;r++)T(t++,I());return I()}if(57337==e)return function(){let e=W(),t=i+I();for(let t=2;t<e;t++){let e=W();i+=e}let r=i;return i=t,l=[j(W()),j(W())],l.position0=0,l.position1=0,l.postBundlePosition=i,i=r,I()}();if(h.getShared&&(J(),t=o[8191&e],t))return t.read||(t.read=M(t)),t.read()}}let s=g[e];if(s)return s.handlesRead?s(I):s(I());{let t=I();for(let r=0;r<b.length;r++){let n=b[r](e,t);if(void 0!==n)return n}return new R(t,e)}case 7:switch(e){case 20:return!1;case 21:return!0;case 22:return null;case 23:return;default:let t=(f||C())[e];if(void 0!==t)return t;throw new Error("Unknown token "+e)}default:if(isNaN(e)){let e=new Error("Unexpected end of CBOR data");throw e.incomplete=!0,e}throw new Error("Unknown CBOR token "+e)}var u}const E=/^[a-zA-Z_$][a-zA-Z\d_$]*$/;function M(e){return e.slowReads=0,function(){let e=r[i++];if(e&=31,e>23)switch(e){case 24:e=r[i++];break;case 25:e=c.getUint16(i),i+=2;break;case 26:e=c.getUint32(i),i+=4;break;default:throw new Error("Expected array header, but got "+r[i-1])}let t=this.compiledReader;for(;t;){if(t.propertyCount===e)return t(I);t=t.next}if(this.slowReads++>=A){let r=this.length==e?this:this.slice(0,e);return t=h.keyMap?new v("r","return {"+r.map((e=>h.decodeKey(e))).map((e=>E.test(e)?O(e)+":r()":"["+JSON.stringify(e)+"]:r()")).join(",")+"}"):new v("r","return {"+r.map((e=>E.test(e)?O(e)+":r()":"["+JSON.stringify(e)+"]:r()")).join(",")+"}"),this.compiledReader&&(t.next=this.compiledReader),t.propertyCount=e,this.compiledReader=t,t(I)}let n={};if(h.keyMap)for(let t=0;t<e;t++)n[O(h.decodeKey(this[t]))]=I();else for(let t=0;t<e;t++)n[O(this[t])]=I();return n}}function O(e){return"__proto__"===e?"__proto_":e}let S=j;function j(e){let n;if(e<16&&(n=B(e)))return n;if(e>64&&t)return t.decode(r.subarray(i,i+=e));const s=i+e,o=[];for(n="";i<s;){const e=r[i++];if(0==(128&e))o.push(e);else if(192==(224&e)){const t=63&r[i++];o.push((31&e)<<6|t)}else if(224==(240&e)){const t=63&r[i++],n=63&r[i++];o.push((31&e)<<12|t<<6|n)}else if(240==(248&e)){let t=(7&e)<<18|(63&r[i++])<<12|(63&r[i++])<<6|63&r[i++];t>65535&&(t-=65536,o.push(t>>>10&1023|55296),t=56320|1023&t),o.push(t)}else o.push(e);o.length>=4096&&(n+=x.apply(String,o),o.length=0)}return o.length>0&&(n+=x.apply(String,o)),n}let x=String.fromCharCode;function B(e){if(e<4){if(e<2){if(0===e)return"";{let e=r[i++];return(128&e)>1?void(i-=1):x(e)}}{let t=r[i++],n=r[i++];if((128&t)>0||(128&n)>0)return void(i-=2);if(e<3)return x(t,n);let s=r[i++];return(128&s)>0?void(i-=3):x(t,n,s)}}{let t=r[i++],n=r[i++],s=r[i++],o=r[i++];if((128&t)>0||(128&n)>0||(128&s)>0||(128&o)>0)return void(i-=4);if(e<6){if(4===e)return x(t,n,s,o);{let e=r[i++];return(128&e)>0?void(i-=5):x(t,n,s,o,e)}}if(e<8){let a=r[i++],l=r[i++];if((128&a)>0||(128&l)>0)return void(i-=6);if(e<7)return x(t,n,s,o,a,l);let u=r[i++];return(128&u)>0?void(i-=7):x(t,n,s,o,a,l,u)}{let a=r[i++],l=r[i++],u=r[i++],f=r[i++];if((128&a)>0||(128&l)>0||(128&u)>0||(128&f)>0)return void(i-=8);if(e<10){if(8===e)return x(t,n,s,o,a,l,u,f);{let e=r[i++];return(128&e)>0?void(i-=9):x(t,n,s,o,a,l,u,f,e)}}if(e<12){let c=r[i++],d=r[i++];if((128&c)>0||(128&d)>0)return void(i-=10);if(e<11)return x(t,n,s,o,a,l,u,f,c,d);let h=r[i++];return(128&h)>0?void(i-=11):x(t,n,s,o,a,l,u,f,c,d,h)}{let c=r[i++],d=r[i++],h=r[i++],y=r[i++];if((128&c)>0||(128&d)>0||(128&h)>0||(128&y)>0)return void(i-=12);if(e<14){if(12===e)return x(t,n,s,o,a,l,u,f,c,d,h,y);{let e=r[i++];return(128&e)>0?void(i-=13):x(t,n,s,o,a,l,u,f,c,d,h,y,e)}}{let p=r[i++],g=r[i++];if((128&p)>0||(128&g)>0)return void(i-=14);if(e<15)return x(t,n,s,o,a,l,u,f,c,d,h,y,p,g);let b=r[i++];return(128&b)>0?void(i-=15):x(t,n,s,o,a,l,u,f,c,d,h,y,p,g,b)}}}}}let V=new Float32Array(1),_=new Uint8Array(V.buffer,0,4);new Array(4096);class R{constructor(e,t){this.value=e,this.tag=t}}g[0]=e=>new Date(e),g[1]=e=>new Date(Math.round(1e3*e)),g[2]=e=>{let t=BigInt(0);for(let r=0,n=e.byteLength;r<n;r++)t=BigInt(e[r])+t<<BigInt(8);return t},g[3]=e=>BigInt(-1)-g[2](e),g[4]=e=>+(e[1]+"e"+e[0]),g[5]=e=>e[1]*Math.exp(e[0]*Math.log(2));const T=(e,t)=>{let r=o[e-=57344];r&&r.isShared&&((o.restoreStructures||(o.restoreStructures=[]))[e]=r),o[e]=t,t.read=M(t)};g[105]=e=>{let t=e.length,r=e[1];T(e[0],r);let n={};for(let i=2;i<t;i++){n[O(r[i-2])]=e[i]}return n},g[14]=e=>l?l[0].slice(l.position0,l.position0+=e):new R(e,14),g[15]=e=>l?l[1].slice(l.position1,l.position1+=e):new R(e,15);let P={Error:Error,RegExp:RegExp};g[27]=e=>(P[e[0]]||Error)(e[1],e[2]);const F=e=>{if(132!=r[i++])throw new Error("Packed values structure must be followed by a 4 element array");let t=e();return f=f?t.concat(f.slice(t.length)):t,f.prefixes=e(),f.suffixes=e(),e()};function D(e,t){return"string"==typeof e?e+t:e instanceof Array?e.concat(t):Object.assign({},e,t)}function C(){if(!f){if(!h.getShared)throw new Error("No packed values available");J()}return f}F.handlesRead=!0,g[51]=F,g[6]=e=>{if(!f){if(!h.getShared)return new R(e,6);J()}if("number"==typeof e)return f[16+(e>=0?2*e:-2*e-1)];throw new Error("No support for non-integer packed references yet")},g[28]=e=>{u||(u=new Map,u.id=0);let t,n=u.id++;t=r[i]>>5==4?[]:{};let s={target:t};u.set(n,s);let o=e();return s.used?Object.assign(t,o):(s.target=o,o)},g[28].handlesRead=!0,g[29]=e=>{let t=u.get(e);return t.used=!0,t.target},g[258]=e=>new Set(e),(g[259]=e=>(h.mapsAsObjects&&(h.mapsAsObjects=!1,d=!0),e())).handlesRead=!0;b.push(((e,t)=>e>=225&&e<=255?D(C().prefixes[e-224],t):e>=28704&&e<=32767?D(C().prefixes[e-28672],t):e>=1879052288&&e<=2147483647?D(C().prefixes[e-1879048192],t):e>=216&&e<=223?D(t,C().suffixes[e-216]):e>=27647&&e<=28671?D(t,C().suffixes[e-27639]):e>=1811940352&&e<=1879048191?D(t,C().suffixes[e-1811939328]):1399353956==e?{packedValues:f,structures:o.slice(0),version:t}:55799==e?t:void 0));const K=1==new Uint8Array(new Uint16Array([1]).buffer)[0],N=[Uint8Array,Uint8ClampedArray,Uint16Array,Uint32Array,"undefined"==typeof BigUint64Array?{name:"BigUint64Array"}:BigUint64Array,Int8Array,Int16Array,Int32Array,"undefined"==typeof BigInt64Array?{name:"BigInt64Array"}:BigInt64Array,Float32Array,Float64Array],L=[64,68,69,70,71,72,77,78,79,85,86];for(let e=0;e<N.length;e++)z(N[e],L[e]);function z(e,t){let r,n="get"+e.name.slice(0,-5);"function"==typeof e?r=e.BYTES_PER_ELEMENT:e=null;for(let i=0;i<2;i++){if(!i&&1==r)continue;let s=2==r?1:4==r?2:3;g[i?t:t-4]=1==r||i==K?r=>{if(!e)throw new Error("Could not find typed array for code "+t);return new e(Uint8Array.prototype.slice.call(r,0).buffer)}:r=>{if(!e)throw new Error("Could not find typed array for code "+t);let o=new DataView(r.buffer,r.byteOffset,r.byteLength),a=r.length>>s,l=new e(a),u=o[n];for(let e=0;e<a;e++)l[e]=u.call(o,e<<s,i);return l}}}function W(){let e=31&r[i++];if(e>23)switch(e){case 24:e=r[i++];break;case 25:e=c.getUint16(i),i+=2;break;case 26:e=c.getUint32(i),i+=4}return e}function J(){if(h.getShared){let e=H((()=>(r=null,h.getShared())))||{},t=e.structures||[];h.sharedVersion=e.version,f=h.sharedValues=e.packedValues,!0===o?h.structures=o=t:o.splice.apply(o,[0,t.length].concat(t))}}function H(e){let t=n,s=i,f=y,d=p,g=a,b=u,w=l,A=new Uint8Array(r.slice(0,n)),v=o,k=h,U=m,I=e();return n=t,i=s,y=f,p=d,a=g,u=b,l=w,r=A,m=U,o=v,h=k,c=new DataView(r.buffer,r.byteOffset,r.byteLength),I}function Y(){r=null,u=null,o=null}const $=new Array(147);for(let e=0;e<256;e++)$[e]=+("1e"+Math.floor(45.15-.30103*e));let Z=new k({useRecords:!1});const q=Z.decode,G=Z.decodeMultiple,Q={NEVER:0,ALWAYS:1,DECIMAL_ROUND:3,DECIMAL_FIT:4};let X,ee,te;try{X=new TextEncoder}catch(e){}const re="object"==typeof globalThis&&globalThis.Buffer,ne=void 0!==re,ie=ne?re.allocUnsafeSlow:Uint8Array,se=ne?re:Uint8Array,oe=ne?4294967296:2144337920;let ae,le,ue,fe,ce=0,de=null;const he=/[\u0080-\uFFFF]/,ye=Symbol("record-id");class pe extends k{constructor(e){let t,r,n,i,s;super(e),this.offset=0,e=e||{};let o=se.prototype.utf8Write?function(e,t,r){return le.utf8Write(e,t,r)}:!(!X||!X.encodeInto)&&function(e,t){return X.encodeInto(e,le.subarray(t)).written},a=this,l=e.structures||e.saveStructures,u=e.maxSharedStructures;if(null==u&&(u=l?128:0),u>8190)throw new Error("Maximum maxSharedStructure is 8190");let f=e.sequential;f&&(u=0),this.structures||(this.structures=[]),this.saveStructures&&(this.saveShared=this.saveStructures);let c,d,h,y=e.sharedValues;if(y){h=Object.create(null);for(let e=0,t=y.length;e<t;e++)h[y[e]]=e}let p=[],g=0,b=0;this.mapEncode=function(e,t){if(this._keyMap&&!this._mapped&&"Array"===e.constructor.name)e=e.map((e=>this.encodeKeys(e)));return this.encode(e,t)},this.encode=function(o,l){if(le||(le=new ie(8192),ue=new DataView(le.buffer,0,8192),ce=0),fe=le.length-10,fe-ce<2048?(le=new ie(le.length),ue=new DataView(le.buffer,0,le.length),fe=le.length-10,ce=0):l===Re&&(ce=ce+7&2147483640),t=ce,a.useSelfDescribedHeader&&(ue.setUint32(ce,3654940416),ce+=3),s=a.structuredClone?new Map:null,a.bundleStrings&&"string"!=typeof o?(de=[],de.size=1/0):de=null,r=a.structures,r){if(r.uninitialized){let e=a.getShared()||{};a.structures=r=e.structures||[],a.sharedVersion=e.version;let t=a.sharedValues=e.packedValues;if(t){h={};for(let e=0,r=t.length;e<r;e++)h[t[e]]=e}}let e=r.length;if(e>u&&!f&&(e=u),!r.transitions){r.transitions=Object.create(null);for(let t=0;t<e;t++){let e=r[t];if(!e)continue;let n,i=r.transitions;for(let r=0,s=e.length;r<s;r++){void 0===i[ye]&&(i[ye]=t);let s=e[r];n=i[s],n||(n=i[s]=Object.create(null)),i=n}i[ye]=1048576|t}}f||(r.nextId=e)}if(n&&(n=!1),i=r||[],d=h,e.pack){let t=new Map;if(t.values=[],t.encoder=a,t.maxValues=e.maxPrivatePackedValues||(h?16:1/0),t.objectMap=h||!1,t.samplingPackedValues=c,ve(o,t),t.values.length>0){le[ce++]=216,le[ce++]=51,we(4);let e=t.values;w(e),we(0),we(0),d=Object.create(h||null);for(let t=0,r=e.length;t<r;t++)d[e[t]]=t}}ae=l&Pe;try{if(ae)return;if(w(o),de&&Ee(t,w),a.offset=ce,s&&s.idsToInsert){ce+=2*s.idsToInsert.length,ce>fe&&A(ce),a.offset=ce;let e=function(e,t){let r,n=2*t.length,i=e.length-n;t.sort(((e,t)=>e.offset>t.offset?1:-1));for(let r=0;r<t.length;r++){let n=t[r];n.id=r;for(let t of n.references)e[t++]=r>>8,e[t]=255&r}for(;r=t.pop();){let t=r.offset;e.copyWithin(t+n,t,i),n-=2;let s=t+n;e[s++]=216,e[s++]=28,i=t}return e}(le.subarray(t,ce),s.idsToInsert);return s=null,e}return l&Re?(le.start=t,le.end=ce,le):le.subarray(t,ce)}finally{if(r)if(b<10&&b++,r.length>u&&(r.length=u),g>1e4)r.transitions=null,b=0,g=0,p.length>0&&(p=[]);else if(p.length>0&&!f){for(let e=0,t=p.length;e<t;e++)p[e][ye]=void 0;p=[]}if(n&&a.saveShared){a.structures.length>u&&(a.structures=a.structures.slice(0,u));let e=le.subarray(t,ce);return!1===a.updateSharedData()?a.encode(o):e}l&Te&&(ce=t)}},this.findCommonStringsToPack=()=>(c=new Map,h||(h=Object.create(null)),e=>{let t=e&&e.threshold||4,r=this.pack?e.maxPrivatePackedValues||16:0;y||(y=this.sharedValues=[]);for(let[e,i]of c)i.count>t&&(h[e]=r++,y.push(e),n=!0);for(;this.saveShared&&!1===this.updateSharedData(););c=null});const w=r=>{ce>fe&&(le=A(ce));var n,i=typeof r;if("string"===i){if(d){let t=d[r];if(t>=0)return void(t<16?le[ce++]=t+224:(le[ce++]=198,w(1&t?15-t>>1:t-16>>1)));if(c&&!e.pack){let e=c.get(r);e?e.count++:c.set(r,{count:1})}}let i,s=r.length;if(de&&s>=4&&s<1024){if((de.size+=s)>61440){let e,r=(de[0]?3*de[0].length+de[1].length:0)+10;ce+r>fe&&(le=A(ce+r)),le[ce++]=217,le[ce++]=223,le[ce++]=249,le[ce++]=de.position?132:130,le[ce++]=26,e=ce-t,ce+=4,de.position&&Ee(t,w),de=["",""],de.size=0,de.position=e}let e=he.test(r);return de[e?0:1]+=r,le[ce++]=e?206:207,void w(s)}i=s<32?1:s<256?2:s<65536?3:5;let a=3*s;if(ce+a>fe&&(le=A(ce+a)),s<64||!o){let e,t,o,a=ce+i;for(e=0;e<s;e++)t=r.charCodeAt(e),t<128?le[a++]=t:t<2048?(le[a++]=t>>6|192,le[a++]=63&t|128):55296==(64512&t)&&56320==(64512&(o=r.charCodeAt(e+1)))?(t=65536+((1023&t)<<10)+(1023&o),e++,le[a++]=t>>18|240,le[a++]=t>>12&63|128,le[a++]=t>>6&63|128,le[a++]=63&t|128):(le[a++]=t>>12|224,le[a++]=t>>6&63|128,le[a++]=63&t|128);n=a-ce-i}else n=o(r,ce+i,a);n<24?le[ce++]=96|n:n<256?(i<2&&le.copyWithin(ce+2,ce+1,ce+1+n),le[ce++]=120,le[ce++]=n):n<65536?(i<3&&le.copyWithin(ce+3,ce+2,ce+2+n),le[ce++]=121,le[ce++]=n>>8,le[ce++]=255&n):(i<5&&le.copyWithin(ce+5,ce+3,ce+3+n),le[ce++]=122,ue.setUint32(ce,n),ce+=4),ce+=n}else if("number"===i)if(this.alwaysUseFloat||r>>>0!==r)if(this.alwaysUseFloat||r>>0!==r){let e;if((e=this.useFloat32)>0&&r<4294967296&&r>=-2147483648){let t;if(le[ce++]=250,ue.setFloat32(ce,r),e<4||(t=r*$[(127&le[ce])<<1|le[ce+1]>>7])>>0===t)return void(ce+=4);ce--}le[ce++]=251,ue.setFloat64(ce,r),ce+=8}else r>=-24?le[ce++]=31-r:r>=-256?(le[ce++]=56,le[ce++]=~r):r>=-65536?(le[ce++]=57,ue.setUint16(ce,~r),ce+=2):(le[ce++]=58,ue.setUint32(ce,~r),ce+=4);else r<24?le[ce++]=r:r<256?(le[ce++]=24,le[ce++]=r):r<65536?(le[ce++]=25,le[ce++]=r>>8,le[ce++]=255&r):(le[ce++]=26,ue.setUint32(ce,r),ce+=4);else if("object"===i)if(r){if(s){let e=s.get(r);if(e){if(le[ce++]=216,le[ce++]=29,le[ce++]=25,!e.references){let t=s.idsToInsert||(s.idsToInsert=[]);e.references=[],t.push(e)}return e.references.push(ce-t),void(ce+=2)}s.set(r,{offset:ce-t})}let e=r.constructor;if(e===Object)m(r,!0);else if(e===Array){(n=r.length)<24?le[ce++]=128|n:we(n);for(let e=0;e<n;e++)w(r[e])}else if(e===Map)if((this.mapsAsObjects?!1!==this.useTag259ForMaps:this.useTag259ForMaps)&&(le[ce++]=217,le[ce++]=1,le[ce++]=3),(n=r.size)<24?le[ce++]=160|n:n<256?(le[ce++]=184,le[ce++]=n):n<65536?(le[ce++]=185,le[ce++]=n>>8,le[ce++]=255&n):(le[ce++]=186,ue.setUint32(ce,n),ce+=4),a.keyMap)for(let[e,t]of r)w(a.encodeKey(e)),w(t);else for(let[e,t]of r)w(e),w(t);else{for(let e=0,t=ee.length;e<t;e++){if(r instanceof te[e]){let t=ee[e],n=t.tag;return null==n&&(n=t.getTag&&t.getTag.call(this,r)),n<24?le[ce++]=192|n:n<256?(le[ce++]=216,le[ce++]=n):n<65536?(le[ce++]=217,le[ce++]=n>>8,le[ce++]=255&n):n>-1&&(le[ce++]=218,ue.setUint32(ce,n),ce+=4),void t.encode.call(this,r,w,A)}}if(r[Symbol.iterator]){if(ae){let e=new Error("Iterable should be serialized as iterator");throw e.iteratorNotHandled=!0,e}le[ce++]=159;for(let e of r)w(e);return void(le[ce++]=255)}if(r[Symbol.asyncIterator]||Ae(r)){let e=new Error("Iterable/blob should be serialized as iterator");throw e.iteratorNotHandled=!0,e}if(this.useToJSON&&r.toJSON){const e=r.toJSON();if(e!==r)return w(e)}m(r,!r.hasOwnProperty)}}else le[ce++]=246;else if("boolean"===i)le[ce++]=r?245:244;else if("bigint"===i){if(r<BigInt(1)<<BigInt(64)&&r>=0)le[ce++]=27,ue.setBigUint64(ce,r);else if(r>-(BigInt(1)<<BigInt(64))&&r<0)le[ce++]=59,ue.setBigUint64(ce,-r-BigInt(1));else{if(!this.largeBigIntToFloat)throw new RangeError(r+" was too large to fit in CBOR 64-bit integer format, set largeBigIntToFloat to convert to float-64");le[ce++]=251,ue.setFloat64(ce,Number(r))}ce+=8}else{if("undefined"!==i)throw new Error("Unknown type: "+i);le[ce++]=247}},m=!1===this.useRecords?this.variableMapSize?e=>{let t=Object.keys(e),r=Object.values(e),n=t.length;if(n<24?le[ce++]=160|n:n<256?(le[ce++]=184,le[ce++]=n):n<65536?(le[ce++]=185,le[ce++]=n>>8,le[ce++]=255&n):(le[ce++]=186,ue.setUint32(ce,n),ce+=4),a.keyMap)for(let e=0;e<n;e++)w(a.encodeKey(t[e])),w(r[e]);else for(let e=0;e<n;e++)w(t[e]),w(r[e])}:(e,r)=>{le[ce++]=185;let n=ce-t;ce+=2;let i=0;if(a.keyMap)for(let t in e)(r||e.hasOwnProperty(t))&&(w(a.encodeKey(t)),w(e[t]),i++);else for(let t in e)(r||e.hasOwnProperty(t))&&(w(t),w(e[t]),i++);le[n+++t]=i>>8,le[n+t]=255&i}:(e,t)=>{let r,s,o,a=i.transitions||(i.transitions=Object.create(null)),l=0,f=0;if(this.keyMap){o=Object.keys(e).map((e=>this.encodeKey(e))),f=o.length;for(let e=0;e<f;e++){let t=o[e];r=a[t],r||(r=a[t]=Object.create(null),l++),a=r}}else for(let n in e)(t||e.hasOwnProperty(n))&&(r=a[n],r||(1048576&a[ye]&&(s=65535&a[ye]),r=a[n]=Object.create(null),l++),a=r,f++);let c=a[ye];if(void 0!==c)c&=65535,le[ce++]=217,le[ce++]=c>>8|224,le[ce++]=255&c;else{if(o||(o=a.__keys__||(a.__keys__=Object.keys(e))),void 0===s?(c=i.nextId++,c||(c=0,i.nextId=1),c>=256&&(i.nextId=(c=u)+1)):c=s,i[c]=o,!(c<u)){if(a[ye]=c,ue.setUint32(ce,3655335680),ce+=3,l&&(g+=b*l),p.length>=256-u&&(p.shift()[ye]=void 0),p.push(a),we(f+2),w(57344+c),w(o),null===t)return;for(let r in e)(t||e.hasOwnProperty(r))&&w(e[r]);return}le[ce++]=217,le[ce++]=c>>8|224,le[ce++]=255&c,a=i.transitions;for(let e=0;e<f;e++)(void 0===a[ye]||1048576&a[ye])&&(a[ye]=c),a=a[o[e]];a[ye]=1048576|c,n=!0}if(f<24?le[ce++]=128|f:we(f),null!==t)for(let r in e)(t||e.hasOwnProperty(r))&&w(e[r])},A=e=>{let r;if(e>16777216){if(e-t>oe)throw new Error("Encoded buffer would be larger than maximum buffer size");r=Math.min(oe,4096*Math.round(Math.max((e-t)*(e>67108864?1.25:2),4194304)/4096))}else r=1+(Math.max(e-t<<2,le.length-1)>>12)<<12;let n=new ie(r);return ue=new DataView(n.buffer,0,r),le.copy?le.copy(n,0,t,e):n.set(le.slice(t,e)),ce-=t,t=0,fe=n.length-10,le=n};let v=100,k=1e3;function*U(e,r,n){let i=e.constructor;if(i===Object){let t=!1!==a.useRecords;t?m(e,null):ge(Object.keys(e).length,160);for(let n in e){let i=e[n];t||w(n),i&&"object"==typeof i?r[n]?yield*U(i,r[n]):yield*I(i,r,n):w(i)}}else if(i===Array){let n=e.length;we(n);for(let i=0;i<n;i++){let n=e[i];n&&("object"==typeof n||ce-t>v)?r.element?yield*U(n,r.element):yield*I(n,r,"element"):w(n)}}else if(e[Symbol.iterator]){le[ce++]=159;for(let n of e)n&&("object"==typeof n||ce-t>v)?r.element?yield*U(n,r.element):yield*I(n,r,"element"):w(n);le[ce++]=255}else Ae(e)?(ge(e.size,64),yield le.subarray(t,ce),yield e,E()):e[Symbol.asyncIterator]?(le[ce++]=159,yield le.subarray(t,ce),yield e,E(),le[ce++]=255):w(e);n&&ce>t?yield le.subarray(t,ce):ce-t>v&&(yield le.subarray(t,ce),E())}function*I(e,r,n){let i=ce-t;try{w(e),ce-t>v&&(yield le.subarray(t,ce),E())}catch(s){if(!s.iteratorNotHandled)throw s;r[n]={},ce=t+i,yield*U.call(this,e,r[n])}}function E(){v=k,a.encode(null,Pe)}function M(e,t,r){return v=t&&t.chunkThreshold?k=t.chunkThreshold:100,e&&"object"==typeof e?(a.encode(null,Pe),r(e,a.iterateProperties||(a.iterateProperties={}),!0)):[a.encode(e)]}async function*O(e,t){for(let r of U(e,t,!0)){let e=r.constructor;if(e===se||e===Uint8Array)yield r;else if(Ae(r)){let e,t=r.stream().getReader();for(;!(e=await t.read()).done;)yield e.value}else if(r[Symbol.asyncIterator])for await(let e of r)E(),e?yield*O(e,t.async||(t.async={})):yield a.encode(e);else yield r}}this.encodeAsIterable=function(e,t){return M(e,t,U)},this.encodeAsAsyncIterable=function(e,t){return M(e,t,O)}}useBuffer(e){le=e,ue=new DataView(le.buffer,le.byteOffset,le.byteLength),ce=0}clearSharedData(){this.structures&&(this.structures=[]),this.sharedValues&&(this.sharedValues=void 0)}updateSharedData(){let e=this.sharedVersion||0;this.sharedVersion=e+1;let t=this.structures.slice(0),r=new be(t,this.sharedValues,this.sharedVersion),n=this.saveShared(r,(t=>(t&&t.version||0)==e));return!1===n?(r=this.getShared()||{},this.structures=r.structures||[],this.sharedValues=r.packedValues,this.sharedVersion=r.version,this.structures.nextId=this.structures.length):t.forEach(((e,t)=>this.structures[t]=e)),n}}function ge(e,t){e<24?le[ce++]=t|e:e<256?(le[ce++]=24|t,le[ce++]=e):e<65536?(le[ce++]=25|t,le[ce++]=e>>8,le[ce++]=255&e):(le[ce++]=26|t,ue.setUint32(ce,e),ce+=4)}class be{constructor(e,t,r){this.structures=e,this.packedValues=t,this.version=r}}function we(e){e<24?le[ce++]=128|e:e<256?(le[ce++]=152,le[ce++]=e):e<65536?(le[ce++]=153,le[ce++]=e>>8,le[ce++]=255&e):(le[ce++]=154,ue.setUint32(ce,e),ce+=4)}const me="undefined"==typeof Blob?function(){}:Blob;function Ae(e){if(e instanceof me)return!0;let t=e[Symbol.toStringTag];return"Blob"===t||"File"===t}function ve(e,t){switch(typeof e){case"string":if(e.length>3){if(t.objectMap[e]>-1||t.values.length>=t.maxValues)return;let r=t.get(e);if(r)2==++r.count&&t.values.push(e);else if(t.set(e,{count:1}),t.samplingPackedValues){let r=t.samplingPackedValues.get(e);r?r.count++:t.samplingPackedValues.set(e,{count:1})}}break;case"object":if(e)if(e instanceof Array)for(let r=0,n=e.length;r<n;r++)ve(e[r],t);else{let n=!t.encoder.useRecords;for(var r in e)e.hasOwnProperty(r)&&(n&&ve(r,t),ve(e[r],t))}break;case"function":console.log(e)}}const ke=1==new Uint8Array(new Uint16Array([1]).buffer)[0];function Ue(e,t){return!ke&&t>1&&(e-=4),{tag:e,encode:function(e,t){let r=e.byteLength,n=e.byteOffset||0,i=e.buffer||e;t(ne?re.from(i,n,r):new Uint8Array(i,n,r))}}}function Ie(e,t){let r=e.byteLength;r<24?le[ce++]=64+r:r<256?(le[ce++]=88,le[ce++]=r):r<65536?(le[ce++]=89,le[ce++]=r>>8,le[ce++]=255&r):(le[ce++]=90,ue.setUint32(ce,r),ce+=4),ce+r>=le.length&&t(ce+r),le.set(e.buffer?e:new Uint8Array(e),ce),ce+=r}function Ee(e,t){ue.setUint32(de.position+e,ce-de.position-e+1);let r=de;de=null,t(r[0]),t(r[1])}te=[Date,Set,Error,RegExp,R,ArrayBuffer,Uint8Array,Uint8ClampedArray,Uint16Array,Uint32Array,"undefined"==typeof BigUint64Array?function(){}:BigUint64Array,Int8Array,Int16Array,Int32Array,"undefined"==typeof BigInt64Array?function(){}:BigInt64Array,Float32Array,Float64Array,be],ee=[{tag:1,encode(e,t){let r=e.getTime()/1e3;(this.useTimestamp32||0===e.getMilliseconds())&&r>=0&&r<4294967296?(le[ce++]=26,ue.setUint32(ce,r),ce+=4):(le[ce++]=251,ue.setFloat64(ce,r),ce+=8)}},{tag:258,encode(e,t){t(Array.from(e))}},{tag:27,encode(e,t){t([e.name,e.message])}},{tag:27,encode(e,t){t(["RegExp",e.source,e.flags])}},{getTag:e=>e.tag,encode(e,t){t(e.value)}},{encode(e,t,r){Ie(e,r)}},{getTag(e){if(e.constructor===Uint8Array&&(this.tagUint8Array||ne&&!1!==this.tagUint8Array))return 64},encode(e,t,r){Ie(e,r)}},Ue(68,1),Ue(69,2),Ue(70,4),Ue(71,8),Ue(72,1),Ue(77,2),Ue(78,4),Ue(79,8),Ue(85,4),Ue(86,8),{encode(e,t){let r=e.packedValues||[],n=e.structures||[];if(r.values.length>0){le[ce++]=216,le[ce++]=51,we(4);let e=r.values;t(e),we(0),we(0),packedObjectMap=Object.create(sharedPackedObjectMap||null);for(let t=0,r=e.length;t<r;t++)packedObjectMap[e[t]]=t}if(n){ue.setUint32(ce,3655335424),ce+=3;let r=n.slice(0);r.unshift(57344),r.push(new R(e.version,1399353956)),t(r)}else t(new R(e.version,1399353956))}}];let Me=new pe({useRecords:!1});const Oe=Me.encode,Se=Me.encodeAsIterable,je=Me.encodeAsAsyncIterable,{NEVER:xe,ALWAYS:Be,DECIMAL_ROUND:Ve,DECIMAL_FIT:_e}=Q,Re=512,Te=1024,Pe=2048;e.ALWAYS=Be,e.DECIMAL_FIT=_e,e.DECIMAL_ROUND=Ve,e.Decoder=k,e.Encoder=pe,e.FLOAT32_OPTIONS=Q,e.NEVER=xe,e.REUSE_BUFFER_MODE=Re,e.Tag=R,e.addExtension=function(e){if(e.Class){if(!e.encode)throw new Error("Extension has no encode function");te.unshift(e.Class),ee.unshift(e)}!function(e){g[e.tag]=e.decode}(e)},e.clearSource=Y,e.decode=q,e.decodeIter=function(e,t={}){if(!e||"object"!=typeof e)throw new Error("first argument must be an Iterable, Async Iterable, Iterator, Async Iterator, or a promise");const r=new k(t);let n;const i=e=>{let t;n&&(e=Buffer.concat([n,e]),n=void 0);try{t=r.decodeMultiple(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},e.decodeMultiple=G,e.encode=Oe,e.encodeAsAsyncIterable=je,e.encodeAsIterable=Se,e.encodeIter=function(e,t={}){if(e&&"object"==typeof e){if("function"==typeof e[Symbol.iterator])return function*(e,t){const r=new pe(t);for(const t of e)yield r.encode(t)}(e,t);if("function"==typeof e.then||"function"==typeof e[Symbol.asyncIterator])return async function*(e,t){const r=new pe(t);for await(const t of e)yield r.encode(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.isNativeAccelerationEnabled=!1,e.roundFloat32=function(e){V[0]=e;let t=$[(127&_[3])<<1|_[2]>>7];return(t*e+(e>0?.5:-.5)>>0)/t}}));
//# sourceMappingURL=index-no-eval.min.js.map

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

!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).CBOR={})}(this,(function(e){"use strict";let t,r,n;try{t=new TextDecoder}catch(e){}let i=0;const s={};let o,a,l,u,f,c,d,h={},y=0,p=0,g=[],b=[],w={useRecords:!1,mapsAsObjects:!0},m=!1,A=2;try{new Function("")}catch(e){A=1/0}class v{constructor(e){if(e&&(!e.keyMap&&!e._keyMap||e.useRecords||(e.useRecords=!1,e.mapsAsObjects=!0),!1===e.useRecords&&void 0===e.mapsAsObjects&&(e.mapsAsObjects=!0),e.getStructures&&(e.getShared=e.getStructures),e.getShared&&!e.structures&&((e.structures=[]).uninitialized=!0),e.keyMap)){this.mapKey=new Map;for(let[t,r]of Object.entries(e.keyMap))this.mapKey.set(r,t)}Object.assign(this,e)}decodeKey(e){return this.keyMap&&this.mapKey.get(e)||e}encodeKey(e){return this.keyMap&&this.keyMap.hasOwnProperty(e)?this.keyMap[e]:e}encodeKeys(e){if(!this._keyMap)return e;let t=new Map;for(let[r,n]of Object.entries(e))t.set(this._keyMap.hasOwnProperty(r)?this._keyMap[r]:r,n);return t}decodeKeys(e){if(!this._keyMap||"Map"!=e.constructor.name)return e;if(!this._mapKey){this._mapKey=new Map;for(let[e,t]of Object.entries(this._keyMap))this._mapKey.set(t,e)}let t={};return e.forEach(((e,r)=>t[M(this._mapKey.has(r)?this._mapKey.get(r):r)]=e)),t}mapDecode(e,t){let r=this.decode(e);return this._keyMap&&"Array"===r.constructor.name?r.map((e=>this.decodeKeys(e))):r}decode(e,t){if(r)return H((()=>(Y(),this?this.decode(e,t):v.prototype.decode.call(w,e,t))));n=t>-1?t:e.length,i=0,p=0,a=null,l=null,r=e;try{c=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 v){if(h=this,f=this.sharedValues&&(this.pack?new Array(this.maxPrivatePackedValues||16).concat(this.sharedValues):this.sharedValues),this.structures)return o=this.structures,k();(!o||o.length>0)&&(o=[])}else h=w,(!o||o.length>0)&&(o=[]),f=null;return k()}decodeMultiple(e,t){let r,n=0;try{let s=e.length;m=!0;let o=this?this.decode(e,s):$.decode(e,s);if(!t){for(r=[o];i<s;)n=i,r.push(k());return r}if(!1===t(o))return;for(;i<s;)if(n=i,!1===t(k()))return}catch(e){throw e.lastPosition=n,e.values=r,e}finally{m=!1,Y()}}}function k(){try{let e=U();if(l){if(i>=l.postBundlePosition){let e=new Error("Unexpected bundle position");throw e.incomplete=!0,e}i=l.postBundlePosition,l=null}if(i==n)o=null,r=null,u&&(u=null);else{if(i>n){let e=new Error("Unexpected end of CBOR data");throw e.incomplete=!0,e}if(!m)throw new Error("Data read, but end of buffer not reached")}return e}catch(e){throw Y(),(e instanceof RangeError||e.message.startsWith("Unexpected end of buffer"))&&(e.incomplete=!0),e}}function U(){let e=r[i++],t=e>>5;if(e&=31,e>23)switch(e){case 24:e=r[i++];break;case 25:if(7==t)return function(){let e=r[i++],t=r[i++],n=(127&e)>>2;if(31===n)return t||3&e?NaN:128&e?-1/0:1/0;if(0===n){let r=((3&e)<<8|t)/(1<<24);return 128&e?-r:r}return V[3]=128&e|56+(n>>1),V[2]=(7&e)<<5|t>>3,V[1]=t<<5,V[0]=0,B[0]}();e=c.getUint16(i),i+=2;break;case 26:if(7==t){let e=c.getFloat32(i);if(h.useFloat32>2){let t=J[(127&r[i])<<1|r[i+1]>>7];return i+=4,(t*e+(e>0?.5:-.5)>>0)/t}return i+=4,e}e=c.getUint32(i),i+=4;break;case 27:if(7==t){let e=c.getFloat64(i);return i+=8,e}if(t>1){if(c.getUint32(i)>0)throw new Error("JavaScript does not support arrays, maps, or strings with length over 4294967295");e=c.getUint32(i+4)}else h.int64AsNumber?(e=4294967296*c.getUint32(i),e+=c.getUint32(i+4)):e=c.getBigUint64(i);i+=8;break;case 31:switch(t){case 2:case 3:throw new Error("Indefinite length not supported for byte or text strings");case 4:let e,r=[],n=0;for(;(e=U())!=s;)r[n++]=e;return 4==t?r:3==t?r.join(""):Buffer.concat(r);case 5:let i;if(h.mapsAsObjects){let e={};if(h.keyMap)for(;(i=U())!=s;)e[M(h.decodeKey(i))]=U();else for(;(i=U())!=s;)e[M(i)]=U();return e}{d&&(h.mapsAsObjects=!0,d=!1);let e=new Map;if(h.keyMap)for(;(i=U())!=s;)e.set(h.decodeKey(i),U());else for(;(i=U())!=s;)e.set(i,U());return e}case 7:return s;default:throw new Error("Invalid major type for indefinite length "+t)}default:throw new Error("Unknown token "+e)}switch(t){case 0:return e;case 1:return~e;case 2:return u=e,h.copyBuffers?Uint8Array.prototype.slice.call(r,i,i+=u):r.subarray(i,i+=u);case 3:if(p>=i)return a.slice(i-y,(i+=e)-y);if(0==p&&n<140&&e<32){let t=e<16?x(e):function(e){let t=i,n=new Array(e);for(let s=0;s<e;s++){const e=r[i++];if((128&e)>0)return void(i=t);n[s]=e}return j.apply(String,n)}(e);if(null!=t)return t}return O(e);case 4:let t=new Array(e);for(let r=0;r<e;r++)t[r]=U();return t;case 5:if(h.mapsAsObjects){let t={};if(h.keyMap)for(let r=0;r<e;r++)t[M(h.decodeKey(U()))]=U();else for(let r=0;r<e;r++)t[M(U())]=U();return t}{d&&(h.mapsAsObjects=!0,d=!1);let t=new Map;if(h.keyMap)for(let r=0;r<e;r++)t.set(h.decodeKey(U()),U());else for(let r=0;r<e;r++)t.set(U(),U());return t}case 6:if(e>=57337){let t=o[8191&e];if(t)return t.read||(t.read=E(t)),t.read();if(e<65536){if(57343==e){let e=z(),t=U(),r=U();R(t,r);let n={};if(h.keyMap)for(let t=2;t<e;t++){n[M(h.decodeKey(r[t-2]))]=U()}else for(let t=2;t<e;t++){n[M(r[t-2])]=U()}return n}if(57342==e){let e=z(),t=U();for(let r=2;r<e;r++)R(t++,U());return U()}if(57337==e)return function(){let e=z(),t=i+U();for(let t=2;t<e;t++){let e=z();i+=e}let r=i;return i=t,l=[S(z()),S(z())],l.position0=0,l.position1=0,l.postBundlePosition=i,i=r,U()}();if(h.getShared&&(W(),t=o[8191&e],t))return t.read||(t.read=E(t)),t.read()}}let s=g[e];if(s)return s.handlesRead?s(U):s(U());{let t=U();for(let r=0;r<b.length;r++){let n=b[r](e,t);if(void 0!==n)return n}return new _(t,e)}case 7:switch(e){case 20:return!1;case 21:return!0;case 22:return null;case 23:return;default:let t=(f||D())[e];if(void 0!==t)return t;throw new Error("Unknown token "+e)}default:if(isNaN(e)){let e=new Error("Unexpected end of CBOR data");throw e.incomplete=!0,e}throw new Error("Unknown CBOR token "+e)}var u}const I=/^[a-zA-Z_$][a-zA-Z\d_$]*$/;function E(e){return e.slowReads=0,function(){let e=r[i++];if(e&=31,e>23)switch(e){case 24:e=r[i++];break;case 25:e=c.getUint16(i),i+=2;break;case 26:e=c.getUint32(i),i+=4;break;default:throw new Error("Expected array header, but got "+r[i-1])}let t=this.compiledReader;for(;t;){if(t.propertyCount===e)return t(U);t=t.next}if(this.slowReads++>=A){let r=this.length==e?this:this.slice(0,e);return t=h.keyMap?new Function("r","return {"+r.map((e=>h.decodeKey(e))).map((e=>I.test(e)?M(e)+":r()":"["+JSON.stringify(e)+"]:r()")).join(",")+"}"):new Function("r","return {"+r.map((e=>I.test(e)?M(e)+":r()":"["+JSON.stringify(e)+"]:r()")).join(",")+"}"),this.compiledReader&&(t.next=this.compiledReader),t.propertyCount=e,this.compiledReader=t,t(U)}let n={};if(h.keyMap)for(let t=0;t<e;t++)n[M(h.decodeKey(this[t]))]=U();else for(let t=0;t<e;t++)n[M(this[t])]=U();return n}}function M(e){return"__proto__"===e?"__proto_":e}let O=S;function S(e){let n;if(e<16&&(n=x(e)))return n;if(e>64&&t)return t.decode(r.subarray(i,i+=e));const s=i+e,o=[];for(n="";i<s;){const e=r[i++];if(0==(128&e))o.push(e);else if(192==(224&e)){const t=63&r[i++];o.push((31&e)<<6|t)}else if(224==(240&e)){const t=63&r[i++],n=63&r[i++];o.push((31&e)<<12|t<<6|n)}else if(240==(248&e)){let t=(7&e)<<18|(63&r[i++])<<12|(63&r[i++])<<6|63&r[i++];t>65535&&(t-=65536,o.push(t>>>10&1023|55296),t=56320|1023&t),o.push(t)}else o.push(e);o.length>=4096&&(n+=j.apply(String,o),o.length=0)}return o.length>0&&(n+=j.apply(String,o)),n}let j=String.fromCharCode;function x(e){if(e<4){if(e<2){if(0===e)return"";{let e=r[i++];return(128&e)>1?void(i-=1):j(e)}}{let t=r[i++],n=r[i++];if((128&t)>0||(128&n)>0)return void(i-=2);if(e<3)return j(t,n);let s=r[i++];return(128&s)>0?void(i-=3):j(t,n,s)}}{let t=r[i++],n=r[i++],s=r[i++],o=r[i++];if((128&t)>0||(128&n)>0||(128&s)>0||(128&o)>0)return void(i-=4);if(e<6){if(4===e)return j(t,n,s,o);{let e=r[i++];return(128&e)>0?void(i-=5):j(t,n,s,o,e)}}if(e<8){let a=r[i++],l=r[i++];if((128&a)>0||(128&l)>0)return void(i-=6);if(e<7)return j(t,n,s,o,a,l);let u=r[i++];return(128&u)>0?void(i-=7):j(t,n,s,o,a,l,u)}{let a=r[i++],l=r[i++],u=r[i++],f=r[i++];if((128&a)>0||(128&l)>0||(128&u)>0||(128&f)>0)return void(i-=8);if(e<10){if(8===e)return j(t,n,s,o,a,l,u,f);{let e=r[i++];return(128&e)>0?void(i-=9):j(t,n,s,o,a,l,u,f,e)}}if(e<12){let c=r[i++],d=r[i++];if((128&c)>0||(128&d)>0)return void(i-=10);if(e<11)return j(t,n,s,o,a,l,u,f,c,d);let h=r[i++];return(128&h)>0?void(i-=11):j(t,n,s,o,a,l,u,f,c,d,h)}{let c=r[i++],d=r[i++],h=r[i++],y=r[i++];if((128&c)>0||(128&d)>0||(128&h)>0||(128&y)>0)return void(i-=12);if(e<14){if(12===e)return j(t,n,s,o,a,l,u,f,c,d,h,y);{let e=r[i++];return(128&e)>0?void(i-=13):j(t,n,s,o,a,l,u,f,c,d,h,y,e)}}{let p=r[i++],g=r[i++];if((128&p)>0||(128&g)>0)return void(i-=14);if(e<15)return j(t,n,s,o,a,l,u,f,c,d,h,y,p,g);let b=r[i++];return(128&b)>0?void(i-=15):j(t,n,s,o,a,l,u,f,c,d,h,y,p,g,b)}}}}}let B=new Float32Array(1),V=new Uint8Array(B.buffer,0,4);new Array(4096);class _{constructor(e,t){this.value=e,this.tag=t}}g[0]=e=>new Date(e),g[1]=e=>new Date(Math.round(1e3*e)),g[2]=e=>{let t=BigInt(0);for(let r=0,n=e.byteLength;r<n;r++)t=BigInt(e[r])+t<<BigInt(8);return t},g[3]=e=>BigInt(-1)-g[2](e),g[4]=e=>+(e[1]+"e"+e[0]),g[5]=e=>e[1]*Math.exp(e[0]*Math.log(2));const R=(e,t)=>{let r=o[e-=57344];r&&r.isShared&&((o.restoreStructures||(o.restoreStructures=[]))[e]=r),o[e]=t,t.read=E(t)};g[105]=e=>{let t=e.length,r=e[1];R(e[0],r);let n={};for(let i=2;i<t;i++){n[M(r[i-2])]=e[i]}return n},g[14]=e=>l?l[0].slice(l.position0,l.position0+=e):new _(e,14),g[15]=e=>l?l[1].slice(l.position1,l.position1+=e):new _(e,15);let F={Error:Error,RegExp:RegExp};g[27]=e=>(F[e[0]]||Error)(e[1],e[2]);const P=e=>{if(132!=r[i++])throw new Error("Packed values structure must be followed by a 4 element array");let t=e();return f=f?t.concat(f.slice(t.length)):t,f.prefixes=e(),f.suffixes=e(),e()};function T(e,t){return"string"==typeof e?e+t:e instanceof Array?e.concat(t):Object.assign({},e,t)}function D(){if(!f){if(!h.getShared)throw new Error("No packed values available");W()}return f}P.handlesRead=!0,g[51]=P,g[6]=e=>{if(!f){if(!h.getShared)return new _(e,6);W()}if("number"==typeof e)return f[16+(e>=0?2*e:-2*e-1)];throw new Error("No support for non-integer packed references yet")},g[28]=e=>{u||(u=new Map,u.id=0);let t,n=u.id++;t=r[i]>>5==4?[]:{};let s={target:t};u.set(n,s);let o=e();return s.used?Object.assign(t,o):(s.target=o,o)},g[28].handlesRead=!0,g[29]=e=>{let t=u.get(e);return t.used=!0,t.target},g[258]=e=>new Set(e),(g[259]=e=>(h.mapsAsObjects&&(h.mapsAsObjects=!1,d=!0),e())).handlesRead=!0;b.push(((e,t)=>e>=225&&e<=255?T(D().prefixes[e-224],t):e>=28704&&e<=32767?T(D().prefixes[e-28672],t):e>=1879052288&&e<=2147483647?T(D().prefixes[e-1879048192],t):e>=216&&e<=223?T(t,D().suffixes[e-216]):e>=27647&&e<=28671?T(t,D().suffixes[e-27639]):e>=1811940352&&e<=1879048191?T(t,D().suffixes[e-1811939328]):1399353956==e?{packedValues:f,structures:o.slice(0),version:t}:55799==e?t:void 0));const C=1==new Uint8Array(new Uint16Array([1]).buffer)[0],K=[Uint8Array,Uint8ClampedArray,Uint16Array,Uint32Array,"undefined"==typeof BigUint64Array?{name:"BigUint64Array"}:BigUint64Array,Int8Array,Int16Array,Int32Array,"undefined"==typeof BigInt64Array?{name:"BigInt64Array"}:BigInt64Array,Float32Array,Float64Array],N=[64,68,69,70,71,72,77,78,79,85,86];for(let e=0;e<K.length;e++)L(K[e],N[e]);function L(e,t){let r,n="get"+e.name.slice(0,-5);"function"==typeof e?r=e.BYTES_PER_ELEMENT:e=null;for(let i=0;i<2;i++){if(!i&&1==r)continue;let s=2==r?1:4==r?2:3;g[i?t:t-4]=1==r||i==C?r=>{if(!e)throw new Error("Could not find typed array for code "+t);return new e(Uint8Array.prototype.slice.call(r,0).buffer)}:r=>{if(!e)throw new Error("Could not find typed array for code "+t);let o=new DataView(r.buffer,r.byteOffset,r.byteLength),a=r.length>>s,l=new e(a),u=o[n];for(let e=0;e<a;e++)l[e]=u.call(o,e<<s,i);return l}}}function z(){let e=31&r[i++];if(e>23)switch(e){case 24:e=r[i++];break;case 25:e=c.getUint16(i),i+=2;break;case 26:e=c.getUint32(i),i+=4}return e}function W(){if(h.getShared){let e=H((()=>(r=null,h.getShared())))||{},t=e.structures||[];h.sharedVersion=e.version,f=h.sharedValues=e.packedValues,!0===o?h.structures=o=t:o.splice.apply(o,[0,t.length].concat(t))}}function H(e){let t=n,s=i,f=y,d=p,g=a,b=u,w=l,A=new Uint8Array(r.slice(0,n)),v=o,k=h,U=m,I=e();return n=t,i=s,y=f,p=d,a=g,u=b,l=w,r=A,m=U,o=v,h=k,c=new DataView(r.buffer,r.byteOffset,r.byteLength),I}function Y(){r=null,u=null,o=null}const J=new Array(147);for(let e=0;e<256;e++)J[e]=+("1e"+Math.floor(45.15-.30103*e));let $=new v({useRecords:!1});const Z=$.decode,q=$.decodeMultiple,G={NEVER:0,ALWAYS:1,DECIMAL_ROUND:3,DECIMAL_FIT:4};let Q,X,ee;try{Q=new TextEncoder}catch(e){}const te="object"==typeof globalThis&&globalThis.Buffer,re=void 0!==te,ne=re?te.allocUnsafeSlow:Uint8Array,ie=re?te:Uint8Array,se=re?4294967296:2144337920;let oe,ae,le,ue,fe=0,ce=null;const de=/[\u0080-\uFFFF]/,he=Symbol("record-id");class ye extends v{constructor(e){let t,r,n,i,s;super(e),this.offset=0,e=e||{};let o=ie.prototype.utf8Write?function(e,t,r){return ae.utf8Write(e,t,r)}:!(!Q||!Q.encodeInto)&&function(e,t){return Q.encodeInto(e,ae.subarray(t)).written},a=this,l=e.structures||e.saveStructures,u=e.maxSharedStructures;if(null==u&&(u=l?128:0),u>8190)throw new Error("Maximum maxSharedStructure is 8190");let f=e.sequential;f&&(u=0),this.structures||(this.structures=[]),this.saveStructures&&(this.saveShared=this.saveStructures);let c,d,h,y=e.sharedValues;if(y){h=Object.create(null);for(let e=0,t=y.length;e<t;e++)h[y[e]]=e}let p=[],g=0,b=0;this.mapEncode=function(e,t){if(this._keyMap&&!this._mapped&&"Array"===e.constructor.name)e=e.map((e=>this.encodeKeys(e)));return this.encode(e,t)},this.encode=function(o,l){if(ae||(ae=new ne(8192),le=new DataView(ae.buffer,0,8192),fe=0),ue=ae.length-10,ue-fe<2048?(ae=new ne(ae.length),le=new DataView(ae.buffer,0,ae.length),ue=ae.length-10,fe=0):l===_e&&(fe=fe+7&2147483640),t=fe,a.useSelfDescribedHeader&&(le.setUint32(fe,3654940416),fe+=3),s=a.structuredClone?new Map:null,a.bundleStrings&&"string"!=typeof o?(ce=[],ce.size=1/0):ce=null,r=a.structures,r){if(r.uninitialized){let e=a.getShared()||{};a.structures=r=e.structures||[],a.sharedVersion=e.version;let t=a.sharedValues=e.packedValues;if(t){h={};for(let e=0,r=t.length;e<r;e++)h[t[e]]=e}}let e=r.length;if(e>u&&!f&&(e=u),!r.transitions){r.transitions=Object.create(null);for(let t=0;t<e;t++){let e=r[t];if(!e)continue;let n,i=r.transitions;for(let r=0,s=e.length;r<s;r++){void 0===i[he]&&(i[he]=t);let s=e[r];n=i[s],n||(n=i[s]=Object.create(null)),i=n}i[he]=1048576|t}}f||(r.nextId=e)}if(n&&(n=!1),i=r||[],d=h,e.pack){let t=new Map;if(t.values=[],t.encoder=a,t.maxValues=e.maxPrivatePackedValues||(h?16:1/0),t.objectMap=h||!1,t.samplingPackedValues=c,Ae(o,t),t.values.length>0){ae[fe++]=216,ae[fe++]=51,be(4);let e=t.values;w(e),be(0),be(0),d=Object.create(h||null);for(let t=0,r=e.length;t<r;t++)d[e[t]]=t}}oe=l&Fe;try{if(oe)return;if(w(o),ce&&Ie(t,w),a.offset=fe,s&&s.idsToInsert){fe+=2*s.idsToInsert.length,fe>ue&&A(fe),a.offset=fe;let e=function(e,t){let r,n=2*t.length,i=e.length-n;t.sort(((e,t)=>e.offset>t.offset?1:-1));for(let r=0;r<t.length;r++){let n=t[r];n.id=r;for(let t of n.references)e[t++]=r>>8,e[t]=255&r}for(;r=t.pop();){let t=r.offset;e.copyWithin(t+n,t,i),n-=2;let s=t+n;e[s++]=216,e[s++]=28,i=t}return e}(ae.subarray(t,fe),s.idsToInsert);return s=null,e}return l&_e?(ae.start=t,ae.end=fe,ae):ae.subarray(t,fe)}finally{if(r)if(b<10&&b++,r.length>u&&(r.length=u),g>1e4)r.transitions=null,b=0,g=0,p.length>0&&(p=[]);else if(p.length>0&&!f){for(let e=0,t=p.length;e<t;e++)p[e][he]=void 0;p=[]}if(n&&a.saveShared){a.structures.length>u&&(a.structures=a.structures.slice(0,u));let e=ae.subarray(t,fe);return!1===a.updateSharedData()?a.encode(o):e}l&Re&&(fe=t)}},this.findCommonStringsToPack=()=>(c=new Map,h||(h=Object.create(null)),e=>{let t=e&&e.threshold||4,r=this.pack?e.maxPrivatePackedValues||16:0;y||(y=this.sharedValues=[]);for(let[e,i]of c)i.count>t&&(h[e]=r++,y.push(e),n=!0);for(;this.saveShared&&!1===this.updateSharedData(););c=null});const w=r=>{fe>ue&&(ae=A(fe));var n,i=typeof r;if("string"===i){if(d){let t=d[r];if(t>=0)return void(t<16?ae[fe++]=t+224:(ae[fe++]=198,w(1&t?15-t>>1:t-16>>1)));if(c&&!e.pack){let e=c.get(r);e?e.count++:c.set(r,{count:1})}}let i,s=r.length;if(ce&&s>=4&&s<1024){if((ce.size+=s)>61440){let e,r=(ce[0]?3*ce[0].length+ce[1].length:0)+10;fe+r>ue&&(ae=A(fe+r)),ae[fe++]=217,ae[fe++]=223,ae[fe++]=249,ae[fe++]=ce.position?132:130,ae[fe++]=26,e=fe-t,fe+=4,ce.position&&Ie(t,w),ce=["",""],ce.size=0,ce.position=e}let e=de.test(r);return ce[e?0:1]+=r,ae[fe++]=e?206:207,void w(s)}i=s<32?1:s<256?2:s<65536?3:5;let a=3*s;if(fe+a>ue&&(ae=A(fe+a)),s<64||!o){let e,t,o,a=fe+i;for(e=0;e<s;e++)t=r.charCodeAt(e),t<128?ae[a++]=t:t<2048?(ae[a++]=t>>6|192,ae[a++]=63&t|128):55296==(64512&t)&&56320==(64512&(o=r.charCodeAt(e+1)))?(t=65536+((1023&t)<<10)+(1023&o),e++,ae[a++]=t>>18|240,ae[a++]=t>>12&63|128,ae[a++]=t>>6&63|128,ae[a++]=63&t|128):(ae[a++]=t>>12|224,ae[a++]=t>>6&63|128,ae[a++]=63&t|128);n=a-fe-i}else n=o(r,fe+i,a);n<24?ae[fe++]=96|n:n<256?(i<2&&ae.copyWithin(fe+2,fe+1,fe+1+n),ae[fe++]=120,ae[fe++]=n):n<65536?(i<3&&ae.copyWithin(fe+3,fe+2,fe+2+n),ae[fe++]=121,ae[fe++]=n>>8,ae[fe++]=255&n):(i<5&&ae.copyWithin(fe+5,fe+3,fe+3+n),ae[fe++]=122,le.setUint32(fe,n),fe+=4),fe+=n}else if("number"===i)if(this.alwaysUseFloat||r>>>0!==r)if(this.alwaysUseFloat||r>>0!==r){let e;if((e=this.useFloat32)>0&&r<4294967296&&r>=-2147483648){let t;if(ae[fe++]=250,le.setFloat32(fe,r),e<4||(t=r*J[(127&ae[fe])<<1|ae[fe+1]>>7])>>0===t)return void(fe+=4);fe--}ae[fe++]=251,le.setFloat64(fe,r),fe+=8}else r>=-24?ae[fe++]=31-r:r>=-256?(ae[fe++]=56,ae[fe++]=~r):r>=-65536?(ae[fe++]=57,le.setUint16(fe,~r),fe+=2):(ae[fe++]=58,le.setUint32(fe,~r),fe+=4);else r<24?ae[fe++]=r:r<256?(ae[fe++]=24,ae[fe++]=r):r<65536?(ae[fe++]=25,ae[fe++]=r>>8,ae[fe++]=255&r):(ae[fe++]=26,le.setUint32(fe,r),fe+=4);else if("object"===i)if(r){if(s){let e=s.get(r);if(e){if(ae[fe++]=216,ae[fe++]=29,ae[fe++]=25,!e.references){let t=s.idsToInsert||(s.idsToInsert=[]);e.references=[],t.push(e)}return e.references.push(fe-t),void(fe+=2)}s.set(r,{offset:fe-t})}let e=r.constructor;if(e===Object)m(r,!0);else if(e===Array){(n=r.length)<24?ae[fe++]=128|n:be(n);for(let e=0;e<n;e++)w(r[e])}else if(e===Map)if((this.mapsAsObjects?!1!==this.useTag259ForMaps:this.useTag259ForMaps)&&(ae[fe++]=217,ae[fe++]=1,ae[fe++]=3),(n=r.size)<24?ae[fe++]=160|n:n<256?(ae[fe++]=184,ae[fe++]=n):n<65536?(ae[fe++]=185,ae[fe++]=n>>8,ae[fe++]=255&n):(ae[fe++]=186,le.setUint32(fe,n),fe+=4),a.keyMap)for(let[e,t]of r)w(a.encodeKey(e)),w(t);else for(let[e,t]of r)w(e),w(t);else{for(let e=0,t=X.length;e<t;e++){if(r instanceof ee[e]){let t=X[e],n=t.tag;return null==n&&(n=t.getTag&&t.getTag.call(this,r)),n<24?ae[fe++]=192|n:n<256?(ae[fe++]=216,ae[fe++]=n):n<65536?(ae[fe++]=217,ae[fe++]=n>>8,ae[fe++]=255&n):n>-1&&(ae[fe++]=218,le.setUint32(fe,n),fe+=4),void t.encode.call(this,r,w,A)}}if(r[Symbol.iterator]){if(oe){let e=new Error("Iterable should be serialized as iterator");throw e.iteratorNotHandled=!0,e}ae[fe++]=159;for(let e of r)w(e);return void(ae[fe++]=255)}if(r[Symbol.asyncIterator]||me(r)){let e=new Error("Iterable/blob should be serialized as iterator");throw e.iteratorNotHandled=!0,e}m(r,!r.hasOwnProperty)}}else ae[fe++]=246;else if("boolean"===i)ae[fe++]=r?245:244;else if("bigint"===i){if(r<BigInt(1)<<BigInt(64)&&r>=0)ae[fe++]=27,le.setBigUint64(fe,r);else if(r>-(BigInt(1)<<BigInt(64))&&r<0)ae[fe++]=59,le.setBigUint64(fe,-r-BigInt(1));else{if(!this.largeBigIntToFloat)throw new RangeError(r+" was too large to fit in CBOR 64-bit integer format, set largeBigIntToFloat to convert to float-64");ae[fe++]=251,le.setFloat64(fe,Number(r))}fe+=8}else{if("undefined"!==i)throw new Error("Unknown type: "+i);ae[fe++]=247}},m=!1===this.useRecords?this.variableMapSize?e=>{let t=Object.keys(e),r=Object.values(e),n=t.length;if(n<24?ae[fe++]=160|n:n<256?(ae[fe++]=184,ae[fe++]=n):n<65536?(ae[fe++]=185,ae[fe++]=n>>8,ae[fe++]=255&n):(ae[fe++]=186,le.setUint32(fe,n),fe+=4),a.keyMap)for(let e=0;e<n;e++)w(encodeKey(t[e])),w(r[e]);else for(let e=0;e<n;e++)w(t[e]),w(r[e])}:(e,r)=>{ae[fe++]=185;let n=fe-t;fe+=2;let i=0;if(a.keyMap)for(let t in e)(r||e.hasOwnProperty(t))&&(w(a.encodeKey(t)),w(e[t]),i++);else for(let t in e)(r||e.hasOwnProperty(t))&&(w(t),w(e[t]),i++);ae[n+++t]=i>>8,ae[n+t]=255&i}:(e,t)=>{let r,s,o,a=i.transitions||(i.transitions=Object.create(null)),l=0,f=0;if(this.keyMap){o=Object.keys(e).map((e=>this.encodeKey(e))),f=o.length;for(let e=0;e<f;e++){let t=o[e];r=a[t],r||(r=a[t]=Object.create(null),l++),a=r}}else for(let n in e)(t||e.hasOwnProperty(n))&&(r=a[n],r||(1048576&a[he]&&(s=65535&a[he]),r=a[n]=Object.create(null),l++),a=r,f++);let c=a[he];if(void 0!==c)c&=65535,ae[fe++]=217,ae[fe++]=c>>8|224,ae[fe++]=255&c;else{if(o||(o=a.__keys__||(a.__keys__=Object.keys(e))),void 0===s?(c=i.nextId++,c||(c=0,i.nextId=1),c>=256&&(i.nextId=(c=u)+1)):c=s,i[c]=o,!(c<u)){if(a[he]=c,le.setUint32(fe,3655335680),fe+=3,l&&(g+=b*l),p.length>=256-u&&(p.shift()[he]=void 0),p.push(a),be(f+2),w(57344+c),w(o),null===t)return;for(let r in e)(t||e.hasOwnProperty(r))&&w(e[r]);return}ae[fe++]=217,ae[fe++]=c>>8|224,ae[fe++]=255&c,a=i.transitions;for(let e=0;e<f;e++)(void 0===a[he]||1048576&a[he])&&(a[he]=c),a=a[o[e]];a[he]=1048576|c,n=!0}if(f<24?ae[fe++]=128|f:be(f),null!==t)for(let r in e)(t||e.hasOwnProperty(r))&&w(e[r])},A=e=>{let r;if(e>16777216){if(e-t>se)throw new Error("Encoded buffer would be larger than maximum buffer size");r=Math.min(se,4096*Math.round(Math.max((e-t)*(e>67108864?1.25:2),4194304)/4096))}else r=1+(Math.max(e-t<<2,ae.length-1)>>12)<<12;let n=new ne(r);return le=new DataView(n.buffer,0,r),ae.copy?ae.copy(n,0,t,e):n.set(ae.slice(t,e)),fe-=t,t=0,ue=n.length-10,ae=n};let v=100,k=1e3;function*U(e,r,n){let i=e.constructor;if(i===Object){let t=!1!==a.useRecords;t?m(e,null):pe(Object.keys(e).length,160);for(let n in e){let i=e[n];t||w(n),i&&"object"==typeof i?r[n]?yield*U(i,r[n]):yield*I(i,r,n):w(i)}}else if(i===Array){let n=e.length;be(n);for(let i=0;i<n;i++){let n=e[i];n&&("object"==typeof n||fe-t>v)?r.element?yield*U(n,r.element):yield*I(n,r,"element"):w(n)}}else if(e[Symbol.iterator]){ae[fe++]=159;for(let n of e)n&&("object"==typeof n||fe-t>v)?r.element?yield*U(n,r.element):yield*I(n,r,"element"):w(n);ae[fe++]=255}else me(e)?(pe(e.size,64),yield ae.subarray(t,fe),yield e,E()):e[Symbol.asyncIterator]?(ae[fe++]=159,yield ae.subarray(t,fe),yield e,E(),ae[fe++]=255):w(e);n&&fe>t?yield ae.subarray(t,fe):fe-t>v&&(yield ae.subarray(t,fe),E())}function*I(e,r,n){let i=fe-t;try{w(e),fe-t>v&&(yield ae.subarray(t,fe),E())}catch(s){if(!s.iteratorNotHandled)throw s;r[n]={},fe=t+i,yield*U.call(this,e,r[n])}}function E(){v=k,a.encode(null,Fe)}function M(e,t,r){return v=t&&t.chunkThreshold?k=t.chunkThreshold:100,e&&"object"==typeof e?(a.encode(null,Fe),r(e,a.iterateProperties||(a.iterateProperties={}),!0)):[a.encode(e)]}async function*O(e,t){for(let r of U(e,t,!0)){let e=r.constructor;if(e===ie||e===Uint8Array)yield r;else if(me(r)){let e,t=r.stream().getReader();for(;!(e=await t.read()).done;)yield e.value}else if(r[Symbol.asyncIterator])for await(let e of r)E(),e?yield*O(e,t.async||(t.async={})):yield a.encode(e);else yield r}}this.encodeAsIterable=function(e,t){return M(e,t,U)},this.encodeAsAsyncIterable=function(e,t){return M(e,t,O)}}useBuffer(e){ae=e,le=new DataView(ae.buffer,ae.byteOffset,ae.byteLength),fe=0}clearSharedData(){this.structures&&(this.structures=[]),this.sharedValues&&(this.sharedValues=void 0)}updateSharedData(){let e=this.sharedVersion||0;this.sharedVersion=e+1;let t=this.structures.slice(0),r=new ge(t,this.sharedValues,this.sharedVersion),n=this.saveShared(r,(t=>(t&&t.version||0)==e));return!1===n?(r=this.getShared()||{},this.structures=r.structures||[],this.sharedValues=r.packedValues,this.sharedVersion=r.version,this.structures.nextId=this.structures.length):t.forEach(((e,t)=>this.structures[t]=e)),n}}function pe(e,t){e<24?ae[fe++]=t|e:e<256?(ae[fe++]=24|t,ae[fe++]=e):e<65536?(ae[fe++]=25|t,ae[fe++]=e>>8,ae[fe++]=255&e):(ae[fe++]=26|t,le.setUint32(fe,e),fe+=4)}class ge{constructor(e,t,r){this.structures=e,this.packedValues=t,this.version=r}}function be(e){e<24?ae[fe++]=128|e:e<256?(ae[fe++]=152,ae[fe++]=e):e<65536?(ae[fe++]=153,ae[fe++]=e>>8,ae[fe++]=255&e):(ae[fe++]=154,le.setUint32(fe,e),fe+=4)}const we="undefined"==typeof Blob?function(){}:Blob;function me(e){if(e instanceof we)return!0;let t=e[Symbol.toStringTag];return"Blob"===t||"File"===t}function Ae(e,t){switch(typeof e){case"string":if(e.length>3){if(t.objectMap[e]>-1||t.values.length>=t.maxValues)return;let r=t.get(e);if(r)2==++r.count&&t.values.push(e);else if(t.set(e,{count:1}),t.samplingPackedValues){let r=t.samplingPackedValues.get(e);r?r.count++:t.samplingPackedValues.set(e,{count:1})}}break;case"object":if(e)if(e instanceof Array)for(let r=0,n=e.length;r<n;r++)Ae(e[r],t);else{let n=!t.encoder.useRecords;for(var r in e)e.hasOwnProperty(r)&&(n&&Ae(r,t),Ae(e[r],t))}break;case"function":console.log(e)}}const ve=1==new Uint8Array(new Uint16Array([1]).buffer)[0];function ke(e,t){return!ve&&t>1&&(e-=4),{tag:e,encode:function(e,t){let r=e.byteLength,n=e.byteOffset||0,i=e.buffer||e;t(re?te.from(i,n,r):new Uint8Array(i,n,r))}}}function Ue(e,t){let r=e.byteLength;r<24?ae[fe++]=64+r:r<256?(ae[fe++]=88,ae[fe++]=r):r<65536?(ae[fe++]=89,ae[fe++]=r>>8,ae[fe++]=255&r):(ae[fe++]=90,le.setUint32(fe,r),fe+=4),fe+r>=ae.length&&t(fe+r),ae.set(e.buffer?e:new Uint8Array(e),fe),fe+=r}function Ie(e,t){le.setUint32(ce.position+e,fe-ce.position-e+1);let r=ce;ce=null,t(r[0]),t(r[1])}ee=[Date,Set,Error,RegExp,_,ArrayBuffer,Uint8Array,Uint8ClampedArray,Uint16Array,Uint32Array,"undefined"==typeof BigUint64Array?function(){}:BigUint64Array,Int8Array,Int16Array,Int32Array,"undefined"==typeof BigInt64Array?function(){}:BigInt64Array,Float32Array,Float64Array,ge],X=[{tag:1,encode(e,t){let r=e.getTime()/1e3;(this.useTimestamp32||0===e.getMilliseconds())&&r>=0&&r<4294967296?(ae[fe++]=26,le.setUint32(fe,r),fe+=4):(ae[fe++]=251,le.setFloat64(fe,r),fe+=8)}},{tag:258,encode(e,t){t(Array.from(e))}},{tag:27,encode(e,t){t([e.name,e.message])}},{tag:27,encode(e,t){t(["RegExp",e.source,e.flags])}},{getTag:e=>e.tag,encode(e,t){t(e.value)}},{encode(e,t,r){Ue(e,r)}},{getTag(e){if(e.constructor===Uint8Array&&(this.tagUint8Array||re&&!1!==this.tagUint8Array))return 64},encode(e,t,r){Ue(e,r)}},ke(68,1),ke(69,2),ke(70,4),ke(71,8),ke(72,1),ke(77,2),ke(78,4),ke(79,8),ke(85,4),ke(86,8),{encode(e,t){let r=e.packedValues||[],n=e.structures||[];if(r.values.length>0){ae[fe++]=216,ae[fe++]=51,be(4);let e=r.values;t(e),be(0),be(0),packedObjectMap=Object.create(sharedPackedObjectMap||null);for(let t=0,r=e.length;t<r;t++)packedObjectMap[e[t]]=t}if(n){le.setUint32(fe,3655335424),fe+=3;let r=n.slice(0);r.unshift(57344),r.push(new _(e.version,1399353956)),t(r)}else t(new _(e.version,1399353956))}}];let Ee=new ye({useRecords:!1});const Me=Ee.encode,Oe=Ee.encodeAsIterable,Se=Ee.encodeAsAsyncIterable,{NEVER:je,ALWAYS:xe,DECIMAL_ROUND:Be,DECIMAL_FIT:Ve}=G,_e=512,Re=1024,Fe=2048;e.ALWAYS=xe,e.DECIMAL_FIT=Ve,e.DECIMAL_ROUND=Be,e.Decoder=v,e.Encoder=ye,e.FLOAT32_OPTIONS=G,e.NEVER=je,e.REUSE_BUFFER_MODE=_e,e.Tag=_,e.addExtension=function(e){if(e.Class){if(!e.encode)throw new Error("Extension has no encode function");ee.unshift(e.Class),X.unshift(e)}!function(e){g[e.tag]=e.decode}(e)},e.clearSource=Y,e.decode=Z,e.decodeIter=function(e,t={}){if(!e||"object"!=typeof e)throw new Error("first argument must be an Iterable, Async Iterable, Iterator, Async Iterator, or a promise");const r=new v(t);let n;const i=e=>{let t;n&&(e=Buffer.concat([n,e]),n=void 0);try{t=r.decodeMultiple(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},e.decodeMultiple=q,e.encode=Me,e.encodeAsAsyncIterable=Se,e.encodeAsIterable=Oe,e.encodeIter=function(e,t={}){if(e&&"object"==typeof e){if("function"==typeof e[Symbol.iterator])return function*(e,t){const r=new ye(t);for(const t of e)yield r.encode(t)}(e,t);if("function"==typeof e.then||"function"==typeof e[Symbol.asyncIterator])return async function*(e,t){const r=new ye(t);for await(const t of e)yield r.encode(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.isNativeAccelerationEnabled=!1,e.roundFloat32=function(e){B[0]=e;let t=J[(127&V[3])<<1|V[2]>>7];return(t*e+(e>0?.5:-.5)>>0)/t}}));
!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).CBOR={})}(this,(function(e){"use strict";let t,r,n;try{t=new TextDecoder}catch(e){}let i=0;const s={};let o,a,l,u,f,c,d,h={},y=0,p=0,g=[],b=[],w={useRecords:!1,mapsAsObjects:!0},m=!1,A=2;try{new Function("")}catch(e){A=1/0}class v{constructor(e){if(e&&(!e.keyMap&&!e._keyMap||e.useRecords||(e.useRecords=!1,e.mapsAsObjects=!0),!1===e.useRecords&&void 0===e.mapsAsObjects&&(e.mapsAsObjects=!0),e.getStructures&&(e.getShared=e.getStructures),e.getShared&&!e.structures&&((e.structures=[]).uninitialized=!0),e.keyMap)){this.mapKey=new Map;for(let[t,r]of Object.entries(e.keyMap))this.mapKey.set(r,t)}Object.assign(this,e)}decodeKey(e){return this.keyMap&&this.mapKey.get(e)||e}encodeKey(e){return this.keyMap&&this.keyMap.hasOwnProperty(e)?this.keyMap[e]:e}encodeKeys(e){if(!this._keyMap)return e;let t=new Map;for(let[r,n]of Object.entries(e))t.set(this._keyMap.hasOwnProperty(r)?this._keyMap[r]:r,n);return t}decodeKeys(e){if(!this._keyMap||"Map"!=e.constructor.name)return e;if(!this._mapKey){this._mapKey=new Map;for(let[e,t]of Object.entries(this._keyMap))this._mapKey.set(t,e)}let t={};return e.forEach(((e,r)=>t[M(this._mapKey.has(r)?this._mapKey.get(r):r)]=e)),t}mapDecode(e,t){let r=this.decode(e);return this._keyMap&&"Array"===r.constructor.name?r.map((e=>this.decodeKeys(e))):r}decode(e,t){if(r)return J((()=>(H(),this?this.decode(e,t):v.prototype.decode.call(w,e,t))));n=t>-1?t:e.length,i=0,p=0,a=null,l=null,r=e;try{c=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 v){if(h=this,f=this.sharedValues&&(this.pack?new Array(this.maxPrivatePackedValues||16).concat(this.sharedValues):this.sharedValues),this.structures)return o=this.structures,k();(!o||o.length>0)&&(o=[])}else h=w,(!o||o.length>0)&&(o=[]),f=null;return k()}decodeMultiple(e,t){let r,n=0;try{let s=e.length;m=!0;let o=this?this.decode(e,s):$.decode(e,s);if(!t){for(r=[o];i<s;)n=i,r.push(k());return r}if(!1===t(o))return;for(;i<s;)if(n=i,!1===t(k()))return}catch(e){throw e.lastPosition=n,e.values=r,e}finally{m=!1,H()}}}function k(){try{let e=U();if(l){if(i>=l.postBundlePosition){let e=new Error("Unexpected bundle position");throw e.incomplete=!0,e}i=l.postBundlePosition,l=null}if(i==n)o=null,r=null,u&&(u=null);else{if(i>n){let e=new Error("Unexpected end of CBOR data");throw e.incomplete=!0,e}if(!m)throw new Error("Data read, but end of buffer not reached")}return e}catch(e){throw H(),(e instanceof RangeError||e.message.startsWith("Unexpected end of buffer"))&&(e.incomplete=!0),e}}function U(){let e=r[i++],t=e>>5;if(e&=31,e>23)switch(e){case 24:e=r[i++];break;case 25:if(7==t)return function(){let e=r[i++],t=r[i++],n=(127&e)>>2;if(31===n)return t||3&e?NaN:128&e?-1/0:1/0;if(0===n){let r=((3&e)<<8|t)/(1<<24);return 128&e?-r:r}return V[3]=128&e|56+(n>>1),V[2]=(7&e)<<5|t>>3,V[1]=t<<5,V[0]=0,B[0]}();e=c.getUint16(i),i+=2;break;case 26:if(7==t){let e=c.getFloat32(i);if(h.useFloat32>2){let t=Y[(127&r[i])<<1|r[i+1]>>7];return i+=4,(t*e+(e>0?.5:-.5)>>0)/t}return i+=4,e}e=c.getUint32(i),i+=4;break;case 27:if(7==t){let e=c.getFloat64(i);return i+=8,e}if(t>1){if(c.getUint32(i)>0)throw new Error("JavaScript does not support arrays, maps, or strings with length over 4294967295");e=c.getUint32(i+4)}else h.int64AsNumber?(e=4294967296*c.getUint32(i),e+=c.getUint32(i+4)):e=c.getBigUint64(i);i+=8;break;case 31:switch(t){case 2:case 3:throw new Error("Indefinite length not supported for byte or text strings");case 4:let e,r=[],n=0;for(;(e=U())!=s;)r[n++]=e;return 4==t?r:3==t?r.join(""):Buffer.concat(r);case 5:let i;if(h.mapsAsObjects){let e={};if(h.keyMap)for(;(i=U())!=s;)e[M(h.decodeKey(i))]=U();else for(;(i=U())!=s;)e[M(i)]=U();return e}{d&&(h.mapsAsObjects=!0,d=!1);let e=new Map;if(h.keyMap)for(;(i=U())!=s;)e.set(h.decodeKey(i),U());else for(;(i=U())!=s;)e.set(i,U());return e}case 7:return s;default:throw new Error("Invalid major type for indefinite length "+t)}default:throw new Error("Unknown token "+e)}switch(t){case 0:return e;case 1:return~e;case 2:return u=e,h.copyBuffers?Uint8Array.prototype.slice.call(r,i,i+=u):r.subarray(i,i+=u);case 3:if(p>=i)return a.slice(i-y,(i+=e)-y);if(0==p&&n<140&&e<32){let t=e<16?x(e):function(e){let t=i,n=new Array(e);for(let s=0;s<e;s++){const e=r[i++];if((128&e)>0)return void(i=t);n[s]=e}return j.apply(String,n)}(e);if(null!=t)return t}return O(e);case 4:let t=new Array(e);for(let r=0;r<e;r++)t[r]=U();return t;case 5:if(h.mapsAsObjects){let t={};if(h.keyMap)for(let r=0;r<e;r++)t[M(h.decodeKey(U()))]=U();else for(let r=0;r<e;r++)t[M(U())]=U();return t}{d&&(h.mapsAsObjects=!0,d=!1);let t=new Map;if(h.keyMap)for(let r=0;r<e;r++)t.set(h.decodeKey(U()),U());else for(let r=0;r<e;r++)t.set(U(),U());return t}case 6:if(e>=57337){let t=o[8191&e];if(t)return t.read||(t.read=E(t)),t.read();if(e<65536){if(57343==e){let e=z(),t=U(),r=U();R(t,r);let n={};if(h.keyMap)for(let t=2;t<e;t++){n[M(h.decodeKey(r[t-2]))]=U()}else for(let t=2;t<e;t++){n[M(r[t-2])]=U()}return n}if(57342==e){let e=z(),t=U();for(let r=2;r<e;r++)R(t++,U());return U()}if(57337==e)return function(){let e=z(),t=i+U();for(let t=2;t<e;t++){let e=z();i+=e}let r=i;return i=t,l=[S(z()),S(z())],l.position0=0,l.position1=0,l.postBundlePosition=i,i=r,U()}();if(h.getShared&&(W(),t=o[8191&e],t))return t.read||(t.read=E(t)),t.read()}}let s=g[e];if(s)return s.handlesRead?s(U):s(U());{let t=U();for(let r=0;r<b.length;r++){let n=b[r](e,t);if(void 0!==n)return n}return new _(t,e)}case 7:switch(e){case 20:return!1;case 21:return!0;case 22:return null;case 23:return;default:let t=(f||D())[e];if(void 0!==t)return t;throw new Error("Unknown token "+e)}default:if(isNaN(e)){let e=new Error("Unexpected end of CBOR data");throw e.incomplete=!0,e}throw new Error("Unknown CBOR token "+e)}var u}const I=/^[a-zA-Z_$][a-zA-Z\d_$]*$/;function E(e){return e.slowReads=0,function(){let e=r[i++];if(e&=31,e>23)switch(e){case 24:e=r[i++];break;case 25:e=c.getUint16(i),i+=2;break;case 26:e=c.getUint32(i),i+=4;break;default:throw new Error("Expected array header, but got "+r[i-1])}let t=this.compiledReader;for(;t;){if(t.propertyCount===e)return t(U);t=t.next}if(this.slowReads++>=A){let r=this.length==e?this:this.slice(0,e);return t=h.keyMap?new Function("r","return {"+r.map((e=>h.decodeKey(e))).map((e=>I.test(e)?M(e)+":r()":"["+JSON.stringify(e)+"]:r()")).join(",")+"}"):new Function("r","return {"+r.map((e=>I.test(e)?M(e)+":r()":"["+JSON.stringify(e)+"]:r()")).join(",")+"}"),this.compiledReader&&(t.next=this.compiledReader),t.propertyCount=e,this.compiledReader=t,t(U)}let n={};if(h.keyMap)for(let t=0;t<e;t++)n[M(h.decodeKey(this[t]))]=U();else for(let t=0;t<e;t++)n[M(this[t])]=U();return n}}function M(e){return"__proto__"===e?"__proto_":e}let O=S;function S(e){let n;if(e<16&&(n=x(e)))return n;if(e>64&&t)return t.decode(r.subarray(i,i+=e));const s=i+e,o=[];for(n="";i<s;){const e=r[i++];if(0==(128&e))o.push(e);else if(192==(224&e)){const t=63&r[i++];o.push((31&e)<<6|t)}else if(224==(240&e)){const t=63&r[i++],n=63&r[i++];o.push((31&e)<<12|t<<6|n)}else if(240==(248&e)){let t=(7&e)<<18|(63&r[i++])<<12|(63&r[i++])<<6|63&r[i++];t>65535&&(t-=65536,o.push(t>>>10&1023|55296),t=56320|1023&t),o.push(t)}else o.push(e);o.length>=4096&&(n+=j.apply(String,o),o.length=0)}return o.length>0&&(n+=j.apply(String,o)),n}let j=String.fromCharCode;function x(e){if(e<4){if(e<2){if(0===e)return"";{let e=r[i++];return(128&e)>1?void(i-=1):j(e)}}{let t=r[i++],n=r[i++];if((128&t)>0||(128&n)>0)return void(i-=2);if(e<3)return j(t,n);let s=r[i++];return(128&s)>0?void(i-=3):j(t,n,s)}}{let t=r[i++],n=r[i++],s=r[i++],o=r[i++];if((128&t)>0||(128&n)>0||(128&s)>0||(128&o)>0)return void(i-=4);if(e<6){if(4===e)return j(t,n,s,o);{let e=r[i++];return(128&e)>0?void(i-=5):j(t,n,s,o,e)}}if(e<8){let a=r[i++],l=r[i++];if((128&a)>0||(128&l)>0)return void(i-=6);if(e<7)return j(t,n,s,o,a,l);let u=r[i++];return(128&u)>0?void(i-=7):j(t,n,s,o,a,l,u)}{let a=r[i++],l=r[i++],u=r[i++],f=r[i++];if((128&a)>0||(128&l)>0||(128&u)>0||(128&f)>0)return void(i-=8);if(e<10){if(8===e)return j(t,n,s,o,a,l,u,f);{let e=r[i++];return(128&e)>0?void(i-=9):j(t,n,s,o,a,l,u,f,e)}}if(e<12){let c=r[i++],d=r[i++];if((128&c)>0||(128&d)>0)return void(i-=10);if(e<11)return j(t,n,s,o,a,l,u,f,c,d);let h=r[i++];return(128&h)>0?void(i-=11):j(t,n,s,o,a,l,u,f,c,d,h)}{let c=r[i++],d=r[i++],h=r[i++],y=r[i++];if((128&c)>0||(128&d)>0||(128&h)>0||(128&y)>0)return void(i-=12);if(e<14){if(12===e)return j(t,n,s,o,a,l,u,f,c,d,h,y);{let e=r[i++];return(128&e)>0?void(i-=13):j(t,n,s,o,a,l,u,f,c,d,h,y,e)}}{let p=r[i++],g=r[i++];if((128&p)>0||(128&g)>0)return void(i-=14);if(e<15)return j(t,n,s,o,a,l,u,f,c,d,h,y,p,g);let b=r[i++];return(128&b)>0?void(i-=15):j(t,n,s,o,a,l,u,f,c,d,h,y,p,g,b)}}}}}let B=new Float32Array(1),V=new Uint8Array(B.buffer,0,4);new Array(4096);class _{constructor(e,t){this.value=e,this.tag=t}}g[0]=e=>new Date(e),g[1]=e=>new Date(Math.round(1e3*e)),g[2]=e=>{let t=BigInt(0);for(let r=0,n=e.byteLength;r<n;r++)t=BigInt(e[r])+t<<BigInt(8);return t},g[3]=e=>BigInt(-1)-g[2](e),g[4]=e=>+(e[1]+"e"+e[0]),g[5]=e=>e[1]*Math.exp(e[0]*Math.log(2));const R=(e,t)=>{let r=o[e-=57344];r&&r.isShared&&((o.restoreStructures||(o.restoreStructures=[]))[e]=r),o[e]=t,t.read=E(t)};g[105]=e=>{let t=e.length,r=e[1];R(e[0],r);let n={};for(let i=2;i<t;i++){n[M(r[i-2])]=e[i]}return n},g[14]=e=>l?l[0].slice(l.position0,l.position0+=e):new _(e,14),g[15]=e=>l?l[1].slice(l.position1,l.position1+=e):new _(e,15);let F={Error:Error,RegExp:RegExp};g[27]=e=>(F[e[0]]||Error)(e[1],e[2]);const T=e=>{if(132!=r[i++])throw new Error("Packed values structure must be followed by a 4 element array");let t=e();return f=f?t.concat(f.slice(t.length)):t,f.prefixes=e(),f.suffixes=e(),e()};function P(e,t){return"string"==typeof e?e+t:e instanceof Array?e.concat(t):Object.assign({},e,t)}function D(){if(!f){if(!h.getShared)throw new Error("No packed values available");W()}return f}T.handlesRead=!0,g[51]=T,g[6]=e=>{if(!f){if(!h.getShared)return new _(e,6);W()}if("number"==typeof e)return f[16+(e>=0?2*e:-2*e-1)];throw new Error("No support for non-integer packed references yet")},g[28]=e=>{u||(u=new Map,u.id=0);let t,n=u.id++;t=r[i]>>5==4?[]:{};let s={target:t};u.set(n,s);let o=e();return s.used?Object.assign(t,o):(s.target=o,o)},g[28].handlesRead=!0,g[29]=e=>{let t=u.get(e);return t.used=!0,t.target},g[258]=e=>new Set(e),(g[259]=e=>(h.mapsAsObjects&&(h.mapsAsObjects=!1,d=!0),e())).handlesRead=!0;b.push(((e,t)=>e>=225&&e<=255?P(D().prefixes[e-224],t):e>=28704&&e<=32767?P(D().prefixes[e-28672],t):e>=1879052288&&e<=2147483647?P(D().prefixes[e-1879048192],t):e>=216&&e<=223?P(t,D().suffixes[e-216]):e>=27647&&e<=28671?P(t,D().suffixes[e-27639]):e>=1811940352&&e<=1879048191?P(t,D().suffixes[e-1811939328]):1399353956==e?{packedValues:f,structures:o.slice(0),version:t}:55799==e?t:void 0));const C=1==new Uint8Array(new Uint16Array([1]).buffer)[0],K=[Uint8Array,Uint8ClampedArray,Uint16Array,Uint32Array,"undefined"==typeof BigUint64Array?{name:"BigUint64Array"}:BigUint64Array,Int8Array,Int16Array,Int32Array,"undefined"==typeof BigInt64Array?{name:"BigInt64Array"}:BigInt64Array,Float32Array,Float64Array],N=[64,68,69,70,71,72,77,78,79,85,86];for(let e=0;e<K.length;e++)L(K[e],N[e]);function L(e,t){let r,n="get"+e.name.slice(0,-5);"function"==typeof e?r=e.BYTES_PER_ELEMENT:e=null;for(let i=0;i<2;i++){if(!i&&1==r)continue;let s=2==r?1:4==r?2:3;g[i?t:t-4]=1==r||i==C?r=>{if(!e)throw new Error("Could not find typed array for code "+t);return new e(Uint8Array.prototype.slice.call(r,0).buffer)}:r=>{if(!e)throw new Error("Could not find typed array for code "+t);let o=new DataView(r.buffer,r.byteOffset,r.byteLength),a=r.length>>s,l=new e(a),u=o[n];for(let e=0;e<a;e++)l[e]=u.call(o,e<<s,i);return l}}}function z(){let e=31&r[i++];if(e>23)switch(e){case 24:e=r[i++];break;case 25:e=c.getUint16(i),i+=2;break;case 26:e=c.getUint32(i),i+=4}return e}function W(){if(h.getShared){let e=J((()=>(r=null,h.getShared())))||{},t=e.structures||[];h.sharedVersion=e.version,f=h.sharedValues=e.packedValues,!0===o?h.structures=o=t:o.splice.apply(o,[0,t.length].concat(t))}}function J(e){let t=n,s=i,f=y,d=p,g=a,b=u,w=l,A=new Uint8Array(r.slice(0,n)),v=o,k=h,U=m,I=e();return n=t,i=s,y=f,p=d,a=g,u=b,l=w,r=A,m=U,o=v,h=k,c=new DataView(r.buffer,r.byteOffset,r.byteLength),I}function H(){r=null,u=null,o=null}const Y=new Array(147);for(let e=0;e<256;e++)Y[e]=+("1e"+Math.floor(45.15-.30103*e));let $=new v({useRecords:!1});const Z=$.decode,q=$.decodeMultiple,G={NEVER:0,ALWAYS:1,DECIMAL_ROUND:3,DECIMAL_FIT:4};let Q,X,ee;try{Q=new TextEncoder}catch(e){}const te="object"==typeof globalThis&&globalThis.Buffer,re=void 0!==te,ne=re?te.allocUnsafeSlow:Uint8Array,ie=re?te:Uint8Array,se=re?4294967296:2144337920;let oe,ae,le,ue,fe=0,ce=null;const de=/[\u0080-\uFFFF]/,he=Symbol("record-id");class ye extends v{constructor(e){let t,r,n,i,s;super(e),this.offset=0,e=e||{};let o=ie.prototype.utf8Write?function(e,t,r){return ae.utf8Write(e,t,r)}:!(!Q||!Q.encodeInto)&&function(e,t){return Q.encodeInto(e,ae.subarray(t)).written},a=this,l=e.structures||e.saveStructures,u=e.maxSharedStructures;if(null==u&&(u=l?128:0),u>8190)throw new Error("Maximum maxSharedStructure is 8190");let f=e.sequential;f&&(u=0),this.structures||(this.structures=[]),this.saveStructures&&(this.saveShared=this.saveStructures);let c,d,h,y=e.sharedValues;if(y){h=Object.create(null);for(let e=0,t=y.length;e<t;e++)h[y[e]]=e}let p=[],g=0,b=0;this.mapEncode=function(e,t){if(this._keyMap&&!this._mapped&&"Array"===e.constructor.name)e=e.map((e=>this.encodeKeys(e)));return this.encode(e,t)},this.encode=function(o,l){if(ae||(ae=new ne(8192),le=new DataView(ae.buffer,0,8192),fe=0),ue=ae.length-10,ue-fe<2048?(ae=new ne(ae.length),le=new DataView(ae.buffer,0,ae.length),ue=ae.length-10,fe=0):l===_e&&(fe=fe+7&2147483640),t=fe,a.useSelfDescribedHeader&&(le.setUint32(fe,3654940416),fe+=3),s=a.structuredClone?new Map:null,a.bundleStrings&&"string"!=typeof o?(ce=[],ce.size=1/0):ce=null,r=a.structures,r){if(r.uninitialized){let e=a.getShared()||{};a.structures=r=e.structures||[],a.sharedVersion=e.version;let t=a.sharedValues=e.packedValues;if(t){h={};for(let e=0,r=t.length;e<r;e++)h[t[e]]=e}}let e=r.length;if(e>u&&!f&&(e=u),!r.transitions){r.transitions=Object.create(null);for(let t=0;t<e;t++){let e=r[t];if(!e)continue;let n,i=r.transitions;for(let r=0,s=e.length;r<s;r++){void 0===i[he]&&(i[he]=t);let s=e[r];n=i[s],n||(n=i[s]=Object.create(null)),i=n}i[he]=1048576|t}}f||(r.nextId=e)}if(n&&(n=!1),i=r||[],d=h,e.pack){let t=new Map;if(t.values=[],t.encoder=a,t.maxValues=e.maxPrivatePackedValues||(h?16:1/0),t.objectMap=h||!1,t.samplingPackedValues=c,Ae(o,t),t.values.length>0){ae[fe++]=216,ae[fe++]=51,be(4);let e=t.values;w(e),be(0),be(0),d=Object.create(h||null);for(let t=0,r=e.length;t<r;t++)d[e[t]]=t}}oe=l&Fe;try{if(oe)return;if(w(o),ce&&Ie(t,w),a.offset=fe,s&&s.idsToInsert){fe+=2*s.idsToInsert.length,fe>ue&&A(fe),a.offset=fe;let e=function(e,t){let r,n=2*t.length,i=e.length-n;t.sort(((e,t)=>e.offset>t.offset?1:-1));for(let r=0;r<t.length;r++){let n=t[r];n.id=r;for(let t of n.references)e[t++]=r>>8,e[t]=255&r}for(;r=t.pop();){let t=r.offset;e.copyWithin(t+n,t,i),n-=2;let s=t+n;e[s++]=216,e[s++]=28,i=t}return e}(ae.subarray(t,fe),s.idsToInsert);return s=null,e}return l&_e?(ae.start=t,ae.end=fe,ae):ae.subarray(t,fe)}finally{if(r)if(b<10&&b++,r.length>u&&(r.length=u),g>1e4)r.transitions=null,b=0,g=0,p.length>0&&(p=[]);else if(p.length>0&&!f){for(let e=0,t=p.length;e<t;e++)p[e][he]=void 0;p=[]}if(n&&a.saveShared){a.structures.length>u&&(a.structures=a.structures.slice(0,u));let e=ae.subarray(t,fe);return!1===a.updateSharedData()?a.encode(o):e}l&Re&&(fe=t)}},this.findCommonStringsToPack=()=>(c=new Map,h||(h=Object.create(null)),e=>{let t=e&&e.threshold||4,r=this.pack?e.maxPrivatePackedValues||16:0;y||(y=this.sharedValues=[]);for(let[e,i]of c)i.count>t&&(h[e]=r++,y.push(e),n=!0);for(;this.saveShared&&!1===this.updateSharedData(););c=null});const w=r=>{fe>ue&&(ae=A(fe));var n,i=typeof r;if("string"===i){if(d){let t=d[r];if(t>=0)return void(t<16?ae[fe++]=t+224:(ae[fe++]=198,w(1&t?15-t>>1:t-16>>1)));if(c&&!e.pack){let e=c.get(r);e?e.count++:c.set(r,{count:1})}}let i,s=r.length;if(ce&&s>=4&&s<1024){if((ce.size+=s)>61440){let e,r=(ce[0]?3*ce[0].length+ce[1].length:0)+10;fe+r>ue&&(ae=A(fe+r)),ae[fe++]=217,ae[fe++]=223,ae[fe++]=249,ae[fe++]=ce.position?132:130,ae[fe++]=26,e=fe-t,fe+=4,ce.position&&Ie(t,w),ce=["",""],ce.size=0,ce.position=e}let e=de.test(r);return ce[e?0:1]+=r,ae[fe++]=e?206:207,void w(s)}i=s<32?1:s<256?2:s<65536?3:5;let a=3*s;if(fe+a>ue&&(ae=A(fe+a)),s<64||!o){let e,t,o,a=fe+i;for(e=0;e<s;e++)t=r.charCodeAt(e),t<128?ae[a++]=t:t<2048?(ae[a++]=t>>6|192,ae[a++]=63&t|128):55296==(64512&t)&&56320==(64512&(o=r.charCodeAt(e+1)))?(t=65536+((1023&t)<<10)+(1023&o),e++,ae[a++]=t>>18|240,ae[a++]=t>>12&63|128,ae[a++]=t>>6&63|128,ae[a++]=63&t|128):(ae[a++]=t>>12|224,ae[a++]=t>>6&63|128,ae[a++]=63&t|128);n=a-fe-i}else n=o(r,fe+i,a);n<24?ae[fe++]=96|n:n<256?(i<2&&ae.copyWithin(fe+2,fe+1,fe+1+n),ae[fe++]=120,ae[fe++]=n):n<65536?(i<3&&ae.copyWithin(fe+3,fe+2,fe+2+n),ae[fe++]=121,ae[fe++]=n>>8,ae[fe++]=255&n):(i<5&&ae.copyWithin(fe+5,fe+3,fe+3+n),ae[fe++]=122,le.setUint32(fe,n),fe+=4),fe+=n}else if("number"===i)if(this.alwaysUseFloat||r>>>0!==r)if(this.alwaysUseFloat||r>>0!==r){let e;if((e=this.useFloat32)>0&&r<4294967296&&r>=-2147483648){let t;if(ae[fe++]=250,le.setFloat32(fe,r),e<4||(t=r*Y[(127&ae[fe])<<1|ae[fe+1]>>7])>>0===t)return void(fe+=4);fe--}ae[fe++]=251,le.setFloat64(fe,r),fe+=8}else r>=-24?ae[fe++]=31-r:r>=-256?(ae[fe++]=56,ae[fe++]=~r):r>=-65536?(ae[fe++]=57,le.setUint16(fe,~r),fe+=2):(ae[fe++]=58,le.setUint32(fe,~r),fe+=4);else r<24?ae[fe++]=r:r<256?(ae[fe++]=24,ae[fe++]=r):r<65536?(ae[fe++]=25,ae[fe++]=r>>8,ae[fe++]=255&r):(ae[fe++]=26,le.setUint32(fe,r),fe+=4);else if("object"===i)if(r){if(s){let e=s.get(r);if(e){if(ae[fe++]=216,ae[fe++]=29,ae[fe++]=25,!e.references){let t=s.idsToInsert||(s.idsToInsert=[]);e.references=[],t.push(e)}return e.references.push(fe-t),void(fe+=2)}s.set(r,{offset:fe-t})}let e=r.constructor;if(e===Object)m(r,!0);else if(e===Array){(n=r.length)<24?ae[fe++]=128|n:be(n);for(let e=0;e<n;e++)w(r[e])}else if(e===Map)if((this.mapsAsObjects?!1!==this.useTag259ForMaps:this.useTag259ForMaps)&&(ae[fe++]=217,ae[fe++]=1,ae[fe++]=3),(n=r.size)<24?ae[fe++]=160|n:n<256?(ae[fe++]=184,ae[fe++]=n):n<65536?(ae[fe++]=185,ae[fe++]=n>>8,ae[fe++]=255&n):(ae[fe++]=186,le.setUint32(fe,n),fe+=4),a.keyMap)for(let[e,t]of r)w(a.encodeKey(e)),w(t);else for(let[e,t]of r)w(e),w(t);else{for(let e=0,t=X.length;e<t;e++){if(r instanceof ee[e]){let t=X[e],n=t.tag;return null==n&&(n=t.getTag&&t.getTag.call(this,r)),n<24?ae[fe++]=192|n:n<256?(ae[fe++]=216,ae[fe++]=n):n<65536?(ae[fe++]=217,ae[fe++]=n>>8,ae[fe++]=255&n):n>-1&&(ae[fe++]=218,le.setUint32(fe,n),fe+=4),void t.encode.call(this,r,w,A)}}if(r[Symbol.iterator]){if(oe){let e=new Error("Iterable should be serialized as iterator");throw e.iteratorNotHandled=!0,e}ae[fe++]=159;for(let e of r)w(e);return void(ae[fe++]=255)}if(r[Symbol.asyncIterator]||me(r)){let e=new Error("Iterable/blob should be serialized as iterator");throw e.iteratorNotHandled=!0,e}if(this.useToJSON&&r.toJSON){const e=r.toJSON();if(e!==r)return w(e)}m(r,!r.hasOwnProperty)}}else ae[fe++]=246;else if("boolean"===i)ae[fe++]=r?245:244;else if("bigint"===i){if(r<BigInt(1)<<BigInt(64)&&r>=0)ae[fe++]=27,le.setBigUint64(fe,r);else if(r>-(BigInt(1)<<BigInt(64))&&r<0)ae[fe++]=59,le.setBigUint64(fe,-r-BigInt(1));else{if(!this.largeBigIntToFloat)throw new RangeError(r+" was too large to fit in CBOR 64-bit integer format, set largeBigIntToFloat to convert to float-64");ae[fe++]=251,le.setFloat64(fe,Number(r))}fe+=8}else{if("undefined"!==i)throw new Error("Unknown type: "+i);ae[fe++]=247}},m=!1===this.useRecords?this.variableMapSize?e=>{let t=Object.keys(e),r=Object.values(e),n=t.length;if(n<24?ae[fe++]=160|n:n<256?(ae[fe++]=184,ae[fe++]=n):n<65536?(ae[fe++]=185,ae[fe++]=n>>8,ae[fe++]=255&n):(ae[fe++]=186,le.setUint32(fe,n),fe+=4),a.keyMap)for(let e=0;e<n;e++)w(a.encodeKey(t[e])),w(r[e]);else for(let e=0;e<n;e++)w(t[e]),w(r[e])}:(e,r)=>{ae[fe++]=185;let n=fe-t;fe+=2;let i=0;if(a.keyMap)for(let t in e)(r||e.hasOwnProperty(t))&&(w(a.encodeKey(t)),w(e[t]),i++);else for(let t in e)(r||e.hasOwnProperty(t))&&(w(t),w(e[t]),i++);ae[n+++t]=i>>8,ae[n+t]=255&i}:(e,t)=>{let r,s,o,a=i.transitions||(i.transitions=Object.create(null)),l=0,f=0;if(this.keyMap){o=Object.keys(e).map((e=>this.encodeKey(e))),f=o.length;for(let e=0;e<f;e++){let t=o[e];r=a[t],r||(r=a[t]=Object.create(null),l++),a=r}}else for(let n in e)(t||e.hasOwnProperty(n))&&(r=a[n],r||(1048576&a[he]&&(s=65535&a[he]),r=a[n]=Object.create(null),l++),a=r,f++);let c=a[he];if(void 0!==c)c&=65535,ae[fe++]=217,ae[fe++]=c>>8|224,ae[fe++]=255&c;else{if(o||(o=a.__keys__||(a.__keys__=Object.keys(e))),void 0===s?(c=i.nextId++,c||(c=0,i.nextId=1),c>=256&&(i.nextId=(c=u)+1)):c=s,i[c]=o,!(c<u)){if(a[he]=c,le.setUint32(fe,3655335680),fe+=3,l&&(g+=b*l),p.length>=256-u&&(p.shift()[he]=void 0),p.push(a),be(f+2),w(57344+c),w(o),null===t)return;for(let r in e)(t||e.hasOwnProperty(r))&&w(e[r]);return}ae[fe++]=217,ae[fe++]=c>>8|224,ae[fe++]=255&c,a=i.transitions;for(let e=0;e<f;e++)(void 0===a[he]||1048576&a[he])&&(a[he]=c),a=a[o[e]];a[he]=1048576|c,n=!0}if(f<24?ae[fe++]=128|f:be(f),null!==t)for(let r in e)(t||e.hasOwnProperty(r))&&w(e[r])},A=e=>{let r;if(e>16777216){if(e-t>se)throw new Error("Encoded buffer would be larger than maximum buffer size");r=Math.min(se,4096*Math.round(Math.max((e-t)*(e>67108864?1.25:2),4194304)/4096))}else r=1+(Math.max(e-t<<2,ae.length-1)>>12)<<12;let n=new ne(r);return le=new DataView(n.buffer,0,r),ae.copy?ae.copy(n,0,t,e):n.set(ae.slice(t,e)),fe-=t,t=0,ue=n.length-10,ae=n};let v=100,k=1e3;function*U(e,r,n){let i=e.constructor;if(i===Object){let t=!1!==a.useRecords;t?m(e,null):pe(Object.keys(e).length,160);for(let n in e){let i=e[n];t||w(n),i&&"object"==typeof i?r[n]?yield*U(i,r[n]):yield*I(i,r,n):w(i)}}else if(i===Array){let n=e.length;be(n);for(let i=0;i<n;i++){let n=e[i];n&&("object"==typeof n||fe-t>v)?r.element?yield*U(n,r.element):yield*I(n,r,"element"):w(n)}}else if(e[Symbol.iterator]){ae[fe++]=159;for(let n of e)n&&("object"==typeof n||fe-t>v)?r.element?yield*U(n,r.element):yield*I(n,r,"element"):w(n);ae[fe++]=255}else me(e)?(pe(e.size,64),yield ae.subarray(t,fe),yield e,E()):e[Symbol.asyncIterator]?(ae[fe++]=159,yield ae.subarray(t,fe),yield e,E(),ae[fe++]=255):w(e);n&&fe>t?yield ae.subarray(t,fe):fe-t>v&&(yield ae.subarray(t,fe),E())}function*I(e,r,n){let i=fe-t;try{w(e),fe-t>v&&(yield ae.subarray(t,fe),E())}catch(s){if(!s.iteratorNotHandled)throw s;r[n]={},fe=t+i,yield*U.call(this,e,r[n])}}function E(){v=k,a.encode(null,Fe)}function M(e,t,r){return v=t&&t.chunkThreshold?k=t.chunkThreshold:100,e&&"object"==typeof e?(a.encode(null,Fe),r(e,a.iterateProperties||(a.iterateProperties={}),!0)):[a.encode(e)]}async function*O(e,t){for(let r of U(e,t,!0)){let e=r.constructor;if(e===ie||e===Uint8Array)yield r;else if(me(r)){let e,t=r.stream().getReader();for(;!(e=await t.read()).done;)yield e.value}else if(r[Symbol.asyncIterator])for await(let e of r)E(),e?yield*O(e,t.async||(t.async={})):yield a.encode(e);else yield r}}this.encodeAsIterable=function(e,t){return M(e,t,U)},this.encodeAsAsyncIterable=function(e,t){return M(e,t,O)}}useBuffer(e){ae=e,le=new DataView(ae.buffer,ae.byteOffset,ae.byteLength),fe=0}clearSharedData(){this.structures&&(this.structures=[]),this.sharedValues&&(this.sharedValues=void 0)}updateSharedData(){let e=this.sharedVersion||0;this.sharedVersion=e+1;let t=this.structures.slice(0),r=new ge(t,this.sharedValues,this.sharedVersion),n=this.saveShared(r,(t=>(t&&t.version||0)==e));return!1===n?(r=this.getShared()||{},this.structures=r.structures||[],this.sharedValues=r.packedValues,this.sharedVersion=r.version,this.structures.nextId=this.structures.length):t.forEach(((e,t)=>this.structures[t]=e)),n}}function pe(e,t){e<24?ae[fe++]=t|e:e<256?(ae[fe++]=24|t,ae[fe++]=e):e<65536?(ae[fe++]=25|t,ae[fe++]=e>>8,ae[fe++]=255&e):(ae[fe++]=26|t,le.setUint32(fe,e),fe+=4)}class ge{constructor(e,t,r){this.structures=e,this.packedValues=t,this.version=r}}function be(e){e<24?ae[fe++]=128|e:e<256?(ae[fe++]=152,ae[fe++]=e):e<65536?(ae[fe++]=153,ae[fe++]=e>>8,ae[fe++]=255&e):(ae[fe++]=154,le.setUint32(fe,e),fe+=4)}const we="undefined"==typeof Blob?function(){}:Blob;function me(e){if(e instanceof we)return!0;let t=e[Symbol.toStringTag];return"Blob"===t||"File"===t}function Ae(e,t){switch(typeof e){case"string":if(e.length>3){if(t.objectMap[e]>-1||t.values.length>=t.maxValues)return;let r=t.get(e);if(r)2==++r.count&&t.values.push(e);else if(t.set(e,{count:1}),t.samplingPackedValues){let r=t.samplingPackedValues.get(e);r?r.count++:t.samplingPackedValues.set(e,{count:1})}}break;case"object":if(e)if(e instanceof Array)for(let r=0,n=e.length;r<n;r++)Ae(e[r],t);else{let n=!t.encoder.useRecords;for(var r in e)e.hasOwnProperty(r)&&(n&&Ae(r,t),Ae(e[r],t))}break;case"function":console.log(e)}}const ve=1==new Uint8Array(new Uint16Array([1]).buffer)[0];function ke(e,t){return!ve&&t>1&&(e-=4),{tag:e,encode:function(e,t){let r=e.byteLength,n=e.byteOffset||0,i=e.buffer||e;t(re?te.from(i,n,r):new Uint8Array(i,n,r))}}}function Ue(e,t){let r=e.byteLength;r<24?ae[fe++]=64+r:r<256?(ae[fe++]=88,ae[fe++]=r):r<65536?(ae[fe++]=89,ae[fe++]=r>>8,ae[fe++]=255&r):(ae[fe++]=90,le.setUint32(fe,r),fe+=4),fe+r>=ae.length&&t(fe+r),ae.set(e.buffer?e:new Uint8Array(e),fe),fe+=r}function Ie(e,t){le.setUint32(ce.position+e,fe-ce.position-e+1);let r=ce;ce=null,t(r[0]),t(r[1])}ee=[Date,Set,Error,RegExp,_,ArrayBuffer,Uint8Array,Uint8ClampedArray,Uint16Array,Uint32Array,"undefined"==typeof BigUint64Array?function(){}:BigUint64Array,Int8Array,Int16Array,Int32Array,"undefined"==typeof BigInt64Array?function(){}:BigInt64Array,Float32Array,Float64Array,ge],X=[{tag:1,encode(e,t){let r=e.getTime()/1e3;(this.useTimestamp32||0===e.getMilliseconds())&&r>=0&&r<4294967296?(ae[fe++]=26,le.setUint32(fe,r),fe+=4):(ae[fe++]=251,le.setFloat64(fe,r),fe+=8)}},{tag:258,encode(e,t){t(Array.from(e))}},{tag:27,encode(e,t){t([e.name,e.message])}},{tag:27,encode(e,t){t(["RegExp",e.source,e.flags])}},{getTag:e=>e.tag,encode(e,t){t(e.value)}},{encode(e,t,r){Ue(e,r)}},{getTag(e){if(e.constructor===Uint8Array&&(this.tagUint8Array||re&&!1!==this.tagUint8Array))return 64},encode(e,t,r){Ue(e,r)}},ke(68,1),ke(69,2),ke(70,4),ke(71,8),ke(72,1),ke(77,2),ke(78,4),ke(79,8),ke(85,4),ke(86,8),{encode(e,t){let r=e.packedValues||[],n=e.structures||[];if(r.values.length>0){ae[fe++]=216,ae[fe++]=51,be(4);let e=r.values;t(e),be(0),be(0),packedObjectMap=Object.create(sharedPackedObjectMap||null);for(let t=0,r=e.length;t<r;t++)packedObjectMap[e[t]]=t}if(n){le.setUint32(fe,3655335424),fe+=3;let r=n.slice(0);r.unshift(57344),r.push(new _(e.version,1399353956)),t(r)}else t(new _(e.version,1399353956))}}];let Ee=new ye({useRecords:!1});const Me=Ee.encode,Oe=Ee.encodeAsIterable,Se=Ee.encodeAsAsyncIterable,{NEVER:je,ALWAYS:xe,DECIMAL_ROUND:Be,DECIMAL_FIT:Ve}=G,_e=512,Re=1024,Fe=2048;e.ALWAYS=xe,e.DECIMAL_FIT=Ve,e.DECIMAL_ROUND=Be,e.Decoder=v,e.Encoder=ye,e.FLOAT32_OPTIONS=G,e.NEVER=je,e.REUSE_BUFFER_MODE=_e,e.Tag=_,e.addExtension=function(e){if(e.Class){if(!e.encode)throw new Error("Extension has no encode function");ee.unshift(e.Class),X.unshift(e)}!function(e){g[e.tag]=e.decode}(e)},e.clearSource=H,e.decode=Z,e.decodeIter=function(e,t={}){if(!e||"object"!=typeof e)throw new Error("first argument must be an Iterable, Async Iterable, Iterator, Async Iterator, or a promise");const r=new v(t);let n;const i=e=>{let t;n&&(e=Buffer.concat([n,e]),n=void 0);try{t=r.decodeMultiple(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},e.decodeMultiple=q,e.encode=Me,e.encodeAsAsyncIterable=Se,e.encodeAsIterable=Oe,e.encodeIter=function(e,t={}){if(e&&"object"==typeof e){if("function"==typeof e[Symbol.iterator])return function*(e,t){const r=new ye(t);for(const t of e)yield r.encode(t)}(e,t);if("function"==typeof e.then||"function"==typeof e[Symbol.asyncIterator])return async function*(e,t){const r=new ye(t);for await(const t of e)yield r.encode(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.isNativeAccelerationEnabled=!1,e.roundFloat32=function(e){B[0]=e;let t=Y[(127&V[3])<<1|V[2]>>7];return(t*e+(e>0?.5:-.5)>>0)/t}}));
//# sourceMappingURL=index.min.js.map

@@ -560,2 +560,9 @@ import { Decoder, mult10, Tag, typedArrays, addExtension as decodeAddExtension } from './decode.js'

}
if (this.useToJSON && value.toJSON) {
const json = value.toJSON()
// if for some reason value.toJSON returns itself it'll loop forever
if (json !== value)
return encode(json)
}
// no extension found, write as object

@@ -615,3 +622,3 @@ writeObject(value, !value.hasOwnProperty) // if it doesn't have hasOwnProperty, don't do hasOwnProperty checks

for (let i = 0; i < length; i++) {
encode(encodeKey(keys[i]))
encode(encoder.encodeKey(keys[i]))
encode(vals[i])

@@ -618,0 +625,0 @@ }

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

useSelfDescribedHeader?: boolean
useToJSON?: boolean
keyMap?: {}

@@ -26,0 +27,0 @@ shouldShareStructure?: (keys: string[]) => boolean

{
"name": "cbor-x",
"author": "Kris Zyp",
"version": "1.5.3",
"version": "1.5.4",
"description": "Ultra-fast and conformant CBOR (RFC 8949) implementation with support for numerous tag extensions including records and structured cloning",

@@ -6,0 +6,0 @@ "license": "MIT",

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc