@typhonjs-typedoc/typedoc-theme-dmt
Version:
Provides a modern and customizable UX augmentation to the default TypeDoc theme bringing enhanced features and usability.
6 lines • 163 kB
JavaScript
/**
* @module @typhonjs-typedoc/typedoc-theme-dmt
* @license MPL-2.0
* @see https://github.com/typhonjs-typedoc/typedoc-theme-dmt
*/
import"./dmt-component-data.js";var e,t,n;try{e=new TextDecoder}catch(e){}var r,o,i,s,a,l=0,c={},u=0,f=0,d=[],h={useRecords:!1,mapsAsObjects:!0};class p{}const g=new p;g.name="MessagePack 0xC1";var m=!1,y=2;try{new Function("")}catch(e){y=1/0}class b{constructor(e){e&&(!1===e.useRecords&&void 0===e.mapsAsObjects&&(e.mapsAsObjects=!0),e.sequential&&!1!==e.trusted&&(e.trusted=!0,e.structures||0==e.useRecords||(e.structures=[],e.maxSharedStructures||(e.maxSharedStructures=0))),e.structures?e.structures.sharedLength=e.structures.length:e.getStructures&&((e.structures=[]).uninitialized=!0,e.structures.sharedLength=0),e.int64AsNumber&&(e.int64AsType="number")),Object.assign(this,e)}unpack(e,s){if(t)return W((()=>(J(),this?this.unpack(e,s):b.prototype.unpack.call(h,e,s))));e.buffer||e.constructor!==ArrayBuffer||(e="undefined"!=typeof Buffer?Buffer.from(e):new Uint8Array(e)),"object"==typeof s?(n=s.end||e.length,l=s.start||0):(l=0,n=s>-1?s:e.length),f=0,o=null,i=null,t=e;try{a=e.dataView||(e.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength))}catch(n){if(t=null,e instanceof Uint8Array)throw n;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 b){if(c=this,this.structures)return r=this.structures,v(s);(!r||r.length>0)&&(r=[])}else c=h,(!r||r.length>0)&&(r=[]);return v(s)}unpackMultiple(e,t){let n,r=0;try{m=!0;let o=e.length,i=this?this.unpack(e,o):G.unpack(e,o);if(!t){for(n=[i];l<o;)r=l,n.push(v());return n}if(!1===t(i,r,l))return;for(;l<o;)if(r=l,!1===t(v(),r,l))return}catch(e){throw e.lastPosition=r,e.values=n,e}finally{m=!1,J()}}_mergeStructures(e,t){e=e||[],Object.isFrozen(e)&&(e=e.map((e=>e.slice(0))));for(let t=0,n=e.length;t<n;t++){let n=e[t];n&&(n.isShared=!0,t>=32&&(n.highByte=t-32>>5))}e.sharedLength=e.length;for(let n in t||[])if(n>=0){let r=e[n],o=t[n];o&&(r&&((e.restoreStructures||(e.restoreStructures=[]))[n]=r),e[n]=o)}return this.structures=e}decode(e,t){return this.unpack(e,t)}}function v(e){try{if(!c.trusted&&!m){let e=r.sharedLength||0;e<r.length&&(r.length=e)}let e;if(c.randomAccessStructure&&t[l]<64&&t[l],e=x(),i&&(l=i.postBundlePosition,i=null),m&&(r.restoreStructures=null),l==n)r&&r.restoreStructures&&w(),r=null,t=null,s&&(s=null);else{if(l>n)throw new Error("Unexpected end of MessagePack data");if(!m){let t;try{t=JSON.stringify(e,((e,t)=>"bigint"==typeof t?`${t}n`:t)).slice(0,100)}catch(e){t="(JSON view not available "+e+")"}throw new Error("Data read, but end of buffer not reached "+t)}}return e}catch(e){throw r&&r.restoreStructures&&w(),J(),(e instanceof RangeError||e.message.startsWith("Unexpected end of buffer")||l>n)&&(e.incomplete=!0),e}}function w(){for(let e in r.restoreStructures)r[e]=r.restoreStructures[e];r.restoreStructures=null}function x(){let e=t[l++];if(e<160){if(e<128){if(e<64)return e;{let t=r[63&e]||c.getStructures&&T()[63&e];return t?(t.read||(t.read=E(t,63&e)),t.read()):e}}if(e<144){if(e-=128,c.mapsAsObjects){let t={};for(let n=0;n<e;n++){let e=_();"__proto__"===e&&(e="__proto_"),t[e]=x()}return t}{let t=new Map;for(let n=0;n<e;n++)t.set(x(),x());return t}}{e-=144;let t=new Array(e);for(let n=0;n<e;n++)t[n]=x();return c.freezeData?Object.freeze(t):t}}if(e<192){let t=e-160;if(f>=l)return o.slice(l-u,(l+=t)-u);if(0==f&&n<140){let e=t<16?N(t):D(t);if(null!=e)return e}return k(t)}{let n;switch(e){case 192:return null;case 193:return i?(n=x(),n>0?i[1].slice(i.position1,i.position1+=n):i[0].slice(i.position0,i.position0-=n)):g;case 194:return!1;case 195:return!0;case 196:if(n=t[l++],void 0===n)throw new Error("Unexpected end of buffer");return F(n);case 197:return n=a.getUint16(l),l+=2,F(n);case 198:return n=a.getUint32(l),l+=4,F(n);case 199:return U(t[l++]);case 200:return n=a.getUint16(l),l+=2,U(n);case 201:return n=a.getUint32(l),l+=4,U(n);case 202:if(n=a.getFloat32(l),c.useFloat32>2){let e=K[(127&t[l])<<1|t[l+1]>>7];return l+=4,(e*n+(n>0?.5:-.5)|0)/e}return l+=4,n;case 203:return n=a.getFloat64(l),l+=8,n;case 204:return t[l++];case 205:return n=a.getUint16(l),l+=2,n;case 206:return n=a.getUint32(l),l+=4,n;case 207:return"number"===c.int64AsType?(n=4294967296*a.getUint32(l),n+=a.getUint32(l+4)):"string"===c.int64AsType?n=a.getBigUint64(l).toString():"auto"===c.int64AsType?(n=a.getBigUint64(l),n<=BigInt(2)<<BigInt(52)&&(n=Number(n))):n=a.getBigUint64(l),l+=8,n;case 208:return a.getInt8(l++);case 209:return n=a.getInt16(l),l+=2,n;case 210:return n=a.getInt32(l),l+=4,n;case 211:return"number"===c.int64AsType?(n=4294967296*a.getInt32(l),n+=a.getUint32(l+4)):"string"===c.int64AsType?n=a.getBigInt64(l).toString():"auto"===c.int64AsType?(n=a.getBigInt64(l),n>=BigInt(-2)<<BigInt(52)&&n<=BigInt(2)<<BigInt(52)&&(n=Number(n))):n=a.getBigInt64(l),l+=8,n;case 212:if(n=t[l++],114==n)return Q(63&t[l++]);{let e=d[n];if(e)return e.read?(l++,e.read(x())):e.noBuffer?(l++,e()):e(t.subarray(l,++l));throw new Error("Unknown extension "+n)}case 213:return n=t[l],114==n?(l++,Q(63&t[l++],t[l++])):U(2);case 214:return U(4);case 215:return U(8);case 216:return U(16);case 217:return n=t[l++],f>=l?o.slice(l-u,(l+=n)-u):C(n);case 218:return n=a.getUint16(l),f>=(l+=2)?o.slice(l-u,(l+=n)-u):O(n);case 219:return n=a.getUint32(l),f>=(l+=4)?o.slice(l-u,(l+=n)-u):I(n);case 220:return n=a.getUint16(l),l+=2,P(n);case 221:return n=a.getUint32(l),l+=4,P(n);case 222:return n=a.getUint16(l),l+=2,A(n);case 223:return n=a.getUint32(l),l+=4,A(n);default:if(e>=224)return e-256;if(void 0===e){let e=new Error("Unexpected end of MessagePack data");throw e.incomplete=!0,e}throw new Error("Unknown MessagePack token "+e)}}}const S=/^[a-zA-Z_$][a-zA-Z\d_$]*$/;function E(e,t){function n(){if(n.count++>y){let n=e.read=new Function("r","return function(){return "+(c.freezeData?"Object.freeze":"")+"({"+e.map((e=>"__proto__"===e?"__proto_:r()":S.test(e)?e+":r()":"["+JSON.stringify(e)+"]:r()")).join(",")+"})}")(x);return 0===e.highByte&&(e.read=$(t,e.read)),n()}let r={};for(let t=0,n=e.length;t<n;t++){let n=e[t];"__proto__"===n&&(n="__proto_"),r[n]=x()}return c.freezeData?Object.freeze(r):r}return n.count=0,0===e.highByte?$(t,n):n}const $=(e,n)=>function(){let o=t[l++];if(0===o)return n();let i=e<32?-(e+(o<<5)):e+(o<<5),s=r[i]||T()[i];if(!s)throw new Error("Record id is not defined for "+i);return s.read||(s.read=E(s,e)),s.read()};function T(){let e=W((()=>(t=null,c.getStructures())));return r=c._mergeStructures(e,r)}var k=L,C=L,O=L,I=L;function L(n){let r;if(n<16&&(r=N(n)))return r;if(n>64&&e)return e.decode(t.subarray(l,l+=n));const o=l+n,i=[];for(r="";l<o;){const e=t[l++];if(128&e)if(192==(224&e)){const n=63&t[l++];i.push((31&e)<<6|n)}else if(224==(240&e)){const n=63&t[l++],r=63&t[l++];i.push((31&e)<<12|n<<6|r)}else if(240==(248&e)){let n=(7&e)<<18|(63&t[l++])<<12|(63&t[l++])<<6|63&t[l++];n>65535&&(n-=65536,i.push(n>>>10&1023|55296),n=56320|1023&n),i.push(n)}else i.push(e);else i.push(e);i.length>=4096&&(r+=M.apply(String,i),i.length=0)}return i.length>0&&(r+=M.apply(String,i)),r}function P(e){let t=new Array(e);for(let n=0;n<e;n++)t[n]=x();return c.freezeData?Object.freeze(t):t}function A(e){if(c.mapsAsObjects){let t={};for(let n=0;n<e;n++){let e=_();"__proto__"===e&&(e="__proto_"),t[e]=x()}return t}{let t=new Map;for(let n=0;n<e;n++)t.set(x(),x());return t}}var M=String.fromCharCode;function D(e){let n=l,r=new Array(e);for(let o=0;o<e;o++){const e=t[l++];if((128&e)>0)return void(l=n);r[o]=e}return M.apply(String,r)}function N(e){if(e<4){if(e<2){if(0===e)return"";{let e=t[l++];return(128&e)>1?void(l-=1):M(e)}}{let n=t[l++],r=t[l++];if((128&n)>0||(128&r)>0)return void(l-=2);if(e<3)return M(n,r);let o=t[l++];return(128&o)>0?void(l-=3):M(n,r,o)}}{let n=t[l++],r=t[l++],o=t[l++],i=t[l++];if((128&n)>0||(128&r)>0||(128&o)>0||(128&i)>0)return void(l-=4);if(e<6){if(4===e)return M(n,r,o,i);{let e=t[l++];return(128&e)>0?void(l-=5):M(n,r,o,i,e)}}if(e<8){let s=t[l++],a=t[l++];if((128&s)>0||(128&a)>0)return void(l-=6);if(e<7)return M(n,r,o,i,s,a);let c=t[l++];return(128&c)>0?void(l-=7):M(n,r,o,i,s,a,c)}{let s=t[l++],a=t[l++],c=t[l++],u=t[l++];if((128&s)>0||(128&a)>0||(128&c)>0||(128&u)>0)return void(l-=8);if(e<10){if(8===e)return M(n,r,o,i,s,a,c,u);{let e=t[l++];return(128&e)>0?void(l-=9):M(n,r,o,i,s,a,c,u,e)}}if(e<12){let f=t[l++],d=t[l++];if((128&f)>0||(128&d)>0)return void(l-=10);if(e<11)return M(n,r,o,i,s,a,c,u,f,d);let h=t[l++];return(128&h)>0?void(l-=11):M(n,r,o,i,s,a,c,u,f,d,h)}{let f=t[l++],d=t[l++],h=t[l++],p=t[l++];if((128&f)>0||(128&d)>0||(128&h)>0||(128&p)>0)return void(l-=12);if(e<14){if(12===e)return M(n,r,o,i,s,a,c,u,f,d,h,p);{let e=t[l++];return(128&e)>0?void(l-=13):M(n,r,o,i,s,a,c,u,f,d,h,p,e)}}{let g=t[l++],m=t[l++];if((128&g)>0||(128&m)>0)return void(l-=14);if(e<15)return M(n,r,o,i,s,a,c,u,f,d,h,p,g,m);let y=t[l++];return(128&y)>0?void(l-=15):M(n,r,o,i,s,a,c,u,f,d,h,p,g,m,y)}}}}}function R(){let e,n=t[l++];if(n<192)e=n-160;else switch(n){case 217:e=t[l++];break;case 218:e=a.getUint16(l),l+=2;break;case 219:e=a.getUint32(l),l+=4;break;default:throw new Error("Expected string")}return L(e)}function F(e){return c.copyBuffers?Uint8Array.prototype.slice.call(t,l,l+=e):t.subarray(l,l+=e)}function U(e){let n=t[l++];if(d[n]){let r;return d[n](t.subarray(l,r=l+=e),(e=>{l=e;try{return x()}finally{l=r}}))}throw new Error("Unknown extension type "+n)}var j=new Array(4096);function _(){let e=t[l++];if(!(e>=160&&e<192))return l--,B(x());if(e-=160,f>=l)return o.slice(l-u,(l+=e)-u);if(!(0==f&&n<180))return k(e);let r,i=4095&(e<<5^(e>1?a.getUint16(l):e>0?t[l]:0)),s=j[i],c=l,d=l+e-3,h=0;if(s&&s.bytes==e){for(;c<d;){if(r=a.getUint32(c),r!=s[h++]){c=1879048192;break}c+=4}for(d+=3;c<d;)if(r=t[c++],r!=s[h++]){c=1879048192;break}if(c===d)return l=c,s.string;d-=3,c=l}for(s=[],j[i]=s,s.bytes=e;c<d;)r=a.getUint32(c),s.push(r),c+=4;for(d+=3;c<d;)r=t[c++],s.push(r);let p=e<16?N(e):D(e);return s.string=null!=p?p:k(e)}function B(e){if("string"==typeof e)return e;if("number"==typeof e||"boolean"==typeof e||"bigint"==typeof e)return e.toString();if(null==e)return e+"";throw new Error("Invalid property type for record",typeof e)}const Q=(e,t)=>{let n=x().map(B),o=e;void 0!==t&&(e=e<32?-((t<<5)+e):(t<<5)+e,n.highByte=t);let i=r[e];return i&&(i.isShared||m)&&((r.restoreStructures||(r.restoreStructures=[]))[e]=i),r[e]=n,n.read=E(n,o),n.read()};d[0]=()=>{},d[0].noBuffer=!0,d[66]=e=>{let t=e.length,n=BigInt(128&e[0]?e[0]-256:e[0]);for(let r=1;r<t;r++)n<<=BigInt(8),n+=BigInt(e[r]);return n};let z={Error:Error,TypeError:TypeError,ReferenceError:ReferenceError};d[101]=()=>{let e=x();return(z[e[0]]||Error)(e[1],{cause:e[2]})},d[105]=e=>{if(!1===c.structuredClone)throw new Error("Structured clone extension is disabled");let n=a.getUint32(l-4);s||(s=new Map);let r,o=t[l];r=o>=144&&o<160||220==o||221==o?[]:{};let i={target:r};s.set(n,i);let u=x();return i.used?Object.assign(r,u):(i.target=u,u)},d[112]=e=>{if(!1===c.structuredClone)throw new Error("Structured clone extension is disabled");let t=a.getUint32(l-4),n=s.get(t);return n.used=!0,n.target},d[115]=()=>new Set(x());const H=["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64","BigInt64","BigUint64"].map((e=>e+"Array"));let V="object"==typeof globalThis?globalThis:window;d[116]=e=>{let t=e[0],n=H[t];if(!n){if(16===t){let t=new ArrayBuffer(e.length-1);return new Uint8Array(t).set(e.subarray(1)),t}throw new Error("Could not find typed array for code "+t)}return new V[n](Uint8Array.prototype.slice.call(e,1).buffer)},d[120]=()=>{let e=x();return new RegExp(e[0],e[1])};const q=[];function W(e){let d=n,h=l,p=u,g=f,y=o,b=s,v=i,w=new Uint8Array(t.slice(0,n)),x=r,S=r.slice(0,r.length),E=c,$=m,T=e();return n=d,l=h,u=p,f=g,o=y,s=b,i=v,t=w,m=$,(r=x).splice(0,r.length,...S),c=E,a=new DataView(t.buffer,t.byteOffset,t.byteLength),T}function J(){t=null,s=null,r=null}d[98]=e=>{let t=(e[0]<<24)+(e[1]<<16)+(e[2]<<8)+e[3],n=l;return l+=t-e.length,i=q,(i=[R(),R()]).position0=0,i.position1=0,i.postBundlePosition=l,l=n,x()},d[255]=e=>4==e.length?new Date(1e3*(16777216*e[0]+(e[1]<<16)+(e[2]<<8)+e[3])):8==e.length?new Date(((e[0]<<22)+(e[1]<<14)+(e[2]<<6)+(e[3]>>2))/1e6+1e3*(4294967296*(3&e[3])+16777216*e[4]+(e[5]<<16)+(e[6]<<8)+e[7])):12==e.length?new Date(((e[0]<<24)+(e[1]<<16)+(e[2]<<8)+e[3])/1e6+1e3*((128&e[4]?-281474976710656:0)+1099511627776*e[6]+4294967296*e[7]+16777216*e[8]+(e[9]<<16)+(e[10]<<8)+e[11])):new Date("invalid");const K=new Array(147);for(let e=0;e<256;e++)K[e]=+("1e"+Math.floor(45.15-.30103*e));var G=new b({useRecords:!1});const Z=G.unpack;G.unpackMultiple,G.unpack;let Y,X,ee,te=new Float32Array(1);new Uint8Array(te.buffer,0,4);try{Y=new TextEncoder}catch(e){}const ne="undefined"!=typeof Buffer,re=ne?function(e){return Buffer.allocUnsafeSlow(e)}:Uint8Array,oe=ne?Buffer:Uint8Array,ie=ne?4294967296:2144337920;let se,ae,le,ce,ue=0,fe=null;const de=/[\u0080-\uFFFF]/,he=Symbol("record-id");function pe(e,t,n,r){let o=e.byteLength;if(o+1<256){var{target:i,position:s}=n(4+o);i[s++]=199,i[s++]=o+1}else if(o+1<65536){var{target:i,position:s}=n(5+o);i[s++]=200,i[s++]=o+1>>8,i[s++]=o+1&255}else{var{target:i,position:s,targetView:a}=n(7+o);i[s++]=201,a.setUint32(s,o+1),s+=4}i[s++]=116,i[s++]=t,e.buffer||(e=new Uint8Array(e)),i.set(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),s)}function ge(e,t){let n=e.byteLength;var r,o;if(n<256){var{target:r,position:o}=t(n+2);r[o++]=196,r[o++]=n}else if(n<65536){var{target:r,position:o}=t(n+3);r[o++]=197,r[o++]=n>>8,r[o++]=255&n}else{var{target:r,position:o,targetView:i}=t(n+5);r[o++]=198,i.setUint32(o,n),o+=4}r.set(e,o)}function me(e,t,n,r){let o=e.length;switch(o){case 1:t[n++]=212;break;case 2:t[n++]=213;break;case 4:t[n++]=214;break;case 8:t[n++]=215;break;case 16:t[n++]=216;break;default:o<256?(t[n++]=199,t[n++]=o):o<65536?(t[n++]=200,t[n++]=o>>8,t[n++]=255&o):(t[n++]=201,t[n++]=o>>24,t[n++]=o>>16&255,t[n++]=o>>8&255,t[n++]=255&o)}return t[n++]=r,t.set(e,n),n+=o}function ye(e,t,n){if(fe.length>0){le.setUint32(fe.position+e,ue+n-fe.position-e),fe.stringsPosition=ue-e;let r=fe;fe=null,t(r[0]),t(r[1])}}ee=[Date,Set,Error,RegExp,ArrayBuffer,Object.getPrototypeOf(Uint8Array.prototype).constructor,p],X=[{pack(e,t,n){let r=e.getTime()/1e3;if((this.useTimestamp32||0===e.getMilliseconds())&&r>=0&&r<4294967296){let{target:e,targetView:n,position:o}=t(6);e[o++]=214,e[o++]=255,n.setUint32(o,r)}else if(r>0&&r<4294967296){let{target:n,targetView:o,position:i}=t(10);n[i++]=215,n[i++]=255,o.setUint32(i,4e6*e.getMilliseconds()+(r/1e3/4294967296|0)),o.setUint32(i+4,r)}else if(isNaN(r)){if(this.onInvalidDate)return t(0),n(this.onInvalidDate());let{target:e,targetView:r,position:o}=t(3);e[o++]=212,e[o++]=255,e[o++]=255}else{let{target:n,targetView:o,position:i}=t(15);n[i++]=199,n[i++]=12,n[i++]=255,o.setUint32(i,1e6*e.getMilliseconds()),o.setBigInt64(i+4,BigInt(Math.floor(r)))}}},{pack(e,t,n){if(this.setAsEmptyObject)return t(0),n({});let r=Array.from(e),{target:o,position:i}=t(this.moreTypes?3:0);this.moreTypes&&(o[i++]=212,o[i++]=115,o[i++]=0),n(r)}},{pack(e,t,n){let{target:r,position:o}=t(this.moreTypes?3:0);this.moreTypes&&(r[o++]=212,r[o++]=101,r[o++]=0),n([e.name,e.message,e.cause])}},{pack(e,t,n){let{target:r,position:o}=t(this.moreTypes?3:0);this.moreTypes&&(r[o++]=212,r[o++]=120,r[o++]=0),n([e.source,e.flags])}},{pack(e,t){this.moreTypes?pe(e,16,t):ge(ne?Buffer.from(e):new Uint8Array(e),t)}},{pack(e,t){let n=e.constructor;n!==oe&&this.moreTypes?pe(e,H.indexOf(n.name),t):ge(e,t)}},{pack(e,t){let{target:n,position:r}=t(1);n[r]=193}}];let be=new class extends b{constructor(e){let t,n,r,o;super(e),this.offset=0;let i=oe.prototype.utf8Write?function(e,t){return se.utf8Write(e,t,se.byteLength-t)}:!(!Y||!Y.encodeInto)&&function(e,t){return Y.encodeInto(e,se.subarray(t)).written},s=this;e||(e={});let a=e&&e.sequential,l=e.structures||e.saveStructures,c=e.maxSharedStructures;if(null==c&&(c=l?32:0),c>8160)throw new Error("Maximum maxSharedStructure is 8160");e.structuredClone&&null==e.moreTypes&&(this.moreTypes=!0);let u=e.maxOwnStructures;null==u&&(u=l?32:64),this.structures||0==e.useRecords||(this.structures=[]);let f=c>32||u+c>64,d=c+64,h=c+u+64;if(h>8256)throw new Error("Maximum maxSharedStructure + maxOwnStructure is 8192");let p=[],g=0,m=0;this.pack=this.encode=function(e,i){if(se||(se=new re(8192),le=se.dataView||(se.dataView=new DataView(se.buffer,0,8192)),ue=0),ce=se.length-10,ce-ue<2048?(se=new re(se.length),le=se.dataView||(se.dataView=new DataView(se.buffer,0,se.length)),ce=se.length-10,ue=0):ue=ue+7&2147483640,t=ue,i&xe&&(ue+=255&i),o=s.structuredClone?new Map:null,s.bundleStrings&&"string"!=typeof e?(fe=[],fe.size=1/0):fe=null,r=s.structures,r){r.uninitialized&&(r=s._mergeStructures(s.getStructures()));let e=r.sharedLength||0;if(e>c)throw new Error("Shared structures is larger than maximum shared structures, try increasing maxSharedStructures to "+r.sharedLength);if(!r.transitions){r.transitions=Object.create(null);for(let t=0;t<e;t++){let e=r[t];if(!e)continue;let n,o=r.transitions;for(let t=0,r=e.length;t<r;t++){let r=e[t];n=o[r],n||(n=o[r]=Object.create(null)),o=n}o[he]=t+64}this.lastNamedStructuresLength=e}a||(r.nextId=e+64)}let l;n&&(n=!1);try{s.randomAccessStructure&&e&&e.constructor&&e.constructor===Object?C(e):v(e);let n=fe;if(fe&&ye(t,v,0),o&&o.idsToInsert){let e=o.idsToInsert.sort(((e,t)=>e.offset>t.offset?1:-1)),r=e.length,i=-1;for(;n&&r>0;){let o=e[--r].offset+t;o<n.stringsPosition+t&&-1===i&&(i=0),o>n.position+t?i>=0&&(i+=6):(i>=0&&(le.setUint32(n.position+t,le.getUint32(n.position+t)+i),i=-1),n=n.previous,r++)}i>=0&&n&&le.setUint32(n.position+t,le.getUint32(n.position+t)+i),ue+=6*e.length,ue>ce&&$(ue),s.offset=ue;let a=function(e,t){let n,r=6*t.length,o=e.length-r;for(;n=t.pop();){let t=n.offset,i=n.id;e.copyWithin(t+r,t,o),r-=6;let s=t+r;e[s++]=214,e[s++]=105,e[s++]=i>>24,e[s++]=i>>16&255,e[s++]=i>>8&255,e[s++]=255&i,o=t}return e}(se.subarray(t,ue),e);return o=null,a}return s.offset=ue,i&ve?(se.start=t,se.end=ue,se):se.subarray(t,ue)}catch(e){throw l=e,e}finally{if(r&&(y(),n&&s.saveStructures)){let n=r.sharedLength||0,o=se.subarray(t,ue),a=function(e,t){return e.isCompatible=e=>{let n=!e||(t.lastNamedStructuresLength||0)===e.length;return n||t._mergeStructures(e),n},e}(r,s);if(!l)return!1===s.saveStructures(a,a.isCompatible)?s.pack(e,i):(s.lastNamedStructuresLength=n,se.length>1073741824&&(se=null),o)}se.length>1073741824&&(se=null),i&we&&(ue=t)}};const y=()=>{m<10&&m++;let e=r.sharedLength||0;if(r.length>e&&!a&&(r.length=e),g>1e4)r.transitions=null,m=0,g=0,p.length>0&&(p=[]);else if(p.length>0&&!a){for(let e=0,t=p.length;e<t;e++)p[e][he]=0;p=[]}},b=e=>{var t=e.length;t<16?se[ue++]=144|t:t<65536?(se[ue++]=220,se[ue++]=t>>8,se[ue++]=255&t):(se[ue++]=221,le.setUint32(ue,t),ue+=4);for(let n=0;n<t;n++)v(e[n])},v=e=>{ue>ce&&(se=$(ue));var n,r=typeof e;if("string"===r){let r,o=e.length;if(fe&&o>=4&&o<4096){if((fe.size+=o)>21760){let e,n,r=(fe[0]?3*fe[0].length+fe[1].length:0)+10;ue+r>ce&&(se=$(ue+r)),fe.position?(n=fe,se[ue]=200,ue+=3,se[ue++]=98,e=ue-t,ue+=4,ye(t,v,0),le.setUint16(e+t-3,ue-t-e)):(se[ue++]=214,se[ue++]=98,e=ue-t,ue+=4),fe=["",""],fe.previous=n,fe.size=0,fe.position=e}let n=de.test(e);return fe[n?0:1]+=e,se[ue++]=193,void v(n?-o:o)}r=o<32?1:o<256?2:o<65536?3:5;let s=3*o;if(ue+s>ce&&(se=$(ue+s)),o<64||!i){let t,i,s,a=ue+r;for(t=0;t<o;t++)i=e.charCodeAt(t),i<128?se[a++]=i:i<2048?(se[a++]=i>>6|192,se[a++]=63&i|128):55296==(64512&i)&&56320==(64512&(s=e.charCodeAt(t+1)))?(i=65536+((1023&i)<<10)+(1023&s),t++,se[a++]=i>>18|240,se[a++]=i>>12&63|128,se[a++]=i>>6&63|128,se[a++]=63&i|128):(se[a++]=i>>12|224,se[a++]=i>>6&63|128,se[a++]=63&i|128);n=a-ue-r}else n=i(e,ue+r);n<32?se[ue++]=160|n:n<256?(r<2&&se.copyWithin(ue+2,ue+1,ue+1+n),se[ue++]=217,se[ue++]=n):n<65536?(r<3&&se.copyWithin(ue+3,ue+2,ue+2+n),se[ue++]=218,se[ue++]=n>>8,se[ue++]=255&n):(r<5&&se.copyWithin(ue+5,ue+3,ue+3+n),se[ue++]=219,le.setUint32(ue,n),ue+=4),ue+=n}else if("number"===r)if(e>>>0===e)e<32||e<128&&!1===this.useRecords||e<64&&!this.randomAccessStructure?se[ue++]=e:e<256?(se[ue++]=204,se[ue++]=e):e<65536?(se[ue++]=205,se[ue++]=e>>8,se[ue++]=255&e):(se[ue++]=206,le.setUint32(ue,e),ue+=4);else if((e|0)===e)e>=-32?se[ue++]=256+e:e>=-128?(se[ue++]=208,se[ue++]=e+256):e>=-32768?(se[ue++]=209,le.setInt16(ue,e),ue+=2):(se[ue++]=210,le.setInt32(ue,e),ue+=4);else{let t;if((t=this.useFloat32)>0&&e<4294967296&&e>=-2147483648){let n;if(se[ue++]=202,le.setFloat32(ue,e),t<4||((n=e*K[(127&se[ue])<<1|se[ue+1]>>7])|0)===n)return void(ue+=4);ue--}se[ue++]=203,le.setFloat64(ue,e),ue+=8}else if("object"===r||"function"===r)if(e){if(o){let n=o.get(e);if(n){if(!n.id){let e=o.idsToInsert||(o.idsToInsert=[]);n.id=e.push(n)}return se[ue++]=214,se[ue++]=112,le.setUint32(ue,n.id),void(ue+=4)}o.set(e,{offset:ue-t})}let i=e.constructor;if(i===Object)E(e);else if(i===Array)b(e);else if(i===Map)if(this.mapAsEmptyObject)se[ue++]=128;else{(n=e.size)<16?se[ue++]=128|n:n<65536?(se[ue++]=222,se[ue++]=n>>8,se[ue++]=255&n):(se[ue++]=223,le.setUint32(ue,n),ue+=4);for(let[t,n]of e)v(t),v(n)}else{for(let t=0,n=X.length;t<n;t++){if(e instanceof ee[t]){let n=X[t];if(n.write){n.type&&(se[ue++]=212,se[ue++]=n.type,se[ue++]=0);let t=n.write.call(this,e);return void(t===e?Array.isArray(e)?b(e):E(e):v(t))}let r,o=se,i=le,s=ue;se=null;try{r=n.pack.call(this,e,(e=>(se=o,o=null,ue+=e,ue>ce&&$(ue),{target:se,targetView:le,position:ue-e})),v)}finally{o&&(se=o,le=i,ue=s,ce=se.length-10)}return void(r&&(r.length+ue>ce&&$(r.length+ue),ue=me(r,se,ue,n.type)))}}if(Array.isArray(e))b(e);else{if(e.toJSON){const t=e.toJSON();if(t!==e)return v(t)}if("function"===r)return v(this.writeFunction&&this.writeFunction(e));E(e)}}}else se[ue++]=192;else if("boolean"===r)se[ue++]=e?195:194;else if("bigint"===r){if(e<BigInt(1)<<BigInt(63)&&e>=-(BigInt(1)<<BigInt(63)))se[ue++]=211,le.setBigInt64(ue,e);else if(e<BigInt(1)<<BigInt(64)&&e>0)se[ue++]=207,le.setBigUint64(ue,e);else{if(!this.largeBigIntToFloat){if(this.largeBigIntToString)return v(e.toString());if(this.useBigIntExtension&&e<BigInt(2)**BigInt(1023)&&e>-(BigInt(2)**BigInt(1023))){se[ue++]=199,ue++,se[ue++]=66;let t,n=[];do{let r=e&BigInt(255);t=(r&BigInt(128))===(e<BigInt(0)?BigInt(128):BigInt(0)),n.push(r),e>>=BigInt(8)}while(e!==BigInt(0)&&e!==BigInt(-1)||!t);se[ue-2]=n.length;for(let e=n.length;e>0;)se[ue++]=Number(n[--e]);return}throw new RangeError(e+" was too large to fit in MessagePack 64-bit integer format, use useBigIntExtension, or set largeBigIntToFloat to convert to float-64, or set largeBigIntToString to convert to string")}se[ue++]=203,le.setFloat64(ue,Number(e))}ue+=8}else{if("undefined"!==r)throw new Error("Unknown type: "+r);this.encodeUndefinedAsNil?se[ue++]=192:(se[ue++]=212,se[ue++]=0,se[ue++]=0)}},w=this.variableMapSize||this.coercibleKeyAsNumber||this.skipValues?e=>{let t;if(this.skipValues){t=[];for(let n in e)"function"==typeof e.hasOwnProperty&&!e.hasOwnProperty(n)||this.skipValues.includes(e[n])||t.push(n)}else t=Object.keys(e);let n,r=t.length;if(r<16?se[ue++]=128|r:r<65536?(se[ue++]=222,se[ue++]=r>>8,se[ue++]=255&r):(se[ue++]=223,le.setUint32(ue,r),ue+=4),this.coercibleKeyAsNumber)for(let o=0;o<r;o++){n=t[o];let r=Number(n);v(isNaN(r)?n:r),v(e[n])}else for(let o=0;o<r;o++)v(n=t[o]),v(e[n])}:e=>{se[ue++]=222;let n=ue-t;ue+=2;let r=0;for(let t in e)("function"!=typeof e.hasOwnProperty||e.hasOwnProperty(t))&&(v(t),v(e[t]),r++);if(r>65535)throw new Error('Object is too large to serialize with fast 16-bit map size, use the "variableMapSize" option to serialize this object');se[n+++t]=r>>8,se[n+t]=255&r},x=!1===this.useRecords?w:e.progressiveRecords&&!f?e=>{let n,o,i=r.transitions||(r.transitions=Object.create(null)),s=ue++-t;for(let a in e)if("function"!=typeof e.hasOwnProperty||e.hasOwnProperty(a)){if(n=i[a],n)i=n;else{let l=Object.keys(e),c=i;i=r.transitions;let u=0;for(let e=0,t=l.length;e<t;e++){let t=l[e];n=i[t],n||(n=i[t]=Object.create(null),u++),i=n}s+t+1==ue?(ue--,T(i,l,u)):k(i,l,s,u),o=!0,i=c[a]}v(e[a])}if(!o){let n=i[he];n?se[s+t]=n:k(i,Object.keys(e),s,0)}}:e=>{let t,n=r.transitions||(r.transitions=Object.create(null)),o=0;for(let r in e)("function"!=typeof e.hasOwnProperty||e.hasOwnProperty(r))&&(t=n[r],t||(t=n[r]=Object.create(null),o++),n=t);let i=n[he];i?i>=96&&f?(se[ue++]=96+(31&(i-=96)),se[ue++]=i>>5):se[ue++]=i:T(n,n.__keys__||Object.keys(e),o);for(let t in e)("function"!=typeof e.hasOwnProperty||e.hasOwnProperty(t))&&v(e[t])},S="function"==typeof this.useRecords&&this.useRecords,E=S?e=>{S(e)?x(e):w(e)}:x,$=e=>{let n;if(e>16777216){if(e-t>ie)throw new Error("Packed buffer would be larger than maximum buffer size");n=Math.min(ie,4096*Math.round(Math.max((e-t)*(e>67108864?1.25:2),4194304)/4096))}else n=1+(Math.max(e-t<<2,se.length-1)>>12)<<12;let r=new re(n);return le=r.dataView||(r.dataView=new DataView(r.buffer,0,n)),e=Math.min(e,se.length),se.copy?se.copy(r,0,t,e):r.set(se.slice(t,e)),ue-=t,t=0,ce=r.length-10,se=r},T=(e,t,o)=>{let i=r.nextId;i||(i=64),i<d&&this.shouldShareStructure&&!this.shouldShareStructure(t)?(i=r.nextOwnId,i<h||(i=d),r.nextOwnId=i+1):(i>=h&&(i=d),r.nextId=i+1);let s=t.highByte=i>=96&&f?i-96>>5:-1;e[he]=i,e.__keys__=t,r[i-64]=t,i<d?(t.isShared=!0,r.sharedLength=i-63,n=!0,s>=0?(se[ue++]=96+(31&i),se[ue++]=s):se[ue++]=i):(s>=0?(se[ue++]=213,se[ue++]=114,se[ue++]=96+(31&i),se[ue++]=s):(se[ue++]=212,se[ue++]=114,se[ue++]=i),o&&(g+=m*o),p.length>=u&&(p.shift()[he]=0),p.push(e),v(t))},k=(e,n,r,o)=>{let i=se,s=ue,a=ce,l=t;se=ae,ue=0,t=0,se||(ae=se=new re(8192)),ce=se.length-10,T(e,n,o),ae=se;let c=ue;if(se=i,ue=s,ce=a,t=l,c>1){let e=ue+c-1;e>ce&&$(e);let n=r+t;se.copyWithin(n+c,n+1,ue),se.set(ae.slice(0,c),n),ue=e}else se[r+t]=ae[0]},C=e=>{let o=undefined(e,se,t,ue,r,$,((e,t,r)=>{if(r)return n=!0;ue=t;let o=se;return v(e),y(),o!==se?{position:ue,targetView:le,target:se}:ue}),this);if(0===o)return E(e);ue=o}}useBuffer(e){se=e,se.dataView||(se.dataView=new DataView(se.buffer,se.byteOffset,se.byteLength)),ue=0}set position(e){ue=e}get position(){return ue}clearSharedData(){this.structures&&(this.structures=[]),this.typedStructs&&(this.typedStructs=[])}}({useRecords:!1});be.pack,be.pack;const ve=512,we=1024,xe=2048;var Se=Uint8Array,Ee=Uint16Array,$e=Int32Array,Te=new Se([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),ke=new Se([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Ce=new Se([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Oe=function(e,t){for(var n=new Ee(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];var o=new $e(n[30]);for(r=1;r<30;++r)for(var i=n[r];i<n[r+1];++i)o[i]=i-n[r]<<5|r;return{b:n,r:o}},Ie=Oe(Te,2),Le=Ie.b,Pe=Ie.r;Le[28]=258,Pe[258]=28;for(var Ae=Oe(ke,0).b,Me=new Ee(32768),De=0;De<32768;++De){var Ne=(43690&De)>>1|(21845&De)<<1;Ne=(61680&(Ne=(52428&Ne)>>2|(13107&Ne)<<2))>>4|(3855&Ne)<<4,Me[De]=((65280&Ne)>>8|(255&Ne)<<8)>>1}var Re=function(e,t,n){for(var r=e.length,o=0,i=new Ee(t);o<r;++o)e[o]&&++i[e[o]-1];var s,a=new Ee(t);for(o=1;o<t;++o)a[o]=a[o-1]+i[o-1]<<1;if(n){s=new Ee(1<<t);var l=15-t;for(o=0;o<r;++o)if(e[o])for(var c=o<<4|e[o],u=t-e[o],f=a[e[o]-1]++<<u,d=f|(1<<u)-1;f<=d;++f)s[Me[f]>>l]=c}else for(s=new Ee(r),o=0;o<r;++o)e[o]&&(s[o]=Me[a[e[o]-1]++]>>15-e[o]);return s},Fe=new Se(288);for(De=0;De<144;++De)Fe[De]=8;for(De=144;De<256;++De)Fe[De]=9;for(De=256;De<280;++De)Fe[De]=7;for(De=280;De<288;++De)Fe[De]=8;var Ue=new Se(32);for(De=0;De<32;++De)Ue[De]=5;var je=Re(Fe,9,1),_e=Re(Ue,5,1),Be=function(e){for(var t=e[0],n=1;n<e.length;++n)e[n]>t&&(t=e[n]);return t},Qe=function(e,t,n){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(7&t)&n},ze=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(7&t)},He=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Ve=function(e,t,n){var r=new Error(t||He[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,Ve),!n)throw r;return r},qe=function(e,t,n,r){var o=e.length,i=r?r.length:0;if(!o||t.f&&!t.l)return n||new Se(0);var s=!n,a=s||2!=t.i,l=t.i;s&&(n=new Se(3*o));var c=function(e){var t=n.length;if(e>t){var r=new Se(Math.max(2*t,e));r.set(n),n=r}},u=t.f||0,f=t.p||0,d=t.b||0,h=t.l,p=t.d,g=t.m,m=t.n,y=8*o;do{if(!h){u=Qe(e,f,1);var b=Qe(e,f+1,3);if(f+=3,!b){var v=e[(L=4+((f+7)/8|0))-4]|e[L-3]<<8,w=L+v;if(w>o){l&&Ve(0);break}a&&c(d+v),n.set(e.subarray(L,w),d),t.b=d+=v,t.p=f=8*w,t.f=u;continue}if(1==b)h=je,p=_e,g=9,m=5;else if(2==b){var x=Qe(e,f,31)+257,S=Qe(e,f+10,15)+4,E=x+Qe(e,f+5,31)+1;f+=14;for(var $=new Se(E),T=new Se(19),k=0;k<S;++k)T[Ce[k]]=Qe(e,f+3*k,7);f+=3*S;var C=Be(T),O=(1<<C)-1,I=Re(T,C,1);for(k=0;k<E;){var L,P=I[Qe(e,f,O)];if(f+=15&P,(L=P>>4)<16)$[k++]=L;else{var A=0,M=0;for(16==L?(M=3+Qe(e,f,3),f+=2,A=$[k-1]):17==L?(M=3+Qe(e,f,7),f+=3):18==L&&(M=11+Qe(e,f,127),f+=7);M--;)$[k++]=A}}var D=$.subarray(0,x),N=$.subarray(x);g=Be(D),m=Be(N),h=Re(D,g,1),p=Re(N,m,1)}else Ve(1);if(f>y){l&&Ve(0);break}}a&&c(d+131072);for(var R=(1<<g)-1,F=(1<<m)-1,U=f;;U=f){var j=(A=h[ze(e,f)&R])>>4;if((f+=15&A)>y){l&&Ve(0);break}if(A||Ve(2),j<256)n[d++]=j;else{if(256==j){U=f,h=null;break}var _=j-254;if(j>264){var B=Te[k=j-257];_=Qe(e,f,(1<<B)-1)+Le[k],f+=B}var Q=p[ze(e,f)&F],z=Q>>4;Q||Ve(3),f+=15&Q;N=Ae[z];if(z>3){B=ke[z];N+=ze(e,f)&(1<<B)-1,f+=B}if(f>y){l&&Ve(0);break}a&&c(d+131072);var H=d+_;if(d<N){var V=i-N,q=Math.min(N,H);for(V+d<0&&Ve(3);d<q;++d)n[d]=r[V+d]}for(;d<H;++d)n[d]=n[d-N]}}t.l=h,t.p=U,t.b=d,t.f=u,h&&(u=1,t.m=g,t.d=p,t.n=m)}while(!u);return d!=n.length&&s?function(e,t,n){return(null==n||n>e.length)&&(n=e.length),new Se(e.subarray(t,n))}(n,0,d):n.subarray(0,d)},We=new Se(0);function Je(e,t){return qe(e,{i:2},t&&t.out,t&&t.dictionary)}var Ke="undefined"!=typeof TextDecoder&&new TextDecoder;try{Ke.decode(We,{stream:!0})}catch(e){}const Ge="function"==typeof Buffer;"function"==typeof TextDecoder&&new TextDecoder,"function"==typeof TextEncoder&&new TextEncoder;const Ze=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),Ye=(()=>{let e={};return Ze.forEach(((t,n)=>e[t]=n)),e})(),Xe=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,et=String.fromCharCode.bind(String),tt="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),nt=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),rt="function"==typeof atob?e=>atob(nt(e)):Ge?e=>Buffer.from(e,"base64").toString("binary"):e=>{if(e=e.replace(/\s+/g,""),!Xe.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(3&e.length));let t,n,r,o="";for(let i=0;i<e.length;)t=Ye[e.charAt(i++)]<<18|Ye[e.charAt(i++)]<<12|(n=Ye[e.charAt(i++)])<<6|(r=Ye[e.charAt(i++)]),o+=64===n?et(t>>16&255):64===r?et(t>>16&255,t>>8&255):et(t>>16&255,t>>8&255,255&t);return o},ot=Ge?e=>tt(Buffer.from(e,"base64")):e=>tt(rt(e).split("").map((e=>e.charCodeAt(0)))),it=e=>nt(e.replace(/[-_]/g,(e=>"-"==e?"+":"/")));function st(e){if(null==e)return!1;switch(typeof e){case"function":case"object":return"function"==typeof e.subscribe&&"function"==typeof e.set}return!1}function at(e){if(null==e)return!1;switch(typeof e){case"function":case"object":return"function"==typeof e.subscribe&&"function"==typeof e.set&&"function"==typeof e.update}return!1}function lt(e,t,n){let r=!1;return e.subscribe((e=>{r?n(e):(r=!0,t(e))}))}function ct(e){return null!=e&&"object"==typeof e&&Symbol.iterator in e}function ut(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function ft(e,t,n){if("object"!=typeof e)return n;if("string"!=typeof t)return n;const r=t.split(".");for(let t=0;t<r.length;t++){if(void 0===e[r[t]]||null===e[r[t]])return n;e=e[r[t]]}return e}class dt{constructor(){}static#e=["HTMLAnchorElement","HTMLButtonElement","HTMLDetailsElement","HTMLEmbedElement","HTMLIFrameElement","HTMLInputElement","HTMLObjectElement","HTMLSelectElement","HTMLTextAreaElement"];static#t=new Set([Node.ELEMENT_NODE,Node.TEXT_NODE,Node.COMMENT_NODE,Node.DOCUMENT_FRAGMENT_NODE]);static#n=new Set(["MouseEvent","PointerEvent"]);static#r=new Set(["UIEvent","FocusEvent","MouseEvent","WheelEvent","KeyboardEvent","PointerEvent","TouchEvent","InputEvent","CompositionEvent","DragEvent"]);static#o=new Set(["KeyboardEvent","MouseEvent","PointerEvent"]);static#i={throws:!1};static getActiveElement(e,{throws:t=!0}={}){if(this.#t.has(e?.nodeType))return e?.ownerDocument?.activeElement??null;if(this.isUIEvent(e)&&ut(e?.view))return e?.view?.document?.activeElement??null;if(ut(e?.defaultView))return e?.activeElement??null;if(ut(e?.document)&&ut(e?.location))return e?.document?.activeElement??null;if(t)throw new TypeError("'target' must be a DOM Node / Element, Document, UIEvent, or Window.")}static getDocument(e,{throws:t=!0}={}){if(this.#t.has(e?.nodeType))return e?.ownerDocument;if(this.isUIEvent(e)&&ut(e?.view))return e?.view?.document;if(ut(e?.defaultView))return e;if(ut(e?.document)&&ut(e?.location))return e?.document;if(t)throw new TypeError("'target' must be a DOM Node / Element, Document, UIEvent, or Window.")}static getWindow(e,{throws:t=!0}={}){if(this.#t.has(e?.nodeType))return e.ownerDocument?.defaultView??globalThis;if(this.isUIEvent(e)&&ut(e?.view))return e.view??globalThis;if(ut(e?.defaultView))return e.defaultView??globalThis;if(ut(e?.document)&&ut(e?.location))return e;if(t)throw new TypeError("'target' must be a DOM Node / Element, Document, UIEvent, or Window.")}static isDocument(e){return ut(e)&&"[object Document]"===Object.prototype.toString.call(e)}static isMap(e){return ut(e)&&"[object Map]"===Object.prototype.toString.call(e)}static isPromise(e){return ut(e)&&"[object Promise]"===Object.prototype.toString.call(e)}static isRegExp(e){return ut(e)&&"[object RegExp]"===Object.prototype.toString.call(e)}static isSet(e){return ut(e)&&"[object Set]"===Object.prototype.toString.call(e)}static isURL(e){return ut(e)&&"[object URL]"===Object.prototype.toString.call(e)}static isWindow(e){return ut(e)&&"[object Window]"===Object.prototype.toString.call(e)}static isFocusableHTMLElement(e){for(let t=this.#e.length;--t>=0;)if(this.#s(e,Node.ELEMENT_NODE,this.#e[t]))return!0;return!1}static isDocumentFragment(e){return this.#s(e,Node.DOCUMENT_FRAGMENT_NODE,"DocumentFragment")}static isElement(e){return this.#s(e,Node.ELEMENT_NODE,"Element")}static isHTMLAnchorElement(e){return this.#s(e,Node.ELEMENT_NODE,"HTMLAnchorElement")}static isHTMLElement(e){return this.#s(e,Node.ELEMENT_NODE,"HTMLElement")}static isNode(e){if("number"!=typeof e?.nodeType)return!1;if(e instanceof globalThis.Node)return!0;const t=this.getWindow(e,this.#i),n=t?.Node;return n&&e instanceof n}static isShadowRoot(e){return this.#s(e,Node.DOCUMENT_FRAGMENT_NODE,"ShadowRoot")}static isSVGElement(e){return this.#s(e,Node.ELEMENT_NODE,"SVGElement")}static isEvent(e,t){return"string"==typeof e?.type&&"boolean"==typeof e?.defaultPrevented&&"function"==typeof e?.stopPropagation&&(void 0===t||this.isCtorName(e,t))}static isPointerEvent(e){return this.isEvent(e,this.#n)}static isUIEvent(e){return this.isEvent(e,this.#r)}static isUserInputEvent(e){return this.isEvent(e,this.#o)}static isCtorName(e,t){return!!ut(e)&&("string"==typeof t&&e?.constructor?.name===t||!!t?.has(e?.constructor?.name))}static#s(e,t,n){if(!ut(e))return!1;if(e.nodeType!==t)return!1;const r=globalThis[n];if(r&&e instanceof r)return!0;const o=this.#t.has(e.nodeType)?e?.ownerDocument?.defaultView:this.getWindow(e,this.#i),i=o?.[n];return i&&e instanceof i}}class ht{static#a=/(\d+)\s*px/;static pixels(e){if("string"!=typeof e)return;const t=this.#a.test(e),n=parseInt(e);return t&&Number.isFinite(n)?n:void 0}static remPixels(e=1,{targetDocument:t=document}={}){return t?.documentElement?e*parseFloat(globalThis.getComputedStyle(t.documentElement).fontSize):void 0}}class pt{#l=new Map;#c;static#u=Object.freeze({none:0,attribute:1,function:2,resizeObserved:3,setContentBounds:4,setDimension:5,storeObject:6,storesObject:7});constructor(){this.#c=new ResizeObserver((e=>{for(const t of e){const e=this.#l.get(t?.target);if(Array.isArray(e)){const n=t.contentRect.width,r=t.contentRect.height;for(const t of e)pt.#f(t,n,r)}}}))}add(e,t){if(!dt.isHTMLElement(e))throw new TypeError("ResizeObserverManager.add error: 'el' is not a HTMLElement.");if(this.#d(e,t))return;const n=pt.#h(t);if(0===n)throw new Error("ResizeObserverManager.add error: 'target' is not a valid ResizeObserverManager target.");const r=globalThis.getComputedStyle(e),o=ht.pixels(e.style.borderBottom)??ht.pixels(r.borderBottom)??0,i=ht.pixels(e.style.borderLeft)??ht.pixels(r.borderLeft)??0,s=ht.pixels(e.style.borderRight)??ht.pixels(r.borderRight)??0,a=ht.pixels(e.style.borderTop)??ht.pixels(r.borderTop)??0,l=ht.pixels(e.style.paddingBottom)??ht.pixels(r.paddingBottom)??0,c={updateType:n,target:t,contentWidth:0,contentHeight:0,styles:{additionalWidth:i+s+(ht.pixels(e.style.paddingLeft)??ht.pixels(r.paddingLeft)??0)+(ht.pixels(e.style.paddingRight)??ht.pixels(r.paddingRight)??0),additionalHeight:a+o+(ht.pixels(e.style.paddingTop)??ht.pixels(r.paddingTop)??0)+l}};if(this.#l.has(e)){this.#l.get(e).push(c)}else this.#l.set(e,[c]);this.#c.observe(e)}clear(){for(const e of this.#l.keys())this.#c.unobserve(e);this.#l.clear()}remove(e,t=void 0){const n=this.#l.get(e);if(Array.isArray(n)){if(void 0!==t){const e=n.findIndex((e=>e.target===t));e>=0&&n.splice(e,1)}else n.length=0;0===n.length&&(this.#l.delete(e),this.#c.unobserve(e))}}updateCache(e){const t=this.#l.get(e);if(Array.isArray(t)){const n=globalThis.getComputedStyle(e),r=ht.pixels(e.style.borderBottom)??ht.pixels(n.borderBottom)??0,o=ht.pixels(e.style.borderLeft)??ht.pixels(n.borderLeft)??0,i=ht.pixels(e.style.borderRight)??ht.pixels(n.borderRight)??0,s=ht.pixels(e.style.borderTop)??ht.pixels(n.borderTop)??0,a=ht.pixels(e.style.paddingBottom)??ht.pixels(n.paddingBottom)??0,l=o+i+(ht.pixels(e.style.paddingLeft)??ht.pixels(n.paddingLeft)??0)+(ht.pixels(e.style.paddingRight)??ht.pixels(n.paddingRight)??0),c=s+r+(ht.pixels(e.style.paddingTop)??ht.pixels(n.paddingTop)??0)+a;for(const e of t)e.styles.additionalWidth=l,e.styles.additionalHeight=c,pt.#f(e,e.contentWidth,e.contentHeight)}}static#h(e){if("function"==typeof e?.resizeObserved)return this.#u.resizeObserved;if("function"==typeof e?.setDimension)return this.#u.setDimension;if("function"==typeof e?.setContentBounds)return this.#u.setContentBounds;const t=typeof e;if(null!==t&&("object"===t||"function"===t)){if(at(e.resizeObserved))return this.#u.storeObject;const t=e?.stores;if((ut(t)||"function"==typeof t)&&at(t.resizeObserved))return this.#u.storesObject}return null!==t&&"object"===t?this.#u.attribute:"function"===t?this.#u.function:this.#u.none}#d(e,t){if(null==t)return!1;const n=this.#l.get(e);return!!Array.isArray(n)&&n.findIndex((e=>e.target===t))>=0}static#f(e,t,n){const r=e.styles;e.contentWidth=t,e.contentHeight=n;const o=Number.isFinite(t)?t+r.additionalWidth:void 0,i=Number.isFinite(n)?n+r.additionalHeight:void 0,s=e.target;switch(e.updateType){case this.#u.attribute:s.contentWidth=t,s.contentHeight=n,s.offsetWidth=o,s.offsetHeight=i;break;case this.#u.function:s?.(o,i,t,n);break;case this.#u.resizeObserved:s.resizeObserved?.(o,i,t,n);break;case this.#u.setContentBounds:s.setContentBounds?.(t,n);break;case this.#u.setDimension:s.setDimension?.(o,i);break;case this.#u.storeObject:s.resizeObserved.update((e=>(e.contentHeight=n,e.contentWidth=t,e.offsetHeight=i,e.offsetWidth=o,e)));break;case this.#u.storesObject:s.stores.resizeObserved.update((e=>(e.contentHeight=n,e.contentWidth=t,e.offsetHeight=i,e.offsetWidth=o,e)))}}}const gt=new pt;function mt(e,t){return gt.add(e,t),{update:n=>{gt.remove(e,t),t=n,gt.add(e,t)},destroy:()=>{gt.remove(e,t)}}}mt.updateCache=function(e){gt.updateCache(e)};class yt{constructor(){throw new Error("Timing constructor: This is a static class and should not be constructed.")}static debounce(e,t){if("function"!=typeof e)throw new TypeError("'callback' must be a function.");if(!Number.isInteger(t)||t<0)throw new TypeError("'delay' must be a positive integer representing milliseconds.");let n;return function(...r){globalThis.clearTimeout(n),n=globalThis.setTimeout((()=>{e.apply(this,r)}),t)}}static doubleClick({single:e,double:t,delay:n=400}){if(void 0!==e&&"function"!=typeof e)throw new TypeError("'single' must be a function.");if(void 0!==t&&"function"!=typeof t)throw new TypeError("'double' must be a function.");if(!Number.isInteger(n)||n<0)throw new TypeError("'delay' must be a positive integer representing milliseconds.");let r,o=0;return i=>{globalThis.clearTimeout(r),o++,1===o?r=globalThis.setTimeout((()=>{"function"==typeof e&&e(i),o=0}),n):("function"==typeof t&&t(i),o=0)}}}function bt(){}const vt=e=>e;function wt(e,t){for(const n in t)e[n]=t[n];return e}function xt(e){return e()}function St(){return Object.create(null)}function Et(e){e.forEach(xt)}function $t(e){return"function"==typeof e}function Tt(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}let kt;function Ct(e,t){return e===t||(kt||(kt=document.createElement("a")),kt.href=t,e===kt.href)}function Ot(e,...t){if(null==e){for(const e of t)e(void 0);return bt}const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function It(e){let t;return Ot(e,(e=>t=e))(),t}function Lt(e,t,n){e.$$.on_destroy.push(Ot(t,n))}function Pt(e,t,n,r){if(e){const o=At(e,t,n,r);return e[0](o)}}function At(e,t,n,r){return e[1]&&r?wt(n.ctx.slice(),e[1](r(t))):n.ctx}function Mt(e,t,n,r){if(e[2]&&r){const o=e[2](r(n));if(void 0===t.dirty)return o;if("object"==typeof o){const e=[],n=Math.max(t.dirty.length,o.length);for(let r=0;r<n;r+=1)e[r]=t.dirty[r]|o[r];return e}return t.dirty|o}return t.dirty}function Dt(e,t,n,r,o,i){if(o){const s=At(t,n,r,i);e.p(s,o)}}function Nt(e){if(e.ctx.length>32){const t=[],n=e.ctx.length/32;for(let e=0;e<n;e++)t[e]=-1;return t}return-1}function Rt(e){return null==e?"":e}function Ft(e,t,n){return e.set(n),t}function Ut(e){return e&&$t(e.destroy)?e.destroy:bt}const jt="undefined"!=typeof window;let _t=jt?()=>window.performance.now():()=>Date.now(),Bt=jt?e=>requestAnimationFrame(e):bt;const Qt=new Set;function zt(e){Qt.forEach((t=>{t.c(e)||(Qt.delete(t),t.f())})),0!==Qt.size&&Bt(zt)}const Ht="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function Vt(e,t){e.appendChild(t)}function qt(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function Wt(e){const t=Gt("style");return t.textContent="/* empty */",function(e,t){Vt(e.head||e,t),t.sheet}(qt(e),t),t.sheet}function Jt(e,t,n){e.insertBefore(t,n||null)}function Kt(e){e.parentNode&&e.parentNode.removeChild(e)}function Gt(e){return document.createElement(e)}function Zt(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function Yt(e){return document.createTextNode(e)}function Xt(){return Yt(" ")}function en(){return Yt("")}function tn(e,t,n,r){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}function nn(e){return function(t){return t.stopPropagation(),e.call(this,t)}}function rn(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function on(e,t){t=""+t,e.data!==t&&(e.data=t)}function sn(e,t){e.value=null==t?"":t}function an(e,t,n,r){null==n?e.style.removeProperty(t):e.style.setProperty(t,n,"")}function ln(e,t,n){e.classList.toggle(t,!!n)}function cn(e,t){return new e(t)}const un=new Map;let fn,dn=0;function hn(e,t,n,r,o,i,s,a=0){const l=16.666/r;let c="{\n";for(let e=0;e<=1;e+=l){const r=t+(n-t)*i(e);c+=100*e+`%{${s(r,1-r)}}\n`}const u=c+`100% {${s(n,1-n)}}\n}`,f=`__svelte_${function(e){let t=5381,n=e.length;for(;n--;)t=(t<<5)-t^e.charCodeAt(n);return t>>>0}(u)}_${a}`,d=qt(e),{stylesheet:h,rules:p}=un.get(d)||function(e,t){const n={stylesheet:Wt(t),rules:{}};return un.set(e,n),n}(d,e);p[f]||(p[f]=!0,h.insertRule(`@keyframes ${f} ${u}`,h.cssRules.length));const g=e.style.animation||"";return e.style.animation=`${g?`${g}, `:""}${f} ${r}ms linear ${o}ms 1 both`,dn+=1,f}function pn(e,t){const n=(e.style.animation||"").split(", "),r=n.filter(t?e=>e.indexOf(t)<0:e=>-1===e.indexOf("__svelte")),o=n.length-r.length;o&&(e.style.animation=r.join(", "),dn-=o,dn||Bt((()=>{dn||(un.forEach((e=>{const{ownerNode:t}=e.stylesheet;t&&Kt(t)})),un.clear())})))}function gn(e){fn=e}function mn(){if(!fn)throw new Error("Function called outside component initialization");return fn}function yn(e){mn().$$.on_mount.push(e)}function bn(e,t){return mn().$$.context.set(e,t),t}function vn(e){return mn().$$.context.get(e)}function wn(e,t){const n=e.$$.callbacks[t.type];n&&n.slice().forEach((e=>e.call(this,t)))}const xn=[],Sn=[];let En=[];const $n=[],Tn=Promise.resolve();let kn=!1;function Cn(){kn||(kn=!0,Tn.then(Mn))}function On(){return Cn(),Tn}function In(e){En.push(e)}const Ln=new Set;let Pn,An=0;function Mn(){if(0!==An)return;const e=fn;do{try{for(;An<xn.length;){const e=xn[An];An++,gn(e),Dn(e.$$)}}catch(e){throw xn.length=0,An=0,e}for(gn(null),xn.length=0,An=0;Sn.length;)Sn.pop()();for(let e=0;e<En.length;e+=1){const t=En[e];Ln.has(t)||(Ln.add(t),t())}En.length=0}while(xn.length);for(;$n.length;)$n.pop()();kn=!1,Ln.clear(),gn(e)}function Dn(e){if(null!==e.fragment){e.update(),Et(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(In)}}function Nn(e,t,n){e.dispatchEvent(function(e,t,{bubbles:n=!1,cancelable:r=!1}={}){return new CustomEvent(e,{detail:t,bubbles:n,cancelable:r})}(`${t?"intro":"outro"}${n}`))}const Rn=new Set;let Fn;function Un(){Fn={r:0,c:[],p:Fn}}function jn(){Fn.r||Et(Fn.c),Fn=Fn.p}function _n(e,t){e&&e.i&&(Rn.delete(e),e.i(t))}function Bn(e,t,n,r){if(e&&e.o){if(Rn.has(e))return;Rn.add(e),Fn.c.push((()=>{Rn.delete(e),r&&(n&&e.d(1),r())})),e.o(t)}else r&&r()}const Qn={duration:0};function zn(e,t,n,r){let o,i=t(e,n,{direction:"both"}),s=r?0:1,a=null,l=null,c=null;function u(){c&&pn(e,c)}function f(e,t){const n=e.b-s;return t*=Math.abs(n),{a:s,b:e.b,d:n,duration:t,start:e.start,end:e.start+t,group:e.group}}function d(t){const{delay:n=0,duration:r=300,easing:d=vt,tick:h=bt,css:p}=i||Qn,g={start:_t()+n,b:t};t||(g.group=Fn,Fn.r+=1),"inert"in e&&(t?void 0!==o&&(e.inert=o):(o=e.inert,e.inert=!0)),a||l?l=g:(p&&(u(),c=hn(e,s,t,r,n,d,p)),t&&h(0,1),a=f(g,r),In((()=>Nn(e,t,"start"))),function(e){let t;0===Qt.size&&Bt(zt),new Promise((n=>{Qt.add(t={c:e,f:n})}))}((t=>{if(l&&t>l.start&&(a=f(l,r),l=null,Nn(e,a.b,"start"),p&&(u(),c=hn(e,s,a.b,a.duration,0,d,i.css))),a)if(t>=a.end)h(s=a.b,1-s),Nn(e,a.b,"end"),l||(a.b?u():--a.group.r||Et(a.group.c)),a=null;else if(t>=a.start){const e=t-a.start;s=a.a+a.d*d(e/a.duration),h(s,1-s)}return!(!a&&!l)})))}return{run(e){$t(i)?(Pn||(Pn=Promise.resolve(),Pn.then((()=>{Pn=null}))),Pn).then((()=>{i=i({direction:e?"in":"out"}),d(e)})):d(e)},end(){u(),a=l=null}}}function Hn(e){return void 0!==e?.length?e:Array.from(e)}function Vn(e,t){e.d(1),t.delete(e.key)}function qn(e,t){Bn(e,1,1,(()=>{t.delete(e.key)}))}function Wn(e,t,n,r,o,i,s,a,l,c,u,f){let d=e.length,h=i.length,p=d;const g={};for(;p--;)g[e[p].key]=p;const m=[],y=new Map,b=new Map,v=[];for(p=h;p--;){const e=f(o,i,p),r=n(e);let a=s.get(r);a?v.push((()=>a.p(e,t))):(a=c(r,e),a.c()),y.set(r,m[p]=a),r in g&&b.set(r,Math.abs(p-g[r]))}const w=new Set,x=new Set;function S(e){_n(e,1),e.m(a,u),s.set(e.key,e),u=e.first,h--}for(;d&&h;){const t=m[h-1],n=e[d-1],r=t.key,o=n.key;t===n?(u=t.first,d--,h--):y.has(o)?!s.has(r)||w.has(r)?S(t):x.has(o)?d--:b.get(r)>b.get(o)?(x.add(r),S(t)):(w.add(o),d--):(l(n,s),d--)}for(;d--;){const t=e[d];y.has(t.key)||l(t,s)}for(;h;)S(m[h-1]);return Et(v),m}function Jn(e,t){const n={},r={},o={$$scope:1};let i=e.length;for(;i--;){const s=e[i],a=t[i];if(a){for(const e in s)e in a||(r[e]=1);for(const e in a)o[e]||(n[e]=a[e],o[e]=1);e[i]=a}else for(const e in s)o[e]=1}for(const e in r)e in n||(n[e]=void 0);return n}function Kn(e){return"object"==typeof e&&null!==e?e:{}}function Gn(e){e&&e.c()}function Zn(e,t,n){const{fragment:r,after_update:o}=e.$$;r&&r.m(t,n),In((()=>{const t=e.$$.on_mount.map(xt).filter($t);e.$$.on_destroy?e.$$.on_destroy.push(...t):Et(t),e.$$.on_mount=[]})),o.forEach(In)}function Yn(e,t){const n=e.$$;null!==n.fragment&&(!function(e){const t=[],n=[];En.forEach((r=>-1===e.indexOf(r)?t.push(r):n.push(r))),n.forEach((e=>e())),En=t}(n.after_update),Et(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Xn(e,t,n,r,o,i,s=null,a=[-1]){const l=fn;gn(e);const c=e.$$={fragment:null,ctx:[],props:i,update:bt,not_equal:o,bound:St(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(l?l.$$.context:[])),callbacks:St(),dirty:a,skip_bound:!1,root:t.target||l.$$.root};s&&s(c.root);let u=!1;if(c.ctx=n?n(e,t.props||{},((t,n,...r)=>{const i=r.length?r[0]:n;return c.ctx&&o(c.ctx[t],c.ctx[t]=i)&&(!c.skip_bound&&c.bound[t]&&c.bound[t](i),u&&function(e,t){-1===e.$$.dirty[0]&&(xn.push(e),Cn(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}(e,t)),n})):[],c.update(),u=!0,Et(c.before_update),c.fragment=!!r&&r(c.ctx),t.target){if(t.hydrate){const e=function(e){return Array.from(e.childNodes)}(t.target);c.fragment&&c.fragment.l(e),e.forEach(Kt)}else c.fragment&&c.fragment.c();t.intro&&_n(e.$$.fragment),Zn(e,t.target,t.anchor),Mn()}gn(l)}class er{$$=void 0;$$set=void 0;$destroy(){Yn(this,1),this.$destroy=bt}$on(e,t){if(!$t(t))return bt;const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const tr=[];function nr(e,t){return{subscribe:rr(e,t).subscribe}}function rr(e,t=bt){let n;const r=new Set;function o(t){if(Tt(e,t)&&(e=t,n)){const t=!tr.length;for(const t of r)t[1](),tr.push(t,e);if(t){for(let e=0;e<tr.length;e+=2)tr[e][0]