single-file.js 456 KB

1
  1. !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).singlefile={})}(this,(function(e){"use strict";const{Array:t,Object:n,String:r,Number:a,BigInt:o,Math:i,Date:s,Map:l,Set:c,Response:u,URL:d,Error:h,Uint8Array:p,Uint16Array:m,Uint32Array:f,DataView:g,Blob:b,Promise:y,TextEncoder:w,TextDecoder:k,document:v,crypto:x,btoa:A,TransformStream:S,ReadableStream:E,WritableStream:T,CompressionStream:C,DecompressionStream:R,navigator:_,Worker:z}=globalThis,I=4294967295,L=65535,P=8,D=0,N=99,U=67324752,M=134695760,O=M,F=33639248,q=101010256,B=101075792,j=117853008,H=22,W=1,V=39169,K=10,$=1,G=21589,Y=6534,J=1,Q=8,Z=2048,X=45,ee=51,te="/",ne=new s(2107,11,31),re=new s(1980,0,1),ae=void 0,oe="undefined",ie="function";class se{constructor(e){return class extends S{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const le=64;let ce=2;try{typeof _!=oe&&_.hardwareConcurrency&&(ce=_.hardwareConcurrency)}catch(e){}const ue={chunkSize:524288,maxWorkers:ce,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:ae,CompressionStreamNative:typeof C!=oe&&C,DecompressionStreamNative:typeof R!=oe&&R},de=n.assign({},ue);function he(){return de}function pe(e){return i.max(e.chunkSize,le)}function me(e){const{baseURL:n,chunkSize:r,maxWorkers:a,terminateWorkerTimeout:o,useCompressionStream:i,useWebWorkers:s,Deflate:l,Inflate:c,CompressionStream:u,DecompressionStream:d,workerScripts:p}=e;if(fe("baseURL",n),fe("chunkSize",r),fe("maxWorkers",a),fe("terminateWorkerTimeout",o),fe("useCompressionStream",i),fe("useWebWorkers",s),l&&(de.CompressionStream=new se(l)),c&&(de.DecompressionStream=new se(c)),fe("CompressionStream",u),fe("DecompressionStream",d),p!==ae){const{deflate:e,inflate:n}=p;if((e||n)&&(de.workerScripts||(de.workerScripts={})),e){if(!t.isArray(e))throw new h("workerScripts.deflate must be an array");de.workerScripts.deflate=e}if(n){if(!t.isArray(n))throw new h("workerScripts.inflate must be an array");de.workerScripts.inflate=n}}}function fe(e,t){t!==ae&&(de[e]=t)}function ge(e,t,r){return class{constructor(a){const o=this;var i,s;i=a,s="level",("function"==typeof n.hasOwn?n.hasOwn(i,s):i.hasOwnProperty(s))&&void 0===a.level&&delete a.level,o.codec=new e(n.assign({},t,a)),r(o.codec,(e=>{if(o.pendingData){const t=o.pendingData;o.pendingData=new p(t.length+e.length);const{pendingData:n}=o;n.set(t,0),n.set(e,t.length)}else o.pendingData=new p(e)}))}append(e){return this.codec.push(e),a(this)}flush(){return this.codec.push(new p,!0),a(this)}};function a(e){if(e.pendingData){const t=e.pendingData;return e.pendingData=null,t}return new p}}const be=[];for(let e=0;e<256;e++){let t=e;for(let e=0;e<8;e++)1&t?t=t>>>1^3988292384:t>>>=1;be[e]=t}class ye{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let n=0,r=0|e.length;n<r;n++)t=t>>>8^be[255&(t^e[n])];this.crc=t}get(){return~this.crc}}class we extends S{constructor(){let e;const t=new ye;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){const n=new p(4);new g(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}}function ke(e){if(void 0===w){e=unescape(encodeURIComponent(e));const t=new p(e.length);for(let n=0;n<t.length;n++)t[n]=e.charCodeAt(n);return t}return(new w).encode(e)}const ve={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=ve.getPartial(n);return 32===r?e.concat(t):ve._shiftRight(t,r,0|n,e.slice(0,e.length-1))},bitLength(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+ve.getPartial(n)},clamp(e,t){if(32*e.length<t)return e;const n=(e=e.slice(0,i.ceil(t/32))).length;return t&=31,n>0&&t&&(e[n-1]=ve.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,getPartial:e=>i.round(e/1099511627776)||32,_shiftRight(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let a=0;a<e.length;a++)r.push(n|e[a]>>>t),n=e[a]<<32-t;const a=e.length?e[e.length-1]:0,o=ve.getPartial(a);return r.push(ve.partial(t+o&31,t+o>32?n:r.pop(),1)),r}},xe={bytes:{fromBits(e){const t=ve.bitLength(e)/8,n=new p(t);let r;for(let a=0;a<t;a++)0==(3&a)&&(r=e[a/4]),n[a]=r>>>24,r<<=8;return n},toBits(e){const t=[];let n,r=0;for(n=0;n<e.length;n++)r=r<<8|e[n],3==(3&n)&&(t.push(r),r=0);return 3&n&&t.push(ve.partial(8*(3&n),r)),t}}},Ae={sha1:class{constructor(e){const t=this;t.blockSize=512,t._init=[1732584193,4023233417,2562383102,271733878,3285377520],t._key=[1518500249,1859775393,2400959708,3395469782],e?(t._h=e._h.slice(0),t._buffer=e._buffer.slice(0),t._length=e._length):t.reset()}reset(){const e=this;return e._h=e._init.slice(0),e._buffer=[],e._length=0,e}update(e){const t=this;"string"==typeof e&&(e=xe.utf8String.toBits(e));const n=t._buffer=ve.concat(t._buffer,e),r=t._length,a=t._length=r+ve.bitLength(e);if(a>9007199254740991)throw new h("Cannot hash more than 2^53 - 1 bits");const o=new f(n);let i=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);e<=a;e+=t.blockSize)t._block(o.subarray(16*i,16*(i+1))),i+=1;return n.splice(0,16*i),t}finalize(){const e=this;let t=e._buffer;const n=e._h;t=ve.concat(t,[ve.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(i.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(),n}_f(e,t,n,r){return e<=19?t&n|~t&r:e<=39?t^n^r:e<=59?t&n|t&r|n&r:e<=79?t^n^r:void 0}_S(e,t){return t<<e|t>>>32-e}_block(e){const n=this,r=n._h,a=t(80);for(let t=0;t<16;t++)a[t]=e[t];let o=r[0],s=r[1],l=r[2],c=r[3],u=r[4];for(let e=0;e<=79;e++){e>=16&&(a[e]=n._S(1,a[e-3]^a[e-8]^a[e-14]^a[e-16]));const t=n._S(5,o)+n._f(e,s,l,c)+u+a[e]+n._key[i.floor(e/20)]|0;u=c,c=l,l=n._S(30,s),s=o,o=t}r[0]=r[0]+o|0,r[1]=r[1]+s|0,r[2]=r[2]+l|0,r[3]=r[3]+c|0,r[4]=r[4]+u|0}}},Se={aes:class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],r=t._tables[1],a=e.length;let o,i,s,l=1;if(4!==a&&6!==a&&8!==a)throw new h("invalid aes key size");for(t._key=[i=e.slice(0),s=[]],o=a;o<4*a+28;o++){let e=i[o-1];(o%a==0||8===a&&o%a==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%a==0&&(e=e<<8^e>>>24^l<<24,l=l<<1^283*(l>>7))),i[o]=i[o-a]^e}for(let e=0;o;e++,o--){const t=i[3&e?o:o-4];s[e]=o<=4||e<4?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],n=e[4],r=t[4],a=[],o=[];let i,s,l,c;for(let e=0;e<256;e++)o[(a[e]=e<<1^283*(e>>7))^e]=e;for(let u=i=0;!n[u];u^=s||1,i=o[i]||1){let o=i^i<<1^i<<2^i<<3^i<<4;o=o>>8^255&o^99,n[u]=o,r[o]=u,c=a[l=a[s=a[u]]];let d=16843009*c^65537*l^257*s^16843008*u,h=257*a[o]^16843008*o;for(let n=0;n<4;n++)e[n][u]=h=h<<24^h>>>8,t[n][o]=d=d<<24^d>>>8}for(let n=0;n<5;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}_crypt(e,t){if(4!==e.length)throw new h("invalid aes block size");const n=this._key[t],r=n.length/4-2,a=[0,0,0,0],o=this._tables[t],i=o[0],s=o[1],l=o[2],c=o[3],u=o[4];let d,p,m,f=e[0]^n[0],g=e[t?3:1]^n[1],b=e[2]^n[2],y=e[t?1:3]^n[3],w=4;for(let e=0;e<r;e++)d=i[f>>>24]^s[g>>16&255]^l[b>>8&255]^c[255&y]^n[w],p=i[g>>>24]^s[b>>16&255]^l[y>>8&255]^c[255&f]^n[w+1],m=i[b>>>24]^s[y>>16&255]^l[f>>8&255]^c[255&g]^n[w+2],y=i[y>>>24]^s[f>>16&255]^l[g>>8&255]^c[255&b]^n[w+3],w+=4,f=d,g=p,b=m;for(let e=0;e<4;e++)a[t?3&-e:e]=u[f>>>24]<<24^u[g>>16&255]<<16^u[b>>8&255]<<8^u[255&y]^n[w++],d=f,f=g,g=b,b=y,y=d;return a}}},Ee={getRandomValues(e){const t=new f(e.buffer),n=e=>{let t=987654321;const n=4294967295;return function(){t=36969*(65535&t)+(t>>16)&n;return(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(i.random()>.5?1:-1)}};for(let r,a=0;a<e.length;a+=4){const e=n(4294967296*(r||i.random()));r=987654071*e(),t[a/4]=4294967296*e()|0}return e}},Te={ctrGladman:class{constructor(e,t){this._prf=e,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(e){return this.calculate(this._prf,e,this._iv)}incWord(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}incCounter(e){0===(e[0]=this.incWord(e[0]))&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let r;if(!(r=t.length))return[];const a=ve.bitLength(t);for(let a=0;a<r;a+=4){this.incCounter(n);const r=e.encrypt(n);t[a]^=r[0],t[a+1]^=r[1],t[a+2]^=r[2],t[a+3]^=r[3]}return ve.clamp(t,a)}}},Ce={importKey:e=>new Ce.hmacSha1(xe.bytes.toBits(e)),pbkdf2(e,t,n,r){if(n=n||1e4,r<0||n<0)throw new h("invalid params to pbkdf2");const a=1+(r>>5)<<2;let o,i,s,l,c;const u=new ArrayBuffer(a),d=new g(u);let p=0;const m=ve;for(t=xe.bytes.toBits(t),c=1;p<(a||1);c++){for(o=i=e.encrypt(m.concat(t,[c])),s=1;s<n;s++)for(i=e.encrypt(i),l=0;l<i.length;l++)o[l]^=i[l];for(s=0;p<(a||1)&&s<o.length;s++)d.setInt32(p,o[s]),p+=4}return u.slice(0,r/8)},hmacSha1:class{constructor(e){const t=this,n=t._hash=Ae.sha1,r=[[],[]];t._baseHash=[new n,new n];const a=t._baseHash[0].blockSize/32;e.length>a&&(e=(new n).update(e).finalize());for(let t=0;t<a;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t._baseHash[0].update(r[0]),t._baseHash[1].update(r[1]),t._resultHash=new n(t._baseHash[0])}reset(){const e=this;e._resultHash=new e._hash(e._baseHash[0]),e._updated=!1}update(e){this._updated=!0,this._resultHash.update(e)}digest(){const e=this,t=e._resultHash.finalize(),n=new e._hash(e._baseHash[1]).update(t).finalize();return e.reset(),n}encrypt(e){if(this._updated)throw new h("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},Re=void 0!==x&&"function"==typeof x.getRandomValues,_e="Invalid password",ze="Invalid signature",Ie="zipjs-abort-check-password";function Le(e){return Re?x.getRandomValues(e):Ee.getRandomValues(e)}const Pe=16,De="raw",Ne={name:"PBKDF2"},Ue=n.assign({hash:{name:"HMAC"}},Ne),Me=n.assign({iterations:1e3,hash:{name:"SHA-1"}},Ne),Oe=["deriveBits"],Fe=[8,12,16],qe=[16,24,32],Be=10,je=[0,0,0,0],He="undefined",We="function",Ve=typeof x!=He,Ke=Ve&&x.subtle,$e=Ve&&typeof Ke!=He,Ge=xe.bytes,Ye=Se.aes,Je=Te.ctrGladman,Qe=Ce.hmacSha1;let Ze=Ve&&$e&&typeof Ke.importKey==We,Xe=Ve&&$e&&typeof Ke.deriveBits==We;class et extends S{constructor({password:e,signed:t,encryptionStrength:r,checkPasswordOnly:a}){super({start(){n.assign(this,{ready:new y((e=>this.resolveReady=e)),password:e,signed:t,strength:r-1,pending:new p})},async transform(e,t){const n=this,{password:r,strength:o,resolveReady:i,ready:s}=n;r?(await async function(e,t,n,r){const a=await rt(e,t,n,ot(r,0,Fe[t])),o=ot(r,Fe[t]);if(a[0]!=o[0]||a[1]!=o[1])throw new h(_e)}(n,o,r,ot(e,0,Fe[o]+2)),e=ot(e,Fe[o]+2),a?t.error(new h(Ie)):i()):await s;const l=new p(e.length-Be-(e.length-Be)%Pe);t.enqueue(nt(n,e,l,0,Be,!0))},async flush(e){const{signed:t,ctr:n,hmac:r,pending:a,ready:o}=this;await o;const i=ot(a,0,a.length-Be),s=ot(a,a.length-Be);let l=new p;if(i.length){const e=st(Ge,i);r.update(e);const t=n.update(e);l=it(Ge,t)}if(t){const e=ot(it(Ge,r.digest()),0,Be);for(let t=0;t<Be;t++)if(e[t]!=s[t])throw new h(ze)}e.enqueue(l)}})}}class tt extends S{constructor({password:e,encryptionStrength:t}){let r;super({start(){n.assign(this,{ready:new y((e=>this.resolveReady=e)),password:e,strength:t-1,pending:new p})},async transform(e,t){const n=this,{password:r,strength:a,resolveReady:o,ready:i}=n;let s=new p;r?(s=await async function(e,t,n){const r=Le(new p(Fe[t])),a=await rt(e,t,n,r);return at(r,a)}(n,a,r),o()):await i;const l=new p(s.length+e.length-e.length%Pe);l.set(s,0),t.enqueue(nt(n,e,l,s.length,0))},async flush(e){const{ctr:t,hmac:n,pending:a,ready:o}=this;await o;let i=new p;if(a.length){const e=t.update(st(Ge,a));n.update(e),i=it(Ge,e)}r.signature=it(Ge,n.digest()).slice(0,Be),e.enqueue(at(i,r.signature))}}),r=this}}function nt(e,t,n,r,a,o){const{ctr:i,hmac:s,pending:l}=e,c=t.length-a;let u;for(l.length&&(t=at(l,t),n=function(e,t){if(t&&t>e.length){const n=e;(e=new p(t)).set(n,0)}return e}(n,c-c%Pe)),u=0;u<=c-Pe;u+=Pe){const e=st(Ge,ot(t,u,u+Pe));o&&s.update(e);const a=i.update(e);o||s.update(a),n.set(it(Ge,a),u+r)}return e.pending=ot(t,u),n}async function rt(e,r,a,o){e.password=null;const i=ke(a),s=await async function(e,t,n,r,a){if(!Ze)return Ce.importKey(t);try{return await Ke.importKey(e,t,n,r,a)}catch(e){return Ze=!1,Ce.importKey(t)}}(De,i,Ue,!1,Oe),l=await async function(e,t,n){if(!Xe)return Ce.pbkdf2(t,e.salt,Me.iterations,n);try{return await Ke.deriveBits(e,t,n)}catch(r){return Xe=!1,Ce.pbkdf2(t,e.salt,Me.iterations,n)}}(n.assign({salt:o},Me),s,8*(2*qe[r]+2)),c=new p(l),u=st(Ge,ot(c,0,qe[r])),d=st(Ge,ot(c,qe[r],2*qe[r])),h=ot(c,2*qe[r]);return n.assign(e,{keys:{key:u,authentication:d,passwordVerification:h},ctr:new Je(new Ye(u),t.from(je)),hmac:new Qe(d)}),h}function at(e,t){let n=e;return e.length+t.length&&(n=new p(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function ot(e,t,n){return e.subarray(t,n)}function it(e,t){return e.fromBits(t)}function st(e,t){return e.toBits(t)}const lt=12;class ct extends S{constructor({password:e,passwordVerification:t,checkPasswordOnly:r}){super({start(){n.assign(this,{password:e,passwordVerification:t}),pt(this,e)},transform(e,t){const n=this;if(n.password){const t=dt(n,e.subarray(0,lt));if(n.password=null,t[11]!=n.passwordVerification)throw new h(_e);e=e.subarray(lt)}r?t.error(new h(Ie)):t.enqueue(dt(n,e))}})}}class ut extends S{constructor({password:e,passwordVerification:t}){super({start(){n.assign(this,{password:e,passwordVerification:t}),pt(this,e)},transform(e,t){const n=this;let r,a;if(n.password){n.password=null;const t=Le(new p(lt));t[11]=n.passwordVerification,r=new p(e.length+t.length),r.set(ht(n,t),0),a=lt}else r=new p(e.length),a=0;r.set(ht(n,e),a),t.enqueue(r)}})}}function dt(e,t){const n=new p(t.length);for(let r=0;r<t.length;r++)n[r]=ft(e)^t[r],mt(e,n[r]);return n}function ht(e,t){const n=new p(t.length);for(let r=0;r<t.length;r++)n[r]=ft(e)^t[r],mt(e,t[r]);return n}function pt(e,t){const r=[305419896,591751049,878082192];n.assign(e,{keys:r,crcKey0:new ye(r[0]),crcKey2:new ye(r[2])});for(let n=0;n<t.length;n++)mt(e,t.charCodeAt(n))}function mt(e,t){let[n,r,a]=e.keys;e.crcKey0.append([t]),n=~e.crcKey0.get(),r=bt(i.imul(bt(r+gt(n)),134775813)+1),e.crcKey2.append([r>>>24]),a=~e.crcKey2.get(),e.keys=[n,r,a]}function ft(e){const t=2|e.keys[2];return gt(i.imul(t,1^t)>>>8)}function gt(e){return 255&e}function bt(e){return 4294967295&e}const yt="deflate-raw";class wt extends S{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:a,encrypted:o,useCompressionStream:i,zipCrypto:s,signed:l,level:c}=e,u=this;let d,h,p=vt(super.readable);o&&!s||!l||(d=new we,p=St(p,d)),a&&(p=At(p,i,{level:c,chunkSize:t},r,n)),o&&(s?p=St(p,new ut(e)):(h=new tt(e),p=St(p,h))),xt(u,p,(()=>{let e;o&&!s&&(e=h.signature),o&&!s||!l||(e=new g(d.value.buffer).getUint32(0)),u.signature=e}))}}class kt extends S{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:a,encrypted:o,signed:i,signature:s,compressed:l,useCompressionStream:c}=e;let u,d,p=vt(super.readable);o&&(a?p=St(p,new ct(e)):(d=new et(e),p=St(p,d))),l&&(p=At(p,c,{chunkSize:t},r,n)),o&&!a||!i||(u=new we,p=St(p,u)),xt(this,p,(()=>{if((!o||a)&&i){const e=new g(u.value.buffer);if(s!=e.getUint32(0,!1))throw new h(ze)}}))}}function vt(e){return St(e,new S({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function xt(e,t,r){t=St(t,new S({flush:r})),n.defineProperty(e,"readable",{get:()=>t})}function At(e,t,n,r,a){try{e=St(e,new(t&&r?r:a)(yt,n))}catch(r){if(!t)throw r;e=St(e,new a(yt,n))}return e}function St(e,t){return e.pipeThrough(t)}const Et="message",Tt="start",Ct="pull",Rt="data",_t="ack",zt="close",It="deflate",Lt="inflate";class Pt extends S{constructor(e,t){super({});const r=this,{codecType:a}=e;let o;a.startsWith(It)?o=wt:a.startsWith(Lt)&&(o=kt);let i=0;const s=new o(e,t),l=super.readable,c=new S({transform(e,t){e&&e.length&&(i+=e.length,t.enqueue(e))},flush(){const{signature:e}=s;n.assign(r,{signature:e,size:i})}});n.defineProperty(r,"readable",{get:()=>l.pipeThrough(s).pipeThrough(c)})}}const Dt=typeof z!=oe;class Nt{constructor(e,{readable:t,writable:r},{options:a,config:o,streamOptions:i,useWebWorkers:s,transferStreams:l,scripts:c},u){const{signal:d}=i;return n.assign(e,{busy:!0,readable:t.pipeThrough(new Ut(t,i,o),{signal:d}),writable:r,options:n.assign({},a),scripts:c,transferStreams:l,terminate(){const{worker:t,busy:n}=e;t&&!n&&(t.terminate(),e.interface=null)},onTaskFinished(){e.busy=!1,u(e)}}),(s&&Dt?Ft:Ot)(e,o)}}class Ut extends S{constructor(e,{onstart:t,onprogress:n,size:r,onend:a},{chunkSize:o}){let i=0;super({start(){t&&Mt(t,r)},async transform(e,t){i+=e.length,n&&await Mt(n,i,r),t.enqueue(e)},flush(){e.size=i,a&&Mt(a,i)}},{highWaterMark:1,size:()=>o})}}async function Mt(e,...t){try{await e(...t)}catch(e){}}function Ot(e,t){return{run:()=>async function({options:e,readable:t,writable:n,onTaskFinished:r},a){const o=new Pt(e,a);try{await t.pipeThrough(o).pipeTo(n,{preventClose:!0,preventAbort:!0});const{signature:e,size:r}=o;return{signature:e,size:r}}finally{r()}}(e,t)}}function Ft(e,{baseURL:t,chunkSize:r}){return e.interface||n.assign(e,{worker:jt(e.scripts[0],t,e),interface:{run:()=>async function(e,t){let r,a;const o=new y(((e,t)=>{r=e,a=t}));n.assign(e,{reader:null,writer:null,resolveResult:r,rejectResult:a,result:o});const{readable:i,options:s,scripts:l}=e,{writable:c,closed:u}=function(e){const t=e.getWriter();let n;const r=new y((e=>n=e)),a=new T({async write(e){await t.ready,await t.write(e)},close(){t.releaseLock(),n()},abort:e=>t.abort(e)});return{writable:a,closed:r}}(e.writable),d=Ht({type:Tt,scripts:l.slice(1),options:s,config:t,readable:i,writable:c},e);d||n.assign(e,{reader:i.getReader(),writer:c.getWriter()});const h=await o;try{await c.getWriter().close()}catch(e){}return await u,h}(e,{chunkSize:r})}}),e.interface}let qt=!0,Bt=!0;function jt(e,t,r){const a={type:"module"};let o,i;typeof e==ie&&(e=e());try{o=new d(e,t)}catch(t){o=e}if(qt)try{i=new z(o)}catch(e){qt=!1,i=new z(o,a)}else i=new z(o,a);return i.addEventListener(Et,(e=>async function({data:e},t){const{type:r,value:a,messageId:o,result:i,error:s}=e,{reader:l,writer:c,resolveResult:u,rejectResult:d,onTaskFinished:m}=t;try{if(s){const{message:e,stack:t,code:r,name:a}=s,o=new h(e);n.assign(o,{stack:t,code:r,name:a}),f(o)}else{if(r==Ct){const{value:e,done:n}=await l.read();Ht({type:Rt,value:e,done:n,messageId:o},t)}r==Rt&&(await c.ready,await c.write(new p(a)),Ht({type:_t,messageId:o},t)),r==zt&&f(null,i)}}catch(s){f(s)}function f(e,t){e?d(e):u(t),c&&c.releaseLock(),m()}}(e,r))),i}function Ht(e,{worker:t,writer:n,onTaskFinished:r,transferStreams:a}){try{let{value:n,readable:r,writable:o}=e;const i=[];if(n&&(e.value=n.buffer,i.push(e.value)),a&&Bt?(r&&i.push(r),o&&i.push(o)):e.readable=e.writable=null,i.length)try{return t.postMessage(e,i),!0}catch(n){Bt=!1,e.readable=e.writable=null,t.postMessage(e)}else t.postMessage(e)}catch(e){throw n&&n.releaseLock(),r(),e}}let Wt=[];const Vt=[];let Kt=0;async function $t(e,t){const{options:n,config:r}=t,{transferStreams:o,useWebWorkers:i,useCompressionStream:s,codecType:l,compressed:c,signed:u,encrypted:d}=n,{workerScripts:h,maxWorkers:p,terminateWorkerTimeout:m}=r;t.transferStreams=o||o===ae;const f=!(c||u||d||t.transferStreams);let g;t.useWebWorkers=!f&&(i||i===ae&&r.useWebWorkers),t.scripts=t.useWebWorkers&&h?h[l]:[],n.useCompressionStream=s||s===ae&&r.useCompressionStream;const b=Wt.find((e=>!e.busy));if(b)Gt(b),g=new Nt(b,e,t,w);else if(Wt.length<p){const n={indexWorker:Kt};Kt++,Wt.push(n),g=new Nt(n,e,t,w)}else g=await new y((n=>Vt.push({resolve:n,stream:e,workerOptions:t})));return g.run();function w(e){if(Vt.length){const[{resolve:t,stream:n,workerOptions:r}]=Vt.splice(0,1);t(new Nt(e,n,r,w))}else e.worker?(Gt(e),a.isFinite(m)&&m>=0&&(e.terminateTimeout=setTimeout((()=>{Wt=Wt.filter((t=>t!=e)),e.terminate()}),m))):Wt=Wt.filter((t=>t!=e))}}function Gt(e){const{terminateTimeout:t}=e;t&&(clearTimeout(t),e.terminateTimeout=null)}const Yt="HTTP error ",Jt="HTTP Range not supported",Qt="Writer iterator completed too soon",Zt="Content-Length",Xt="Range",en="HEAD",tn="GET",nn="bytes",rn=65536,an="writable";class on{constructor(){this.size=0}init(){this.initialized=!0}}class sn extends on{get readable(){const e=this,{chunkSize:t=rn}=e,n=new E({start(){this.chunkOffset=0},async pull(r){const{offset:a=0,size:o,diskNumberStart:s}=n,{chunkOffset:l}=this;r.enqueue(await Ln(e,a+l,i.min(t,o-l),s)),l+t>o?r.close():this.chunkOffset+=t}});return n}}class ln extends on{constructor(){super();const e=this,t=new T({write:t=>e.writeUint8Array(t)});n.defineProperty(e,an,{get:()=>t})}writeUint8Array(){}}class cn extends sn{constructor(e){super(),n.assign(this,{blob:e,size:e.size})}async readUint8Array(e,t){const n=this,r=e+t,a=e||r<n.size?n.blob.slice(e,r):n.blob;let o=await a.arrayBuffer();return o.byteLength>t&&(o=o.slice(e,r)),new p(o)}}class un extends on{constructor(e){super();const t=new S,r=[];e&&r.push(["Content-Type",e]),n.defineProperty(this,an,{get:()=>t.writable}),this.blob=new u(t.readable,{headers:r}).blob()}getData(){return this.blob}}class dn extends cn{constructor(e){super(new b([e],{type:"text/plain"}))}}class hn extends sn{constructor(e,t){super(),mn(this,e,t)}async init(){await fn(this,An,wn),super.init()}readUint8Array(e,t){return gn(this,e,t,An,wn)}}class pn extends sn{constructor(e,t){super(),mn(this,e,t)}async init(){await fn(this,Sn,kn),super.init()}readUint8Array(e,t){return gn(this,e,t,Sn,kn)}}function mn(e,t,r){const{preventHeadRequest:a,useRangeHeader:o,forceRangeRequests:i}=r;delete(r=n.assign({},r)).preventHeadRequest,delete r.useRangeHeader,delete r.forceRangeRequests,delete r.useXHR,n.assign(e,{url:t,options:r,preventHeadRequest:a,useRangeHeader:o,forceRangeRequests:i})}async function fn(e,t,n){const{url:r,useRangeHeader:o,forceRangeRequests:i}=e;if(function(e){const{baseURL:t}=he(),{protocol:n}=new d(e,t);return"http:"==n||"https:"==n}(r)&&(o||i)){const{headers:r}=await t(tn,e,bn(e));if(!i&&r.get("Accept-Ranges")!=nn)throw new h(Jt);{let o;const i=r.get("Content-Range");if(i){const e=i.trim().split(/\s*\/\s*/);if(e.length){const t=e[1];t&&"*"!=t&&(o=a(t))}}o===ae?await xn(e,t,n):e.size=o}}else await xn(e,t,n)}async function gn(e,t,n,r,a){const{useRangeHeader:o,forceRangeRequests:i,options:s}=e;if(o||i){const a=await r(tn,e,bn(e,t,n));if(206!=a.status)throw new h(Jt);return new p(await a.arrayBuffer())}{const{data:r}=e;return r||await a(e,s),new p(e.data.subarray(t,t+n))}}function bn(e,t=0,r=1){return n.assign({},yn(e),{[Xt]:nn+"="+t+"-"+(t+r-1)})}function yn({options:e}){const{headers:t}=e;if(t)return Symbol.iterator in t?n.fromEntries(t):t}async function wn(e){await vn(e,An)}async function kn(e){await vn(e,Sn)}async function vn(e,t){const n=await t(tn,e,yn(e));e.data=new p(await n.arrayBuffer()),e.size||(e.size=e.data.length)}async function xn(e,t,n){if(e.preventHeadRequest)await n(e,e.options);else{const r=(await t(en,e,yn(e))).headers.get(Zt);r?e.size=a(r):await n(e,e.options)}}async function An(e,{options:t,url:r},a){const o=await fetch(r,n.assign({},t,{method:e,headers:a}));if(o.status<400)return o;throw 416==o.status?new h(Jt):new h(Yt+(o.statusText||o.status))}function Sn(e,{url:t},r){return new y(((a,o)=>{const i=new XMLHttpRequest;if(i.addEventListener("load",(()=>{if(i.status<400){const e=[];i.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach((t=>{const n=t.trim().split(/\s*:\s*/);n[0]=n[0].trim().replace(/^[a-z]|-[a-z]/g,(e=>e.toUpperCase())),e.push(n)})),a({status:i.status,arrayBuffer:()=>i.response,headers:new l(e)})}else o(416==i.status?new h(Jt):new h(Yt+(i.statusText||i.status)))}),!1),i.addEventListener("error",(e=>o(e.detail?e.detail.error:new h("Network error"))),!1),i.open(e,t),r)for(const e of n.entries(r))i.setRequestHeader(e[0],e[1]);i.responseType="arraybuffer",i.send()}))}class En extends sn{constructor(e,t={}){super(),n.assign(this,{url:e,reader:t.useXHR?new pn(e,t):new hn(e,t)})}set size(e){}get size(){return this.reader.size}async init(){await this.reader.init(),super.init()}readUint8Array(e,t){return this.reader.readUint8Array(e,t)}}class Tn extends ln{init(e=0){n.assign(this,{offset:0,array:new p(e)}),super.init()}writeUint8Array(e){const t=this;if(t.offset+e.length>t.array.length){const n=t.array;t.array=new p(n.length+e.length),t.array.set(n)}t.array.set(e,t.offset),t.offset+=e.length}getData(){return this.array}}class Cn extends sn{constructor(e){super(),this.readers=e}async init(){const e=this,{readers:t}=e;e.lastDiskNumber=0,e.lastDiskOffset=0,await y.all(t.map((async(n,r)=>{await n.init(),r!=t.length-1&&(e.lastDiskOffset+=n.size),e.size+=n.size}))),super.init()}async readUint8Array(e,t,n=0){const r=this,{readers:a}=this;let o,s=n;-1==s&&(s=a.length-1);let l=e;for(;l>=a[s].size;)l-=a[s].size,s++;const c=a[s],u=c.size;if(l+t<=u)o=await Ln(c,l,t);else{const a=u-l;o=new p(t),o.set(await Ln(c,l,a)),o.set(await r.readUint8Array(e+a,t-a,n),a)}return r.lastDiskNumber=i.max(s,r.lastDiskNumber),o}}class Rn extends on{constructor(e,t=4294967295){super();const r=this;let a,o,i;n.assign(r,{diskNumber:0,diskOffset:0,size:0,maxSize:t,availableSize:t});const s=new T({async write(t){const{availableSize:n}=r;if(i)t.length>=n?(await l(t.slice(0,n)),await c(),r.diskOffset+=a.size,r.diskNumber++,i=null,await this.write(t.slice(n))):await l(t);else{const{value:n,done:s}=await e.next();if(s&&!n)throw new h(Qt);a=n,a.size=0,a.maxSize&&(r.maxSize=a.maxSize),r.availableSize=r.maxSize,await _n(a),o=n.writable,i=o.getWriter(),await this.write(t)}},async close(){await i.ready,await c()}});async function l(e){const t=e.length;t&&(await i.ready,await i.write(e),a.size+=t,r.size+=t,r.availableSize-=t)}async function c(){o.size=a.size,await i.close()}n.defineProperty(r,an,{get:()=>s})}}async function _n(e,t){e.init&&!e.initialized&&await e.init(t)}function zn(e){return t.isArray(e)&&(e=new Cn(e)),e instanceof E&&(e={readable:e}),e}function In(e){e.writable===ae&&typeof e.next==ie&&(e=new Rn(e)),e instanceof T&&(e={writable:e});const{writable:t}=e;t.size===ae&&(t.size=0);return e instanceof Rn||n.assign(e,{diskNumber:0,diskOffset:0,availableSize:1/0,maxSize:1/0}),e}function Ln(e,t,n,r){return e.readUint8Array(t,n,r)}const Pn=Cn,Dn=Rn,Nn="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split(""),Un=256==Nn.length;function Mn(e,t){return t&&"cp437"==t.trim().toLowerCase()?function(e){if(Un){let t="";for(let n=0;n<e.length;n++)t+=Nn[e[n]];return t}return(new k).decode(e)}(e):new k(t).decode(e)}const On="filename",Fn="rawFilename",qn="comment",Bn="rawComment",jn="uncompressedSize",Hn="compressedSize",Wn="offset",Vn="diskNumberStart",Kn="lastModDate",$n="rawLastModDate",Gn="lastAccessDate",Yn="rawLastAccessDate",Jn="creationDate",Qn="rawCreationDate",Zn="internalFileAttribute",Xn="externalFileAttribute",er="msDosCompatible",tr="zip64",nr=[On,Fn,Hn,jn,Kn,$n,qn,Bn,Gn,Jn,Wn,Vn,Vn,Zn,Xn,er,tr,"directory","bitFlag","encrypted","signature","filenameUTF8","commentUTF8","compressionMethod","version","versionMadeBy","extraField","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp"];class rr{constructor(e){nr.forEach((t=>this[t]=e[t]))}}const ar="File format is not recognized",or="End of central directory not found",ir="End of Zip64 central directory not found",sr="End of Zip64 central directory locator not found",lr="Central directory header not found",cr="Local file header not found",ur="Zip64 extra field not found",dr="File contains encrypted entry",hr="Encryption method not supported",pr="Compression method not supported",mr="Split zip file",fr="utf-8",gr="cp437",br=[[jn,I],[Hn,I],[Wn,I],[Vn,L]],yr={[L]:{getValue:Rr,bytes:4},[I]:{getValue:_r,bytes:8}};class wr{constructor(e,t,r){n.assign(this,{reader:e,config:t,options:r})}async getData(e,t,r={}){const a=this,{reader:o,offset:i,diskNumberStart:s,extraFieldAES:l,compressionMethod:c,config:u,bitFlag:d,signature:m,rawLastModDate:f,uncompressedSize:g,compressedSize:b}=a,y=t.localDirectory={},w=zr(await Ln(o,i,30,s));let k=Ar(a,r,"password");if(k=k&&k.length&&k,l&&l.originalCompressionMethod!=N)throw new h(pr);if(c!=D&&c!=P)throw new h(pr);if(Rr(w,0)!=U)throw new h(cr);kr(y,w,4),y.rawExtraField=y.extraFieldLength?await Ln(o,i+30+y.filenameLength,y.extraFieldLength,s):new p,await vr(a,y,w,4,!0),n.assign(t,{lastAccessDate:y.lastAccessDate,creationDate:y.creationDate});const v=a.encrypted&&y.encrypted,x=v&&!l;if(v){if(!x&&l.strength===ae)throw new h(hr);if(!k)throw new h(dr)}const A=i+30+y.filenameLength+y.extraFieldLength,S=b,E=o.readable;n.assign(E,{diskNumberStart:s,offset:A,size:S});const C=Ar(a,r,"signal"),R=Ar(a,r,"checkPasswordOnly");R&&(e=new T),e=In(e),await _n(e,g);const{writable:_}=e,{onstart:z,onprogress:I,onend:L}=r,M={options:{codecType:Lt,password:k,zipCrypto:x,encryptionStrength:l&&l.strength,signed:Ar(a,r,"checkSignature"),passwordVerification:x&&(d.dataDescriptor?f>>>8&255:m>>>24&255),signature:m,compressed:0!=c,encrypted:v,useWebWorkers:Ar(a,r,"useWebWorkers"),useCompressionStream:Ar(a,r,"useCompressionStream"),transferStreams:Ar(a,r,"transferStreams"),checkPasswordOnly:R},config:u,streamOptions:{signal:C,size:S,onstart:z,onprogress:I,onend:L}};let O=0;try{({outputSize:O}=await $t({readable:E,writable:_},M))}catch(e){if(!R||e.message!=Ie)throw e}finally{const e=Ar(a,r,"preventClose");_.size+=O,e||_.locked||await _.getWriter().close()}return R?void 0:e.getData?e.getData():_}}function kr(e,t,r){const a=e.rawBitFlag=Cr(t,r+2),o=(a&J)==J,i=Rr(t,r+6);n.assign(e,{encrypted:o,version:Cr(t,r),bitFlag:{level:(6&a)>>1,dataDescriptor:(a&Q)==Q,languageEncodingFlag:(a&Z)==Z},rawLastModDate:i,lastModDate:Sr(i),filenameLength:Cr(t,r+22),extraFieldLength:Cr(t,r+24)})}async function vr(e,t,r,a,o){const{rawExtraField:i}=t,c=t.extraField=new l,u=zr(new p(i));let d=0;try{for(;d<i.length;){const e=Cr(u,d),t=Cr(u,d+2);c.set(e,{type:e,data:i.slice(d+4,d+4+t)}),d+=4+t}}catch(e){}const m=Cr(r,a+4);n.assign(t,{signature:Rr(r,a+10),uncompressedSize:Rr(r,a+18),compressedSize:Rr(r,a+14)});const f=c.get(W);f&&(!function(e,t){t.zip64=!0;const n=zr(e.data),r=br.filter((([e,n])=>t[e]==n));for(let a=0,o=0;a<r.length;a++){const[i,s]=r[a];if(t[i]==s){const r=yr[s];t[i]=e[i]=r.getValue(n,o),o+=r.bytes}else if(e[i])throw new h(ur)}}(f,t),t.extraFieldZip64=f);const g=c.get(28789);g&&(await xr(g,On,Fn,t,e),t.extraFieldUnicodePath=g);const b=c.get(25461);b&&(await xr(b,qn,Bn,t,e),t.extraFieldUnicodeComment=b);const y=c.get(V);y?(!function(e,t,r){const a=zr(e.data),o=Tr(a,4);n.assign(e,{vendorVersion:Tr(a,0),vendorId:Tr(a,2),strength:o,originalCompressionMethod:r,compressionMethod:Cr(a,5)}),t.compressionMethod=e.compressionMethod}(y,t,m),t.extraFieldAES=y):t.compressionMethod=m;const w=c.get(K);w&&(!function(e,t){const r=zr(e.data);let a,o=4;try{for(;o<e.data.length&&!a;){const t=Cr(r,o),n=Cr(r,o+2);t==$&&(a=e.data.slice(o+4,o+4+n)),o+=4+n}}catch(e){}try{if(a&&24==a.length){const r=zr(a),o=r.getBigUint64(0,!0),i=r.getBigUint64(8,!0),s=r.getBigUint64(16,!0);n.assign(e,{rawLastModDate:o,rawLastAccessDate:i,rawCreationDate:s});const l=Er(o),c=Er(i),u={lastModDate:l,lastAccessDate:c,creationDate:Er(s)};n.assign(e,u),n.assign(t,u)}}catch(e){}}(w,t),t.extraFieldNTFS=w);const k=c.get(G);k&&(!function(e,t,n){const r=zr(e.data),a=Tr(r,0),o=[],i=[];n?(1==(1&a)&&(o.push(Kn),i.push($n)),2==(2&a)&&(o.push(Gn),i.push(Yn)),4==(4&a)&&(o.push(Jn),i.push(Qn))):e.data.length>=5&&(o.push(Kn),i.push($n));let l=1;o.forEach(((n,a)=>{if(e.data.length>=l+4){const o=Rr(r,l);t[n]=e[n]=new s(1e3*o);const c=i[a];e[c]=o}l+=4}))}(k,t,o),t.extraFieldExtendedTimestamp=k);const v=c.get(Y);v&&(t.extraFieldUSDZ=v)}async function xr(e,t,r,a,o){const i=zr(e.data),s=new ye;s.append(o[r]);const l=zr(new p(4));l.setUint32(0,s.get(),!0);const c=Rr(i,1);n.assign(e,{version:Tr(i,0),[t]:Mn(e.data.subarray(5)),valid:!o.bitFlag.languageEncodingFlag&&c==Rr(l,0)}),e.valid&&(a[t]=e[t],a[t+"UTF8"]=!0)}function Ar(e,t,n){return t[n]===ae?e.options[n]:t[n]}function Sr(e){const t=(4294901760&e)>>16,n=65535&e;try{return new s(1980+((65024&t)>>9),((480&t)>>5)-1,31&t,(63488&n)>>11,(2016&n)>>5,2*(31&n),0)}catch(e){}}function Er(e){return new s(a(e/o(1e4)-o(116444736e5)))}function Tr(e,t){return e.getUint8(t)}function Cr(e,t){return e.getUint16(t,!0)}function Rr(e,t){return e.getUint32(t,!0)}function _r(e,t){return a(e.getBigUint64(t,!0))}function zr(e){return new g(e.buffer)}const Ir="File already exists",Lr="Zip file comment exceeds 64KB",Pr="File entry comment exceeds 64KB",Dr="File entry name exceeds 64KB",Nr="Version exceeds 65535",Ur="The strength must equal 1, 2, or 3",Mr="Extra field type exceeds 65535",Or="Extra field data exceeds 64KB",Fr="Zip64 is not supported (make sure 'keepOrder' is set to 'true')",qr=new p([7,0,2,0,65,69,3,0,0]);let Br=0;const jr=[];class Hr{constructor(e,t={}){e=In(e),n.assign(this,{writer:e,addSplitZipSignature:e instanceof Rn,options:t,config:he(),files:new l,filenames:new c,offset:e.writable.size,pendingEntriesSize:0,pendingAddFileCalls:new c,bufferedWrites:0})}async add(e="",r,a={}){const l=this,{pendingAddFileCalls:c,config:u}=l;let d;Br<u.maxWorkers?Br++:await new y((e=>jr.push(e)));try{if(e=e.trim(),l.filenames.has(e))throw new h(Ir);return l.filenames.add(e),d=async function(e,r,a,l){r=r.trim(),l.directory&&!r.endsWith(te)?r+=te:l.directory=r.endsWith(te);const c=ke(r);if(Xr(c)>L)throw new h(Dr);const u=l.comment||"",d=ke(u);if(Xr(d)>L)throw new h(Pr);const b=Kr(e,l,"version",20);if(b>L)throw new h(Nr);const w=Kr(e,l,"versionMadeBy",20);if(w>L)throw new h(Nr);const k=Kr(e,l,Kn,new s),v=Kr(e,l,Gn),x=Kr(e,l,Jn),A=Kr(e,l,er,!0),S=Kr(e,l,Zn,0),E=Kr(e,l,Xn,0),T=Kr(e,l,"password"),C=Kr(e,l,"encryptionStrength",3),R=Kr(e,l,"zipCrypto"),_=Kr(e,l,"extendedTimestamp",!0),z=Kr(e,l,"keepOrder",!0),F=Kr(e,l,"level"),q=Kr(e,l,"useWebWorkers"),B=Kr(e,l,"bufferedWrite"),j=Kr(e,l,"dataDescriptorSignature",!1),H=Kr(e,l,"signal"),oe=Kr(e,l,"useCompressionStream");let ie=Kr(e,l,"dataDescriptor",!0),se=Kr(e,l,tr);if(T!==ae&&C!==ae&&(C<1||C>3))throw new h(Ur);let le=new p;const{extraField:ce}=l;if(ce){let e=0,t=0;ce.forEach((t=>e+=4+Xr(t))),le=new p(e),ce.forEach(((e,n)=>{if(n>L)throw new h(Mr);if(Xr(e)>L)throw new h(Or);Qr(le,new m([n]),t),Qr(le,new m([Xr(e)]),t+2),Qr(le,e,t+4),t+=4+Xr(e)}))}let ue=0,de=0,he=0;const me=!0===se;a&&(a=zn(a),await _n(a),a.size===ae?(ie=!0,(se||se===ae)&&(se=!0,he=ue=I)):(he=a.size,ue=function(e){return e+5*(i.floor(e/16383)+1)}(he)));const{diskOffset:fe,diskNumber:ge,maxSize:be}=e.writer,ye=me||he>=I,we=me||ue>=I,ve=me||e.offset+e.pendingEntriesSize-fe>=I,xe=Kr(e,l,"supportZip64SplitFile",!0),Ae=xe&&me||ge+i.ceil(e.pendingEntriesSize/be)>=L;if(ve||ye||we||Ae){if(!1===se||!z)throw new h(Fr);se=!0}se=se||!1,l=n.assign({},l,{rawFilename:c,rawComment:d,version:b,versionMadeBy:w,lastModDate:k,lastAccessDate:v,creationDate:x,rawExtraField:le,zip64:se,zip64UncompressedSize:ye,zip64CompressedSize:we,zip64Offset:ve,zip64DiskNumberStart:Ae,password:T,level:F,useWebWorkers:q,encryptionStrength:C,extendedTimestamp:_,zipCrypto:R,bufferedWrite:B,keepOrder:z,dataDescriptor:ie,dataDescriptorSignature:j,signal:H,msDosCompatible:A,internalFileAttribute:S,externalFileAttribute:E,useCompressionStream:oe});const Se=function(e){const{rawFilename:t,lastModDate:n,lastAccessDate:r,creationDate:a,password:o,level:s,zip64:l,zipCrypto:c,dataDescriptor:u,directory:d,rawExtraField:h,encryptionStrength:m,extendedTimestamp:g}=e,b=0!==s&&!d,y=Boolean(o&&Xr(o));let w,k,v,x,A=e.version;if(y&&!c){w=new p(Xr(qr)+2);const e=Zr(w);Gr(e,0,V),Qr(w,qr,2),$r(e,8,m)}else w=new p;if(g){v=new p(9+(r?4:0)+(a?4:0));const e=Zr(v);Gr(e,0,G),Gr(e,2,Xr(v)-4),x=1+(r?2:0)+(a?4:0),$r(e,4,x);let t=5;Yr(e,t,i.floor(n.getTime()/1e3)),t+=4,r&&(Yr(e,t,i.floor(r.getTime()/1e3)),t+=4),a&&Yr(e,t,i.floor(a.getTime()/1e3));try{k=new p(36);const e=Zr(k),t=Vr(n);Gr(e,0,K),Gr(e,2,32),Gr(e,8,$),Gr(e,10,24),Jr(e,12,t),Jr(e,20,Vr(r)||t),Jr(e,28,Vr(a)||t)}catch(e){k=new p}}else k=v=new p;let S=Z;u&&(S|=Q);let E=D;b&&(E=P);l&&(A=A>X?A:X);y&&(S|=J,c||(A=A>ee?A:ee,E=N,b&&(w[9]=P)));const T=new p(26),C=Zr(T);Gr(C,0,A),Gr(C,2,S),Gr(C,4,E);const R=new f(1),_=Zr(R);let z;z=n<re?re:n>ne?ne:n;Gr(_,0,(z.getHours()<<6|z.getMinutes())<<5|z.getSeconds()/2),Gr(_,2,(z.getFullYear()-1980<<4|z.getMonth()+1)<<5|z.getDate());const I=R[0];Yr(C,6,I),Gr(C,22,Xr(t));const L=Xr(w,v,k,h);Gr(C,24,L);const M=new p(30+Xr(t)+L);return Yr(Zr(M),0,U),Qr(M,T,4),Qr(M,t,30),Qr(M,w,30+Xr(t)),Qr(M,v,30+Xr(t,w)),Qr(M,k,30+Xr(t,w,v)),Qr(M,h,30+Xr(t,w,v,k)),{localHeaderArray:M,headerArray:T,headerView:C,lastModDate:n,rawLastModDate:I,encrypted:y,compressed:b,version:A,compressionMethod:E,extraFieldExtendedTimestampFlag:x,rawExtraFieldExtendedTimestamp:v,rawExtraFieldNTFS:k,rawExtraFieldAES:w,extraFieldLength:L}}(l),Ee=function(e){const{zip64:t,dataDescriptor:n,dataDescriptorSignature:r}=e;let a,o=new p,i=0;n&&(o=new p(t?r?24:20:r?16:12),a=Zr(o),r&&(i=4,Yr(a,0,O)));return{dataDescriptorArray:o,dataDescriptorView:a,dataDescriptorOffset:i}}(l),Te=Xr(Se.localHeaderArray,Ee.dataDescriptorArray);de=Te+ue,e.options.usdz&&(de+=de+64);let Ce;e.pendingEntriesSize+=de;try{Ce=await async function(e,r,a,i,s){const{files:l,writer:c}=e,{keepOrder:u,dataDescriptor:d,signal:m}=s,{headerInfo:f}=i,{usdz:b}=e.options,w=t.from(l.values()).pop();let k,v,x,A,S,E,T={};l.set(r,T);try{let t;u&&(t=w&&w.lock,C()),!(s.bufferedWrite||e.writerLocked||e.bufferedWrites&&u)&&d||b?(E=c,await R()):(E=new un,E.writable.size=0,k=!0,e.bufferedWrites++,await _n(c)),await _n(E);const{writable:f}=c;let{diskOffset:y}=c;if(e.addSplitZipSignature){delete e.addSplitZipSignature;const t=new p(4);Yr(Zr(t),0,M),await Wr(f,t),e.offset+=4}k||(await t,await _(f));const{diskNumber:v}=c;if(S=!0,T.diskNumberStart=v,b&&function(e,t){const{headerInfo:n}=e;let{localHeaderArray:r,extraFieldLength:a}=n,o=Zr(r),i=64-(t+r.length)%64;i<4&&(i+=64);const s=new p(i),l=Zr(s);Gr(l,0,Y),Gr(l,2,i-2);const c=r;n.localHeaderArray=r=new p(c.length+i),Qr(r,c),Qr(r,s,c.length),o=Zr(r),Gr(o,28,a+i),e.metadataSize+=i}(i,e.offset-y),T=await async function(e,t,{diskNumberStart:r,lock:a},i,s,l){const{headerInfo:c,dataDescriptorInfo:u,metadataSize:d}=i,{localHeaderArray:h,headerArray:m,lastModDate:f,rawLastModDate:g,encrypted:b,compressed:y,version:w,compressionMethod:k,rawExtraFieldExtendedTimestamp:v,extraFieldExtendedTimestampFlag:x,rawExtraFieldNTFS:A,rawExtraFieldAES:S}=c,{dataDescriptorArray:E}=u,{rawFilename:T,lastAccessDate:C,creationDate:R,password:_,level:z,zip64:L,zip64UncompressedSize:P,zip64CompressedSize:D,zip64Offset:N,zip64DiskNumberStart:U,zipCrypto:M,dataDescriptor:O,directory:F,versionMadeBy:q,rawComment:B,rawExtraField:j,useWebWorkers:H,onstart:V,onprogress:K,onend:$,signal:G,encryptionStrength:Y,extendedTimestamp:J,msDosCompatible:Q,internalFileAttribute:Z,externalFileAttribute:X,useCompressionStream:ee}=l,te={lock:a,versionMadeBy:q,zip64:L,directory:Boolean(F),filenameUTF8:!0,rawFilename:T,commentUTF8:!0,rawComment:B,rawExtraFieldExtendedTimestamp:v,rawExtraFieldNTFS:A,rawExtraFieldAES:S,rawExtraField:j,extendedTimestamp:J,msDosCompatible:Q,internalFileAttribute:Z,externalFileAttribute:X,diskNumberStart:r};let ne,re=0,oe=0;const{writable:ie}=t;if(e){e.chunkSize=pe(s),await Wr(ie,h);const t=e.readable,n=t.size=e.size,r={options:{codecType:It,level:z,password:_,encryptionStrength:Y,zipCrypto:b&&M,passwordVerification:b&&M&&g>>8&255,signed:!0,compressed:y,encrypted:b,useWebWorkers:H,useCompressionStream:ee,transferStreams:!1},config:s,streamOptions:{signal:G,size:n,onstart:V,onprogress:K,onend:$}},a=await $t({readable:t,writable:ie},r);ie.size+=a.size,ne=a.signature,oe=e.size=t.size,re=a.size}else await Wr(ie,h);let se;if(L){let e=4;P&&(e+=8),D&&(e+=8),N&&(e+=8),U&&(e+=4),se=new p(e)}else se=new p;(function(e,t){const{signature:n,rawExtraFieldZip64:r,compressedSize:a,uncompressedSize:i,headerInfo:s,dataDescriptorInfo:l}=e,{headerView:c,encrypted:u}=s,{dataDescriptorView:d,dataDescriptorOffset:h}=l,{zip64:p,zip64UncompressedSize:m,zip64CompressedSize:f,zipCrypto:g,dataDescriptor:b}=t;u&&!g||n===ae||(Yr(c,10,n),b&&Yr(d,h,n));if(p){const e=Zr(r);Gr(e,0,W),Gr(e,2,r.length-4);let t=4;m&&(Yr(c,18,I),Jr(e,t,o(i)),t+=8),f&&(Yr(c,14,I),Jr(e,t,o(a))),b&&(Jr(d,h+4,o(a)),Jr(d,h+12,o(i)))}else Yr(c,14,a),Yr(c,18,i),b&&(Yr(d,h+4,a),Yr(d,h+8,i))})({signature:ne,rawExtraFieldZip64:se,compressedSize:re,uncompressedSize:oe,headerInfo:c,dataDescriptorInfo:u},l),O&&await Wr(ie,E);return n.assign(te,{uncompressedSize:oe,compressedSize:re,lastModDate:f,rawLastModDate:g,creationDate:R,lastAccessDate:C,encrypted:b,length:d+re,compressionMethod:k,version:w,headerArray:m,signature:ne,rawExtraFieldZip64:se,extraFieldExtendedTimestampFlag:x,zip64UncompressedSize:P,zip64CompressedSize:D,zip64Offset:N,zip64DiskNumberStart:U}),te}(a,E,T,i,e.config,s),S=!1,l.set(r,T),T.filename=r,k){await E.writable.getWriter().close();let e=await E.getData();await t,await R(),A=!0,d||(e=await async function(e,t,n,{zipCrypto:r}){let a;a=await t.slice(0,26).arrayBuffer(),26!=a.byteLength&&(a=a.slice(0,26));const o=new g(a);e.encrypted&&!r||Yr(o,14,e.signature);e.zip64?(Yr(o,18,I),Yr(o,22,I)):(Yr(o,18,e.compressedSize),Yr(o,22,e.uncompressedSize));return await Wr(n,new p(a)),t.slice(a.byteLength)}(T,e,f,s)),await _(f),T.diskNumberStart=c.diskNumber,y=c.diskOffset,await e.stream().pipeTo(f,{preventClose:!0,preventAbort:!0,signal:m}),f.size+=e.size,A=!1}if(T.offset=e.offset-y,T.zip64)!function(e,t){const{rawExtraFieldZip64:n,offset:r,diskNumberStart:a}=e,{zip64UncompressedSize:i,zip64CompressedSize:s,zip64Offset:l,zip64DiskNumberStart:c}=t,u=Zr(n);let d=4;i&&(d+=8);s&&(d+=8);l&&(Jr(u,d,o(r)),d+=8);c&&Yr(u,d,a)}(T,s);else if(T.offset>=I)throw new h(Fr);return e.offset+=T.length,T}catch(t){if(k&&A||!k&&S){if(e.hasCorruptedEntries=!0,t)try{t.corruptedEntry=!0}catch(e){}k?e.offset+=E.writable.size:e.offset=E.writable.size}throw l.delete(r),t}finally{k&&e.bufferedWrites--,x&&x(),v&&v()}function C(){T.lock=new y((e=>x=e))}async function R(){e.writerLocked=!0;const{lockWriter:t}=e;e.lockWriter=new y((t=>v=()=>{e.writerLocked=!1,t()})),await t}async function _(e){f.localHeaderArray.length>c.availableSize&&(c.availableSize=0,await Wr(e,new p))}}(e,r,a,{headerInfo:Se,dataDescriptorInfo:Ee,metadataSize:Te},l)}finally{e.pendingEntriesSize-=de}return n.assign(Ce,{name:r,comment:u,extraField:ce}),new rr(Ce)}(l,e,r,a),c.add(d),await d}catch(t){throw l.filenames.delete(e),t}finally{c.delete(d);const e=jr.shift();e?e():Br--}}async close(e=new p,n={}){const{pendingAddFileCalls:r,writer:a}=this,{writable:s}=a;for(;r.size;)await y.all(t.from(r));await async function(e,n,r){const{files:a,writer:s}=e,{diskOffset:l,writable:c}=s;let{diskNumber:u}=s,d=0,m=0,f=e.offset-l,g=a.size;for(const[,e]of a){const{rawFilename:t,rawExtraFieldZip64:n,rawExtraFieldAES:r,rawComment:a,rawExtraFieldNTFS:o,rawExtraField:s,extendedTimestamp:l,extraFieldExtendedTimestampFlag:c,lastModDate:u}=e;let d;if(l){d=new p(9);const e=Zr(d);Gr(e,0,G),Gr(e,2,5),$r(e,4,c),Yr(e,5,i.floor(u.getTime()/1e3))}else d=new p;e.rawExtraFieldCDExtendedTimestamp=d,m+=46+Xr(t,a,n,r,o,d,s)}const b=new p(m),y=Zr(b);await _n(s);let w=0;for(const[e,n]of t.from(a.values()).entries()){const{offset:t,rawFilename:o,rawExtraFieldZip64:i,rawExtraFieldAES:l,rawExtraFieldCDExtendedTimestamp:u,rawExtraFieldNTFS:h,rawExtraField:p,rawComment:m,versionMadeBy:f,headerArray:g,directory:k,zip64:v,zip64UncompressedSize:x,zip64CompressedSize:A,zip64DiskNumberStart:S,zip64Offset:E,msDosCompatible:T,internalFileAttribute:C,externalFileAttribute:R,diskNumberStart:_,uncompressedSize:z,compressedSize:P}=n,D=Xr(i,l,u,h,p);Yr(y,d,F),Gr(y,d+4,f);const N=Zr(g);x||Yr(N,18,z),A||Yr(N,14,P),Qr(b,g,d+6),Gr(y,d+30,D),Gr(y,d+32,Xr(m)),Gr(y,d+34,v&&S?L:_),Gr(y,d+36,C),R?Yr(y,d+38,R):k&&T&&$r(y,d+38,16),Yr(y,d+42,v&&E?I:t),Qr(b,o,d+46),Qr(b,i,d+46+Xr(o)),Qr(b,l,d+46+Xr(o,i)),Qr(b,u,d+46+Xr(o,i,l)),Qr(b,h,d+46+Xr(o,i,l,u)),Qr(b,p,d+46+Xr(o,i,l,u,h)),Qr(b,m,d+46+Xr(o)+D);const U=46+Xr(o,m)+D;if(d-w>s.availableSize&&(s.availableSize=0,await Wr(c,b.slice(w,d)),w=d),d+=U,r.onprogress)try{await r.onprogress(e+1,a.size,new rr(n))}catch(e){}}await Wr(c,w?b.slice(w):b);let k=s.diskNumber;const{availableSize:v}=s;v<H&&k++;let x=Kr(e,r,"zip64");if(f>=I||m>=I||g>=L||k>=L){if(!1===x)throw new h(Fr);x=!0}const A=new p(x?98:H),S=Zr(A);if(d=0,x){Yr(S,0,B),Jr(S,4,o(44)),Gr(S,12,45),Gr(S,14,45),Yr(S,16,k),Yr(S,20,u),Jr(S,24,o(g)),Jr(S,32,o(g)),Jr(S,40,o(m)),Jr(S,48,o(f)),Yr(S,56,j),Jr(S,64,o(f)+o(m)),Yr(S,72,k+1);Kr(e,r,"supportZip64SplitFile",!0)&&(k=L,u=L),g=L,f=I,m=I,d+=76}Yr(S,d,q),Gr(S,d+4,k),Gr(S,d+6,u),Gr(S,d+8,g),Gr(S,d+10,g),Yr(S,d+12,m),Yr(S,d+16,f);const E=Xr(n);if(E){if(!(E<=L))throw new h(Lr);Gr(S,d+20,E)}await Wr(c,A),E&&await Wr(c,n)}(this,e,n);return Kr(this,n,"preventClose")||await s.getWriter().close(),a.getData?a.getData():s}}async function Wr(e,t){const n=e.getWriter();await n.ready,e.size+=Xr(t),await n.write(t),n.releaseLock()}function Vr(e){if(e)return(o(e.getTime())+o(116444736e5))*o(1e4)}function Kr(e,t,n,r){const a=t[n]===ae?e.options[n]:t[n];return a===ae?r:a}function $r(e,t,n){e.setUint8(t,n)}function Gr(e,t,n){e.setUint16(t,n,!0)}function Yr(e,t,n){e.setUint32(t,n,!0)}function Jr(e,t,n){e.setBigUint64(t,n,!0)}function Qr(e,t,n){e.set(t,n)}function Zr(e){return new g(e.buffer)}function Xr(...e){let t=0;return e.forEach((e=>e&&(t+=e.length))),t}let ea;try{ea="undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("single-file.js",document.baseURI).href}catch(e){}me({baseURL:ea}),function(e){const t=()=>d.createObjectURL(new b(['const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:a,Uint16Array:i,Uint32Array:o,Int32Array:l,Map:c,DataView:h,Promise:f,TextEncoder:u,crypto:p,postMessage:d,TransformStream:g,ReadableStream:w,WritableStream:v,CompressionStream:y,DecompressionStream:b}=self;class m{constructor(e){return class extends g{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const _=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;_[e]=t}class k{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^_[255&(t^e[n])];this.crc=t}get(){return~this.crc}}class S extends g{constructor(){let e;const t=new k;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){const n=new a(4);new h(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}}const z={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=z.getPartial(n);return 32===r?e.concat(t):z._shiftRight(t,r,0|n,e.slice(0,e.length-1))},bitLength(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+z.getPartial(n)},clamp(e,t){if(32*e.length<t)return e;const n=(e=e.slice(0,r.ceil(t/32))).length;return t&=31,n>0&&t&&(e[n-1]=z.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,getPartial:e=>r.round(e/1099511627776)||32,_shiftRight(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s<e.length;s++)r.push(n|e[s]>>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,a=z.getPartial(s);return r.push(z.partial(t+a&31,t+a>32?n:r.pop(),1)),r}},D={bytes:{fromBits(e){const t=z.bitLength(e)/8,n=new a(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},toBits(e){const t=[];let n,r=0;for(n=0;n<e.length;n++)r=r<<8|e[n],3==(3&n)&&(t.push(r),r=0);return 3&n&&t.push(z.partial(8*(3&n),r)),t}}},C=class{constructor(e){const t=this;t.blockSize=512,t._init=[1732584193,4023233417,2562383102,271733878,3285377520],t._key=[1518500249,1859775393,2400959708,3395469782],e?(t._h=e._h.slice(0),t._buffer=e._buffer.slice(0),t._length=e._length):t.reset()}reset(){const e=this;return e._h=e._init.slice(0),e._buffer=[],e._length=0,e}update(e){const t=this;"string"==typeof e&&(e=D.utf8String.toBits(e));const n=t._buffer=z.concat(t._buffer,e),r=t._length,a=t._length=r+z.bitLength(e);if(a>9007199254740991)throw new s("Cannot hash more than 2^53 - 1 bits");const i=new o(n);let l=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);a>=e;e+=t.blockSize)t._block(i.subarray(16*l,16*(l+1))),l+=1;return n.splice(0,16*l),t}finalize(){const e=this;let t=e._buffer;const n=e._h;t=z.concat(t,[z.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(),n}_f(e,t,n,r){return e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r}_S(e,t){return t<<e|t>>>32-e}_block(t){const n=this,s=n._h,a=e(80);for(let e=0;16>e;e++)a[e]=t[e];let i=s[0],o=s[1],l=s[2],c=s[3],h=s[4];for(let e=0;79>=e;e++){16>e||(a[e]=n._S(1,a[e-3]^a[e-8]^a[e-14]^a[e-16]));const t=n._S(5,i)+n._f(e,o,l,c)+h+a[e]+n._key[r.floor(e/20)]|0;h=c,c=l,l=n._S(30,o),o=i,i=t}s[0]=s[0]+i|0,s[1]=s[1]+o|0,s[2]=s[2]+l|0,s[3]=s[3]+c|0,s[4]=s[4]+h|0}},I={getRandomValues(e){const t=new o(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,a=0;a<e.length;a+=4){const e=n(4294967296*(s||r.random()));s=987654071*e(),t[a/4]=4294967296*e()|0}return e}},x={importKey:e=>new x.hmacSha1(D.bytes.toBits(e)),pbkdf2(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s("invalid params to pbkdf2");const a=1+(r>>5)<<2;let i,o,l,c,f;const u=new ArrayBuffer(a),p=new h(u);let d=0;const g=z;for(t=D.bytes.toBits(t),f=1;(a||1)>d;f++){for(i=o=e.encrypt(g.concat(t,[f])),l=1;n>l;l++)for(o=e.encrypt(o),c=0;c<o.length;c++)i[c]^=o[c];for(l=0;(a||1)>d&&l<i.length;l++)p.setInt32(d,i[l]),d+=4}return u.slice(0,r/8)},hmacSha1:class{constructor(e){const t=this,n=t._hash=C,r=[[],[]];t._baseHash=[new n,new n];const s=t._baseHash[0].blockSize/32;e.length>s&&(e=(new n).update(e).finalize());for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t._baseHash[0].update(r[0]),t._baseHash[1].update(r[1]),t._resultHash=new n(t._baseHash[0])}reset(){const e=this;e._resultHash=new e._hash(e._baseHash[0]),e._updated=!1}update(e){this._updated=!0,this._resultHash.update(e)}digest(){const e=this,t=e._resultHash.finalize(),n=new e._hash(e._baseHash[1]).update(t).finalize();return e.reset(),n}encrypt(e){if(this._updated)throw new s("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},A=void 0!==p&&"function"==typeof p.getRandomValues,T="Invalid password",R="Invalid signature",H="zipjs-abort-check-password";function q(e){return A?p.getRandomValues(e):I.getRandomValues(e)}const B=16,K={name:"PBKDF2"},V=t.assign({hash:{name:"HMAC"}},K),P=t.assign({iterations:1e3,hash:{name:"SHA-1"}},K),E=["deriveBits"],U=[8,12,16],W=[16,24,32],M=10,N=[0,0,0,0],O="undefined",F="function",L=typeof p!=O,j=L&&p.subtle,G=L&&typeof j!=O,X=D.bytes,J=class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],r=t._tables[1],a=e.length;let i,o,l,c=1;if(4!==a&&6!==a&&8!==a)throw new s("invalid aes key size");for(t._key=[o=e.slice(0),l=[]],i=a;4*a+28>i;i++){let e=o[i-1];(i%a==0||8===a&&i%a==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],i%a==0&&(e=e<<8^e>>>24^c<<24,c=c<<1^283*(c>>7))),o[i]=o[i-a]^e}for(let e=0;i;e++,i--){const t=o[3&e?i:i-4];l[e]=4>=i||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],n=e[4],r=t[4],s=[],a=[];let i,o,l,c;for(let e=0;256>e;e++)a[(s[e]=e<<1^283*(e>>7))^e]=e;for(let h=i=0;!n[h];h^=o||1,i=a[i]||1){let a=i^i<<1^i<<2^i<<3^i<<4;a=a>>8^255&a^99,n[h]=a,r[a]=h,c=s[l=s[o=s[h]]];let f=16843009*c^65537*l^257*o^16843008*h,u=257*s[a]^16843008*a;for(let n=0;4>n;n++)e[n][h]=u=u<<24^u>>>8,t[n][a]=f=f<<24^f>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}_crypt(e,t){if(4!==e.length)throw new s("invalid aes block size");const n=this._key[t],r=n.length/4-2,a=[0,0,0,0],i=this._tables[t],o=i[0],l=i[1],c=i[2],h=i[3],f=i[4];let u,p,d,g=e[0]^n[0],w=e[t?3:1]^n[1],v=e[2]^n[2],y=e[t?1:3]^n[3],b=4;for(let e=0;r>e;e++)u=o[g>>>24]^l[w>>16&255]^c[v>>8&255]^h[255&y]^n[b],p=o[w>>>24]^l[v>>16&255]^c[y>>8&255]^h[255&g]^n[b+1],d=o[v>>>24]^l[y>>16&255]^c[g>>8&255]^h[255&w]^n[b+2],y=o[y>>>24]^l[g>>16&255]^c[w>>8&255]^h[255&v]^n[b+3],b+=4,g=u,w=p,v=d;for(let e=0;4>e;e++)a[t?3&-e:e]=f[g>>>24]<<24^f[w>>16&255]<<16^f[v>>8&255]<<8^f[255&y]^n[b++],u=g,g=w,w=v,v=y,y=u;return a}},Q=class{constructor(e,t){this._prf=e,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(e){return this.calculate(this._prf,e,this._iv)}incWord(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}incCounter(e){0===(e[0]=this.incWord(e[0]))&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let r;if(!(r=t.length))return[];const s=z.bitLength(t);for(let s=0;r>s;s+=4){this.incCounter(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return z.clamp(t,s)}},Y=x.hmacSha1;let Z=L&&G&&typeof j.importKey==F,$=L&&G&&typeof j.deriveBits==F;class ee extends g{constructor({password:e,signed:n,encryptionStrength:r,checkPasswordOnly:i}){super({start(){t.assign(this,{ready:new f((e=>this.resolveReady=e)),password:e,signed:n,strength:r-1,pending:new a})},async transform(e,t){const n=this,{password:r,strength:o,resolveReady:l,ready:c}=n;r?(await(async(e,t,n,r)=>{const a=await re(e,t,n,ae(r,0,U[t])),i=ae(r,U[t]);if(a[0]!=i[0]||a[1]!=i[1])throw new s(T)})(n,o,r,ae(e,0,U[o]+2)),e=ae(e,U[o]+2),i?t.error(new s(H)):l()):await c;const h=new a(e.length-M-(e.length-M)%B);t.enqueue(ne(n,e,h,0,M,!0))},async flush(e){const{signed:t,ctr:n,hmac:r,pending:i,ready:o}=this;await o;const l=ae(i,0,i.length-M),c=ae(i,i.length-M);let h=new a;if(l.length){const e=oe(X,l);r.update(e);const t=n.update(e);h=ie(X,t)}if(t){const e=ae(ie(X,r.digest()),0,M);for(let t=0;M>t;t++)if(e[t]!=c[t])throw new s(R)}e.enqueue(h)}})}}class te extends g{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new f((e=>this.resolveReady=e)),password:e,strength:n-1,pending:new a})},async transform(e,t){const n=this,{password:r,strength:s,resolveReady:i,ready:o}=n;let l=new a;r?(l=await(async(e,t,n)=>{const r=q(new a(U[t]));return se(r,await re(e,t,n,r))})(n,s,r),i()):await o;const c=new a(l.length+e.length-e.length%B);c.set(l,0),t.enqueue(ne(n,e,c,l.length,0))},async flush(e){const{ctr:t,hmac:n,pending:s,ready:i}=this;await i;let o=new a;if(s.length){const e=t.update(oe(X,s));n.update(e),o=ie(X,e)}r.signature=ie(X,n.digest()).slice(0,M),e.enqueue(se(o,r.signature))}}),r=this}}function ne(e,t,n,r,s,i){const{ctr:o,hmac:l,pending:c}=e,h=t.length-s;let f;for(c.length&&(t=se(c,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new a(t)).set(n,0)}return e})(n,h-h%B)),f=0;h-B>=f;f+=B){const e=oe(X,ae(t,f,f+B));i&&l.update(e);const s=o.update(e);i||l.update(s),n.set(ie(X,s),f+r)}return e.pending=ae(t,f),n}async function re(n,r,s,i){n.password=null;const o=(e=>{if(void 0===u){const t=new a((e=unescape(encodeURIComponent(e))).length);for(let n=0;n<t.length;n++)t[n]=e.charCodeAt(n);return t}return(new u).encode(e)})(s),l=await(async(e,t,n,r,s)=>{if(!Z)return x.importKey(t);try{return await j.importKey("raw",t,n,!1,s)}catch(e){return Z=!1,x.importKey(t)}})(0,o,V,0,E),c=await(async(e,t,n)=>{if(!$)return x.pbkdf2(t,e.salt,P.iterations,n);try{return await j.deriveBits(e,t,n)}catch(r){return $=!1,x.pbkdf2(t,e.salt,P.iterations,n)}})(t.assign({salt:i},P),l,8*(2*W[r]+2)),h=new a(c),f=oe(X,ae(h,0,W[r])),p=oe(X,ae(h,W[r],2*W[r])),d=ae(h,2*W[r]);return t.assign(n,{keys:{key:f,authentication:p,passwordVerification:d},ctr:new Q(new J(f),e.from(N)),hmac:new Y(p)}),d}function se(e,t){let n=e;return e.length+t.length&&(n=new a(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function ae(e,t,n){return e.subarray(t,n)}function ie(e,t){return e.fromBits(t)}function oe(e,t){return e.toBits(t)}class le extends g{constructor({password:e,passwordVerification:n,checkPasswordOnly:r}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ue(this,e)},transform(e,t){const n=this;if(n.password){const t=he(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(T);e=e.subarray(12)}r?t.error(new s(H)):t.enqueue(he(n,e))}})}}class ce extends g{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ue(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=q(new a(12));t[11]=n.passwordVerification,r=new a(e.length+t.length),r.set(fe(n,t),0),s=12}else r=new a(e.length),s=0;r.set(fe(n,e),s),t.enqueue(r)}})}}function he(e,t){const n=new a(t.length);for(let r=0;r<t.length;r++)n[r]=de(e)^t[r],pe(e,n[r]);return n}function fe(e,t){const n=new a(t.length);for(let r=0;r<t.length;r++)n[r]=de(e)^t[r],pe(e,t[r]);return n}function ue(e,n){const r=[305419896,591751049,878082192];t.assign(e,{keys:r,crcKey0:new k(r[0]),crcKey2:new k(r[2])});for(let t=0;t<n.length;t++)pe(e,n.charCodeAt(t))}function pe(e,t){let[n,s,a]=e.keys;e.crcKey0.append([t]),n=~e.crcKey0.get(),s=we(r.imul(we(s+ge(n)),134775813)+1),e.crcKey2.append([s>>>24]),a=~e.crcKey2.get(),e.keys=[n,s,a]}function de(e){const t=2|e.keys[2];return ge(r.imul(t,1^t)>>>8)}function ge(e){return 255&e}function we(e){return 4294967295&e}const ve="deflate-raw";class ye extends g{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:a,useCompressionStream:i,zipCrypto:o,signed:l,level:c}=e,f=this;let u,p,d=me(super.readable);a&&!o||!l||(u=new S,d=Se(d,u)),s&&(d=ke(d,i,{level:c,chunkSize:t},r,n)),a&&(o?d=Se(d,new ce(e)):(p=new te(e),d=Se(d,p))),_e(f,d,(()=>{let e;a&&!o&&(e=p.signature),a&&!o||!l||(e=new h(u.value.buffer).getUint32(0)),f.signature=e}))}}class be extends g{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:a,encrypted:i,signed:o,signature:l,compressed:c,useCompressionStream:f}=e;let u,p,d=me(super.readable);i&&(a?d=Se(d,new le(e)):(p=new ee(e),d=Se(d,p))),c&&(d=ke(d,f,{chunkSize:t},r,n)),i&&!a||!o||(u=new S,d=Se(d,u)),_e(this,d,(()=>{if((!i||a)&&o){const e=new h(u.value.buffer);if(l!=e.getUint32(0,!1))throw new s(R)}}))}}function me(e){return Se(e,new g({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function _e(e,n,r){n=Se(n,new g({flush:r})),t.defineProperty(e,"readable",{get:()=>n})}function ke(e,t,n,r,s){try{e=Se(e,new(t&&r?r:s)(ve,n))}catch(r){if(!t)throw r;e=Se(e,new s(ve,n))}return e}function Se(e,t){return e.pipeThrough(t)}const ze="data";class De extends g{constructor(e,n){super({});const r=this,{codecType:s}=e;let a;s.startsWith("deflate")?a=ye:s.startsWith("inflate")&&(a=be);let i=0;const o=new a(e,n),l=super.readable,c=new g({transform(e,t){e&&e.length&&(i+=e.length,t.enqueue(e))},flush(){const{signature:e}=o;t.assign(r,{signature:e,size:i})}});t.defineProperty(r,"readable",{get:()=>l.pipeThrough(o).pipeThrough(c)})}}const Ce=new c,Ie=new c;let xe=0;async function Ae(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new m(self.Deflate)),self.Inflate&&(s.DecompressionStream=new m(self.Inflate));const a={highWaterMark:1,size:()=>s.chunkSize},i=e.readable||new w({async pull(e){const t=new f((e=>Ce.set(xe,e)));Te({type:"pull",messageId:xe}),xe=(xe+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},a),o=e.writable||new v({async write(e){let t;const r=new f((e=>t=e));Ie.set(xe,t),Te({type:ze,value:e,messageId:xe}),xe=(xe+1)%n.MAX_SAFE_INTEGER,await r}},a),l=new De(t,s);await i.pipeThrough(l).pipeTo(o,{preventClose:!0,preventAbort:!0});try{await o.getWriter().close()}catch(e){}const{signature:c,size:h}=l;Te({type:"close",result:{signature:c,size:h}})}catch(e){Re(e)}}function Te(e){let{value:t}=e;if(t)if(t.length)try{t=new a(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Re(e=new s("Unknown error")){const{message:t,stack:n,code:r,name:a}=e;d({error:{message:t,stack:n,code:r,name:a}})}addEventListener("message",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if("start"==t&&Ae(e),t==ze){const e=Ce.get(n);Ce.delete(n),e({value:new a(r),done:s})}if("ack"==t){const e=Ie.get(n);Ie.delete(n),e()}}catch(e){Re(e)}}));var He=a,qe=i,Be=l,Ke=new He([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]),Ve=new He([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]),Pe=new He([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Ee=(e,t)=>{for(var n=new qe(31),r=0;31>r;++r)n[r]=t+=1<<e[r-1];var s=new Be(n[30]);for(r=1;30>r;++r)for(var a=n[r];a<n[r+1];++a)s[a]=a-n[r]<<5|r;return{b:n,r:s}},Ue=Ee(Ke,2),We=Ue.b,Me=Ue.r;We[28]=258,Me[258]=28;for(var Ne=Ee(Ve,0),Oe=Ne.b,Fe=Ne.r,Le=new qe(32768),je=0;32768>je;++je){var Ge=(43690&je)>>1|(21845&je)<<1;Ge=(61680&(Ge=(52428&Ge)>>2|(13107&Ge)<<2))>>4|(3855&Ge)<<4,Le[je]=((65280&Ge)>>8|(255&Ge)<<8)>>1}var Xe=(e,t,n)=>{for(var r=e.length,s=0,a=new qe(t);r>s;++s)e[s]&&++a[e[s]-1];var i,o=new qe(t);for(s=1;t>s;++s)o[s]=o[s-1]+a[s-1]<<1;if(n){i=new qe(1<<t);var l=15-t;for(s=0;r>s;++s)if(e[s])for(var c=s<<4|e[s],h=t-e[s],f=o[e[s]-1]++<<h,u=f|(1<<h)-1;u>=f;++f)i[Le[f]>>l]=c}else for(i=new qe(r),s=0;r>s;++s)e[s]&&(i[s]=Le[o[e[s]-1]++]>>15-e[s]);return i},Je=new He(288);for(je=0;144>je;++je)Je[je]=8;for(je=144;256>je;++je)Je[je]=9;for(je=256;280>je;++je)Je[je]=7;for(je=280;288>je;++je)Je[je]=8;var Qe=new He(32);for(je=0;32>je;++je)Qe[je]=5;var Ye=Xe(Je,9,0),Ze=Xe(Je,9,1),$e=Xe(Qe,5,0),et=Xe(Qe,5,1),tt=e=>{for(var t=e[0],n=1;n<e.length;++n)e[n]>t&&(t=e[n]);return t},nt=(e,t,n)=>{var r=t/8|0;return(e[r]|e[r+1]<<8)>>(7&t)&n},rt=(e,t)=>{var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(7&t)},st=e=>(e+7)/8|0,at=(e,t,n)=>{(null==t||0>t)&&(t=0),(null==n||n>e.length)&&(n=e.length);var r=new He(n-t);return r.set(e.subarray(t,n)),r},it=["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"],ot=(e,t,n)=>{var r=new s(t||it[e]);if(r.code=e,s.captureStackTrace&&s.captureStackTrace(r,ot),!n)throw r;return r},lt=(e,t,n)=>{n<<=7&t;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8},ct=(e,t,n)=>{n<<=7&t;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8,e[r+2]|=n>>16},ht=(e,t)=>{for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var s=n.length,a=n.slice();if(!s)return{t:vt,l:0};if(1==s){var i=new He(n[0].s+1);return i[n[0].s]=1,{t:i,l:1}}n.sort(((e,t)=>e.f-t.f)),n.push({s:-1,f:25001});var o=n[0],l=n[1],c=0,h=1,f=2;for(n[0]={s:-1,f:o.f+l.f,l:o,r:l};h!=s-1;)o=n[n[c].f<n[f].f?c++:f++],l=n[c!=h&&n[c].f<n[f].f?c++:f++],n[h++]={s:-1,f:o.f+l.f,l:o,r:l};var u=a[0].s;for(r=1;s>r;++r)a[r].s>u&&(u=a[r].s);var p=new qe(u+1),d=ft(n[h-1],p,0);if(d>t){r=0;var g=0,w=d-t,v=1<<w;for(a.sort(((e,t)=>p[t.s]-p[e.s]||e.f-t.f));s>r;++r){var y=a[r].s;if(p[y]<=t)break;g+=v-(1<<d-p[y]),p[y]=t}for(g>>=w;g>0;){var b=a[r].s;p[b]<t?g-=1<<t-p[b]++-1:++r}for(;r>=0&&g;--r){var m=a[r].s;p[m]==t&&(--p[m],++g)}d=t}return{t:new He(p),l:d}},ft=(e,t,n)=>-1==e.s?r.max(ft(e.l,t,n+1),ft(e.r,t,n+1)):t[e.s]=n,ut=e=>{for(var t=e.length;t&&!e[--t];);for(var n=new qe(++t),r=0,s=e[0],a=1,i=e=>{n[r++]=e},o=1;t>=o;++o)if(e[o]==s&&o!=t)++a;else{if(!s&&a>2){for(;a>138;a-=138)i(32754);a>2&&(i(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(i(s),--a;a>6;a-=6)i(8304);a>2&&(i(a-3<<5|8208),a=0)}for(;a--;)i(s);a=1,s=e[o]}return{c:n.subarray(0,r),n:t}},pt=(e,t)=>{for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},dt=(e,t,n)=>{var r=n.length,s=st(t+2);e[s]=255&r,e[s+1]=r>>8,e[s+2]=255^e[s],e[s+3]=255^e[s+1];for(var a=0;r>a;++a)e[s+a+4]=n[a];return 8*(s+4+r)},gt=(e,t,n,r,s,a,i,o,l,c,h)=>{lt(t,h++,n),++s[256];for(var f=ht(s,15),u=f.t,p=f.l,d=ht(a,15),g=d.t,w=d.l,v=ut(u),y=v.c,b=v.n,m=ut(g),_=m.c,k=m.n,S=new qe(19),z=0;z<y.length;++z)++S[31&y[z]];for(z=0;z<_.length;++z)++S[31&_[z]];for(var D=ht(S,7),C=D.t,I=D.l,x=19;x>4&&!C[Pe[x-1]];--x);var A,T,R,H,q=c+5<<3,B=pt(s,Je)+pt(a,Qe)+i,K=pt(s,u)+pt(a,g)+i+14+3*x+pt(S,C)+2*S[16]+3*S[17]+7*S[18];if(l>=0&&B>=q&&K>=q)return dt(t,h,e.subarray(l,l+c));if(lt(t,h,1+(B>K)),h+=2,B>K){A=Xe(u,p,0),T=u,R=Xe(g,w,0),H=g;var V=Xe(C,I,0);for(lt(t,h,b-257),lt(t,h+5,k-1),lt(t,h+10,x-4),h+=14,z=0;x>z;++z)lt(t,h+3*z,C[Pe[z]]);h+=3*x;for(var P=[y,_],E=0;2>E;++E){var U=P[E];for(z=0;z<U.length;++z){var W=31&U[z];lt(t,h,V[W]),h+=C[W],W>15&&(lt(t,h,U[z]>>5&127),h+=U[z]>>12)}}}else A=Ye,T=Je,R=$e,H=Qe;for(z=0;o>z;++z){var M=r[z];if(M>255){ct(t,h,A[257+(W=M>>18&31)]),h+=T[W+257],W>7&&(lt(t,h,M>>23&31),h+=Ke[W]);var N=31&M;ct(t,h,R[N]),h+=H[N],N>3&&(ct(t,h,M>>5&8191),h+=Ve[N])}else ct(t,h,A[M]),h+=T[M]}return ct(t,h,A[256]),h+T[256]},wt=new Be([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),vt=new He(0),yt=function(){function e(e,t){if("function"==typeof e&&(t=e,e={}),this.ondata=t,this.o=e||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new He(98304),this.o.dictionary){var n=this.o.dictionary.subarray(-32768);this.b.set(n,32768-n.length),this.s.i=32768-n.length}}return e.prototype.p=function(e,t){this.ondata(((e,t,n,s,a)=>{if(!a&&(a={l:1},t.dictionary)){var i=t.dictionary.subarray(-32768),o=new He(i.length+e.length);o.set(i),o.set(e,i.length),e=o,a.w=i.length}return((e,t,n,s,a,i)=>{var o=i.z||e.length,l=new He(0+o+5*(1+r.ceil(o/7e3))+0),c=l.subarray(0,l.length-0),h=i.l,f=7&(i.r||0);if(t){f&&(c[0]=i.r>>3);for(var u=wt[t-1],p=u>>13,d=8191&u,g=(1<<n)-1,w=i.p||new qe(32768),v=i.h||new qe(g+1),y=r.ceil(n/3),b=2*y,m=t=>(e[t]^e[t+1]<<y^e[t+2]<<b)&g,_=new Be(25e3),k=new qe(288),S=new qe(32),z=0,D=0,C=i.i||0,I=0,x=i.w||0,A=0;o>C+2;++C){var T=m(C),R=32767&C,H=v[T];if(w[R]=H,v[T]=R,C>=x){var q=o-C;if((z>7e3||I>24576)&&(q>423||!h)){f=gt(e,c,0,_,k,S,D,I,A,C-A,f),I=z=D=0,A=C;for(var B=0;286>B;++B)k[B]=0;for(B=0;30>B;++B)S[B]=0}var K=2,V=0,P=d,E=R-H&32767;if(q>2&&T==m(C-E))for(var U=r.min(p,q)-1,W=r.min(32767,C),M=r.min(258,q);W>=E&&--P&&R!=H;){if(e[C+K]==e[C+K-E]){for(var N=0;M>N&&e[C+N]==e[C+N-E];++N);if(N>K){if(K=N,V=E,N>U)break;var O=r.min(E,N-2),F=0;for(B=0;O>B;++B){var L=C-E+B&32767,j=L-w[L]&32767;j>F&&(F=j,H=L)}}}E+=(R=H)-(H=w[R])&32767}if(V){_[I++]=268435456|Me[K]<<18|Fe[V];var G=31&Me[K],X=31&Fe[V];D+=Ke[G]+Ve[X],++k[257+G],++S[X],x=C+K,++z}else _[I++]=e[C],++k[e[C]]}}for(C=r.max(C,x);o>C;++C)_[I++]=e[C],++k[e[C]];f=gt(e,c,h,_,k,S,D,I,A,C-A,f),h||(i.r=7&f|c[f/8|0]<<3,f-=7,i.h=v,i.p=w,i.i=C,i.w=x)}else{for(C=i.w||0;o+h>C;C+=65535){var J=C+65535;o>J||(c[f/8|0]=h,J=o),f=dt(c,f+1,e.subarray(C,J))}i.i=o}return at(l,0,0+st(f)+0)})(e,null==t.level?6:t.level,null==t.mem?r.ceil(1.5*r.max(8,r.min(13,r.log(e.length)))):12+t.mem,0,0,a)})(e,this.o,0,0,this.s),t)},e.prototype.push=function(e,t){this.ondata||ot(5),this.s.l&&ot(4);var n=e.length+this.s.z;if(n>this.b.length){if(n>2*this.b.length-32768){var r=new He(-32768&n);r.set(this.b.subarray(0,this.s.z)),this.b=r}var s=this.b.length-this.s.z;s&&(this.b.set(e.subarray(0,s),this.s.z),this.s.z=this.b.length,this.p(this.b,!1)),this.b.set(this.b.subarray(-32768)),this.b.set(e.subarray(s),32768),this.s.z=e.length-s+32768,this.s.i=32766,this.s.w=32768}else this.b.set(e,this.s.z),this.s.z+=e.length;this.s.l=1&t,(this.s.z>this.s.w+8191||t)&&(this.p(this.b,t||!1),this.s.w=this.s.i,this.s.i-=2)},e}(),bt=function(){function e(e,t){"function"==typeof e&&(t=e,e={}),this.ondata=t;var n=e&&e.dictionary&&e.dictionary.subarray(-32768);this.s={i:0,b:n?n.length:0},this.o=new He(32768),this.p=new He(0),n&&this.o.set(n)}return e.prototype.e=function(e){if(this.ondata||ot(5),this.d&&ot(4),this.p.length){if(e.length){var t=new He(this.p.length+e.length);t.set(this.p),t.set(e,this.p.length),this.p=t}}else this.p=e},e.prototype.c=function(e){this.s.i=+(this.d=e||!1);var t=this.s.b,n=((e,t,n)=>{var s=e.length;if(!s||t.f&&!t.l)return n||new He(0);var a=!n||2!=t.i,i=t.i;n||(n=new He(3*s));var o=e=>{var t=n.length;if(e>t){var s=new He(r.max(2*t,e));s.set(n),n=s}},l=t.f||0,c=t.p||0,h=t.b||0,f=t.l,u=t.d,p=t.m,d=t.n,g=8*s;do{if(!f){l=nt(e,c,1);var w=nt(e,c+1,3);if(c+=3,!w){var v=e[(x=st(c)+4)-4]|e[x-3]<<8,y=x+v;if(y>s){i&&ot(0);break}a&&o(h+v),n.set(e.subarray(x,y),h),t.b=h+=v,t.p=c=8*y,t.f=l;continue}if(1==w)f=Ze,u=et,p=9,d=5;else if(2==w){var b=nt(e,c,31)+257,m=nt(e,c+10,15)+4,_=b+nt(e,c+5,31)+1;c+=14;for(var k=new He(_),S=new He(19),z=0;m>z;++z)S[Pe[z]]=nt(e,c+3*z,7);c+=3*m;var D=tt(S),C=(1<<D)-1,I=Xe(S,D,1);for(z=0;_>z;){var x,A=I[nt(e,c,C)];if(c+=15&A,16>(x=A>>4))k[z++]=x;else{var T=0,R=0;for(16==x?(R=3+nt(e,c,3),c+=2,T=k[z-1]):17==x?(R=3+nt(e,c,7),c+=3):18==x&&(R=11+nt(e,c,127),c+=7);R--;)k[z++]=T}}var H=k.subarray(0,b),q=k.subarray(b);p=tt(H),d=tt(q),f=Xe(H,p,1),u=Xe(q,d,1)}else ot(1);if(c>g){i&&ot(0);break}}a&&o(h+131072);for(var B=(1<<p)-1,K=(1<<d)-1,V=c;;V=c){var P=(T=f[rt(e,c)&B])>>4;if((c+=15&T)>g){i&&ot(0);break}if(T||ot(2),256>P)n[h++]=P;else{if(256==P){V=c,f=null;break}var E=P-254;if(P>264){var U=Ke[z=P-257];E=nt(e,c,(1<<U)-1)+We[z],c+=U}var W=u[rt(e,c)&K],M=W>>4;if(W||ot(3),c+=15&W,q=Oe[M],M>3&&(U=Ve[M],q+=rt(e,c)&(1<<U)-1,c+=U),c>g){i&&ot(0);break}a&&o(h+131072);var N=h+E;if(q>h){var O=0-q,F=r.min(q,N);for(0>O+h&&ot(3);F>h;++h)n[h]=undefined[O+h]}for(;N>h;h+=4)n[h]=n[h-q],n[h+1]=n[h+1-q],n[h+2]=n[h+2-q],n[h+3]=n[h+3-q];h=N}}t.l=f,t.p=V,t.b=h,t.f=l,f&&(l=1,t.m=p,t.d=u,t.n=d)}while(!l);return h==n.length?n:at(n,0,h)})(this.p,this.s,this.o);this.ondata(at(n,t,this.s.b),this.d),this.o=at(n,this.s.b-32768),this.s.b=this.o.length,this.p=at(this.p,this.s.p/8|0),this.s.p&=7},e.prototype.push=function(e,t){this.e(e),this.c(t)},e}(),mt="undefined"!=typeof TextDecoder&&new TextDecoder;try{mt.decode(vt,{stream:!0})}catch(e){}function _t(e,n,r){return class{constructor(s){const i=this;var o,l;o=s,l="level",("function"==typeof t.hasOwn?t.hasOwn(o,l):o.hasOwnProperty(l))&&void 0===s.level&&delete s.level,i.codec=new e(t.assign({},n,s)),r(i.codec,(e=>{if(i.pendingData){const t=i.pendingData;i.pendingData=new a(t.length+e.length);const{pendingData:n}=i;n.set(t,0),n.set(e,t.length)}else i.pendingData=new a(e)}))}append(e){return this.codec.push(e),s(this)}flush(){return this.codec.push(new a,!0),s(this)}};function s(e){if(e.pendingData){const t=e.pendingData;return e.pendingData=null,t}return new a}}const{Deflate:kt,Inflate:St}=((e,t={},n)=>({Deflate:_t(e.Deflate,t.deflate,n),Inflate:_t(e.Inflate,t.inflate,n)}))({Deflate:yt,Inflate:bt},void 0,((e,t)=>e.ondata=t));self.initCodec=()=>{self.Deflate=kt,self.Inflate=St};\n'],{type:"text/javascript"}));e({workerScripts:{inflate:[t],deflate:[t]}})}(me);var ta=Object.freeze({__proto__:null,BlobReader:cn,BlobWriter:un,Data64URIReader:class extends sn{constructor(e){super();let t=e.length;for(;"="==e.charAt(t-1);)t--;const r=e.indexOf(",")+1;n.assign(this,{dataURI:e,dataStart:r,size:i.floor(.75*(t-r))})}readUint8Array(e,t){const{dataStart:n,dataURI:r}=this,a=new p(t),o=4*i.floor(e/3),s=atob(r.substring(o+n,4*i.ceil((e+t)/3)+n)),l=e-3*i.floor(o/4);for(let e=l;e<l+t;e++)a[e-l]=s.charCodeAt(e);return a}},Data64URIWriter:class extends ln{constructor(e){super(),n.assign(this,{data:"data:"+(e||"")+";base64,",pending:[]})}writeUint8Array(e){const t=this;let n=0,a=t.pending;const o=t.pending.length;for(t.pending="",n=0;n<3*i.floor((o+e.length)/3)-o;n++)a+=r.fromCharCode(e[n]);for(;n<e.length;n++)t.pending+=r.fromCharCode(e[n]);a.length>2?t.data+=A(a):t.pending=a}getData(){return this.data+A(this.pending)}},ERR_BAD_FORMAT:ar,ERR_CENTRAL_DIRECTORY_NOT_FOUND:lr,ERR_DUPLICATED_NAME:Ir,ERR_ENCRYPTED:dr,ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND:sr,ERR_EOCDR_NOT_FOUND:or,ERR_EOCDR_ZIP64_NOT_FOUND:ir,ERR_EXTRAFIELD_ZIP64_NOT_FOUND:ur,ERR_HTTP_RANGE:Jt,ERR_INVALID_COMMENT:Lr,ERR_INVALID_ENCRYPTION_STRENGTH:Ur,ERR_INVALID_ENTRY_COMMENT:Pr,ERR_INVALID_ENTRY_NAME:Dr,ERR_INVALID_EXTRAFIELD_DATA:Or,ERR_INVALID_EXTRAFIELD_TYPE:Mr,ERR_INVALID_PASSWORD:_e,ERR_INVALID_SIGNATURE:ze,ERR_INVALID_VERSION:Nr,ERR_ITERATOR_COMPLETED_TOO_SOON:Qt,ERR_LOCAL_FILE_HEADER_NOT_FOUND:cr,ERR_SPLIT_ZIP_FILE:mr,ERR_UNSUPPORTED_COMPRESSION:pr,ERR_UNSUPPORTED_ENCRYPTION:hr,ERR_UNSUPPORTED_FORMAT:Fr,HttpRangeReader:class extends En{constructor(e,t={}){t.useRangeHeader=!0,super(e,t)}},HttpReader:En,Reader:sn,SplitDataReader:Cn,SplitDataWriter:Rn,SplitZipReader:Pn,SplitZipWriter:Dn,TextReader:dn,TextWriter:class extends un{constructor(e){super(e),n.assign(this,{encoding:e,utf8:!e||"utf-8"==e.toLowerCase()})}async getData(){const{encoding:e,utf8:t}=this,r=await super.getData();if(r.text&&t)return r.text();{const t=new FileReader;return new y(((a,o)=>{n.assign(t,{onload:({target:e})=>a(e.result),onerror:()=>o(t.error)}),t.readAsText(r,e)}))}}},Uint8ArrayReader:class extends sn{constructor(e){super(),n.assign(this,{array:e,size:e.length})}readUint8Array(e,t){return this.array.slice(e,e+t)}},Uint8ArrayWriter:Tn,Writer:ln,ZipReader:class{constructor(e,t={}){n.assign(this,{reader:zn(e),options:t,config:he()})}async*getEntriesGenerator(e={}){const t=this;let{reader:r}=t;const{config:a}=t;if(await _n(r),r.size!==ae&&r.readUint8Array||(r=new cn(await new u(r.readable).blob()),await _n(r)),r.size<H)throw new h(ar);r.chunkSize=pe(a);const o=await async function(e,t,n,r,a){const o=new p(4);!function(e,t,n){e.setUint32(t,n,!0)}(zr(o),0,t);const s=r+a;return await l(r)||await l(i.min(s,n));async function l(t){const a=n-t,i=await Ln(e,a,t);for(let e=i.length-r;e>=0;e--)if(i[e]==o[0]&&i[e+1]==o[1]&&i[e+2]==o[2]&&i[e+3]==o[3])return{offset:a+e,buffer:i.slice(e,e+r).buffer}}}(r,q,r.size,H,1048560);if(!o){throw Rr(zr(await Ln(r,0,4)))==M?new h(mr):new h(or)}const s=zr(o);let l=Rr(s,12),c=Rr(s,16);const d=o.offset,m=Cr(s,20),f=d+H+m;let g=Cr(s,4);const b=r.lastDiskNumber||0;let w=Cr(s,6),k=Cr(s,8),v=0,x=0;if(c==I||l==I||k==L||w==L){const e=zr(await Ln(r,o.offset-20,20));if(Rr(e,0)!=j)throw new h(ir);c=_r(e,8);let t=await Ln(r,c,56,-1),n=zr(t);const a=o.offset-20-56;if(Rr(n,0)!=B&&c!=a){const e=c;c=a,v=c-e,t=await Ln(r,c,56,-1),n=zr(t)}if(Rr(n,0)!=B)throw new h(sr);g==L&&(g=Rr(n,16)),w==L&&(w=Rr(n,20)),k==L&&(k=_r(n,32)),l==I&&(l=_r(n,40)),c-=l}if(b!=g)throw new h(mr);if(c<0||c>=r.size)throw new h(ar);let A=0,S=await Ln(r,c,l,w),E=zr(S);if(l){const e=o.offset-l;if(Rr(E,A)!=F&&c!=e){const t=c;c=e,v=c-t,S=await Ln(r,c,l,w),E=zr(S)}}const T=o.offset-c-(r.lastDiskOffset||0);if(l!=T&&T>=0&&(l=T,S=await Ln(r,c,l,w),E=zr(S)),c<0||c>=r.size)throw new h(ar);const C=Ar(t,e,"filenameEncoding"),R=Ar(t,e,"commentEncoding");for(let o=0;o<k;o++){const s=new wr(r,a,t.options);if(Rr(E,A)!=F)throw new h(lr);kr(s,E,A+6);const l=Boolean(s.bitFlag.languageEncodingFlag),c=A+46,u=c+s.filenameLength,d=u+s.extraFieldLength,p=Cr(E,A+4),m=0==(0&p),f=S.subarray(c,u),g=Cr(E,A+32),b=d+g,w=S.subarray(d,b),T=l,_=l,z=m&&16==(16&Tr(E,A+38)),I=Rr(E,A+42)+v;n.assign(s,{versionMadeBy:p,msDosCompatible:m,compressedSize:0,uncompressedSize:0,commentLength:g,directory:z,offset:I,diskNumberStart:Cr(E,A+34),internalFileAttribute:Cr(E,A+36),externalFileAttribute:Rr(E,A+38),rawFilename:f,filenameUTF8:T,commentUTF8:_,rawExtraField:S.subarray(u,d)});const[L,P]=await y.all([Mn(f,T?fr:C||gr),Mn(w,_?fr:R||gr)]);n.assign(s,{rawComment:w,filename:L,comment:P,directory:z||L.endsWith(te)}),x=i.max(I,x),await vr(s,s,E,A+6);const D=new rr(s);D.getData=(e,t)=>s.getData(e,D,t),A=b;const{onprogress:N}=e;if(N)try{await N(o+1,k,new rr(s))}catch(e){}yield D}const _=Ar(t,e,"extractPrependedData"),z=Ar(t,e,"extractAppendedData");return _&&(t.prependedData=x>0?await Ln(r,0,x):new p),t.comment=m?await Ln(r,d+H,m):new p,z&&(t.appendedData=f<r.size?await Ln(r,f,r.size-f):new p),!0}async getEntries(e={}){const t=[];for await(const n of this.getEntriesGenerator(e))t.push(n);return t}async close(){}},ZipWriter:Hr,configure:me,getMimeType:function(){return"application/octet-stream"},initReader:zn,initShimAsyncCodec:function(e,t={},n){return{Deflate:ge(e.Deflate,t.deflate,n),Inflate:ge(e.Inflate,t.inflate,n)}},initStream:_n,initWriter:In,readUint8Array:Ln,terminateWorkers:function(){Wt.forEach((e=>{Gt(e),e.terminate()}))}});async function na(e,{password:t,prompt:n=(()=>{}),shadowRootScriptURL:r,zipOptions:a={useWebWorkers:!1},noBlobURL:o}={}){const i={gif:"image/gif",jpg:"image/jpeg",png:"image/png",tif:"image/tiff",tiff:"image/tiff",bmp:"image/bmp",ico:"image/vnd.microsoft.icon",webp:"image/webp",svg:"image/svg+xml",avi:"video/x-msvideo",ogv:"video/ogg",mp4:"video/mp4",mpeg:"video/mpeg",ts:"video/mp2t",webm:"video/webm","3gp":"video/3gpp","3g2":"video/3gpp",mp3:"audio/mpeg",oga:"audio/ogg",mid:"audio/midi",midi:"audio/midi",opus:"audio/opus",wav:"audio/wav",weba:"audio/webm"},s=/stylesheet_[0-9]+\.css/,l=/scripts\/[0-9]+\.js/,c=/^([0-9_]+\/)?index\.html$/,u=/index\.html$/,d=/frames\//,h=";charset=utf-8";Array.isArray(e)&&(e=new Blob([new Uint8Array(e)])),zip.configure(a);const p=new zip.BlobReader(e),m=new zip.ZipReader(p),f=await m.getEntries(),g={password:t};let b,y,w,k=[];await Promise.all(f.map((async e=>{const{filename:t}=e;let r,a,c,p;if(!g.password&&e.encrypted&&(g.password=n("Please enter the password to view the page")),t.match(u)||t.match(s)||t.match(l))r=new zip.TextWriter,c=await e.getData(r,g),t.match(u)?p="text/html"+h:(t.match(s)?p="text/css"+h:t.match(l)&&(p="text/javascript"+h),a=void 0!==c?o?await v(c,p):URL.createObjectURL(new Blob([c],{type:p})):"data:text/plain,");else{const n=t.match(/\.([^.]+)/);if(p=n&&n[1]&&i[n[1]]?i[n[1]]:"application/octet-stream",t.match(d)||o)a=await e.getData(new zip.Data64URIWriter(p),g);else{const t=await e.getData(new zip.BlobWriter(p),g);a=URL.createObjectURL(t)}}const m=e.filename.match(/^([0-9_]+\/)?(.*)$/)[2];k.push({filename:e.filename,name:m,url:e.comment,content:a,mimeType:p,textContent:c,parentResources:[]})}))),await m.close(),k=k.sort(((e,t)=>t.filename.length-e.filename.length));for(const e of k){let{textContent:t,mimeType:n,filename:a}=e;if(void 0!==t){let i="";const s=a.match(/(.*\/)[^/]+$/);if(s&&s[1]&&(i=s[1]),a.match(c)&&(y=t),!a.match(l)){const r=a;await Promise.all(k.map((async e=>{const{filename:n,parentResources:a,content:o}=e;if(n.startsWith(i)&&n!=r){const e=n.substring(i.length);if(!e.match(/manifest\.json$/)){-1!=t.indexOf(e)&&(a.push(r),t=t.replaceAll(e,o))}}}))),a.match(u)||a.match(d)||o?e.content=await v(t,n):e.content=URL.createObjectURL(new Blob([t],{type:n})),e.textContent=t}a.match(u)&&r&&(e.textContent=t.replace(/<script data-template-shadow-root.*<\/script>/g,"<script data-template-shadow-root src="+r+"><\/script>")),a.match(c)&&(b=t,w=e.url)}}return{docContent:b,origDocContent:y,resources:k,url:w};async function v(e,t){const n=new FileReader;return n.readAsDataURL(new Blob([e],{type:t})),new Promise(((e,t)=>{n.onload=()=>e(n.result.replace(h,"")),n.onerror=t}))}}async function ra(e,t,{disableFramePointerEvents:n}={}){const r="data-single-file-disabled-noscript",a=(new DOMParser).parseFromString(t,"text/html");a.querySelectorAll("noscript:not(["+r+"])").forEach((e=>{e.setAttribute(r,e.innerHTML),e.textContent=""})),a.doctype?e.doctype?e.replaceChild(a.doctype,e.doctype):e.insertBefore(a.doctype,e.documentElement):e.doctype&&e.doctype.remove(),n&&a.querySelectorAll("iframe").forEach((e=>{const t="pointer-events";e.style.setProperty("-sf-"+t,e.style.getPropertyValue(t),e.style.getPropertyPriority(t)),e.style.setProperty(t,"none","important")})),e.replaceChild(e.importNode(a.documentElement,!0),e.documentElement),e.querySelectorAll("["+r+"]").forEach((e=>{e.textContent=e.getAttribute(r),e.removeAttribute(r)})),e.documentElement.setAttribute("data-sfz",""),e.querySelectorAll("link[rel*=icon]").forEach((e=>e.parentElement.replaceChild(e,e))),e.open=e.write=e.close=()=>{};for(let t of Array.from(e.querySelectorAll("script")))await new Promise((n=>{const r=e.createElement("script");Array.from(t.attributes).forEach((e=>r.setAttribute(e.name,e.value)));const a=""==t.getAttribute("async")||"async"==t.getAttribute("async");t.textContent?r.textContent=t.textContent:a||(r.addEventListener("load",n),r.addEventListener("error",(()=>n()))),t.parentElement.replaceChild(r,t),(t.textContent||a)&&n()}))}const{Blob:aa,fetch:oa,TextEncoder:ia,DOMParser:sa}=globalThis,la=[".jpg",".jpeg",".png",".pdf",".woff2",".mp4",".mp3",".ogg",".webp",".webm"],ca="/lib/single-file-zip.min.js",ua=globalThis.browser;async function da(e,t,n=new Date){let r;t.zipScript?r=t.zipScript:ua&&ua.runtime&&ua.runtime.getURL&&(me({workerScripts:{deflate:["/lib/single-file-z-worker.js"]}}),r=await(await oa(ua.runtime.getURL(ca))).text());const a=new Tn;let o,i;if(a.init(),t.selfExtractingArchive){let n="";t.includeBOM&&!t.extractDataFromPage&&(n+="\ufeff");const i=t.extractDataFromPage?"windows-1252":"utf-8",s=e.title.replace(/</g,"&lt;").replace(/>/g,"&gt;")||"",l=t.extractDataFromPage?"":s;if(n+=e.doctype+"<html data-sfz><meta charset="+i+"><title>"+l+"</title>",t.insertCanonicalLink&&(n+='<link rel=canonical href="'+t.url+'">'),t.insertMetaNoIndex&&(n+="<meta name=robots content=noindex>"),e.viewport&&(n+='<meta name="viewport" content='+JSON.stringify(e.viewport)+">"),n+="<body hidden>",n+="<div id='sfz-wait-message'>Please wait...</div>",n+="<div id='sfz-error-message'><strong>Error</strong>: Cannot open the page from the filesystem.",n+="<ul style='line-height:20px;'>",n+="<li style='margin-bottom:10px'><strong>Chrome</strong>: Install <a href='https://chrome.google.com/webstore/detail/singlefile/mpiodijhokgodhhofbcjdecpffjipkle'>SingleFile</a> and enable the option \"Allow access to file URLs\" in the details page of the extension (chrome://extensions/?id=mpiodijhokgodhhofbcjdecpffjipkle).</li>",n+="<li style='margin-bottom:10px'><strong>Microsoft Edge</strong>: Install <a href='https://microsoftedge.microsoft.com/addons/detail/singlefile/efnbkdcfmcmnhlkaijjjmhjjgladedno'>SingleFile</a> and enable the option \"Allow access to file URLs\" in the details page of the extension (edge://extensions/?id=efnbkdcfmcmnhlkaijjjmhjjgladedno).</li>",n+='<li><strong>Safari</strong>: Select "Security > Disable Local File Restrictions" in the "Develop > Developer settings" menu.</li></ul></div>',t.insertTextBody){const r=(new sa).parseFromString(e.content,"text/html");r.body.querySelectorAll("style, script, noscript").forEach((e=>e.remove()));let a="";t.extractDataFromPage&&(a+=s+"\n\n"),a+=r.body.innerText,r.body.querySelectorAll("single-file-note").forEach((e=>{const t=e.querySelector("template");if(t){const e=(new sa).parseFromString(t.innerHTML,"text/html");a+="\n"+e.body.querySelector("textarea").value}})),a=a.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\n +/g,"\n").replace(/\n\n\n+/g,"\n\n").trim(),n+="\n<main hidden>\n"+a+"\n</main>\n"}r="<script>"+r+"document.currentScript.remove();globalThis.onload = () => {globalThis.bootstrap=(()=>{let bootstrapStarted;return async content=>{if (bootstrapStarted) return bootstrapStarted;bootstrapStarted = ("+na.toString().replace(/\n|\t/g,"")+")(content,{prompt}).then(({docContent}) => "+ra.toString().replace(/\n|\t/g,"")+"(document,docContent));return bootstrapStarted;}})();("+ga.toString().replace(/\n|\t/g,"")+")().then(globalThis.bootstrap).catch(()=>{});};<\/script>",n+=r;let c="";if(t.extractDataFromPage&&t.extraDataSize){const e="<sfz-extra-data></sfz-extra-data>";c+=e+new Array(t.extraDataSize-e.length).fill(" ").join("")}n+=c;const u=t.extractDataFromPageTags?t.extractDataFromPageTags[0]:"\x3c!--";n+=u,o=u.length+c.length,await pa(a.writable,(new ia).encode(n))}const s=new Hr(a,{bufferedWrite:!0,keepOrder:!1,lastModDate:n});let l=a.offset;e.url=t.url,e.archiveTime=(new Date).toISOString(),await ma(s,e,{password:t.password},t.createRootDirectory?String(Date.now())+"_"+(t.tabId||0)+"/":"",t.url);const c=await s.close(null,{preventClose:!0});if(t.selfExtractingArchive){const r=[],o=[];if(t.extractDataFromPage){if(!t.extractDataFromPageTags){const r=(new TextDecoder).decode(c);if(r.match(/-->/i)){if(r.match(/<\/\s*xmp>/i)){return r.match(/<\/\s*plaintext>/i)?(t.extractDataFromPage=!1,da(e,t,n)):(t.extractDataFromPageTags=["<plaintext>","</plaintext>"],da(e,t,n))}return t.extractDataFromPageTags=["<xmp>","</xmp>"],da(e,t,n)}}for(let e=0;e<c.length;e++)13==c[e]&&(10==c[e+1]?r.push(e-l):o.push(e-l))}let s="";t.extractDataFromPageTags?s+=t.extractDataFromPageTags[1]:s+="--\x3e";const u="</body></html>";if(t.extractDataFromPage)if(i="<sfz-extra-data>"+await ha(r)+","+await ha(o)+","+await ha([l])+"</sfz-extra-data>",i.length>65535-u.length){if(!t.extraDataSize)return t.extraDataSize=Math.floor(1.001*i.length),da(e,t,n)}else{if(t.extraDataSize)return t.extraDataSize=void 0,da(e,t,n);s+=i}s+=u,await pa(a.writable,(new ia).encode(s))}await a.writable.close();const u=await a.getData();if(t.extractDataFromPage&&void 0!==t.extraDataSize){if(!(t.extraDataSize>=i.length))return t.extraData=i,t.extraDataSize=Math.floor(1.001*i.length),da(e,t,n);u.set(Array.from(i).map((e=>e.charCodeAt(0))),l-o)}return new aa([u],{type:"application/octet-stream"})}async function ha(e){const t=new FileReader;return await new Promise((n=>{t.onload=e=>n(e.target.result.substring(37)),t.readAsDataURL(new aa([new Uint32Array(e)],{type:"application/octet-stream"}))}))}async function pa(e,t){const n=e.getWriter();await n.ready,e.size=t.length,await n.write(t),n.releaseLock()}async function ma(e,t,n,r,a){const o={};for(const e of Object.keys(t.resources))for(const r of t.resources[e])r.password=n.password,r.url&&!r.url.startsWith("data:")&&(o[r.name]=r.url);const i=JSON.stringify({originalUrl:t.url,title:t.title,archiveTime:t.archiveTime,indexFilename:"index.html",resources:o},null,2);await Promise.all([Promise.all([fa(e,r,{name:"index.html",extension:".html",content:t.content,url:a,password:n.password}),fa(e,r,{name:"manifest.json",extension:".json",content:i,password:n.password})]),Promise.all(Object.keys(t.resources).map((async a=>Promise.all(t.resources[a].map((t=>"frames"==a?ma(e,t,n,r+t.name,t.url):fa(e,r,t)))))))])}async function fa(e,t,n){const r="string"==typeof n.content?new dn(n.content):new cn(new aa([new Uint8Array(n.content)])),a={comment:n.url&&n.url.startsWith("data:")?"data:":n.url,password:n.password,bufferedWrite:!0};la.includes(n.extension)&&(a.level=0),await e.add(t+n.name,r,a)}async function ga(){const{Blob:e,XMLHttpRequest:t,fetch:n,document:r,setTimeout:a,clearTimeout:o,stop:i}=globalThis,s=new Map([[65533,0],[8364,128],[8218,130],[402,131],[8222,132],[8230,133],[8224,134],[8225,135],[710,136],[8240,137],[352,138],[8249,139],[338,140],[381,142],[8216,145],[8217,146],[8220,147],[8221,148],[8226,149],[8211,150],[8212,151],[732,152],[8482,153],[353,154],[8250,155],[339,156],[382,158],[376,159]]),l=new t;let c;return Array.from(r.documentElement.childNodes).forEach((e=>{e!=r.body&&e!=r.head&&e.remove()})),l.responseType="blob",l.open("GET",""),new Promise(((t,n)=>{l.onerror=()=>{(async function(){const t=r.querySelector("sfz-extra-data");if(t){let n=t.nextSibling;n?n.nodeType==Node.TEXT_NODE&&(n=n.nextSibling):n=t.previousSibling;const r=[];let{textContent:a}=n;for(let e=0;e<a.length;e++){const t=a.charCodeAt(e);r.push(t>255?s.get(t):t)}const[o,i,l]=t.textContent.split(","),c=await d(o),u=await d(i),[h]=await d(l);return c.forEach((e=>r.splice(e,1,13,10))),u.forEach((e=>r[e]=13)),new e([new Uint8Array(h),new Uint8Array(r)],{type:"application/octet-stream"})}throw new Error("Extra zip data data not found")})().then(t).catch((()=>{c=u("sfz-error-message"),n()}))},l.send(),l.onload=()=>{c=u("sfz-wait-message"),i(),c&&o(c),t(l.response)}}));function u(e){return a((()=>{r.getElementById(e)&&(Array.from(r.body.childNodes).forEach((t=>{t.id!=e&&t.remove()})),r.body.hidden=!1)}),1500)}async function d(e){return new Uint32Array(await(await n("data:application/octet-stream;base64,"+e)).arrayBuffer())}}var ba=Object.freeze({__proto__:null,process:da});const ya="single-file-load-deferred-images-start",wa="single-file-load-deferred-images-end",ka="single-file-load-deferred-images-keep-zoom-level-start",va="single-file-load-deferred-images-keep-zoom-level-end",xa="single-file-load-deferred-images-keep-zoom-level-reset",Aa="single-file-load-deferred-images-reset",Sa="single-file-block-cookies-start",Ea="single-file-block-cookies-end",Ta="single-file-dispatch-scroll-event-start",Ca="single-file-dispatch-scroll-event-end",Ra="single-file-block-storage-start",_a="single-file-block-storage-end",za="single-file-load-image",Ia="single-file-image-loaded",La="_singleFile_fontFaces",Pa=(e,t,n)=>globalThis.addEventListener(e,t,n),Da=e=>{try{globalThis.dispatchEvent(e)}catch(e){}},Na=globalThis.CustomEvent,Ua=globalThis.document,Ma=globalThis.Document,Oa=globalThis.JSON;let Fa;function qa(){return Array.from(Fa.values())}function Ba(e){e.loadDeferredImagesBlockCookies&&Da(new Na(Sa)),e.loadDeferredImagesBlockStorage&&Da(new Na(Ra)),e.loadDeferredImagesDispatchScrollEvent&&Da(new Na(Ta)),e.loadDeferredImagesKeepZoomLevel?Da(new Na(ka)):Da(new Na(ya))}function ja(e){e.loadDeferredImagesBlockCookies&&Da(new Na(Ea)),e.loadDeferredImagesBlockStorage&&Da(new Na(_a)),e.loadDeferredImagesDispatchScrollEvent&&Da(new Na(Ca)),e.loadDeferredImagesKeepZoomLevel?Da(new Na(va)):Da(new Na(wa))}function Ha(e){e.loadDeferredImagesKeepZoomLevel?Da(new Na(xa)):Da(new Na(Aa))}Fa=window[La]?window[La]:window[La]=new Map,Ua instanceof Ma&&(Pa("single-file-new-font-face",(e=>{const t=e.detail,n=Object.assign({},t);delete n.src,Fa.set(Oa.stringify(n),t)})),Pa("single-file-delete-font",(e=>{const t=e.detail,n=Object.assign({},t);delete n.src,Fa.delete(Oa.stringify(n))})),Pa("single-file-clear-fonts",(()=>Fa=new Map)));var Wa=Object.freeze({__proto__:null,getFontsData:qa,loadDeferredImagesStart:Ba,loadDeferredImagesEnd:ja,loadDeferredImagesResetZoomLevel:Ha,LOAD_IMAGE_EVENT:za,IMAGE_LOADED_EVENT:Ia});const Va="[\\x20\\t\\r\\n\\f]",Ka=new RegExp("\\\\([\\da-f]{1,6}"+Va+"?|("+Va+")|.)","ig");function $a(e){return e.replace(Ka,((e,t,n)=>{const r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)}))}var Ga=Object.freeze({__proto__:null,process:$a});const Ya="single-file-",Ja="Page saved with SingleFile",Qa="SingleFile",Za="_singleFile_waitForUserScript",Xa="__frameTree__::",eo="singleFileDisabledNoscript",to="single-file-infobar",no="\n.infobar,\n.infobar .infobar-icon,\n.infobar .infobar-link-icon {\n min-inline-size: 28px;\n min-block-size: 28px;\n box-sizing: border-box;\n}\n\n.infobar,\n.infobar .infobar-close-icon,\n.infobar .infobar-link-icon {\n opacity: 0.7;\n transition: opacity 250ms;\n}\n\n.infobar:hover,\n.infobar .infobar-close-icon:hover,\n.infobar .infobar-link-icon:hover {\n opacity: 1;\n}\n\n.infobar,\n.infobar-content {\n display: flex;\n}\n\n.infobar {\n position: fixed;\n top: 16px;\n right: 16px;\n margin-inline-start: 16px;\n margin-block-end: 16px;\n color: #2d2d2d;\n background-color: #737373;\n border: 2px solid;\n border-color: #eee;\n border-radius: 16px;\n z-index: 2147483647;\n}\n\n.infobar:valid, .infobar:not(:focus-within) .infobar-content {\n display: none;\n}\n\n.infobar:focus-within {\n background-color: #f9f9f9;\n border-color: #878787;\n border-radius: 8px;\n opacity: 1;\n transition-property: opacity, background-color, border-color, border-radius,\n color;\n}\n\n.infobar-content {\n align-items: center;\n}\n\n.infobar-content span {\n font-family: Arial, Helvetica, sans-serif;\n font-size: 14px;\n line-height: 18px;\n word-break: break-word;\n white-space: pre-wrap;\n margin-inline: 4px;\n margin-block: 4px;\n}\n\n.infobar .infobar-icon,\n.infobar .infobar-close-icon,\n.infobar .infobar-link-icon {\n cursor: pointer;\n background-position: center;\n background-repeat: no-repeat;\n}\n\n.infobar .infobar-close-icon,\n.infobar .infobar-link-icon {\n align-self: flex-start;\n}\n\n.infobar .infobar-icon {\n position: absolute;\n min-inline-size: 24px;\n min-block-size: 24px;\n}\n\n.infobar:focus-within .infobar-icon {\n z-index: -1;\n background-image: none;\n}\n\n.infobar .infobar-close-icon {\n min-inline-size: 22px;\n min-block-size: 22px;\n}\n\n.infobar .infobar-icon {\n background-color: transparent;\n background-size: 70%;\n background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABABAMAAABYR2ztAAABhmlDQ1BJQ0MgcHJvZmlsZQAAKJF9kj1Iw0AYht+mSkUrDnYQcchQnSyIijqWKhbBQmkrtOpgcukfNGlIUlwcBdeCgz+LVQcXZ10dXAVB8AfEydFJ0UVK/C4ptIjx4LiH9+59+e67A4RGhalm1wSgapaRisfEbG5VDLyiDwEAvZiVmKkn0osZeI6ve/j4ehfhWd7n/hz9St5kgE8kjjLdsIg3iGc2LZ3zPnGIlSSF+Jx43KACiR+5Lrv8xrnosMAzQ0YmNU8cIhaLHSx3MCsZKvE0cVhRNcoXsi4rnLc4q5Uaa9XJbxjMaytprtMcQRxLSCAJETJqKKMCCxFaNVJMpGg/5uEfdvxJcsnkKoORYwFVqJAcP/gb/O6tWZiadJOCMaD7xbY/RoHALtCs2/b3sW03TwD/M3Cltf3VBjD3SXq9rYWPgIFt4OK6rcl7wOUOMPSkS4bkSH6aQqEAvJ/RM+WAwVv6EGtu31r7OH0AMtSr5Rvg4BAYK1L2use9ezr79u+ZVv9+AFlNcp0UUpiqAAAACXBIWXMAAC4jAAAuIwF4pT92AAAAB3RJTUUH5AsHADIRLMaOHwAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAAAAPUExURQAAAIqKioyNjY2OjvDw8L2y1DEAAAABdFJOUwBA5thmAAAAAWJLR0QB/wIt3gAAAGNJREFUSMdjYCAJsLi4OBCQx6/CBQwIGIDPCBcXAkYQUsACU+AwlBVQHg6Eg5pgZBGOboIJZugDFwRwoJECJCUOhJI1wZwzqmBUwagCuipgIqTABG9h7YIKaKGAURAFEF/6AQAO4HqSoDP8bgAAAABJRU5ErkJggg==);\n}\n\n.infobar .infobar-link-icon {\n background-size: 60%;\n background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABAAgMAAADXB5lNAAABhmlDQ1BJQ0MgcHJvZmlsZQAAKJF9kj1Iw0AYht+mSkUrDnYQcchQnSyIijqWKhbBQmkrtOpgcukfNGlIUlwcBdeCgz+LVQcXZ10dXAVB8AfEydFJ0UVK/C4ptIjx4LiH9+59+e67A4RGhalm1wSgapaRisfEbG5VDLyiDwEAvZiVmKkn0osZeI6ve/j4ehfhWd7n/hz9St5kgE8kjjLdsIg3iGc2LZ3zPnGIlSSF+Jx43KACiR+5Lrv8xrnosMAzQ0YmNU8cIhaLHSx3MCsZKvE0cVhRNcoXsi4rnLc4q5Uaa9XJbxjMaytprtMcQRxLSCAJETJqKKMCCxFaNVJMpGg/5uEfdvxJcsnkKoORYwFVqJAcP/gb/O6tWZiadJOCMaD7xbY/RoHALtCs2/b3sW03TwD/M3Cltf3VBjD3SXq9rYWPgIFt4OK6rcl7wOUOMPSkS4bkSH6aQqEAvJ/RM+WAwVv6EGtu31r7OH0AMtSr5Rvg4BAYK1L2use9ezr79u+ZVv9+AFlNcp0UUpiqAAAACXBIWXMAAC4jAAAuIwF4pT92AAAAB3RJTUUH5AsHAB8H+DhhoQAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAAAAJUExURQAAAICHi4qKioTuJAkAAAABdFJOUwBA5thmAAAAAWJLR0QCZgt8ZAAAAJJJREFUOI3t070NRCEMA2CnYAOyDyPwpHj/Va7hJ3FzV7zy3ET5JIwoAF6Jk4wzAJAkzxAYG9YRTgB+24wBgKmfrGAKTcEfAY4KRlRoIeBTgKOCERVaCPgU4Khge2GqKOBTgKOCERVaAEC/4PNcnyoSWHpjqkhwKxbcig0Q6AorXYF/+A6eIYD1lVbwG/jdA6/kA2THRAURVubcAAAAAElFTkSuQmCC);\n}\n\n.infobar .infobar-close-icon {\n appearance: none;\n background-size: 80%;\n background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABAAgMAAADXB5lNAAABhmlDQ1BJQ0MgcHJvZmlsZQAAKJF9kj1Iw0AYht+mSkUrDnYQcchQnSyIijqWKhbBQmkrtOpgcukfNGlIUlwcBdeCgz+LVQcXZ10dXAVB8AfEydFJ0UVK/C4ptIjx4LiH9+59+e67A4RGhalm1wSgapaRisfEbG5VDLyiDwEAvZiVmKkn0osZeI6ve/j4ehfhWd7n/hz9St5kgE8kjjLdsIg3iGc2LZ3zPnGIlSSF+Jx43KACiR+5Lrv8xrnosMAzQ0YmNU8cIhaLHSx3MCsZKvE0cVhRNcoXsi4rnLc4q5Uaa9XJbxjMaytprtMcQRxLSCAJETJqKKMCCxFaNVJMpGg/5uEfdvxJcsnkKoORYwFVqJAcP/gb/O6tWZiadJOCMaD7xbY/RoHALtCs2/b3sW03TwD/M3Cltf3VBjD3SXq9rYWPgIFt4OK6rcl7wOUOMPSkS4bkSH6aQqEAvJ/RM+WAwVv6EGtu31r7OH0AMtSr5Rvg4BAYK1L2use9ezr79u+ZVv9+AFlNcp0UUpiqAAAACXBIWXMAAC4jAAAuIwF4pT92AAAAB3RJTUUH5AsHAB8VC4EQ6QAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAAAAJUExURQAAAICHi4qKioTuJAkAAAABdFJOUwBA5thmAAAAAWJLR0QCZgt8ZAAAAJtJREFUOI3NkrsBgCAMRLFwBPdxBArcfxXFkO8rbKWAAJfHJ9faf9vuYX/749T5NmShm3bEwbe2SxeuM4+2oxDL1cDoKtVUjRy+tH78Cv2CS+wIiQNC1AEhk4AQeUTMWUJMfUJMSEJMSEY8kIx4IONroaYAimNxsXp1PA7PxwfVL8QnowwoVC0lig07wDDVUjAdbAnjwtow/z/bDW7eI4M2KruJAAAAAElFTkSuQmCC);\n}\n";function ro(e,t,n){if(!e.querySelector(to)){let r;t.infobarContent?r=t.infobarContent.replace(/\\n/g,"\n").replace(/\\t/g,"\t"):t.saveDate&&(r=t.saveDate),r=r||"No info";const a=function(e,t,n){const r=e.createElement(t);return n.appendChild(r),Array.from(getComputedStyle(r)).forEach((e=>r.style.setProperty(e,"initial","important"))),r}(e,to,e.body);let o;if(n)o=a.attachShadow({mode:"open"});else{const t=e.createElement("template");t.setAttribute("shadowrootmode","open"),a.appendChild(t),o=t}const i=e.createElement("div"),s=e.createElement("style");s.textContent=no.replace(/ {2}/g,"").replace(/\n/g,"").replace(/: /g,":").replace(/, /g,","),i.appendChild(s);const l=e.createElement("form");l.classList.add("infobar"),i.appendChild(l);const c=e.createElement("span");c.tabIndex=-1,c.classList.add("infobar-icon"),l.appendChild(c);const u=e.createElement("span");u.tabIndex=-1,u.classList.add("infobar-content");const d=e.createElement("input");d.type="checkbox",d.required=!0,d.classList.add("infobar-close-icon"),d.title="Close",u.appendChild(d);const h=e.createElement("span");h.textContent=r,u.appendChild(h);const p=e.createElement("a");if(p.classList.add("infobar-link-icon"),p.target="_blank",p.rel="noopener noreferrer",p.title="Open source URL: "+t.saveUrl,p.href=t.saveUrl,u.appendChild(p),l.appendChild(u),n)o.appendChild(i);else{const t=e.createElement("script");let n=oo.toString();n+=ao.toString(),n+="("+io.toString()+")(document)",t.textContent=n,i.appendChild(t),o.innerHTML=i.outerHTML}e.body.appendChild(a)}}function ao(e){const t=e.evaluate("//comment()",e,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null);let n=t&&t.singleNodeValue;if(n&&n.nodeType==Node.COMMENT_NODE&&n.textContent.includes(Qa)){const e=n.textContent.split("\n"),[,,t,...r]=e,a=t.match(/^ url: (.*) ?$/),o=a&&a[1];if(o){let e,t;if(r.length&&(t=r[0].split("saved date: ")[1],t&&r.shift(),r.length>1)){let t=r[0].split("info: ")[1].trim();for(let e=1;e<r.length-1;e++)t+="\n"+r[e].trim();e=t.trim()}return{saveUrl:o,infobarContent:e,saveDate:t}}}}function oo(e,{saveUrl:t,infobarContent:n,saveDate:r}){if(t){const a=e.querySelector("single-file-infobar").shadowRoot;a.querySelector(".infobar-content span").textContent=n||r;const o=a.querySelector(".infobar-content .infobar-link-icon");o.href=t,o.title="Open source URL: "+t}}function io(e){const t=ao(e);t&&t.saveUrl&&oo(e,t)}const so=Ya+"on-before-capture",lo=Ya+"on-after-capture",co=Ya+"request-get-adopted-stylesheets",uo=Ya+"response-get-adopted-stylesheets",ho=Ya+"unregister-request-get-adopted-stylesheets",po=Ya+"user-script-init",mo="data-"+Ya+"removed-content",fo="data-"+Ya+"hidden-content",go="data-"+Ya+"kept-content",bo="data-"+Ya+"hidden-frame",yo="data-"+Ya+"preserved-space-element",wo="data-"+Ya+"shadow-root-element",ko="data-"+Ya+"win-id",vo="data-"+Ya+"image",xo="data-"+Ya+"poster",Ao="data-"+Ya+"video",So="data-"+Ya+"canvas",Eo="data-"+Ya+"movable-style",To="data-"+Ya+"input-value",Co="data-"+Ya+"lazy-loaded-src",Ro="data-"+Ya+"stylesheet",_o="data-"+Ya+"disabled-noscript",zo="data-"+Ya+"selected-content",Io="data-"+Ya+"invalid-element",Lo="data-"+Ya+"async-script",Po="*:not(base):not(link):not(meta):not(noscript):not(script):not(style):not(template):not(title)",Do=["NOSCRIPT","DISABLED-NOSCRIPT","META","LINK","STYLE","TITLE","TEMPLATE","SOURCE","OBJECT","SCRIPT","HEAD","BODY"],No=/^'(.*?)'$/,Uo=/^"(.*?)"$/,Mo={regular:"400",normal:"400",bold:"700",bolder:"700",lighter:"100"},Oo="Archive processed by SingleFile",Fo="single-file-ui-element",qo=to,Bo="data:,",jo=(e,t,n)=>globalThis.addEventListener(e,t,n),Ho=globalThis.JSON;function Wo(e){e.querySelectorAll("meta[http-equiv=refresh]").forEach((e=>{e.removeAttribute("http-equiv"),e.setAttribute("disabled-http-equiv","refresh")}))}function Vo(e,t,n){e.querySelectorAll("noscript:not(["+_o+"])").forEach((e=>{e.setAttribute(_o,e.textContent),e.textContent=""})),Wo(e),e.head&&e.head.querySelectorAll(Po).forEach((e=>e.hidden=!0)),e.querySelectorAll("svg foreignObject").forEach((e=>{const t=e.querySelectorAll("html > head > "+Po+", html > body > "+Po);t.length&&(Array.from(e.childNodes).forEach((e=>e.remove())),t.forEach((t=>e.appendChild(t))))}));const r=new Map;let a;return t&&e.documentElement?(e.querySelectorAll("button button, a a").forEach((t=>{const n=e.createElement("template");n.setAttribute(Io,""),n.content.appendChild(t.cloneNode(!0)),r.set(t,n),t.replaceWith(n)})),a=Ko(t,e,e.documentElement,n),n.moveStylesInHead&&e.querySelectorAll("body style, body ~ style").forEach((e=>{const n=ii(t,e);n&&Zo(e,n)&&(e.setAttribute(Eo,""),a.markedElements.push(e))}))):a={canvases:[],images:[],posters:[],videos:[],usedFonts:[],shadowRoots:[],markedElements:[]},{canvases:a.canvases,fonts:qa(),stylesheets:ei(e),images:a.images,posters:a.posters,videos:a.videos,usedFonts:Array.from(a.usedFonts.values()),shadowRoots:a.shadowRoots,referrer:e.referrer,markedElements:a.markedElements,invalidElements:r,scrollPosition:{x:t.scrollX,y:t.scrollY},adoptedStyleSheets:$o(e.adoptedStyleSheets)}}function Ko(e,t,n,r,a={usedFonts:new Map,canvases:[],images:[],posters:[],videos:[],shadowRoots:[],markedElements:[]},o){if(n.childNodes){Array.from(n.childNodes).filter((t=>t instanceof e.HTMLElement||t instanceof e.SVGElement)).forEach((n=>{let i,s,l;if(!r.autoSaveExternalSave&&(r.removeHiddenElements||r.removeUnusedFonts||r.compressHTML)&&(l=ii(e,n),n instanceof e.HTMLElement&&r.removeHiddenElements&&(s=(o||n.closest("html > head"))&&Do.includes(n.tagName.toUpperCase())||n.closest("details"),s||(i=o||Zo(n,l),i&&(n.setAttribute(fo,""),a.markedElements.push(n)))),!i)){if(r.compressHTML&&l){const e=l.getPropertyValue("white-space");e&&e.startsWith("pre")&&(n.setAttribute(yo,""),a.markedElements.push(n))}r.removeUnusedFonts&&(Go(l,r,a.usedFonts),Go(ii(e,n,":first-letter"),r,a.usedFonts),Go(ii(e,n,":before"),r,a.usedFonts),Go(ii(e,n,":after"),r,a.usedFonts))}!function(e,t,n,r,a,o,i){const s=n.tagName&&n.tagName.toUpperCase();if("CANVAS"==s)try{a.canvases.push({dataURI:n.toDataURL("image/png",""),backgroundColor:i.getPropertyValue("background-color")}),n.setAttribute(So,a.canvases.length-1),a.markedElements.push(n)}catch(e){}if("IMG"==s){const t={currentSrc:o?Bo:r.loadDeferredImages&&n.getAttribute(Co)||n.currentSrc};if(a.images.push(t),n.setAttribute(vo,a.images.length-1),a.markedElements.push(n),n.removeAttribute(Co),i=i||ii(e,n)){t.size=function(e,t,n){let r=t.naturalWidth,a=t.naturalHeight;if(!r&&!a){const o=null==t.getAttribute("style");if(n=n||ii(e,t)){let e,i,s,l,c,u,d,h,p=!1;if("content-box"==n.getPropertyValue("box-sizing")){const e=t.style.getPropertyValue("box-sizing"),n=t.style.getPropertyPriority("box-sizing"),r=t.clientWidth;t.style.setProperty("box-sizing","border-box","important"),p=t.clientWidth!=r,e?t.style.setProperty("box-sizing",e,n):t.style.removeProperty("box-sizing")}e=ti("padding-left",n),i=ti("padding-right",n),s=ti("padding-top",n),l=ti("padding-bottom",n),p?(c=ti("border-left-width",n),u=ti("border-right-width",n),d=ti("border-top-width",n),h=ti("border-bottom-width",n)):c=u=d=h=0,r=Math.max(0,t.clientWidth-e-i-c-u),a=Math.max(0,t.clientHeight-s-l-d-h),o&&t.removeAttribute("style")}}return{pxWidth:r,pxHeight:a}}(e,n,i);const r=i.getPropertyValue("box-shadow"),a=i.getPropertyValue("background-image");r&&"none"!=r||a&&"none"!=a||!(t.size.pxWidth>1||t.size.pxHeight>1)||(t.replaceable=!0,t.backgroundColor=i.getPropertyValue("background-color"),t.objectFit=i.getPropertyValue("object-fit"),t.boxSizing=i.getPropertyValue("box-sizing"),t.objectPosition=i.getPropertyValue("object-position"))}}if("VIDEO"==s){const r=n.currentSrc;if(r&&!r.startsWith("blob:")&&!r.startsWith("data:")){const t=ii(e,n.parentNode);a.videos.push({positionParent:t&&t.getPropertyValue("position"),src:r,size:{pxWidth:n.clientWidth,pxHeight:n.clientHeight},currentTime:n.currentTime}),n.setAttribute(Ao,a.videos.length-1)}if(!n.getAttribute("poster")){const e=t.createElement("canvas"),r=e.getContext("2d");e.width=n.clientWidth,e.height=n.clientHeight;try{r.drawImage(n,0,0,e.width,e.height),a.posters.push(e.toDataURL("image/png","")),n.setAttribute(xo,a.posters.length-1),a.markedElements.push(n)}catch(e){}}}"IFRAME"==s&&o&&r.removeHiddenElements&&(n.setAttribute(bo,""),a.markedElements.push(n));"INPUT"==s&&("password"!=n.type&&(n.setAttribute(To,n.value),a.markedElements.push(n)),"radio"!=n.type&&"checkbox"!=n.type||(n.setAttribute(To,n.checked),a.markedElements.push(n)));"TEXTAREA"==s&&(n.setAttribute(To,n.value),a.markedElements.push(n));"SELECT"==s&&n.querySelectorAll("option").forEach((e=>{e.selected&&(e.setAttribute(To,""),a.markedElements.push(e))}));"SCRIPT"==s&&(n.async&&""!=n.getAttribute("async")&&"async"!=n.getAttribute("async")&&(n.setAttribute(Lo,""),a.markedElements.push(n)),n.textContent=n.textContent.replace(/<\/script>/gi,"<\\/script>"))}(e,t,n,r,a,i,l);const c=!(n instanceof e.SVGElement)&&Yo(n);if(c&&!n.classList.contains(Fo)){const o={};n.setAttribute(wo,a.shadowRoots.length),a.markedElements.push(n),a.shadowRoots.push(o);try{if(c.adoptedStyleSheets)if(c.adoptedStyleSheets.length)o.adoptedStyleSheets=$o(c.adoptedStyleSheets);else if(void 0===c.adoptedStyleSheets.length){const e=e=>o.adoptedStyleSheets=e.detail.adoptedStyleSheets;n.addEventListener(uo,e),n.dispatchEvent(new CustomEvent(co,{bubbles:!0})),n.removeEventListener(uo,e)}}catch(e){}Ko(e,t,c,r,a,i),o.content=c.innerHTML,o.mode=c.mode;try{c.adoptedStyleSheets&&void 0===c.adoptedStyleSheets.length&&n.dispatchEvent(new CustomEvent(ho,{bubbles:!0}))}catch(e){}}Ko(e,t,n,r,a,i),!r.autoSaveExternalSave&&r.removeHiddenElements&&o&&(s||""==n.getAttribute(go)?n.parentElement&&(n.parentElement.setAttribute(go,""),a.markedElements.push(n.parentElement)):i&&(n.setAttribute(mo,""),a.markedElements.push(n)))}))}return a}function $o(e){return e?Array.from(e).map((e=>Array.from(e.cssRules).map((e=>e.cssText)).join("\n"))):[]}function Go(e,t,n){if(e){const r=e.getPropertyValue("font-style")||"normal";e.getPropertyValue("font-family").split(",").forEach((a=>{if(a=Qo(a),!t.loadedFonts||t.loadedFonts.find((e=>Qo(e.family)==a&&e.style==r))){const t=ai(e.getPropertyValue("font-weight")),o=e.getPropertyValue("font-variant")||"normal",i=[a,t,r,o];n.set(Ho.stringify(i),[a,t,r,o])}}))}}function Yo(e){const t=globalThis.chrome;if(e.openOrClosedShadowRoot)return e.openOrClosedShadowRoot;if(!(t&&t.dom&&t.dom.openOrClosedShadowRoot))return e.shadowRoot;try{return t.dom.openOrClosedShadowRoot(e)}catch(t){return e.shadowRoot}}function Jo(e,t,n){return ro(e,t,n)}function Qo(e=""){return ri($a(e.trim())).toLowerCase()}function Zo(e,t){let n=!1;if(t){const r=t.getPropertyValue("display"),a=t.getPropertyValue("opacity"),o=t.getPropertyValue("visibility");if(n="none"==r,!n&&("0"==a||"hidden"==o)&&e.getBoundingClientRect){const t=e.getBoundingClientRect();n=!t.width&&!t.height}}return Boolean(n)}function Xo(e,t,n){if(e.querySelectorAll("["+_o+"]").forEach((e=>{e.textContent=e.getAttribute(_o),e.removeAttribute(_o)})),e.querySelectorAll("meta[disabled-http-equiv]").forEach((e=>{e.setAttribute("http-equiv",e.getAttribute("disabled-http-equiv")),e.removeAttribute("disabled-http-equiv")})),e.head&&e.head.querySelectorAll("*:not(base):not(link):not(meta):not(noscript):not(script):not(style):not(template):not(title)").forEach((e=>e.removeAttribute("hidden"))),!t){const n=[mo,bo,fo,yo,vo,xo,Ao,So,To,wo,Ro,Lo];t=e.querySelectorAll(n.map((e=>"["+e+"]")).join(","))}t.forEach((e=>{e.removeAttribute(mo),e.removeAttribute(fo),e.removeAttribute(go),e.removeAttribute(bo),e.removeAttribute(yo),e.removeAttribute(vo),e.removeAttribute(xo),e.removeAttribute(Ao),e.removeAttribute(So),e.removeAttribute(To),e.removeAttribute(wo),e.removeAttribute(Ro),e.removeAttribute(Lo),e.removeAttribute(Eo)})),n&&n.forEach(((e,t)=>e.replaceWith(t)))}function ei(e){if(e){const t=[];return e.querySelectorAll("style").forEach(((n,r)=>{try{const a=e.createElement("style");a.textContent=n.textContent,e.body.appendChild(a);const o=a.sheet;a.remove(),o&&o.cssRules.length==n.sheet.cssRules.length||(n.setAttribute(Ro,r),t[r]=Array.from(n.sheet.cssRules).map((e=>e.cssText)).join("\n"))}catch(e){}})),t}}function ti(e,t){if(t.getPropertyValue(e).endsWith("px"))return parseFloat(t.getPropertyValue(e))}function ni(e){const t=e.doctype;let n="";return t&&(n="<!DOCTYPE "+t.nodeName,t.publicId?(n+=' PUBLIC "'+t.publicId+'"',t.systemId&&(n+=' "'+t.systemId+'"')):t.systemId&&(n+=' SYSTEM "'+t.systemId+'"'),t.internalSubset&&(n+=" ["+t.internalSubset+"]"),n+="> "),n+e.documentElement.outerHTML}function ri(e){return(e=e.match(No)?e.replace(No,"$1"):e.replace(Uo,"$1")).trim()}function ai(e){return Mo[e.toLowerCase().trim()]||e}function oi(e){return e.flat?e.flat():e.reduce(((e,t)=>e.concat(Array.isArray(t)?oi(t):t)),[])}function ii(e,t,n){try{return e.getComputedStyle(t,n)}catch(e){}}var si=Object.freeze({__proto__:null,initUserScriptHandler:function(){jo(po,(()=>globalThis[Za]=async e=>{const t=new CustomEvent(e+"-request",{cancelable:!0}),n=new Promise((t=>jo(e+"-response",t)));(e=>{try{globalThis.dispatchEvent(e)}catch(e){}})(t),t.defaultPrevented&&await n}))},initDoc:Wo,preProcessDoc:Vo,postProcessDoc:Xo,serialize:ni,removeQuotes:ri,flatten:oi,getFontWeight:ai,normalizeFontFamily:Qo,getShadowRoot:Yo,appendInfobar:Jo,ON_BEFORE_CAPTURE_EVENT_NAME:so,ON_AFTER_CAPTURE_EVENT_NAME:lo,WIN_ID_ATTRIBUTE_NAME:ko,PRESERVED_SPACE_ELEMENT_ATTRIBUTE_NAME:yo,REMOVED_CONTENT_ATTRIBUTE_NAME:mo,HIDDEN_CONTENT_ATTRIBUTE_NAME:fo,HIDDEN_FRAME_ATTRIBUTE_NAME:bo,IMAGE_ATTRIBUTE_NAME:vo,POSTER_ATTRIBUTE_NAME:xo,VIDEO_ATTRIBUTE_NAME:Ao,CANVAS_ATTRIBUTE_NAME:So,INPUT_VALUE_ATTRIBUTE_NAME:To,SHADOW_ROOT_ATTRIBUTE_NAME:wo,STYLE_ATTRIBUTE_NAME:Eo,LAZY_SRC_ATTRIBUTE_NAME:Co,STYLESHEET_ATTRIBUTE_NAME:Ro,SELECTED_CONTENT_ATTRIBUTE_NAME:zo,INVALID_ELEMENT_ATTRIBUTE_NAME:Io,ASYNC_SCRIPT_ATTRIBUTE_NAME:Lo,COMMENT_HEADER:Ja,COMMENT_HEADER_LEGACY:Oo,SINGLE_FILE_UI_ELEMENT_CLASS:Fo,EMPTY_RESOURCE:Bo,INFOBAR_TAGNAME:qo,WAIT_FOR_USERSCRIPT_PROPERTY_NAME:Za,MESSAGE_PREFIX:Xa,NO_SCRIPT_PROPERTY_NAME:eo});const li={LAZY_SRC_ATTRIBUTE_NAME:Co,SINGLE_FILE_UI_ELEMENT_CLASS:Fo},ci=10,ui="attributes",di=globalThis.browser,hi=globalThis.document,pi=globalThis.MutationObserver,mi=(e,t,n)=>globalThis.addEventListener(e,t,n),fi=(e,t,n)=>globalThis.removeEventListener(e,t,n),gi=new Map;let bi;async function yi(e){if(hi.documentElement){gi.clear();const t=hi.body?Math.max(hi.body.scrollHeight,hi.documentElement.scrollHeight):hi.documentElement.scrollHeight,n=hi.body?Math.max(hi.body.scrollWidth,hi.documentElement.scrollWidth):hi.documentElement.scrollWidth;if(t>globalThis.innerHeight||n>globalThis.innerWidth){const r=Math.max(t-1.5*globalThis.innerHeight,0),a=Math.max(n-1.5*globalThis.innerWidth,0);if(globalThis.scrollY<r||globalThis.scrollX<a)return function(e){return bi=0,new Promise((async t=>{let n;const r=new Set,a=new pi((async t=>{if((t=t.filter((e=>e.type==ui))).length){t.filter((e=>{if("src"==e.attributeName&&(e.target.setAttribute(li.LAZY_SRC_ATTRIBUTE_NAME,e.target.src),e.target.addEventListener("load",i)),"src"==e.attributeName||"srcset"==e.attributeName||e.target.tagName&&"SOURCE"==e.target.tagName.toUpperCase())return!e.target.classList||!e.target.classList.contains(li.SINGLE_FILE_UI_ELEMENT_CLASS)})).length&&(n=!0,await vi(a,e,c),r.size||await ki(a,e,c))}}));async function o(t){await Ai("idleTimeout",(async()=>{n?bi<ci&&(bi++,Ei("idleTimeout"),await o(Math.max(500,t/2))):(Ei("loadTimeout"),Ei("maxTimeout"),xi(a,e,c))}),t,e.loadDeferredImagesNativeTimeout)}function i(e){const t=e.target;t.removeAttribute(li.LAZY_SRC_ATTRIBUTE_NAME),t.removeEventListener("load",i)}async function s(t){n=!0,await vi(a,e,c),await ki(a,e,c),t.detail&&r.add(t.detail)}async function l(t){await vi(a,e,c),await ki(a,e,c),r.delete(t.detail),r.size||await ki(a,e,c)}function c(e){a.disconnect(),fi(za,s),fi(Ia,l),t(e)}await o(2*e.loadDeferredImagesMaxIdleTime),await vi(a,e,c),a.observe(hi,{subtree:!0,childList:!0,attributes:!0}),mi(za,s),mi(Ia,l),Ba(e)}))}(e)}}}function wi(e){Ha(e)}async function ki(e,t,n){await Ai("loadTimeout",(()=>xi(e,t,n)),t.loadDeferredImagesMaxIdleTime,t.loadDeferredImagesNativeTimeout)}async function vi(e,t,n){await Ai("maxTimeout",(async()=>{await Ei("loadTimeout"),await xi(e,t,n)}),10*t.loadDeferredImagesMaxIdleTime,t.loadDeferredImagesNativeTimeout)}async function xi(e,t,n){await Ei("idleTimeout"),ja(t),await Ai("endTimeout",(async()=>{await Ei("maxTimeout"),n()}),t.loadDeferredImagesMaxIdleTime/2,t.loadDeferredImagesNativeTimeout),e.disconnect()}async function Ai(e,t,n,r){if(di&&di.runtime&&di.runtime.sendMessage&&!r){if(!gi.get(e)||!gi.get(e).pending){const r={callback:t,pending:!0};gi.set(e,r);try{await di.runtime.sendMessage({method:"singlefile.lazyTimeout.setTimeout",type:e,delay:n})}catch(r){Si(e,t,n)}r.pending=!1}}else Si(e,t,n)}function Si(e,t,n){const r=gi.get(e);r&&globalThis.clearTimeout(r),gi.set(e,t),globalThis.setTimeout(t,n)}async function Ei(e){if(di&&di.runtime&&di.runtime.sendMessage)try{await di.runtime.sendMessage({method:"singlefile.lazyTimeout.clearTimeout",type:e})}catch(t){Ti(e)}else Ti(e)}function Ti(e){const t=gi.get(e);gi.delete(e),t&&globalThis.clearTimeout(t)}di&&di.runtime&&di.runtime.onMessage&&di.runtime.onMessage.addListener&&di.runtime.onMessage.addListener((e=>{if("singlefile.lazyTimeout.onTimeout"==e.method){const t=gi.get(e.type);if(t){gi.delete(e.type);try{t.callback()}catch(t){Ti(e.type)}}}}));var Ci=Object.freeze({__proto__:null,process:yi,resetZoomLevel:wi});const Ri={ON_BEFORE_CAPTURE_EVENT_NAME:so,ON_AFTER_CAPTURE_EVENT_NAME:lo,WIN_ID_ATTRIBUTE_NAME:ko,WAIT_FOR_USERSCRIPT_PROPERTY_NAME:Za,preProcessDoc:Vo,serialize:ni,postProcessDoc:Xo,getShadowRoot:Yo},_i='iframe, frame, object[type="text/html"][data]',zi="*",Ii="singlefile.frameTree.initRequest",Li="singlefile.frameTree.ackInitRequest",Pi="singlefile.frameTree.cleanupRequest",Di="singlefile.frameTree.initResponse",Ni="*",Ui=5e3,Mi=".",Oi=globalThis.window==globalThis.top,Fi=globalThis.browser,qi=globalThis.top,Bi=globalThis.MessageChannel,ji=globalThis.document,Hi=globalThis.JSON;let Wi,Vi=globalThis.sessions;var Ki,$i,Gi;function Yi(){return globalThis.crypto.getRandomValues(new Uint32Array(32)).join("")}async function Ji(e){const t=e.sessionId,n=globalThis[Ri.WAIT_FOR_USERSCRIPT_PROPERTY_NAME];delete globalThis._singleFile_cleaningUp,Oi||(Wi=globalThis.frameId=e.windowId),Xi(ji,e.options,Wi,t),Oi||(e.options.userScriptEnabled&&n&&await n(Ri.ON_BEFORE_CAPTURE_EVENT_NAME),rs({frames:[os(ji,globalThis,Wi,e.options,e.scrolling)],sessionId:t,requestedFrameId:ji.documentElement.dataset.requestedFrameId&&Wi}),e.options.userScriptEnabled&&n&&await n(Ri.ON_AFTER_CAPTURE_EVENT_NAME),delete ji.documentElement.dataset.requestedFrameId)}function Qi(e){if(!globalThis._singleFile_cleaningUp){globalThis._singleFile_cleaningUp=!0;const t=e.sessionId;ns(is(ji),e.windowId,t)}}function Zi(e){e.frames.forEach((t=>es("responseTimeouts",e.sessionId,t.windowId)));const t=Vi.get(e.sessionId);if(t){e.requestedFrameId&&(t.requestedFrameId=e.requestedFrameId),e.frames.forEach((e=>{let n=t.frames.find((t=>e.windowId==t.windowId));n||(n={windowId:e.windowId},t.frames.push(n)),n.processed||(n.content=e.content,n.baseURI=e.baseURI,n.title=e.title,n.url=e.url,n.canvases=e.canvases,n.fonts=e.fonts,n.stylesheets=e.stylesheets,n.images=e.images,n.posters=e.posters,n.videos=e.videos,n.usedFonts=e.usedFonts,n.shadowRoots=e.shadowRoots,n.processed=e.processed,n.scrollPosition=e.scrollPosition,n.scrolling=e.scrolling,n.adoptedStyleSheets=e.adoptedStyleSheets)}));t.frames.filter((e=>!e.processed)).length||(t.frames=t.frames.sort(((e,t)=>t.windowId.split(Mi).length-e.windowId.split(Mi).length)),t.resolve&&(t.requestedFrameId&&t.frames.forEach((e=>{e.windowId==t.requestedFrameId&&(e.requestedFrame=!0)})),t.resolve(t.frames)))}}function Xi(e,t,n,r){const a=is(e);!function(e,t,n,r,a){const o=[];let i;Vi.get(a)?i=Vi.get(a).requestTimeouts:(i={},Vi.set(a,{requestTimeouts:i}));t.forEach(((e,t)=>{const n=r+Mi+t;e.setAttribute(Ri.WIN_ID_ATTRIBUTE_NAME,n),o.push({windowId:n})})),rs({frames:o,sessionId:a,requestedFrameId:e.documentElement.dataset.requestedFrameId&&r}),t.forEach(((e,t)=>{const o=r+Mi+t;try{as(e.contentWindow,{method:Ii,windowId:o,sessionId:a,options:n,scrolling:e.scrolling})}catch(e){}i[o]=globalThis.setTimeout((()=>rs({frames:[{windowId:o,processed:!0}],sessionId:a})),Ui)})),delete e.documentElement.dataset.requestedFrameId}(e,a,t,n,r),a.length&&function(e,t,n,r,a){const o=[];t.forEach(((e,t)=>{const i=r+Mi+t;let s;try{s=e.contentDocument}catch(e){}if(s)try{const t=e.contentWindow;t.stop(),es("requestTimeouts",a,i),Xi(s,n,i,a),o.push(os(s,t,i,n,e.scrolling))}catch(e){o.push({windowId:i,processed:!0})}})),rs({frames:o,sessionId:a,requestedFrameId:e.documentElement.dataset.requestedFrameId&&r}),delete e.documentElement.dataset.requestedFrameId}(e,a,t,n,r)}function es(e,t,n){const r=Vi.get(t);if(r&&r[e]){const t=r[e][n];t&&(globalThis.clearTimeout(t),delete r[e][n])}}function ts(e,t){const n=Vi.get(e);n&&n.responseTimeouts&&(n.responseTimeouts[t]=globalThis.setTimeout((()=>rs({frames:[{windowId:t,processed:!0}],sessionId:e})),1e4))}function ns(e,t,n){e.forEach(((e,r)=>{const a=t+Mi+r;e.removeAttribute(Ri.WIN_ID_ATTRIBUTE_NAME);try{as(e.contentWindow,{method:Pi,windowId:a,sessionId:n})}catch(e){}})),e.forEach(((e,r)=>{const a=t+Mi+r;let o;try{o=e.contentDocument}catch(e){}if(o)try{ns(is(o),a,n)}catch(e){}}))}function rs(e){e.method=Di;try{qi.singlefile.processors.frameTree.initResponse(e)}catch(t){as(qi,e,!0)}}function as(e,t,n){if(e==qi&&Fi&&Fi.runtime&&Fi.runtime.sendMessage)Fi.runtime.sendMessage(t);else if(n){const n=new Bi;e.postMessage(Xa+Hi.stringify({method:t.method,sessionId:t.sessionId}),Ni,[n.port2]),n.port1.postMessage(t)}else e.postMessage(Xa+Hi.stringify(t),Ni)}function os(e,t,n,r,a){const o=Ri.preProcessDoc(e,t,r),i=Ri.serialize(e);Ri.postProcessDoc(e,o.markedElements,o.invalidElements);return{windowId:n,content:i,baseURI:e.baseURI.split("#")[0],url:e.location.href,title:e.title,canvases:o.canvases,fonts:o.fonts,stylesheets:o.stylesheets,images:o.images,posters:o.posters,videos:o.videos,usedFonts:o.usedFonts,shadowRoots:o.shadowRoots,scrollPosition:o.scrollPosition,scrolling:a,adoptedStyleSheets:o.adoptedStyleSheets,processed:!0}}function is(e){let t=Array.from(e.querySelectorAll(_i));return e.querySelectorAll(zi).forEach((e=>{const n=Ri.getShadowRoot(e);n&&(t=t.concat(...n.querySelectorAll(_i)))})),t}Vi||(Vi=globalThis.sessions=new Map),Oi&&(Wi="0",Fi&&Fi.runtime&&Fi.runtime.onMessage&&Fi.runtime.onMessage.addListener&&Fi.runtime.onMessage.addListener((e=>e.method==Di?(Zi(e),Promise.resolve({})):e.method==Li?(es("requestTimeouts",e.sessionId,e.windowId),ts(e.sessionId,e.windowId),Promise.resolve({})):void 0))),Ki="message",$i=async e=>{if("string"==typeof e.data&&e.data.startsWith(Xa)){e.preventDefault(),e.stopPropagation();const t=Hi.parse(e.data.substring(Xa.length));t.method==Ii?(e.source&&as(e.source,{method:Li,windowId:t.windowId,sessionId:t.sessionId}),Oi||(globalThis.stop(),t.options.loadDeferredImages&&yi(t.options),await Ji(t))):t.method==Li?(es("requestTimeouts",t.sessionId,t.windowId),ts(t.sessionId,t.windowId)):t.method==Pi?Qi(t):t.method==Di&&Vi.get(t.sessionId)&&(e.ports[0].onmessage=e=>Zi(e.data))}},Gi=!0,globalThis.addEventListener(Ki,$i,Gi);var ss=Object.freeze({__proto__:null,getAsync:function(e){const t=Yi();return e=Hi.parse(Hi.stringify(e)),new Promise((n=>{Vi.set(t,{frames:[],requestTimeouts:{},responseTimeouts:{},resolve:e=>{e.sessionId=t,n(e)}}),Ji({windowId:Wi,sessionId:t,options:e})}))},getSync:function(e){const t=Yi();e=Hi.parse(Hi.stringify(e)),Vi.set(t,{frames:[],requestTimeouts:{},responseTimeouts:{}}),function(e){const t=e.sessionId,n=globalThis[Ri.WAIT_FOR_USERSCRIPT_PROPERTY_NAME];delete globalThis._singleFile_cleaningUp,Oi||(Wi=globalThis.frameId=e.windowId);Xi(ji,e.options,Wi,t),Oi||(e.options.userScriptEnabled&&n&&n(Ri.ON_BEFORE_CAPTURE_EVENT_NAME),rs({frames:[os(ji,globalThis,Wi,e.options,e.scrolling)],sessionId:t,requestedFrameId:ji.documentElement.dataset.requestedFrameId&&Wi}),e.options.userScriptEnabled&&n&&n(Ri.ON_AFTER_CAPTURE_EVENT_NAME),delete ji.documentElement.dataset.requestedFrameId)}({windowId:Wi,sessionId:t,options:e});const n=Vi.get(t).frames;return n.sessionId=t,n},cleanup:function(e){Vi.delete(e),Qi({windowId:Wi,sessionId:e,options:{sessionId:e}})},initResponse:Zi,TIMEOUT_INIT_REQUEST_MESSAGE:Ui}),ls=Object.freeze({__proto__:null,compression:ba,frameTree:ss,hooksFrames:Wa,lazy:Ci}),cs=Object.create,us=Object.defineProperty,ds=Object.getOwnPropertyDescriptor,hs=Object.getOwnPropertyNames,ps=Object.getPrototypeOf,ms=Object.prototype.hasOwnProperty,fs=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),gs=(e,t)=>{for(var n in t)us(e,n,{get:t[n],enumerable:!0})},bs=fs((e=>{var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");e.encode=function(e){if(0<=e&&e<t.length)return t[e];throw new TypeError("Must be between 0 and 63: "+e)},e.decode=function(e){return 65<=e&&e<=90?e-65:97<=e&&e<=122?e-97+26:48<=e&&e<=57?e-48+52:43==e?62:47==e?63:-1}})),ys=fs((e=>{var t=bs();e.encode=function(e){var n,r="",a=function(e){return e<0?1+(-e<<1):0+(e<<1)}(e);do{n=31&a,(a>>>=5)>0&&(n|=32),r+=t.encode(n)}while(a>0);return r},e.decode=function(e,n,r){var a,o,i=e.length,s=0,l=0;do{if(n>=i)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(o=t.decode(e.charCodeAt(n++))))throw new Error("Invalid base64 digit: "+e.charAt(n-1));a=!!(32&o),s+=(o&=31)<<l,l+=5}while(a);r.value=function(e){var t=e>>1;return 1==(1&e)?-t:t}(s),r.rest=n}})),ws=fs((e=>{e.getArg=function(e,t,n){if(t in e)return e[t];if(3===arguments.length)return n;throw new Error('"'+t+'" is a required argument.')};var t=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,n=/^data:.+\,.+$/;function r(e){var n=e.match(t);return n?{scheme:n[1],auth:n[2],host:n[3],port:n[4],path:n[5]}:null}function a(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}e.urlParse=r,e.urlGenerate=a;var o=function(e){var t=[];return function(n){for(var r=0;r<t.length;r++)if(t[r].input===n){var a=t[0];return t[0]=t[r],t[r]=a,t[0].result}var o=e(n);return t.unshift({input:n,result:o}),t.length>32&&t.pop(),o}}((function(t){var n=t,o=r(t);if(o){if(!o.path)return t;n=o.path}for(var i=e.isAbsolute(n),s=[],l=0,c=0;;){if(l=c,-1===(c=n.indexOf("/",l))){s.push(n.slice(l));break}for(s.push(n.slice(l,c));c<n.length&&"/"===n[c];)c++}var u,d=0;for(c=s.length-1;c>=0;c--)"."===(u=s[c])?s.splice(c,1):".."===u?d++:d>0&&(""===u?(s.splice(c+1,d),d=0):(s.splice(c,2),d--));return""===(n=s.join("/"))&&(n=i?"/":"."),o?(o.path=n,a(o)):n}));function i(e,t){""===e&&(e="."),""===t&&(t=".");var i=r(t),s=r(e);if(s&&(e=s.path||"/"),i&&!i.scheme)return s&&(i.scheme=s.scheme),a(i);if(i||t.match(n))return t;if(s&&!s.host&&!s.path)return s.host=t,a(s);var l="/"===t.charAt(0)?t:o(e.replace(/\/+$/,"")+"/"+t);return s?(s.path=l,a(s)):l}e.normalize=o,e.join=i,e.isAbsolute=function(e){return"/"===e.charAt(0)||t.test(e)},e.relative=function(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var n=0;0!==t.indexOf(e+"/");){var r=e.lastIndexOf("/");if(r<0||(e=e.slice(0,r)).match(/^([^\/]+:\/)?\/*$/))return t;++n}return Array(n+1).join("../")+t.substr(e.length+1)};var s=!("__proto__"in Object.create(null));function l(e){return e}function c(e){if(!e)return!1;var t=e.length;if(t<9||95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var n=t-10;n>=0;n--)if(36!==e.charCodeAt(n))return!1;return!0}function u(e,t){return e===t?0:null===e?1:null===t?-1:e>t?1:-1}e.toSetString=s?l:function(e){return c(e)?"$"+e:e},e.fromSetString=s?l:function(e){return c(e)?e.slice(1):e},e.compareByOriginalPositions=function(e,t,n){var r=u(e.source,t.source);return 0!==r||0!==(r=e.originalLine-t.originalLine)||(0!==(r=e.originalColumn-t.originalColumn)||n)||0!==(r=e.generatedColumn-t.generatedColumn)||0!==(r=e.generatedLine-t.generatedLine)?r:u(e.name,t.name)},e.compareByOriginalPositionsNoSource=function(e,t,n){var r;return 0!==(r=e.originalLine-t.originalLine)||(0!==(r=e.originalColumn-t.originalColumn)||n)||0!==(r=e.generatedColumn-t.generatedColumn)||0!==(r=e.generatedLine-t.generatedLine)?r:u(e.name,t.name)},e.compareByGeneratedPositionsDeflated=function(e,t,n){var r=e.generatedLine-t.generatedLine;return 0!==r||(0!==(r=e.generatedColumn-t.generatedColumn)||n)||0!==(r=u(e.source,t.source))||0!==(r=e.originalLine-t.originalLine)||0!==(r=e.originalColumn-t.originalColumn)?r:u(e.name,t.name)},e.compareByGeneratedPositionsDeflatedNoLine=function(e,t,n){var r=e.generatedColumn-t.generatedColumn;return 0!==r||n||0!==(r=u(e.source,t.source))||0!==(r=e.originalLine-t.originalLine)||0!==(r=e.originalColumn-t.originalColumn)?r:u(e.name,t.name)},e.compareByGeneratedPositionsInflated=function(e,t){var n=e.generatedLine-t.generatedLine;return 0!==n||0!==(n=e.generatedColumn-t.generatedColumn)||0!==(n=u(e.source,t.source))||0!==(n=e.originalLine-t.originalLine)||0!==(n=e.originalColumn-t.originalColumn)?n:u(e.name,t.name)},e.parseSourceMapInput=function(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))},e.computeSourceURL=function(e,t,n){if(t=t||"",e&&("/"!==e[e.length-1]&&"/"!==t[0]&&(e+="/"),t=e+t),n){var s=r(n);if(!s)throw new Error("sourceMapURL could not be parsed");if(s.path){var l=s.path.lastIndexOf("/");l>=0&&(s.path=s.path.substring(0,l+1))}t=i(a(s),t)}return o(t)}})),ks=fs((e=>{var t=ws(),n=Object.prototype.hasOwnProperty,r=typeof Map<"u";function a(){this._array=[],this._set=r?new Map:Object.create(null)}a.fromArray=function(e,t){for(var n=new a,r=0,o=e.length;r<o;r++)n.add(e[r],t);return n},a.prototype.size=function(){return r?this._set.size:Object.getOwnPropertyNames(this._set).length},a.prototype.add=function(e,a){var o=r?e:t.toSetString(e),i=r?this.has(e):n.call(this._set,o),s=this._array.length;(!i||a)&&this._array.push(e),i||(r?this._set.set(e,s):this._set[o]=s)},a.prototype.has=function(e){if(r)return this._set.has(e);var a=t.toSetString(e);return n.call(this._set,a)},a.prototype.indexOf=function(e){if(r){var a=this._set.get(e);if(a>=0)return a}else{var o=t.toSetString(e);if(n.call(this._set,o))return this._set[o]}throw new Error('"'+e+'" is not in the set.')},a.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)},a.prototype.toArray=function(){return this._array.slice()},e.ArraySet=a})),vs=fs((e=>{var t=ws();function n(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}n.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},n.prototype.add=function(e){!function(e,n){var r=e.generatedLine,a=n.generatedLine,o=e.generatedColumn,i=n.generatedColumn;return a>r||a==r&&i>=o||t.compareByGeneratedPositionsInflated(e,n)<=0}(this._last,e)?(this._sorted=!1,this._array.push(e)):(this._last=e,this._array.push(e))},n.prototype.toArray=function(){return this._sorted||(this._array.sort(t.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},e.MappingList=n})),xs=fs((e=>{var t=ys(),n=ws(),r=ks().ArraySet,a=vs().MappingList;function o(e){e||(e={}),this._file=n.getArg(e,"file",null),this._sourceRoot=n.getArg(e,"sourceRoot",null),this._skipValidation=n.getArg(e,"skipValidation",!1),this._sources=new r,this._names=new r,this._mappings=new a,this._sourcesContents=null}o.prototype._version=3,o.fromSourceMap=function(e){var t=e.sourceRoot,r=new o({file:e.file,sourceRoot:t});return e.eachMapping((function(e){var a={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(a.source=e.source,null!=t&&(a.source=n.relative(t,a.source)),a.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(a.name=e.name)),r.addMapping(a)})),e.sources.forEach((function(a){var o=a;null!==t&&(o=n.relative(t,a)),r._sources.has(o)||r._sources.add(o);var i=e.sourceContentFor(a);null!=i&&r.setSourceContent(a,i)})),r},o.prototype.addMapping=function(e){var t=n.getArg(e,"generated"),r=n.getArg(e,"original",null),a=n.getArg(e,"source",null),o=n.getArg(e,"name",null);this._skipValidation||this._validateMapping(t,r,a,o),null!=a&&(a=String(a),this._sources.has(a)||this._sources.add(a)),null!=o&&(o=String(o),this._names.has(o)||this._names.add(o)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:null!=r&&r.line,originalColumn:null!=r&&r.column,source:a,name:o})},o.prototype.setSourceContent=function(e,t){var r=e;null!=this._sourceRoot&&(r=n.relative(this._sourceRoot,r)),null!=t?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[n.toSetString(r)]=t):this._sourcesContents&&(delete this._sourcesContents[n.toSetString(r)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},o.prototype.applySourceMap=function(e,t,a){var o=t;if(null==t){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');o=e.file}var i=this._sourceRoot;null!=i&&(o=n.relative(i,o));var s=new r,l=new r;this._mappings.unsortedForEach((function(t){if(t.source===o&&null!=t.originalLine){var r=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});null!=r.source&&(t.source=r.source,null!=a&&(t.source=n.join(a,t.source)),null!=i&&(t.source=n.relative(i,t.source)),t.originalLine=r.line,t.originalColumn=r.column,null!=r.name&&(t.name=r.name))}var c=t.source;null!=c&&!s.has(c)&&s.add(c);var u=t.name;null!=u&&!l.has(u)&&l.add(u)}),this),this._sources=s,this._names=l,e.sources.forEach((function(t){var r=e.sourceContentFor(t);null!=r&&(null!=a&&(t=n.join(a,t)),null!=i&&(t=n.relative(i,t)),this.setSourceContent(t,r))}),this)},o.prototype._validateMapping=function(e,t,n,r){if(t&&"number"!=typeof t.line&&"number"!=typeof t.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||t||n||r){if(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&n)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:t,name:r}))}},o.prototype._serializeMappings=function(){for(var e,r,a,o,i=0,s=1,l=0,c=0,u=0,d=0,h="",p=this._mappings.toArray(),m=0,f=p.length;m<f;m++){if(e="",(r=p[m]).generatedLine!==s)for(i=0;r.generatedLine!==s;)e+=";",s++;else if(m>0){if(!n.compareByGeneratedPositionsInflated(r,p[m-1]))continue;e+=","}e+=t.encode(r.generatedColumn-i),i=r.generatedColumn,null!=r.source&&(o=this._sources.indexOf(r.source),e+=t.encode(o-d),d=o,e+=t.encode(r.originalLine-1-c),c=r.originalLine-1,e+=t.encode(r.originalColumn-l),l=r.originalColumn,null!=r.name&&(a=this._names.indexOf(r.name),e+=t.encode(a-u),u=a)),h+=e}return h},o.prototype._generateSourcesContent=function(e,t){return e.map((function(e){if(!this._sourcesContents)return null;null!=t&&(e=n.relative(t,e));var r=n.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null}),this)},o.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},o.prototype.toString=function(){return JSON.stringify(this.toJSON())},e.SourceMapGenerator=o})),As={};gs(As,{AtKeyword:()=>Cs,BadString:()=>zs,BadUrl:()=>Ls,CDC:()=>Fs,CDO:()=>Os,Colon:()=>qs,Comma:()=>js,Comment:()=>Ys,Delim:()=>Ps,Dimension:()=>Us,EOF:()=>Ss,Function:()=>Ts,Hash:()=>Rs,Ident:()=>Es,LeftCurlyBracket:()=>$s,LeftParenthesis:()=>Vs,LeftSquareBracket:()=>Hs,Number:()=>Ds,Percentage:()=>Ns,RightCurlyBracket:()=>Gs,RightParenthesis:()=>Ks,RightSquareBracket:()=>Ws,Semicolon:()=>Bs,String:()=>_s,Url:()=>Is,WhiteSpace:()=>Ms});var Ss=0,Es=1,Ts=2,Cs=3,Rs=4,_s=5,zs=6,Is=7,Ls=8,Ps=9,Ds=10,Ns=11,Us=12,Ms=13,Os=14,Fs=15,qs=16,Bs=17,js=18,Hs=19,Ws=20,Vs=21,Ks=22,$s=23,Gs=24,Ys=25;function Js(e){return e>=48&&e<=57}function Qs(e){return Js(e)||e>=65&&e<=70||e>=97&&e<=102}function Zs(e){return e>=65&&e<=90}function Xs(e){return function(e){return Zs(e)||function(e){return e>=97&&e<=122}(e)}(e)||function(e){return e>=128}(e)||95===e}function el(e){return Xs(e)||Js(e)||45===e}function tl(e){return e>=0&&e<=8||11===e||e>=14&&e<=31||127===e}function nl(e){return 10===e||13===e||12===e}function rl(e){return nl(e)||32===e||9===e}function al(e,t){return!(92!==e||nl(t)||0===t)}function ol(e,t,n){return 45===e?Xs(t)||45===t||al(t,n):!!Xs(e)||92===e&&al(e,t)}function il(e,t,n){return 43===e||45===e?Js(t)?2:46===t&&Js(n)?3:0:46===e?Js(t)?2:0:Js(e)?1:0}function sl(e){return 65279===e||65534===e?1:0}var ll=new Array(128),cl=130,ul=131,dl=132,hl=133;for(let e=0;e<ll.length;e++)ll[e]=rl(e)&&cl||Js(e)&&ul||Xs(e)&&dl||tl(e)&&hl||e||128;function pl(e){return e<128?ll[e]:dl}function ml(e,t){return t<e.length?e.charCodeAt(t):0}function fl(e,t,n){return 13===n&&10===ml(e,t+1)?2:1}function gl(e,t,n){let r=e.charCodeAt(t);return Zs(r)&&(r|=32),r===n}function bl(e,t,n,r){if(n-t!==r.length||t<0||n>e.length)return!1;for(let a=t;a<n;a++){let n=r.charCodeAt(a-t),o=e.charCodeAt(a);if(Zs(o)&&(o|=32),o!==n)return!1}return!0}function yl(e,t){for(;t<e.length&&rl(e.charCodeAt(t));t++);return t}function wl(e,t){for(;t<e.length&&Js(e.charCodeAt(t));t++);return t}function kl(e,t){if(Qs(ml(e,(t+=2)-1))){for(let n=Math.min(e.length,t+5);t<n&&Qs(ml(e,t));t++);let n=ml(e,t);rl(n)&&(t+=fl(e,t,n))}return t}function vl(e,t){for(;t<e.length;t++){let n=e.charCodeAt(t);if(!el(n)){if(al(n,ml(e,t+1))){t=kl(e,t)-1;continue}break}}return t}function xl(e,t){let n=e.charCodeAt(t);if((43===n||45===n)&&(n=e.charCodeAt(t+=1)),Js(n)&&(t=wl(e,t+1),n=e.charCodeAt(t)),46===n&&Js(e.charCodeAt(t+1))&&(t=wl(e,t+=2)),gl(e,t,101)){let r=0;n=e.charCodeAt(t+1),(45===n||43===n)&&(r=1,n=e.charCodeAt(t+2)),Js(n)&&(t=wl(e,t+1+r+1))}return t}function Al(e,t){for(;t<e.length;t++){let n=e.charCodeAt(t);if(41===n){t++;break}al(n,ml(e,t+1))&&(t=kl(e,t))}return t}function Sl(e){if(1===e.length&&!Qs(e.charCodeAt(0)))return e[0];let t=parseInt(e,16);return(0===t||t>=55296&&t<=57343||t>1114111)&&(t=65533),String.fromCodePoint(t)}var El=["EOF-token","ident-token","function-token","at-keyword-token","hash-token","string-token","bad-string-token","url-token","bad-url-token","delim-token","number-token","percentage-token","dimension-token","whitespace-token","CDO-token","CDC-token","colon-token","semicolon-token","comma-token","[-token","]-token","(-token",")-token","{-token","}-token","comment-token"];function Tl(e=null,t){return null===e||e.length<t?new Uint32Array(Math.max(t+1024,16384)):e}function Cl(e){let t=e.source,n=t.length,r=t.length>0?sl(t.charCodeAt(0)):0,a=Tl(e.lines,n),o=Tl(e.columns,n),i=e.startLine,s=e.startColumn;for(let e=r;e<n;e++){let r=t.charCodeAt(e);a[e]=i,o[e]=s++,(10===r||13===r||12===r)&&(13===r&&e+1<n&&10===t.charCodeAt(e+1)&&(e++,a[e]=i,o[e]=s),i++,s=1)}a[n]=i,o[n]=s,e.lines=a,e.columns=o,e.computed=!0}var Rl=class{constructor(){this.lines=null,this.columns=null,this.computed=!1}setSource(e,t=0,n=1,r=1){this.source=e,this.startOffset=t,this.startLine=n,this.startColumn=r,this.computed=!1}getLocation(e,t){return this.computed||Cl(this),{source:t,offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]}}getLocationRange(e,t,n){return this.computed||Cl(this),{source:n,start:{offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]},end:{offset:this.startOffset+t,line:this.lines[t],column:this.columns[t]}}}},_l=16777215,zl=24,Il=new Map([[2,22],[21,22],[19,20],[23,24]]),Ll=class{constructor(e,t){this.setSource(e,t)}reset(){this.eof=!1,this.tokenIndex=-1,this.tokenType=0,this.tokenStart=this.firstCharOffset,this.tokenEnd=this.firstCharOffset}setSource(e="",t=(()=>{})){let n=(e=String(e||"")).length,r=Tl(this.offsetAndType,e.length+1),a=Tl(this.balance,e.length+1),o=0,i=0,s=0,l=-1;for(this.offsetAndType=null,this.balance=null,t(e,((e,t,c)=>{switch(e){default:a[o]=n;break;case i:{let e=s&_l;for(s=a[e],i=s>>zl,a[o]=e,a[e++]=o;e<o;e++)a[e]===n&&(a[e]=o);break}case 21:case 2:case 19:case 23:a[o]=s,i=Il.get(e),s=i<<zl|o}r[o++]=e<<zl|c,-1===l&&(l=t)})),r[o]=0|n,a[o]=n,a[n]=n;0!==s;){let e=s&_l;s=a[e],a[e]=n}this.source=e,this.firstCharOffset=-1===l?0:l,this.tokenCount=o,this.offsetAndType=r,this.balance=a,this.reset(),this.next()}lookupType(e){return(e+=this.tokenIndex)<this.tokenCount?this.offsetAndType[e]>>zl:0}lookupOffset(e){return(e+=this.tokenIndex)<this.tokenCount?this.offsetAndType[e-1]&_l:this.source.length}lookupValue(e,t){return(e+=this.tokenIndex)<this.tokenCount&&bl(this.source,this.offsetAndType[e-1]&_l,this.offsetAndType[e]&_l,t)}getTokenStart(e){return e===this.tokenIndex?this.tokenStart:e>0?e<this.tokenCount?this.offsetAndType[e-1]&_l:this.offsetAndType[this.tokenCount]&_l:this.firstCharOffset}substrToCursor(e){return this.source.substring(e,this.tokenStart)}isBalanceEdge(e){return this.balance[this.tokenIndex]<e}isDelim(e,t){return t?9===this.lookupType(t)&&this.source.charCodeAt(this.lookupOffset(t))===e:9===this.tokenType&&this.source.charCodeAt(this.tokenStart)===e}skip(e){let t=this.tokenIndex+e;t<this.tokenCount?(this.tokenIndex=t,this.tokenStart=this.offsetAndType[t-1]&_l,t=this.offsetAndType[t],this.tokenType=t>>zl,this.tokenEnd=t&_l):(this.tokenIndex=this.tokenCount,this.next())}next(){let e=this.tokenIndex+1;e<this.tokenCount?(this.tokenIndex=e,this.tokenStart=this.tokenEnd,e=this.offsetAndType[e],this.tokenType=e>>zl,this.tokenEnd=e&_l):(this.eof=!0,this.tokenIndex=this.tokenCount,this.tokenType=0,this.tokenStart=this.tokenEnd=this.source.length)}skipSC(){for(;13===this.tokenType||25===this.tokenType;)this.next()}skipUntilBalanced(e,t){let n,r,a=e;e:for(;a<this.tokenCount&&(n=this.balance[a],!(n<e));a++)switch(r=a>0?this.offsetAndType[a-1]&_l:this.firstCharOffset,t(this.source.charCodeAt(r))){case 1:break e;case 2:a++;break e;default:this.balance[n]===a&&(a=n)}this.skip(a-this.tokenIndex)}forEachToken(e){for(let t=0,n=this.firstCharOffset;t<this.tokenCount;t++){let r=n,a=this.offsetAndType[t],o=a&_l;n=o,e(a>>zl,r,o,t)}}dump(){let e=new Array(this.tokenCount);return this.forEachToken(((t,n,r,a)=>{e[a]={idx:a,type:El[t],chunk:this.source.substring(n,r),balance:this.balance[a]}})),e}};function Pl(e,t){function n(t){return t<s?e.charCodeAt(t):0}function r(){return c=xl(e,c),ol(n(c),n(c+1),n(c+2))?(i=12,void(c=vl(e,c))):37===n(c)?(i=11,void c++):void(i=10)}function a(){let t=c;return c=vl(e,c),bl(e,t,c,"url")&&40===n(c)?(c=yl(e,c+1),34===n(c)||39===n(c)?(i=2,void(c=t+4)):void function(){for(i=7,c=yl(e,c);c<e.length;c++){let t=e.charCodeAt(c);switch(pl(t)){case 41:return void c++;case cl:return c=yl(e,c),41===n(c)||c>=e.length?void(c<e.length&&c++):(c=Al(e,c),void(i=8));case 34:case 39:case 40:case hl:return c=Al(e,c),void(i=8);case 92:if(al(t,n(c+1))){c=kl(e,c)-1;break}return c=Al(e,c),void(i=8)}}}()):40===n(c)?(i=2,void c++):void(i=1)}function o(t){for(t||(t=n(c++)),i=5;c<e.length;c++){let r=e.charCodeAt(c);switch(pl(r)){case t:return void c++;case cl:if(nl(r))return c+=fl(e,c,r),void(i=6);break;case 92:if(c===e.length-1)break;let a=n(c+1);nl(a)?c+=fl(e,c+1,a):al(r,a)&&(c=kl(e,c)-1)}}}let i,s=(e=String(e||"")).length,l=sl(n(0)),c=l;for(;c<s;){let s=e.charCodeAt(c);switch(pl(s)){case cl:i=13,c=yl(e,c+1);break;case 34:o();break;case 35:el(n(c+1))||al(n(c+1),n(c+2))?(i=4,c=vl(e,c+1)):(i=9,c++);break;case 39:o();break;case 40:i=21,c++;break;case 41:i=22,c++;break;case 43:il(s,n(c+1),n(c+2))?r():(i=9,c++);break;case 44:i=18,c++;break;case 45:il(s,n(c+1),n(c+2))?r():45===n(c+1)&&62===n(c+2)?(i=15,c+=3):ol(s,n(c+1),n(c+2))?a():(i=9,c++);break;case 46:il(s,n(c+1),n(c+2))?r():(i=9,c++);break;case 47:42===n(c+1)?(i=25,c=e.indexOf("*/",c+2),c=-1===c?e.length:c+2):(i=9,c++);break;case 58:i=16,c++;break;case 59:i=17,c++;break;case 60:33===n(c+1)&&45===n(c+2)&&45===n(c+3)?(i=14,c+=4):(i=9,c++);break;case 64:ol(n(c+1),n(c+2),n(c+3))?(i=3,c=vl(e,c+1)):(i=9,c++);break;case 91:i=19,c++;break;case 92:al(s,n(c+1))?a():(i=9,c++);break;case 93:i=20,c++;break;case 123:i=23,c++;break;case 125:i=24,c++;break;case ul:r();break;case dl:a();break;default:i=9,c++}t(i,l,l=c)}}var Dl=null,Nl=class{static createItem(e){return{prev:null,next:null,data:e}}constructor(){this.head=null,this.tail=null,this.cursor=null}createItem(e){return Nl.createItem(e)}allocateCursor(e,t){let n;return null!==Dl?(n=Dl,Dl=Dl.cursor,n.prev=e,n.next=t,n.cursor=this.cursor):n={prev:e,next:t,cursor:this.cursor},this.cursor=n,n}releaseCursor(){let{cursor:e}=this;this.cursor=e.cursor,e.prev=null,e.next=null,e.cursor=Dl,Dl=e}updateCursors(e,t,n,r){let{cursor:a}=this;for(;null!==a;)a.prev===e&&(a.prev=t),a.next===n&&(a.next=r),a=a.cursor}*[Symbol.iterator](){for(let e=this.head;null!==e;e=e.next)yield e.data}get size(){let e=0;for(let t=this.head;null!==t;t=t.next)e++;return e}get isEmpty(){return null===this.head}get first(){return this.head&&this.head.data}get last(){return this.tail&&this.tail.data}fromArray(e){let t=null;this.head=null;for(let n of e){let e=Nl.createItem(n);null!==t?t.next=e:this.head=e,e.prev=t,t=e}return this.tail=t,this}toArray(){return[...this]}toJSON(){return[...this]}forEach(e,t=this){let n=this.allocateCursor(null,this.head);for(;null!==n.next;){let r=n.next;n.next=r.next,e.call(t,r.data,r,this)}this.releaseCursor()}forEachRight(e,t=this){let n=this.allocateCursor(this.tail,null);for(;null!==n.prev;){let r=n.prev;n.prev=r.prev,e.call(t,r.data,r,this)}this.releaseCursor()}reduce(e,t,n=this){let r,a=this.allocateCursor(null,this.head),o=t;for(;null!==a.next;)r=a.next,a.next=r.next,o=e.call(n,o,r.data,r,this);return this.releaseCursor(),o}reduceRight(e,t,n=this){let r,a=this.allocateCursor(this.tail,null),o=t;for(;null!==a.prev;)r=a.prev,a.prev=r.prev,o=e.call(n,o,r.data,r,this);return this.releaseCursor(),o}some(e,t=this){for(let n=this.head;null!==n;n=n.next)if(e.call(t,n.data,n,this))return!0;return!1}map(e,t=this){let n=new Nl;for(let r=this.head;null!==r;r=r.next)n.appendData(e.call(t,r.data,r,this));return n}filter(e,t=this){let n=new Nl;for(let r=this.head;null!==r;r=r.next)e.call(t,r.data,r,this)&&n.appendData(r.data);return n}nextUntil(e,t,n=this){if(null===e)return;let r=this.allocateCursor(null,e);for(;null!==r.next;){let e=r.next;if(r.next=e.next,t.call(n,e.data,e,this))break}this.releaseCursor()}prevUntil(e,t,n=this){if(null===e)return;let r=this.allocateCursor(e,null);for(;null!==r.prev;){let e=r.prev;if(r.prev=e.prev,t.call(n,e.data,e,this))break}this.releaseCursor()}clear(){this.head=null,this.tail=null}copy(){let e=new Nl;for(let t of this)e.appendData(t);return e}prepend(e){return this.updateCursors(null,e,this.head,e),null!==this.head?(this.head.prev=e,e.next=this.head):this.tail=e,this.head=e,this}prependData(e){return this.prepend(Nl.createItem(e))}append(e){return this.insert(e)}appendData(e){return this.insert(Nl.createItem(e))}insert(e,t=null){if(null!==t)if(this.updateCursors(t.prev,e,t,e),null===t.prev){if(this.head!==t)throw new Error("before doesn't belong to list");this.head=e,t.prev=e,e.next=t,this.updateCursors(null,e)}else t.prev.next=e,e.prev=t.prev,t.prev=e,e.next=t;else this.updateCursors(this.tail,e,null,e),null!==this.tail?(this.tail.next=e,e.prev=this.tail):this.head=e,this.tail=e;return this}insertData(e,t){return this.insert(Nl.createItem(e),t)}remove(e){if(this.updateCursors(e,e.prev,e,e.next),null!==e.prev)e.prev.next=e.next;else{if(this.head!==e)throw new Error("item doesn't belong to list");this.head=e.next}if(null!==e.next)e.next.prev=e.prev;else{if(this.tail!==e)throw new Error("item doesn't belong to list");this.tail=e.prev}return e.prev=null,e.next=null,e}push(e){this.insert(Nl.createItem(e))}pop(){return null!==this.tail?this.remove(this.tail):null}unshift(e){this.prepend(Nl.createItem(e))}shift(){return null!==this.head?this.remove(this.head):null}prependList(e){return this.insertList(e,this.head)}appendList(e){return this.insertList(e)}insertList(e,t){return null===e.head||(null!=t?(this.updateCursors(t.prev,e.tail,t,e.head),null!==t.prev?(t.prev.next=e.head,e.head.prev=t.prev):this.head=e.head,t.prev=e.tail,e.tail.next=t):(this.updateCursors(this.tail,e.tail,null,e.head),null!==this.tail?(this.tail.next=e.head,e.head.prev=this.tail):this.head=e.head,this.tail=e.tail),e.head=null,e.tail=null),this}replace(e,t){"head"in t?this.insertList(t,e):this.insert(t,e),this.remove(e)}};function Ul(e,t){let n=Object.create(SyntaxError.prototype),r=new Error;return Object.assign(n,{name:e,message:t,get stack(){return(r.stack||"").replace(/^(.+\n){1,3}/,`${e}: ${t}\n`)}})}var Ml=100,Ol=60,Fl=" ";function ql({source:e,line:t,column:n},r){function a(e,t){return o.slice(e,t).map(((t,n)=>String(e+n+1).padStart(l)+" |"+t)).join("\n")}let o=e.split(/\r\n?|\n|\f/),i=Math.max(1,t-r)-1,s=Math.min(t+r,o.length+1),l=Math.max(4,String(s).length)+1,c=0;(n+=(Fl.length-1)*(o[t-1].substr(0,n-1).match(/\t/g)||[]).length)>Ml&&(c=n-Ol+3,n=Ol-2);for(let e=i;e<=s;e++)e>=0&&e<o.length&&(o[e]=o[e].replace(/\t/g,Fl),o[e]=(c>0&&o[e].length>c?"…":"")+o[e].substr(c,Ml-2)+(o[e].length>c+Ml-1?"…":""));return[a(i,t),new Array(n+l+2).join("-")+"^",a(t,s)].filter(Boolean).join("\n")}function Bl(e,t,n,r,a){return Object.assign(Ul("SyntaxError",e),{source:t,offset:n,line:r,column:a,sourceFragment:e=>ql({source:t,line:r,column:a},isNaN(e)?0:e),get formattedMessage(){return`Parse error: ${e}\n`+ql({source:t,line:r,column:a},2)}})}function jl(e){let t=this.createList(),n=!1,r={recognizer:e};for(;!this.eof;){switch(this.tokenType){case 25:this.next();continue;case 13:n=!0,this.next();continue}let a=e.getNode.call(this,r);if(void 0===a)break;n&&(e.onWhiteSpace&&e.onWhiteSpace.call(this,a,t,r),n=!1),t.push(a)}return n&&e.onWhiteSpace&&e.onWhiteSpace.call(this,null,t,r),t}var Hl=()=>{},Wl=33,Vl=35,Kl=59,$l=123,Gl=0;function Yl(e){return function(){return this[e]()}}function Jl(e){let t=Object.create(null);for(let n in e){let r=e[n],a=r.parse||r;a&&(t[n]=a)}return t}function Ql(e){let t="",n="<unknown>",r=!1,a=Hl,o=!1,i=new Rl,s=Object.assign(new Ll,function(e){let t={context:Object.create(null),scope:Object.assign(Object.create(null),e.scope),atrule:Jl(e.atrule),pseudo:Jl(e.pseudo),node:Jl(e.node)};for(let n in e.parseContext)switch(typeof e.parseContext[n]){case"function":t.context[n]=e.parseContext[n];break;case"string":t.context[n]=Yl(e.parseContext[n])}return{config:t,...t,...t.node}}(e||{}),{parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:jl,consumeUntilBalanceEnd:()=>0,consumeUntilLeftCurlyBracket:e=>e===$l?1:0,consumeUntilLeftCurlyBracketOrSemicolon:e=>e===$l||e===Kl?1:0,consumeUntilExclamationMarkOrSemicolon:e=>e===Wl||e===Kl?1:0,consumeUntilSemicolonIncluded:e=>e===Kl?2:0,createList:()=>new Nl,createSingleNodeList:e=>(new Nl).appendData(e),getFirstListNode:e=>e&&e.first,getLastListNode:e=>e&&e.last,parseWithFallback(e,t){let n=this.tokenIndex;try{return e.call(this)}catch(e){if(o)throw e;let r=t.call(this,n);return o=!0,a(e,r),o=!1,r}},lookupNonWSType(e){let t;do{if(t=this.lookupType(e++),13!==t)return t}while(t!==Gl);return Gl},charCodeAt:e=>e>=0&&e<t.length?t.charCodeAt(e):0,substring:(e,n)=>t.substring(e,n),substrToCursor(e){return this.source.substring(e,this.tokenStart)},cmpChar:(e,n)=>gl(t,e,n),cmpStr:(e,n,r)=>bl(t,e,n,r),consume(e){let t=this.tokenStart;return this.eat(e),this.substrToCursor(t)},consumeFunctionName(){let e=t.substring(this.tokenStart,this.tokenEnd-1);return this.eat(2),e},consumeNumber(e){let n=t.substring(this.tokenStart,xl(t,this.tokenStart));return this.eat(e),n},eat(e){if(this.tokenType!==e){let t=El[e].slice(0,-6).replace(/-/g," ").replace(/^./,(e=>e.toUpperCase())),n=`${/[[\](){}]/.test(t)?`"${t}"`:t} is expected`,r=this.tokenStart;switch(e){case 1:2===this.tokenType||7===this.tokenType?(r=this.tokenEnd-1,n="Identifier is expected but function found"):n="Identifier is expected";break;case 4:this.isDelim(Vl)&&(this.next(),r++,n="Name is expected");break;case 11:10===this.tokenType&&(r=this.tokenEnd,n="Percent sign is expected")}this.error(n,r)}this.next()},eatIdent(e){(1!==this.tokenType||!1===this.lookupValue(0,e))&&this.error(`Identifier "${e}" is expected`),this.next()},eatDelim(e){this.isDelim(e)||this.error(`Delim "${String.fromCharCode(e)}" is expected`),this.next()},getLocation:(e,t)=>r?i.getLocationRange(e,t,n):null,getLocationFromList(e){if(r){let t=this.getFirstListNode(e),r=this.getLastListNode(e);return i.getLocationRange(null!==t?t.loc.start.offset-i.startOffset:this.tokenStart,null!==r?r.loc.end.offset-i.startOffset:this.tokenStart,n)}return null},error(e,n){let r=typeof n<"u"&&n<t.length?i.getLocation(n):this.eof?i.getLocation(function(e,t){for(;t>=0&&rl(e.charCodeAt(t));t--);return t+1}(t,t.length-1)):i.getLocation(this.tokenStart);throw new Bl(e||"Unexpected input",t,r.offset,r.line,r.column)}});return Object.assign((function(e,l){t=e,l=l||{},s.setSource(t,Pl),i.setSource(t,l.offset,l.line,l.column),n=l.filename||"<unknown>",r=Boolean(l.positions),a="function"==typeof l.onParseError?l.onParseError:Hl,o=!1,s.parseAtrulePrelude=!("parseAtrulePrelude"in l)||Boolean(l.parseAtrulePrelude),s.parseRulePrelude=!("parseRulePrelude"in l)||Boolean(l.parseRulePrelude),s.parseValue=!("parseValue"in l)||Boolean(l.parseValue),s.parseCustomProperty="parseCustomProperty"in l&&Boolean(l.parseCustomProperty);let{context:c="default",onComment:u}=l;if(!(c in s.context))throw new Error("Unknown context `"+c+"`");"function"==typeof u&&s.forEachToken(((e,n,r)=>{if(25===e){let e=s.getLocation(n,r),a=bl(t,r-2,r,"*/")?t.slice(n+2,r-2):t.slice(n+2,r);u(a,e)}}));let d=s.context[c].call(s,l);return s.eof||s.error(),d}),{SyntaxError:Bl,config:s.config})}var Zl=((e,t,n)=>(n=null!=e?cs(ps(e)):{},((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let a of hs(t))!ms.call(e,a)&&a!==n&&us(e,a,{get:()=>t[a],enumerable:!(r=ds(t,a))||r.enumerable});return e})(!t&&e&&e.__esModule?n:us(n,"default",{value:e,enumerable:!0}),e)))(xs(),1),Xl=new Set(["Atrule","Selector","Declaration"]);var ec={};gs(ec,{safe:()=>ic,spec:()=>oc});var tc=(e,t)=>{if(9===e&&(e=t),"string"==typeof e){let t=e.charCodeAt(0);return t>127?32768:t<<8}return e},nc=[[1,1],[1,2],[1,7],[1,8],[1,"-"],[1,10],[1,11],[1,12],[1,15],[1,21],[3,1],[3,2],[3,7],[3,8],[3,"-"],[3,10],[3,11],[3,12],[3,15],[4,1],[4,2],[4,7],[4,8],[4,"-"],[4,10],[4,11],[4,12],[4,15],[12,1],[12,2],[12,7],[12,8],[12,"-"],[12,10],[12,11],[12,12],[12,15],["#",1],["#",2],["#",7],["#",8],["#","-"],["#",10],["#",11],["#",12],["#",15],["-",1],["-",2],["-",7],["-",8],["-","-"],["-",10],["-",11],["-",12],["-",15],[10,1],[10,2],[10,7],[10,8],[10,10],[10,11],[10,12],[10,"%"],[10,15],["@",1],["@",2],["@",7],["@",8],["@","-"],["@",15],[".",10],[".",11],[".",12],["+",10],["+",11],["+",12],["/","*"]],rc=nc.concat([[1,4],[12,4],[4,4],[3,21],[3,5],[3,16],[11,11],[11,12],[11,2],[11,"-"],[22,1],[22,2],[22,11],[22,12],[22,4],[22,"-"]]);function ac(e){let t=new Set(e.map((([e,t])=>tc(e)<<16|tc(t))));return function(e,n,r){let a=tc(n,r),o=r.charCodeAt(0);return(45===o&&1!==n&&2!==n&&15!==n||43===o?t.has(e<<16|o<<8):t.has(e<<16|a))&&this.emit(" ",13,!0),a}}var oc=ac(nc),ic=ac(rc),sc=92;function lc(e,t){if("function"!=typeof t)e.children.forEach(this.node,this);else{let n=null;e.children.forEach((e=>{null!==n&&t.call(this,n),this.node(e),n=e}))}}function cc(e){Pl(e,((t,n,r)=>{this.token(t,e.slice(n,r))}))}function uc(e){let t=new Map;for(let n in e.node){let r=e.node[n];"function"==typeof(r.generate||r)&&t.set(n,r.generate||r)}return function(e,n){let r="",a=0,o={node(e){if(!t.has(e.type))throw new Error("Unknown node type: "+e.type);t.get(e.type).call(i,e)},tokenBefore:ic,token(e,t){a=this.tokenBefore(a,e,t),this.emit(t,e,!1),9===e&&t.charCodeAt(0)===sc&&this.emit("\n",13,!0)},emit(e){r+=e},result:()=>r};n&&("function"==typeof n.decorator&&(o=n.decorator(o)),n.sourceMap&&(o=function(e){let t=new Zl.SourceMapGenerator,n={line:1,column:0},r={line:0,column:0},a={line:1,column:0},o={generated:a},i=1,s=0,l=!1,c=e.node;e.node=function(e){if(e.loc&&e.loc.start&&Xl.has(e.type)){let c=e.loc.start.line,u=e.loc.start.column-1;(r.line!==c||r.column!==u)&&(r.line=c,r.column=u,n.line=i,n.column=s,l&&(l=!1,(n.line!==a.line||n.column!==a.column)&&t.addMapping(o)),l=!0,t.addMapping({source:e.loc.source,original:r,generated:n}))}c.call(this,e),l&&Xl.has(e.type)&&(a.line=i,a.column=s)};let u=e.emit;e.emit=function(e,t,n){for(let t=0;t<e.length;t++)10===e.charCodeAt(t)?(i++,s=0):s++;u(e,t,n)};let d=e.result;return e.result=function(){return l&&t.addMapping(o),{css:d(),map:t}},e}(o)),n.mode in ec&&(o.tokenBefore=ec[n.mode]));let i={node:e=>o.node(e),children:lc,token:(e,t)=>o.token(e,t),tokenize:cc};return o.node(e),o.result()}}var{hasOwnProperty:dc}=Object.prototype,hc=function(){};function pc(e){return"function"==typeof e?e:hc}function mc(e,t){return function(n,r,a){n.type===t&&e.call(this,n,r,a)}}function fc(e,t){let n=t.structure,r=[];for(let e in n){if(!1===dc.call(n,e))continue;let t=n[e],a={name:e,type:!1,nullable:!1};Array.isArray(t)||(t=[t]);for(let e of t)null===e?a.nullable=!0:"string"==typeof e?a.type="node":Array.isArray(e)&&(a.type="list");a.type&&r.push(a)}return r.length?{context:t.walkContext,fields:r}:null}function gc(e,t){let n=e.fields.slice(),r=e.context,a="string"==typeof r;return t&&n.reverse(),function(e,o,i,s){let l;a&&(l=o[r],o[r]=e);for(let r of n){let n=e[r.name];if(!r.nullable||n)if("list"===r.type){if(t?n.reduceRight(s,!1):n.reduce(s,!1))return!0}else if(i(n))return!0}a&&(o[r]=l)}}function bc({StyleSheet:e,Atrule:t,Rule:n,Block:r,DeclarationList:a}){return{Atrule:{StyleSheet:e,Atrule:t,Rule:n,Block:r},Rule:{StyleSheet:e,Atrule:t,Rule:n,Block:r},Declaration:{StyleSheet:e,Atrule:t,Rule:n,Block:r,DeclarationList:a}}}function yc(e){let t=function(e){let t={};for(let n in e.node)if(dc.call(e.node,n)){let r=e.node[n];if(!r.structure)throw new Error("Missed `structure` field in `"+n+"` node type definition");t[n]=fc(0,r)}return t}(e),n={},r={},a=Symbol("break-walk"),o=Symbol("skip-node");for(let e in t)dc.call(t,e)&&null!==t[e]&&(n[e]=gc(t[e],!1),r[e]=gc(t[e],!0));let i=bc(n),s=bc(r),l=function(e,l){function c(e,t,n){let r=u.call(m,e,t,n);return r===a||r!==o&&!!(h.hasOwnProperty(e.type)&&h[e.type](e,m,c,p)||d.call(m,e,t,n)===a)}let u=hc,d=hc,h=n,p=(e,t,n,r)=>e||c(t,n,r),m={break:a,skip:o,root:e,stylesheet:null,atrule:null,atrulePrelude:null,rule:null,selector:null,block:null,declaration:null,function:null};if("function"==typeof l)u=l;else if(l&&(u=pc(l.enter),d=pc(l.leave),l.reverse&&(h=r),l.visit)){if(i.hasOwnProperty(l.visit))h=l.reverse?s[l.visit]:i[l.visit];else if(!t.hasOwnProperty(l.visit))throw new Error("Bad value `"+l.visit+"` for `visit` option (should be: "+Object.keys(t).sort().join(", ")+")");u=mc(u,l.visit),d=mc(d,l.visit)}if(u===hc&&d===hc)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");c(e)};return l.break=a,l.skip=o,l.find=function(e,t){let n=null;return l(e,(function(e,r,o){if(t.call(this,e,r,o))return n=e,a})),n},l.findLast=function(e,t){let n=null;return l(e,{reverse:!0,enter(e,r,o){if(t.call(this,e,r,o))return n=e,a}}),n},l.findAll=function(e,t){let n=[];return l(e,(function(e,r,a){t.call(this,e,r,a)&&n.push(e)})),n},l}function wc(e){return e}function kc(e,t,n,r){let a;switch(e.type){case"Group":a=function(e,t,n,r){let a=" "===e.combinator||r?e.combinator:" "+e.combinator+" ",o=e.terms.map((e=>kc(e,t,n,r))).join(a);return e.explicit||n?(r||","===o[0]?"[":"[ ")+o+(r?"]":" ]"):o}(e,t,n,r)+(e.disallowEmpty?"!":"");break;case"Multiplier":return kc(e.term,t,n,r)+t(function(e){let{min:t,max:n,comma:r}=e;return 0===t&&0===n?r?"#?":"*":0===t&&1===n?"?":1===t&&0===n?r?"#":"+":1===t&&1===n?"":(r?"#":"")+(t===n?"{"+t+"}":"{"+t+","+(0!==n?n:"")+"}")}(e),e);case"Type":a="<"+e.name+(e.opts?t(function(e){if("Range"===e.type)return" ["+(null===e.min?"-∞":e.min)+","+(null===e.max?"∞":e.max)+"]";throw new Error("Unknown node type `"+e.type+"`")}(e.opts),e.opts):"")+">";break;case"Property":a="<'"+e.name+"'>";break;case"Keyword":a=e.name;break;case"AtKeyword":a="@"+e.name;break;case"Function":a=e.name+"(";break;case"String":case"Token":a=e.value;break;case"Comma":a=",";break;default:throw new Error("Unknown node type `"+e.type+"`")}return t(a,e)}function vc(e,t){let n=wc,r=!1,a=!1;return"function"==typeof t?n=t:t&&(r=Boolean(t.forceBraces),a=Boolean(t.compact),"function"==typeof t.decorate&&(n=t.decorate)),kc(e,n,r,a)}var xc={offset:0,line:1,column:1};function Ac(e,t){let n=e&&e.loc&&e.loc[t];return n?"line"in n?Sc(n):n:null}function Sc({offset:e,line:t,column:n},r){let a={offset:e,line:t,column:n};if(r){let e=r.split(/\n|\r\n?|\f/);a.offset+=r.length,a.line+=e.length-1,a.column=1===e.length?a.column+r.length:e.pop().length+1}return a}var Ec=function(e,t){let n=Ul("SyntaxReferenceError",e+(t?" `"+t+"`":""));return n.reference=t,n},Tc=function(e,t,n,r){let a=Ul("SyntaxMatchError",e),{css:o,mismatchOffset:i,mismatchLength:s,start:l,end:c}=function(e,t){let n,r,a=e.tokens,o=e.longestMatch,i=o<a.length&&a[o].node||null,s=i!==t?i:null,l=0,c=0,u=0,d="";for(let e=0;e<a.length;e++){let t=a[e].value;e===o&&(c=t.length,l=d.length),null!==s&&a[e].node===s&&(e<=o?u++:u=0),d+=t}return o===a.length||u>1?(n=Ac(s||t,"end")||Sc(xc,d),r=Sc(n)):(n=Ac(s,"start")||Sc(Ac(t,"start")||xc,d.slice(0,l)),r=Ac(s,"end")||Sc(n,d.substr(l,c))),{css:d,mismatchOffset:l,mismatchLength:c,start:n,end:r}}(r,n);return a.rawMessage=e,a.syntax=t?vc(t):"<generic>",a.css=o,a.mismatchOffset=i,a.mismatchLength=s,a.message=e+"\n syntax: "+a.syntax+"\n value: "+(o||"<empty string>")+"\n --------"+new Array(a.mismatchOffset+1).join("-")+"^",Object.assign(a,l),a.loc={source:n&&n.loc&&n.loc.source||"<unknown>",start:l,end:c},a},Cc=new Map,Rc=new Map,_c=45,zc=function(e){if(Cc.has(e))return Cc.get(e);let t=e.toLowerCase(),n=Cc.get(t);if(void 0===n){let e=Pc(t,0),r=e?"":Dc(t,0);n=Object.freeze({basename:t.substr(r.length),name:t,prefix:r,vendor:r,custom:e})}return Cc.set(e,n),n},Ic=function(e){if(Rc.has(e))return Rc.get(e);let t=e,n=e[0];"/"===n?n="/"===e[1]?"//":"/":"_"!==n&&"*"!==n&&"$"!==n&&"#"!==n&&"+"!==n&&"&"!==n&&(n="");let r=Pc(t,n.length);if(!r&&(t=t.toLowerCase(),Rc.has(t))){let n=Rc.get(t);return Rc.set(e,n),n}let a=r?"":Dc(t,n.length),o=t.substr(0,n.length+a.length),i=Object.freeze({basename:t.substr(o.length),name:t.substr(n.length),hack:n,vendor:a,prefix:o,custom:r});return Rc.set(e,i),i},Lc=Dc;function Pc(e,t){return t=t||0,e.length-t>=2&&e.charCodeAt(t)===_c&&e.charCodeAt(t+1)===_c}function Dc(e,t){if(t=t||0,e.length-t>=3&&e.charCodeAt(t)===_c&&e.charCodeAt(t+1)!==_c){let n=e.indexOf("-",t+2);if(-1!==n)return e.substring(t,n+1)}return""}var Nc=["initial","inherit","unset","revert","revert-layer"],Uc=43,Mc=45,Oc=!0;function Fc(e,t){return null!==e&&9===e.type&&e.value.charCodeAt(0)===t}function qc(e,t,n){for(;null!==e&&(13===e.type||25===e.type);)e=n(++t);return t}function Bc(e,t,n,r){if(!e)return 0;let a=e.value.charCodeAt(t);if(a===Uc||a===Mc){if(n)return 0;t++}for(;t<e.value.length;t++)if(!Js(e.value.charCodeAt(t)))return 0;return r+1}function jc(e,t,n){let r=!1,a=qc(e,t,n);if(null===(e=n(a)))return t;if(10!==e.type){if(!Fc(e,Uc)&&!Fc(e,Mc))return t;if(r=!0,a=qc(n(++a),a,n),null===(e=n(a))||10!==e.type)return 0}if(!r){let t=e.value.charCodeAt(0);if(t!==Uc&&t!==Mc)return 0}return Bc(e,r?0:1,r,a)}var Hc=45,Wc=63;function Vc(e,t){return null!==e&&9===e.type&&e.value.charCodeAt(0)===t}function Kc(e,t,n){let r=0;for(let a=t;a<e.value.length;a++){let o=e.value.charCodeAt(a);if(o===Hc&&n&&0!==r)return Kc(e,t+r+1,!1),6;if(!Qs(o)||++r>6)return 0}return r}function $c(e,t,n){if(!e)return 0;for(;Vc(n(t),Wc);){if(++e>6)return 0;t++}return t}var Gc=["calc(","-moz-calc(","-webkit-calc("],Yc=new Map([[2,22],[21,22],[19,20],[23,24]]);function Jc(e,t){return t<e.length?e.charCodeAt(t):0}function Qc(e,t){return bl(e,0,e.length,t)}function Zc(e,t){for(let n=0;n<t.length;n++)if(Qc(e,t[n]))return!0;return!1}function Xc(e,t){return t===e.length-2&&(92===Jc(e,t)&&Js(Jc(e,t+1)))}function eu(e,t,n){if(e&&"Range"===e.type){let r=Number(void 0!==n&&n!==t.length?t.substr(0,n):t);if(isNaN(r)||null!==e.min&&r<e.min&&"string"!=typeof e.min||null!==e.max&&r>e.max&&"string"!=typeof e.max)return!0}return!1}function tu(e){return function(t,n,r){return null===t?0:2===t.type&&Zc(t.value,Gc)?function(e,t){let n=0,r=[],a=0;e:do{switch(e.type){case 24:case 22:case 20:if(e.type!==n)break e;if(n=r.pop(),0===r.length){a++;break e}break;case 2:case 21:case 19:case 23:r.push(n),n=Yc.get(e.type)}a++}while(e=t(a));return a}(t,n):e(t,n,r)}}function nu(e){return function(t){return null===t||t.type!==e?0:1}}function ru(e){return e&&(e=new Set(e)),function(t,n,r){if(null===t||12!==t.type)return 0;let a=xl(t.value,0);if(null!==e){let n=t.value.indexOf("\\",a),r=-1!==n&&Xc(t.value,n)?t.value.substring(a,n):t.value.substr(a);if(!1===e.has(r.toLowerCase()))return 0}return eu(r,t.value,a)?0:1}}function au(e){return"function"!=typeof e&&(e=function(){return 0}),function(t,n,r){return null!==t&&10===t.type&&0===Number(t.value)?1:e(t,n,r)}}var ou={"ident-token":nu(1),"function-token":nu(2),"at-keyword-token":nu(3),"hash-token":nu(4),"string-token":nu(5),"bad-string-token":nu(6),"url-token":nu(7),"bad-url-token":nu(8),"delim-token":nu(9),"number-token":nu(10),"percentage-token":nu(11),"dimension-token":nu(12),"whitespace-token":nu(13),"CDO-token":nu(14),"CDC-token":nu(15),"colon-token":nu(16),"semicolon-token":nu(17),"comma-token":nu(18),"[-token":nu(19),"]-token":nu(20),"(-token":nu(21),")-token":nu(22),"{-token":nu(23),"}-token":nu(24)},iu={string:nu(5),ident:nu(1),percentage:tu((function(e,t,n){return null===e||11!==e.type||eu(n,e.value,e.value.length-1)?0:1})),zero:au(),number:tu((function(e,t,n){if(null===e)return 0;let r=xl(e.value,0);return r!==e.value.length&&!Xc(e.value,r)||eu(n,e.value,r)?0:1})),integer:tu((function(e,t,n){if(null===e||10!==e.type)return 0;let r=43===Jc(e.value,0)||45===Jc(e.value,0)?1:0;for(;r<e.value.length;r++)if(!Js(Jc(e.value,r)))return 0;return eu(n,e.value,r)?0:1})),"custom-ident":function(e){if(null===e||1!==e.type)return 0;let t=e.value.toLowerCase();return Zc(t,Nc)||Qc(t,"default")?0:1},"custom-property-name":function(e){return null===e||1!==e.type||45!==Jc(e.value,0)||45!==Jc(e.value,1)?0:1},"hex-color":function(e){if(null===e||4!==e.type)return 0;let t=e.value.length;if(4!==t&&5!==t&&7!==t&&9!==t)return 0;for(let n=1;n<t;n++)if(!Qs(Jc(e.value,n)))return 0;return 1},"id-selector":function(e){return null!==e&&4===e.type&&ol(Jc(e.value,1),Jc(e.value,2),Jc(e.value,3))?1:0},"an-plus-b":function(e,t){let n=0;if(!e)return 0;if(10===e.type)return Bc(e,0,false,n);if(1===e.type&&e.value.charCodeAt(0)===Mc){if(!gl(e.value,1,110))return 0;switch(e.value.length){case 2:return jc(t(++n),n,t);case 3:return e.value.charCodeAt(2)!==Mc?0:(n=qc(t(++n),n,t),Bc(e=t(n),0,Oc,n));default:return e.value.charCodeAt(2)!==Mc?0:Bc(e,3,Oc,n)}}else if(1===e.type||Fc(e,Uc)&&1===t(n+1).type){if(1!==e.type&&(e=t(++n)),null===e||!gl(e.value,0,110))return 0;switch(e.value.length){case 1:return jc(t(++n),n,t);case 2:return e.value.charCodeAt(1)!==Mc?0:(n=qc(t(++n),n,t),Bc(e=t(n),0,Oc,n));default:return e.value.charCodeAt(1)!==Mc?0:Bc(e,2,Oc,n)}}else if(12===e.type){let r=e.value.charCodeAt(0),a=r===Uc||r===Mc?1:0,o=a;for(;o<e.value.length&&Js(e.value.charCodeAt(o));o++);return o!==a&&gl(e.value,o,110)?o+1===e.value.length?jc(t(++n),n,t):e.value.charCodeAt(o+1)!==Mc?0:o+2===e.value.length?(n=qc(t(++n),n,t),Bc(e=t(n),0,Oc,n)):Bc(e,o+2,Oc,n):0}return 0},urange:function(e,t){let n=0;if(null===e||1!==e.type||!gl(e.value,0,117)||null===(e=t(++n)))return 0;if(Vc(e,43))return null===(e=t(++n))?0:1===e.type?$c(Kc(e,0,!0),++n,t):Vc(e,Wc)?$c(1,++n,t):0;if(10===e.type){let r=Kc(e,1,!0);return 0===r?0:null===(e=t(++n))?n:12===e.type||10===e.type?function(e,t){return e.value.charCodeAt(0)===t}(e,Hc)&&Kc(e,1,!1)?n+1:0:$c(r,n,t)}return 12===e.type?$c(Kc(e,1,!0),++n,t):0},"declaration-value":function(e,t){if(!e)return 0;let n=0,r=[],a=0;e:do{switch(e.type){case 6:case 8:break e;case 24:case 22:case 20:if(e.type!==n)break e;n=r.pop();break;case 17:if(0===n)break e;break;case 9:if(0===n&&"!"===e.value)break e;break;case 2:case 21:case 19:case 23:r.push(n),n=Yc.get(e.type)}a++}while(e=t(a));return a},"any-value":function(e,t){if(!e)return 0;let n=0,r=[],a=0;e:do{switch(e.type){case 6:case 8:break e;case 24:case 22:case 20:if(e.type!==n)break e;n=r.pop();break;case 2:case 21:case 19:case 23:r.push(n),n=Yc.get(e.type)}a++}while(e=t(a));return a}};function su(e){let{angle:t,decibel:n,frequency:r,flex:a,length:o,resolution:i,semitones:s,time:l}=e||{};return{dimension:tu(ru(null)),angle:tu(ru(t)),decibel:tu(ru(n)),frequency:tu(ru(r)),flex:tu(ru(a)),length:tu(au(ru(o))),resolution:tu(ru(i)),semitones:tu(ru(s)),time:tu(ru(l))}}var lu={};gs(lu,{angle:()=>uu,decibel:()=>fu,flex:()=>mu,frequency:()=>hu,length:()=>cu,resolution:()=>pu,semitones:()=>gu,time:()=>du});var cu=["cm","mm","q","in","pt","pc","px","em","rem","ex","rex","cap","rcap","ch","rch","ic","ric","lh","rlh","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax","cqw","cqh","cqi","cqb","cqmin","cqmax"],uu=["deg","grad","rad","turn"],du=["s","ms"],hu=["hz","khz"],pu=["dpi","dpcm","dppx","x"],mu=["fr"],fu=["db"],gu=["st"],bu={};function yu(e,t,n){return Object.assign(Ul("SyntaxError",e),{input:t,offset:n,rawMessage:e,message:e+"\n "+t+"\n--"+new Array((n||t.length)+1).join("-")+"^"})}gs(bu,{SyntaxError:()=>yu,generate:()=>vc,parse:()=>ad,walk:()=>sd});var wu=class{constructor(e){this.str=e,this.pos=0}charCodeAt(e){return e<this.str.length?this.str.charCodeAt(e):0}charCode(){return this.charCodeAt(this.pos)}nextCharCode(){return this.charCodeAt(this.pos+1)}nextNonWsCode(e){return this.charCodeAt(this.findWsEnd(e))}findWsEnd(e){for(;e<this.str.length;e++){let t=this.str.charCodeAt(e);if(13!==t&&10!==t&&12!==t&&32!==t&&9!==t)break}return e}substringToPos(e){return this.str.substring(this.pos,this.pos=e)}eat(e){this.charCode()!==e&&this.error("Expect `"+String.fromCharCode(e)+"`"),this.pos++}peek(){return this.pos<this.str.length?this.str.charAt(this.pos++):""}error(e){throw new yu(e,this.str,this.pos)}},ku=9,vu=10,xu=12,Au=13,Su=32,Eu=33,Tu=35,Cu=38,Ru=39,_u=40,zu=41,Iu=42,Lu=43,Pu=44,Du=45,Nu=60,Uu=62,Mu=63,Ou=64,Fu=91,qu=93,Bu=123,ju=124,Hu=125,Wu=8734,Vu=new Uint8Array(128).map(((e,t)=>/[a-zA-Z0-9\-]/.test(String.fromCharCode(t))?1:0)),Ku={" ":1,"&&":2,"||":3,"|":4};function $u(e){return e.substringToPos(e.findWsEnd(e.pos))}function Gu(e){let t=e.pos;for(;t<e.str.length;t++){let n=e.str.charCodeAt(t);if(n>=128||0===Vu[n])break}return e.pos===t&&e.error("Expect a keyword"),e.substringToPos(t)}function Yu(e){let t=e.pos;for(;t<e.str.length;t++){let n=e.str.charCodeAt(t);if(n<48||n>57)break}return e.pos===t&&e.error("Expect a number"),e.substringToPos(t)}function Ju(e){let t=e.str.indexOf("'",e.pos+1);return-1===t&&(e.pos=e.str.length,e.error("Expect an apostrophe")),e.substringToPos(t+1)}function Qu(e){let t=null,n=null;return e.eat(Bu),t=Yu(e),e.charCode()===Pu?(e.pos++,e.charCode()!==Hu&&(n=Yu(e))):n=t,e.eat(Hu),{min:Number(t),max:n?Number(n):0}}function Zu(e,t){let n=function(e){let t=null,n=!1;switch(e.charCode()){case Iu:e.pos++,t={min:0,max:0};break;case Lu:e.pos++,t={min:1,max:0};break;case Mu:e.pos++,t={min:0,max:1};break;case Tu:e.pos++,n=!0,e.charCode()===Bu?t=Qu(e):e.charCode()===Mu?(e.pos++,t={min:0,max:0}):t={min:1,max:0};break;case Bu:t=Qu(e);break;default:return null}return{type:"Multiplier",comma:n,min:t.min,max:t.max,term:null}}(e);return null!==n?(n.term=t,e.charCode()===Tu&&e.charCodeAt(e.pos-1)===Lu?Zu(e,n):n):t}function Xu(e){let t=e.peek();return""===t?null:{type:"Token",value:t}}function ed(e){let t,n=null;return e.eat(Nu),t=Gu(e),e.charCode()===_u&&e.nextCharCode()===zu&&(e.pos+=2,t+="()"),e.charCodeAt(e.findWsEnd(e.pos))===Fu&&($u(e),n=function(e){let t=null,n=null,r=1;return e.eat(Fu),e.charCode()===Du&&(e.peek(),r=-1),-1==r&&e.charCode()===Wu?e.peek():(t=r*Number(Yu(e)),0!==Vu[e.charCode()]&&(t+=Gu(e))),$u(e),e.eat(Pu),$u(e),e.charCode()===Wu?e.peek():(r=1,e.charCode()===Du&&(e.peek(),r=-1),n=r*Number(Yu(e)),0!==Vu[e.charCode()]&&(n+=Gu(e))),e.eat(qu),{type:"Range",min:t,max:n}}(e)),e.eat(Uu),Zu(e,{type:"Type",name:t,opts:n})}function td(e,t){function n(e,t){return{type:"Group",terms:e,combinator:t,disallowEmpty:!1,explicit:!1}}let r;for(t=Object.keys(t).sort(((e,t)=>Ku[e]-Ku[t]));t.length>0;){r=t.shift();let a=0,o=0;for(;a<e.length;a++){let t=e[a];"Combinator"===t.type&&(t.value===r?(-1===o&&(o=a-1),e.splice(a,1),a--):(-1!==o&&a-o>1&&(e.splice(o,a-o,n(e.slice(o,a),r)),a=o+1),o=-1))}-1!==o&&t.length&&e.splice(o,a-o,n(e.slice(o,a),r))}return r}function nd(e){let t,n=[],r={},a=null,o=e.pos;for(;t=rd(e);)"Spaces"!==t.type&&("Combinator"===t.type?((null===a||"Combinator"===a.type)&&(e.pos=o,e.error("Unexpected combinator")),r[t.value]=!0):null!==a&&"Combinator"!==a.type&&(r[" "]=!0,n.push({type:"Combinator",value:" "})),n.push(t),a=t,o=e.pos);return null!==a&&"Combinator"===a.type&&(e.pos-=o,e.error("Unexpected combinator")),{type:"Group",terms:n,combinator:td(n,r)||" ",disallowEmpty:!1,explicit:!1}}function rd(e){let t=e.charCode();if(t<128&&1===Vu[t])return function(e){let t=Gu(e);return e.charCode()===_u?(e.pos++,{type:"Function",name:t}):Zu(e,{type:"Keyword",name:t})}(e);switch(t){case qu:break;case Fu:return Zu(e,function(e){let t;return e.eat(Fu),t=nd(e),e.eat(qu),t.explicit=!0,e.charCode()===Eu&&(e.pos++,t.disallowEmpty=!0),t}(e));case Nu:return e.nextCharCode()===Ru?function(e){let t;return e.eat(Nu),e.eat(Ru),t=Gu(e),e.eat(Ru),e.eat(Uu),Zu(e,{type:"Property",name:t})}(e):ed(e);case ju:return{type:"Combinator",value:e.substringToPos(e.pos+(e.nextCharCode()===ju?2:1))};case Cu:return e.pos++,e.eat(Cu),{type:"Combinator",value:"&&"};case Pu:return e.pos++,{type:"Comma"};case Ru:return Zu(e,{type:"String",value:Ju(e)});case Su:case ku:case vu:case Au:case xu:return{type:"Spaces",value:$u(e)};case Ou:return t=e.nextCharCode(),t<128&&1===Vu[t]?(e.pos++,{type:"AtKeyword",name:Gu(e)}):Xu(e);case Iu:case Lu:case Mu:case Tu:case Eu:break;case Bu:if(t=e.nextCharCode(),t<48||t>57)return Xu(e);break;default:return Xu(e)}}function ad(e){let t=new wu(e),n=nd(t);return t.pos!==e.length&&t.error("Unexpected input"),1===n.terms.length&&"Group"===n.terms[0].type?n.terms[0]:n}var od=function(){};function id(e){return"function"==typeof e?e:od}function sd(e,t,n){let r=od,a=od;if("function"==typeof t?r=t:t&&(r=id(t.enter),a=id(t.leave)),r===od&&a===od)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");!function e(t){switch(r.call(n,t),t.type){case"Group":t.terms.forEach(e);break;case"Multiplier":e(t.term);break;case"Type":case"Property":case"Keyword":case"AtKeyword":case"Function":case"String":case"Token":case"Comma":break;default:throw new Error("Unknown type: "+t.type)}a.call(n,t)}(e)}var ld={decorator(e){let t=[],n=null;return{...e,node(t){let r=n;n=t,e.node.call(this,t),n=r},emit(e,r,a){t.push({type:r,value:e,node:a?null:n})},result:()=>t}}};function cd(e,t){return"string"==typeof e?function(e){let t=[];return Pl(e,((n,r,a)=>t.push({type:n,value:e.slice(r,a),node:null}))),t}(e):t.generate(e,ld)}var ud={type:"Match"},dd={type:"Mismatch"},hd={type:"DisallowEmpty"},pd=40,md=41;function fd(e,t,n){return t===ud&&n===dd||e===ud&&t===ud&&n===ud?e:("If"===e.type&&e.else===dd&&t===ud&&(t=e.then,e=e.match),{type:"If",match:e,then:t,else:n})}function gd(e){return e.length>2&&e.charCodeAt(e.length-2)===pd&&e.charCodeAt(e.length-1)===md}function bd(e){return"Keyword"===e.type||"AtKeyword"===e.type||"Function"===e.type||"Type"===e.type&&gd(e.name)}function yd(e,t,n){switch(e){case" ":{let e=ud;for(let n=t.length-1;n>=0;n--){e=fd(t[n],e,dd)}return e}case"|":{let e=dd,n=null;for(let r=t.length-1;r>=0;r--){let a=t[r];if(bd(a)&&(null===n&&r>0&&bd(t[r-1])&&(n=Object.create(null),e=fd({type:"Enum",map:n},ud,e)),null!==n)){let e=(gd(a.name)?a.name.slice(0,-1):a.name).toLowerCase();if(!(e in n)){n[e]=a;continue}}n=null,e=fd(a,ud,e)}return e}case"&&":{if(t.length>5)return{type:"MatchOnce",terms:t,all:!0};let n=dd;for(let r=t.length-1;r>=0;r--){let a,o=t[r];a=t.length>1?yd(e,t.filter((function(e){return e!==o})),!1):ud,n=fd(o,a,n)}return n}case"||":{if(t.length>5)return{type:"MatchOnce",terms:t,all:!1};let r=n?ud:dd;for(let n=t.length-1;n>=0;n--){let a,o=t[n];a=t.length>1?yd(e,t.filter((function(e){return e!==o})),!0):ud,r=fd(o,a,r)}return r}}}function wd(e){if("function"==typeof e)return{type:"Generic",fn:e};switch(e.type){case"Group":{let t=yd(e.combinator,e.terms.map(wd),!1);return e.disallowEmpty&&(t=fd(t,hd,dd)),t}case"Multiplier":return function(e){let t=ud,n=wd(e.term);if(0===e.max)n=fd(n,hd,dd),t=fd(n,null,dd),t.then=fd(ud,ud,t),e.comma&&(t.then.else=fd({type:"Comma",syntax:e},t,dd));else for(let r=e.min||1;r<=e.max;r++)e.comma&&t!==ud&&(t=fd({type:"Comma",syntax:e},t,dd)),t=fd(n,fd(ud,ud,t),dd);if(0===e.min)t=fd(ud,ud,t);else for(let r=0;r<e.min-1;r++)e.comma&&t!==ud&&(t=fd({type:"Comma",syntax:e},t,dd)),t=fd(n,t,dd);return t}(e);case"Type":case"Property":return{type:e.type,name:e.name,syntax:e};case"Keyword":return{type:e.type,name:e.name.toLowerCase(),syntax:e};case"AtKeyword":return{type:e.type,name:"@"+e.name.toLowerCase(),syntax:e};case"Function":return{type:e.type,name:e.name.toLowerCase()+"(",syntax:e};case"String":return 3===e.value.length?{type:"Token",value:e.value.charAt(1),syntax:e}:{type:e.type,value:e.value.substr(1,e.value.length-2).replace(/\\'/g,"'"),syntax:e};case"Token":return{type:e.type,value:e.value,syntax:e};case"Comma":return{type:e.type,syntax:e};default:throw new Error("Unknown node type:",e.type)}}function kd(e,t){return"string"==typeof e&&(e=ad(e)),{type:"MatchGraph",match:wd(e),syntax:t||null,source:e}}var{hasOwnProperty:vd}=Object.prototype,xd=0,Ad=1,Sd=2,Ed=3,Td="Match",Cd="Mismatch",Rd="Maximum iteration number exceeded (please fill an issue on https://github.com/csstree/csstree/issues)",_d=15e3;function zd(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++){let r=t.charCodeAt(n),a=e.charCodeAt(n);if(a>=65&&a<=90&&(a|=32),a!==r)return!1}return!0}function Id(e){return null===e||(18===e.type||2===e.type||21===e.type||19===e.type||23===e.type||function(e){return 9===e.type&&"?"!==e.value}(e))}function Ld(e){return null===e||(22===e.type||20===e.type||24===e.type||9===e.type&&"/"===e.value)}function Pd(e,t,n){let r=function(e,t,n){function r(){do{b++,g=b<e.length?e[b]:null}while(null!==g&&(13===g.type||25===g.type))}function a(t){let n=b+t;return n<e.length?e[n]:null}function o(e,t){return{nextState:e,matchStack:w,syntaxStack:u,thenStack:d,tokenIndex:b,prev:t}}function i(e){d={nextState:e,matchStack:w,syntaxStack:u,prev:d}}function s(e){h=o(e,h)}function l(){w={type:Ad,syntax:t.syntax,token:g,prev:w},r(),p=null,b>y&&(y=b)}function c(){w=w.type===Sd?w.prev:{type:Ed,syntax:u.syntax,token:w.token,prev:w},u=u.prev}let u=null,d=null,h=null,p=null,m=0,f=null,g=null,b=-1,y=0,w={type:xd,syntax:null,token:null,prev:null};for(r();null===f&&++m<_d;)switch(t.type){case"Match":if(null===d){if(null!==g&&(b!==e.length-1||"\\0"!==g.value&&"\\9"!==g.value)){t=dd;break}f=Td;break}if((t=d.nextState)===hd){if(d.matchStack===w){t=dd;break}t=ud}for(;d.syntaxStack!==u;)c();d=d.prev;break;case"Mismatch":if(null!==p&&!1!==p)(null===h||b>h.tokenIndex)&&(h=p,p=!1);else if(null===h){f=Cd;break}t=h.nextState,d=h.thenStack,u=h.syntaxStack,w=h.matchStack,b=h.tokenIndex,g=b<e.length?e[b]:null,h=h.prev;break;case"MatchGraph":t=t.match;break;case"If":t.else!==dd&&s(t.else),t.then!==ud&&i(t.then),t=t.match;break;case"MatchOnce":t={type:"MatchOnceBuffer",syntax:t,index:0,mask:0};break;case"MatchOnceBuffer":{let e=t.syntax.terms;if(t.index===e.length){if(0===t.mask||t.syntax.all){t=dd;break}t=ud;break}if(t.mask===(1<<e.length)-1){t=ud;break}for(;t.index<e.length;t.index++){let n=1<<t.index;if(0==(t.mask&n)){s(t),i({type:"AddMatchOnce",syntax:t.syntax,mask:t.mask|n}),t=e[t.index++];break}}break}case"AddMatchOnce":t={type:"MatchOnceBuffer",syntax:t.syntax,index:0,mask:t.mask};break;case"Enum":if(null!==g){let e=g.value.toLowerCase();if(-1!==e.indexOf("\\")&&(e=e.replace(/\\[09].*$/,"")),vd.call(t.map,e)){t=t.map[e];break}}t=dd;break;case"Generic":{let e=null!==u?u.opts:null,n=b+Math.floor(t.fn(g,a,e));if(!isNaN(n)&&n>b){for(;b<n;)l();t=ud}else t=dd;break}case"Type":case"Property":{let e="Type"===t.type?"types":"properties",r=vd.call(n,e)?n[e][t.name]:null;if(!r||!r.match)throw new Error("Bad syntax reference: "+("Type"===t.type?"<"+t.name+">":"<'"+t.name+"'>"));if(!1!==p&&null!==g&&"Type"===t.type&&("custom-ident"===t.name&&1===g.type||"length"===t.name&&"0"===g.value)){null===p&&(p=o(t,h)),t=dd;break}u={syntax:t.syntax,opts:t.syntax.opts||null!==u&&u.opts||null,prev:u},w={type:Sd,syntax:t.syntax,token:w.token,prev:w},t=r.match;break}case"Keyword":{let e=t.name;if(null!==g){let n=g.value;if(-1!==n.indexOf("\\")&&(n=n.replace(/\\[09].*$/,"")),zd(n,e)){l(),t=ud;break}}t=dd;break}case"AtKeyword":case"Function":if(null!==g&&zd(g.value,t.name)){l(),t=ud;break}t=dd;break;case"Token":if(null!==g&&g.value===t.value){l(),t=ud;break}t=dd;break;case"Comma":null!==g&&18===g.type?Id(w.token)?t=dd:(l(),t=Ld(g)?dd:ud):t=Id(w.token)||Ld(g)?ud:dd;break;case"String":let r="",m=b;for(;m<e.length&&r.length<t.value.length;m++)r+=e[m].value;if(zd(r,t.value)){for(;b<m;)l();t=ud}else t=dd;break;default:throw new Error("Unknown node type: "+t.type)}switch(f){case null:console.warn("[csstree-match] BREAK after "+_d+" iterations"),f=Rd,w=null;break;case Td:for(;null!==u;)c();break;default:w=null}return{tokens:e,reason:f,iterations:m,match:w,longestMatch:y}}(e,t,n||{});if(null===r.match)return r;let a=r.match,o=r.match={syntax:t.syntax||null,match:[]},i=[o];for(a=function(e){let t=null,n=null,r=e;for(;null!==r;)n=r.prev,r.prev=t,t=r,r=n;return t}(a).prev;null!==a;){switch(a.type){case Sd:o.match.push(o={syntax:a.syntax,match:[]}),i.push(o);break;case Ed:i.pop(),o=i[i.length-1];break;default:o.match.push({syntax:a.syntax||null,token:a.token.value,node:a.token.node})}a=a.prev}return r}var Dd={};function Nd(e){function t(e){return null!==e&&("Type"===e.type||"Property"===e.type||"Keyword"===e.type)}let n=null;return null!==this.matched&&function r(a){if(Array.isArray(a.match)){for(let e=0;e<a.match.length;e++)if(r(a.match[e]))return t(a.syntax)&&n.unshift(a.syntax),!0}else if(a.node===e)return n=t(a.syntax)?[a.syntax]:[],!0;return!1}(this.matched),n}function Ud(e,t){return Fd(this,e,(e=>"Type"===e.type&&e.name===t))}function Md(e,t){return Fd(this,e,(e=>"Property"===e.type&&e.name===t))}function Od(e){return Fd(this,e,(e=>"Keyword"===e.type))}function Fd(e,t,n){let r=Nd.call(e,t);return null!==r&&r.some(n)}function qd(e){return"node"in e?e.node:qd(e.match[0])}function Bd(e){return"node"in e?e.node:Bd(e.match[e.match.length-1])}function jd(e,t,n,r,a){let o=[];return null!==n.matched&&function n(i){if(null!==i.syntax&&i.syntax.type===r&&i.syntax.name===a){let n=qd(i),r=Bd(i);e.syntax.walk(t,(function(e,t,a){if(e===n){let e=new Nl;do{if(e.appendData(t.data),t.data===r)break;t=t.next}while(null!==t);o.push({parent:a,nodes:e})}}))}Array.isArray(i.match)&&i.match.forEach(n)}(n.matched),o}gs(Dd,{getTrace:()=>Nd,isKeyword:()=>Od,isProperty:()=>Md,isType:()=>Ud});var{hasOwnProperty:Hd}=Object.prototype;function Wd(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&e>=0}function Vd(e){return Boolean(e)&&Wd(e.offset)&&Wd(e.line)&&Wd(e.column)}function Kd(e,t){return function(n,r){if(!n||n.constructor!==Object)return r(n,"Type of node should be an Object");for(let a in n){let o=!0;if(!1!==Hd.call(n,a)){if("type"===a)n.type!==e&&r(n,"Wrong node type `"+n.type+"`, expected `"+e+"`");else if("loc"===a){if(null===n.loc)continue;if(n.loc&&n.loc.constructor===Object)if("string"!=typeof n.loc.source)a+=".source";else if(Vd(n.loc.start)){if(Vd(n.loc.end))continue;a+=".end"}else a+=".start";o=!1}else if(t.hasOwnProperty(a)){o=!1;for(let e=0;!o&&e<t[a].length;e++){let r=t[a][e];switch(r){case String:o="string"==typeof n[a];break;case Boolean:o="boolean"==typeof n[a];break;case null:o=null===n[a];break;default:"string"==typeof r?o=n[a]&&n[a].type===r:Array.isArray(r)&&(o=n[a]instanceof Nl)}}}else r(n,"Unknown field `"+a+"` for "+e+" node type");o||r(n,"Bad value for `"+e+"."+a+"`")}}for(let a in t)Hd.call(t,a)&&!1===Hd.call(n,a)&&r(n,"Field `"+e+"."+a+"` is missed")}}function $d(e,t){let n=t.structure,r={type:String,loc:!0},a={type:'"'+e+'"'};for(let t in n){if(!1===Hd.call(n,t))continue;let o=[],i=r[t]=Array.isArray(n[t])?n[t].slice():[n[t]];for(let n=0;n<i.length;n++){let r=i[n];if(r===String||r===Boolean)o.push(r.name);else if(null===r)o.push("null");else if("string"==typeof r)o.push("<"+r+">");else{if(!Array.isArray(r))throw new Error("Wrong value `"+r+"` in `"+e+"."+t+"` structure definition");o.push("List")}}a[t]=o.join(" | ")}return{docs:a,check:Kd(e,r)}}var Gd=kd(Nc.join(" | "));function Yd(e,t,n){let r={};for(let a in e)e[a].syntax&&(r[a]=n?e[a].syntax:vc(e[a].syntax,{compact:t}));return r}function Jd(e,t,n){let r={};for(let[a,o]of Object.entries(e))r[a]={prelude:o.prelude&&(n?o.prelude.syntax:vc(o.prelude.syntax,{compact:t})),descriptors:o.descriptors&&Yd(o.descriptors,t,n)};return r}function Qd(e,t,n){return{matched:e,iterations:n,error:t,...Dd}}function Zd(e,t,n,r){let a,o=cd(n,e.syntax);return function(e){for(let t=0;t<e.length;t++)if("var("===e[t].value.toLowerCase())return!0;return!1}(o)?Qd(null,new Error("Matching for a tree with var() is not supported")):(r&&(a=Pd(o,e.cssWideKeywordsSyntax,e)),r&&a.match||(a=Pd(o,t.match,e),a.match)?Qd(a.match,null,a.iterations):Qd(null,new Tc(a.reason,t.syntax,n,a),a.iterations))}var Xd=class{constructor(e,t,n){if(this.cssWideKeywordsSyntax=Gd,this.syntax=t,this.generic=!1,this.units={...lu},this.atrules=Object.create(null),this.properties=Object.create(null),this.types=Object.create(null),this.structure=n||function(e){let t={};if(e.node)for(let n in e.node)if(Hd.call(e.node,n)){let r=e.node[n];if(!r.structure)throw new Error("Missed `structure` field in `"+n+"` node type definition");t[n]=$d(n,r)}return t}(e),e){if(e.units)for(let t of Object.keys(lu))Array.isArray(e.units[t])&&(this.units[t]=e.units[t]);if(e.types)for(let t in e.types)this.addType_(t,e.types[t]);if(e.generic){this.generic=!0;for(let[e,t]of Object.entries(function(e){return{...ou,...iu,...su(e)}}(this.units)))this.addType_(e,t)}if(e.atrules)for(let t in e.atrules)this.addAtrule_(t,e.atrules[t]);if(e.properties)for(let t in e.properties)this.addProperty_(t,e.properties[t])}}checkStructure(e){function t(e,t){r.push({node:e,message:t})}let n=this.structure,r=[];return this.syntax.walk(e,(function(e){n.hasOwnProperty(e.type)?n[e.type].check(e,t):t(e,"Unknown node type `"+e.type+"`")})),!!r.length&&r}createDescriptor(e,t,n,r=null){let a={type:t,name:n},o={type:t,name:n,parent:r,serializable:"string"==typeof e||e&&"string"==typeof e.type,syntax:null,match:null};return"function"==typeof e?o.match=kd(e,a):("string"==typeof e?Object.defineProperty(o,"syntax",{get:()=>(Object.defineProperty(o,"syntax",{value:ad(e)}),o.syntax)}):o.syntax=e,Object.defineProperty(o,"match",{get:()=>(Object.defineProperty(o,"match",{value:kd(o.syntax,a)}),o.match)})),o}addAtrule_(e,t){!t||(this.atrules[e]={type:"Atrule",name:e,prelude:t.prelude?this.createDescriptor(t.prelude,"AtrulePrelude",e):null,descriptors:t.descriptors?Object.keys(t.descriptors).reduce(((n,r)=>(n[r]=this.createDescriptor(t.descriptors[r],"AtruleDescriptor",r,e),n)),Object.create(null)):null})}addProperty_(e,t){!t||(this.properties[e]=this.createDescriptor(t,"Property",e))}addType_(e,t){!t||(this.types[e]=this.createDescriptor(t,"Type",e))}checkAtruleName(e){if(!this.getAtrule(e))return new Ec("Unknown at-rule","@"+e)}checkAtrulePrelude(e,t){let n=this.checkAtruleName(e);if(n)return n;let r=this.getAtrule(e);return!r.prelude&&t?new SyntaxError("At-rule `@"+e+"` should not contain a prelude"):!r.prelude||t||Zd(this,r.prelude,"",!1).matched?void 0:new SyntaxError("At-rule `@"+e+"` should contain a prelude")}checkAtruleDescriptorName(e,t){let n=this.checkAtruleName(e);if(n)return n;let r=this.getAtrule(e),a=zc(t);return r.descriptors?r.descriptors[a.name]||r.descriptors[a.basename]?void 0:new Ec("Unknown at-rule descriptor",t):new SyntaxError("At-rule `@"+e+"` has no known descriptors")}checkPropertyName(e){if(!this.getProperty(e))return new Ec("Unknown property",e)}matchAtrulePrelude(e,t){let n=this.checkAtrulePrelude(e,t);if(n)return Qd(null,n);let r=this.getAtrule(e);return r.prelude?Zd(this,r.prelude,t||"",!1):Qd(null,null)}matchAtruleDescriptor(e,t,n){let r=this.checkAtruleDescriptorName(e,t);if(r)return Qd(null,r);let a=this.getAtrule(e),o=zc(t);return Zd(this,a.descriptors[o.name]||a.descriptors[o.basename],n,!1)}matchDeclaration(e){return"Declaration"!==e.type?Qd(null,new Error("Not a Declaration node")):this.matchProperty(e.property,e.value)}matchProperty(e,t){if(Ic(e).custom)return Qd(null,new Error("Lexer matching doesn't applicable for custom properties"));let n=this.checkPropertyName(e);return n?Qd(null,n):Zd(this,this.getProperty(e),t,!0)}matchType(e,t){let n=this.getType(e);return n?Zd(this,n,t,!1):Qd(null,new Ec("Unknown type",e))}match(e,t){return"string"==typeof e||e&&e.type?(("string"==typeof e||!e.match)&&(e=this.createDescriptor(e,"Type","anonymous")),Zd(this,e,t,!1)):Qd(null,new Ec("Bad syntax"))}findValueFragments(e,t,n,r){return jd(this,t,this.matchProperty(e,t),n,r)}findDeclarationValueFragments(e,t,n){return jd(this,e.value,this.matchDeclaration(e),t,n)}findAllFragments(e,t,n){let r=[];return this.syntax.walk(e,{visit:"Declaration",enter:e=>{r.push.apply(r,this.findDeclarationValueFragments(e,t,n))}}),r}getAtrule(e,t=!0){let n=zc(e);return(n.vendor&&t?this.atrules[n.name]||this.atrules[n.basename]:this.atrules[n.name])||null}getAtrulePrelude(e,t=!0){let n=this.getAtrule(e,t);return n&&n.prelude||null}getAtruleDescriptor(e,t){return this.atrules.hasOwnProperty(e)&&this.atrules.declarators&&this.atrules[e].declarators[t]||null}getProperty(e,t=!0){let n=Ic(e);return(n.vendor&&t?this.properties[n.name]||this.properties[n.basename]:this.properties[n.name])||null}getType(e){return hasOwnProperty.call(this.types,e)?this.types[e]:null}validate(){function e(r,a,o,i){if(o.has(a))return o.get(a);o.set(a,!1),null!==i.syntax&&sd(i.syntax,(function(i){if("Type"!==i.type&&"Property"!==i.type)return;let s="Type"===i.type?r.types:r.properties,l="Type"===i.type?t:n;(!hasOwnProperty.call(s,i.name)||e(r,i.name,l,s[i.name]))&&o.set(a,!0)}),this)}let t=new Map,n=new Map;for(let n in this.types)e(this,n,t,this.types[n]);for(let t in this.properties)e(this,t,n,this.properties[t]);return t=[...t.keys()].filter((e=>t.get(e))),n=[...n.keys()].filter((e=>n.get(e))),t.length||n.length?{types:t,properties:n}:null}dump(e,t){return{generic:this.generic,units:this.units,types:Yd(this.types,!t,e),properties:Yd(this.properties,!t,e),atrules:Jd(this.atrules,!t,e)}}toString(){return JSON.stringify(this.dump())}};function eh(e,t){return"string"==typeof t&&/^\s*\|/.test(t)?"string"==typeof e?e+t:t.replace(/^\s*\|\s*/,""):t||null}function th(e,t){let n=Object.create(null);for(let[r,a]of Object.entries(e))if(a){n[r]={};for(let e of Object.keys(a))t.includes(e)&&(n[r][e]=a[e])}return n}function nh(e,t){let n={...e};for(let[r,a]of Object.entries(t))switch(r){case"generic":n[r]=Boolean(a);break;case"units":n[r]={...e[r]};for(let[e,t]of Object.entries(a))n[r][e]=Array.isArray(t)?t:[];break;case"atrules":n[r]={...e[r]};for(let[e,t]of Object.entries(a)){let a=n[r][e]||{},o=n[r][e]={prelude:a.prelude||null,descriptors:{...a.descriptors}};if(t){o.prelude=t.prelude?eh(o.prelude,t.prelude):o.prelude||null;for(let[e,n]of Object.entries(t.descriptors||{}))o.descriptors[e]=n?eh(o.descriptors[e],n):null;Object.keys(o.descriptors).length||(o.descriptors=null)}}break;case"types":case"properties":n[r]={...e[r]};for(let[e,t]of Object.entries(a))n[r][e]=eh(n[r][e],t);break;case"scope":n[r]={...e[r]};for(let[e,t]of Object.entries(a))n[r][e]={...n[r][e],...t};break;case"parseContext":n[r]={...e[r],...a};break;case"atrule":case"pseudo":n[r]={...e[r],...th(a,["parse"])};break;case"node":n[r]={...e[r],...th(a,["name","structure","parse","generate","walkContext"])}}return n}function rh(e){let t=Ql(e),n=yc(e),r=uc(e),{fromPlainObject:a,toPlainObject:o}=function(e){return{fromPlainObject:t=>(e(t,{enter(e){e.children&&!(e.children instanceof Nl)&&(e.children=(new Nl).fromArray(e.children))}}),t),toPlainObject:t=>(e(t,{leave(e){e.children&&e.children instanceof Nl&&(e.children=e.children.toArray())}}),t)}}(n),i={lexer:null,createLexer:e=>new Xd(e,i,i.lexer.structure),tokenize:Pl,parse:t,generate:r,walk:n,find:n.find,findLast:n.findLast,findAll:n.findAll,fromPlainObject:a,toPlainObject:o,fork(t){let n=nh({},e);return rh("function"==typeof t?t(n,Object.assign):nh(n,t))}};return i.lexer=new Xd({generic:!0,units:e.units,types:e.types,atrules:e.atrules,properties:e.properties,node:e.node},i),i}var ah=e=>rh(nh({},e)),oh={};gs(oh,{AnPlusB:()=>ih,Atrule:()=>kh,AtrulePrelude:()=>Rh,AttributeSelector:()=>Dh,Block:()=>$h,Brackets:()=>ap,CDC:()=>cp,CDO:()=>mp,ClassSelector:()=>wp,Combinator:()=>Ep,Comment:()=>Dp,Declaration:()=>Bp,DeclarationList:()=>om,Dimension:()=>hm,Function:()=>bm,Hash:()=>Am,IdSelector:()=>Dm,Identifier:()=>_m,MediaFeature:()=>Fm,MediaQuery:()=>Wm,MediaQueryList:()=>Ym,NestingSelector:()=>ef,Nth:()=>sf,Number:()=>hf,Operator:()=>bf,Parentheses:()=>xf,Percentage:()=>Cf,PseudoClassSelector:()=>Lf,PseudoElementSelector:()=>Of,Ratio:()=>Wf,Raw:()=>Zf,Rule:()=>ag,Selector:()=>hg,SelectorList:()=>bg,String:()=>Ag,StyleSheet:()=>Dg,TypeSelector:()=>jg,UnicodeRange:()=>Jg,Url:()=>lb,Value:()=>xb,WhiteSpace:()=>Cb});var ih={};gs(ih,{generate:()=>wh,name:()=>gh,parse:()=>yh,structure:()=>bh});var sh=43,lh=45,ch=110,uh=!0,dh=!1;function hh(e,t){let n=this.tokenStart+e,r=this.charCodeAt(n);for((r===sh||r===lh)&&(t&&this.error("Number sign is not allowed"),n++);n<this.tokenEnd;n++)Js(this.charCodeAt(n))||this.error("Integer is expected",n)}function ph(e){return hh.call(this,0,e)}function mh(e,t){if(!this.cmpChar(this.tokenStart+e,t)){let n="";switch(t){case ch:n="N is expected";break;case lh:n="HyphenMinus is expected"}this.error(n,this.tokenStart+e)}}function fh(){let e=0,t=0,n=this.tokenType;for(;13===n||25===n;)n=this.lookupType(++e);if(10!==n){if(!this.isDelim(sh,e)&&!this.isDelim(lh,e))return null;t=this.isDelim(sh,e)?sh:lh;do{n=this.lookupType(++e)}while(13===n||25===n);10!==n&&(this.skip(e),ph.call(this,uh))}return e>0&&this.skip(e),0===t&&(n=this.charCodeAt(this.tokenStart),n!==sh&&n!==lh&&this.error("Number sign is expected")),ph.call(this,0!==t),t===lh?"-"+this.consume(10):this.consume(10)}var gh="AnPlusB",bh={a:[String,null],b:[String,null]};function yh(){let e=this.tokenStart,t=null,n=null;if(10===this.tokenType)ph.call(this,dh),n=this.consume(10);else if(1===this.tokenType&&this.cmpChar(this.tokenStart,lh))switch(t="-1",mh.call(this,1,ch),this.tokenEnd-this.tokenStart){case 2:this.next(),n=fh.call(this);break;case 3:mh.call(this,2,lh),this.next(),this.skipSC(),ph.call(this,uh),n="-"+this.consume(10);break;default:mh.call(this,2,lh),hh.call(this,3,uh),this.next(),n=this.substrToCursor(e+2)}else if(1===this.tokenType||this.isDelim(sh)&&1===this.lookupType(1)){let r=0;switch(t="1",this.isDelim(sh)&&(r=1,this.next()),mh.call(this,0,ch),this.tokenEnd-this.tokenStart){case 1:this.next(),n=fh.call(this);break;case 2:mh.call(this,1,lh),this.next(),this.skipSC(),ph.call(this,uh),n="-"+this.consume(10);break;default:mh.call(this,1,lh),hh.call(this,2,uh),this.next(),n=this.substrToCursor(e+r+1)}}else if(12===this.tokenType){let r=this.charCodeAt(this.tokenStart),a=r===sh||r===lh,o=this.tokenStart+a;for(;o<this.tokenEnd&&Js(this.charCodeAt(o));o++);o===this.tokenStart+a&&this.error("Integer is expected",this.tokenStart+a),mh.call(this,o-this.tokenStart,ch),t=this.substring(e,o),o+1===this.tokenEnd?(this.next(),n=fh.call(this)):(mh.call(this,o-this.tokenStart+1,lh),o+2===this.tokenEnd?(this.next(),this.skipSC(),ph.call(this,uh),n="-"+this.consume(10)):(hh.call(this,o-this.tokenStart+2,uh),this.next(),n=this.substrToCursor(o+1)))}else this.error();return null!==t&&t.charCodeAt(0)===sh&&(t=t.substr(1)),null!==n&&n.charCodeAt(0)===sh&&(n=n.substr(1)),{type:"AnPlusB",loc:this.getLocation(e,this.tokenStart),a:t,b:n}}function wh(e){if(e.a){let t=("+1"===e.a||"1"===e.a?"n":"-1"===e.a&&"-n")||e.a+"n";if(e.b){let n="-"===e.b[0]||"+"===e.b[0]?e.b:"+"+e.b;this.tokenize(t+n)}else this.tokenize(t)}else this.tokenize(e.b)}var kh={};function vh(e){return this.Raw(e,this.consumeUntilLeftCurlyBracketOrSemicolon,!0)}function xh(){for(let e,t=1;e=this.lookupType(t);t++){if(24===e)return!0;if(23===e||3===e)return!1}return!1}gs(kh,{generate:()=>Ch,name:()=>Ah,parse:()=>Th,structure:()=>Eh,walkContext:()=>Sh});var Ah="Atrule",Sh="atrule",Eh={name:String,prelude:["AtrulePrelude","Raw",null],block:["Block",null]};function Th(e=!1){let t,n,r=this.tokenStart,a=null,o=null;switch(this.eat(3),t=this.substrToCursor(r+1),n=t.toLowerCase(),this.skipSC(),!1===this.eof&&23!==this.tokenType&&17!==this.tokenType&&(a=this.parseAtrulePrelude?this.parseWithFallback(this.AtrulePrelude.bind(this,t,e),vh):vh.call(this,this.tokenIndex),this.skipSC()),this.tokenType){case 17:this.next();break;case 23:o=hasOwnProperty.call(this.atrule,n)&&"function"==typeof this.atrule[n].block?this.atrule[n].block.call(this,e):this.Block(xh.call(this))}return{type:"Atrule",loc:this.getLocation(r,this.tokenStart),name:t,prelude:a,block:o}}function Ch(e){this.token(3,"@"+e.name),null!==e.prelude&&this.node(e.prelude),e.block?this.node(e.block):this.token(17,";")}var Rh={};gs(Rh,{generate:()=>Ph,name:()=>_h,parse:()=>Lh,structure:()=>Ih,walkContext:()=>zh});var _h="AtrulePrelude",zh="atrulePrelude",Ih={children:[[]]};function Lh(e){let t=null;return null!==e&&(e=e.toLowerCase()),this.skipSC(),t=hasOwnProperty.call(this.atrule,e)&&"function"==typeof this.atrule[e].prelude?this.atrule[e].prelude.call(this):this.readSequence(this.scope.AtrulePrelude),this.skipSC(),!0!==this.eof&&23!==this.tokenType&&17!==this.tokenType&&this.error("Semicolon or block is expected"),{type:"AtrulePrelude",loc:this.getLocationFromList(t),children:t}}function Ph(e){this.children(e)}var Dh={};gs(Dh,{generate:()=>Kh,name:()=>Hh,parse:()=>Vh,structure:()=>Wh});var Nh=36,Uh=42,Mh=61,Oh=94,Fh=124,qh=126;function Bh(){this.eof&&this.error("Unexpected end of input");let e=this.tokenStart,t=!1;return this.isDelim(Uh)?(t=!0,this.next()):this.isDelim(Fh)||this.eat(1),this.isDelim(Fh)?this.charCodeAt(this.tokenStart+1)!==Mh?(this.next(),this.eat(1)):t&&this.error("Identifier is expected",this.tokenEnd):t&&this.error("Vertical line is expected"),{type:"Identifier",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e)}}function jh(){let e=this.tokenStart,t=this.charCodeAt(e);return t!==Mh&&t!==qh&&t!==Oh&&t!==Nh&&t!==Uh&&t!==Fh&&this.error("Attribute selector (=, ~=, ^=, $=, *=, |=) is expected"),this.next(),t!==Mh&&(this.isDelim(Mh)||this.error("Equal sign is expected"),this.next()),this.substrToCursor(e)}var Hh="AttributeSelector",Wh={name:"Identifier",matcher:[String,null],value:["String","Identifier",null],flags:[String,null]};function Vh(){let e,t=this.tokenStart,n=null,r=null,a=null;return this.eat(19),this.skipSC(),e=Bh.call(this),this.skipSC(),20!==this.tokenType&&(1!==this.tokenType&&(n=jh.call(this),this.skipSC(),r=5===this.tokenType?this.String():this.Identifier(),this.skipSC()),1===this.tokenType&&(a=this.consume(1),this.skipSC())),this.eat(20),{type:"AttributeSelector",loc:this.getLocation(t,this.tokenStart),name:e,matcher:n,value:r,flags:a}}function Kh(e){this.token(9,"["),this.node(e.name),null!==e.matcher&&(this.tokenize(e.matcher),this.node(e.value)),null!==e.flags&&this.token(1,e.flags),this.token(9,"]")}var $h={};gs($h,{generate:()=>rp,name:()=>Xh,parse:()=>np,structure:()=>tp,walkContext:()=>ep});var Gh=38;function Yh(e){return this.Raw(e,null,!0)}function Jh(){return this.parseWithFallback(this.Rule,Yh)}function Qh(e){return this.Raw(e,this.consumeUntilSemicolonIncluded,!0)}function Zh(){if(17===this.tokenType)return Qh.call(this,this.tokenIndex);let e=this.parseWithFallback(this.Declaration,Qh);return 17===this.tokenType&&this.next(),e}var Xh="Block",ep="block",tp={children:[["Atrule","Rule","Declaration"]]};function np(e){let t=e?Zh:Jh,n=this.tokenStart,r=this.createList();this.eat(23);e:for(;!this.eof;)switch(this.tokenType){case 24:break e;case 13:case 25:this.next();break;case 3:r.push(this.parseWithFallback(this.Atrule.bind(this,e),Yh));break;default:e&&this.isDelim(Gh)?r.push(Jh.call(this)):r.push(t.call(this))}return this.eof||this.eat(24),{type:"Block",loc:this.getLocation(n,this.tokenStart),children:r}}function rp(e){this.token(23,"{"),this.children(e,(e=>{"Declaration"===e.type&&this.token(17,";")})),this.token(24,"}")}var ap={};gs(ap,{generate:()=>lp,name:()=>op,parse:()=>sp,structure:()=>ip});var op="Brackets",ip={children:[[]]};function sp(e,t){let n=this.tokenStart,r=null;return this.eat(19),r=e.call(this,t),this.eof||this.eat(20),{type:"Brackets",loc:this.getLocation(n,this.tokenStart),children:r}}function lp(e){this.token(9,"["),this.children(e),this.token(9,"]")}var cp={};gs(cp,{generate:()=>pp,name:()=>up,parse:()=>hp,structure:()=>dp});var up="CDC",dp=[];function hp(){let e=this.tokenStart;return this.eat(15),{type:"CDC",loc:this.getLocation(e,this.tokenStart)}}function pp(){this.token(15,"--\x3e")}var mp={};gs(mp,{generate:()=>yp,name:()=>fp,parse:()=>bp,structure:()=>gp});var fp="CDO",gp=[];function bp(){let e=this.tokenStart;return this.eat(14),{type:"CDO",loc:this.getLocation(e,this.tokenStart)}}function yp(){this.token(14,"\x3c!--")}var wp={};gs(wp,{generate:()=>Sp,name:()=>vp,parse:()=>Ap,structure:()=>xp});var kp=46,vp="ClassSelector",xp={name:String};function Ap(){return this.eatDelim(kp),{type:"ClassSelector",loc:this.getLocation(this.tokenStart-1,this.tokenEnd),name:this.consume(1)}}function Sp(e){this.token(9,"."),this.token(1,e.name)}var Ep={};gs(Ep,{generate:()=>Pp,name:()=>zp,parse:()=>Lp,structure:()=>Ip});var Tp=43,Cp=47,Rp=62,_p=126,zp="Combinator",Ip={name:String};function Lp(){let e,t=this.tokenStart;switch(this.tokenType){case 13:e=" ";break;case 9:switch(this.charCodeAt(this.tokenStart)){case Rp:case Tp:case _p:this.next();break;case Cp:this.next(),this.eatIdent("deep"),this.eatDelim(Cp);break;default:this.error("Combinator is expected")}e=this.substrToCursor(t)}return{type:"Combinator",loc:this.getLocation(t,this.tokenStart),name:e}}function Pp(e){this.tokenize(e.name)}var Dp={};gs(Dp,{generate:()=>qp,name:()=>Mp,parse:()=>Fp,structure:()=>Op});var Np=42,Up=47,Mp="Comment",Op={value:String};function Fp(){let e=this.tokenStart,t=this.tokenEnd;return this.eat(25),t-e+2>=2&&this.charCodeAt(t-2)===Np&&this.charCodeAt(t-1)===Up&&(t-=2),{type:"Comment",loc:this.getLocation(e,this.tokenStart),value:this.substring(e+2,t)}}function qp(e){this.token(25,"/*"+e.value+"*/")}var Bp={};gs(Bp,{generate:()=>nm,name:()=>Zp,parse:()=>tm,structure:()=>em,walkContext:()=>Xp});var jp=33,Hp=35,Wp=36,Vp=38,Kp=42,$p=43,Gp=47;function Yp(e){return this.Raw(e,this.consumeUntilExclamationMarkOrSemicolon,!0)}function Jp(e){return this.Raw(e,this.consumeUntilExclamationMarkOrSemicolon,!1)}function Qp(){let e=this.tokenIndex,t=this.Value();return"Raw"!==t.type&&!1===this.eof&&17!==this.tokenType&&!1===this.isDelim(jp)&&!1===this.isBalanceEdge(e)&&this.error(),t}var Zp="Declaration",Xp="declaration",em={important:[Boolean,String],property:String,value:["Value","Raw"]};function tm(){let e,t=this.tokenStart,n=this.tokenIndex,r=rm.call(this),a=Pc(r),o=a?this.parseCustomProperty:this.parseValue,i=a?Jp:Yp,s=!1;this.skipSC(),this.eat(16);let l=this.tokenIndex;if(a||this.skipSC(),e=o?this.parseWithFallback(Qp,i):i.call(this,this.tokenIndex),a&&"Value"===e.type&&e.children.isEmpty)for(let t=l-this.tokenIndex;t<=0;t++)if(13===this.lookupType(t)){e.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}return this.isDelim(jp)&&(s=am.call(this),this.skipSC()),!1===this.eof&&17!==this.tokenType&&!1===this.isBalanceEdge(n)&&this.error(),{type:"Declaration",loc:this.getLocation(t,this.tokenStart),important:s,property:r,value:e}}function nm(e){this.token(1,e.property),this.token(16,":"),this.node(e.value),e.important&&(this.token(9,"!"),this.token(1,!0===e.important?"important":e.important))}function rm(){let e=this.tokenStart;if(9===this.tokenType)switch(this.charCodeAt(this.tokenStart)){case Kp:case Wp:case $p:case Hp:case Vp:this.next();break;case Gp:this.next(),this.isDelim(Gp)&&this.next()}return 4===this.tokenType?this.eat(4):this.eat(1),this.substrToCursor(e)}function am(){this.eat(9),this.skipSC();let e=this.consume(1);return"important"===e||e}var om={};gs(om,{generate:()=>dm,name:()=>lm,parse:()=>um,structure:()=>cm});var im=38;function sm(e){return this.Raw(e,this.consumeUntilSemicolonIncluded,!0)}var lm="DeclarationList",cm={children:[["Declaration","Atrule","Rule"]]};function um(){let e=this.createList();for(;!this.eof;)switch(this.tokenType){case 13:case 25:case 17:this.next();break;case 3:e.push(this.parseWithFallback(this.Atrule.bind(this,!0),sm));break;default:this.isDelim(im)?e.push(this.parseWithFallback(this.Rule,sm)):e.push(this.parseWithFallback(this.Declaration,sm))}return{type:"DeclarationList",loc:this.getLocationFromList(e),children:e}}function dm(e){this.children(e,(e=>{"Declaration"===e.type&&this.token(17,";")}))}var hm={};gs(hm,{generate:()=>gm,name:()=>pm,parse:()=>fm,structure:()=>mm});var pm="Dimension",mm={value:String,unit:String};function fm(){let e=this.tokenStart,t=this.consumeNumber(12);return{type:"Dimension",loc:this.getLocation(e,this.tokenStart),value:t,unit:this.substring(e+t.length,this.tokenStart)}}function gm(e){this.token(12,e.value+e.unit)}var bm={};gs(bm,{generate:()=>xm,name:()=>ym,parse:()=>vm,structure:()=>km,walkContext:()=>wm});var ym="Function",wm="function",km={name:String,children:[[]]};function vm(e,t){let n,r=this.tokenStart,a=this.consumeFunctionName(),o=a.toLowerCase();return n=t.hasOwnProperty(o)?t[o].call(this,t):e.call(this,t),this.eof||this.eat(22),{type:"Function",loc:this.getLocation(r,this.tokenStart),name:a,children:n}}function xm(e){this.token(2,e.name+"("),this.children(e),this.token(22,")")}var Am={};gs(Am,{generate:()=>Rm,name:()=>Em,parse:()=>Cm,structure:()=>Tm,xxx:()=>Sm});var Sm="XXX",Em="Hash",Tm={value:String};function Cm(){let e=this.tokenStart;return this.eat(4),{type:"Hash",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e+1)}}function Rm(e){this.token(4,"#"+e.value)}var _m={};gs(_m,{generate:()=>Pm,name:()=>zm,parse:()=>Lm,structure:()=>Im});var zm="Identifier",Im={name:String};function Lm(){return{type:"Identifier",loc:this.getLocation(this.tokenStart,this.tokenEnd),name:this.consume(1)}}function Pm(e){this.token(1,e.name)}var Dm={};gs(Dm,{generate:()=>Om,name:()=>Nm,parse:()=>Mm,structure:()=>Um});var Nm="IdSelector",Um={name:String};function Mm(){let e=this.tokenStart;return this.eat(4),{type:"IdSelector",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e+1)}}function Om(e){this.token(9,"#"+e.name)}var Fm={};gs(Fm,{generate:()=>Hm,name:()=>qm,parse:()=>jm,structure:()=>Bm});var qm="MediaFeature",Bm={name:String,value:["Identifier","Number","Dimension","Ratio",null]};function jm(){let e,t=this.tokenStart,n=null;if(this.eat(21),this.skipSC(),e=this.consume(1),this.skipSC(),22!==this.tokenType){switch(this.eat(16),this.skipSC(),this.tokenType){case 10:n=9===this.lookupNonWSType(1)?this.Ratio():this.Number();break;case 12:n=this.Dimension();break;case 1:n=this.Identifier();break;default:this.error("Number, dimension, ratio or identifier is expected")}this.skipSC()}return this.eat(22),{type:"MediaFeature",loc:this.getLocation(t,this.tokenStart),name:e,value:n}}function Hm(e){this.token(21,"("),this.token(1,e.name),null!==e.value&&(this.token(16,":"),this.node(e.value)),this.token(22,")")}var Wm={};gs(Wm,{generate:()=>Gm,name:()=>Vm,parse:()=>$m,structure:()=>Km});var Vm="MediaQuery",Km={children:[["Identifier","MediaFeature","WhiteSpace"]]};function $m(){let e=this.createList(),t=null;this.skipSC();e:for(;!this.eof;){switch(this.tokenType){case 25:case 13:this.next();continue;case 1:t=this.Identifier();break;case 21:t=this.MediaFeature();break;default:break e}e.push(t)}return null===t&&this.error("Identifier or parenthesis is expected"),{type:"MediaQuery",loc:this.getLocationFromList(e),children:e}}function Gm(e){this.children(e)}var Ym={};gs(Ym,{generate:()=>Xm,name:()=>Jm,parse:()=>Zm,structure:()=>Qm});var Jm="MediaQueryList",Qm={children:[["MediaQuery"]]};function Zm(){let e=this.createList();for(this.skipSC();!this.eof&&(e.push(this.MediaQuery()),18===this.tokenType);)this.next();return{type:"MediaQueryList",loc:this.getLocationFromList(e),children:e}}function Xm(e){this.children(e,(()=>this.token(18,",")))}var ef={};gs(ef,{generate:()=>of,name:()=>nf,parse:()=>af,structure:()=>rf});var tf=38,nf="NestingSelector",rf={};function af(){let e=this.tokenStart;return this.eatDelim(tf),{type:"NestingSelector",loc:this.getLocation(e,this.tokenStart)}}function of(){this.token(9,"&")}var sf={};gs(sf,{generate:()=>df,name:()=>lf,parse:()=>uf,structure:()=>cf});var lf="Nth",cf={nth:["AnPlusB","Identifier"],selector:["SelectorList",null]};function uf(){this.skipSC();let e,t=this.tokenStart,n=t,r=null;return e=this.lookupValue(0,"odd")||this.lookupValue(0,"even")?this.Identifier():this.AnPlusB(),n=this.tokenStart,this.skipSC(),this.lookupValue(0,"of")&&(this.next(),r=this.SelectorList(),n=this.tokenStart),{type:"Nth",loc:this.getLocation(t,n),nth:e,selector:r}}function df(e){this.node(e.nth),null!==e.selector&&(this.token(1,"of"),this.node(e.selector))}var hf={};gs(hf,{generate:()=>gf,name:()=>pf,parse:()=>ff,structure:()=>mf});var pf="Number",mf={value:String};function ff(){return{type:"Number",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consume(10)}}function gf(e){this.token(10,e.value)}var bf={};gs(bf,{generate:()=>vf,name:()=>yf,parse:()=>kf,structure:()=>wf});var yf="Operator",wf={value:String};function kf(){let e=this.tokenStart;return this.next(),{type:"Operator",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function vf(e){this.tokenize(e.value)}var xf={};gs(xf,{generate:()=>Tf,name:()=>Af,parse:()=>Ef,structure:()=>Sf});var Af="Parentheses",Sf={children:[[]]};function Ef(e,t){let n=this.tokenStart,r=null;return this.eat(21),r=e.call(this,t),this.eof||this.eat(22),{type:"Parentheses",loc:this.getLocation(n,this.tokenStart),children:r}}function Tf(e){this.token(21,"("),this.children(e),this.token(22,")")}var Cf={};gs(Cf,{generate:()=>If,name:()=>Rf,parse:()=>zf,structure:()=>_f});var Rf="Percentage",_f={value:String};function zf(){return{type:"Percentage",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consumeNumber(11)}}function If(e){this.token(11,e.value+"%")}var Lf={};gs(Lf,{generate:()=>Mf,name:()=>Pf,parse:()=>Uf,structure:()=>Nf,walkContext:()=>Df});var Pf="PseudoClassSelector",Df="function",Nf={name:String,children:[["Raw"],null]};function Uf(){let e,t,n=this.tokenStart,r=null;return this.eat(16),2===this.tokenType?(e=this.consumeFunctionName(),t=e.toLowerCase(),22==this.lookupNonWSType(0)?r=this.createList():hasOwnProperty.call(this.pseudo,t)?(this.skipSC(),r=this.pseudo[t].call(this),this.skipSC()):(r=this.createList(),r.push(this.Raw(this.tokenIndex,null,!1))),this.eat(22)):e=this.consume(1),{type:"PseudoClassSelector",loc:this.getLocation(n,this.tokenStart),name:e,children:r}}function Mf(e){this.token(16,":"),null===e.children?this.token(1,e.name):(this.token(2,e.name+"("),this.children(e),this.token(22,")"))}var Of={};gs(Of,{generate:()=>Hf,name:()=>Ff,parse:()=>jf,structure:()=>Bf,walkContext:()=>qf});var Ff="PseudoElementSelector",qf="function",Bf={name:String,children:[["Raw"],null]};function jf(){let e,t,n=this.tokenStart,r=null;return this.eat(16),this.eat(16),2===this.tokenType?(e=this.consumeFunctionName(),t=e.toLowerCase(),22==this.lookupNonWSType(0)?r=this.createList():hasOwnProperty.call(this.pseudo,t)?(this.skipSC(),r=this.pseudo[t].call(this),this.skipSC()):(r=this.createList(),r.push(this.Raw(this.tokenIndex,null,!1))),this.eat(22)):e=this.consume(1),{type:"PseudoElementSelector",loc:this.getLocation(n,this.tokenStart),name:e,children:r}}function Hf(e){this.token(16,":"),this.token(16,":"),null===e.children?this.token(1,e.name):(this.token(2,e.name+"("),this.children(e),this.token(22,")"))}var Wf={};gs(Wf,{generate:()=>Qf,name:()=>Gf,parse:()=>Jf,structure:()=>Yf});var Vf=47,Kf=46;function $f(){this.skipSC();let e=this.consume(10);for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);!Js(n)&&n!==Kf&&this.error("Unsigned number is expected",this.tokenStart-e.length+t)}return 0===Number(e)&&this.error("Zero number is not allowed",this.tokenStart-e.length),e}var Gf="Ratio",Yf={left:String,right:String};function Jf(){let e,t=this.tokenStart,n=$f.call(this);return this.skipSC(),this.eatDelim(Vf),e=$f.call(this),{type:"Ratio",loc:this.getLocation(t,this.tokenStart),left:n,right:e}}function Qf(e){this.token(10,e.left),this.token(9,"/"),this.token(10,e.right)}var Zf={};function Xf(){return this.tokenIndex>0&&13===this.lookupType(-1)?this.tokenIndex>1?this.getTokenStart(this.tokenIndex-1):this.firstCharOffset:this.tokenStart}gs(Zf,{generate:()=>rg,name:()=>eg,parse:()=>ng,structure:()=>tg});var eg="Raw",tg={value:String};function ng(e,t,n){let r,a=this.getTokenStart(e);return this.skipUntilBalanced(e,t||this.consumeUntilBalanceEnd),r=n&&this.tokenStart>a?Xf.call(this):this.tokenStart,{type:"Raw",loc:this.getLocation(a,r),value:this.substring(a,r)}}function rg(e){this.tokenize(e.value)}var ag={};function og(e){return this.Raw(e,this.consumeUntilLeftCurlyBracket,!0)}function ig(){let e=this.SelectorList();return"Raw"!==e.type&&!1===this.eof&&23!==this.tokenType&&this.error(),e}gs(ag,{generate:()=>dg,name:()=>sg,parse:()=>ug,structure:()=>cg,walkContext:()=>lg});var sg="Rule",lg="rule",cg={prelude:["SelectorList","Raw"],block:["Block"]};function ug(){let e,t,n=this.tokenIndex,r=this.tokenStart;return e=this.parseRulePrelude?this.parseWithFallback(ig,og):og.call(this,n),t=this.Block(!0),{type:"Rule",loc:this.getLocation(r,this.tokenStart),prelude:e,block:t}}function dg(e){this.node(e.prelude),this.node(e.block)}var hg={};gs(hg,{generate:()=>gg,name:()=>pg,parse:()=>fg,structure:()=>mg});var pg="Selector",mg={children:[["TypeSelector","IdSelector","ClassSelector","AttributeSelector","PseudoClassSelector","PseudoElementSelector","Combinator","WhiteSpace"]]};function fg(){let e=this.readSequence(this.scope.Selector);return null===this.getFirstListNode(e)&&this.error("Selector is expected"),{type:"Selector",loc:this.getLocationFromList(e),children:e}}function gg(e){this.children(e)}var bg={};gs(bg,{generate:()=>xg,name:()=>yg,parse:()=>vg,structure:()=>kg,walkContext:()=>wg});var yg="SelectorList",wg="selector",kg={children:[["Selector","Raw"]]};function vg(){let e=this.createList();for(;!this.eof&&(e.push(this.Selector()),18===this.tokenType);)this.next();return{type:"SelectorList",loc:this.getLocationFromList(e),children:e}}function xg(e){this.children(e,(()=>this.token(18,",")))}var Ag={};gs(Ag,{generate:()=>Pg,name:()=>zg,parse:()=>Lg,structure:()=>Ig});var Sg={};gs(Sg,{decode:()=>Rg,encode:()=>_g});var Eg=92,Tg=34,Cg=39;function Rg(e){let t=e.length,n=e.charCodeAt(0),r=n===Tg||n===Cg?1:0,a=1===r&&t>1&&e.charCodeAt(t-1)===n?t-2:t-1,o="";for(let n=r;n<=a;n++){let r=e.charCodeAt(n);if(r===Eg){if(n===a){n!==t-1&&(o=e.substr(n+1));break}if(r=e.charCodeAt(++n),al(Eg,r)){let t=n-1,r=kl(e,t);n=r-1,o+=Sl(e.substring(t+1,r))}else 13===r&&10===e.charCodeAt(n+1)&&n++}else o+=e[n]}return o}function _g(e,t){let n=t?"'":'"',r=t?Cg:Tg,a="",o=!1;for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);0!==n?n<=31||127===n?(a+="\\"+n.toString(16),o=!0):n===r||n===Eg?(a+="\\"+e.charAt(t),o=!1):(o&&(Qs(n)||rl(n))&&(a+=" "),a+=e.charAt(t),o=!1):a+="�"}return n+a+n}var zg="String",Ig={value:String};function Lg(){return{type:"String",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:Rg(this.consume(5))}}function Pg(e){this.token(5,_g(e.value))}var Dg={};gs(Dg,{generate:()=>Bg,name:()=>Mg,parse:()=>qg,structure:()=>Fg,walkContext:()=>Og});var Ng=33;function Ug(e){return this.Raw(e,null,!1)}var Mg="StyleSheet",Og="stylesheet",Fg={children:[["Comment","CDO","CDC","Atrule","Rule","Raw"]]};function qg(){let e,t=this.tokenStart,n=this.createList();for(;!this.eof;){switch(this.tokenType){case 13:this.next();continue;case 25:if(this.charCodeAt(this.tokenStart+2)!==Ng){this.next();continue}e=this.Comment();break;case 14:e=this.CDO();break;case 15:e=this.CDC();break;case 3:e=this.parseWithFallback(this.Atrule,Ug);break;default:e=this.parseWithFallback(this.Rule,Ug)}n.push(e)}return{type:"StyleSheet",loc:this.getLocation(t,this.tokenStart),children:n}}function Bg(e){this.children(e)}var jg={};gs(jg,{generate:()=>Yg,name:()=>Kg,parse:()=>Gg,structure:()=>$g});var Hg=42,Wg=124;function Vg(){1!==this.tokenType&&!1===this.isDelim(Hg)&&this.error("Identifier or asterisk is expected"),this.next()}var Kg="TypeSelector",$g={name:String};function Gg(){let e=this.tokenStart;return this.isDelim(Wg)?(this.next(),Vg.call(this)):(Vg.call(this),this.isDelim(Wg)&&(this.next(),Vg.call(this))),{type:"TypeSelector",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e)}}function Yg(e){this.tokenize(e.name)}var Jg={};gs(Jg,{generate:()=>sb,name:()=>ab,parse:()=>ib,structure:()=>ob});var Qg=43,Zg=45,Xg=63;function eb(e,t){let n=0;for(let r=this.tokenStart+e;r<this.tokenEnd;r++){let a=this.charCodeAt(r);if(a===Zg&&t&&0!==n)return eb.call(this,e+n+1,!1),-1;Qs(a)||this.error(t&&0!==n?"Hyphen minus"+(n<6?" or hex digit":"")+" is expected":n<6?"Hex digit is expected":"Unexpected input",r),++n>6&&this.error("Too many hex digits",r)}return this.next(),n}function tb(e){let t=0;for(;this.isDelim(Xg);)++t>e&&this.error("Too many question marks"),this.next()}function nb(e){this.charCodeAt(this.tokenStart)!==e&&this.error((e===Qg?"Plus sign":"Hyphen minus")+" is expected")}function rb(){let e=0;switch(this.tokenType){case 10:if(e=eb.call(this,1,!0),this.isDelim(Xg)){tb.call(this,6-e);break}if(12===this.tokenType||10===this.tokenType){nb.call(this,Zg),eb.call(this,1,!1);break}break;case 12:e=eb.call(this,1,!0),e>0&&tb.call(this,6-e);break;default:if(this.eatDelim(Qg),1===this.tokenType){e=eb.call(this,0,!0),e>0&&tb.call(this,6-e);break}if(this.isDelim(Xg)){this.next(),tb.call(this,5);break}this.error("Hex digit or question mark is expected")}}var ab="UnicodeRange",ob={value:String};function ib(){let e=this.tokenStart;return this.eatIdent("u"),rb.call(this),{type:"UnicodeRange",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function sb(e){this.tokenize(e.value)}var lb={};gs(lb,{generate:()=>vb,name:()=>yb,parse:()=>kb,structure:()=>wb});var cb={};gs(cb,{decode:()=>gb,encode:()=>bb});var ub=32,db=92,hb=34,pb=39,mb=40,fb=41;function gb(e){let t=e.length,n=4,r=e.charCodeAt(t-1)===fb?t-2:t-1,a="";for(;n<r&&rl(e.charCodeAt(n));)n++;for(;n<r&&rl(e.charCodeAt(r));)r--;for(let o=n;o<=r;o++){let n=e.charCodeAt(o);if(n===db){if(o===r){o!==t-1&&(a=e.substr(o+1));break}if(n=e.charCodeAt(++o),al(db,n)){let t=o-1,n=kl(e,t);o=n-1,a+=Sl(e.substring(t+1,n))}else 13===n&&10===e.charCodeAt(o+1)&&o++}else a+=e[o]}return a}function bb(e){let t="",n=!1;for(let r=0;r<e.length;r++){let a=e.charCodeAt(r);0!==a?a<=31||127===a?(t+="\\"+a.toString(16),n=!0):a===ub||a===db||a===hb||a===pb||a===mb||a===fb?(t+="\\"+e.charAt(r),n=!1):(n&&Qs(a)&&(t+=" "),t+=e.charAt(r),n=!1):t+="�"}return"url("+t+")"}var yb="Url",wb={value:String};function kb(){let e,t=this.tokenStart;switch(this.tokenType){case 7:e=gb(this.consume(7));break;case 2:this.cmpStr(this.tokenStart,this.tokenEnd,"url(")||this.error("Function name must be `url`"),this.eat(2),this.skipSC(),e=Rg(this.consume(5)),this.skipSC(),this.eof||this.eat(22);break;default:this.error("Url or Function is expected")}return{type:"Url",loc:this.getLocation(t,this.tokenStart),value:e}}function vb(e){this.token(7,bb(e.value))}var xb={};gs(xb,{generate:()=>Tb,name:()=>Ab,parse:()=>Eb,structure:()=>Sb});var Ab="Value",Sb={children:[[]]};function Eb(){let e=this.tokenStart,t=this.readSequence(this.scope.Value);return{type:"Value",loc:this.getLocation(e,this.tokenStart),children:t}}function Tb(e){this.children(e)}var Cb={};gs(Cb,{generate:()=>Lb,name:()=>_b,parse:()=>Ib,structure:()=>zb});var Rb=Object.freeze({type:"WhiteSpace",loc:null,value:" "}),_b="WhiteSpace",zb={value:String};function Ib(){return this.eat(13),Rb}function Lb(e){this.token(13,e.value)}var Pb={generic:!0,generic:!0,units:{angle:["deg","grad","rad","turn"],decibel:["db"],flex:["fr"],frequency:["hz","khz"],length:["cm","mm","q","in","pt","pc","px","em","rem","ex","rex","cap","rcap","ch","rch","ic","ric","lh","rlh","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax","cqw","cqh","cqi","cqb","cqmin","cqmax"],resolution:["dpi","dpcm","dppx","x"],semitones:["st"],time:["s","ms"]},types:{"abs()":"abs( <calc-sum> )","absolute-size":"xx-small|x-small|small|medium|large|x-large|xx-large|xxx-large","acos()":"acos( <calc-sum> )","alpha-value":"<number>|<percentage>","angle-percentage":"<angle>|<percentage>","angular-color-hint":"<angle-percentage>","angular-color-stop":"<color>&&<color-stop-angle>?","angular-color-stop-list":"[<angular-color-stop> [, <angular-color-hint>]?]# , <angular-color-stop>","animateable-feature":"scroll-position|contents|<custom-ident>","asin()":"asin( <calc-sum> )","atan()":"atan( <calc-sum> )","atan2()":"atan2( <calc-sum> , <calc-sum> )",attachment:"scroll|fixed|local","attr()":"attr( <attr-name> <type-or-unit>? [, <attr-fallback>]? )","attr-matcher":"['~'|'|'|'^'|'$'|'*']? '='","attr-modifier":"i|s","attribute-selector":"'[' <wq-name> ']'|'[' <wq-name> <attr-matcher> [<string-token>|<ident-token>] <attr-modifier>? ']'","auto-repeat":"repeat( [auto-fill|auto-fit] , [<line-names>? <fixed-size>]+ <line-names>? )","auto-track-list":"[<line-names>? [<fixed-size>|<fixed-repeat>]]* <line-names>? <auto-repeat> [<line-names>? [<fixed-size>|<fixed-repeat>]]* <line-names>?",axis:"block|inline|vertical|horizontal","baseline-position":"[first|last]? baseline","basic-shape":"<inset()>|<circle()>|<ellipse()>|<polygon()>|<path()>","bg-image":"none|<image>","bg-layer":"<bg-image>||<bg-position> [/ <bg-size>]?||<repeat-style>||<attachment>||<box>||<box>","bg-position":"[[left|center|right|top|bottom|<length-percentage>]|[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]|[center|[left|right] <length-percentage>?]&&[center|[top|bottom] <length-percentage>?]]","bg-size":"[<length-percentage>|auto]{1,2}|cover|contain","blur()":"blur( <length> )","blend-mode":"normal|multiply|screen|overlay|darken|lighten|color-dodge|color-burn|hard-light|soft-light|difference|exclusion|hue|saturation|color|luminosity",box:"border-box|padding-box|content-box","brightness()":"brightness( <number-percentage> )","calc()":"calc( <calc-sum> )","calc-sum":"<calc-product> [['+'|'-'] <calc-product>]*","calc-product":"<calc-value> ['*' <calc-value>|'/' <number>]*","calc-value":"<number>|<dimension>|<percentage>|<calc-constant>|( <calc-sum> )","calc-constant":"e|pi|infinity|-infinity|NaN","cf-final-image":"<image>|<color>","cf-mixing-image":"<percentage>?&&<image>","circle()":"circle( [<shape-radius>]? [at <position>]? )","clamp()":"clamp( <calc-sum>#{3} )","class-selector":"'.' <ident-token>","clip-source":"<url>",color:"<rgb()>|<rgba()>|<hsl()>|<hsla()>|<hwb()>|<lab()>|<lch()>|<hex-color>|<named-color>|currentcolor|<deprecated-system-color>","color-stop":"<color-stop-length>|<color-stop-angle>","color-stop-angle":"<angle-percentage>{1,2}","color-stop-length":"<length-percentage>{1,2}","color-stop-list":"[<linear-color-stop> [, <linear-color-hint>]?]# , <linear-color-stop>",combinator:"'>'|'+'|'~'|['||']","common-lig-values":"[common-ligatures|no-common-ligatures]","compat-auto":"searchfield|textarea|push-button|slider-horizontal|checkbox|radio|square-button|menulist|listbox|meter|progress-bar|button","composite-style":"clear|copy|source-over|source-in|source-out|source-atop|destination-over|destination-in|destination-out|destination-atop|xor","compositing-operator":"add|subtract|intersect|exclude","compound-selector":"[<type-selector>? <subclass-selector>* [<pseudo-element-selector> <pseudo-class-selector>*]*]!","compound-selector-list":"<compound-selector>#","complex-selector":"<compound-selector> [<combinator>? <compound-selector>]*","complex-selector-list":"<complex-selector>#","conic-gradient()":"conic-gradient( [from <angle>]? [at <position>]? , <angular-color-stop-list> )","contextual-alt-values":"[contextual|no-contextual]","content-distribution":"space-between|space-around|space-evenly|stretch","content-list":"[<string>|contents|<image>|<counter>|<quote>|<target>|<leader()>|<attr()>]+","content-position":"center|start|end|flex-start|flex-end","content-replacement":"<image>","contrast()":"contrast( [<number-percentage>] )","cos()":"cos( <calc-sum> )",counter:"<counter()>|<counters()>","counter()":"counter( <counter-name> , <counter-style>? )","counter-name":"<custom-ident>","counter-style":"<counter-style-name>|symbols( )","counter-style-name":"<custom-ident>","counters()":"counters( <counter-name> , <string> , <counter-style>? )","cross-fade()":"cross-fade( <cf-mixing-image> , <cf-final-image>? )","cubic-bezier-timing-function":"ease|ease-in|ease-out|ease-in-out|cubic-bezier( <number [0,1]> , <number> , <number [0,1]> , <number> )","deprecated-system-color":"ActiveBorder|ActiveCaption|AppWorkspace|Background|ButtonFace|ButtonHighlight|ButtonShadow|ButtonText|CaptionText|GrayText|Highlight|HighlightText|InactiveBorder|InactiveCaption|InactiveCaptionText|InfoBackground|InfoText|Menu|MenuText|Scrollbar|ThreeDDarkShadow|ThreeDFace|ThreeDHighlight|ThreeDLightShadow|ThreeDShadow|Window|WindowFrame|WindowText","discretionary-lig-values":"[discretionary-ligatures|no-discretionary-ligatures]","display-box":"contents|none","display-inside":"flow|flow-root|table|flex|grid|ruby","display-internal":"table-row-group|table-header-group|table-footer-group|table-row|table-cell|table-column-group|table-column|table-caption|ruby-base|ruby-text|ruby-base-container|ruby-text-container","display-legacy":"inline-block|inline-list-item|inline-table|inline-flex|inline-grid","display-listitem":"<display-outside>?&&[flow|flow-root]?&&list-item","display-outside":"block|inline|run-in","drop-shadow()":"drop-shadow( <length>{2,3} <color>? )","east-asian-variant-values":"[jis78|jis83|jis90|jis04|simplified|traditional]","east-asian-width-values":"[full-width|proportional-width]","element()":"element( <custom-ident> , [first|start|last|first-except]? )|element( <id-selector> )","ellipse()":"ellipse( [<shape-radius>{2}]? [at <position>]? )","ending-shape":"circle|ellipse","env()":"env( <custom-ident> , <declaration-value>? )","exp()":"exp( <calc-sum> )","explicit-track-list":"[<line-names>? <track-size>]+ <line-names>?","family-name":"<string>|<custom-ident>+","feature-tag-value":"<string> [<integer>|on|off]?","feature-type":"@stylistic|@historical-forms|@styleset|@character-variant|@swash|@ornaments|@annotation","feature-value-block":"<feature-type> '{' <feature-value-declaration-list> '}'","feature-value-block-list":"<feature-value-block>+","feature-value-declaration":"<custom-ident> : <integer>+ ;","feature-value-declaration-list":"<feature-value-declaration>","feature-value-name":"<custom-ident>","fill-rule":"nonzero|evenodd","filter-function":"<blur()>|<brightness()>|<contrast()>|<drop-shadow()>|<grayscale()>|<hue-rotate()>|<invert()>|<opacity()>|<saturate()>|<sepia()>","filter-function-list":"[<filter-function>|<url>]+","final-bg-layer":"<'background-color'>||<bg-image>||<bg-position> [/ <bg-size>]?||<repeat-style>||<attachment>||<box>||<box>","fixed-breadth":"<length-percentage>","fixed-repeat":"repeat( [<integer [1,∞]>] , [<line-names>? <fixed-size>]+ <line-names>? )","fixed-size":"<fixed-breadth>|minmax( <fixed-breadth> , <track-breadth> )|minmax( <inflexible-breadth> , <fixed-breadth> )","font-stretch-absolute":"normal|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded|<percentage>","font-variant-css21":"[normal|small-caps]","font-weight-absolute":"normal|bold|<number [1,1000]>","frequency-percentage":"<frequency>|<percentage>","general-enclosed":"[<function-token> <any-value> )]|( <ident> <any-value> )","generic-family":"serif|sans-serif|cursive|fantasy|monospace|-apple-system","generic-name":"serif|sans-serif|cursive|fantasy|monospace","geometry-box":"<shape-box>|fill-box|stroke-box|view-box",gradient:"<linear-gradient()>|<repeating-linear-gradient()>|<radial-gradient()>|<repeating-radial-gradient()>|<conic-gradient()>|<repeating-conic-gradient()>|<-legacy-gradient>","grayscale()":"grayscale( <number-percentage> )","grid-line":"auto|<custom-ident>|[<integer>&&<custom-ident>?]|[span&&[<integer>||<custom-ident>]]","historical-lig-values":"[historical-ligatures|no-historical-ligatures]","hsl()":"hsl( <hue> <percentage> <percentage> [/ <alpha-value>]? )|hsl( <hue> , <percentage> , <percentage> , <alpha-value>? )","hsla()":"hsla( <hue> <percentage> <percentage> [/ <alpha-value>]? )|hsla( <hue> , <percentage> , <percentage> , <alpha-value>? )",hue:"<number>|<angle>","hue-rotate()":"hue-rotate( <angle> )","hwb()":"hwb( [<hue>|none] [<percentage>|none] [<percentage>|none] [/ [<alpha-value>|none]]? )","hypot()":"hypot( <calc-sum># )",image:"<url>|<image()>|<image-set()>|<element()>|<paint()>|<cross-fade()>|<gradient>","image()":"image( <image-tags>? [<image-src>? , <color>?]! )","image-set()":"image-set( <image-set-option># )","image-set-option":"[<image>|<string>] [<resolution>||type( <string> )]","image-src":"<url>|<string>","image-tags":"ltr|rtl","inflexible-breadth":"<length-percentage>|min-content|max-content|auto","inset()":"inset( <length-percentage>{1,4} [round <'border-radius'>]? )","invert()":"invert( <number-percentage> )","keyframes-name":"<custom-ident>|<string>","keyframe-block":"<keyframe-selector># { <declaration-list> }","keyframe-block-list":"<keyframe-block>+","keyframe-selector":"from|to|<percentage>","lab()":"lab( [<percentage>|<number>|none] [<percentage>|<number>|none] [<percentage>|<number>|none] [/ [<alpha-value>|none]]? )","layer()":"layer( <layer-name> )","layer-name":"<ident> ['.' <ident>]*","lch()":"lch( [<percentage>|<number>|none] [<percentage>|<number>|none] [<hue>|none] [/ [<alpha-value>|none]]? )","leader()":"leader( <leader-type> )","leader-type":"dotted|solid|space|<string>","length-percentage":"<length>|<percentage>","line-names":"'[' <custom-ident>* ']'","line-name-list":"[<line-names>|<name-repeat>]+","line-style":"none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset","line-width":"<length>|thin|medium|thick","linear-color-hint":"<length-percentage>","linear-color-stop":"<color> <color-stop-length>?","linear-gradient()":"linear-gradient( [<angle>|to <side-or-corner>]? , <color-stop-list> )","log()":"log( <calc-sum> , <calc-sum>? )","mask-layer":"<mask-reference>||<position> [/ <bg-size>]?||<repeat-style>||<geometry-box>||[<geometry-box>|no-clip]||<compositing-operator>||<masking-mode>","mask-position":"[<length-percentage>|left|center|right] [<length-percentage>|top|center|bottom]?","mask-reference":"none|<image>|<mask-source>","mask-source":"<url>","masking-mode":"alpha|luminance|match-source","matrix()":"matrix( <number>#{6} )","matrix3d()":"matrix3d( <number>#{16} )","max()":"max( <calc-sum># )","media-and":"<media-in-parens> [and <media-in-parens>]+","media-condition":"<media-not>|<media-and>|<media-or>|<media-in-parens>","media-condition-without-or":"<media-not>|<media-and>|<media-in-parens>","media-feature":"( [<mf-plain>|<mf-boolean>|<mf-range>] )","media-in-parens":"( <media-condition> )|<media-feature>|<general-enclosed>","media-not":"not <media-in-parens>","media-or":"<media-in-parens> [or <media-in-parens>]+","media-query":"<media-condition>|[not|only]? <media-type> [and <media-condition-without-or>]?","media-query-list":"<media-query>#","media-type":"<ident>","mf-boolean":"<mf-name>","mf-name":"<ident>","mf-plain":"<mf-name> : <mf-value>","mf-range":"<mf-name> ['<'|'>']? '='? <mf-value>|<mf-value> ['<'|'>']? '='? <mf-name>|<mf-value> '<' '='? <mf-name> '<' '='? <mf-value>|<mf-value> '>' '='? <mf-name> '>' '='? <mf-value>","mf-value":"<number>|<dimension>|<ident>|<ratio>","min()":"min( <calc-sum># )","minmax()":"minmax( [<length-percentage>|min-content|max-content|auto] , [<length-percentage>|<flex>|min-content|max-content|auto] )","mod()":"mod( <calc-sum> , <calc-sum> )","name-repeat":"repeat( [<integer [1,∞]>|auto-fill] , <line-names>+ )","named-color":"transparent|aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen|<-non-standard-color>","namespace-prefix":"<ident>","ns-prefix":"[<ident-token>|'*']? '|'","number-percentage":"<number>|<percentage>","numeric-figure-values":"[lining-nums|oldstyle-nums]","numeric-fraction-values":"[diagonal-fractions|stacked-fractions]","numeric-spacing-values":"[proportional-nums|tabular-nums]",nth:"<an-plus-b>|even|odd","opacity()":"opacity( [<number-percentage>] )","overflow-position":"unsafe|safe","outline-radius":"<length>|<percentage>","page-body":"<declaration>? [; <page-body>]?|<page-margin-box> <page-body>","page-margin-box":"<page-margin-box-type> '{' <declaration-list> '}'","page-margin-box-type":"@top-left-corner|@top-left|@top-center|@top-right|@top-right-corner|@bottom-left-corner|@bottom-left|@bottom-center|@bottom-right|@bottom-right-corner|@left-top|@left-middle|@left-bottom|@right-top|@right-middle|@right-bottom","page-selector-list":"[<page-selector>#]?","page-selector":"<pseudo-page>+|<ident> <pseudo-page>*","page-size":"A5|A4|A3|B5|B4|JIS-B5|JIS-B4|letter|legal|ledger","path()":"path( [<fill-rule> ,]? <string> )","paint()":"paint( <ident> , <declaration-value>? )","perspective()":"perspective( [<length [0,∞]>|none] )","polygon()":"polygon( <fill-rule>? , [<length-percentage> <length-percentage>]# )",position:"[[left|center|right]||[top|center|bottom]|[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]?|[[left|right] <length-percentage>]&&[[top|bottom] <length-percentage>]]","pow()":"pow( <calc-sum> , <calc-sum> )","pseudo-class-selector":"':' <ident-token>|':' <function-token> <any-value> ')'","pseudo-element-selector":"':' <pseudo-class-selector>","pseudo-page":": [left|right|first|blank]",quote:"open-quote|close-quote|no-open-quote|no-close-quote","radial-gradient()":"radial-gradient( [<ending-shape>||<size>]? [at <position>]? , <color-stop-list> )",ratio:"<number [0,∞]> [/ <number [0,∞]>]?","relative-selector":"<combinator>? <complex-selector>","relative-selector-list":"<relative-selector>#","relative-size":"larger|smaller","rem()":"rem( <calc-sum> , <calc-sum> )","repeat-style":"repeat-x|repeat-y|[repeat|space|round|no-repeat]{1,2}","repeating-conic-gradient()":"repeating-conic-gradient( [from <angle>]? [at <position>]? , <angular-color-stop-list> )","repeating-linear-gradient()":"repeating-linear-gradient( [<angle>|to <side-or-corner>]? , <color-stop-list> )","repeating-radial-gradient()":"repeating-radial-gradient( [<ending-shape>||<size>]? [at <position>]? , <color-stop-list> )","reversed-counter-name":"reversed( <counter-name> )","rgb()":"rgb( <percentage>{3} [/ <alpha-value>]? )|rgb( <number>{3} [/ <alpha-value>]? )|rgb( <percentage>#{3} , <alpha-value>? )|rgb( <number>#{3} , <alpha-value>? )","rgba()":"rgba( <percentage>{3} [/ <alpha-value>]? )|rgba( <number>{3} [/ <alpha-value>]? )|rgba( <percentage>#{3} , <alpha-value>? )|rgba( <number>#{3} , <alpha-value>? )","rotate()":"rotate( [<angle>|<zero>] )","rotate3d()":"rotate3d( <number> , <number> , <number> , [<angle>|<zero>] )","rotateX()":"rotateX( [<angle>|<zero>] )","rotateY()":"rotateY( [<angle>|<zero>] )","rotateZ()":"rotateZ( [<angle>|<zero>] )","round()":"round( <rounding-strategy>? , <calc-sum> , <calc-sum> )","rounding-strategy":"nearest|up|down|to-zero","saturate()":"saturate( <number-percentage> )","scale()":"scale( [<number>|<percentage>]#{1,2} )","scale3d()":"scale3d( [<number>|<percentage>]#{3} )","scaleX()":"scaleX( [<number>|<percentage>] )","scaleY()":"scaleY( [<number>|<percentage>] )","scaleZ()":"scaleZ( [<number>|<percentage>] )",scroller:"root|nearest","self-position":"center|start|end|self-start|self-end|flex-start|flex-end","shape-radius":"<length-percentage>|closest-side|farthest-side","sign()":"sign( <calc-sum> )","skew()":"skew( [<angle>|<zero>] , [<angle>|<zero>]? )","skewX()":"skewX( [<angle>|<zero>] )","skewY()":"skewY( [<angle>|<zero>] )","sepia()":"sepia( <number-percentage> )",shadow:"inset?&&<length>{2,4}&&<color>?","shadow-t":"[<length>{2,3}&&<color>?]",shape:"rect( <top> , <right> , <bottom> , <left> )|rect( <top> <right> <bottom> <left> )","shape-box":"<box>|margin-box","side-or-corner":"[left|right]||[top|bottom]","sin()":"sin( <calc-sum> )","single-animation":"<time>||<easing-function>||<time>||<single-animation-iteration-count>||<single-animation-direction>||<single-animation-fill-mode>||<single-animation-play-state>||[none|<keyframes-name>]","single-animation-direction":"normal|reverse|alternate|alternate-reverse","single-animation-fill-mode":"none|forwards|backwards|both","single-animation-iteration-count":"infinite|<number>","single-animation-play-state":"running|paused","single-animation-timeline":"auto|none|<timeline-name>|scroll( <axis>? <scroller>? )","single-transition":"[none|<single-transition-property>]||<time>||<easing-function>||<time>","single-transition-property":"all|<custom-ident>",size:"closest-side|farthest-side|closest-corner|farthest-corner|<length>|<length-percentage>{2}","sqrt()":"sqrt( <calc-sum> )","step-position":"jump-start|jump-end|jump-none|jump-both|start|end","step-timing-function":"step-start|step-end|steps( <integer> [, <step-position>]? )","subclass-selector":"<id-selector>|<class-selector>|<attribute-selector>|<pseudo-class-selector>","supports-condition":"not <supports-in-parens>|<supports-in-parens> [and <supports-in-parens>]*|<supports-in-parens> [or <supports-in-parens>]*","supports-in-parens":"( <supports-condition> )|<supports-feature>|<general-enclosed>","supports-feature":"<supports-decl>|<supports-selector-fn>","supports-decl":"( <declaration> )","supports-selector-fn":"selector( <complex-selector> )",symbol:"<string>|<image>|<custom-ident>","tan()":"tan( <calc-sum> )",target:"<target-counter()>|<target-counters()>|<target-text()>","target-counter()":"target-counter( [<string>|<url>] , <custom-ident> , <counter-style>? )","target-counters()":"target-counters( [<string>|<url>] , <custom-ident> , <string> , <counter-style>? )","target-text()":"target-text( [<string>|<url>] , [content|before|after|first-letter]? )","time-percentage":"<time>|<percentage>","timeline-name":"<custom-ident>|<string>","easing-function":"linear|<cubic-bezier-timing-function>|<step-timing-function>","track-breadth":"<length-percentage>|<flex>|min-content|max-content|auto","track-list":"[<line-names>? [<track-size>|<track-repeat>]]+ <line-names>?","track-repeat":"repeat( [<integer [1,∞]>] , [<line-names>? <track-size>]+ <line-names>? )","track-size":"<track-breadth>|minmax( <inflexible-breadth> , <track-breadth> )|fit-content( <length-percentage> )","transform-function":"<matrix()>|<translate()>|<translateX()>|<translateY()>|<scale()>|<scaleX()>|<scaleY()>|<rotate()>|<skew()>|<skewX()>|<skewY()>|<matrix3d()>|<translate3d()>|<translateZ()>|<scale3d()>|<scaleZ()>|<rotate3d()>|<rotateX()>|<rotateY()>|<rotateZ()>|<perspective()>","transform-list":"<transform-function>+","translate()":"translate( <length-percentage> , <length-percentage>? )","translate3d()":"translate3d( <length-percentage> , <length-percentage> , <length> )","translateX()":"translateX( <length-percentage> )","translateY()":"translateY( <length-percentage> )","translateZ()":"translateZ( <length> )","type-or-unit":"string|color|url|integer|number|length|angle|time|frequency|cap|ch|em|ex|ic|lh|rlh|rem|vb|vi|vw|vh|vmin|vmax|mm|Q|cm|in|pt|pc|px|deg|grad|rad|turn|ms|s|Hz|kHz|%","type-selector":"<wq-name>|<ns-prefix>? '*'","var()":"var( <custom-property-name> , <declaration-value>? )","viewport-length":"auto|<length-percentage>","visual-box":"content-box|padding-box|border-box","wq-name":"<ns-prefix>? <ident-token>","-legacy-gradient":"<-webkit-gradient()>|<-legacy-linear-gradient>|<-legacy-repeating-linear-gradient>|<-legacy-radial-gradient>|<-legacy-repeating-radial-gradient>","-legacy-linear-gradient":"-moz-linear-gradient( <-legacy-linear-gradient-arguments> )|-webkit-linear-gradient( <-legacy-linear-gradient-arguments> )|-o-linear-gradient( <-legacy-linear-gradient-arguments> )","-legacy-repeating-linear-gradient":"-moz-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )|-webkit-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )|-o-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )","-legacy-linear-gradient-arguments":"[<angle>|<side-or-corner>]? , <color-stop-list>","-legacy-radial-gradient":"-moz-radial-gradient( <-legacy-radial-gradient-arguments> )|-webkit-radial-gradient( <-legacy-radial-gradient-arguments> )|-o-radial-gradient( <-legacy-radial-gradient-arguments> )","-legacy-repeating-radial-gradient":"-moz-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )|-webkit-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )|-o-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )","-legacy-radial-gradient-arguments":"[<position> ,]? [[[<-legacy-radial-gradient-shape>||<-legacy-radial-gradient-size>]|[<length>|<percentage>]{2}] ,]? <color-stop-list>","-legacy-radial-gradient-size":"closest-side|closest-corner|farthest-side|farthest-corner|contain|cover","-legacy-radial-gradient-shape":"circle|ellipse","-non-standard-font":"-apple-system-body|-apple-system-headline|-apple-system-subheadline|-apple-system-caption1|-apple-system-caption2|-apple-system-footnote|-apple-system-short-body|-apple-system-short-headline|-apple-system-short-subheadline|-apple-system-short-caption1|-apple-system-short-footnote|-apple-system-tall-body","-non-standard-color":"-moz-ButtonDefault|-moz-ButtonHoverFace|-moz-ButtonHoverText|-moz-CellHighlight|-moz-CellHighlightText|-moz-Combobox|-moz-ComboboxText|-moz-Dialog|-moz-DialogText|-moz-dragtargetzone|-moz-EvenTreeRow|-moz-Field|-moz-FieldText|-moz-html-CellHighlight|-moz-html-CellHighlightText|-moz-mac-accentdarkestshadow|-moz-mac-accentdarkshadow|-moz-mac-accentface|-moz-mac-accentlightesthighlight|-moz-mac-accentlightshadow|-moz-mac-accentregularhighlight|-moz-mac-accentregularshadow|-moz-mac-chrome-active|-moz-mac-chrome-inactive|-moz-mac-focusring|-moz-mac-menuselect|-moz-mac-menushadow|-moz-mac-menutextselect|-moz-MenuHover|-moz-MenuHoverText|-moz-MenuBarText|-moz-MenuBarHoverText|-moz-nativehyperlinktext|-moz-OddTreeRow|-moz-win-communicationstext|-moz-win-mediatext|-moz-activehyperlinktext|-moz-default-background-color|-moz-default-color|-moz-hyperlinktext|-moz-visitedhyperlinktext|-webkit-activelink|-webkit-focus-ring-color|-webkit-link|-webkit-text","-non-standard-image-rendering":"optimize-contrast|-moz-crisp-edges|-o-crisp-edges|-webkit-optimize-contrast","-non-standard-overflow":"-moz-scrollbars-none|-moz-scrollbars-horizontal|-moz-scrollbars-vertical|-moz-hidden-unscrollable","-non-standard-width":"fill-available|min-intrinsic|intrinsic|-moz-available|-moz-fit-content|-moz-min-content|-moz-max-content|-webkit-min-content|-webkit-max-content","-webkit-gradient()":"-webkit-gradient( <-webkit-gradient-type> , <-webkit-gradient-point> [, <-webkit-gradient-point>|, <-webkit-gradient-radius> , <-webkit-gradient-point>] [, <-webkit-gradient-radius>]? [, <-webkit-gradient-color-stop>]* )","-webkit-gradient-color-stop":"from( <color> )|color-stop( [<number-zero-one>|<percentage>] , <color> )|to( <color> )","-webkit-gradient-point":"[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]","-webkit-gradient-radius":"<length>|<percentage>","-webkit-gradient-type":"linear|radial","-webkit-mask-box-repeat":"repeat|stretch|round","-webkit-mask-clip-style":"border|border-box|padding|padding-box|content|content-box|text","-ms-filter-function-list":"<-ms-filter-function>+","-ms-filter-function":"<-ms-filter-function-progid>|<-ms-filter-function-legacy>","-ms-filter-function-progid":"'progid:' [<ident-token> '.']* [<ident-token>|<function-token> <any-value>? )]","-ms-filter-function-legacy":"<ident-token>|<function-token> <any-value>? )","-ms-filter":"<string>",age:"child|young|old","attr-name":"<wq-name>","attr-fallback":"<any-value>","bg-clip":"<box>|border|text",bottom:"<length>|auto","generic-voice":"[<age>? <gender> <integer>?]",gender:"male|female|neutral",left:"<length>|auto","mask-image":"<mask-reference>#",paint:"none|<color>|<url> [none|<color>]?|context-fill|context-stroke",right:"<length>|auto","single-animation-composition":"replace|add|accumulate","svg-length":"<percentage>|<length>|<number>","svg-writing-mode":"lr-tb|rl-tb|tb-rl|lr|rl|tb",top:"<length>|auto",x:"<number>",y:"<number>",declaration:"<ident-token> : <declaration-value>? ['!' important]?","declaration-list":"[<declaration>? ';']* <declaration>?",url:"url( <string> <url-modifier>* )|<url-token>","url-modifier":"<ident>|<function-token> <any-value> )","number-zero-one":"<number [0,1]>","number-one-or-greater":"<number [1,∞]>","-non-standard-display":"-ms-inline-flexbox|-ms-grid|-ms-inline-grid|-webkit-flex|-webkit-inline-flex|-webkit-box|-webkit-inline-box|-moz-inline-stack|-moz-box|-moz-inline-box"},properties:{"--*":"<declaration-value>","-ms-accelerator":"false|true","-ms-block-progression":"tb|rl|bt|lr","-ms-content-zoom-chaining":"none|chained","-ms-content-zooming":"none|zoom","-ms-content-zoom-limit":"<'-ms-content-zoom-limit-min'> <'-ms-content-zoom-limit-max'>","-ms-content-zoom-limit-max":"<percentage>","-ms-content-zoom-limit-min":"<percentage>","-ms-content-zoom-snap":"<'-ms-content-zoom-snap-type'>||<'-ms-content-zoom-snap-points'>","-ms-content-zoom-snap-points":"snapInterval( <percentage> , <percentage> )|snapList( <percentage># )","-ms-content-zoom-snap-type":"none|proximity|mandatory","-ms-filter":"<string>","-ms-flow-from":"[none|<custom-ident>]#","-ms-flow-into":"[none|<custom-ident>]#","-ms-grid-columns":"none|<track-list>|<auto-track-list>","-ms-grid-rows":"none|<track-list>|<auto-track-list>","-ms-high-contrast-adjust":"auto|none","-ms-hyphenate-limit-chars":"auto|<integer>{1,3}","-ms-hyphenate-limit-lines":"no-limit|<integer>","-ms-hyphenate-limit-zone":"<percentage>|<length>","-ms-ime-align":"auto|after","-ms-overflow-style":"auto|none|scrollbar|-ms-autohiding-scrollbar","-ms-scrollbar-3dlight-color":"<color>","-ms-scrollbar-arrow-color":"<color>","-ms-scrollbar-base-color":"<color>","-ms-scrollbar-darkshadow-color":"<color>","-ms-scrollbar-face-color":"<color>","-ms-scrollbar-highlight-color":"<color>","-ms-scrollbar-shadow-color":"<color>","-ms-scrollbar-track-color":"<color>","-ms-scroll-chaining":"chained|none","-ms-scroll-limit":"<'-ms-scroll-limit-x-min'> <'-ms-scroll-limit-y-min'> <'-ms-scroll-limit-x-max'> <'-ms-scroll-limit-y-max'>","-ms-scroll-limit-x-max":"auto|<length>","-ms-scroll-limit-x-min":"<length>","-ms-scroll-limit-y-max":"auto|<length>","-ms-scroll-limit-y-min":"<length>","-ms-scroll-rails":"none|railed","-ms-scroll-snap-points-x":"snapInterval( <length-percentage> , <length-percentage> )|snapList( <length-percentage># )","-ms-scroll-snap-points-y":"snapInterval( <length-percentage> , <length-percentage> )|snapList( <length-percentage># )","-ms-scroll-snap-type":"none|proximity|mandatory","-ms-scroll-snap-x":"<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-x'>","-ms-scroll-snap-y":"<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-y'>","-ms-scroll-translation":"none|vertical-to-horizontal","-ms-text-autospace":"none|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space","-ms-touch-select":"grippers|none","-ms-user-select":"none|element|text","-ms-wrap-flow":"auto|both|start|end|maximum|clear","-ms-wrap-margin":"<length>","-ms-wrap-through":"wrap|none","-moz-appearance":"none|button|button-arrow-down|button-arrow-next|button-arrow-previous|button-arrow-up|button-bevel|button-focus|caret|checkbox|checkbox-container|checkbox-label|checkmenuitem|dualbutton|groupbox|listbox|listitem|menuarrow|menubar|menucheckbox|menuimage|menuitem|menuitemtext|menulist|menulist-button|menulist-text|menulist-textfield|menupopup|menuradio|menuseparator|meterbar|meterchunk|progressbar|progressbar-vertical|progresschunk|progresschunk-vertical|radio|radio-container|radio-label|radiomenuitem|range|range-thumb|resizer|resizerpanel|scale-horizontal|scalethumbend|scalethumb-horizontal|scalethumbstart|scalethumbtick|scalethumb-vertical|scale-vertical|scrollbarbutton-down|scrollbarbutton-left|scrollbarbutton-right|scrollbarbutton-up|scrollbarthumb-horizontal|scrollbarthumb-vertical|scrollbartrack-horizontal|scrollbartrack-vertical|searchfield|separator|sheet|spinner|spinner-downbutton|spinner-textfield|spinner-upbutton|splitter|statusbar|statusbarpanel|tab|tabpanel|tabpanels|tab-scroll-arrow-back|tab-scroll-arrow-forward|textfield|textfield-multiline|toolbar|toolbarbutton|toolbarbutton-dropdown|toolbargripper|toolbox|tooltip|treeheader|treeheadercell|treeheadersortarrow|treeitem|treeline|treetwisty|treetwistyopen|treeview|-moz-mac-unified-toolbar|-moz-win-borderless-glass|-moz-win-browsertabbar-toolbox|-moz-win-communicationstext|-moz-win-communications-toolbox|-moz-win-exclude-glass|-moz-win-glass|-moz-win-mediatext|-moz-win-media-toolbox|-moz-window-button-box|-moz-window-button-box-maximized|-moz-window-button-close|-moz-window-button-maximize|-moz-window-button-minimize|-moz-window-button-restore|-moz-window-frame-bottom|-moz-window-frame-left|-moz-window-frame-right|-moz-window-titlebar|-moz-window-titlebar-maximized","-moz-binding":"<url>|none","-moz-border-bottom-colors":"<color>+|none","-moz-border-left-colors":"<color>+|none","-moz-border-right-colors":"<color>+|none","-moz-border-top-colors":"<color>+|none","-moz-context-properties":"none|[fill|fill-opacity|stroke|stroke-opacity]#","-moz-float-edge":"border-box|content-box|margin-box|padding-box","-moz-force-broken-image-icon":"0|1","-moz-image-region":"<shape>|auto","-moz-orient":"inline|block|horizontal|vertical","-moz-outline-radius":"<outline-radius>{1,4} [/ <outline-radius>{1,4}]?","-moz-outline-radius-bottomleft":"<outline-radius>","-moz-outline-radius-bottomright":"<outline-radius>","-moz-outline-radius-topleft":"<outline-radius>","-moz-outline-radius-topright":"<outline-radius>","-moz-stack-sizing":"ignore|stretch-to-fit","-moz-text-blink":"none|blink","-moz-user-focus":"ignore|normal|select-after|select-before|select-menu|select-same|select-all|none","-moz-user-input":"auto|none|enabled|disabled","-moz-user-modify":"read-only|read-write|write-only","-moz-window-dragging":"drag|no-drag","-moz-window-shadow":"default|menu|tooltip|sheet|none","-webkit-appearance":"none|button|button-bevel|caps-lock-indicator|caret|checkbox|default-button|inner-spin-button|listbox|listitem|media-controls-background|media-controls-fullscreen-background|media-current-time-display|media-enter-fullscreen-button|media-exit-fullscreen-button|media-fullscreen-button|media-mute-button|media-overlay-play-button|media-play-button|media-seek-back-button|media-seek-forward-button|media-slider|media-sliderthumb|media-time-remaining-display|media-toggle-closed-captions-button|media-volume-slider|media-volume-slider-container|media-volume-sliderthumb|menulist|menulist-button|menulist-text|menulist-textfield|meter|progress-bar|progress-bar-value|push-button|radio|scrollbarbutton-down|scrollbarbutton-left|scrollbarbutton-right|scrollbarbutton-up|scrollbargripper-horizontal|scrollbargripper-vertical|scrollbarthumb-horizontal|scrollbarthumb-vertical|scrollbartrack-horizontal|scrollbartrack-vertical|searchfield|searchfield-cancel-button|searchfield-decoration|searchfield-results-button|searchfield-results-decoration|slider-horizontal|slider-vertical|sliderthumb-horizontal|sliderthumb-vertical|square-button|textarea|textfield|-apple-pay-button","-webkit-border-before":"<'border-width'>||<'border-style'>||<color>","-webkit-border-before-color":"<color>","-webkit-border-before-style":"<'border-style'>","-webkit-border-before-width":"<'border-width'>","-webkit-box-reflect":"[above|below|right|left]? <length>? <image>?","-webkit-line-clamp":"none|<integer>","-webkit-mask":"[<mask-reference>||<position> [/ <bg-size>]?||<repeat-style>||[<box>|border|padding|content|text]||[<box>|border|padding|content]]#","-webkit-mask-attachment":"<attachment>#","-webkit-mask-clip":"[<box>|border|padding|content|text]#","-webkit-mask-composite":"<composite-style>#","-webkit-mask-image":"<mask-reference>#","-webkit-mask-origin":"[<box>|border|padding|content]#","-webkit-mask-position":"<position>#","-webkit-mask-position-x":"[<length-percentage>|left|center|right]#","-webkit-mask-position-y":"[<length-percentage>|top|center|bottom]#","-webkit-mask-repeat":"<repeat-style>#","-webkit-mask-repeat-x":"repeat|no-repeat|space|round","-webkit-mask-repeat-y":"repeat|no-repeat|space|round","-webkit-mask-size":"<bg-size>#","-webkit-overflow-scrolling":"auto|touch","-webkit-tap-highlight-color":"<color>","-webkit-text-fill-color":"<color>","-webkit-text-stroke":"<length>||<color>","-webkit-text-stroke-color":"<color>","-webkit-text-stroke-width":"<length>","-webkit-touch-callout":"default|none","-webkit-user-modify":"read-only|read-write|read-write-plaintext-only","accent-color":"auto|<color>","align-content":"normal|<baseline-position>|<content-distribution>|<overflow-position>? <content-position>","align-items":"normal|stretch|<baseline-position>|[<overflow-position>? <self-position>]","align-self":"auto|normal|stretch|<baseline-position>|<overflow-position>? <self-position>","align-tracks":"[normal|<baseline-position>|<content-distribution>|<overflow-position>? <content-position>]#",all:"initial|inherit|unset|revert|revert-layer",animation:"<single-animation>#","animation-composition":"<single-animation-composition>#","animation-delay":"<time>#","animation-direction":"<single-animation-direction>#","animation-duration":"<time>#","animation-fill-mode":"<single-animation-fill-mode>#","animation-iteration-count":"<single-animation-iteration-count>#","animation-name":"[none|<keyframes-name>]#","animation-play-state":"<single-animation-play-state>#","animation-timing-function":"<easing-function>#","animation-timeline":"<single-animation-timeline>#",appearance:"none|auto|textfield|menulist-button|<compat-auto>","aspect-ratio":"auto|<ratio>",azimuth:"<angle>|[[left-side|far-left|left|center-left|center|center-right|right|far-right|right-side]||behind]|leftwards|rightwards","backdrop-filter":"none|<filter-function-list>","backface-visibility":"visible|hidden",background:"[<bg-layer> ,]* <final-bg-layer>","background-attachment":"<attachment>#","background-blend-mode":"<blend-mode>#","background-clip":"<bg-clip>#","background-color":"<color>","background-image":"<bg-image>#","background-origin":"<box>#","background-position":"<bg-position>#","background-position-x":"[center|[[left|right|x-start|x-end]? <length-percentage>?]!]#","background-position-y":"[center|[[top|bottom|y-start|y-end]? <length-percentage>?]!]#","background-repeat":"<repeat-style>#","background-size":"<bg-size>#","block-overflow":"clip|ellipsis|<string>","block-size":"<'width'>",border:"<line-width>||<line-style>||<color>","border-block":"<'border-top-width'>||<'border-top-style'>||<color>","border-block-color":"<'border-top-color'>{1,2}","border-block-style":"<'border-top-style'>","border-block-width":"<'border-top-width'>","border-block-end":"<'border-top-width'>||<'border-top-style'>||<color>","border-block-end-color":"<'border-top-color'>","border-block-end-style":"<'border-top-style'>","border-block-end-width":"<'border-top-width'>","border-block-start":"<'border-top-width'>||<'border-top-style'>||<color>","border-block-start-color":"<'border-top-color'>","border-block-start-style":"<'border-top-style'>","border-block-start-width":"<'border-top-width'>","border-bottom":"<line-width>||<line-style>||<color>","border-bottom-color":"<'border-top-color'>","border-bottom-left-radius":"<length-percentage>{1,2}","border-bottom-right-radius":"<length-percentage>{1,2}","border-bottom-style":"<line-style>","border-bottom-width":"<line-width>","border-collapse":"collapse|separate","border-color":"<color>{1,4}","border-end-end-radius":"<length-percentage>{1,2}","border-end-start-radius":"<length-percentage>{1,2}","border-image":"<'border-image-source'>||<'border-image-slice'> [/ <'border-image-width'>|/ <'border-image-width'>? / <'border-image-outset'>]?||<'border-image-repeat'>","border-image-outset":"[<length>|<number>]{1,4}","border-image-repeat":"[stretch|repeat|round|space]{1,2}","border-image-slice":"<number-percentage>{1,4}&&fill?","border-image-source":"none|<image>","border-image-width":"[<length-percentage>|<number>|auto]{1,4}","border-inline":"<'border-top-width'>||<'border-top-style'>||<color>","border-inline-end":"<'border-top-width'>||<'border-top-style'>||<color>","border-inline-color":"<'border-top-color'>{1,2}","border-inline-style":"<'border-top-style'>","border-inline-width":"<'border-top-width'>","border-inline-end-color":"<'border-top-color'>","border-inline-end-style":"<'border-top-style'>","border-inline-end-width":"<'border-top-width'>","border-inline-start":"<'border-top-width'>||<'border-top-style'>||<color>","border-inline-start-color":"<'border-top-color'>","border-inline-start-style":"<'border-top-style'>","border-inline-start-width":"<'border-top-width'>","border-left":"<line-width>||<line-style>||<color>","border-left-color":"<color>","border-left-style":"<line-style>","border-left-width":"<line-width>","border-radius":"<length-percentage>{1,4} [/ <length-percentage>{1,4}]?","border-right":"<line-width>||<line-style>||<color>","border-right-color":"<color>","border-right-style":"<line-style>","border-right-width":"<line-width>","border-spacing":"<length> <length>?","border-start-end-radius":"<length-percentage>{1,2}","border-start-start-radius":"<length-percentage>{1,2}","border-style":"<line-style>{1,4}","border-top":"<line-width>||<line-style>||<color>","border-top-color":"<color>","border-top-left-radius":"<length-percentage>{1,2}","border-top-right-radius":"<length-percentage>{1,2}","border-top-style":"<line-style>","border-top-width":"<line-width>","border-width":"<line-width>{1,4}",bottom:"<length>|<percentage>|auto","box-align":"start|center|end|baseline|stretch","box-decoration-break":"slice|clone","box-direction":"normal|reverse|inherit","box-flex":"<number>","box-flex-group":"<integer>","box-lines":"single|multiple","box-ordinal-group":"<integer>","box-orient":"horizontal|vertical|inline-axis|block-axis|inherit","box-pack":"start|center|end|justify","box-shadow":"none|<shadow>#","box-sizing":"content-box|border-box","break-after":"auto|avoid|always|all|avoid-page|page|left|right|recto|verso|avoid-column|column|avoid-region|region","break-before":"auto|avoid|always|all|avoid-page|page|left|right|recto|verso|avoid-column|column|avoid-region|region","break-inside":"auto|avoid|avoid-page|avoid-column|avoid-region","caption-side":"top|bottom|block-start|block-end|inline-start|inline-end",caret:"<'caret-color'>||<'caret-shape'>","caret-color":"auto|<color>","caret-shape":"auto|bar|block|underscore",clear:"none|left|right|both|inline-start|inline-end",clip:"<shape>|auto","clip-path":"<clip-source>|[<basic-shape>||<geometry-box>]|none",color:"<color>","print-color-adjust":"economy|exact","color-scheme":"normal|[light|dark|<custom-ident>]+&&only?","column-count":"<integer>|auto","column-fill":"auto|balance|balance-all","column-gap":"normal|<length-percentage>","column-rule":"<'column-rule-width'>||<'column-rule-style'>||<'column-rule-color'>","column-rule-color":"<color>","column-rule-style":"<'border-style'>","column-rule-width":"<'border-width'>","column-span":"none|all","column-width":"<length>|auto",columns:"<'column-width'>||<'column-count'>",contain:"none|strict|content|[[size||inline-size]||layout||style||paint]","contain-intrinsic-size":"[none|<length>|auto <length>]{1,2}","contain-intrinsic-block-size":"none|<length>|auto <length>","contain-intrinsic-height":"none|<length>|auto <length>","contain-intrinsic-inline-size":"none|<length>|auto <length>","contain-intrinsic-width":"none|<length>|auto <length>",content:"normal|none|[<content-replacement>|<content-list>] [/ [<string>|<counter>]+]?","content-visibility":"visible|auto|hidden","counter-increment":"[<counter-name> <integer>?]+|none","counter-reset":"[<counter-name> <integer>?|<reversed-counter-name> <integer>?]+|none","counter-set":"[<counter-name> <integer>?]+|none",cursor:"[[<url> [<x> <y>]? ,]* [auto|default|none|context-menu|help|pointer|progress|wait|cell|crosshair|text|vertical-text|alias|copy|move|no-drop|not-allowed|e-resize|n-resize|ne-resize|nw-resize|s-resize|se-resize|sw-resize|w-resize|ew-resize|ns-resize|nesw-resize|nwse-resize|col-resize|row-resize|all-scroll|zoom-in|zoom-out|grab|grabbing|hand|-webkit-grab|-webkit-grabbing|-webkit-zoom-in|-webkit-zoom-out|-moz-grab|-moz-grabbing|-moz-zoom-in|-moz-zoom-out]]",direction:"ltr|rtl",display:"[<display-outside>||<display-inside>]|<display-listitem>|<display-internal>|<display-box>|<display-legacy>|<-non-standard-display>","empty-cells":"show|hide",filter:"none|<filter-function-list>|<-ms-filter-function-list>",flex:"none|[<'flex-grow'> <'flex-shrink'>?||<'flex-basis'>]","flex-basis":"content|<'width'>","flex-direction":"row|row-reverse|column|column-reverse","flex-flow":"<'flex-direction'>||<'flex-wrap'>","flex-grow":"<number>","flex-shrink":"<number>","flex-wrap":"nowrap|wrap|wrap-reverse",float:"left|right|none|inline-start|inline-end",font:"[[<'font-style'>||<font-variant-css21>||<'font-weight'>||<'font-stretch'>]? <'font-size'> [/ <'line-height'>]? <'font-family'>]|caption|icon|menu|message-box|small-caption|status-bar","font-family":"[<family-name>|<generic-family>]#","font-feature-settings":"normal|<feature-tag-value>#","font-kerning":"auto|normal|none","font-language-override":"normal|<string>","font-optical-sizing":"auto|none","font-variation-settings":"normal|[<string> <number>]#","font-size":"<absolute-size>|<relative-size>|<length-percentage>","font-size-adjust":"none|[ex-height|cap-height|ch-width|ic-width|ic-height]? [from-font|<number>]","font-smooth":"auto|never|always|<absolute-size>|<length>","font-stretch":"<font-stretch-absolute>","font-style":"normal|italic|oblique <angle>?","font-synthesis":"none|[weight||style||small-caps]","font-variant":"normal|none|[<common-lig-values>||<discretionary-lig-values>||<historical-lig-values>||<contextual-alt-values>||stylistic( <feature-value-name> )||historical-forms||styleset( <feature-value-name># )||character-variant( <feature-value-name># )||swash( <feature-value-name> )||ornaments( <feature-value-name> )||annotation( <feature-value-name> )||[small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps]||<numeric-figure-values>||<numeric-spacing-values>||<numeric-fraction-values>||ordinal||slashed-zero||<east-asian-variant-values>||<east-asian-width-values>||ruby]","font-variant-alternates":"normal|[stylistic( <feature-value-name> )||historical-forms||styleset( <feature-value-name># )||character-variant( <feature-value-name># )||swash( <feature-value-name> )||ornaments( <feature-value-name> )||annotation( <feature-value-name> )]","font-variant-caps":"normal|small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps","font-variant-east-asian":"normal|[<east-asian-variant-values>||<east-asian-width-values>||ruby]","font-variant-ligatures":"normal|none|[<common-lig-values>||<discretionary-lig-values>||<historical-lig-values>||<contextual-alt-values>]","font-variant-numeric":"normal|[<numeric-figure-values>||<numeric-spacing-values>||<numeric-fraction-values>||ordinal||slashed-zero]","font-variant-position":"normal|sub|super","font-weight":"<font-weight-absolute>|bolder|lighter","forced-color-adjust":"auto|none",gap:"<'row-gap'> <'column-gap'>?",grid:"<'grid-template'>|<'grid-template-rows'> / [auto-flow&&dense?] <'grid-auto-columns'>?|[auto-flow&&dense?] <'grid-auto-rows'>? / <'grid-template-columns'>","grid-area":"<grid-line> [/ <grid-line>]{0,3}","grid-auto-columns":"<track-size>+","grid-auto-flow":"[row|column]||dense","grid-auto-rows":"<track-size>+","grid-column":"<grid-line> [/ <grid-line>]?","grid-column-end":"<grid-line>","grid-column-gap":"<length-percentage>","grid-column-start":"<grid-line>","grid-gap":"<'grid-row-gap'> <'grid-column-gap'>?","grid-row":"<grid-line> [/ <grid-line>]?","grid-row-end":"<grid-line>","grid-row-gap":"<length-percentage>","grid-row-start":"<grid-line>","grid-template":"none|[<'grid-template-rows'> / <'grid-template-columns'>]|[<line-names>? <string> <track-size>? <line-names>?]+ [/ <explicit-track-list>]?","grid-template-areas":"none|<string>+","grid-template-columns":"none|<track-list>|<auto-track-list>|subgrid <line-name-list>?","grid-template-rows":"none|<track-list>|<auto-track-list>|subgrid <line-name-list>?","hanging-punctuation":"none|[first||[force-end|allow-end]||last]",height:"auto|<length>|<percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )","hyphenate-character":"auto|<string>",hyphens:"none|manual|auto","image-orientation":"from-image|<angle>|[<angle>? flip]","image-rendering":"auto|crisp-edges|pixelated|optimizeSpeed|optimizeQuality|<-non-standard-image-rendering>","image-resolution":"[from-image||<resolution>]&&snap?","ime-mode":"auto|normal|active|inactive|disabled","initial-letter":"normal|[<number> <integer>?]","initial-letter-align":"[auto|alphabetic|hanging|ideographic]","inline-size":"<'width'>","input-security":"auto|none",inset:"<'top'>{1,4}","inset-block":"<'top'>{1,2}","inset-block-end":"<'top'>","inset-block-start":"<'top'>","inset-inline":"<'top'>{1,2}","inset-inline-end":"<'top'>","inset-inline-start":"<'top'>",isolation:"auto|isolate","justify-content":"normal|<content-distribution>|<overflow-position>? [<content-position>|left|right]","justify-items":"normal|stretch|<baseline-position>|<overflow-position>? [<self-position>|left|right]|legacy|legacy&&[left|right|center]","justify-self":"auto|normal|stretch|<baseline-position>|<overflow-position>? [<self-position>|left|right]","justify-tracks":"[normal|<content-distribution>|<overflow-position>? [<content-position>|left|right]]#",left:"<length>|<percentage>|auto","letter-spacing":"normal|<length-percentage>","line-break":"auto|loose|normal|strict|anywhere","line-clamp":"none|<integer>","line-height":"normal|<number>|<length>|<percentage>","line-height-step":"<length>","list-style":"<'list-style-type'>||<'list-style-position'>||<'list-style-image'>","list-style-image":"<image>|none","list-style-position":"inside|outside","list-style-type":"<counter-style>|<string>|none",margin:"[<length>|<percentage>|auto]{1,4}","margin-block":"<'margin-left'>{1,2}","margin-block-end":"<'margin-left'>","margin-block-start":"<'margin-left'>","margin-bottom":"<length>|<percentage>|auto","margin-inline":"<'margin-left'>{1,2}","margin-inline-end":"<'margin-left'>","margin-inline-start":"<'margin-left'>","margin-left":"<length>|<percentage>|auto","margin-right":"<length>|<percentage>|auto","margin-top":"<length>|<percentage>|auto","margin-trim":"none|in-flow|all",mask:"<mask-layer>#","mask-border":"<'mask-border-source'>||<'mask-border-slice'> [/ <'mask-border-width'>? [/ <'mask-border-outset'>]?]?||<'mask-border-repeat'>||<'mask-border-mode'>","mask-border-mode":"luminance|alpha","mask-border-outset":"[<length>|<number>]{1,4}","mask-border-repeat":"[stretch|repeat|round|space]{1,2}","mask-border-slice":"<number-percentage>{1,4} fill?","mask-border-source":"none|<image>","mask-border-width":"[<length-percentage>|<number>|auto]{1,4}","mask-clip":"[<geometry-box>|no-clip]#","mask-composite":"<compositing-operator>#","mask-image":"<mask-reference>#","mask-mode":"<masking-mode>#","mask-origin":"<geometry-box>#","mask-position":"<position>#","mask-repeat":"<repeat-style>#","mask-size":"<bg-size>#","mask-type":"luminance|alpha","masonry-auto-flow":"[pack|next]||[definite-first|ordered]","math-depth":"auto-add|add( <integer> )|<integer>","math-shift":"normal|compact","math-style":"normal|compact","max-block-size":"<'max-width'>","max-height":"none|<length-percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )","max-inline-size":"<'max-width'>","max-lines":"none|<integer>","max-width":"none|<length-percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )|<-non-standard-width>","min-block-size":"<'min-width'>","min-height":"auto|<length>|<percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )","min-inline-size":"<'min-width'>","min-width":"auto|<length>|<percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )|<-non-standard-width>","mix-blend-mode":"<blend-mode>|plus-lighter","object-fit":"fill|contain|cover|none|scale-down","object-position":"<position>",offset:"[<'offset-position'>? [<'offset-path'> [<'offset-distance'>||<'offset-rotate'>]?]?]! [/ <'offset-anchor'>]?","offset-anchor":"auto|<position>","offset-distance":"<length-percentage>","offset-path":"none|ray( [<angle>&&<size>&&contain?] )|<path()>|<url>|[<basic-shape>||<geometry-box>]","offset-position":"auto|<position>","offset-rotate":"[auto|reverse]||<angle>",opacity:"<alpha-value>",order:"<integer>",orphans:"<integer>",outline:"[<'outline-color'>||<'outline-style'>||<'outline-width'>]","outline-color":"<color>|invert","outline-offset":"<length>","outline-style":"auto|<'border-style'>","outline-width":"<line-width>",overflow:"[visible|hidden|clip|scroll|auto]{1,2}|<-non-standard-overflow>","overflow-anchor":"auto|none","overflow-block":"visible|hidden|clip|scroll|auto","overflow-clip-box":"padding-box|content-box","overflow-clip-margin":"<visual-box>||<length [0,∞]>","overflow-inline":"visible|hidden|clip|scroll|auto","overflow-wrap":"normal|break-word|anywhere","overflow-x":"visible|hidden|clip|scroll|auto","overflow-y":"visible|hidden|clip|scroll|auto","overscroll-behavior":"[contain|none|auto]{1,2}","overscroll-behavior-block":"contain|none|auto","overscroll-behavior-inline":"contain|none|auto","overscroll-behavior-x":"contain|none|auto","overscroll-behavior-y":"contain|none|auto",padding:"[<length>|<percentage>]{1,4}","padding-block":"<'padding-left'>{1,2}","padding-block-end":"<'padding-left'>","padding-block-start":"<'padding-left'>","padding-bottom":"<length>|<percentage>","padding-inline":"<'padding-left'>{1,2}","padding-inline-end":"<'padding-left'>","padding-inline-start":"<'padding-left'>","padding-left":"<length>|<percentage>","padding-right":"<length>|<percentage>","padding-top":"<length>|<percentage>","page-break-after":"auto|always|avoid|left|right|recto|verso","page-break-before":"auto|always|avoid|left|right|recto|verso","page-break-inside":"auto|avoid","paint-order":"normal|[fill||stroke||markers]",perspective:"none|<length>","perspective-origin":"<position>","place-content":"<'align-content'> <'justify-content'>?","place-items":"<'align-items'> <'justify-items'>?","place-self":"<'align-self'> <'justify-self'>?","pointer-events":"auto|none|visiblePainted|visibleFill|visibleStroke|visible|painted|fill|stroke|all|inherit",position:"static|relative|absolute|sticky|fixed|-webkit-sticky",quotes:"none|auto|[<string> <string>]+",resize:"none|both|horizontal|vertical|block|inline",right:"<length>|<percentage>|auto",rotate:"none|<angle>|[x|y|z|<number>{3}]&&<angle>","row-gap":"normal|<length-percentage>","ruby-align":"start|center|space-between|space-around","ruby-merge":"separate|collapse|auto","ruby-position":"[alternate||[over|under]]|inter-character",scale:"none|<number>{1,3}","scrollbar-color":"auto|<color>{2}","scrollbar-gutter":"auto|stable&&both-edges?","scrollbar-width":"auto|thin|none","scroll-behavior":"auto|smooth","scroll-margin":"<length>{1,4}","scroll-margin-block":"<length>{1,2}","scroll-margin-block-start":"<length>","scroll-margin-block-end":"<length>","scroll-margin-bottom":"<length>","scroll-margin-inline":"<length>{1,2}","scroll-margin-inline-start":"<length>","scroll-margin-inline-end":"<length>","scroll-margin-left":"<length>","scroll-margin-right":"<length>","scroll-margin-top":"<length>","scroll-padding":"[auto|<length-percentage>]{1,4}","scroll-padding-block":"[auto|<length-percentage>]{1,2}","scroll-padding-block-start":"auto|<length-percentage>","scroll-padding-block-end":"auto|<length-percentage>","scroll-padding-bottom":"auto|<length-percentage>","scroll-padding-inline":"[auto|<length-percentage>]{1,2}","scroll-padding-inline-start":"auto|<length-percentage>","scroll-padding-inline-end":"auto|<length-percentage>","scroll-padding-left":"auto|<length-percentage>","scroll-padding-right":"auto|<length-percentage>","scroll-padding-top":"auto|<length-percentage>","scroll-snap-align":"[none|start|end|center]{1,2}","scroll-snap-coordinate":"none|<position>#","scroll-snap-destination":"<position>","scroll-snap-points-x":"none|repeat( <length-percentage> )","scroll-snap-points-y":"none|repeat( <length-percentage> )","scroll-snap-stop":"normal|always","scroll-snap-type":"none|[x|y|block|inline|both] [mandatory|proximity]?","scroll-snap-type-x":"none|mandatory|proximity","scroll-snap-type-y":"none|mandatory|proximity","scroll-timeline":"[<'scroll-timeline-name'>||<'scroll-timeline-axis'>]#","scroll-timeline-axis":"[block|inline|vertical|horizontal]#","scroll-timeline-name":"none|<custom-ident>#","shape-image-threshold":"<alpha-value>","shape-margin":"<length-percentage>","shape-outside":"none|[<shape-box>||<basic-shape>]|<image>","tab-size":"<integer>|<length>","table-layout":"auto|fixed","text-align":"start|end|left|right|center|justify|match-parent","text-align-last":"auto|start|end|left|right|center|justify","text-combine-upright":"none|all|[digits <integer>?]","text-decoration":"<'text-decoration-line'>||<'text-decoration-style'>||<'text-decoration-color'>||<'text-decoration-thickness'>","text-decoration-color":"<color>","text-decoration-line":"none|[underline||overline||line-through||blink]|spelling-error|grammar-error","text-decoration-skip":"none|[objects||[spaces|[leading-spaces||trailing-spaces]]||edges||box-decoration]","text-decoration-skip-ink":"auto|all|none","text-decoration-style":"solid|double|dotted|dashed|wavy","text-decoration-thickness":"auto|from-font|<length>|<percentage>","text-emphasis":"<'text-emphasis-style'>||<'text-emphasis-color'>","text-emphasis-color":"<color>","text-emphasis-position":"[over|under]&&[right|left]","text-emphasis-style":"none|[[filled|open]||[dot|circle|double-circle|triangle|sesame]]|<string>","text-indent":"<length-percentage>&&hanging?&&each-line?","text-justify":"auto|inter-character|inter-word|none","text-orientation":"mixed|upright|sideways","text-overflow":"[clip|ellipsis|<string>]{1,2}","text-rendering":"auto|optimizeSpeed|optimizeLegibility|geometricPrecision","text-shadow":"none|<shadow-t>#","text-size-adjust":"none|auto|<percentage>","text-transform":"none|capitalize|uppercase|lowercase|full-width|full-size-kana","text-underline-offset":"auto|<length>|<percentage>","text-underline-position":"auto|from-font|[under||[left|right]]",top:"<length>|<percentage>|auto","touch-action":"auto|none|[[pan-x|pan-left|pan-right]||[pan-y|pan-up|pan-down]||pinch-zoom]|manipulation",transform:"none|<transform-list>","transform-box":"content-box|border-box|fill-box|stroke-box|view-box","transform-origin":"[<length-percentage>|left|center|right|top|bottom]|[[<length-percentage>|left|center|right]&&[<length-percentage>|top|center|bottom]] <length>?","transform-style":"flat|preserve-3d",transition:"<single-transition>#","transition-delay":"<time>#","transition-duration":"<time>#","transition-property":"none|<single-transition-property>#","transition-timing-function":"<easing-function>#",translate:"none|<length-percentage> [<length-percentage> <length>?]?","unicode-bidi":"normal|embed|isolate|bidi-override|isolate-override|plaintext|-moz-isolate|-moz-isolate-override|-moz-plaintext|-webkit-isolate|-webkit-isolate-override|-webkit-plaintext","user-select":"auto|text|none|contain|all","vertical-align":"baseline|sub|super|text-top|text-bottom|middle|top|bottom|<percentage>|<length>",visibility:"visible|hidden|collapse","white-space":"normal|pre|nowrap|pre-wrap|pre-line|break-spaces",widows:"<integer>",width:"auto|<length>|<percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )|fill|stretch|intrinsic|-moz-max-content|-webkit-max-content|-moz-fit-content|-webkit-fit-content","will-change":"auto|<animateable-feature>#","word-break":"normal|break-all|keep-all|break-word","word-spacing":"normal|<length>","word-wrap":"normal|break-word","writing-mode":"horizontal-tb|vertical-rl|vertical-lr|sideways-rl|sideways-lr|<svg-writing-mode>","z-index":"auto|<integer>",zoom:"normal|reset|<number>|<percentage>","-moz-background-clip":"padding|border","-moz-border-radius-bottomleft":"<'border-bottom-left-radius'>","-moz-border-radius-bottomright":"<'border-bottom-right-radius'>","-moz-border-radius-topleft":"<'border-top-left-radius'>","-moz-border-radius-topright":"<'border-bottom-right-radius'>","-moz-control-character-visibility":"visible|hidden","-moz-osx-font-smoothing":"auto|grayscale","-moz-user-select":"none|text|all|-moz-none","-ms-flex-align":"start|end|center|baseline|stretch","-ms-flex-item-align":"auto|start|end|center|baseline|stretch","-ms-flex-line-pack":"start|end|center|justify|distribute|stretch","-ms-flex-negative":"<'flex-shrink'>","-ms-flex-pack":"start|end|center|justify|distribute","-ms-flex-order":"<integer>","-ms-flex-positive":"<'flex-grow'>","-ms-flex-preferred-size":"<'flex-basis'>","-ms-interpolation-mode":"nearest-neighbor|bicubic","-ms-grid-column-align":"start|end|center|stretch","-ms-grid-row-align":"start|end|center|stretch","-ms-hyphenate-limit-last":"none|always|column|page|spread","-webkit-background-clip":"[<box>|border|padding|content|text]#","-webkit-column-break-after":"always|auto|avoid","-webkit-column-break-before":"always|auto|avoid","-webkit-column-break-inside":"always|auto|avoid","-webkit-font-smoothing":"auto|none|antialiased|subpixel-antialiased","-webkit-mask-box-image":"[<url>|<gradient>|none] [<length-percentage>{4} <-webkit-mask-box-repeat>{2}]?","-webkit-print-color-adjust":"economy|exact","-webkit-text-security":"none|circle|disc|square","-webkit-user-drag":"none|element|auto","-webkit-user-select":"auto|none|text|all","alignment-baseline":"auto|baseline|before-edge|text-before-edge|middle|central|after-edge|text-after-edge|ideographic|alphabetic|hanging|mathematical","baseline-shift":"baseline|sub|super|<svg-length>",behavior:"<url>+","clip-rule":"nonzero|evenodd",cue:"<'cue-before'> <'cue-after'>?","cue-after":"<url> <decibel>?|none","cue-before":"<url> <decibel>?|none","dominant-baseline":"auto|use-script|no-change|reset-size|ideographic|alphabetic|hanging|mathematical|central|middle|text-after-edge|text-before-edge",fill:"<paint>","fill-opacity":"<number-zero-one>","fill-rule":"nonzero|evenodd","glyph-orientation-horizontal":"<angle>","glyph-orientation-vertical":"<angle>",kerning:"auto|<svg-length>",marker:"none|<url>","marker-end":"none|<url>","marker-mid":"none|<url>","marker-start":"none|<url>",pause:"<'pause-before'> <'pause-after'>?","pause-after":"<time>|none|x-weak|weak|medium|strong|x-strong","pause-before":"<time>|none|x-weak|weak|medium|strong|x-strong",rest:"<'rest-before'> <'rest-after'>?","rest-after":"<time>|none|x-weak|weak|medium|strong|x-strong","rest-before":"<time>|none|x-weak|weak|medium|strong|x-strong","shape-rendering":"auto|optimizeSpeed|crispEdges|geometricPrecision",src:"[<url> [format( <string># )]?|local( <family-name> )]#",speak:"auto|none|normal","speak-as":"normal|spell-out||digits||[literal-punctuation|no-punctuation]",stroke:"<paint>","stroke-dasharray":"none|[<svg-length>+]#","stroke-dashoffset":"<svg-length>","stroke-linecap":"butt|round|square","stroke-linejoin":"miter|round|bevel","stroke-miterlimit":"<number-one-or-greater>","stroke-opacity":"<number-zero-one>","stroke-width":"<svg-length>","text-anchor":"start|middle|end","unicode-range":"<urange>#","voice-balance":"<number>|left|center|right|leftwards|rightwards","voice-duration":"auto|<time>","voice-family":"[[<family-name>|<generic-voice>] ,]* [<family-name>|<generic-voice>]|preserve","voice-pitch":"<frequency>&&absolute|[[x-low|low|medium|high|x-high]||[<frequency>|<semitones>|<percentage>]]","voice-range":"<frequency>&&absolute|[[x-low|low|medium|high|x-high]||[<frequency>|<semitones>|<percentage>]]","voice-rate":"[normal|x-slow|slow|medium|fast|x-fast]||<percentage>","voice-stress":"normal|strong|moderate|none|reduced","voice-volume":"silent|[[x-soft|soft|medium|loud|x-loud]||<decibel>]"},atrules:{charset:{prelude:"<string>",descriptors:null},"counter-style":{prelude:"<counter-style-name>",descriptors:{"additive-symbols":"[<integer>&&<symbol>]#",fallback:"<counter-style-name>",negative:"<symbol> <symbol>?",pad:"<integer>&&<symbol>",prefix:"<symbol>",range:"[[<integer>|infinite]{2}]#|auto","speak-as":"auto|bullets|numbers|words|spell-out|<counter-style-name>",suffix:"<symbol>",symbols:"<symbol>+",system:"cyclic|numeric|alphabetic|symbolic|additive|[fixed <integer>?]|[extends <counter-style-name>]"}},document:{prelude:"[<url>|url-prefix( <string> )|domain( <string> )|media-document( <string> )|regexp( <string> )]#",descriptors:null},"font-face":{prelude:null,descriptors:{"ascent-override":"normal|<percentage>","descent-override":"normal|<percentage>","font-display":"[auto|block|swap|fallback|optional]","font-family":"<family-name>","font-feature-settings":"normal|<feature-tag-value>#","font-variation-settings":"normal|[<string> <number>]#","font-stretch":"<font-stretch-absolute>{1,2}","font-style":"normal|italic|oblique <angle>{0,2}","font-weight":"<font-weight-absolute>{1,2}","font-variant":"normal|none|[<common-lig-values>||<discretionary-lig-values>||<historical-lig-values>||<contextual-alt-values>||stylistic( <feature-value-name> )||historical-forms||styleset( <feature-value-name># )||character-variant( <feature-value-name># )||swash( <feature-value-name> )||ornaments( <feature-value-name> )||annotation( <feature-value-name> )||[small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps]||<numeric-figure-values>||<numeric-spacing-values>||<numeric-fraction-values>||ordinal||slashed-zero||<east-asian-variant-values>||<east-asian-width-values>||ruby]","line-gap-override":"normal|<percentage>","size-adjust":"<percentage>",src:"[<url> [format( <string># )]?|local( <family-name> )]#","unicode-range":"<urange>#"}},"font-feature-values":{prelude:"<family-name>#",descriptors:null},import:{prelude:"[<string>|<url>] [layer|layer( <layer-name> )]? [supports( [<supports-condition>|<declaration>] )]? <media-query-list>?",descriptors:null},keyframes:{prelude:"<keyframes-name>",descriptors:null},layer:{prelude:"[<layer-name>#|<layer-name>?]",descriptors:null},media:{prelude:"<media-query-list>",descriptors:null},namespace:{prelude:"<namespace-prefix>? [<string>|<url>]",descriptors:null},page:{prelude:"<page-selector-list>",descriptors:{bleed:"auto|<length>",marks:"none|[crop||cross]",size:"<length>{1,2}|auto|[<page-size>||[portrait|landscape]]"}},property:{prelude:"<custom-property-name>",descriptors:{syntax:"<string>",inherits:"true|false","initial-value":"<string>"}},"scroll-timeline":{prelude:"<timeline-name>",descriptors:null},supports:{prelude:"<supports-condition>",descriptors:null},viewport:{prelude:null,descriptors:{height:"<viewport-length>{1,2}","max-height":"<viewport-length>","max-width":"<viewport-length>","max-zoom":"auto|<number>|<percentage>","min-height":"<viewport-length>","min-width":"<viewport-length>","min-zoom":"auto|<number>|<percentage>",orientation:"auto|portrait|landscape","user-zoom":"zoom|fixed","viewport-fit":"auto|contain|cover",width:"<viewport-length>{1,2}",zoom:"auto|<number>|<percentage>"}},nest:{prelude:"<complex-selector-list>",descriptors:null}},node:oh},Db={};gs(Db,{AtrulePrelude:()=>Ub,Selector:()=>Mb,Value:()=>Fb});function Nb(e){switch(this.tokenType){case 4:return this.Hash();case 18:return this.Operator();case 21:return this.Parentheses(this.readSequence,e.recognizer);case 19:return this.Brackets(this.readSequence,e.recognizer);case 5:return this.String();case 12:return this.Dimension();case 11:return this.Percentage();case 10:return this.Number();case 2:return this.cmpStr(this.tokenStart,this.tokenEnd,"url(")?this.Url():this.Function(this.readSequence,e.recognizer);case 7:return this.Url();case 1:return this.cmpChar(this.tokenStart,117)&&this.cmpChar(this.tokenStart+1,43)?this.UnicodeRange():this.Identifier();case 9:{let e=this.charCodeAt(this.tokenStart);if(47===e||42===e||43===e||45===e)return this.Operator();35===e&&this.error("Hex or identifier is expected",this.tokenStart+1);break}}}var Ub={getNode:Nb};var Mb={onWhiteSpace:function(e,t){null!==t.last&&"Combinator"!==t.last.type&&null!==e&&"Combinator"!==e.type&&t.push({type:"Combinator",loc:null,name:" "})},getNode:function(){switch(this.tokenType){case 19:return this.AttributeSelector();case 4:return this.IdSelector();case 16:return 16===this.lookupType(1)?this.PseudoElementSelector():this.PseudoClassSelector();case 1:return this.TypeSelector();case 10:case 11:return this.Percentage();case 12:46===this.charCodeAt(this.tokenStart)&&this.error("Identifier is expected",this.tokenStart+1);break;case 9:switch(this.charCodeAt(this.tokenStart)){case 43:case 62:case 126:case 47:return this.Combinator();case 46:return this.ClassSelector();case 42:case 124:return this.TypeSelector();case 35:return this.IdSelector();case 38:return this.NestingSelector()}}}};function Ob(e){return null!==e&&"Operator"===e.type&&("-"===e.value[e.value.length-1]||"+"===e.value[e.value.length-1])}var Fb={getNode:Nb,onWhiteSpace(e,t){Ob(e)&&(e.value=" "+e.value),Ob(t.last)&&(t.last.value+=" ")},expression:function(){return this.createSingleNodeList(this.Raw(this.tokenIndex,null,!1))},var:function(){let e=this.createList();if(this.skipSC(),e.push(this.Identifier()),this.skipSC(),18===this.tokenType){e.push(this.Operator());let t=this.tokenIndex,n=this.parseCustomProperty?this.Value(null):this.Raw(this.tokenIndex,this.consumeUntilExclamationMarkOrSemicolon,!1);if("Value"===n.type&&n.children.isEmpty)for(let e=t-this.tokenIndex;e<=0;e++)if(13===this.lookupType(e)){n.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}e.push(n)}return e}},qb={parse:{prelude(){let e=this.createList();switch(this.skipSC(),this.tokenType){case 5:e.push(this.String());break;case 7:case 2:e.push(this.Url());break;default:this.error("String or url() is expected")}return(1===this.lookupNonWSType(0)||21===this.lookupNonWSType(0))&&e.push(this.MediaQueryList()),e},block:null}},Bb={parse:{prelude(){return this.createSingleNodeList(this.MediaQueryList())},block(e=!1){return this.Block(e)}}};function jb(){return this.createSingleNodeList(this.Raw(this.tokenIndex,null,!1))}function Hb(){return this.skipSC(),1===this.tokenType&&16===this.lookupNonWSType(1)?this.createSingleNodeList(this.Declaration()):Wb.call(this)}function Wb(){let e,t=this.createList();this.skipSC();e:for(;!this.eof;){switch(this.tokenType){case 25:case 13:this.next();continue;case 2:e=this.Function(jb,this.scope.AtrulePrelude);break;case 1:e=this.Identifier();break;case 21:e=this.Parentheses(Hb,this.scope.AtrulePrelude);break;default:break e}t.push(e)}return t}var Vb={parse:{prelude(){let e=Wb.call(this);return null===this.getFirstListNode(e)&&this.error("Condition is expected"),e},block(e=!1){return this.Block(e)}}},Kb={"font-face":{parse:{prelude:null,block(){return this.Block(!0)}}},import:qb,media:Bb,nest:{parse:{prelude(){return this.createSingleNodeList(this.SelectorList())},block(){return this.Block(!0)}}},page:{parse:{prelude(){return this.createSingleNodeList(this.SelectorList())},block(){return this.Block(!0)}}},supports:Vb},$b={parse(){return this.createSingleNodeList(this.SelectorList())}},Gb={parse(){return this.createSingleNodeList(this.Selector())}},Yb={parse(){return this.createSingleNodeList(this.Identifier())}},Jb={parse(){return this.createSingleNodeList(this.Nth())}},Qb={dir:Yb,has:$b,lang:Yb,matches:$b,is:$b,"-moz-any":$b,"-webkit-any":$b,where:$b,not:$b,"nth-child":Jb,"nth-last-child":Jb,"nth-last-of-type":Jb,"nth-of-type":Jb,slotted:Gb,host:Gb,"host-context":Gb},Zb={};gs(Zb,{AnPlusB:()=>yh,Atrule:()=>Th,AtrulePrelude:()=>Lh,AttributeSelector:()=>Vh,Block:()=>np,Brackets:()=>sp,CDC:()=>hp,CDO:()=>bp,ClassSelector:()=>Ap,Combinator:()=>Lp,Comment:()=>Fp,Declaration:()=>tm,DeclarationList:()=>um,Dimension:()=>fm,Function:()=>vm,Hash:()=>Cm,IdSelector:()=>Mm,Identifier:()=>Lm,MediaFeature:()=>jm,MediaQuery:()=>$m,MediaQueryList:()=>Zm,NestingSelector:()=>af,Nth:()=>uf,Number:()=>ff,Operator:()=>kf,Parentheses:()=>Ef,Percentage:()=>zf,PseudoClassSelector:()=>Uf,PseudoElementSelector:()=>jf,Ratio:()=>Jf,Raw:()=>ng,Rule:()=>ug,Selector:()=>fg,SelectorList:()=>vg,String:()=>Lg,StyleSheet:()=>qg,TypeSelector:()=>Gg,UnicodeRange:()=>ib,Url:()=>kb,Value:()=>Eb,WhiteSpace:()=>Ib});var Xb={parseContext:{default:"StyleSheet",stylesheet:"StyleSheet",atrule:"Atrule",atrulePrelude(e){return this.AtrulePrelude(e.atrule?String(e.atrule):null)},mediaQueryList:"MediaQueryList",mediaQuery:"MediaQuery",rule:"Rule",selectorList:"SelectorList",selector:"Selector",block(){return this.Block(!0)},declarationList:"DeclarationList",declaration:"Declaration",value:"Value"},scope:Db,atrule:Kb,pseudo:Qb,node:Zb},ey=ah({...Pb,...Xb,...{node:oh}});var ty={};gs(ty,{decode:()=>ry,encode:()=>ay});var ny=92;function ry(e){let t=e.length-1,n="";for(let r=0;r<e.length;r++){let a=e.charCodeAt(r);if(a===ny){if(r===t)break;if(a=e.charCodeAt(++r),al(ny,a)){let t=r-1,a=kl(e,t);r=a-1,n+=Sl(e.substring(t+1,a))}else 13===a&&10===e.charCodeAt(r+1)&&r++}else n+=e[r]}return n}function ay(e){let t="";if(1===e.length&&45===e.charCodeAt(0))return"\\-";for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);0!==r?r<=31||127===r||r>=48&&r<=57&&(0===n||1===n&&45===e.charCodeAt(0))?t+="\\"+r.toString(16)+" ":el(r)?t+=e.charAt(n):t+="\\"+e.charAt(n):t+="�"}return t}var{tokenize:oy,parse:iy,generate:sy,lexer:ly,createLexer:cy,walk:uy,find:dy,findLast:hy,findAll:py,toPlainObject:my,fromPlainObject:fy,fork:gy}=ey,by=Object.freeze({__proto__:null,Lexer:Xd,List:Nl,TokenStream:Ll,clone:function e(t){let n={};for(let r in t){let a=t[r];a&&(Array.isArray(a)||a instanceof Nl?a=a.map(e):a.constructor===Object&&(a=e(a))),n[r]=a}return n},createLexer:cy,createSyntax:ah,definitionSyntax:bu,find:dy,findAll:py,findLast:hy,fork:gy,fromPlainObject:fy,generate:sy,ident:ty,isCustomProperty:Pc,keyword:zc,lexer:ly,parse:iy,property:Ic,string:Sg,toPlainObject:my,tokenNames:El,tokenTypes:As,tokenize:oy,url:cb,vendorPrefix:Lc,version:"2.3.1",walk:uy});const yy=/^'(.*?)'$/,wy=/^"(.*?)"$/,ky=["inherit","initial","unset"],vy=["caption","icon","menu","message-box","small-caption","status-bar"],xy=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"],Ay=["normal","italic","oblique"],Sy=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"],Ey="[parse-css-font] ";function Ty(e){const t=sy(e);if(-1!==vy.indexOf(t))return{system:t};const n=e.children,r={lineHeight:"normal",stretch:"normal",style:"normal",variant:"normal",weight:"normal"};let a=!1;for(let e=n.head;e;e=e.next){const t=sy(e.data);if("normal"!==t&&-1===ky.indexOf(t))if(-1===xy.indexOf(t))if(-1===Ay.indexOf(t))if(-1===Sy.indexOf(t)){if("Dimension"==e.data.type){if(r.size=sy(e.data),e=e.next,e&&"Operator"==e.data.type&&"/"==e.data.value&&e.next?(e=e.next,r.lineHeight=sy(e.data),e=e.next):"Operator"==n.head.data.type&&"/"==n.head.data.value&&n.head.next&&(r.lineHeight=sy(n.head.next.data),e=n.head.next.next),!e)throw Cy("Missing required font-family.");r.family=[];let t="";for(;e;){for(;e&&"Operator"==e.data.type&&","==e.data.value;)e=e.next;if(e)if("Identifier"==e.data.type)for(;e&&"Identifier"==e.data.type;)t+=" "+sy(e.data),e=e.next;else t=Ry(sy(e.data)),e=e.next;t=t.trim(),t&&(r.family.push(t),t="")}return r}if("normal"!==r.variant)throw Cy("Unknown or unsupported font token: "+r.variant);a||(r.variant=t)}else{if(a)continue;r.stretch=t}else{if(a)continue;r.style=t}else{if(a)continue;r.weight=t}else["style","variant","weight","stretch"].forEach((e=>{r[e]=t})),a=!0}throw Cy("Missing required font-size.")}function Cy(e){return new Error(Ey+e)}function Ry(e){return(e=e.match(yy)?e.replace(yy,"$1"):e.replace(wy,"$1")).trim()}var _y=Object.freeze({__proto__:null,parse:Ty});function zy(e,t=0){const n=[{mode:"normal",character:null}],r=[];let a=0,o="",i=null,s=null,l=t,c=e;"("===e[0]&&")"===e[e.length-1]&&(c=e.substring(1,e.length-1),l++);for(let e=0;e<c.length;e++){const t=c[e];if("'"!==t&&'"'!==t||(!0===n[a].isCalculationEnabled?(n.push({mode:"string",isCalculationEnabled:!1,character:t}),a++):"string"===n[a].mode&&n[a].character===t&&"\\"!==c[e-1]&&(n.pop(),a--)),"{"===t?(n.push({mode:"interpolation",isCalculationEnabled:!0}),a++):"}"===t&&(n.pop(),a--),"normal"===n[a].mode&&":"===t){const t=c.substring(e+1);s={type:"value",before:/^(\s*)/.exec(t)[1],after:/(\s*)$/.exec(t)[1],value:t.trim()},s.sourceIndex=s.before.length+e+1+l,i={type:"colon",sourceIndex:e+l,after:s.before,value:":"};break}o+=t}return o={type:"media-feature",before:/^(\s*)/.exec(o)[1],after:/(\s*)$/.exec(o)[1],value:o.trim()},o.sourceIndex=o.before.length+l,r.push(o),null!==i&&(i.before=o.after,r.push(i)),null!==s&&r.push(s),r}function Iy(e,t=0){const n=[];let r,a=0,o=!1;r={before:"",after:"",value:""};for(let i=0;i<e.length;i++){const s=e[i];o?(r.value+=s,"{"!==s&&"("!==s||a++,")"!==s&&"}"!==s||a--):-1!==s.search(/\s/)?r.before+=s:("("===s&&(r.type="media-feature-expression",a++),r.value=s,r.sourceIndex=t+i,o=!0),!o||0!==a||")"!==s&&i!==e.length-1&&-1===e[i+1].search(/\s/)||(-1!==["not","only","and"].indexOf(r.value)&&(r.type="keyword"),"media-feature-expression"===r.type&&(r.nodes=zy(r.value,r.sourceIndex)),n.push(Array.isArray(r.nodes)?new Py(r):new Dy(r)),r={before:"",after:"",value:""},o=!1)}for(let e=0;e<n.length;e++)if(r=n[e],e>0&&(n[e-1].after=r.before),void 0===r.type){if(e>0){if("media-feature-expression"===n[e-1].type){r.type="keyword";continue}if("not"===n[e-1].value||"only"===n[e-1].value){r.type="media-type";continue}if("and"===n[e-1].value){r.type="media-feature-expression";continue}"media-type"===n[e-1].type&&(n[e+1]?r.type="media-feature-expression"===n[e+1].type?"keyword":"media-feature-expression":r.type="media-feature-expression")}if(0===e){if(!n[e+1]){r.type="media-type";continue}if(n[e+1]&&("media-feature-expression"===n[e+1].type||"keyword"===n[e+1].type)){r.type="media-type";continue}if(n[e+2]){if("media-feature-expression"===n[e+2].type){r.type="media-type",n[e+1].type="keyword";continue}if("keyword"===n[e+2].type){r.type="keyword",n[e+1].type="media-type";continue}}if(n[e+3]&&"media-feature-expression"===n[e+3].type){r.type="keyword",n[e+1].type="media-type",n[e+2].type="keyword";continue}}}return n}function Ly(e){const t=[];let n=0,r=0;const a=/^(\s*)url\s*\(/.exec(e);if(null!==a){let r=a[0].length,o=1;for(;o>0;){const t=e[r];"("===t&&o++,")"===t&&o--,r++}t.unshift(new Dy({type:"url",value:e.substring(0,r).trim(),sourceIndex:a[1].length,before:a[1],after:/^(\s*)/.exec(e.substring(r))[1]})),n=r}for(let a=n;a<e.length;a++){const o=e[a];if("("===o&&r++,")"===o&&r--,0===r&&","===o){const r=e.substring(n,a),o=/^(\s*)/.exec(r)[1];t.push(new Py({type:"media-query",value:r.trim(),sourceIndex:n+o.length,nodes:Iy(r,n),before:o,after:/(\s*)$/.exec(r)[1]})),n=a+1}}const o=e.substring(n),i=/^(\s*)/.exec(o)[1];return t.push(new Py({type:"media-query",value:o.trim(),sourceIndex:n+i.length,nodes:Iy(o,n),before:i,after:/(\s*)$/.exec(o)[1]})),t}function Py(e){this.constructor(e),this.nodes=e.nodes,void 0===this.after&&(this.after=this.nodes.length>0?this.nodes[this.nodes.length-1].after:""),void 0===this.before&&(this.before=this.nodes.length>0?this.nodes[0].before:""),void 0===this.sourceIndex&&(this.sourceIndex=this.before.length),this.nodes.forEach((e=>{e.parent=this}))}function Dy(e){this.after=e.after,this.before=e.before,this.type=e.type,this.value=e.value,this.sourceIndex=e.sourceIndex}Py.prototype=Object.create(Dy.prototype),Py.constructor=Dy,Py.prototype.walk=function(e,t){const n="string"==typeof e||e instanceof RegExp,r=n?t:e,a="string"==typeof e?new RegExp(e):e;for(let o=0;o<this.nodes.length;o++){const i=this.nodes[o];if((!n||a.test(i.type))&&r&&!1===r(i,o,this.nodes))return!1;if(i.nodes&&!1===i.walk(e,t))return!1}return!0},Py.prototype.each=function(e=(()=>{})){for(let t=0;t<this.nodes.length;t++){if(!1===e(this.nodes[t],t,this.nodes))return!1}return!0};var Ny=Object.freeze({__proto__:null,parseMediaList:Ly});const Uy="___PRESERVED_TOKEN_",My={maxLineLen:0,expandVars:!1,uglyComments:!1,cuteComments:!1,debug:!1,output:""},Oy=/url\(\s*(["']?)data:/g,Fy=/\s+/g,qy=/\n/g;const By=/(=\s*?["']?)?#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])(\}|[^0-9a-f{][^{]*?\})/gi;const jy=/@[a-z0-9-_]*keyframes\s+[a-z0-9-_]+\s*{/gi,Hy=/(^\s|\s$)/g;const Wy=/"([^\\"])*"/g,Vy=/"(\\.)*"/g,Ky=/"(\\)*"/g,$y=/'([^\\']|\\.|\\)*'/g,Gy=/progid:DXImageTransform.Microsoft.Alpha\(Opacity=/gi,Yy=/\r\n/g,Jy=/[\r\n]/g,Qy=/@variables\s*\{\s*([^}]+)\s*\}/g,Zy=/\s*([a-z0-9-]+)\s*:\s*([^;}]+)\s*/gi,Xy=/var\s*\(\s*([^)]+)\s*\)/g,ew=/calc\(([^;}]*)\)/g,tw=/(^\s*|\s*$)/g,nw=/\( /g,rw=/ \)/g,aw=/\s*filter:\s*progid:DXImageTransform.Microsoft.Matrix\(([^)]+)\);/g,ow=/(^|\})(([^{:])+:)+([^{]*{)/g,iw=/\s+([!{;:>+()\],])/g,sw=/([^\\])\s+([}])/g,lw=/!important/g,cw=/___PSEUDOCLASSCOLON___/g,uw=/:/g,dw=/\s*(animation|animation-delay|animation-duration|transition|transition-delay|transition-duration):\s*([^;}]+)/gi,hw=/(^|\D)0?\.?0(m?s)/gi,pw=/\s*(flex|flex-basis):\s*([^;}]+)/gi,mw=/\s+/,fw=/(hsla?)\(([^)]+)\)/g,gw=/(^\s+|\s+$)/g,bw=/:first-(line|letter)(\{|,)/gi,yw=/^(.*)(@charset)( "[^"]*";)/gi,ww=/^((\s*)(@charset)( [^;]+;\s*))+/gi,kw=/@(font-face|import|(?:-(?:atsc|khtml|moz|ms|o|wap|webkit)-)?keyframe|media|page|namespace)/gi,vw=/:(active|after|before|checked|disabled|empty|enabled|first-(?:child|of-type)|focus|hover|last-(?:child|of-type)|link|only-(?:child|of-type)|root|:selection|target|visited)/gi,xw=/^(.*)(@charset "[^"]*";)/g,Aw=/^(\s*@charset [^;]+;\s*)+/g,Sw=/:(lang|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|(?:-(?:atsc|khtml|moz|ms|o|wap|webkit)-)?any)\(/gi,Ew=/([:,( ]\s*)(attr|color-stop|from|rgba|to|url|(?:-(?:atsc|khtml|moz|ms|o|wap|webkit)-)?(?:calc|max|min|(?:repeating-)?(?:linear|radial)-gradient)|-webkit-gradient)/gi,Tw=/\s*\/\*/g,Cw=/\*\/\s*/g,Rw=/\band\(/gi,_w=/([^:])not\(/gi,zw=/\bor\(/gi,Iw=/([!{}:;>+([,])\s+/g,Lw=/;+\}/g,Pw=/([0-9])\.0(ex|ch|r?em|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|g?rad|turn|m?s|k?Hz|dpi|dpcm|dppx|%| |;)/gi,Dw=/:0 0 0 0(;|\})/g,Nw=/:0 0 0(;|\})/g,Uw=/(transform-origin|webkit-transform-origin|moz-transform-origin|o-transform-origin|ms-transform-origin|box-shadow):0(;|\})/gi,Mw=/(:|\s)0+\.(\d+)/g,Ow=/rgb\s*\(\s*([0-9,\s]+)\s*\)/gi,Fw=/(border|border-top|border-right|border-bottom|border-left|outline|background):none(;|\})/gi,qw=/progid:DXImageTransform\.Microsoft\.Alpha\(Opacity=/gi,Bw=/\(([-A-Za-z]+):([0-9]+)\/([0-9]+)\)/g,jw=/___QUERY_FRACTION___/g,Hw=/;;+/g,Ww=/(:|\s)(#f00)(;|})/g,Vw=/___PRESERVED_NEWLINE___/g,Kw=/(:|\s)(#000080)(;|})/g,$w=/(:|\s)(#808080)(;|})/g,Gw=/(:|\s)(#808000)(;|})/g,Yw=/(:|\s)(#800080)(;|})/g,Jw=/(:|\s)(#c0c0c0)(;|})/g,Qw=/(:|\s)(#008080)(;|})/g,Zw=/(:|\s)(#ffa500)(;|})/g,Xw=/(:|\s)(#800000)(;|})/g;function ek(e="",t=My){const n=[],r=[];let a;const o=e;function i(t){e=e.replace(t,(e=>{const t=e.substring(0,1);if((e=e.slice(1,-1)).indexOf("___PRESERVE_CANDIDATE_COMMENT_")>=0)for(let t=0,r=n.length;t<r;t+=1)e=e.replace("___PRESERVE_CANDIDATE_COMMENT_"+t+"___",n[t]);return e=e.replace(Gy,"alpha(opacity="),r.push(e),t+Uy+(r.length-1)+"___"+t}))}e=function(e,t){const n=Oy,r=e.length-1,a=[];let o,i=0;for(;null!==(o=n.exec(e));){const s=o.index+4;let l=o[1];0===l.length&&(l=")");let c=!1,u=n.lastIndex-1;for(;!1===c&&u+1<=r&&-1!=u;)u=e.indexOf(l,u+1),u>0&&"\\"!==e.charAt(u-1)&&(c=!0,")"!=l&&(u=e.indexOf(")",u)));if(a.push(e.substring(i,o.index)),c){let n=e.substring(s,u);const r=n.split(",");r.length>1&&";base64"==r[0].slice(-7)?n=n.replace(Fy,""):(n=n.replace(qy," "),n=n.replace(Fy," "),n=n.replace(gw,"")),t.push(n);const o="url("+Uy+(t.length-1)+"___)";a.push(o),i=u+1}else a.push(e.substring(o.index,n.lastIndex)),i=n.lastIndex}return a.push(e.substring(i)),a.join("")}(e,r),e=function(e,t){const n=[];let r,a=0;for(;;){const o=e.indexOf("/*",a);if(!(o>-1))break;if(r=e.indexOf("*/",o+2),!(r>-1)){r=-2;break}t.push(e.slice(o+2,r)),n.push(e.slice(a,o)),n.push("/*___PRESERVE_CANDIDATE_COMMENT_"+(t.length-1)+"___*/"),a=r+2}return n.push(e.slice(r+2)),n.join("")}(e,n),i(Wy),i(Vy),i(Ky),i($y);for(let a=0,o=n.length;a<o;a+=1){const o=n[a],i="___PRESERVE_CANDIDATE_COMMENT_"+a+"___";if("!"!==o.charAt(0))if("\\"!==o.charAt(o.length-1)){if(0===o.length){const t=e.indexOf(i);t>2&&">"===e.charAt(t-3)&&(r.push(""),e=e.replace(i,Uy+(r.length-1)+"___"))}e=e.replace(`/*${i}*/`,"")}else r.push("\\"),e=e.replace(i,Uy+(r.length-1)+"___"),a+=1,r.push(""),e=e.replace("___PRESERVE_CANDIDATE_COMMENT_"+a+"___",Uy+(r.length-1)+"___");else t.cuteComments?r.push(o.substring(1).replace(Yy,"\n")):t.uglyComments?r.push(o.substring(1).replace(Jy,"")):r.push(o),e=e.replace(i,Uy+(r.length-1)+"___")}if(t.expandVars){const t={};a=Qy,e=e.replace(a,((e,n)=>(a=Zy,n.replace(a,((e,n,r)=>(n&&r&&(t[n]=r),""))),""))),a=Xy,e=e.replace(a,((e,n)=>t[n]||"none"))}e=e.replace(Fy," "),a=ew,e=e.replace(a,((e,t)=>(r.push("calc("+t.replace(tw,"").replace(nw,"(").replace(rw,")")+")"),Uy+(r.length-1)+"___"))),a=aw,e=e.replace(a,((e,t)=>(r.push(t),"filter:progid:DXImageTransform.Microsoft.Matrix("+Uy+(r.length-1)+"___);")));try{a=ow,e=e.replace(a,(e=>e.replace(uw,"___PSEUDOCLASSCOLON___")))}catch(e){}if(e=(e=(e=(e=e.replace(iw,"$1")).replace(sw,"$1$2")).replace(lw," !important")).replace(cw,":"),a=dw,e=e.replace(a,((e,t,n)=>t+":"+(n=n.replace(hw,((e,t,n)=>(r.push("0"+n),t+Uy+(r.length-1)+"___")))))),a=pw,e=function(e,t){const n=jy;let r,a=0;const o=(e,n)=>{"0"===(e=e.replace(Hy,"")).charAt(0)&&(t.push(e),r[n]=Uy+(t.length-1)+"___")};for(;;){let t=0;r="";let i=e.slice(a).search(n);if(i<0)break;a+=i,i=a;const s=e.length,l=[];for(;a<s;++a){const n=e.charAt(a);if("{"===n)0===t?l.push(r.replace(Hy,"")):1===t&&(r=r.split(","),r.forEach(o),l.push(r.join(",").replace(Hy,""))),r="",t+=1;else if("}"===n){if(2===t)l.push("{"+r.replace(Hy,"")+"}"),r="";else if(1===t){e=e.slice(0,i)+l.shift()+"{"+l.join("")+e.slice(a);break}t-=1}if(t<0)break;"{"!==n&&"}"!==n&&(r+=n)}}return e}(e=(e=e.replace(a,((e,t,n)=>{let a=n.split(mw);return r.push(a.pop()),a.push(Uy+(r.length-1)+"___"),a=a.join(" "),`${t}:${a}`}))).replace(fw,((e,t,n)=>{const a=[];return n.split(",").forEach((e=>{"0%"===(e=e.replace(gw,""))?(r.push("0%"),a.push(Uy+(r.length-1)+"___")):a.push(e)})),t+"("+a.join(",")+")"})),r),e=e.replace(bw,((e,t,n)=>":first-"+t.toLowerCase()+" "+n)),e=t.cuteComments?(e=e.replace(Tw,"___PRESERVED_NEWLINE___/*")).replace(Cw,"*/___PRESERVED_NEWLINE___"):e.replace(Cw,"*/"),a=yw,e=e.replace(a,((e,t,n,r)=>n.toLowerCase()+r+t)),a=ww,e=e.replace(a,((e,t,n,r,a)=>n+r.toLowerCase()+a)),a=kw,e=e.replace(a,((e,t)=>"@"+t.toLowerCase())),a=vw,e=(e=(e=e.replace(a,((e,t)=>":"+t.toLowerCase()))).replace(xw,"$2$1")).replace(Aw,"$1"),a=Sw,e=e.replace(a,((e,t)=>":"+t.toLowerCase()+"(")),a=Ew,e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(a,((e,t,n)=>t+n.toLowerCase()))).replace(Rw,"and (")).replace(_w,"$1not (")).replace(zw,"or (")).replace(Iw,"$1")).replace(Lw,"}")).replace(Pw,"$1$2")).replace(Dw,":0$1")).replace(Nw,":0$1"),a=Uw,e=(e=e.replace(a,((e,t,n)=>t.toLowerCase()+":0 0"+n))).replace(Mw,"$1.$2"),a=Ow,e=function(e){const t=By,n=[];let r,a=0;for(;null!==(r=t.exec(e));)n.push(e.substring(a,r.index)),r[1]?n.push(r[1]+"#"+(r[2]+r[3]+r[4]+r[5]+r[6]+r[7])):r[2].toLowerCase()==r[3].toLowerCase()&&r[4].toLowerCase()==r[5].toLowerCase()&&r[6].toLowerCase()==r[7].toLowerCase()?n.push("#"+(r[3]+r[5]+r[7]).toLowerCase()):n.push("#"+(r[2]+r[3]+r[4]+r[5]+r[6]+r[7]).toLowerCase()),a=t.lastIndex=t.lastIndex-r[8].length;return n.push(e.substring(a)),n.join("")}(e=e.replace(a,((e,t)=>{const n=t.split(",");let r="#";for(let e=0;e<n.length;e+=1){let t=parseInt(n[e],10);t<16&&(r+="0"),t>255&&(t=255),r+=t.toString(16)}return r}))),e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(Ww,"$1red$3")).replace(Kw,"$1navy$3")).replace($w,"$1gray$3")).replace(Gw,"$1olive$3")).replace(Yw,"$1purple$3")).replace(Jw,"$1silver$3")).replace(Qw,"$1teal$3")).replace(Zw,"$1orange$3")).replace(Xw,"$1maroon$3"),a=Fw,e=(e=(e=(e=e.replace(a,((e,t,n)=>t.toLowerCase()+":0"+n))).replace(qw,"alpha(opacity=")).replace(Bw,"($1:$2___QUERY_FRACTION___$3)")).replace(jw,"/"),t.maxLineLen>0){const n=[];let r=[];for(let a=0,o=e.length;a<o;a+=1){const o=e.charAt(a);r.push(o),"}"===o&&r.length>t.maxLineLen&&(n.push(r.join("")),r=[])}r.length&&n.push(r.join("")),e=n.join("\n")}if(e=(e=e.replace(Hw,";")).replace(tw,""),r.length>1e3)return o;for(let t=r.length-1;t>=0;t--)e=e.replace(Uy+t+"___",r[t],"g");return e=e.replace(Vw,"\n")}var tk=Object.freeze({__proto__:null,defaultOptions:My,processString:ek});function nk(e){function t(e){return" "===e||"\t"===e||"\n"===e||"\f"===e||"\r"===e}function n(t){let n;const r=t.exec(e.substring(f));if(r)return n=r[0],f+=n.length,n}const r=e.length,a=/^[ \t\n\r\u000c]+/,o=/^[, \t\n\r\u000c]+/,i=/^[^ \t\n\r\u000c]+/,s=/[,]+$/,l=/^\d+$/,c=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/;let u,d,h,p,m,f=0;const g=[];for(;;){if(n(o),f>=r)return g;u=n(i),d=[],","===u.slice(-1)?(u=u.replace(s,""),y()):b()}function b(){for(n(a),h="",p="in descriptor";;){if(m=e.charAt(f),"in descriptor"===p)if(t(m))h&&(d.push(h),h="",p="after descriptor");else{if(","===m)return f+=1,h&&d.push(h),void y();if("("===m)h+=m,p="in parens";else{if(""===m)return h&&d.push(h),void y();h+=m}}else if("in parens"===p)if(")"===m)h+=m,p="in descriptor";else{if(""===m)return d.push(h),void y();h+=m}else if("after descriptor"===p)if(t(m));else{if(""===m)return void y();p="in descriptor",f-=1}f+=1}}function y(){let t,n,r,a,o,i,s,h,p,m=!1;const f={};for(a=0;a<d.length;a++)o=d[a],i=o[o.length-1],s=o.substring(0,o.length-1),h=parseInt(s,10),p=parseFloat(s),l.test(s)&&"w"===i?((t||n)&&(m=!0),0===h?m=!0:t=h):c.test(s)&&"x"===i?((t||n||r)&&(m=!0),p<0?m=!0:n=p):l.test(s)&&"h"===i?((r||n)&&(m=!0),0===h?m=!0:r=h):m=!0;m?console&&console.log&&console.log('Invalid srcset descriptor found in "'+e+'" at "'+o+'".'):(f.url=u,t&&(f.w=t),n&&(f.d=n),r&&(f.h=r),g.push(f))}}var rk=Object.freeze({__proto__:null,process:nk});let ak,ok,ik,sk;ak={},ak.removeLeadingAndTrailingHTTPWhitespace=e=>e.replace(/^[ \t\n\r]+/,"").replace(/[ \t\n\r]+$/,""),ak.removeTrailingHTTPWhitespace=e=>e.replace(/[ \t\n\r]+$/,""),ak.isHTTPWhitespaceChar=e=>" "===e||"\t"===e||"\n"===e||"\r"===e,ak.solelyContainsHTTPTokenCodePoints=e=>/^[-!#$%&'*+.^_`|~A-Za-z0-9]*$/.test(e),ak.soleyContainsHTTPQuotedStringTokenCodePoints=e=>/^[\t\u0020-\u007E\u0080-\u00FF]*$/.test(e),ak.asciiLowercase=e=>e.replace(/[A-Z]/g,(e=>e.toLowerCase())),ak.collectAnHTTPQuotedString=(e,t)=>{let n="";for(t++;;){for(;t<e.length&&'"'!==e[t]&&"\\"!==e[t];)n+=e[t],++t;if(t>=e.length)break;const r=e[t];if(++t,"\\"!==r)break;if(t>=e.length){n+="\\";break}n+=e[t],++t}return[n,t]};{const{solelyContainsHTTPTokenCodePoints:e}=ak;ik=t=>{let n=`${t.type}/${t.subtype}`;if(0===t.parameters.size)return n;for(let[r,a]of t.parameters)n+=";",n+=r,n+="=",e(a)&&0!==a.length||(a=a.replace(/(["\\])/g,"\\$1"),a=`"${a}"`),n+=a;return n}}{const{removeLeadingAndTrailingHTTPWhitespace:e,removeTrailingHTTPWhitespace:t,isHTTPWhitespaceChar:n,solelyContainsHTTPTokenCodePoints:r,soleyContainsHTTPQuotedStringTokenCodePoints:a,asciiLowercase:o,collectAnHTTPQuotedString:i}=ak;ok=s=>{s=e(s);let l=0,c="";for(;l<s.length&&"/"!==s[l];)c+=s[l],++l;if(0===c.length||!r(c))return null;if(l>=s.length)return null;++l;let u="";for(;l<s.length&&";"!==s[l];)u+=s[l],++l;if(u=t(u),0===u.length||!r(u))return null;const d={type:o(c),subtype:o(u),parameters:new Map};for(;l<s.length;){for(++l;n(s[l]);)++l;let e="";for(;l<s.length&&";"!==s[l]&&"="!==s[l];)e+=s[l],++l;if(e=o(e),l<s.length){if(";"===s[l])continue;++l}let c=null;if('"'===s[l])for([c,l]=i(s,l);l<s.length&&";"!==s[l];)++l;else{for(c="";l<s.length&&";"!==s[l];)c+=s[l],++l;if(c=t(c),""===c)continue}e.length>0&&r(e)&&a(c)&&!d.parameters.has(e)&&d.parameters.set(e,c)}return d}}{const e=ok,t=ik,{asciiLowercase:n,solelyContainsHTTPTokenCodePoints:r,soleyContainsHTTPQuotedStringTokenCodePoints:a}=ak;sk=class{constructor(t){t=String(t);const n=e(t);if(null===n)throw new Error(`Could not parse MIME type string "${t}"`);this._type=n.type,this._subtype=n.subtype,this._parameters=new o(n.parameters)}static parse(e){try{return new this(e)}catch(e){return null}}get essence(){return`${this.type}/${this.subtype}`}get type(){return this._type}set type(e){if(0===(e=n(String(e))).length)throw new Error("Invalid type: must be a non-empty string");if(!r(e))throw new Error(`Invalid type ${e}: must contain only HTTP token code points`);this._type=e}get subtype(){return this._subtype}set subtype(e){if(0===(e=n(String(e))).length)throw new Error("Invalid subtype: must be a non-empty string");if(!r(e))throw new Error(`Invalid subtype ${e}: must contain only HTTP token code points`);this._subtype=e}get parameters(){return this._parameters}toString(){return t(this)}isJavaScript({allowParameters:e=!1}={}){switch(this._type){case"text":switch(this._subtype){case"ecmascript":case"javascript":case"javascript1.0":case"javascript1.1":case"javascript1.2":case"javascript1.3":case"javascript1.4":case"javascript1.5":case"jscript":case"livescript":case"x-ecmascript":case"x-javascript":return e||0===this._parameters.size;default:return!1}case"application":switch(this._subtype){case"ecmascript":case"javascript":case"x-ecmascript":case"x-javascript":return e||0===this._parameters.size;default:return!1}default:return!1}}isXML(){return"xml"===this._subtype&&("text"===this._type||"application"===this._type)||this._subtype.endsWith("+xml")}isHTML(){return"html"===this._subtype&&"text"===this._type}};class o{constructor(e){this._map=e}get size(){return this._map.size}get(e){return e=n(String(e)),this._map.get(e)}has(e){return e=n(String(e)),this._map.has(e)}set(e,t){if(e=n(String(e)),t=String(t),!r(e))throw new Error(`Invalid MIME type parameter name "${e}": only HTTP token code points are valid.`);if(!a(t))throw new Error(`Invalid MIME type parameter value "${t}": only HTTP quoted-string token code points are valid.`);return this._map.set(e,t)}clear(){this._map.clear()}delete(e){return e=n(String(e)),this._map.delete(e)}forEach(e,t){this._map.forEach(e,t)}keys(){return this._map.keys()}values(){return this._map.values()}entries(){return this._map.entries()}[Symbol.iterator](){return this._map[Symbol.iterator]()}}}var lk=Object.freeze({__proto__:null,zip:ta,fontPropertyParser:_y,mediaQueryParser:Ny,cssMinifier:tk,cssUnescape:Ga,srcsetParser:rk,get MIMEType(){return sk}});const ck={normalizeFontFamily:Qo,flatten:oi,getFontWeight:ai,removeQuotes:ri},uk=/\s*,\s*/,dk=/-/,hk=/\?/g,pk=/^U\+/i,mk=[/^normal$/,/^italic$/,/^oblique$/,/^oblique\s+/];function fk(e,t,n,r){const a={rules:{processed:0,discarded:0},fonts:{processed:0,discarded:0}},o={declared:[],used:[]},i=e.createElement("style");let s="";e.body.appendChild(i),t.forEach((t=>{const n=t.stylesheet.children;n&&(a.processed+=n.size,a.discarded+=n.size,gk(n,o),s=Tk(e,n,i,s))})),n.forEach((e=>{const t=vk(e);t.length&&o.used.push(t),s=Ck(e.children,i,s)})),i.remove(),s+=e.body.innerText,globalThis.getComputedStyle&&r.doc&&(o.used=o.used.map((e=>e.map((e=>{const t=e.match(/^var\((--.*)\)$/);if(t&&t[1]){const n=globalThis.getComputedStyle(r.doc.body).getPropertyValue(t[1]);return n&&n.split(",").map((e=>ck.normalizeFontFamily(e)))||e}return e})))),o.used=o.used.map((e=>ck.flatten(e))));let l,c;return o.used.find((e=>e.find((e=>e.match(/^var\(--/)))))?l=[]:(c=new Map,o.used.forEach((e=>e.forEach((e=>{if(o.declared.find((t=>t.fontFamily==e))){const t=r.usedFonts&&r.usedFonts.filter((t=>t[0]==e));t&&t.length&&c.set(e,t)}})))),l=o.declared.filter((e=>!c.has(e.fontFamily)))),t.forEach((e=>{const t=e.stylesheet.children;t&&(bk(t,o.declared,l,c,s),a.rules.discarded-=t.size)})),a}function gk(e,t){e.forEach((e=>{if("Atrule"==e.type&&("media"==e.name||"supports"==e.name)&&e.block&&e.block.children)gk(e.block.children,t);else if("Rule"==e.type){const n=vk(e.block);n.length&&t.used.push(n)}else if("Atrule"==e.type&&"font-face"==e.name){const n=ck.normalizeFontFamily(kk(e.block.children,"font-family"));if(n){const r=kk(e.block.children,"font-weight")||"400",a=kk(e.block.children,"font-style")||"normal",o=kk(e.block.children,"font-variant")||"normal";r.split(",").forEach((e=>t.declared.push({fontFamily:n,fontWeight:ck.getFontWeight(ck.removeQuotes(e)),fontStyle:a,fontVariant:o})))}}}))}function bk(e,t,n,r,a){const o=[];for(let i=e.head;i;i=i.next){const e=i.data;if("Atrule"==e.type&&("media"==e.name||"supports"==e.name)&&e.block&&e.block.children)bk(e.block.children,t,n,r,a);else if("Atrule"==e.type&&"font-face"==e.name){const s=ck.normalizeFontFamily(kk(e.block.children,"font-family"));if(s){const l=kk(e.block.children,"unicode-range");!n.find((e=>e.fontFamily==s))&&_k(a,l)&&yk(e,s,t,r)||o.push(i)}const l=[];for(let t=e.block.children.head;t;t=t.next)"font-display"==t.data.property&&l.push(t);l.length&&l.forEach((t=>e.block.children.remove(t)))}}o.forEach((t=>e.remove(t)))}function yk(e,t,n,r){let a;const o=r&&r.get(t);if(o&&o.length){let r=kk(e.block.children,"font-style")||"normal";if(mk.find((e=>r.trim().match(e)))){const i=ck.getFontWeight(kk(e.block.children,"font-weight")||"400"),s=n.filter((e=>e.fontFamily==t&&e.fontStyle==r)).map((e=>e.fontWeight)).sort(((e,t)=>Number.parseInt(e,10)-Number.parseInt(t,10)));let l=o.map((e=>Ak(e,r,s)));a=wk(i,l),a||(l=o.map((e=>((e=Array.from(e))[2]="normal",Ak(e,r,s))))),a=wk(i,l)}else a=!0}else a=!0;return a}function wk(e,t){let n;for(const r of e.split(/[ ,]/))n=n||t.includes(ck.getFontWeight(ck.removeQuotes(r)));return n}function kk(e,t){let n;if(e&&(n=e.filter((e=>e.property==t)).tail),n)try{return ck.removeQuotes(sy(n.data.value)).toLowerCase()}catch(e){}}function vk(e){let t=e.children.filter((e=>"font-family"==e.property)).tail,n=[];t&&(t.data.value.children?xk(t.data.value,n):(t=sy(t.data.value),t&&n.push(ck.normalizeFontFamily(t))));const r=e.children.filter((e=>"font"==e.property)).tail;if(r&&r.data&&r.data.value)try{Ty(r.data.value).family.forEach((e=>n.push(ck.normalizeFontFamily(e))))}catch(e){}return n}function xk(e,t){let n=e.children.head;for(;n;)if("Identifier"==n.data.type){let e=n.data.name,r=n.next;for(;r&&"Operator"!=r.data.type&&","!=r.data.value;)e+=" "+r.data.name,r=r.next;t.push(ck.normalizeFontFamily(e)),n=n.next}else if("Function"==n.data.type&&"var"==n.data.name&&n.data.children){const e=n.data.children.head.data.name;t.push(ck.normalizeFontFamily("var("+e+")"));let r=n.data.children.head.next;for(;r&&"Operator"==r.data.type&&","==r.data.value;)r=r.next;const a=r;a&&(a.data.children?xk(a.data,t):t.push(ck.normalizeFontFamily(a.data.value))),n=n.next}else"String"==n.data.type?(t.push(ck.normalizeFontFamily(n.data.value)),n=n.next):"Number"==n.data.type?(t.push(ck.normalizeFontFamily(String(n.data.value))),n=n.next):n=n.next}function Ak(e,t,n){let r;if(n=n.map((e=>String(Number.parseInt(e,10)))),e[2]==t){let t=Number(e[1]);n.length>1?(t>=400&&t<=500&&(r=n.find((e=>e>=t&&e<=500)),r||(r=Sk(t,n)),r||(r=Ek(t,n))),t<400&&(r=n.slice().reverse().find((e=>e<=t)),r||(r=Ek(t,n))),t>500&&(r=n.find((e=>e>=t)),r||(r=Sk(t,n)))):r=n[0]}return r}function Sk(e,t){return t.slice().reverse().find((t=>t<e))}function Ek(e,t){return t.find((t=>t>e))}function Tk(e,t,n,r){return t.forEach((t=>{t.block&&t.block.children&&t.prelude&&t.prelude.children&&("Atrule"!=t.type||"media"!=t.name&&"supports"!=t.name?"Rule"==t.type&&(r=Ck(t.block.children,n,r)):r=Tk(e,t.block.children,n,r))})),r}function Ck(e,t,n){const r=Rk(e,"content",t),a=Rk(e,"quotes",t);return n.includes(r)||(n+=r),n.includes(a)||(n+=a),n}function Rk(e,t,n){const r=kk(e,t)||"";return r?(n.textContent='tmp { content:"'+r+'"}',n.sheet&&n.sheet.cssRules?ck.removeQuotes(n.sheet.cssRules[0].style.getPropertyValue("content")):r):""}function _k(e,t){if(t){const n=t.split(uk);let r;const a=n.filter((t=>{const n=t.split(dk);let a;if(2==n.length&&(n[0]=zk(n[0]),a="["+n[0]+"-"+zk("U+"+n[1])+"]"),1==n.length)if(n[0].includes("?")){const e=zk(n[0]),t=e;a="["+e.replace(hk,"0")+"-"+t.replace(hk,"F")+"]"}else n[0]&&(a="["+zk(n[0])+"]");if(a)try{return new RegExp(a,"u").test(e)}catch(e){return r=!0,!1}return!0}));return!r&&(!n.length||a.length)}return!0}function zk(e){for(e=e.replace(pk,"");e.length<6;)e="0"+e;return"\\u{"+e+"}"}var Ik=Object.freeze({__proto__:null,process:fk});const Lk="all",Pk=["after","before","first-letter","first-line","placeholder","selection","part","marker"],Dk="sf-hidden",Nk="display",Uk=/-(ms|webkit|moz|o)-/;class Mk{constructor(e,t,n){this.doc=e,this.mediaAllInfo=Fk(Lk);const r=new Map;let a=0;const o=e.createElement("style");e.body.appendChild(o);const i=e.createElement("span");e.body.appendChild(i),t.forEach((t=>{if(!t.scoped){const i=t.stylesheet.children;if(i)if(t.mediaText&&t.mediaText!=Lk){const s=Fk(t.mediaText);this.mediaAllInfo.medias.set("style-"+a+"-"+t.mediaText,s),qk(e,i,s,a,n,r,o)}else qk(e,i,this.mediaAllInfo,a,n,r,o)}a++})),Wk(this.mediaAllInfo),jk(this.mediaAllInfo,[],this.mediaAllInfo,o,i),o.remove(),i.remove()}getMediaAllInfo(){return this.mediaAllInfo}}function Ok(e,t,n){return new Mk(e,t,n).getMediaAllInfo()}function Fk(e){const t={media:e,elements:new Map,medias:new Map,rules:new Map,pseudoRules:new Map};return e==Lk&&(t.matchedStyles=new Map),t}function qk(e,t,n,r,a,o,i){let s=0,l=0;t.forEach((t=>{if(t.block&&t.block.children&&t.prelude&&t.prelude.children)if("Atrule"==t.type&&"media"==t.name){const l=sy(t.prelude),c=Fk(l);n.medias.set("rule-"+r+"-"+s+"-"+l,c),s++,qk(e,t.block.children,c,r,a,o,i)}else if("Rule"==t.type){const s=t.prelude.children.toArray(),c=t.prelude.children.toArray().map((e=>sy(e))),u={ruleData:t,mediaInfo:n,ruleIndex:l,sheetIndex:r,matchedSelectors:new Set,declarations:new Set,selectors:s,selectorsText:c};if(!function(e,t){return t.textContent=e+"{}",t.sheet?!t.sheet.cssRules.length:t.sheet}(c.join(","),i)||c.find((e=>e.includes("|"))))for(let n=t.prelude.children.head,r=0;n;n=n.next,r++){const t=c[r];Bk(e,{selector:n,selectorText:t,ruleInfo:u},a,o)}l++}}))}function Bk(e,t,n,r){const a=function(e,t){const n=[];let r;o(e={data:iy(sy(e.data),{context:"selector"})}),r&&(t=sy(e.data).trim());a(e),n.length&&(n.forEach((({parentSelector:e,selector:t})=>{0!=e.data.children.size&&t.prev&&"Combinator"!=t.prev.data.type&&"WhiteSpace"!=t.prev.data.type?e.data.children.remove(t):e.data.children.replace(t,iy("*",{context:"selector"}).children.head)})),t=sy(e.data).trim());return t;function a(e,t){if(e.data.children)for(let t=e.data.children.head;t;t=t.next)a(t,e);("PseudoClassSelector"==e.data.type||"PseudoElementSelector"==e.data.type&&(i(e)||Pk.includes(e.data.name)))&&n.push({parentSelector:t,selector:e})}function o(e){if(e.data.children)for(let t=e.data.children.head;t;t=t.next)o(t);"TypeSelector"==e.data.type&&e.data.name.includes("|")&&(r=!0,e.data.name=e.data.name.substring(e.data.name.lastIndexOf("|")+1))}function i(e){const t=e.data.name;return t.startsWith("-")||t.startsWith("\\-")}}(t.selector,t.selectorText),o=a!=t.selectorText?a:t.selectorText,i=r.get(o);let s=i;if(!s)try{s=e.querySelectorAll(o),o!="."+Dk&&(s=Array.from(e.querySelectorAll(o)).filter((e=>!e.classList.contains(Dk)&&("none"!=e.style.getPropertyValue(Nk)||"important"!=e.style.getPropertyPriority("display")))))}catch(e){}if(s&&(i||r.set(o,s),s.length))if(a==t.selectorText)s.forEach((e=>function(e,t,n){const r=t.ruleInfo.mediaInfo,a=n.get(e);let o=r.elements.get(e);o||(o=[],a&&o.push({styleInfo:{styleData:a,declarations:new Set}}),r.elements.set(e,o));const i=Vk(t.selector.data);i.ruleIndex=t.ruleInfo.ruleIndex,i.sheetIndex=t.ruleInfo.sheetIndex,t.specificity=i,o.push(t)}(e,t,n)));else{let e=t.ruleInfo.mediaInfo.pseudoRules.get(t.ruleInfo.ruleData);e||(e=new Set,t.ruleInfo.mediaInfo.pseudoRules.set(t.ruleInfo.ruleData,e)),e.add(t.selectorText)}}function jk(e,t,n,r,a){e.elements.forEach((r=>function(e,t,n){const r=new Map,a=new Set;return e.forEach((e=>{let t;t=e.styleInfo?e.styleInfo.styleData.children:e.ruleInfo.ruleData.block.children,function(e,t,n,r,a,o){for(let a=t.tail;a;a=a.prev){const t=a.data,i=sy(t);if("Declaration"==t.type&&(i.match(Uk)||!r.has(t.property)||t.important)&&!Hk(i,o)){const a=e.get(t);(!a||t.important&&!a.important)&&(e.set(t,{selectorInfo:n,important:t.important}),i.match(Uk)||r.add(t.property))}}}(r,t,e,a,0,n)})),r}(r,0,a).forEach(((r,a)=>{if(r.selectorInfo.ruleInfo||e==n){let o;if(r.selectorInfo.ruleInfo){o=r.selectorInfo.ruleInfo;const n=o.ruleData;([e,...t].find((e=>e.rules.get(n)))||e).rules.set(n,o),n&&o.matchedSelectors.add(r.selectorInfo.selectorText)}else{o=r.selectorInfo.styleInfo;const e=o.styleData;n.matchedStyles.get(e)||n.matchedStyles.set(e,o)}o.declarations.has(a)||o.declarations.add(a)}})))),delete e.elements,e.medias.forEach((o=>jk(o,[e,...t],n,r,a)))}function Hk(e,t){let n;return t.style=e,t.style.length||e.match(Uk)||(n=!0),n}function Wk(e){e.elements.forEach((e=>e.sort(((e,t)=>{return e.styleInfo&&!t.styleInfo?-1:!e.styleInfo&&t.styleInfo?1:(n=e.specificity,r=t.specificity,n.a>r.a?-1:n.a<r.a?1:n.b>r.b?-1:n.b<r.b?1:n.c>r.c?-1:n.c<r.c?1:n.sheetIndex>r.sheetIndex?-1:n.sheetIndex<r.sheetIndex?1:n.ruleIndex>r.ruleIndex?-1:n.ruleIndex<r.ruleIndex?1:-1);var n,r})))),e.medias.forEach(Wk)}function Vk(e,t={a:0,b:0,c:0}){return"IdSelector"==e.type&&t.a++,("ClassSelector"==e.type||"AttributeSelector"==e.type||"PseudoClassSelector"==e.type&&"not"!=e.name)&&t.b++,("TypeSelector"==e.type&&"*"!=e.name||"PseudoElementSelector"==e.type)&&t.c++,e.children&&e.children.forEach((e=>Vk(e,t))),t}var Kk=Object.freeze({__proto__:null,getMediaAllInfo:Ok});const $k={flatten:oi},Gk="all",Yk="screen";function Jk(e){const t={processed:0,discarded:0};return e.forEach(((n,r)=>{if(Zk(n.mediaText||Gk,Yk)&&n.stylesheet.children){Qk(n.stylesheet.children,t).forEach((({cssRules:e,cssRule:t})=>e.remove(t)))}else e.delete(r),r.element&&r.element.remove()})),t}function Qk(e,t,n=[]){for(let r=e.head;r;r=r.next){const a=r.data;"Atrule"==a.type&&"media"==a.name&&a.block&&a.block.children&&a.prelude&&a.prelude.children&&(t.processed++,Zk(sy(a.prelude),Yk)?Qk(a.block.children,t,n):(n.push({cssRules:e,cssRule:r}),t.discarded++))}return n}function Zk(e,t){return $k.flatten(Ly(e).map((e=>Xk(e,t)))).find((e=>!e.not&&(e.value==t||e.value==Gk)||e.not&&(e.value==Gk||e.value!=t)))}function Xk(e,t,n=[]){return e.nodes.map(((r,a)=>{if("media-query"==r.type)return Xk(r,t,n);if("media-type"==r.type){const t={not:Boolean(a&&"keyword"==e.nodes[0].type&&"not"==e.nodes[0].value),value:r.value};n.find((e=>t.not==e.not&&t.value==e.value))||n.push(t)}})),n.length||n.push({not:!1,value:Gk}),n}var ev=Object.freeze({__proto__:null,process:Jk});function tv(e,t,n){const r={processed:0,discarded:0};let a=0;return e.forEach((e=>{if(!e.scoped){const t=e.stylesheet.children;if(t){let o;r.processed+=t.size,r.discarded+=t.size,o=e.mediaText&&"all"!=e.mediaText?n.medias.get("style-"+a+"-"+e.mediaText):n,nv(t,a,o),r.discarded-=t.size}}a++})),t.forEach((e=>function(e,t){const n=[],r=t.matchedStyles.get(e);if(r){let t;for(let a=e.children.head;a&&!t;a=a.next)r.declarations.has(a.data)||n.push(a);n.forEach((t=>e.children.remove(t)))}}(e,n))),r}function nv(e,t,n){let r=0;const a=[];for(let o=e.head;o;o=o.next){const e=o.data;if(e.block&&e.block.children&&e.prelude&&e.prelude.children){if("Atrule"==e.type&&"media"==e.name){const i=sy(e.prelude);nv(e.block.children,t,n.medias.get("rule-"+t+"-"+r+"-"+i)),e.prelude.children.size&&e.block.children.size||a.push(o),r++}else if("Rule"==e.type){const t=n.rules.get(e),r=n.pseudoRules.get(e);t||r?t&&(rv(e,t,r),e.prelude.children.size&&e.block.children.size||a.push(o)):a.push(o)}}else e&&"Raw"!=e.type&&("Rule"!=e.type||e.prelude&&"Raw"!=e.prelude.type)||a.push(o)}a.forEach((t=>e.remove(t)))}function rv(e,t,n){const r=[],a=[];let o;for(let r=e.prelude.children.head;r;r=r.next){const e=sy(r.data);n&&n.has(e)&&(o=!0),t.matchedSelectors.has(e)||n&&n.has(e)||a.push(r)}if(!o)for(let n=e.block.children.tail;n;n=n.prev)t.declarations.has(n.data)||r.push(n);r.forEach((t=>e.block.children.remove(t))),a.forEach((t=>e.prelude.children.remove(t)))}var av=Object.freeze({__proto__:null,process:tv});const ov="data:,";function iv(e){e.querySelectorAll("picture").forEach((e=>{const t=e.querySelector("img");if(t){let{src:n,srcset:r}=sv(t);if(!n){const t=function(e){let t=e.find((e=>e.src)),n=t&&t.src,r=t&&t.srcset;n||(t=e.find((e=>cv(e.src))),n=t&&t.src,n==ov&&(n=null));r||(t=e.find((e=>cv(e.srcset))),r=t&&t.srcset,r==ov&&(r=null));return{src:n,srcset:r}}(Array.from(e.querySelectorAll("source")).reverse());n=t.src,r||(r=t.srcset)}lv({src:n,srcset:r},t,e)}})),e.querySelectorAll(":not(picture) > img[srcset]").forEach((e=>lv(sv(e),e)))}function sv(e){let t=e.getAttribute("src");t==ov&&(t=null);let n=cv(e.getAttribute("srcset"));return n==ov&&(n=null),{src:t,srcset:n}}function lv(e,t,n){e.src?(t.setAttribute("src",e.src),t.setAttribute("srcset",""),t.setAttribute("sizes","")):(t.setAttribute("src",ov),e.srcset?t.setAttribute("srcset",e.srcset):(t.setAttribute("srcset",""),t.setAttribute("sizes",""))),n&&n.querySelectorAll("source").forEach((e=>e.remove()))}function cv(e){if(e)try{const t=nk(e);if(t.length)return t.find((e=>e.url)).url}catch(e){}}var uv=Object.freeze({__proto__:null,process:iv});const dv=["allowfullscreen","async","autofocus","autoplay","checked","compact","controls","declare","default","defaultchecked","defaultmuted","defaultselected","defer","disabled","enabled","formnovalidate","hidden","indeterminate","inert","ismap","itemscope","loop","multiple","muted","nohref","noresize","noshade","novalidate","nowrap","open","pauseonexit","readonly","required","reversed","scoped","seamless","selected","sortable","truespeed","typemustmatch","visible"],hv=["SCRIPT","STYLE","PRE","TEXTAREA"],pv=["id","class","style","lang","dir","onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmousemove","onmouseout","onkeypress","onkeydown","onkeyup"],mv={FORM:{method:"get"},SCRIPT:{language:"javascript",type:"text/javascript",charset:e=>!e.getAttribute("src")},STYLE:{media:"all",type:"text/css"},LINK:{media:"all"}},fv=/[ \t\f\r]+/g,gv=/[\n]+/g,bv=/^\s+$/,yv=4294967295,wv=[function(e){1==e.nodeType&&Array.from(e.attributes).forEach((t=>{dv.includes(t.name)&&e.setAttribute(t.name,"")}))},function(e){3==e.nodeType&&e.previousSibling&&3==e.previousSibling.nodeType&&(e.textContent=e.previousSibling.textContent+e.textContent,e.previousSibling.remove())},function(e,t){if(3==e.nodeType){let n=e.parentElement;if(!(""==n.getAttribute(t.PRESERVED_SPACE_ELEMENT_ATTRIBUTE_NAME))){const t=e.textContent;let r=vv(n);for(;r;)n=n.parentElement,r=n&&vv(n);(!n||r)&&t.length>1&&(e.textContent=t.replace(fv,function(e){return e.parentElement&&"HEAD"==xv(e.parentElement)?"\n":" "}(e)).replace(gv,"\n"))}}},function(e){if(8==e.nodeType&&"HTML"!=xv(e.parentElement))return!e.textContent.toLowerCase().trim().startsWith("[if")},function(e){1==e.nodeType&&Array.from(e.attributes).forEach((t=>{if(pv.includes(t.name.toLowerCase())){const n=e.getAttribute(t.name);(""==n||(n||"").match(bv))&&e.removeAttribute(t.name)}}))},function(e){if(1==e.nodeType){const t=mv[xv(e)];t&&Object.keys(t).forEach((n=>{const r=t[n];("function"==typeof r?r(e):e.getAttribute(n)==r)&&e.removeAttribute(n)}))}},function(e){if(1==e.nodeType&&"SCRIPT"==xv(e)&&"application/ld+json"==e.type&&e.textContent.trim())try{e.textContent=JSON.stringify(JSON.parse(e.textContent))}catch(e){}},e=>function(e,t,n){if(1==e.nodeType&&xv(e)==t.toUpperCase()){let t=e.previousSibling;const r=[];for(;t&&3==t.nodeType&&!t.textContent.trim();)r.push(t),t=t.previousSibling;t&&1==t.nodeType&&t.tagName==e.tagName&&n(e,t)&&(e.textContent=t.textContent+e.textContent,r.forEach((e=>e.remove())),t.remove())}}(e,"style",((e,t)=>e.parentElement&&"HEAD"==xv(e.parentElement)&&e.media==t.media&&e.title==t.title))];function kv(e,t){!function(e){e.querySelectorAll("style, script:not([src])").forEach((e=>{e.textContent.trim()||e.remove()}))}(e);const n=e.createTreeWalker(e.documentElement,yv,null,!1);let r=n.nextNode();for(;r;){const e=wv.find((e=>e(r,t))),a=r;r=n.nextNode(),e&&a.remove()}}function vv(e){return e&&!hv.includes(xv(e))}function xv(e){return e.tagName&&e.tagName.toUpperCase()}var Av=Object.freeze({__proto__:null,process:kv});const Sv=["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"],Ev=1,Tv=3,Cv=8,Rv=[{tagName:"HEAD",accept:e=>!e.childNodes.length||e.childNodes[0].nodeType==Ev},{tagName:"BODY",accept:e=>!e.childNodes.length}],_v=[{tagName:"HTML",accept:e=>!e||e.nodeType!=Cv},{tagName:"HEAD",accept:e=>!e||e.nodeType!=Cv&&(e.nodeType!=Tv||!Pv(e.textContent))},{tagName:"BODY",accept:e=>!e||e.nodeType!=Cv},{tagName:"LI",accept:(e,t)=>!e&&t.parentElement&&("UL"==Dv(t.parentElement)||"OL"==Dv(t.parentElement))||e&&["LI"].includes(Dv(e))},{tagName:"DT",accept:e=>!e||["DT","DD"].includes(Dv(e))},{tagName:"P",accept:e=>e&&["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","DETAILS","DIV","DL","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEADER","HR","MAIN","NAV","OL","P","PRE","SECTION","TABLE","UL"].includes(Dv(e))},{tagName:"DD",accept:e=>!e||["DT","DD"].includes(Dv(e))},{tagName:"RT",accept:e=>!e||["RT","RP"].includes(Dv(e))},{tagName:"RP",accept:e=>!e||["RT","RP"].includes(Dv(e))},{tagName:"OPTGROUP",accept:e=>!e||["OPTGROUP"].includes(Dv(e))},{tagName:"OPTION",accept:e=>!e||["OPTION","OPTGROUP"].includes(Dv(e))},{tagName:"COLGROUP",accept:e=>!e||e.nodeType!=Cv&&(e.nodeType!=Tv||!Pv(e.textContent))},{tagName:"CAPTION",accept:e=>!e||e.nodeType!=Cv&&(e.nodeType!=Tv||!Pv(e.textContent))},{tagName:"THEAD",accept:e=>!e||["TBODY","TFOOT"].includes(Dv(e))},{tagName:"TBODY",accept:e=>!e||["TBODY","TFOOT"].includes(Dv(e))},{tagName:"TFOOT",accept:e=>!e},{tagName:"TR",accept:e=>!e||["TR"].includes(Dv(e))},{tagName:"TD",accept:e=>!e||["TD","TH"].includes(Dv(e))},{tagName:"TH",accept:e=>!e||["TD","TH"].includes(Dv(e))}],zv=["STYLE","SCRIPT","XMP","IFRAME","NOEMBED","NOFRAMES","PLAINTEXT","NOSCRIPT"];function Iv(e,t){const n=e.doctype;let r="";return n&&(r="<!DOCTYPE "+n.nodeName,n.publicId?(r+=' PUBLIC "'+n.publicId+'"',n.systemId&&(r+=' "'+n.systemId+'"')):n.systemId&&(r+=' SYSTEM "'+n.systemId+'"'),n.internalSubset&&(r+=" ["+n.internalSubset+"]"),r+="> "),r+Lv(e.documentElement,t)}function Lv(e,t,n){return e.nodeType==Tv?function(e){const t=e.parentNode;let n;t&&t.nodeType==Ev&&(n=Dv(t));return!n||zv.includes(n)?"SCRIPT"==n||"STYLE"==n?e.textContent.replace(/<\//gi,"<\\/").replace(/\/>/gi,"\\/>"):e.textContent:e.textContent.replace(/&/g,"&amp;").replace(/\u00a0/g,"&nbsp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}(e):e.nodeType==Cv?"\x3c!--"+e.textContent+"--\x3e":e.nodeType==Ev?function(e,t,n){const r=Dv(e),a=t&&Rv.find((t=>r==Dv(t)&&t.accept(e)));let o="";a&&!e.attributes.length||(o="<"+r.toLowerCase(),Array.from(e.attributes).forEach((n=>o+=function(e,t,n){const r=e.name;let a="";if(!r.match(/["'>/=]/)){let o,i=e.value;n&&"class"==r&&(i=Array.from(t.classList).map((e=>e.trim())).join(" ")),i=i.replace(/&/g,"&amp;").replace(/\u00a0/g,"&nbsp;"),i.includes('"')&&(i.includes("'")||!n?i=i.replace(/"/g,"&quot;"):o=!0);const s=!n||i.match(/[ \t\n\f\r'"`=<>]/);a+=" ",e.namespace?"http://www.w3.org/XML/1998/namespace"==e.namespaceURI?a+="xml:"+r:"http://www.w3.org/2000/xmlns/"==e.namespaceURI?("xmlns"!==r&&(a+="xmlns:"),a+=r):"http://www.w3.org/1999/xlink"==e.namespaceURI?a+="xlink:"+r:a+=r:a+=r,""!=i&&(a+="=",s&&(a+=o?"'":'"'),a+=i,s&&(a+=o?"'":'"'))}return a}(n,e,t))),o+=">");"TEMPLATE"!=r||e.childNodes.length?Array.from(e.childNodes).forEach((e=>o+=Lv(e,t,n||"svg"==r))):o+=e.innerHTML;const i=t&&_v.find((t=>r==Dv(t)&&t.accept(e.nextSibling,e)));(n||!i&&!Sv.includes(r))&&(o+="</"+r.toLowerCase()+">");return o}(e,t,n):void 0}function Pv(e){return Boolean(e.match(/^[ \t\n\f\r]/))}function Dv(e){return e.tagName&&e.tagName.toUpperCase()}var Nv=Object.freeze({__proto__:null,process:Iv});const Uv=["~","+","\\\\","?","%","*",":","|",'"',"<",">","\0-",""],Mv="_",Ov={"😀":"grinning-face","😃":"grinning-face-with-big-eyes","😄":"grinning-face-with-smiling-eyes","😁":"beaming-face-with-smiling-eyes","😆":"grinning-squinting-face","😅":"grinning-face-with-sweat","🤣":"rolling-on-the-floor-laughing","😂":"face-with-tears-of-joy","🙂":"slightly-smiling-face","🙃":"upside-down-face","🫠":"melting-face","😉":"winking-face","😊":"smiling-face-with-smiling-eyes","😇":"smiling-face-with-halo","🥰":"smiling-face-with-hearts","😍":"smiling-face-with-heart-eyes","🤩":"star-struck","😘":"face-blowing-a-kiss","😗":"kissing-face","☺":"smiling-face","😚":"kissing-face-with-closed-eyes","😙":"kissing-face-with-smiling-eyes","🥲":"smiling-face-with-tear","😋":"face-savoring-food","😛":"face-with-tongue","😜":"winking-face-with-tongue","🤪":"zany-face","😝":"squinting-face-with-tongue","🤑":"money-mouth-face","🤗":"smiling-face-with-open-hands","🤭":"face-with-hand-over-mouth","🫢":"face-with-open-eyes-and-hand-over-mouth","🫣":"face-with-peeking-eye","🤫":"shushing-face","🤔":"thinking-face","🫡":"saluting-face","🤐":"zipper-mouth-face","🤨":"face-with-raised-eyebrow","😐":"neutral-face","😑":"expressionless-face","😶":"face-without-mouth","🫥":"dotted-line-face","😶‍🌫️":"face-in-clouds","😏":"smirking-face","😒":"unamused-face","🙄":"face-with-rolling-eyes","😬":"grimacing-face","😮‍💨":"face-exhaling","🤥":"lying-face","🫨":"⊛-shaking-face","😌":"relieved-face","😔":"pensive-face","😪":"sleepy-face","🤤":"drooling-face","😴":"sleeping-face","😷":"face-with-medical-mask","🤒":"face-with-thermometer","🤕":"face-with-head-bandage","🤢":"nauseated-face","🤮":"face-vomiting","🤧":"sneezing-face","🥵":"hot-face","🥶":"cold-face","🥴":"woozy-face","😵":"face-with-crossed-out-eyes","😵‍💫":"face-with-spiral-eyes","🤯":"exploding-head","🤠":"cowboy-hat-face","🥳":"partying-face","🥸":"disguised-face","😎":"smiling-face-with-sunglasses","🤓":"nerd-face","🧐":"face-with-monocle","😕":"confused-face","🫤":"face-with-diagonal-mouth","😟":"worried-face","🙁":"slightly-frowning-face","☹":"frowning-face","😮":"face-with-open-mouth","😯":"hushed-face","😲":"astonished-face","😳":"flushed-face","🥺":"pleading-face","🥹":"face-holding-back-tears","😦":"frowning-face-with-open-mouth","😧":"anguished-face","😨":"fearful-face","😰":"anxious-face-with-sweat","😥":"sad-but-relieved-face","😢":"crying-face","😭":"loudly-crying-face","😱":"face-screaming-in-fear","😖":"confounded-face","😣":"persevering-face","😞":"disappointed-face","😓":"downcast-face-with-sweat","😩":"weary-face","😫":"tired-face","🥱":"yawning-face","😤":"face-with-steam-from-nose","😡":"enraged-face","😠":"angry-face","🤬":"face-with-symbols-on-mouth","😈":"smiling-face-with-horns","👿":"angry-face-with-horns","💀":"skull","☠":"skull-and-crossbones","💩":"pile-of-poo","🤡":"clown-face","👹":"ogre","👺":"goblin","👻":"ghost","👽":"alien","👾":"alien-monster","🤖":"robot","😺":"grinning-cat","😸":"grinning-cat-with-smiling-eyes","😹":"cat-with-tears-of-joy","😻":"smiling-cat-with-heart-eyes","😼":"cat-with-wry-smile","😽":"kissing-cat","🙀":"weary-cat","😿":"crying-cat","😾":"pouting-cat","🙈":"see-no-evil-monkey","🙉":"hear-no-evil-monkey","🙊":"speak-no-evil-monkey","💌":"love-letter","💘":"heart-with-arrow","💝":"heart-with-ribbon","💖":"sparkling-heart","💗":"growing-heart","💓":"beating-heart","💞":"revolving-hearts","💕":"two-hearts","💟":"heart-decoration","❣":"heart-exclamation","💔":"broken-heart","❤️‍🔥":"heart-on-fire","❤️‍🩹":"mending-heart","❤":"red-heart","🩷":"⊛-pink-heart","🧡":"orange-heart","💛":"yellow-heart","💚":"green-heart","💙":"blue-heart","🩵":"⊛-light-blue-heart","💜":"purple-heart","🤎":"brown-heart","🖤":"black-heart","🩶":"⊛-grey-heart","🤍":"white-heart","💋":"kiss-mark","💯":"hundred-points","💢":"anger-symbol","💥":"collision","💫":"dizzy","💦":"sweat-droplets","💨":"dashing-away","🕳":"hole","💬":"speech-balloon","👁️‍🗨️":"eye-in-speech-bubble","🗨":"left-speech-bubble","🗯":"right-anger-bubble","💭":"thought-balloon","💤":"zzz","👋":"waving-hand","🤚":"raised-back-of-hand","🖐":"hand-with-fingers-splayed","✋":"raised-hand","🖖":"vulcan-salute","🫱":"rightwards-hand","🫲":"leftwards-hand","🫳":"palm-down-hand","🫴":"palm-up-hand","🫷":"⊛-leftwards-pushing-hand","🫸":"⊛-rightwards-pushing-hand","👌":"ok-hand","🤌":"pinched-fingers","🤏":"pinching-hand","✌":"victory-hand","🤞":"crossed-fingers","🫰":"hand-with-index-finger-and-thumb-crossed","🤟":"love-you-gesture","🤘":"sign-of-the-horns","🤙":"call-me-hand","👈":"backhand-index-pointing-left","👉":"backhand-index-pointing-right","👆":"backhand-index-pointing-up","🖕":"middle-finger","👇":"backhand-index-pointing-down","☝":"index-pointing-up","🫵":"index-pointing-at-the-viewer","👍":"thumbs-up","👎":"thumbs-down","✊":"raised-fist","👊":"oncoming-fist","🤛":"left-facing-fist","🤜":"right-facing-fist","👏":"clapping-hands","🙌":"raising-hands","🫶":"heart-hands","👐":"open-hands","🤲":"palms-up-together","🤝":"handshake","🙏":"folded-hands","✍":"writing-hand","💅":"nail-polish","🤳":"selfie","💪":"flexed-biceps","🦾":"mechanical-arm","🦿":"mechanical-leg","🦵":"leg","🦶":"foot","👂":"ear","🦻":"ear-with-hearing-aid","👃":"nose","🧠":"brain","🫀":"anatomical-heart","🫁":"lungs","🦷":"tooth","🦴":"bone","👀":"eyes","👁":"eye","👅":"tongue","👄":"mouth","🫦":"biting-lip","👶":"baby","🧒":"child","👦":"boy","👧":"girl","🧑":"person","👱":"person-blond-hair","👨":"man","🧔":"person-beard","🧔‍♂️":"man-beard","🧔‍♀️":"woman-beard","👨‍🦰":"man-red-hair","👨‍🦱":"man-curly-hair","👨‍🦳":"man-white-hair","👨‍🦲":"man-bald","👩":"woman","👩‍🦰":"woman-red-hair","🧑‍🦰":"person-red-hair","👩‍🦱":"woman-curly-hair","🧑‍🦱":"person-curly-hair","👩‍🦳":"woman-white-hair","🧑‍🦳":"person-white-hair","👩‍🦲":"woman-bald","🧑‍🦲":"person-bald","👱‍♀️":"woman-blond-hair","👱‍♂️":"man-blond-hair","🧓":"older-person","👴":"old-man","👵":"old-woman","🙍":"person-frowning","🙍‍♂️":"man-frowning","🙍‍♀️":"woman-frowning","🙎":"person-pouting","🙎‍♂️":"man-pouting","🙎‍♀️":"woman-pouting","🙅":"person-gesturing-no","🙅‍♂️":"man-gesturing-no","🙅‍♀️":"woman-gesturing-no","🙆":"person-gesturing-ok","🙆‍♂️":"man-gesturing-ok","🙆‍♀️":"woman-gesturing-ok","💁":"person-tipping-hand","💁‍♂️":"man-tipping-hand","💁‍♀️":"woman-tipping-hand","🙋":"person-raising-hand","🙋‍♂️":"man-raising-hand","🙋‍♀️":"woman-raising-hand","🧏":"deaf-person","🧏‍♂️":"deaf-man","🧏‍♀️":"deaf-woman","🙇":"person-bowing","🙇‍♂️":"man-bowing","🙇‍♀️":"woman-bowing","🤦":"person-facepalming","🤦‍♂️":"man-facepalming","🤦‍♀️":"woman-facepalming","🤷":"person-shrugging","🤷‍♂️":"man-shrugging","🤷‍♀️":"woman-shrugging","🧑‍⚕️":"health-worker","👨‍⚕️":"man-health-worker","👩‍⚕️":"woman-health-worker","🧑‍🎓":"student","👨‍🎓":"man-student","👩‍🎓":"woman-student","🧑‍🏫":"teacher","👨‍🏫":"man-teacher","👩‍🏫":"woman-teacher","🧑‍⚖️":"judge","👨‍⚖️":"man-judge","👩‍⚖️":"woman-judge","🧑‍🌾":"farmer","👨‍🌾":"man-farmer","👩‍🌾":"woman-farmer","🧑‍🍳":"cook","👨‍🍳":"man-cook","👩‍🍳":"woman-cook","🧑‍🔧":"mechanic","👨‍🔧":"man-mechanic","👩‍🔧":"woman-mechanic","🧑‍🏭":"factory-worker","👨‍🏭":"man-factory-worker","👩‍🏭":"woman-factory-worker","🧑‍💼":"office-worker","👨‍💼":"man-office-worker","👩‍💼":"woman-office-worker","🧑‍🔬":"scientist","👨‍🔬":"man-scientist","👩‍🔬":"woman-scientist","🧑‍💻":"technologist","👨‍💻":"man-technologist","👩‍💻":"woman-technologist","🧑‍🎤":"singer","👨‍🎤":"man-singer","👩‍🎤":"woman-singer","🧑‍🎨":"artist","👨‍🎨":"man-artist","👩‍🎨":"woman-artist","🧑‍✈️":"pilot","👨‍✈️":"man-pilot","👩‍✈️":"woman-pilot","🧑‍🚀":"astronaut","👨‍🚀":"man-astronaut","👩‍🚀":"woman-astronaut","🧑‍🚒":"firefighter","👨‍🚒":"man-firefighter","👩‍🚒":"woman-firefighter","👮":"police-officer","👮‍♂️":"man-police-officer","👮‍♀️":"woman-police-officer","🕵":"detective","🕵️‍♂️":"man-detective","🕵️‍♀️":"woman-detective","💂":"guard","💂‍♂️":"man-guard","💂‍♀️":"woman-guard","🥷":"ninja","👷":"construction-worker","👷‍♂️":"man-construction-worker","👷‍♀️":"woman-construction-worker","🫅":"person-with-crown","🤴":"prince","👸":"princess","👳":"person-wearing-turban","👳‍♂️":"man-wearing-turban","👳‍♀️":"woman-wearing-turban","👲":"person-with-skullcap","🧕":"woman-with-headscarf","🤵":"person-in-tuxedo","🤵‍♂️":"man-in-tuxedo","🤵‍♀️":"woman-in-tuxedo","👰":"person-with-veil","👰‍♂️":"man-with-veil","👰‍♀️":"woman-with-veil","🤰":"pregnant-woman","🫃":"pregnant-man","🫄":"pregnant-person","🤱":"breast-feeding","👩‍🍼":"woman-feeding-baby","👨‍🍼":"man-feeding-baby","🧑‍🍼":"person-feeding-baby","👼":"baby-angel","🎅":"santa-claus","🤶":"mrs-claus","🧑‍🎄":"mx-claus","🦸":"superhero","🦸‍♂️":"man-superhero","🦸‍♀️":"woman-superhero","🦹":"supervillain","🦹‍♂️":"man-supervillain","🦹‍♀️":"woman-supervillain","🧙":"mage","🧙‍♂️":"man-mage","🧙‍♀️":"woman-mage","🧚":"fairy","🧚‍♂️":"man-fairy","🧚‍♀️":"woman-fairy","🧛":"vampire","🧛‍♂️":"man-vampire","🧛‍♀️":"woman-vampire","🧜":"merperson","🧜‍♂️":"merman","🧜‍♀️":"mermaid","🧝":"elf","🧝‍♂️":"man-elf","🧝‍♀️":"woman-elf","🧞":"genie","🧞‍♂️":"man-genie","🧞‍♀️":"woman-genie","🧟":"zombie","🧟‍♂️":"man-zombie","🧟‍♀️":"woman-zombie","🧌":"troll","💆":"person-getting-massage","💆‍♂️":"man-getting-massage","💆‍♀️":"woman-getting-massage","💇":"person-getting-haircut","💇‍♂️":"man-getting-haircut","💇‍♀️":"woman-getting-haircut","🚶":"person-walking","🚶‍♂️":"man-walking","🚶‍♀️":"woman-walking","🧍":"person-standing","🧍‍♂️":"man-standing","🧍‍♀️":"woman-standing","🧎":"person-kneeling","🧎‍♂️":"man-kneeling","🧎‍♀️":"woman-kneeling","🧑‍🦯":"person-with-white-cane","👨‍🦯":"man-with-white-cane","👩‍🦯":"woman-with-white-cane","🧑‍🦼":"person-in-motorized-wheelchair","👨‍🦼":"man-in-motorized-wheelchair","👩‍🦼":"woman-in-motorized-wheelchair","🧑‍🦽":"person-in-manual-wheelchair","👨‍🦽":"man-in-manual-wheelchair","👩‍🦽":"woman-in-manual-wheelchair","🏃":"person-running","🏃‍♂️":"man-running","🏃‍♀️":"woman-running","💃":"woman-dancing","🕺":"man-dancing","🕴":"person-in-suit-levitating","👯":"people-with-bunny-ears","👯‍♂️":"men-with-bunny-ears","👯‍♀️":"women-with-bunny-ears","🧖":"person-in-steamy-room","🧖‍♂️":"man-in-steamy-room","🧖‍♀️":"woman-in-steamy-room","🧗":"person-climbing","🧗‍♂️":"man-climbing","🧗‍♀️":"woman-climbing","🤺":"person-fencing","🏇":"horse-racing","⛷":"skier","🏂":"snowboarder","🏌":"person-golfing","🏌️‍♂️":"man-golfing","🏌️‍♀️":"woman-golfing","🏄":"person-surfing","🏄‍♂️":"man-surfing","🏄‍♀️":"woman-surfing","🚣":"person-rowing-boat","🚣‍♂️":"man-rowing-boat","🚣‍♀️":"woman-rowing-boat","🏊":"person-swimming","🏊‍♂️":"man-swimming","🏊‍♀️":"woman-swimming","⛹":"person-bouncing-ball","⛹️‍♂️":"man-bouncing-ball","⛹️‍♀️":"woman-bouncing-ball","🏋":"person-lifting-weights","🏋️‍♂️":"man-lifting-weights","🏋️‍♀️":"woman-lifting-weights","🚴":"person-biking","🚴‍♂️":"man-biking","🚴‍♀️":"woman-biking","🚵":"person-mountain-biking","🚵‍♂️":"man-mountain-biking","🚵‍♀️":"woman-mountain-biking","🤸":"person-cartwheeling","🤸‍♂️":"man-cartwheeling","🤸‍♀️":"woman-cartwheeling","🤼":"people-wrestling","🤼‍♂️":"men-wrestling","🤼‍♀️":"women-wrestling","🤽":"person-playing-water-polo","🤽‍♂️":"man-playing-water-polo","🤽‍♀️":"woman-playing-water-polo","🤾":"person-playing-handball","🤾‍♂️":"man-playing-handball","🤾‍♀️":"woman-playing-handball","🤹":"person-juggling","🤹‍♂️":"man-juggling","🤹‍♀️":"woman-juggling","🧘":"person-in-lotus-position","🧘‍♂️":"man-in-lotus-position","🧘‍♀️":"woman-in-lotus-position","🛀":"person-taking-bath","🛌":"person-in-bed","🧑‍🤝‍🧑":"people-holding-hands","👭":"women-holding-hands","👫":"woman-and-man-holding-hands","👬":"men-holding-hands","💏":"kiss","👩‍❤️‍💋‍👨":"kiss-woman,-man","👨‍❤️‍💋‍👨":"kiss-man,-man","👩‍❤️‍💋‍👩":"kiss-woman,-woman","💑":"couple-with-heart","👩‍❤️‍👨":"couple-with-heart-woman,-man","👨‍❤️‍👨":"couple-with-heart-man,-man","👩‍❤️‍👩":"couple-with-heart-woman,-woman","👪":"family","👨‍👩‍👦":"family-man,-woman,-boy","👨‍👩‍👧":"family-man,-woman,-girl","👨‍👩‍👧‍👦":"family-man,-woman,-girl,-boy","👨‍👩‍👦‍👦":"family-man,-woman,-boy,-boy","👨‍👩‍👧‍👧":"family-man,-woman,-girl,-girl","👨‍👨‍👦":"family-man,-man,-boy","👨‍👨‍👧":"family-man,-man,-girl","👨‍👨‍👧‍👦":"family-man,-man,-girl,-boy","👨‍👨‍👦‍👦":"family-man,-man,-boy,-boy","👨‍👨‍👧‍👧":"family-man,-man,-girl,-girl","👩‍👩‍👦":"family-woman,-woman,-boy","👩‍👩‍👧":"family-woman,-woman,-girl","👩‍👩‍👧‍👦":"family-woman,-woman,-girl,-boy","👩‍👩‍👦‍👦":"family-woman,-woman,-boy,-boy","👩‍👩‍👧‍👧":"family-woman,-woman,-girl,-girl","👨‍👦":"family-man,-boy","👨‍👦‍👦":"family-man,-boy,-boy","👨‍👧":"family-man,-girl","👨‍👧‍👦":"family-man,-girl,-boy","👨‍👧‍👧":"family-man,-girl,-girl","👩‍👦":"family-woman,-boy","👩‍👦‍👦":"family-woman,-boy,-boy","👩‍👧":"family-woman,-girl","👩‍👧‍👦":"family-woman,-girl,-boy","👩‍👧‍👧":"family-woman,-girl,-girl","🗣":"speaking-head","👤":"bust-in-silhouette","👥":"busts-in-silhouette","🫂":"people-hugging","👣":"footprints","🦰":"red-hair","🦱":"curly-hair","🦳":"white-hair","🦲":"bald","🐵":"monkey-face","🐒":"monkey","🦍":"gorilla","🦧":"orangutan","🐶":"dog-face","🐕":"dog","🦮":"guide-dog","🐕‍🦺":"service-dog","🐩":"poodle","🐺":"wolf","🦊":"fox","🦝":"raccoon","🐱":"cat-face","🐈":"cat","🐈‍⬛":"black-cat","🦁":"lion","🐯":"tiger-face","🐅":"tiger","🐆":"leopard","🐴":"horse-face","🫎":"⊛-moose","🫏":"⊛-donkey","🐎":"horse","🦄":"unicorn","🦓":"zebra","🦌":"deer","🦬":"bison","🐮":"cow-face","🐂":"ox","🐃":"water-buffalo","🐄":"cow","🐷":"pig-face","🐖":"pig","🐗":"boar","🐽":"pig-nose","🐏":"ram","🐑":"ewe","🐐":"goat","🐪":"camel","🐫":"two-hump-camel","🦙":"llama","🦒":"giraffe","🐘":"elephant","🦣":"mammoth","🦏":"rhinoceros","🦛":"hippopotamus","🐭":"mouse-face","🐁":"mouse","🐀":"rat","🐹":"hamster","🐰":"rabbit-face","🐇":"rabbit","🐿":"chipmunk","🦫":"beaver","🦔":"hedgehog","🦇":"bat","🐻":"bear","🐻‍❄️":"polar-bear","🐨":"koala","🐼":"panda","🦥":"sloth","🦦":"otter","🦨":"skunk","🦘":"kangaroo","🦡":"badger","🐾":"paw-prints","🦃":"turkey","🐔":"chicken","🐓":"rooster","🐣":"hatching-chick","🐤":"baby-chick","🐥":"front-facing-baby-chick","🐦":"bird","🐧":"penguin","🕊":"dove","🦅":"eagle","🦆":"duck","🦢":"swan","🦉":"owl","🦤":"dodo","🪶":"feather","🦩":"flamingo","🦚":"peacock","🦜":"parrot","🪽":"⊛-wing","🐦‍⬛":"⊛-black-bird","🪿":"⊛-goose","🐸":"frog","🐊":"crocodile","🐢":"turtle","🦎":"lizard","🐍":"snake","🐲":"dragon-face","🐉":"dragon","🦕":"sauropod","🦖":"t-rex","🐳":"spouting-whale","🐋":"whale","🐬":"dolphin","🦭":"seal","🐟":"fish","🐠":"tropical-fish","🐡":"blowfish","🦈":"shark","🐙":"octopus","🐚":"spiral-shell","🪸":"coral","🪼":"⊛-jellyfish","🐌":"snail","🦋":"butterfly","🐛":"bug","🐜":"ant","🐝":"honeybee","🪲":"beetle","🐞":"lady-beetle","🦗":"cricket","🪳":"cockroach","🕷":"spider","🕸":"spider-web","🦂":"scorpion","🦟":"mosquito","🪰":"fly","🪱":"worm","🦠":"microbe","💐":"bouquet","🌸":"cherry-blossom","💮":"white-flower","🪷":"lotus","🏵":"rosette","🌹":"rose","🥀":"wilted-flower","🌺":"hibiscus","🌻":"sunflower","🌼":"blossom","🌷":"tulip","🪻":"⊛-hyacinth","🌱":"seedling","🪴":"potted-plant","🌲":"evergreen-tree","🌳":"deciduous-tree","🌴":"palm-tree","🌵":"cactus","🌾":"sheaf-of-rice","🌿":"herb","☘":"shamrock","🍀":"four-leaf-clover","🍁":"maple-leaf","🍂":"fallen-leaf","🍃":"leaf-fluttering-in-wind","🪹":"empty-nest","🪺":"nest-with-eggs","🍄":"mushroom","🍇":"grapes","🍈":"melon","🍉":"watermelon","🍊":"tangerine","🍋":"lemon","🍌":"banana","🍍":"pineapple","🥭":"mango","🍎":"red-apple","🍏":"green-apple","🍐":"pear","🍑":"peach","🍒":"cherries","🍓":"strawberry","🫐":"blueberries","🥝":"kiwi-fruit","🍅":"tomato","🫒":"olive","🥥":"coconut","🥑":"avocado","🍆":"eggplant","🥔":"potato","🥕":"carrot","🌽":"ear-of-corn","🌶":"hot-pepper","🫑":"bell-pepper","🥒":"cucumber","🥬":"leafy-green","🥦":"broccoli","🧄":"garlic","🧅":"onion","🥜":"peanuts","🫘":"beans","🌰":"chestnut","🫚":"⊛-ginger-root","🫛":"⊛-pea-pod","🍞":"bread","🥐":"croissant","🥖":"baguette-bread","🫓":"flatbread","🥨":"pretzel","🥯":"bagel","🥞":"pancakes","🧇":"waffle","🧀":"cheese-wedge","🍖":"meat-on-bone","🍗":"poultry-leg","🥩":"cut-of-meat","🥓":"bacon","🍔":"hamburger","🍟":"french-fries","🍕":"pizza","🌭":"hot-dog","🥪":"sandwich","🌮":"taco","🌯":"burrito","🫔":"tamale","🥙":"stuffed-flatbread","🧆":"falafel","🥚":"egg","🍳":"cooking","🥘":"shallow-pan-of-food","🍲":"pot-of-food","🫕":"fondue","🥣":"bowl-with-spoon","🥗":"green-salad","🍿":"popcorn","🧈":"butter","🧂":"salt","🥫":"canned-food","🍱":"bento-box","🍘":"rice-cracker","🍙":"rice-ball","🍚":"cooked-rice","🍛":"curry-rice","🍜":"steaming-bowl","🍝":"spaghetti","🍠":"roasted-sweet-potato","🍢":"oden","🍣":"sushi","🍤":"fried-shrimp","🍥":"fish-cake-with-swirl","🥮":"moon-cake","🍡":"dango","🥟":"dumpling","🥠":"fortune-cookie","🥡":"takeout-box","🦀":"crab","🦞":"lobster","🦐":"shrimp","🦑":"squid","🦪":"oyster","🍦":"soft-ice-cream","🍧":"shaved-ice","🍨":"ice-cream","🍩":"doughnut","🍪":"cookie","🎂":"birthday-cake","🍰":"shortcake","🧁":"cupcake","🥧":"pie","🍫":"chocolate-bar","🍬":"candy","🍭":"lollipop","🍮":"custard","🍯":"honey-pot","🍼":"baby-bottle","🥛":"glass-of-milk","☕":"hot-beverage","🫖":"teapot","🍵":"teacup-without-handle","🍶":"sake","🍾":"bottle-with-popping-cork","🍷":"wine-glass","🍸":"cocktail-glass","🍹":"tropical-drink","🍺":"beer-mug","🍻":"clinking-beer-mugs","🥂":"clinking-glasses","🥃":"tumbler-glass","🫗":"pouring-liquid","🥤":"cup-with-straw","🧋":"bubble-tea","🧃":"beverage-box","🧉":"mate","🧊":"ice","🥢":"chopsticks","🍽":"fork-and-knife-with-plate","🍴":"fork-and-knife","🥄":"spoon","🔪":"kitchen-knife","🫙":"jar","🏺":"amphora","🌍":"globe-showing-europe-africa","🌎":"globe-showing-americas","🌏":"globe-showing-asia-australia","🌐":"globe-with-meridians","🗺":"world-map","🗾":"map-of-japan","🧭":"compass","🏔":"snow-capped-mountain","⛰":"mountain","🌋":"volcano","🗻":"mount-fuji","🏕":"camping","🏖":"beach-with-umbrella","🏜":"desert","🏝":"desert-island","🏞":"national-park","🏟":"stadium","🏛":"classical-building","🏗":"building-construction","🧱":"brick","🪨":"rock","🪵":"wood","🛖":"hut","🏘":"houses","🏚":"derelict-house","🏠":"house","🏡":"house-with-garden","🏢":"office-building","🏣":"japanese-post-office","🏤":"post-office","🏥":"hospital","🏦":"bank","🏨":"hotel","🏩":"love-hotel","🏪":"convenience-store","🏫":"school","🏬":"department-store","🏭":"factory","🏯":"japanese-castle","🏰":"castle","💒":"wedding","🗼":"tokyo-tower","🗽":"statue-of-liberty","⛪":"church","🕌":"mosque","🛕":"hindu-temple","🕍":"synagogue","⛩":"shinto-shrine","🕋":"kaaba","⛲":"fountain","⛺":"tent","🌁":"foggy","🌃":"night-with-stars","🏙":"cityscape","🌄":"sunrise-over-mountains","🌅":"sunrise","🌆":"cityscape-at-dusk","🌇":"sunset","🌉":"bridge-at-night","♨":"hot-springs","🎠":"carousel-horse","🛝":"playground-slide","🎡":"ferris-wheel","🎢":"roller-coaster","💈":"barber-pole","🎪":"circus-tent","🚂":"locomotive","🚃":"railway-car","🚄":"high-speed-train","🚅":"bullet-train","🚆":"train","🚇":"metro","🚈":"light-rail","🚉":"station","🚊":"tram","🚝":"monorail","🚞":"mountain-railway","🚋":"tram-car","🚌":"bus","🚍":"oncoming-bus","🚎":"trolleybus","🚐":"minibus","🚑":"ambulance","🚒":"fire-engine","🚓":"police-car","🚔":"oncoming-police-car","🚕":"taxi","🚖":"oncoming-taxi","🚗":"automobile","🚘":"oncoming-automobile","🚙":"sport-utility-vehicle","🛻":"pickup-truck","🚚":"delivery-truck","🚛":"articulated-lorry","🚜":"tractor","🏎":"racing-car","🏍":"motorcycle","🛵":"motor-scooter","🦽":"manual-wheelchair","🦼":"motorized-wheelchair","🛺":"auto-rickshaw","🚲":"bicycle","🛴":"kick-scooter","🛹":"skateboard","🛼":"roller-skate","🚏":"bus-stop","🛣":"motorway","🛤":"railway-track","🛢":"oil-drum","⛽":"fuel-pump","🛞":"wheel","🚨":"police-car-light","🚥":"horizontal-traffic-light","🚦":"vertical-traffic-light","🛑":"stop-sign","🚧":"construction","⚓":"anchor","🛟":"ring-buoy","⛵":"sailboat","🛶":"canoe","🚤":"speedboat","🛳":"passenger-ship","⛴":"ferry","🛥":"motor-boat","🚢":"ship","✈":"airplane","🛩":"small-airplane","🛫":"airplane-departure","🛬":"airplane-arrival","🪂":"parachute","💺":"seat","🚁":"helicopter","🚟":"suspension-railway","🚠":"mountain-cableway","🚡":"aerial-tramway","🛰":"satellite","🚀":"rocket","🛸":"flying-saucer","🛎":"bellhop-bell","🧳":"luggage","⌛":"hourglass-done","⏳":"hourglass-not-done","⌚":"watch","⏰":"alarm-clock","⏱":"stopwatch","⏲":"timer-clock","🕰":"mantelpiece-clock","🕛":"twelve-o-clock","🕧":"twelve-thirty","🕐":"one-o-clock","🕜":"one-thirty","🕑":"two-o-clock","🕝":"two-thirty","🕒":"three-o-clock","🕞":"three-thirty","🕓":"four-o-clock","🕟":"four-thirty","🕔":"five-o-clock","🕠":"five-thirty","🕕":"six-o-clock","🕡":"six-thirty","🕖":"seven-o-clock","🕢":"seven-thirty","🕗":"eight-o-clock","🕣":"eight-thirty","🕘":"nine-o-clock","🕤":"nine-thirty","🕙":"ten-o-clock","🕥":"ten-thirty","🕚":"eleven-o-clock","🕦":"eleven-thirty","🌑":"new-moon","🌒":"waxing-crescent-moon","🌓":"first-quarter-moon","🌔":"waxing-gibbous-moon","🌕":"full-moon","🌖":"waning-gibbous-moon","🌗":"last-quarter-moon","🌘":"waning-crescent-moon","🌙":"crescent-moon","🌚":"new-moon-face","🌛":"first-quarter-moon-face","🌜":"last-quarter-moon-face","🌡":"thermometer","☀":"sun","🌝":"full-moon-face","🌞":"sun-with-face","🪐":"ringed-planet","⭐":"star","🌟":"glowing-star","🌠":"shooting-star","🌌":"milky-way","☁":"cloud","⛅":"sun-behind-cloud","⛈":"cloud-with-lightning-and-rain","🌤":"sun-behind-small-cloud","🌥":"sun-behind-large-cloud","🌦":"sun-behind-rain-cloud","🌧":"cloud-with-rain","🌨":"cloud-with-snow","🌩":"cloud-with-lightning","🌪":"tornado","🌫":"fog","🌬":"wind-face","🌀":"cyclone","🌈":"rainbow","🌂":"closed-umbrella","☂":"umbrella","☔":"umbrella-with-rain-drops","⛱":"umbrella-on-ground","⚡":"high-voltage","❄":"snowflake","☃":"snowman","⛄":"snowman-without-snow","☄":"comet","🔥":"fire","💧":"droplet","🌊":"water-wave","🎃":"jack-o-lantern","🎄":"christmas-tree","🎆":"fireworks","🎇":"sparkler","🧨":"firecracker","✨":"sparkles","🎈":"balloon","🎉":"party-popper","🎊":"confetti-ball","🎋":"tanabata-tree","🎍":"pine-decoration","🎎":"japanese-dolls","🎏":"carp-streamer","🎐":"wind-chime","🎑":"moon-viewing-ceremony","🧧":"red-envelope","🎀":"ribbon","🎁":"wrapped-gift","🎗":"reminder-ribbon","🎟":"admission-tickets","🎫":"ticket","🎖":"military-medal","🏆":"trophy","🏅":"sports-medal","🥇":"1st-place-medal","🥈":"2nd-place-medal","🥉":"3rd-place-medal","⚽":"soccer-ball","⚾":"baseball","🥎":"softball","🏀":"basketball","🏐":"volleyball","🏈":"american-football","🏉":"rugby-football","🎾":"tennis","🥏":"flying-disc","🎳":"bowling","🏏":"cricket-game","🏑":"field-hockey","🏒":"ice-hockey","🥍":"lacrosse","🏓":"ping-pong","🏸":"badminton","🥊":"boxing-glove","🥋":"martial-arts-uniform","🥅":"goal-net","⛳":"flag-in-hole","⛸":"ice-skate","🎣":"fishing-pole","🤿":"diving-mask","🎽":"running-shirt","🎿":"skis","🛷":"sled","🥌":"curling-stone","🎯":"bullseye","🪀":"yo-yo","🪁":"kite","🔫":"water-pistol","🎱":"pool-8-ball","🔮":"crystal-ball","🪄":"magic-wand","🎮":"video-game","🕹":"joystick","🎰":"slot-machine","🎲":"game-die","🧩":"puzzle-piece","🧸":"teddy-bear","🪅":"piñata","🪩":"mirror-ball","🪆":"nesting-dolls","♠":"spade-suit","♥":"heart-suit","♦":"diamond-suit","♣":"club-suit","♟":"chess-pawn","🃏":"joker","🀄":"mahjong-red-dragon","🎴":"flower-playing-cards","🎭":"performing-arts","🖼":"framed-picture","🎨":"artist-palette","🧵":"thread","🪡":"sewing-needle","🧶":"yarn","🪢":"knot","👓":"glasses","🕶":"sunglasses","🥽":"goggles","🥼":"lab-coat","🦺":"safety-vest","👔":"necktie","👕":"t-shirt","👖":"jeans","🧣":"scarf","🧤":"gloves","🧥":"coat","🧦":"socks","👗":"dress","👘":"kimono","🥻":"sari","🩱":"one-piece-swimsuit","🩲":"briefs","🩳":"shorts","👙":"bikini","👚":"woman-s-clothes","🪭":"⊛-folding-hand-fan","👛":"purse","👜":"handbag","👝":"clutch-bag","🛍":"shopping-bags","🎒":"backpack","🩴":"thong-sandal","👞":"man-s-shoe","👟":"running-shoe","🥾":"hiking-boot","🥿":"flat-shoe","👠":"high-heeled-shoe","👡":"woman-s-sandal","🩰":"ballet-shoes","👢":"woman-s-boot","🪮":"⊛-hair-pick","👑":"crown","👒":"woman-s-hat","🎩":"top-hat","🎓":"graduation-cap","🧢":"billed-cap","🪖":"military-helmet","⛑":"rescue-worker-s-helmet","📿":"prayer-beads","💄":"lipstick","💍":"ring","💎":"gem-stone","🔇":"muted-speaker","🔈":"speaker-low-volume","🔉":"speaker-medium-volume","🔊":"speaker-high-volume","📢":"loudspeaker","📣":"megaphone","📯":"postal-horn","🔔":"bell","🔕":"bell-with-slash","🎼":"musical-score","🎵":"musical-note","🎶":"musical-notes","🎙":"studio-microphone","🎚":"level-slider","🎛":"control-knobs","🎤":"microphone","🎧":"headphone","📻":"radio","🎷":"saxophone","🪗":"accordion","🎸":"guitar","🎹":"musical-keyboard","🎺":"trumpet","🎻":"violin","🪕":"banjo","🥁":"drum","🪘":"long-drum","🪇":"maracas","🪈":"flute","📱":"mobile-phone","📲":"mobile-phone-with-arrow","☎":"telephone","📞":"telephone-receiver","📟":"pager","📠":"fax-machine","🔋":"battery","🪫":"low-battery","🔌":"electric-plug","💻":"laptop","🖥":"desktop-computer","🖨":"printer","⌨":"keyboard","🖱":"computer-mouse","🖲":"trackball","💽":"computer-disk","💾":"floppy-disk","💿":"optical-disk","📀":"dvd","🧮":"abacus","🎥":"movie-camera","🎞":"film-frames","📽":"film-projector","🎬":"clapper-board","📺":"television","📷":"camera","📸":"camera-with-flash","📹":"video-camera","📼":"videocassette","🔍":"magnifying-glass-tilted-left","🔎":"magnifying-glass-tilted-right","🕯":"candle","💡":"light-bulb","🔦":"flashlight","🏮":"red-paper-lantern","🪔":"diya-lamp","📔":"notebook-with-decorative-cover","📕":"closed-book","📖":"open-book","📗":"green-book","📘":"blue-book","📙":"orange-book","📚":"books","📓":"notebook","📒":"ledger","📃":"page-with-curl","📜":"scroll","📄":"page-facing-up","📰":"newspaper","🗞":"rolled-up-newspaper","📑":"bookmark-tabs","🔖":"bookmark","🏷":"label","💰":"money-bag","🪙":"coin","💴":"yen-banknote","💵":"dollar-banknote","💶":"euro-banknote","💷":"pound-banknote","💸":"money-with-wings","💳":"credit-card","🧾":"receipt","💹":"chart-increasing-with-yen","✉":"envelope","📧":"e-mail","📨":"incoming-envelope","📩":"envelope-with-arrow","📤":"outbox-tray","📥":"inbox-tray","📦":"package","📫":"closed-mailbox-with-raised-flag","📪":"closed-mailbox-with-lowered-flag","📬":"open-mailbox-with-raised-flag","📭":"open-mailbox-with-lowered-flag","📮":"postbox","🗳":"ballot-box-with-ballot","✏":"pencil","✒":"black-nib","🖋":"fountain-pen","🖊":"pen","🖌":"paintbrush","🖍":"crayon","📝":"memo","💼":"briefcase","📁":"file-folder","📂":"open-file-folder","🗂":"card-index-dividers","📅":"calendar","📆":"tear-off-calendar","🗒":"spiral-notepad","🗓":"spiral-calendar","📇":"card-index","📈":"chart-increasing","📉":"chart-decreasing","📊":"bar-chart","📋":"clipboard","📌":"pushpin","📍":"round-pushpin","📎":"paperclip","🖇":"linked-paperclips","📏":"straight-ruler","📐":"triangular-ruler","✂":"scissors","🗃":"card-file-box","🗄":"file-cabinet","🗑":"wastebasket","🔒":"locked","🔓":"unlocked","🔏":"locked-with-pen","🔐":"locked-with-key","🔑":"key","🗝":"old-key","🔨":"hammer","🪓":"axe","⛏":"pick","⚒":"hammer-and-pick","🛠":"hammer-and-wrench","🗡":"dagger","⚔":"crossed-swords","💣":"bomb","🪃":"boomerang","🏹":"bow-and-arrow","🛡":"shield","🪚":"carpentry-saw","🔧":"wrench","🪛":"screwdriver","🔩":"nut-and-bolt","⚙":"gear","🗜":"clamp","⚖":"balance-scale","🦯":"white-cane","🔗":"link","⛓":"chains","🪝":"hook","🧰":"toolbox","🧲":"magnet","🪜":"ladder","⚗":"alembic","🧪":"test-tube","🧫":"petri-dish","🧬":"dna","🔬":"microscope","🔭":"telescope","📡":"satellite-antenna","💉":"syringe","🩸":"drop-of-blood","💊":"pill","🩹":"adhesive-bandage","🩼":"crutch","🩺":"stethoscope","🩻":"x-ray","🚪":"door","🛗":"elevator","🪞":"mirror","🪟":"window","🛏":"bed","🛋":"couch-and-lamp","🪑":"chair","🚽":"toilet","🪠":"plunger","🚿":"shower","🛁":"bathtub","🪤":"mouse-trap","🪒":"razor","🧴":"lotion-bottle","🧷":"safety-pin","🧹":"broom","🧺":"basket","🧻":"roll-of-paper","🪣":"bucket","🧼":"soap","🫧":"bubbles","🪥":"toothbrush","🧽":"sponge","🧯":"fire-extinguisher","🛒":"shopping-cart","🚬":"cigarette","⚰":"coffin","🪦":"headstone","⚱":"funeral-urn","🧿":"nazar-amulet","🪬":"hamsa","🗿":"moai","🪧":"placard","🪪":"identification-card","🏧":"atm-sign","🚮":"litter-in-bin-sign","🚰":"potable-water","♿":"wheelchair-symbol","🚹":"men-s-room","🚺":"women-s-room","🚻":"restroom","🚼":"baby-symbol","🚾":"water-closet","🛂":"passport-control","🛃":"customs","🛄":"baggage-claim","🛅":"left-luggage","⚠":"warning","🚸":"children-crossing","⛔":"no-entry","🚫":"prohibited","🚳":"no-bicycles","🚭":"no-smoking","🚯":"no-littering","🚱":"non-potable-water","🚷":"no-pedestrians","📵":"no-mobile-phones","🔞":"no-one-under-eighteen","☢":"radioactive","☣":"biohazard","⬆":"up-arrow","↗":"up-right-arrow","➡":"right-arrow","↘":"down-right-arrow","⬇":"down-arrow","↙":"down-left-arrow","⬅":"left-arrow","↖":"up-left-arrow","↕":"up-down-arrow","↔":"left-right-arrow","↩":"right-arrow-curving-left","↪":"left-arrow-curving-right","⤴":"right-arrow-curving-up","⤵":"right-arrow-curving-down","🔃":"clockwise-vertical-arrows","🔄":"counterclockwise-arrows-button","🔙":"back-arrow","🔚":"end-arrow","🔛":"on!-arrow","🔜":"soon-arrow","🔝":"top-arrow","🛐":"place-of-worship","⚛":"atom-symbol","🕉":"om","✡":"star-of-david","☸":"wheel-of-dharma","☯":"yin-yang","✝":"latin-cross","☦":"orthodox-cross","☪":"star-and-crescent","☮":"peace-symbol","🕎":"menorah","🔯":"dotted-six-pointed-star","🪯":"⊛-khanda","♈":"aries","♉":"taurus","♊":"gemini","♋":"cancer","♌":"leo","♍":"virgo","♎":"libra","♏":"scorpio","♐":"sagittarius","♑":"capricorn","♒":"aquarius","♓":"pisces","⛎":"ophiuchus","🔀":"shuffle-tracks-button","🔁":"repeat-button","🔂":"repeat-single-button","▶":"play-button","⏩":"fast-forward-button","⏭":"next-track-button","⏯":"play-or-pause-button","◀":"reverse-button","⏪":"fast-reverse-button","⏮":"last-track-button","🔼":"upwards-button","⏫":"fast-up-button","🔽":"downwards-button","⏬":"fast-down-button","⏸":"pause-button","⏹":"stop-button","⏺":"record-button","⏏":"eject-button","🎦":"cinema","🔅":"dim-button","🔆":"bright-button","📶":"antenna-bars","🛜":"⊛-wireless","📳":"vibration-mode","📴":"mobile-phone-off","♀":"female-sign","♂":"male-sign","⚧":"transgender-symbol","✖":"multiply","➕":"plus","➖":"minus","➗":"divide","🟰":"heavy-equals-sign","♾":"infinity","‼":"double-exclamation-mark","⁉":"exclamation-question-mark","❓":"red-question-mark","❔":"white-question-mark","❕":"white-exclamation-mark","❗":"red-exclamation-mark","〰":"wavy-dash","💱":"currency-exchange","💲":"heavy-dollar-sign","⚕":"medical-symbol","♻":"recycling-symbol","⚜":"fleur-de-lis","🔱":"trident-emblem","📛":"name-badge","🔰":"japanese-symbol-for-beginner","⭕":"hollow-red-circle","✅":"check-mark-button","☑":"check-box-with-check","✔":"check-mark","❌":"cross-mark","❎":"cross-mark-button","➰":"curly-loop","➿":"double-curly-loop","〽":"part-alternation-mark","✳":"eight-spoked-asterisk","✴":"eight-pointed-star","❇":"sparkle","©":"copyright","®":"registered","™":"trade-mark","#️⃣":"keycap-#","*️⃣":"keycap-*","0️⃣":"keycap-0","1️⃣":"keycap-1","2️⃣":"keycap-2","3️⃣":"keycap-3","4️⃣":"keycap-4","5️⃣":"keycap-5","6️⃣":"keycap-6","7️⃣":"keycap-7","8️⃣":"keycap-8","9️⃣":"keycap-9","🔟":"keycap-10","🔠":"input-latin-uppercase","🔡":"input-latin-lowercase","🔢":"input-numbers","🔣":"input-symbols","🔤":"input-latin-letters","🅰":"a-button-(blood-type)","🆎":"ab-button-(blood-type)","🅱":"b-button-(blood-type)","🆑":"cl-button","🆒":"cool-button","🆓":"free-button","ℹ":"information","🆔":"id-button","Ⓜ":"circled-m","🆕":"new-button","🆖":"ng-button","🅾":"o-button-(blood-type)","🆗":"ok-button","🅿":"p-button","🆘":"sos-button","🆙":"up!-button","🆚":"vs-button","🈁":"japanese-here-button","🈂":"japanese-service-charge-button","🈷":"japanese-monthly-amount-button","🈶":"japanese-not-free-of-charge-button","🈯":"japanese-reserved-button","🉐":"japanese-bargain-button","🈹":"japanese-discount-button","🈚":"japanese-free-of-charge-button","🈲":"japanese-prohibited-button","🉑":"japanese-acceptable-button","🈸":"japanese-application-button","🈴":"japanese-passing-grade-button","🈳":"japanese-vacancy-button","㊗":"japanese-congratulations-button","㊙":"japanese-secret-button","🈺":"japanese-open-for-business-button","🈵":"japanese-no-vacancy-button","🔴":"red-circle","🟠":"orange-circle","🟡":"yellow-circle","🟢":"green-circle","🔵":"blue-circle","🟣":"purple-circle","🟤":"brown-circle","⚫":"black-circle","⚪":"white-circle","🟥":"red-square","🟧":"orange-square","🟨":"yellow-square","🟩":"green-square","🟦":"blue-square","🟪":"purple-square","🟫":"brown-square","⬛":"black-large-square","⬜":"white-large-square","◼":"black-medium-square","◻":"white-medium-square","◾":"black-medium-small-square","◽":"white-medium-small-square","▪":"black-small-square","▫":"white-small-square","🔶":"large-orange-diamond","🔷":"large-blue-diamond","🔸":"small-orange-diamond","🔹":"small-blue-diamond","🔺":"red-triangle-pointed-up","🔻":"red-triangle-pointed-down","💠":"diamond-with-a-dot","🔘":"radio-button","🔳":"white-square-button","🔲":"black-square-button","🏁":"chequered-flag","🚩":"triangular-flag","🎌":"crossed-flags","🏴":"black-flag","🏳":"white-flag","🏳️‍🌈":"rainbow-flag","🏳️‍⚧️":"transgender-flag","🏴‍☠️":"pirate-flag","🇦🇨":"flag-ascension-island","🇦🇩":"flag-andorra","🇦🇪":"flag-united-arab-emirates","🇦🇫":"flag-afghanistan","🇦🇬":"flag-antigua-and-barbuda","🇦🇮":"flag-anguilla","🇦🇱":"flag-albania","🇦🇲":"flag-armenia","🇦🇴":"flag-angola","🇦🇶":"flag-antarctica","🇦🇷":"flag-argentina","🇦🇸":"flag-american-samoa","🇦🇹":"flag-austria","🇦🇺":"flag-australia","🇦🇼":"flag-aruba","🇦🇽":"flag-åland-islands","🇦🇿":"flag-azerbaijan","🇧🇦":"flag-bosnia-and-herzegovina","🇧🇧":"flag-barbados","🇧🇩":"flag-bangladesh","🇧🇪":"flag-belgium","🇧🇫":"flag-burkina-faso","🇧🇬":"flag-bulgaria","🇧🇭":"flag-bahrain","🇧🇮":"flag-burundi","🇧🇯":"flag-benin","🇧🇱":"flag-st-barthelemy","🇧🇲":"flag-bermuda","🇧🇳":"flag-brunei","🇧🇴":"flag-bolivia","🇧🇶":"flag-caribbean-netherlands","🇧🇷":"flag-brazil","🇧🇸":"flag-bahamas","🇧🇹":"flag-bhutan","🇧🇻":"flag-bouvet-island","🇧🇼":"flag-botswana","🇧🇾":"flag-belarus","🇧🇿":"flag-belize","🇨🇦":"flag-canada","🇨🇨":"flag-cocos-(keeling)-islands","🇨🇩":"flag-congo---kinshasa","🇨🇫":"flag-central-african-republic","🇨🇬":"flag-congo---brazzaville","🇨🇭":"flag-switzerland","🇨🇮":"flag-côte-d-ivoire","🇨🇰":"flag-cook-islands","🇨🇱":"flag-chile","🇨🇲":"flag-cameroon","🇨🇳":"flag-china","🇨🇴":"flag-colombia","🇨🇵":"flag-clipperton-island","🇨🇷":"flag-costa-rica","🇨🇺":"flag-cuba","🇨🇻":"flag-cape-verde","🇨🇼":"flag-curaçao","🇨🇽":"flag-christmas-island","🇨🇾":"flag-cyprus","🇨🇿":"flag-czechia","🇩🇪":"flag-germany","🇩🇬":"flag-diego-garcia","🇩🇯":"flag-djibouti","🇩🇰":"flag-denmark","🇩🇲":"flag-dominica","🇩🇴":"flag-dominican-republic","🇩🇿":"flag-algeria","🇪🇦":"flag-ceuta-and-melilla","🇪🇨":"flag-ecuador","🇪🇪":"flag-estonia","🇪🇬":"flag-egypt","🇪🇭":"flag-western-sahara","🇪🇷":"flag-eritrea","🇪🇸":"flag-spain","🇪🇹":"flag-ethiopia","🇪🇺":"flag-european-union","🇫🇮":"flag-finland","🇫🇯":"flag-fiji","🇫🇰":"flag-falkland-islands","🇫🇲":"flag-micronesia","🇫🇴":"flag-faroe-islands","🇫🇷":"flag-france","🇬🇦":"flag-gabon","🇬🇧":"flag-united-kingdom","🇬🇩":"flag-grenada","🇬🇪":"flag-georgia","🇬🇫":"flag-french-guiana","🇬🇬":"flag-guernsey","🇬🇭":"flag-ghana","🇬🇮":"flag-gibraltar","🇬🇱":"flag-greenland","🇬🇲":"flag-gambia","🇬🇳":"flag-guinea","🇬🇵":"flag-guadeloupe","🇬🇶":"flag-equatorial-guinea","🇬🇷":"flag-greece","🇬🇸":"flag-south-georgia-and-south-sandwich-islands","🇬🇹":"flag-guatemala","🇬🇺":"flag-guam","🇬🇼":"flag-guinea-bissau","🇬🇾":"flag-guyana","🇭🇰":"flag-hong-kong-sar-china","🇭🇲":"flag-heard-and-mcdonald-islands","🇭🇳":"flag-honduras","🇭🇷":"flag-croatia","🇭🇹":"flag-haiti","🇭🇺":"flag-hungary","🇮🇨":"flag-canary-islands","🇮🇩":"flag-indonesia","🇮🇪":"flag-ireland","🇮🇱":"flag-israel","🇮🇲":"flag-isle-of-man","🇮🇳":"flag-india","🇮🇴":"flag-british-indian-ocean-territory","🇮🇶":"flag-iraq","🇮🇷":"flag-iran","🇮🇸":"flag-iceland","🇮🇹":"flag-italy","🇯🇪":"flag-jersey","🇯🇲":"flag-jamaica","🇯🇴":"flag-jordan","🇯🇵":"flag-japan","🇰🇪":"flag-kenya","🇰🇬":"flag-kyrgyzstan","🇰🇭":"flag-cambodia","🇰🇮":"flag-kiribati","🇰🇲":"flag-comoros","🇰🇳":"flag-st-kitts-and-nevis","🇰🇵":"flag-north-korea","🇰🇷":"flag-south-korea","🇰🇼":"flag-kuwait","🇰🇾":"flag-cayman-islands","🇰🇿":"flag-kazakhstan","🇱🇦":"flag-laos","🇱🇧":"flag-lebanon","🇱🇨":"flag-st-lucia","🇱🇮":"flag-liechtenstein","🇱🇰":"flag-sri-lanka","🇱🇷":"flag-liberia","🇱🇸":"flag-lesotho","🇱🇹":"flag-lithuania","🇱🇺":"flag-luxembourg","🇱🇻":"flag-latvia","🇱🇾":"flag-libya","🇲🇦":"flag-morocco","🇲🇨":"flag-monaco","🇲🇩":"flag-moldova","🇲🇪":"flag-montenegro","🇲🇫":"flag-st-martin","🇲🇬":"flag-madagascar","🇲🇭":"flag-marshall-islands","🇲🇰":"flag-north-macedonia","🇲🇱":"flag-mali","🇲🇲":"flag-myanmar-(burma)","🇲🇳":"flag-mongolia","🇲🇴":"flag-macao-sar-china","🇲🇵":"flag-northern-mariana-islands","🇲🇶":"flag-martinique","🇲🇷":"flag-mauritania","🇲🇸":"flag-montserrat","🇲🇹":"flag-malta","🇲🇺":"flag-mauritius","🇲🇻":"flag-maldives","🇲🇼":"flag-malawi","🇲🇽":"flag-mexico","🇲🇾":"flag-malaysia","🇲🇿":"flag-mozambique","🇳🇦":"flag-namibia","🇳🇨":"flag-new-caledonia","🇳🇪":"flag-niger","🇳🇫":"flag-norfolk-island","🇳🇬":"flag-nigeria","🇳🇮":"flag-nicaragua","🇳🇱":"flag-netherlands","🇳🇴":"flag-norway","🇳🇵":"flag-nepal","🇳🇷":"flag-nauru","🇳🇺":"flag-niue","🇳🇿":"flag-new-zealand","🇴🇲":"flag-oman","🇵🇦":"flag-panama","🇵🇪":"flag-peru","🇵🇫":"flag-french-polynesia","🇵🇬":"flag-papua-new-guinea","🇵🇭":"flag-philippines","🇵🇰":"flag-pakistan","🇵🇱":"flag-poland","🇵🇲":"flag-st-pierre-and-miquelon","🇵🇳":"flag-pitcairn-islands","🇵🇷":"flag-puerto-rico","🇵🇸":"flag-palestinian-territories","🇵🇹":"flag-portugal","🇵🇼":"flag-palau","🇵🇾":"flag-paraguay","🇶🇦":"flag-qatar","🇷🇪":"flag-reunion","🇷🇴":"flag-romania","🇷🇸":"flag-serbia","🇷🇺":"flag-russia","🇷🇼":"flag-rwanda","🇸🇦":"flag-saudi-arabia","🇸🇧":"flag-solomon-islands","🇸🇨":"flag-seychelles","🇸🇩":"flag-sudan","🇸🇪":"flag-sweden","🇸🇬":"flag-singapore","🇸🇭":"flag-st-helena","🇸🇮":"flag-slovenia","🇸🇯":"flag-svalbard-and-jan-mayen","🇸🇰":"flag-slovakia","🇸🇱":"flag-sierra-leone","🇸🇲":"flag-san-marino","🇸🇳":"flag-senegal","🇸🇴":"flag-somalia","🇸🇷":"flag-suriname","🇸🇸":"flag-south-sudan","🇸🇹":"flag-são-tome-and-príncipe","🇸🇻":"flag-el-salvador","🇸🇽":"flag-sint-maarten","🇸🇾":"flag-syria","🇸🇿":"flag-eswatini","🇹🇦":"flag-tristan-da-cunha","🇹🇨":"flag-turks-and-caicos-islands","🇹🇩":"flag-chad","🇹🇫":"flag-french-southern-territories","🇹🇬":"flag-togo","🇹🇭":"flag-thailand","🇹🇯":"flag-tajikistan","🇹🇰":"flag-tokelau","🇹🇱":"flag-timor-leste","🇹🇲":"flag-turkmenistan","🇹🇳":"flag-tunisia","🇹🇴":"flag-tonga","🇹🇷":"flag-turkey","🇹🇹":"flag-trinidad-and-tobago","🇹🇻":"flag-tuvalu","🇹🇼":"flag-taiwan","🇹🇿":"flag-tanzania","🇺🇦":"flag-ukraine","🇺🇬":"flag-uganda","🇺🇲":"flag-us-outlying-islands","🇺🇳":"flag-united-nations","🇺🇸":"flag-united-states","🇺🇾":"flag-uruguay","🇺🇿":"flag-uzbekistan","🇻🇦":"flag-vatican-city","🇻🇨":"flag-st-vincent-and-grenadines","🇻🇪":"flag-venezuela","🇻🇬":"flag-british-virgin-islands","🇻🇮":"flag-us-virgin-islands","🇻🇳":"flag-vietnam","🇻🇺":"flag-vanuatu","🇼🇫":"flag-wallis-and-futuna","🇼🇸":"flag-samoa","🇽🇰":"flag-kosovo","🇾🇪":"flag-yemen","🇾🇹":"flag-mayotte","🇿🇦":"flag-south-africa","🇿🇲":"flag-zambia","🇿🇼":"flag-zimbabwe","🏴󠁧󠁢󠁥󠁮󠁧󠁿":"flag-england","🏴󠁧󠁢󠁳󠁣󠁴󠁿":"flag-scotland","🏴󠁧󠁢󠁷󠁬󠁳󠁿":"flag-wales"},Fv=Object.keys(Ov);async function qv(e,t,n){let r=await Bv(t.filenameTemplate,t,n,e)||"";t.replaceEmojisInFilename&&Fv.forEach((e=>r=r.replaceAll(e," _"+Ov[e]+"_ ")));const a=t.filenameReplacementCharacter;if(r=function(e,t=Uv,n=Mv){return t.forEach((t=>e=e.replace(new RegExp("["+t+"]+","g"),n))),e=e.replace(/\.\.\//g,"").replace(/^\/+/,"").replace(/\/+/g,"/").replace(/\/$/,"").replace(/\.$/,"").replace(/\.\//g,"."+n).replace(/\/\./g,"/"+n),e}(r,t.filenameReplacedCharacters,a),t.backgroundSave||(r=r.replace(/\//g,a)),!t.keepFilename&&("bytes"==t.filenameMaxLengthUnit&&n.getContentSize(r)>t.filenameMaxLength||r.length>t.filenameMaxLength)){const e=r.match(/(\.[^.]{3,4})$/),n=e&&e[0]&&e[0].length>1?e[0]:"";r="bytes"==t.filenameMaxLengthUnit?await jv(r,t.filenameMaxLength-n.length):r.substring(0,t.filenameMaxLength-n.length),r=r+"…"+n}return r||(r="Unnamed page"),r}async function Bv(e="",t,n,r,a){const o=new URL(t.saveUrl);e=await d(e,"page-title",(()=>t.title||"No title"),a,t.filenameReplacementCharacter),e=await d(e,"page-heading",(()=>t.info.heading||"No heading"),a,t.filenameReplacementCharacter),e=await d(e,"page-language",(()=>t.info.lang||"No language"),a,t.filenameReplacementCharacter),e=await d(e,"page-description",(()=>t.info.description||"No description"),a,t.filenameReplacementCharacter),e=await d(e,"page-author",(()=>t.info.author||"No author"),a,t.filenameReplacementCharacter),e=await d(e,"page-creator",(()=>t.info.creator||"No creator"),a,t.filenameReplacementCharacter),e=await d(e,"page-publisher",(()=>t.info.publisher||"No publisher"),a,t.filenameReplacementCharacter),await u(t.saveDate),await u(t.visitDate,"visit-"),e=await d(e,"url-hash",(()=>o.hash.substring(1)||"No hash"),a,t.filenameReplacementCharacter),e=await d(e,"url-host",(()=>o.host.replace(/\/$/,"")||"No host"),a,t.filenameReplacementCharacter),e=await d(e,"url-hostname",(()=>o.hostname.replace(/\/$/,"")||"No hostname"),a,t.filenameReplacementCharacter);const i=c(o.href);e=await d(e,"url-href",(()=>i||"No href"),void 0===a||a,t.filenameReplacementCharacter),e=await d(e,"url-href-digest-sha-1",i?async()=>n.digest("SHA-1",i):"No href",a,t.filenameReplacementCharacter),e=await d(e,"url-href-flat",(()=>c(o.href)||"No href"),!1,t.filenameReplacementCharacter),e=await d(e,"url-referrer",(()=>c(t.referrer)||"No referrer"),void 0===a||a,t.filenameReplacementCharacter),e=await d(e,"url-referrer-flat",(()=>c(t.referrer)||"No referrer"),!1,t.filenameReplacementCharacter),e=await d(e,"url-password",(()=>o.password||"No password"),a,t.filenameReplacementCharacter),e=await d(e,"url-pathname",(()=>c(o.pathname).replace(/^\//,"").replace(/\/$/,"")||"No pathname"),void 0===a||a,t.filenameReplacementCharacter),e=await d(e,"url-pathname-flat",(()=>c(o.pathname)||"No pathname"),!1,t.filenameReplacementCharacter),e=await d(e,"url-port",(()=>o.port||"No port"),a,t.filenameReplacementCharacter),e=await d(e,"url-protocol",(()=>o.protocol||"No protocol"),a,t.filenameReplacementCharacter),e=await d(e,"url-search",(()=>o.search.substring(1)||"No search"),a,t.filenameReplacementCharacter);const s=Array.from(new URLSearchParams(o.search));for(const[n,r]of s)e=await d(e,"url-search-"+n,(()=>r||""),a,t.filenameReplacementCharacter);e=e.replace(/{\s*url-search-[^}\s]*\s*}/gi,""),e=await d(e,"url-username",(()=>o.username||"No username"),a,t.filenameReplacementCharacter),e=await d(e,"tab-id",(()=>String(t.tabId||"No tab id")),a,t.filenameReplacementCharacter),e=await d(e,"tab-index",(()=>String(t.tabIndex||"No tab index")),a,t.filenameReplacementCharacter),e=await d(e,"url-last-segment",(()=>c(function(e,t){let n=e.pathname.match(/\/([^/]+)$/),r=n&&n[0];r||(n=e.href.match(/([^/]+)\/?$/),r=n&&n[0]);r||(n=r.match(/(.*)\.[^.]+$/),r=n&&n[0]);r||(r=e.hostname.replace(/\/+/g,t).replace(/\/$/,""));n=r.match(/(.*)\.[^.]+$/),n&&n[1]&&(r=n[1]);return r=r.replace(/\/$/,"").replace(/^\//,""),r}(o,t.filenameReplacementCharacter))||"No last segment"),a,t.filenameReplacementCharacter),r&&(e=await d(e,"digest-sha-256",(async()=>n.digest("SHA-256",r)),a,t.filenameReplacementCharacter),e=await d(e,"digest-sha-384",(async()=>n.digest("SHA-384",r)),a,t.filenameReplacementCharacter),e=await d(e,"digest-sha-512",(async()=>n.digest("SHA-512",r)),a,t.filenameReplacementCharacter));const l=t.bookmarkFolders&&t.bookmarkFolders.join("/")||"";return e=await d(e,"bookmark-pathname",(()=>l),void 0===a||a,t.filenameReplacementCharacter),e=await d(e,"bookmark-pathname-flat",(()=>l),!1,t.filenameReplacementCharacter),e=await d(e,"profile-name",(()=>t.profileName),a,t.filenameReplacementCharacter),(e=await d(e,"filename-extension",(()=>function(e){return e.compressContent?e.selfExtractingArchive?e.extractDataFromPage?"u.zip.html":"zip.html":"zip":"html"}(t)),a,t.filenameReplacementCharacter)).trim();function c(e){try{return decodeURI(e)}catch(t){return e}}async function u(n,r=""){n&&(e=await d(e,r+"datetime-iso",(()=>n.toISOString()),a,t.filenameReplacementCharacter),e=await d(e,r+"date-iso",(()=>n.toISOString().split("T")[0]),a,t.filenameReplacementCharacter),e=await d(e,r+"time-iso",(()=>n.toISOString().split("T")[1].split("Z")[0]),a,t.filenameReplacementCharacter),e=await d(e,r+"date-locale",(()=>n.toLocaleDateString()),a,t.filenameReplacementCharacter),e=await d(e,r+"time-locale",(()=>n.toLocaleTimeString()),a,t.filenameReplacementCharacter),e=await d(e,r+"day-locale",(()=>String(n.getDate()).padStart(2,"0")),a,t.filenameReplacementCharacter),e=await d(e,r+"month-locale",(()=>String(n.getMonth()+1).padStart(2,"0")),a,t.filenameReplacementCharacter),e=await d(e,r+"year-locale",(()=>String(n.getFullYear())),a,t.filenameReplacementCharacter),e=await d(e,r+"datetime-locale",(()=>n.toLocaleString()),a,t.filenameReplacementCharacter),e=await d(e,r+"datetime-utc",(()=>n.toUTCString()),a,t.filenameReplacementCharacter),e=await d(e,r+"day-utc",(()=>String(n.getUTCDate()).padStart(2,"0")),a,t.filenameReplacementCharacter),e=await d(e,r+"month-utc",(()=>String(n.getUTCMonth()+1).padStart(2,"0")),a,t.filenameReplacementCharacter),e=await d(e,r+"year-utc",(()=>String(n.getUTCFullYear())),a,t.filenameReplacementCharacter),e=await d(e,r+"hours-locale",(()=>String(n.getHours()).padStart(2,"0")),a,t.filenameReplacementCharacter),e=await d(e,r+"minutes-locale",(()=>String(n.getMinutes()).padStart(2,"0")),a,t.filenameReplacementCharacter),e=await d(e,r+"seconds-locale",(()=>String(n.getSeconds()).padStart(2,"0")),a,t.filenameReplacementCharacter),e=await d(e,r+"hours-utc",(()=>String(n.getUTCHours()).padStart(2,"0")),a,t.filenameReplacementCharacter),e=await d(e,r+"minutes-utc",(()=>String(n.getUTCMinutes()).padStart(2,"0")),a,t.filenameReplacementCharacter),e=await d(e,r+"seconds-utc",(()=>String(n.getUTCSeconds()).padStart(2,"0")),a,t.filenameReplacementCharacter),e=await d(e,r+"time-ms",(()=>String(n.getTime())),a,t.filenameReplacementCharacter))}async function d(e,t,n,r,a){let o,i;if(e){const s="{\\s*"+t.replace(/\W|_/g,"[$&]")+"\\s*}";let l=new RegExp(s+"\\[\\d+(ch)?\\]","g");if(e.match(l)){const t=e.match(l)[0];t.match(/\[(\d+)\]$/)?(o=Number(t.match(/\[(\d+)\]$/)[1]),(isNaN(o)||o<=0)&&(o=null)):(i=Number(t.match(/\[(\d+)ch\]$/)[1]),(isNaN(i)||i<=0)&&(i=null))}else l=new RegExp(s,"g");if(e.match(l)){let t=await n();return r||(t=t.replace(/\/+/g,a)),o?t=await jv(t,o):i&&(t=t.substring(0,i)),e.replace(l,t)}}return e}}function jv(e,t){const n=new Blob([e]),r=new FileReader;return r.readAsText(n.slice(0,t)),new Promise(((n,a)=>{r.addEventListener("load",(()=>{e.startsWith(r.result)?n(r.result):jv(e,t-1).then(n).catch(a)}),!1),r.addEventListener("error",a,!1)}))}var Hv=Object.freeze({__proto__:null,formatFilename:qv,evalTemplate:Bv}),Wv=Object.freeze({__proto__:null,fontsMinifier:Ik,matchedRules:Kk,mediasAltMinifier:ev,cssRulesMinifier:av,imagesAltMinifier:uv,htmlMinifier:Av,serializer:Nv,templateFormatter:Hv});const Vv="data:",Kv="about:blank",$v=/(#.+?)$/,Gv="blob:",Yv=/^https?:\/\//,Jv=/^file:\/\//,Qv=/^https?:\/\/+\s*$/,Zv=/^(https?:\/\/|file:\/\/|blob:).+/,Xv="utf-8";let ex,tx;function nx(e,t){return ex=e,tx=t,rx}class rx{setBackgroundImage(e,t,n){e.style.setProperty("background-blend-mode","normal","important"),e.style.setProperty("background-clip","content-box","important"),e.style.setProperty("background-position",n&&n["background-position"]?n["background-position"]:"center","important"),e.style.setProperty("background-color",n&&n["background-color"]?n["background-color"]:"transparent","important"),e.style.setProperty("background-image",t,"important"),e.style.setProperty("background-size",n&&n["background-size"]?n["background-size"]:"100% 100%","important"),e.style.setProperty("background-origin","content-box","important"),e.style.setProperty("background-repeat","no-repeat","important")}async getStylesheetContent(e,t){const n=await ex.getContent(e,{inline:!t.compressContent,maxResourceSize:t.maxResourceSize,maxResourceSizeEnabled:t.maxResourceSizeEnabled,validateTextContentType:!0,frameId:t.frameId,charset:t.charset,resourceReferrer:t.resourceReferrer,baseURI:t.baseURI,blockMixedContent:t.blockMixedContent,expectedType:"stylesheet",acceptHeaders:t.acceptHeaders,networkTimeout:t.networkTimeout});return ix(n.data,n.charset)||ix(n.data,t.charset)?n:(t=Object.assign({},t,{charset:sx(n.data)}),ex.getContent(e,{inline:!t.compressContent,maxResourceSize:t.maxResourceSize,maxResourceSizeEnabled:t.maxResourceSizeEnabled,validateTextContentType:!0,frameId:t.frameId,charset:t.charset,resourceReferrer:t.resourceReferrer,baseURI:t.baseURI,blockMixedContent:t.blockMixedContent,expectedType:"stylesheet",acceptHeaders:t.acceptHeaders,networkTimeout:t.networkTimeout}))}processShortcutIcons(e){let t=ux(Array.from(e.querySelectorAll('link[href][rel="shortcut icon"]')));t||(t=ux(Array.from(e.querySelectorAll('link[href][rel="icon"]')))),t||(t=ux(Array.from(e.querySelectorAll('link[href][rel*="icon"]'))),t&&(t.rel="shortcut icon")),t&&e.querySelectorAll('link[href][rel*="icon"]').forEach((e=>{e!=t&&e.remove()}))}removeSingleLineCssComments(e){if(e.children){const t=[];for(let n=e.children.head;n;n=n.next){const e=n.data;"Raw"==e.type&&e.value&&e.value.trim().startsWith("//")&&t.push(n)}t.forEach((t=>e.children.remove(t)))}}replacePseudoClassDefined(e){const t=[];if(e.children)for(let t=e.children.head;t;t=t.next){const e=t.data;if("Rule"==e.type&&e.prelude&&e.prelude.children)for(let t=e.prelude.children.head;t;t=t.next)n(t,e.prelude)}function n(e,r){if(e.data.children)for(let t=e.data.children.head;t;t=t.next)n(t,e);"PseudoClassSelector"==e.data.type&&"defined"==e.data.name&&t.push({parentSelector:r,selector:e})}t.length&&t.forEach((({parentSelector:e,selector:t})=>{0!=e.data.children.size&&t.prev&&"Combinator"!=t.prev.data.type&&"WhiteSpace"!=t.prev.data.type?e.data.children.remove(t):e.data.children.replace(t,tx.parse("*",{context:"selector"}).children.head)}))}resolveStylesheetURLs(e,t,n){lx(e).map((e=>{const r=e.value;let a=ox(r);if(!px(a)&&(n.textContent='tmp { content:"'+a+'"}',n.sheet&&n.sheet.cssRules&&(a=ex.removeQuotes(n.sheet.cssRules[0].style.getPropertyValue("content"))),!px(a)))if(!a||mx(a)){let n;if(!r.startsWith("#"))try{n=ex.resolveURL(a,t)}catch(e){}fx(n)&&(e.value=n)}else e.value=ex.EMPTY_RESOURCE}))}async processXLinks(e,t,n,r,a){let o="xlink:href";await Promise.all(Array.from(e).map((async e=>{let t=e.getAttribute(o);null==t&&(o="href",t=e.getAttribute(o)),r.saveOriginalURLs&&!dx(t)&&e.setAttribute("data-sf-original-href",t);let i=ox(t);if(r.blockImages)e.setAttribute(o,ex.EMPTY_RESOURCE);else if(mx(i)&&!px(i)){e.setAttribute(o,ex.EMPTY_RESOURCE);try{i=ex.resolveURL(i,n)}catch(e){}if(fx(i)){const r=t.match($v);if(t.startsWith(n+"#"))e.setAttribute(o,r[0]);else{const t=await a.addURL(i,{expectedType:"image"}),n=ex.parseSVGContent(t.content);if(r&&r[0]){let t;try{t=n.querySelector(r[0])}catch(e){}t&&(e.setAttribute(o,r[0]),e.parentElement.insertBefore(t,e.parentElement.firstChild))}else{const t=await a.addURL(i,{expectedType:"image"});e.setAttribute(o,"data:image/svg+xml,"+t)}}}}else i==r.url&&e.setAttribute(o,t.substring(i.length))})))}}function ax(e,t,n){return n.rootDocument&&n.updatedResources[e]?(n.updatedResources[e].retrieved=!0,n.updatedResources[e].content):t.data||""}function ox(e){return!e||e.startsWith(Vv)?e:e.split("#")[0]}function ix(e="",t=Xv){const n=sx(e);return!n||n==t.toLowerCase()}function sx(e=""){const t=e.match(/^@charset\s+"([^"]*)";/i);if(t&&t[1])return t[1].toLowerCase().trim()}function lx(e){return tx.findAll(e,(e=>"Url"==e.type))}function cx(e){return tx.findAll(e,(e=>"Atrule"==e.type&&"import"==e.name))}function ux(e){return(e=e.filter((e=>e.href!=ex.EMPTY_RESOURCE))).sort(((e,t)=>(parseInt(t.sizes,10)||16)-(parseInt(e.sizes,10)||16))),e[0]}function dx(e){return e&&(e.startsWith(Vv)||e.startsWith(Gv))}function hx(e){return e.replace(/url\(-sf-url-original\\\(\\"(.*?)\\"\\\)\\ /g,"/* original URL: $1 */url(")}function px(e){return e&&(e.startsWith(Vv)||e==Kv)}function mx(e){return e&&!e.match(Qv)}function fx(e){return mx(e)&&(e.match(Yv)||e.match(Jv)||e.startsWith(Gv))&&e.match(Zv)}const gx=globalThis.JSON,bx=globalThis.FontFace,yx=globalThis.Set,wx=globalThis.setTimeout,kx=globalThis.clearTimeout,vx=globalThis.Image,xx="about:blank",Ax="utf-8",Sx="data:image/svg+xml",Ex=["data:text/"],Tx=/<script/gi,Cx=/<noscript/gi,Rx=/<canvas/gi,_x="--sf-img-",zx=524288,Ix=/url\s*\(\s*'(.*?)'\s*\)/i,Lx=/url\s*\(\s*"(.*?)"\s*\)/i,Px=/url\s*\(\s*(.*?)\s*\)/i,Dx=/(url|local|-sf-url-original)\(.*?\)\s*(,|$)/g,Nx=/^'(.*?)'$/,Ux=/^"(.*?)"$/,Mx=/^url\(\s*["']?data:font\/(woff2?)/,Ox=/^url\(\s*["']?data:application\/x-font-(woff)/,Fx=/\.([^.?#]+)((\?|#).*?)?$/,qx=/format\((.*?)\)\s*,?$/,Bx=/(.*?)\s*,?$/,jx=/^url\(["']?data:[^,]*,?["']?\)/,Hx="local(",Wx="all",Vx={"ultra-condensed":"50%","extra-condensed":"62.5%",condensed:"75%","semi-condensed":"87.5%",normal:"100%","semi-expanded":"112.5%",expanded:"125%","extra-expanded":"150%","ultra-expanded":"200%"},Kx=5e3;let $x;function Gx(e){$x=e;const t=nx($x,by);return class extends t{async processPageResources(e,t,n,r,a,o){n.blockImages&&e.querySelectorAll("svg").forEach((e=>e.remove()));let i=[['link[href][rel*="icon"]',"href",!1,!0],['object[type="image/svg+xml"], object[type="image/svg-xml"], object[data*=".svg"]',"data"],["img[src], input[src][type=image]","src",!0],['embed[src*=".svg"]',"src"],["video[poster]","poster"],["*[background]","background"],["image","xlink:href"],["image","href"]].map((([i,s,l,c])=>this.processAttribute(e.querySelectorAll(i),s,t,n,"image",r,a,o,l,c)));i=i.concat([this.processXLinks(e.querySelectorAll("use"),e,t,n,o),this.processSrcset(e.querySelectorAll("img[srcset], source[srcset]"),t,n,o)]),i.push(this.processAttribute(e.querySelectorAll('object[data*=".pdf"]'),"data",t,n,null,r,a,o)),i.push(this.processAttribute(e.querySelectorAll('embed[src*=".pdf"]'),"src",t,n,null,r,a,o)),i.push(this.processAttribute(e.querySelectorAll("audio[src], audio > source[src]"),"src",t,n,"audio",r,a,o)),i.push(this.processAttribute(e.querySelectorAll("video[src], video > source[src]"),"src",t,n,"video",r,a,o)),i.push(this.processAttribute(e.querySelectorAll("audio track[src], video track[src]"),"src",t,n,null,r,a,o)),i.push(this.processAttribute(e.querySelectorAll("model[src]"),"src",t,n,null,r,a,o)),await Promise.all(i),n.saveFavicon&&this.processShortcutIcons(e)}async processLinkElement(e,t,n,r,a,o){"LINK"==e.tagName.toUpperCase()&&e.charset&&(a.charset=e.charset),await this.processStylesheetElement(e,t,n,r,a,o)}async processStylesheetElement(e,t,n,r,a,o){let i;if(n.set(e,t),!a.blockStylesheets)if("LINK"==e.tagName.toUpperCase())i=await this.resolveLinkStylesheetURLs(e.href,r,a,o);else{i=iy(e.textContent,{context:"stylesheet",parseCustomProperty:!0});await this.resolveImportURLs(i,r,a,o)&&(i=iy(sy(i),{context:"stylesheet",parseCustomProperty:!0}))}i&&i.children?(a.compressCSS&&this.removeSingleLineCssComments(i),this.replacePseudoClassDefined(i),t.stylesheet=i):n.delete(e)}replaceStylesheets(e,t,n,r){e.querySelectorAll("style").forEach((e=>{const n=t.get(e);n?(t.delete(e),e.textContent=this.generateStylesheetContent(n.stylesheet,r),n.mediaText&&(e.media=n.mediaText)):e.remove()})),e.querySelectorAll("link[rel*=stylesheet]").forEach((n=>{const a=t.get(n);if(a){t.delete(n);const o=e.createElement("style");a.mediaText&&(o.media=a.mediaText),o.textContent=this.generateStylesheetContent(a.stylesheet,r),n.parentElement.replaceChild(o,n)}else n.remove()}))}async resolveImportURLs(e,t,n,r,a=new yx){let o;this.resolveStylesheetURLs(e,t,r);const i=cx(e);return await Promise.all(i.map((async e=>{const i=dy(e,(e=>"Url"==e.type))||dy(e,(e=>"String"==e.type));if(i){let s=ox(i.value);if(!px(s)&&mx(s)){i.value=$x.EMPTY_RESOURCE;try{s=$x.resolveURL(s,t)}catch(e){}if(fx(s)&&!a.has(s)){n.inline=!0;const t=await this.getStylesheetContent(s,n);s=t.resourceURL,t.data=ax(s,t,n),t.data&&t.data.match(/^<!doctype /i)&&(t.data="");const i=dy(e,(e=>"MediaQueryList"==e.type));i&&(t.data=this.wrapMediaQuery(t.data,sy(i))),t.data=t.data.replace(/:defined/gi,"*");const l=iy(t.data,{context:"stylesheet",parseCustomProperty:!0}),c=new yx(a);c.add(s),await this.resolveImportURLs(l,s,n,r,c);for(let t of Object.keys(l))e[t]=l[t];o=!0}}}}))),o}async resolveLinkStylesheetURLs(e,t,n,r){if((e=ox(e))&&e!=t&&e!=xx){const a=await $x.getContent(e,{inline:!0,maxResourceSize:n.maxResourceSize,maxResourceSizeEnabled:n.maxResourceSizeEnabled,charset:n.charset,frameId:n.frameId,resourceReferrer:n.resourceReferrer,validateTextContentType:!0,baseURI:t,blockMixedContent:n.blockMixedContent,expectedType:"stylesheet",acceptHeaders:n.acceptHeaders,networkTimeout:n.networkTimeout});if(!ix(a.data,a.charset)&&!ix(a.data,n.charset))return n=Object.assign({},n,{charset:sx(a.data)}),this.resolveLinkStylesheetURLs(e,t,n,r);e=a.resourceURL,a.data=ax(a.resourceURL,a,n),a.data&&a.data.match(/^<!doctype /i)&&(a.data=""),a.data=a.data.replace(/:defined/gi,"*");let o=iy(a.data,{context:"stylesheet",parseCustomProperty:!0});return await this.resolveImportURLs(o,e,n,r)&&(o=iy(sy(o),{context:"stylesheet",parseCustomProperty:!0})),o}}async processFrame(e,t){let n="allow-popups allow-top-navigation allow-top-navigation-by-user-activation";(t.content.match(Cx)||t.content.match(Rx)||t.content.match(Tx))&&(n+=" allow-scripts allow-same-origin"),e.setAttribute("sandbox",n),"OBJECT"==e.tagName.toUpperCase()?e.setAttribute("data","data:text/html,"+t.content):"FRAME"==e.tagName.toUpperCase()?e.setAttribute("src","data:text/html,"+t.content.replace(/%/g,"%25").replace(/#/g,"%23")):(e.setAttribute("srcdoc",t.content),e.removeAttribute("src"))}async processStylesheet(e,t,n,r,a){const o=[],i=[];for(let l=e.head;l;l=l.next){const e=l.data;"Atrule"==e.type&&"charset"==e.name?i.push(l):e.block&&e.block.children&&("Rule"==e.type?o.push(this.processStyle(e,n,r,a)):"Atrule"!=e.type||"media"!=e.name&&"supports"!=e.name?"Atrule"==e.type&&"font-face"==e.name&&o.push(s(e)):o.push(this.processStylesheet(e.block.children,t,n,r,a)))}async function s(e){const o=lx(e);await Promise.all(o.map((async e=>{const o=e.value;if(n.blockFonts)e.value=$x.EMPTY_RESOURCE;else{const i=ox(o);if(!px(i)&&fx(i)){let{content:s}=await a.addURL(i,{asBinary:!0,expectedType:"font",baseURI:t,blockMixedContent:n.blockMixedContent}),l=r.fonts.get(e);l||(l=[],r.fonts.set(e,l)),l.push(i),!dx(i)&&n.saveOriginalURLs?e.value="-sf-url-original("+gx.stringify(o)+") "+s:e.value=s}}})))}i.forEach((t=>e.remove(t))),await Promise.all(o)}async processStyle(e,t,{cssVariables:n},r){const a=lx(e);await Promise.all(a.map((async e=>{const a=e.value;if(t.blockImages)e.value=$x.EMPTY_RESOURCE;else{const o=ox(a);if(!px(o)&&fx(o)){let{content:i,indexResource:s,duplicate:l}=await r.addURL(o,{asBinary:!0,expectedType:"image",groupDuplicates:t.groupDuplicateImages});if(!a.startsWith("#")){const r=t.maxSizeDuplicateImages||zx;if(l&&t.groupDuplicateImages&&$x.getContentSize(i)<r){const t=iy("var("+_x+s+")",{context:"value"});for(let n of Object.keys(t.children.head.data))e[n]=t.children.head.data[n];n.set(s,{content:i,url:a})}else!dx(o)&&t.saveOriginalURLs?e.value="-sf-url-original("+gx.stringify(a)+") "+i:e.value=i}}}})))}async processAttribute(e,t,n,r,a,{cssVariables:o},i,s,l,c){function u(e,t,n){"video"==n||"audio"==n?e.removeAttribute(t):e.setAttribute(t,$x.EMPTY_RESOURCE)}await Promise.all(Array.from(e).map((async e=>{let d=e.getAttribute(t);if(null!=d){d=ox(d);let h=e.dataset.singleFileOriginURL;if(r.saveOriginalURLs&&!dx(d)&&e.setAttribute("data-sf-original-"+t,d),delete e.dataset.singleFileOriginURL,a&&r["block"+a.charAt(0).toUpperCase()+a.substring(1)+"s"])u(e,t,a);else if(!px(d)&&(u(e,t,a),mx(d))){try{d=$x.resolveURL(d,n)}catch(e){}if(fx(d)){let{content:u,indexResource:p,duplicate:m}=await s.addURL(d,{asBinary:!0,expectedType:a,groupDuplicates:r.groupDuplicateImages&&"IMG"==e.tagName.toUpperCase()&&"src"==t});if(h&&this.testEmptyResource(u)){try{h=$x.resolveURL(h,n)}catch(e){}try{d=h,u=(await $x.getContent(d,{asBinary:!0,inline:!0,expectedType:a,maxResourceSize:r.maxResourceSize,maxResourceSizeEnabled:r.maxResourceSizeEnabled,frameId:r.windowId,resourceReferrer:r.resourceReferrer,acceptHeaders:r.acceptHeaders,networkTimeout:r.networkTimeout})).data}catch(e){}}if(c&&this.testEmptyResource(u))e.remove();else if(!this.testEmptyResource(u)){let n=Ex.filter((e=>u.startsWith(e))).length;if("image"==a){if(n&&vx&&(n=await new Promise((e=>{const t=new vx,n=wx((()=>e(!0)),100);function r(t){kx(n),e(t)}t.src=u,t.onload=()=>r(),t.onerror=()=>r(!0)}))),!n){const n=u.startsWith(Sx),a=r.maxSizeDuplicateImages||zx;if(l&&m&&!n&&$x.getContentSize(u)<a)if(this.replaceImageSource(e,_x+p,r)){o.set(p,{content:u,url:h});const t=iy(e.getAttribute("style"),{context:"declarationList",parseCustomProperty:!0});i.set(e,t)}else e.setAttribute(t,u);else e.setAttribute(t,u)}}else e.setAttribute(t,u)}}}}})))}async processSrcset(e,t,n,r){await Promise.all(Array.from(e).map((async e=>{const a=e.getAttribute("srcset"),o=$x.parseSrcset(a);if(n.saveOriginalURLs&&!dx(a)&&e.setAttribute("data-sf-original-srcset",a),n.blockImages)e.setAttribute("srcset","");else{const n=await Promise.all(o.map((async e=>{let n=ox(e.url);if(px(n))return n+(e.w?" "+e.w+"w":e.d?" "+e.d+"x":"");if(mx(n)){try{n=$x.resolveURL(n,t)}catch(e){}if(fx(n)){const{content:t}=await r.addURL(n,{asBinary:!0,expectedType:"image"});return Ex.filter((e=>t.startsWith(e))).length?"":t+(e.w?" "+e.w+"w":e.d?" "+e.d+"x":"")}return""}return""})));e.setAttribute("srcset",n.join(", "))}})))}testEmptyResource(e){return e==$x.EMPTY_RESOURCE}generateStylesheetContent(e,t){let n=sy(e);return t.compressCSS&&(n=$x.compressCSS(n)),t.saveOriginalURLs&&(n=hx(n)),n}replaceImageSource(e,t,n){if(e.getAttribute($x.IMAGE_ATTRIBUTE_NAME)){const r=n.images[Number(e.getAttribute($x.IMAGE_ATTRIBUTE_NAME))];if(r&&r.replaceable){e.setAttribute("src",`${Sx},<svg xmlns="http://www.w3.org/2000/svg" width="${r.size.pxWidth}" height="${r.size.pxHeight}"><rect fill-opacity="0"/></svg>`);const n={};return("content"==r.objectFit||"cover"==r.objectFit)&&r.objectFit&&(n["background-size"]=r.objectFit),r.objectPosition&&(n["background-position"]=r.objectPosition),r.backgroundColor&&(n["background-color"]=r.backgroundColor),this.setBackgroundImage(e,"var("+t+")",n),e.removeAttribute($x.IMAGE_ATTRIBUTE_NAME),!0}}}wrapMediaQuery(e,t){return t?"@media "+t+"{ "+e+" }":e}getAdditionalPageData(){return{}}removeAlternativeFonts(e,t,n,r){return async function(e,t,n,r){const a={fonts:new Map,medias:new Map,supports:new Map},o={rules:{processed:0,discarded:0},fonts:{processed:0,discarded:0}};let i=0;return t.forEach((t=>{const n=t.stylesheet.children;if(n)if(o.rules.processed+=n.size,o.rules.discarded+=n.size,t.mediaText&&t.mediaText!=Wx){const r=tA();a.medias.set("media-"+i+"-"+t.mediaText,r),Yx(e,n,i,r)}else Yx(e,n,i,a);i++})),Jx(a),await Promise.all([...t].map((async([,e],t)=>{const i=e.stylesheet.children,s=e.mediaText;i&&(s&&s!=Wx?await Qx(i,t,a.medias.get("media-"+t+"-"+s),n,r,o):await Qx(i,t,a,n,r,o),o.rules.discarded-=i.size)}))),o}(e,t,n,r)}async processScript(e,t,n,r){const a=await $x.getContent(t,{asBinary:!0,inline:!0,charset:r!=Ax&&r,maxResourceSize:n.maxResourceSize,maxResourceSizeEnabled:n.maxResourceSizeEnabled,frameId:n.windowId,resourceReferrer:n.resourceReferrer,baseURI:n.baseURI,blockMixedContent:n.blockMixedContent,expectedType:"script",acceptHeaders:n.acceptHeaders,networkTimeout:n.networkTimeout});a.data=ax(t,a,n),e.setAttribute("src",a.data)}setMetaCSP(e){e.content="default-src 'none'; font-src 'self' data:; img-src 'self' data:; style-src 'unsafe-inline'; media-src 'self' data:; script-src 'unsafe-inline' data:; object-src 'self' data:; frame-src 'self' data:;"}removeUnusedStylesheets(e){e.querySelectorAll("link[rel*=stylesheet][rel*=alternate][title]").forEach((e=>e.remove()))}}}function Yx(e,t,n,r){let a=0,o=0;t.forEach((t=>{if("Atrule"==t.type&&"media"==t.name&&t.block&&t.block.children&&t.prelude){const o=sy(t.prelude),i=tA();r.medias.set("media-"+n+"-"+a+"-"+o,i),a++,Yx(e,t.block.children,n,i)}else if("Atrule"==t.type&&"supports"==t.name&&t.block&&t.block.children&&t.prelude){const a=sy(t.prelude),i=tA();r.supports.set("supports-"+n+"-"+o+"-"+a,i),o++,Yx(e,t.block.children,n,i)}else if("Atrule"==t.type&&"font-face"==t.name&&t.block&&t.block.children){const e=eA(t);let n=r.fonts.get(e);n||(n=[],r.fonts.set(e,n));const a=Xx(t,"src");if(a){const e=a.match(Dx);e&&e.forEach((e=>n.unshift(e)))}}}))}function Jx(e){e.fonts.forEach(((t,n)=>{e.fonts.set(n,t.map((e=>{const t=e.match(qx);let n;const r=function(e){const t=(e=e.replace(/url\(-sf-url-original\\\(\\"(.*?)\\"\\\)\\ /g,"")).match(Ix)||e.match(Lx)||e.match(Px);return t&&t[1]}(e);if(t&&t[1]&&(n=t[1].replace(Nx,"$1").replace(Ux,"$1").toLowerCase()),!n){const t=e.match(Mx);if(t&&t[1])n=t[1];else{const t=e.match(Ox);t&&t[1]&&(n=t[1])}}if(!n&&r){const e=r.match(Fx);e&&e[1]&&(n=e[1])}return{src:e.match(Bx)[1],fontUrl:r,format:n}})))})),e.medias.forEach((e=>Jx(e))),e.supports.forEach((e=>Jx(e)))}async function Qx(e,t,n,r,a,o){const i=[];let s=0,l=0;for(let c=e.head;c;c=c.next){const e=c.data;if("Atrule"==e.type&&"media"==e.name&&e.block&&e.block.children&&e.prelude){const i=sy(e.prelude);await Qx(e.block.children,t,n.medias.get("media-"+t+"-"+s+"-"+i),r,a,o),s++}else if("Atrule"==e.type&&"supports"==e.name&&e.block&&e.block.children&&e.prelude){const i=sy(e.prelude);await Qx(e.block.children,t,n.supports.get("supports-"+t+"-"+l+"-"+i),r,a,o),l++}else if("Atrule"==e.type&&"font-face"==e.name){const t=eA(e),s=n.fonts.get(t);if(s){await Zx(e,s,r,a,o)&&n.fonts.delete(t)}else i.push(c)}}i.forEach((t=>e.remove(t)))}async function Zx(e,t,n,r,a){const o=[];for(let t=e.block.children.head;t;t=t.next)"src"==t.data.property&&o.push(t);o.pop(),o.forEach((t=>e.block.children.remove(t)));const i=e.block.children.filter((e=>"src"==e.property)).tail;if(i){await Promise.all(t.map((async e=>{if(r.has(e.src))e.valid=r.get(e.src);else{if(bx&&e.fontUrl){const t=new bx("test-font",e.src);try{let n;await Promise.race([t.load().then((()=>t.loaded)).then((()=>{e.valid=!0,globalThis.clearTimeout(n)})),new Promise((t=>n=globalThis.setTimeout((()=>{e.valid=!0,t()}),Kx)))])}catch(t){const r=py(i.data,(e=>"Url"==e.type)),a=Array.from(n).find((([t])=>r.includes(t)&&t.value==e.fontUrl));if(a&&a[1].length){const t=a[1][0];if(t){const n=new bx("test-font","url("+t+")");try{let t;await Promise.race([n.load().then((()=>n.loaded)).then((()=>{e.valid=!0,globalThis.clearTimeout(t)})),new Promise((n=>t=globalThis.setTimeout((()=>{e.valid=!0,n()}),Kx)))])}catch(e){}}}else e.valid=!0}}else e.valid=!0;r.set(e.src,e.valid)}})));const e=(e,n)=>t.find((t=>!t.src.match(jx)&&t.format==e&&(!n||t.valid))),o=e=>t.filter((t=>t==e||t.src.startsWith(Hx)));a.fonts.processed+=t.length,a.fonts.discarded+=t.length;const s=e("woff2-variations",!0)||e("woff2",!0)||e("woff",!0);if(s)t=o(s);else{const n=e("truetype-variations",!0)||e("truetype",!0);if(n)t=o(n);else{const n=e("opentype")||e("embedded-opentype");t=n?o(n):t.filter((e=>!e.src.match(jx)&&e.valid||e.src.startsWith(Hx)))}}a.fonts.discarded-=t.length,t.reverse();try{i.data.value=iy(t.map((e=>e.src)).join(","),{context:"value",parseCustomProperty:!0})}catch(e){}return!0}return!1}function Xx(e,t){let n;if(e.block.children&&(n=e.block.children.filter((e=>{try{return e.property==t&&!sy(e.value).match(/\\9$/)}catch(n){return e.property==t}})).tail),n)try{return sy(n.data.value)}catch(e){}}function eA(e){return gx.stringify([Qo(Xx(e,"font-family")),ai(Xx(e,"font-weight")||"400"),Xx(e,"font-style")||"normal",Xx(e,"unicode-range"),(t=Xx(e,"font-stretch"),Vx[t]||t),Xx(e,"font-variant")||"normal",Xx(e,"font-feature-settings"),Xx(e,"font-variation-settings")]);var t}function tA(){return{fonts:new Map,medias:new Map,supports:new Map}}const nA=globalThis.JSON,rA=globalThis.FontFace,aA="about:blank",oA="utf-8",iA=/url\s*\(\s*'(.*?)'\s*\)/i,sA=/url\s*\(\s*"(.*?)"\s*\)/i,lA=/url\s*\(\s*(.*?)\s*\)/i,cA=/(url|local|-sf-url-original)\(.*?\)\s*(,|$)/g,uA=/^'(.*?)'$/,dA=/^"(.*?)"$/,hA=/^url\(\s*["']?data:font\/(woff2?)/,pA=/^url\(\s*["']?data:application\/x-font-(woff)/,mA=/\.([^.?#]+)((\?|#).*?)?$/,fA=/format\((.*?)\)\s*,?$/,gA=/(.*?)\s*,?$/,bA=/^url\(["']?data:[^,]*,?["']?\)/,yA="local(",wA="all",kA={"ultra-condensed":"50%","extra-condensed":"62.5%",condensed:"75%","semi-condensed":"87.5%",normal:"100%","semi-expanded":"112.5%",expanded:"125%","extra-expanded":"150%","ultra-expanded":"200%"},vA=5e3;let xA;function AA(e){xA=e;const t=nx(xA,by);return class extends t{async processPageResources(e,t,n,r,a,o){n.blockImages&&e.querySelectorAll("svg").forEach((e=>e.remove()));let i=[['link[href][rel*="icon"]',"href",!0],['object[type="image/svg+xml"], object[type="image/svg-xml"], object[data*=".svg"]',"data"],["img[src], input[src][type=image]","src"],['embed[src*=".svg"]',"src"],["video[poster]","poster"],["*[background]","background"],["image","xlink:href"],["image","href"]].map((([a,i,s])=>this.processAttribute(e.querySelectorAll(a),i,t,n,"image",r,o,s)));i=i.concat([this.processXLinks(e.querySelectorAll("use"),e,t,n,o),this.processSrcset(e.querySelectorAll("img[srcset], source[srcset]"),t,n,r,o)]),i.push(this.processAttribute(e.querySelectorAll('object[data*=".pdf"]'),"data",t,n,null,r,o)),i.push(this.processAttribute(e.querySelectorAll('embed[src*=".pdf"]'),"src",t,n,null,r,o)),i.push(this.processAttribute(e.querySelectorAll("audio[src], audio > source[src]"),"src",t,n,"audio",r,o)),i.push(this.processAttribute(e.querySelectorAll("video[src], video > source[src]"),"src",t,n,"video",r,o)),i.push(this.processAttribute(e.querySelectorAll("audio track[src], video track[src]"),"src",t,n,null,r,o)),i.push(this.processAttribute(e.querySelectorAll("model[src]"),"src",t,n,null,r,o)),await Promise.all(i),n.saveFavicon&&this.processShortcutIcons(e)}async processLinkElement(e,t,n,r,a,o,i){"LINK"==e.tagName.toUpperCase()&&(e.removeAttribute("integrity"),e.charset&&(a.charset=e.charset),t.url=e.href),await this.processStylesheetElement(e,t,n,r,a,o,i)}async processStylesheetElement(e,t,n,r,a,o,i){a.blockStylesheets?"LINK"==e.tagName.toUpperCase()?e.href=xA.EMPTY_RESOURCE:e.textContent="":"LINK"==e.tagName.toUpperCase()?await this.resolveLinkStylesheetURLs(t,e,e.href,r,a,o,i,n):(n.set({element:e},t),t.stylesheet=iy(e.textContent,{context:"stylesheet",parseCustomProperty:!0}),await this.resolveImportURLs(t,r,a,o,i,n))}replaceStylesheets(e,t,n,r){for(const[e,a]of t)if(e.urlNode){const t="stylesheet_"+n.stylesheets.size+".css";!dx(a.url)&&r.saveOriginalURLs?e.urlNode.value="-sf-url-original("+nA.stringify(a.url)+") "+t:e.urlNode.value=t,n.stylesheets.set(n.stylesheets.size,{name:t,content:this.generateStylesheetContent(a.stylesheet,r),url:a.url})}for(const[e,a]of t)if(e.element)if("LINK"==e.element.tagName.toUpperCase()){const t=e.element,o="stylesheet_"+n.stylesheets.size+".css";t.setAttribute("href",o),n.stylesheets.set(n.stylesheets.size,{name:o,content:this.generateStylesheetContent(a.stylesheet,r),url:a.url})}else{e.element.textContent=this.generateStylesheetContent(a.stylesheet,r)}}async resolveImportURLs(e,t,n,r,a,o){const i=e.stylesheet,s=e.scoped;this.resolveStylesheetURLs(i,t,r);const l=cx(i);await Promise.all(l.map((async e=>{const i=dy(e,(e=>"Url"==e.type))||dy(e,(e=>"String"==e.type));if(i){let l=ox(i.value);if(!px(l)&&mx(l)){i.value=xA.EMPTY_RESOURCE;try{l=xA.resolveURL(l,t)}catch(e){}if(fx(l)){const t=dy(e,(e=>"MediaQueryList"==e.type));let c;t&&(c=sy(t));const u=Array.from(o).find((([,e])=>e.resourceURL==l));if(u)o.set({urlNode:i},{url:l,stylesheet:u[1].stylesheet,scoped:s});else{const e={scoped:s,mediaText:c};o.set({urlNode:i},e);const t=await this.getStylesheetContent(l,n);e.url=l=t.resourceURL;const u=Array.from(o).find((([,e])=>e.resourceURL==l));u?o.set({urlNode:i},{url:l,stylesheet:u[1].stylesheet,scoped:s}):(t.data=ax(l,t,n),e.stylesheet=iy(t.data,{context:"stylesheet",parseCustomProperty:!0}),await this.resolveImportURLs(e,l,n,r,a,o))}}}}})))}async resolveLinkStylesheetURLs(e,t,n,r,a,o,i,s){if((n=ox(n))&&n!=r&&n!=aA){const l=Array.from(s).find((([,e])=>e.resourceURL==n));if(l)s.set({element:t},{url:n,stylesheet:l[1].stylesheet,mediaText:e.mediaText});else{s.set({element:t},e);const c=await xA.getContent(n,{maxResourceSize:a.maxResourceSize,maxResourceSizeEnabled:a.maxResourceSizeEnabled,charset:a.charset,frameId:a.frameId,resourceReferrer:a.resourceReferrer,validateTextContentType:!0,baseURI:r,blockMixedContent:a.blockMixedContent,expectedType:"stylesheet",acceptHeaders:a.acceptHeaders,networkTimeout:a.networkTimeout});ix(c.data,c.charset)||ix(c.data,a.charset)||(a=Object.assign({},a,{charset:sx(c.data)}),this.resolveLinkStylesheetURLs(e,t,n,r,a,o,i,s)),n=c.resourceURL,l?s.set({element:t},{url:n,stylesheet:l[1].stylesheet,mediaText:e.mediaText}):(c.data=ax(c.resourceURL,c,a),e.stylesheet=iy(c.data,{context:"stylesheet",parseCustomProperty:!0}),await this.resolveImportURLs(e,n,a,o,i,s))}}}async processFrame(e,t,n,r,a){const o="frames/"+n.frames.size+"/";"OBJECT"==e.tagName.toUpperCase()?e.setAttribute("data",o+"index.html"):e.setAttribute("src",o+"index.html"),n.frames.set(r,{name:o,content:t.content,resources:t.resources,url:a.url})}async processStylesheet(e,t,n,r,a){const o=[],i=[];for(let l=e.head;l;l=l.next){const e=l.data;"Atrule"==e.type&&"charset"==e.name?i.push(l):e.block&&e.block.children&&("Rule"==e.type?o.push(this.processStyle(e,n,r,a)):"Atrule"!=e.type||"media"!=e.name&&"supports"!=e.name?"Atrule"==e.type&&"font-face"==e.name&&o.push(s(e)):o.push(this.processStylesheet(e.block.children,t,n,r,a)))}async function s(e){const o=lx(e);await Promise.all(o.map((async e=>{const o=e.value;if(n.blockFonts)e.value=xA.EMPTY_RESOURCE;else{const i=ox(o);if(!px(i)&&fx(i)){let{content:s,extension:l,indexResource:c,contentType:u}=await a.addURL(i,{asBinary:!0,expectedType:"font",baseURI:t,blockMixedContent:n.blockMixedContent});const d="fonts/"+c+l;!dx(i)&&n.saveOriginalURLs?e.value="-sf-url-original("+nA.stringify(o)+") "+d:e.value=d,r.fonts.set(c,{name:d,content:s,extension:l,contentType:u,url:i})}}})))}i.forEach((t=>e.remove(t))),await Promise.all(o)}async processStyle(e,t,n,r){const a=lx(e);await Promise.all(a.map((async e=>{const a=e.value;if(t.blockImages)e.value=xA.EMPTY_RESOURCE;else{const o=ox(a);if(!px(o)&&fx(o)){let{content:i,indexResource:s,contentType:l,extension:c}=await r.addURL(o,{asBinary:!0,expectedType:"image"});const u="images/"+s+c;!dx(o)&&t.saveOriginalURLs?e.value="-sf-url-original("+nA.stringify(a)+") "+u:e.value=u,n.images.set(s,{name:u,content:i,extension:c,contentType:l,url:o})}}})))}async processAttribute(e,t,n,r,a,o,i,s){function l(e,t,n){"video"==n||"audio"==n?e.removeAttribute(t):e.setAttribute(t,xA.EMPTY_RESOURCE)}await Promise.all(Array.from(e).map((async e=>{let c=e.getAttribute(t);if(null!=c){c=ox(c);let u=e.dataset.singleFileOriginURL;if(r.saveOriginalURLs&&!dx(c)&&e.setAttribute("data-sf-original-"+t,c),delete e.dataset.singleFileOriginURL,a&&r["block"+a.charAt(0).toUpperCase()+a.substring(1)+"s"])l(e,t,a);else if(!px(c)&&(l(e,t,a),mx(c))){try{c=xA.resolveURL(c,n)}catch(e){}if(fx(c)){let{content:l,indexResource:d,extension:h,contentType:p}=await i.addURL(c,{asBinary:!0,expectedType:a});if(u&&this.testEmptyResource(l)){try{u=xA.resolveURL(u,n)}catch(e){}try{c=u,l=(await xA.getContent(c,{asBinary:!0,expectedType:a,maxResourceSize:r.maxResourceSize,maxResourceSizeEnabled:r.maxResourceSizeEnabled,frameId:r.windowId,resourceReferrer:r.resourceReferrer,acceptHeaders:r.acceptHeaders,networkTimeout:r.networkTimeout})).data}catch(e){}}if(s&&this.testEmptyResource(l))e.remove();else if(!this.testEmptyResource(l)){const n="images/"+d+h;e.setAttribute(t,n),o.images.set(d,{name:n,content:l,extension:h,contentType:p,url:c})}}}}})))}async processSrcset(e,t,n,r,a){await Promise.all(Array.from(e).map((async e=>{const o=e.getAttribute("srcset"),i=xA.parseSrcset(o);if(n.saveOriginalURLs&&!dx(o)&&e.setAttribute("data-sf-original-srcset",o),n.blockImages)e.setAttribute("srcset","");else{const n=await Promise.all(i.map((async e=>{let n=ox(e.url);if(px(n))return n+(e.w?" "+e.w+"w":e.d?" "+e.d+"x":"");if(mx(n)){try{n=xA.resolveURL(n,t)}catch(e){}if(fx(n)){const{content:t,indexResource:o,extension:i,contentType:s}=await a.addURL(n,{asBinary:!0,expectedType:"image"}),l="images/"+o+i;return r.images.set(o,{name:l,content:t,extension:i,contentType:s,url:n}),l+(e.w?" "+e.w+"w":e.d?" "+e.d+"x":"")}return""}return""})));e.setAttribute("srcset",n.join(", "))}})))}testEmptyResource(e){return!e}generateStylesheetContent(e,t){t.compressCSS&&this.removeSingleLineCssComments(e),this.replacePseudoClassDefined(e);let n=sy(e);return t.compressCSS&&(n=xA.compressCSS(n)),t.saveOriginalURLs&&(n=hx(n)),n}getAdditionalPageData(e,t,n){const r={};let a=t;n.stylesheets.forEach((e=>a+=e.content)),Object.keys(n).forEach((e=>{Array.from(n[e]).filter((([,e])=>!a.includes(e.name))).forEach((([t])=>n[e].delete(t))),r[e]=Array.from(n[e].values())}));const o=e.head.querySelector("meta[name=viewport]"),i=o?o.content:null;return{doctype:xA.getDoctypeString(e),resources:r,viewport:i}}removeAlternativeFonts(e,t,n,r){return async function(e,t,n,r){const a={fonts:new Map,medias:new Map,supports:new Map},o={rules:{processed:0,discarded:0},fonts:{processed:0,discarded:0}};let i=0;return t.forEach((t=>{const n=t.stylesheet.children;if(n)if(o.rules.processed+=n.size,o.rules.discarded+=n.size,t.mediaText&&t.mediaText!=wA){const r=zA();a.medias.set("media-"+i+"-"+t.mediaText,r),SA(e,n,i,r)}else SA(e,n,i,a);i++})),EA(a,n),await Promise.all([...t].map((async([,e],t)=>{const i=e.stylesheet.children,s=e.mediaText;i&&(s&&s!=wA?await TA(i,t,a.medias.get("media-"+t+"-"+s),n,r,o):await TA(i,t,a,n,r,o),o.rules.discarded-=i.size)}))),o}(e,t,n,r)}async processScript(e,t,n,r){const a=await xA.getContent(t,{asBinary:!0,charset:r!=oA&&r,maxResourceSize:n.maxResourceSize,maxResourceSizeEnabled:n.maxResourceSizeEnabled,frameId:n.windowId,resourceReferrer:n.resourceReferrer,baseURI:n.baseURI,blockMixedContent:n.blockMixedContent,expectedType:"script",acceptHeaders:n.acceptHeaders,networkTimeout:n.networkTimeout});a.data=ax(t,a,n),e.setAttribute("src",a.data)}setMetaCSP(e){e.content="default-src 'none'; font-src 'self' data: blob:; img-src 'self' data: blob:; style-src 'self' 'unsafe-inline' data: blob:; frame-src 'self' data: blob:; media-src 'self' data: blob:; script-src 'self' 'unsafe-inline' data: blob:; object-src 'self' data: blob:;"}removeUnusedStylesheets(){}}}function SA(e,t,n,r){let a=0,o=0;t.forEach((t=>{if("Atrule"==t.type&&"media"==t.name&&t.block&&t.block.children&&t.prelude){const o=sy(t.prelude),i=zA();r.medias.set("media-"+n+"-"+a+"-"+o,i),a++,SA(e,t.block.children,n,i)}else if("Atrule"==t.type&&"supports"==t.name&&t.block&&t.block.children&&t.prelude){const a=sy(t.prelude),i=zA();r.supports.set("supports-"+n+"-"+o+"-"+a,i),o++,SA(e,t.block.children,n,i)}else if("Atrule"==t.type&&"font-face"==t.name&&t.block&&t.block.children){const e=_A(t);let n=r.fonts.get(e);n||(n=[],r.fonts.set(e,n));const a=RA(t,"src");if(a){const e=a.match(cA);e&&e.forEach((e=>n.unshift(e)))}}}))}function EA(e,t){e.fonts.forEach(((n,r)=>{e.fonts.set(r,n.map((e=>{const n=e.match(fA);let r;const a=function(e){const t=(e=e.replace(/url\(-sf-url-original\\\(\\"(.*?)\\"\\\)\\ /g,"")).match(iA)||e.match(sA)||e.match(lA);return t&&t[1]}(e);if(n&&n[1]&&(r=n[1].replace(uA,"$1").replace(dA,"$1").toLowerCase()),!r){const t=e.match(hA);if(t&&t[1])r=t[1];else{const t=e.match(pA);t&&t[1]&&(r=t[1])}}if(!r&&a){const e=a.match(mA);e&&e[1]&&(r=e[1])}const o=Array.from(t.values()).find((e=>e.name==a));return{src:e.match(gA)[1],fontUrl:a,format:r,contentType:o&&o.contentType}})))})),e.medias.forEach((e=>EA(e,t))),e.supports.forEach((e=>EA(e,t)))}async function TA(e,t,n,r,a,o){const i=[];let s=0,l=0;for(let c=e.head;c;c=c.next){const e=c.data;if("Atrule"==e.type&&"media"==e.name&&e.block&&e.block.children&&e.prelude){const i=sy(e.prelude);await TA(e.block.children,t,n.medias.get("media-"+t+"-"+s+"-"+i),r,a,o),s++}else if("Atrule"==e.type&&"supports"==e.name&&e.block&&e.block.children&&e.prelude){const i=sy(e.prelude);await TA(e.block.children,t,n.supports.get("supports-"+t+"-"+l+"-"+i),r,a,o),l++}else if("Atrule"==e.type&&"font-face"==e.name){const t=_A(e),s=n.fonts.get(t);s?(n.fonts.delete(t),await CA(e,s,r,a,o)):i.push(c)}}i.forEach((t=>e.remove(t)))}async function CA(e,t,n,r,a){await Promise.all(t.map((async e=>{if(r.has(e.src))e.valid=r.get(e.src);else{if(rA&&e.fontUrl){const t=[...n].find((([,t])=>e.fontUrl&&t.name==e.fontUrl));if(t){const n=t[1],r=new rA("test-font",new Uint8Array(n.content).buffer);try{let t;await Promise.race([r.load().then((()=>r.loaded)).then((()=>{e.valid=!0,globalThis.clearTimeout(t)})),new Promise((n=>t=globalThis.setTimeout((()=>{e.valid=!0,n()}),vA)))])}catch(t){const r=new rA("test-font","url("+n.url+")");try{let t;await Promise.race([r.load().then((()=>r.loaded)).then((()=>{e.valid=!0,globalThis.clearTimeout(t)})),new Promise((n=>t=globalThis.setTimeout((()=>{e.valid=!0,n()}),vA)))])}catch(e){}}}else e.valid=!0}else e.valid=!0;r.set(e.src,e.valid)}})));const o=(e,n)=>t.find((t=>!t.src.match(bA)&&t.format==e&&(!n||t.valid))),i=(e,n)=>t.find((t=>!t.src.match(bA)&&t.contentType==e&&(!n||t.valid))),s=e=>t.filter((t=>t==e||t.src.startsWith(yA)));a.fonts.processed+=t.length,a.fonts.discarded+=t.length;const l=o("woff2-variations",!0)||o("woff2",!0)||o("woff",!0)||i("font/woff2",!0)||i("font/woff",!0)||i("application/font-woff",!0)||i("application/x-font-woff",!0);if(l)t=s(l);else{const e=o("truetype-variations",!0)||o("truetype",!0)||i("font/ttf",!0)||i("application/x-font-ttf",!0)||i("application/x-font-ttf",!0)||i("application/x-font-truetype",!0);if(e)t=s(e);else{const e=o("opentype")||o("embedded-opentype")||i("font/otf")||i("application/x-font-opentype")||i("application/font-sfnt");t=e?s(e):t.filter((e=>!e.src.match(bA)&&e.valid||e.src.startsWith(yA)))}}a.fonts.discarded-=t.length;const c=[];for(let t=e.block.children.head;t;t=t.next)"src"==t.data.property&&c.push(t);c.pop(),c.forEach((t=>e.block.children.remove(t)));const u=e.block.children.filter((e=>"src"==e.property)).tail;if(u){t.reverse();try{u.data.value=iy(t.map((e=>e.src)).join(","),{context:"value",parseCustomProperty:!0})}catch(e){}}}function RA(e,t){let n;if(e.block.children&&(n=e.block.children.filter((e=>{try{return e.property==t&&!sy(e.value).match(/\\9$/)}catch(n){return e.property==t}})).tail),n)try{return sy(n.data.value)}catch(e){}}function _A(e){return nA.stringify([Qo(RA(e,"font-family")),ai(RA(e,"font-weight")||"400"),RA(e,"font-style")||"normal",RA(e,"unicode-range"),(t=RA(e,"font-stretch"),kA[t]||t),RA(e,"font-variant")||"normal",RA(e,"font-feature-settings"),RA(e,"font-variation-settings")]);var t}function zA(){return{fonts:new Map,medias:new Map,supports:new Map}}const IA=globalThis.Set,LA=globalThis.Map,PA=globalThis.JSON;let DA;class NA{constructor(e){this.options=e;const t=function(e,t){return e.compressContent?AA(t):Gx(t)}(e,DA);this.processorHelper=new t}async run(){const e=globalThis[DA.WAIT_FOR_USERSCRIPT_PROPERTY_NAME];this.options.userScriptEnabled&&e&&await e(DA.ON_BEFORE_CAPTURE_EVENT_NAME),this.runner=new GA(this.options,this.processorHelper,!0),await this.runner.loadPage(),await this.runner.initialize(),this.options.userScriptEnabled&&e&&await e(DA.ON_AFTER_CAPTURE_EVENT_NAME),await this.runner.run()}cancel(){this.cancelled=!0,this.runner&&this.runner.cancel()}getPageData(){return this.runner.getPageData()}}const UA="page-loading",MA="page-loaded",OA="resource-initializing",FA="resources-initialized",qA="resource-loaded",BA="page-ended",jA="stage-started",HA="stage-ended",WA="stage-task-started",VA="stage-task-ended";class KA{constructor(e,t){return{type:e,detail:t,PAGE_LOADING:UA,PAGE_LOADED:MA,RESOURCES_INITIALIZING:OA,RESOURCES_INITIALIZED:FA,RESOURCE_LOADED:qA,PAGE_ENDED:BA,STAGE_STARTED:jA,STAGE_ENDED:HA,STAGE_TASK_STARTED:WA,STAGE_TASK_ENDED:VA}}}const $A=[{sequential:[{action:"preProcessPage"},{option:"loadDeferredImagesKeepZoomLevel",action:"resetZoomLevel"},{action:"replaceStyleContents"},{action:"replaceInvalidElements"},{action:"resetCharsetMeta"},{option:"saveFavicon",action:"saveFavicon"},{action:"insertFonts"},{action:"insertShadowRootContents"},{action:"replaceCanvasElements"},{action:"setInputValues"},{option:"moveStylesInHead",action:"moveStylesInHead"},{option:"blockScripts",action:"removeEmbedScripts"},{option:"selected",action:"removeUnselectedElements"},{option:"blockVideos",action:"insertVideoPosters"},{option:"blockVideos",action:"insertVideoLinks"},{option:"removeFrames",action:"removeFrames"},{action:"removeDiscardedResources"},{option:"removeHiddenElements",action:"removeHiddenElements"},{action:"saveScrollPosition"},{action:"resolveHrefs"},{action:"resolveStyleAttributeURLs"}],parallel:[{option:"blockVideos",action:"insertMissingVideoPosters"},{action:"resolveStylesheetsURLs"},{option:"!removeFrames",action:"resolveFrameURLs"}]},{sequential:[{option:"removeUnusedStyles",action:"removeUnusedStyles"},{option:"removeAlternativeMedias",action:"removeAlternativeMedias"},{option:"removeUnusedFonts",action:"removeUnusedFonts"}],parallel:[{action:"processStylesheets"},{action:"processStyleAttributes"},{action:"processPageResources"},{action:"processScripts"}]},{sequential:[{option:"removeAlternativeImages",action:"removeAlternativeImages"}],parallel:[{option:"removeAlternativeFonts",action:"removeAlternativeFonts"},{option:"!removeFrames",action:"processFrames"}]},{sequential:[{action:"replaceStylesheets"},{action:"replaceStyleAttributes"},{action:"insertVariables"},{option:"compressHTML",action:"compressHTML"},{action:"cleanupPage"}],parallel:[{option:"enableMaff",action:"insertMAFFMetaData"},{action:"setDocInfo"}]}];class GA{constructor(e,t,n){const r=n&&e.doc;this.root=n,this.options=e,this.options.url=this.options.url||r&&this.options.doc.location.href;const a=this.options.url.match(/^.*\//);if(this.options.resourceReferrer=this.options.passReferrerOnError&&a&&a[0],this.options.baseURI=r&&this.options.doc.baseURI,this.options.rootDocument=n,this.options.updatedResources=this.options.updatedResources||{},this.options.fontTests=new LA,this.batchRequest=new YA,this.processor=new ZA(e,t,this.batchRequest),r){const e=DA.preProcessDoc(this.options.doc,this.options.win,this.options);this.options.canvases=e.canvases,this.options.fonts=e.fonts,this.options.stylesheets=e.stylesheets,this.options.images=e.images,this.options.posters=e.posters,this.options.videos=e.videos,this.options.usedFonts=e.usedFonts,this.options.shadowRoots=e.shadowRoots,this.options.referrer=e.referrer,this.options.adoptedStyleSheets=e.adoptedStyleSheets,this.markedElements=e.markedElements,this.invalidElements=e.invalidElements}this.options.saveRawPage&&(this.options.removeFrames=!0),this.options.content=this.options.content||(r?DA.serialize(this.options.doc):null),this.onprogress=e.onprogress||(()=>{})}async loadPage(){this.onprogress(new KA(UA,{pageURL:this.options.url,frame:!this.root})),await this.processor.loadPage(this.options.content),this.onprogress(new KA(MA,{pageURL:this.options.url,frame:!this.root}))}async initialize(){this.onprogress(new KA(OA,{pageURL:this.options.url})),await this.executeStage(0),this.pendingPromises=this.executeStage(1),this.root&&this.options.doc&&DA.postProcessDoc(this.options.doc,this.markedElements,this.invalidElements)}cancel(){this.cancelled=!0,this.batchRequest.cancel(),this.root&&this.options.frames&&this.options.frames.forEach((function(e){e.runner&&e.runner.cancel()}))}async run(){this.root&&(this.processor.initialize(this.batchRequest),this.onprogress(new KA(FA,{pageURL:this.options.url,max:this.processor.maxResources}))),await this.batchRequest.run((e=>{e.pageURL=this.options.url,this.onprogress(new KA(qA,e))}),this.options),await this.pendingPromises,this.options.doc=null,this.options.win=null,await this.executeStage(2),await this.executeStage(3),this.processor.finalize()}getDocument(){return this.processor.doc}getStyleSheets(){return this.processor.stylesheets}getPageData(){return this.root&&this.onprogress(new KA(BA,{pageURL:this.options.url})),this.processor.getPageData()}async executeStage(e){const t=!this.root;let n;return this.onprogress(new KA(jA,{pageURL:this.options.url,step:e,frame:t})),$A[e].sequential.forEach((n=>{this.onprogress(new KA(WA,{pageURL:this.options.url,step:e,task:n.action,frame:t})),this.cancelled||this.executeTask(n),this.onprogress(new KA(VA,{pageURL:this.options.url,step:e,task:n.action,frame:t}))})),n=$A[e].parallel?await Promise.all($A[e].parallel.map((async n=>{this.onprogress(new KA(WA,{pageURL:this.options.url,step:e,task:n.action,frame:t})),this.cancelled||await this.executeTask(n),this.onprogress(new KA(VA,{pageURL:this.options.url,step:e,task:n.action,frame:t}))}))):Promise.resolve(),this.onprogress(new KA(HA,{pageURL:this.options.url,step:e,frame:t})),n}executeTask(e){if(!e.option||e.option.startsWith("!")&&!this.options[e.option]||this.options[e.option])return this.processor[e.action]()}}class YA{constructor(){this.requests=new LA,this.duplicates=new LA}addURL(e,{asBinary:t,expectedType:n,groupDuplicates:r,baseURI:a,blockMixedContent:o}={}){return new Promise(((i,s)=>{const l=PA.stringify([e,t,n,a,o]);let c=this.requests.get(l);c||(c=[],this.requests.set(l,c));const u={resolve:i,reject:s};if(c.push(u),r){let e=this.duplicates.get(l);e||(e=[],this.duplicates.set(l,e)),e.push(u)}}))}getMaxResources(){return this.requests.size}run(e,t){const n=[...this.requests.keys()];let r=0;return Promise.all(n.map((async n=>{const[a,o,i,s,l]=PA.parse(n),c=this.requests.get(n);try{const u=r;r+=1;const d=await DA.getContent(a,{asBinary:o,inline:!t.compressContent,expectedType:i,maxResourceSize:t.maxResourceSize,maxResourceSizeEnabled:t.maxResourceSizeEnabled,frameId:t.windowId,resourceReferrer:t.resourceReferrer,baseURI:s,blockMixedContent:l,acceptHeaders:t.acceptHeaders,networkTimeout:t.networkTimeout});if(e({url:a}),!this.cancelled){const e=DA.getContentTypeExtension(d.contentType)||DA.getFilenameExtension(a,t.filenameReplacedCharacters,t.filenameReplacementCharacter);c.forEach((t=>{const r=this.duplicates.get(n),a=r&&r.length>1&&r.includes(t);t.resolve({content:d.data,indexResource:u,duplicate:a,contentType:d.contentType,extension:e})}))}}catch(t){r+=1,e({url:a}),c.forEach((e=>e.reject(t)))}this.requests.delete(n)})))}cancel(){this.cancelled=!0;[...this.requests.keys()].forEach((e=>{this.requests.get(e).forEach((e=>e.reject())),this.requests.delete(e)}))}}const JA="shadowrootmode",QA="data-template-shadow-root";class ZA{constructor(e,t,n){this.options=e,this.processorHelper=t,this.stats=new uS(e),this.baseURI=sS(e.baseURI||e.url),this.batchRequest=n,this.stylesheets=new LA,this.styles=new LA,this.resources={cssVariables:new LA,fonts:new LA,stylesheets:new LA,scripts:new LA,images:new LA,frames:new LA},this.fontTests=e.fontTests}initialize(){this.options.saveDate=new Date,this.options.saveUrl=this.options.url,this.options.enableMaff&&(this.maffMetaDataPromise=this.batchRequest.addURL(DA.resolveURL("index.rdf",this.options.baseURI||this.options.url),{expectedType:"document"})),this.maxResources=this.batchRequest.getMaxResources(),this.options.saveRawPage||this.options.removeFrames||!this.options.frames||this.options.frames.forEach((e=>this.maxResources+=e.maxResources||0)),this.stats.set("processed","resources",this.maxResources)}async loadPage(e,t){let n;if(e&&!this.options.saveRawPage||(n=await DA.getContent(this.baseURI,{inline:!this.options.compressContent,maxResourceSize:this.options.maxResourceSize,maxResourceSizeEnabled:this.options.maxResourceSizeEnabled,charset:t,frameId:this.options.windowId,resourceReferrer:this.options.resourceReferrer,expectedType:"document",acceptHeaders:this.options.acceptHeaders,networkTimeout:this.options.networkTimeout}),e=n.data||""),this.doc=DA.parseDocContent(e,this.baseURI),this.options.saveRawPage){let t;if(this.doc.querySelectorAll('meta[charset], meta[http-equiv="content-type"]').forEach((e=>{const n=e.content.split(";")[1];n&&!t&&(t=n.split("=")[1].trim().toLowerCase())})),t&&n.charset&&t.toLowerCase()!=n.charset.toLowerCase())return this.loadPage(e,t)}this.workStyleElement=this.doc.createElement("style"),this.doc.body.appendChild(this.workStyleElement),this.onEventAttributeNames=function(e){const t=e.createElement("div"),n=[];for(const e in t)e.startsWith("on")&&n.push(e);return n.push("onunload"),n}(this.doc)}finalize(){this.workStyleElement.parentNode&&this.workStyleElement.remove()}async getPageData(){DA.postProcessDoc(this.doc);const e=DA.parseURL(this.baseURI);if(this.options.insertSingleFileComment){const e=this.doc.documentElement.firstChild;let t=this.options.saveUrl,n=this.options.saveDate;if(8==e.nodeType&&(e.textContent.includes(DA.COMMENT_HEADER_LEGACY)||e.textContent.includes(DA.COMMENT_HEADER))){const r=this.doc.documentElement.firstChild.textContent.split("\n");try{const[,,a,o]=r;t=a.split("url: ")[1],n=o.split("saved date: ")[1],e.remove()}catch(e){}}const r=(this.options.infobarContent||"").replace(/\\n/g,"\n").replace(/\\t/g,"\t"),a=this.doc.createComment("\n "+(this.options.useLegacyCommentHeader?DA.COMMENT_HEADER_LEGACY:DA.COMMENT_HEADER)+" \n url: "+t+(this.options.removeSavedDate?" ":" \n saved date: "+n)+(r?" \n info: "+r:"")+"\n");this.doc.documentElement.insertBefore(a,this.doc.documentElement.firstChild)}const t=this.doc.querySelector("singlefile-infobar");t&&t.remove();const n=this.doc.querySelector(DA.INFOBAR_TAGNAME);if(n&&n.remove(),this.options.includeInfobar&&DA.appendInfobar(this.doc,this.options),this.doc.querySelector("template["+JA+"]")||this.options.shadowRoots&&this.options.shadowRoots.length){this.options.blockScripts&&this.doc.querySelectorAll("script["+QA+"]").forEach((e=>e.remove()));const e=this.doc.createElement("script");e.setAttribute(QA,""),e.textContent=`(()=>{document.currentScript.remove();processNode(document);function processNode(node){node.querySelectorAll("template[${JA}]").forEach(element=>{let shadowRoot = element.parentElement.shadowRoot;if (!shadowRoot) {try {shadowRoot=element.parentElement.attachShadow({mode:element.getAttribute("${JA}")});shadowRoot.innerHTML=element.innerHTML;element.remove()} catch (error) {} if (shadowRoot) {processNode(shadowRoot)}}})}})()`,this.doc.body.appendChild(e)}if(this.options.insertCanonicalLink&&this.options.saveUrl.match(nS)){let e=this.doc.querySelector("link[rel=canonical]");e||(e=this.doc.createElement("link"),e.setAttribute("rel","canonical"),this.doc.head.appendChild(e)),e&&!e.href&&(e.href=this.options.saveUrl)}if(this.options.insertMetaCSP){const e=this.doc.createElement("meta");e.httpEquiv="content-security-policy",this.processorHelper.setMetaCSP(e),this.doc.head.appendChild(e)}if(this.options.insertMetaNoIndex){let e=this.doc.querySelector("meta[name=robots][content*=noindex]");e||(e=this.doc.createElement("meta"),e.setAttribute("name","robots"),e.setAttribute("content","noindex"),this.doc.head.appendChild(e))}const r=this.doc.createElement("style");let a;r.textContent='img[src="data:,"],source[src="data:,"]{display:none!important}',this.doc.head.appendChild(r),this.options.displayStats&&(a=DA.getContentSize(this.doc.documentElement.outerHTML));const o=DA.serialize(this.doc,this.options.compressHTML);if(this.options.displayStats){const e=DA.getContentSize(o);this.stats.set("processed","HTML bytes",e),this.stats.add("discarded","HTML bytes",a-e)}const i=await DA.formatFilename(o,this.options),s=this.baseURI.match(/([^/]*)\/?(\.html?.*)$/)||this.baseURI.match(/\/\/([^/]*)\/?$/),l=this.processorHelper.getAdditionalPageData(this.doc,o,this.resources),c=Object.assign({stats:this.stats.data,title:this.options.title||(this.baseURI&&s?s[1]:e.hostname?e.hostname:""),filename:i,content:o},l);return this.options.addProof&&(c.hash=await DA.digest("SHA-256",o)),this.options.retrieveLinks&&(c.links=Array.from(new IA(Array.from(this.doc.links).map((e=>e.href))))),c}preProcessPage(){this.options.win&&this.doc.body.querySelectorAll(':not(svg) title, meta, link[href][rel*="icon"]').forEach((e=>e instanceof this.options.win.HTMLElement&&this.doc.head.appendChild(e))),this.options.images&&!this.options.saveRawPage&&(this.doc.querySelectorAll("img["+DA.IMAGE_ATTRIBUTE_NAME+"]").forEach((e=>{const t=e.getAttribute(DA.IMAGE_ATTRIBUTE_NAME);if(t){const n=this.options.images[Number(t)];n&&(this.options.removeHiddenElements&&(n.size&&!n.size.pxWidth&&!n.size.pxHeight||""==e.getAttribute(DA.HIDDEN_CONTENT_ATTRIBUTE_NAME))?e.setAttribute("src",DA.EMPTY_RESOURCE):(n.currentSrc&&(e.dataset.singleFileOriginURL=e.getAttribute("src"),e.setAttribute("src",n.currentSrc)),this.options.loadDeferredImages&&(e.getAttribute("src")&&e.getAttribute("src")!=DA.EMPTY_RESOURCE||!e.getAttribute("data-src")||(n.src=e.dataset.src,e.setAttribute("src",e.dataset.src),e.removeAttribute("data-src")))))}})),this.options.loadDeferredImages&&this.doc.querySelectorAll("img[data-srcset]").forEach((e=>{!e.getAttribute("srcset")&&e.getAttribute("data-srcset")&&(e.setAttribute("srcset",e.dataset.srcset),e.removeAttribute("data-srcset"))})))}replaceStyleContents(){if(this.options.stylesheets&&this.doc.querySelectorAll("style").forEach(((e,t)=>{if(e.getAttribute(DA.STYLESHEET_ATTRIBUTE_NAME)){const n=this.options.stylesheets[Number(t)];n&&(e.textContent=n)}})),this.options.adoptedStyleSheets&&this.options.adoptedStyleSheets.length){const e=this.doc.createElement("style");e.textContent=this.options.adoptedStyleSheets.join("\n"),this.doc.body.appendChild(e)}}removeUnselectedElements(){function e(e){1==e.nodeType&&e.querySelector("svg,style,link")||!n(e)?t(e):e.remove()}function t(t){n(t)&&(t.style.setProperty("display","none","important"),t.removeAttribute("src"),t.removeAttribute("srcset"),t.removeAttribute("srcdoc"),Array.from(t.childNodes).forEach(e))}function n(e){if(1==e.nodeType){const t=e.tagName&&e.tagName.toUpperCase();return"SVG"!=t&&"STYLE"!=t&&"LINK"!=t}}!function n(r){let a=!1;Array.from(r.childNodes).forEach((r=>{if(1==r.nodeType){const o=""==r.getAttribute(DA.SELECTED_CONTENT_ATTRIBUTE_NAME);a=a||o,o?(r.removeAttribute(DA.SELECTED_CONTENT_ATTRIBUTE_NAME),n(r)):a?e(r):t(r)}}))}(this.doc.body),this.doc.body.removeAttribute(DA.SELECTED_CONTENT_ATTRIBUTE_NAME)}insertVideoPosters(){this.options.posters&&this.doc.querySelectorAll("video, video > source").forEach((e=>{let t;t="VIDEO"==e.tagName.toUpperCase()?e:e.parentElement;const n=e.getAttribute(DA.POSTER_ATTRIBUTE_NAME);if(n){const e=this.options.posters[Number(n)];!t.getAttribute("poster")&&e&&t.setAttribute("poster",e)}}))}insertVideoLinks(){const e="16px";this.doc.querySelectorAll("video").forEach((t=>{const n=t.getAttribute(DA.VIDEO_ATTRIBUTE_NAME);if(n){const r=this.options.videos[Number(n)],a=r.src||t.src;if(t&&a){const n=this.doc.createElement("a"),o=this.doc.createElement("img");n.href=a,n.target="_blank",n.style.setProperty("z-index",2147483647,"important"),n.style.setProperty("position","absolute","important"),n.style.setProperty("top","8px","important"),n.style.setProperty("left","8px","important"),n.style.setProperty("width",e,"important"),n.style.setProperty("height",e,"important"),n.style.setProperty("min-width",e,"important"),n.style.setProperty("min-height",e,"important"),n.style.setProperty("max-width",e,"important"),n.style.setProperty("max-height",e,"important"),o.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABAAgMAAADXB5lNAAABhmlDQ1BJQ0MgcHJvZmlsZQAAKJF9kj1Iw0AYht+mSkUrDnYQcchQnSyIijqWKhbBQmkrtOpgcukfNGlIUlwcBdeCgz+LVQcXZ10dXAVB8AfEydFJ0UVK/C4ptIjx4LiH9+59+e67A4RGhalm1wSgapaRisfEbG5VDLyiDwEAvZiVmKkn0osZeI6ve/j4ehfhWd7n/hz9St5kgE8kjjLdsIg3iGc2LZ3zPnGIlSSF+Jx43KACiR+5Lrv8xrnosMAzQ0YmNU8cIhaLHSx3MCsZKvE0cVhRNcoXsi4rnLc4q5Uaa9XJbxjMaytprtMcQRxLSCAJETJqKKMCCxFaNVJMpGg/5uEfdvxJcsnkKoORYwFVqJAcP/gb/O6tWZiadJOCMaD7xbY/RoHALtCs2/b3sW03TwD/M3Cltf3VBjD3SXq9rYWPgIFt4OK6rcl7wOUOMPSkS4bkSH6aQqEAvJ/RM+WAwVv6EGtu31r7OH0AMtSr5Rvg4BAYK1L2use9ezr79u+ZVv9+AFlNcp0UUpiqAAAACXBIWXMAAC4jAAAuIwF4pT92AAAAB3RJTUUH5AsHAB8H+DhhoQAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAAAAJUExURQAAAICHi4qKioTuJAkAAAABdFJOUwBA5thmAAAAAWJLR0QCZgt8ZAAAAJJJREFUOI3t070NRCEMA2CnYAOyDyPwpHj/Va7hJ3FzV7zy3ET5JIwoAF6Jk4wzAJAkzxAYG9YRTgB+24wBgKmfrGAKTcEfAY4KRlRoIeBTgKOCERVaCPgU4Khge2GqKOBTgKOCERVaAEC/4PNcnyoSWHpjqkhwKxbcig0Q6AorXYF/+A6eIYD1lVbwG/jdA6/kA2THRAURVubcAAAAAElFTkSuQmCC",o.style.setProperty("width",e,"important"),o.style.setProperty("height",e,"important"),o.style.setProperty("min-width",e,"important"),o.style.setProperty("min-height",e,"important"),o.style.setProperty("max-width",e,"important"),o.style.setProperty("max-height",e,"important"),n.appendChild(o),t.insertAdjacentElement("afterend",n);const i=t.parentNode.style.getPropertyValue("position");(r.positionParent||i&&"static"==i)&&"static"!=r.positionParent||t.parentNode.style.setProperty("position","relative","important")}}}))}removeFrames(){const e=this.doc.querySelectorAll('iframe, frame, object[type="text/html"][data]');this.stats.set("discarded","frames",e.length),this.stats.set("processed","frames",e.length),this.doc.querySelectorAll('iframe, frame, object[type="text/html"][data]').forEach((e=>e.remove()))}removeEmbedScripts(){const e="javascript:",t="javascript:void(0)";this.onEventAttributeNames.forEach((e=>this.doc.querySelectorAll("["+e+"]").forEach((t=>t.removeAttribute(e))))),this.doc.querySelectorAll("[href]").forEach((n=>{n.href&&n.href.match&&n.href.trim().startsWith(e)&&n.setAttribute("href",t)})),this.doc.querySelectorAll("[src]").forEach((n=>{n.src&&n.src.trim().startsWith(e)&&n.setAttribute("src",t)}));const n=this.doc.querySelectorAll('script:not([type="application/ld+json"]):not(['+QA+"])");this.stats.set("discarded","scripts",n.length),this.stats.set("processed","scripts",n.length),n.forEach((e=>e.remove()))}removeDiscardedResources(){this.doc.querySelectorAll("."+DA.SINGLE_FILE_UI_ELEMENT_CLASS).forEach((e=>e.remove()));const e=new LA;this.doc.querySelectorAll("noscript").forEach((t=>{const n=this.doc.createElement("div");n.innerHTML=t.dataset[DA.NO_SCRIPT_PROPERTY_NAME],t.replaceWith(n),e.set(n,t)})),this.doc.querySelectorAll("meta[http-equiv=refresh], meta[disabled-http-equiv]").forEach((e=>e.remove())),e.forEach(((e,t)=>{e.dataset[DA.NO_SCRIPT_PROPERTY_NAME]=t.innerHTML,t.replaceWith(e)})),this.doc.querySelectorAll('meta[http-equiv="content-security-policy"]').forEach((e=>e.remove()));const t=this.doc.querySelectorAll('applet, object[data]:not([type="image/svg+xml"]):not([type="image/svg-xml"]):not([type="text/html"]):not([data*=".svg"]):not([data*=".pdf"]), embed[src]:not([src*=".svg"]):not([src*=".pdf"])');this.stats.set("discarded","objects",t.length),this.stats.set("processed","objects",t.length),t.forEach((e=>e.remove()));this.doc.querySelectorAll("link[rel~=preconnect], link[rel~=prerender], link[rel~=dns-prefetch], link[rel~=preload], link[rel~=manifest], link[rel~=prefetch]").forEach((e=>{const t=e.getAttribute("rel").replace(/(preconnect|prerender|dns-prefetch|preload|prefetch|manifest)/g,"").trim();t.length?e.setAttribute("rel",t):e.remove()})),this.processorHelper.removeUnusedStylesheets(this.doc),this.doc.querySelectorAll('link[rel*=stylesheet]:not([href]),link[rel*=stylesheet][href=""]').forEach((e=>e.remove())),this.options.removeHiddenElements&&this.doc.querySelectorAll("input[type=hidden]").forEach((e=>e.remove())),this.options.saveFavicon||this.doc.querySelectorAll('link[rel*="icon"]').forEach((e=>e.remove())),this.doc.querySelectorAll("a[ping]").forEach((e=>e.removeAttribute("ping"))),this.doc.querySelectorAll("link[rel=import][href]").forEach((e=>e.remove()))}replaceInvalidElements(){this.doc.querySelectorAll("template["+DA.INVALID_ELEMENT_ATTRIBUTE_NAME+"]").forEach((e=>{const t=this.doc.createElement("span");if(e.content){const n=e.content.firstChild;n&&(n.hasAttributes()&&Array.from(n.attributes).forEach((e=>t.setAttribute(e.name,e.value))),n.childNodes.forEach((e=>t.appendChild(e.cloneNode(!0))))),e.replaceWith(t)}}))}resetCharsetMeta(){let e;this.doc.querySelectorAll('meta[charset], meta[http-equiv="content-type"]').forEach((t=>{const n=t.content.split(";")[1];n&&!e&&(e=n.split("=")[1],e&&(this.charset=e.trim().toLowerCase())),t.remove()}));const t=this.doc.createElement("meta");t.setAttribute("charset","utf-8"),this.doc.head.firstChild?this.doc.head.insertBefore(t,this.doc.head.firstChild):this.doc.head.appendChild(t)}setInputValues(){this.doc.querySelectorAll("input:not([type=radio]):not([type=checkbox])").forEach((e=>{const t=e.getAttribute(DA.INPUT_VALUE_ATTRIBUTE_NAME);e.setAttribute("value",t||"")})),this.doc.querySelectorAll("input[type=radio], input[type=checkbox]").forEach((e=>{"true"==e.getAttribute(DA.INPUT_VALUE_ATTRIBUTE_NAME)&&e.setAttribute("checked","")})),this.doc.querySelectorAll("textarea").forEach((e=>{const t=e.getAttribute(DA.INPUT_VALUE_ATTRIBUTE_NAME);e.textContent=t||""})),this.doc.querySelectorAll("select").forEach((e=>{e.querySelectorAll("option").forEach((e=>{null!=e.getAttribute(DA.INPUT_VALUE_ATTRIBUTE_NAME)&&e.setAttribute("selected","")}))}))}moveStylesInHead(){this.doc.querySelectorAll("style").forEach((e=>{""==e.getAttribute(DA.STYLE_ATTRIBUTE_NAME)&&this.doc.head.appendChild(e)}))}saveFavicon(){let e=this.doc.querySelector('link[href][rel="shortcut icon"]');e||(e=this.doc.querySelector('link[href][rel="icon"]')),e||(e=this.doc.createElement("link"),e.setAttribute("type","image/x-icon"),e.setAttribute("rel","shortcut icon"),e.setAttribute("href","/favicon.ico")),this.doc.head.appendChild(e)}saveScrollPosition(){if(this.options.scrollPosition&&"no"==this.options.scrolling&&(this.options.scrollPosition.x||this.options.scrollPosition.y)){const e=this.doc.createElement("script");e.textContent='document.currentScript.remove();addEventListener("load",()=>scrollTo('+this.options.scrollPosition.x+","+this.options.scrollPosition.y+"))",this.doc.body.appendChild(e)}}replaceCanvasElements(){this.options.canvases&&this.doc.querySelectorAll("canvas").forEach((e=>{const t=e.getAttribute(DA.CANVAS_ATTRIBUTE_NAME);if(t){const n=this.options.canvases[Number(t)];if(n){const t={};n.backgroundColor&&(t["background-color"]=n.backgroundColor),this.processorHelper.setBackgroundImage(e,"url("+n.dataURI+")",t),this.stats.add("processed","canvas",1)}}}))}insertFonts(){if(this.options.fonts&&this.options.fonts.length){let e,t=this.doc.querySelector("style, link[rel=stylesheet]");this.options.fonts.forEach((n=>{if(n["font-family"]&&n.src){let r="@font-face{",a="";Object.keys(n).forEach((e=>{a&&(a+=";"),a+=e+":"+n[e]})),r+=a+"}";const o=this.doc.createElement("style");o.textContent=r,e?e.insertAdjacentElement("afterend",o):t?t.parentElement.insertBefore(o,t):this.doc.head.appendChild(o),e=o}}))}}removeHiddenElements(){const e=this.doc.querySelectorAll("["+DA.HIDDEN_CONTENT_ATTRIBUTE_NAME+"]"),t=this.doc.querySelectorAll("["+DA.REMOVED_CONTENT_ATTRIBUTE_NAME+"]");if(this.stats.set("discarded","hidden elements",t.length),this.stats.set("processed","hidden elements",t.length),e.length){const t=this.doc.createElement("style");t.textContent=".sf-hidden{display:none!important;}",this.doc.head.appendChild(t),e.forEach((e=>{"none"!=e.style.getPropertyValue("display")&&("important"==e.style.getPropertyPriority("display")?e.style.setProperty("display","none","important"):e.classList.add("sf-hidden"))}))}t.forEach((e=>e.remove()))}resolveHrefs(){this.doc.querySelectorAll("a[href], area[href], link[href]").forEach((e=>{const t=e.getAttribute("href").trim();if("LINK"==e.tagName.toUpperCase()&&e.rel.includes("stylesheet")&&this.options.saveOriginalURLs&&!lS(t)&&e.setAttribute("data-sf-original-href",t),!(n=t)||!n.startsWith(XA)&&n!=eS){let n;try{n=DA.resolveURL(t,this.options.baseURI||this.options.url)}catch(e){}if(n){const t=sS(this.options.url);!n.startsWith(t+"#")||n.startsWith(t+"#!")||this.options.resolveFragmentIdentifierURLs||(n=n.substring(t.length));try{e.setAttribute("href",n)}catch(e){}}}var n}))}async insertMissingVideoPosters(){await Promise.all(Array.from(this.doc.querySelectorAll("video[src], video > source[src]")).map((async e=>{let t;if(t="VIDEO"==e.tagName.toUpperCase()?e:e.parentElement,!t.poster){const e=t.getAttribute(DA.VIDEO_ATTRIBUTE_NAME);if(e){const n=this.options.videos[Number(e)],r=n.src||t.src;if(r){const e=this.doc.createElement("video");e.src=r,e.style.setProperty("width",n.size.pxWidth+"px","important"),e.style.setProperty("height",n.size.pxHeight+"px","important"),e.style.setProperty("display","none","important"),e.crossOrigin="anonymous";const a=this.doc.createElement("canvas"),o=a.getContext("2d");return this.options.doc.body.appendChild(e),new Promise((r=>{e.currentTime=n.currentTime,e.oncanplay=()=>{a.width=n.size.pxWidth,a.height=n.size.pxHeight,o.drawImage(e,0,0,a.width,a.height);try{t.poster=a.toDataURL("image/png","")}catch(e){}e.remove(),r()},e.onerror=()=>{e.remove(),r()}}))}}}})))}resolveStyleAttributeURLs(){this.doc.querySelectorAll("[style]").forEach((e=>{if(this.options.blockStylesheets)e.removeAttribute("style");else{const t=e.getAttribute("style"),n=iy(t,{context:"declarationList",parseCustomProperty:!0});this.processorHelper.resolveStylesheetURLs(n,this.baseURI,this.workStyleElement),this.styles.set(e,n)}}))}async resolveStylesheetsURLs(){if(await Promise.all(Array.from(this.doc.querySelectorAll("style, link[rel*=stylesheet]")).map((async e=>{const t=Object.assign({},this.options,{charset:this.charset});let n;e.media&&(n=e.media.toLowerCase());const r={mediaText:n,scoped:Boolean(e.closest("["+JA+"]"))};await this.processorHelper.processLinkElement(e,r,this.stylesheets,this.baseURI,t,this.workStyleElement,this.resources)}))),this.options.rootDocument){const e=Object.keys(this.options.updatedResources).filter((e=>"stylesheet"==this.options.updatedResources[e].type&&!this.options.updatedResources[e].retrieved)).map((e=>this.options.updatedResources[e]));await Promise.all(e.map((async e=>{if(e.retrieved=!0,!this.options.blockStylesheets){const t={},n=this.doc.createElement("style");this.doc.body.appendChild(n),n.textContent=e.content,await this.processorHelper.processStylesheetElement(n,t,this.stylesheets,this.baseURI,this.options,this.workStyleElement,this.resources)}})))}}async resolveFrameURLs(){const e=this.processorHelper;if(!this.options.saveRawPage){const t=Array.from(this.doc.querySelectorAll('iframe, frame, object[type="text/html"][data]'));await Promise.all(t.map((async t=>{if("OBJECT"==t.tagName.toUpperCase())t.setAttribute("data","data:text/html,");else{const e=t.getAttribute("src");this.options.saveOriginalURLs&&e&&!lS(e)&&t.setAttribute("data-sf-original-src",e),t.removeAttribute("src"),t.removeAttribute("srcdoc")}Array.from(t.childNodes).forEach((e=>e.remove()));const n=t.getAttribute(DA.WIN_ID_ATTRIBUTE_NAME);if(this.options.frames&&n){const r=this.options.frames.find((e=>e.windowId==n));r&&await async function(t,n,r,a,o){o.insertSingleFileComment=!1,o.insertCanonicalLink=!1,o.insertMetaNoIndex=!1,o.saveFavicon=!1,o.includeInfobar=!1,o.url=t.baseURI,o.windowId=r,t.content&&(o.content=t.content,o.canvases=t.canvases,o.fonts=t.fonts,o.stylesheets=t.stylesheets,o.images=t.images,o.posters=t.posters,o.videos=t.videos,o.usedFonts=t.usedFonts,o.shadowRoots=t.shadowRoots,o.scrollPosition=t.scrollPosition,o.scrolling=t.scrolling,o.adoptedStyleSheets=t.adoptedStyleSheets,t.runner=new GA(o,e),t.frameElement=n,await t.runner.loadPage(),await t.runner.initialize(),t.maxResources=a.getMaxResources())}(r,t,n,this.batchRequest,Object.create(this.options))}})))}}insertShadowRootContents(){const e=this.doc,t=this.options;t.shadowRoots&&t.shadowRoots.length&&function n(r){Array.from(r.querySelectorAll("["+DA.SHADOW_ROOT_ATTRIBUTE_NAME+"]")).forEach((r=>{const a=r.getAttribute(DA.SHADOW_ROOT_ATTRIBUTE_NAME);if(a){const o=t.shadowRoots[Number(a)];if(o){const t=e.createElement("template");t.setAttribute(JA,o.mode),o.adoptedStyleSheets&&o.adoptedStyleSheets.length&&o.adoptedStyleSheets.forEach((n=>{const r=e.createElement("style");r.textContent=n,t.appendChild(r)}));const a=DA.parseDocContent(o.content);if(a.head){const e=a.head.querySelector("meta[charset]");e&&e.remove(),a.head.childNodes.forEach((e=>t.appendChild(a.importNode(e,!0))))}a.body&&a.body.childNodes.forEach((e=>t.appendChild(a.importNode(e,!0)))),n(t),r.firstChild?r.insertBefore(t,r.firstChild):r.appendChild(t)}}}))}(this.doc)}removeUnusedStyles(){this.mediaAllInfo||(this.mediaAllInfo=DA.getMediaAllInfo(this.doc,this.stylesheets,this.styles));const e=DA.minifyCSSRules(this.stylesheets,this.styles,this.mediaAllInfo);this.stats.set("processed","CSS rules",e.processed),this.stats.set("discarded","CSS rules",e.discarded)}removeUnusedFonts(){DA.removeUnusedFonts(this.doc,this.stylesheets,this.styles,this.options)}removeAlternativeMedias(){const e=DA.minifyMedias(this.stylesheets);this.stats.set("processed","medias",e.processed),this.stats.set("discarded","medias",e.discarded)}async processStylesheets(){await Promise.all([...this.stylesheets].map((([,e])=>this.processorHelper.processStylesheet(e.stylesheet.children,this.baseURI,this.options,this.resources,this.batchRequest))))}async processStyleAttributes(){return Promise.all([...this.styles].map((([,e])=>this.processorHelper.processStyle(e,this.options,this.resources,this.batchRequest))))}async processPageResources(){await this.processorHelper.processPageResources(this.doc,this.baseURI,this.options,this.resources,this.styles,this.batchRequest)}async processScripts(){await Promise.all(Array.from(this.doc.querySelectorAll("script[src]")).map((async e=>{let t,n;if(n=e.getAttribute("src"),this.options.saveOriginalURLs&&!lS(n)&&e.setAttribute("data-sf-original-src",n),e.removeAttribute("integrity"),this.options.blockScripts)e.removeAttribute("src");else{e.textContent="";try{t=DA.resolveURL(n,this.baseURI)}catch(e){}(function(e){return function(e){return e&&!e.match(aS)}(e)&&(e.match(nS)||e.match(rS)||e.startsWith(tS))&&e.match(oS)})(t)&&(e.removeAttribute("src"),await this.processorHelper.processScript(e,t,this.options,this.charset),"async"!=e.getAttribute("async")&&""!=e.getAttribute(DA.ASYNC_SCRIPT_ATTRIBUTE_NAME)||e.setAttribute("async",""))}this.stats.add("processed","scripts",1)})))}removeAlternativeImages(){DA.removeAlternativeImages(this.doc)}async removeAlternativeFonts(){await this.processorHelper.removeAlternativeFonts(this.doc,this.stylesheets,this.resources.fonts,this.options.fontTests)}async processFrames(){if(this.options.frames){const e=Array.from(this.doc.querySelectorAll('iframe, frame, object[type="text/html"][data]'));await Promise.all(e.map((async e=>{const t=e.getAttribute(DA.WIN_ID_ATTRIBUTE_NAME);if(t){const n=this.options.frames.find((e=>e.windowId==t));if(n)if(this.options.frames=this.options.frames.filter((e=>e.windowId!=t)),n.runner&&""!=e.getAttribute(DA.HIDDEN_FRAME_ATTRIBUTE_NAME)){this.stats.add("processed","frames",1),await n.runner.run();const r=await n.runner.getPageData();e.removeAttribute(DA.WIN_ID_ATTRIBUTE_NAME),this.processorHelper.processFrame(e,r,this.resources,t,n),this.stats.addAll(r)}else e.removeAttribute(DA.WIN_ID_ATTRIBUTE_NAME),this.stats.add("discarded","frames",1)}})))}}replaceStylesheets(){this.processorHelper.replaceStylesheets(this.doc,this.stylesheets,this.resources,this.options)}replaceStyleAttributes(){this.doc.querySelectorAll("[style]").forEach((e=>{const t=this.styles.get(e);t?(this.styles.delete(e),e.setAttribute("style",this.processorHelper.generateStylesheetContent(t,this.options))):e.setAttribute("style","")}))}insertVariables(){const{cssVariables:e}=this.resources;if(e.size){const t=this.doc.createElement("style"),n=this.doc.head.querySelector("style");n?this.doc.head.insertBefore(t,n):this.doc.head.appendChild(t);let r="";e.forEach((({content:t,url:n},a)=>{e.delete(a),r&&(r+=";"),r+=`${iS+a}: `,this.options.saveOriginalURLs&&(r+=`/* original URL: ${n} */ `),r+=`url("${t}")`})),t.textContent=":root{"+r+"}"}}compressHTML(){let e;this.options.displayStats&&(e=DA.getContentSize(this.doc.documentElement.outerHTML)),DA.minifyHTML(this.doc,{PRESERVED_SPACE_ELEMENT_ATTRIBUTE_NAME:DA.PRESERVED_SPACE_ELEMENT_ATTRIBUTE_NAME}),this.options.displayStats&&this.stats.add("discarded","HTML bytes",e-DA.getContentSize(this.doc.documentElement.outerHTML))}cleanupPage(){this.doc.querySelectorAll("base").forEach((e=>e.remove()));const e=this.doc.head.querySelector("meta[charset]");e&&(this.doc.head.insertBefore(e,this.doc.head.firstChild),1==this.doc.head.querySelectorAll("*").length&&0==this.doc.body.childNodes.length&&this.doc.head.querySelector("meta[charset]").remove())}resetZoomLevel(){const e=this.doc.documentElement.style.getPropertyValue("-sf-transform"),t=this.doc.documentElement.style.getPropertyPriority("-sf-transform"),n=this.doc.documentElement.style.getPropertyValue("-sf-transform-origin"),r=this.doc.documentElement.style.getPropertyPriority("-sf-transform-origin"),a=this.doc.documentElement.style.getPropertyValue("-sf-min-height"),o=this.doc.documentElement.style.getPropertyPriority("-sf-min-height");this.doc.documentElement.style.setProperty("transform",e,t),this.doc.documentElement.style.setProperty("transform-origin",n,r),this.doc.documentElement.style.setProperty("min-height",a,o),this.doc.documentElement.style.removeProperty("-sf-transform"),this.doc.documentElement.style.removeProperty("-sf-transform-origin"),this.doc.documentElement.style.removeProperty("-sf-min-height")}async insertMAFFMetaData(){const e=await this.maffMetaDataPromise;if(e&&e.content){const t="http://www.w3.org/1999/02/22-rdf-syntax-ns#",n=DA.parseXMLContent(e.content),r=n.querySelector("RDF > Description > originalurl"),a=n.querySelector("RDF > Description > archivetime");if(r&&(this.options.saveUrl=r.getAttributeNS(t,"resource")),a){const e=a.getAttributeNS(t,"resource");if(e){const t=new Date(e);isNaN(t.getTime())||(this.options.saveDate=new Date(e))}}}}async setDocInfo(){const e=this.doc.querySelector("title"),t=this.doc.querySelector("meta[name=description]"),n=this.doc.querySelector("meta[name=author]"),r=this.doc.querySelector("meta[name=creator]"),a=this.doc.querySelector("meta[name=publisher]"),o=this.doc.querySelector("h1");this.options.title=e?e.textContent.trim():"",this.options.info={description:t&&t.content?t.content.trim():"",lang:this.doc.documentElement.lang,author:n&&n.content?n.content.trim():"",creator:r&&r.content?r.content.trim():"",publisher:a&&a.content?a.content.trim():"",heading:o&&o.textContent?o.textContent.trim():""},this.options.infobarContent=await DA.evalTemplate(this.options.infobarTemplate,this.options,null,!0)}}const XA="data:",eS="about:blank",tS="blob:",nS=/^https?:\/\//,rS=/^file:\/\//,aS=/^https?:\/\/+\s*$/,oS=/^(https?:\/\/|file:\/\/|blob:).+/,iS="--sf-img-";function sS(e){return!e||e.startsWith(XA)?e:e.split("#")[0]}function lS(e){return e&&(e.startsWith(XA)||e.startsWith(tS))}const cS={discarded:{"HTML bytes":0,"hidden elements":0,scripts:0,objects:0,"audio sources":0,"video sources":0,frames:0,"CSS rules":0,canvas:0,stylesheets:0,resources:0,medias:0},processed:{"HTML bytes":0,"hidden elements":0,scripts:0,objects:0,"audio sources":0,"video sources":0,frames:0,"CSS rules":0,canvas:0,stylesheets:0,resources:0,medias:0}};class uS{constructor(e){this.options=e,e.displayStats&&(this.data=PA.parse(PA.stringify(cS)))}set(e,t,n){this.options.displayStats&&(this.data[e][t]=n)}add(e,t,n){this.options.displayStats&&(this.data[e][t]+=n)}addAll(e){this.options.displayStats&&(Object.keys(this.data.discarded).forEach((t=>this.add("discarded",t,e.stats.discarded[t]||0))),Object.keys(this.data.processed).forEach((t=>this.add("processed",t,e.stats.processed[t]||0))))}}const dS=1048576,hS="text/",pS=["~","+","\\\\","?","%","*",":","|",'"',"<",">","\0-",""],mS="_",fS={"image/svg+xml":".svg","image/png":".png","image/jpeg":".jpg","image/gif":".gif","image/webp":".webp"},gS=globalThis.URL,bS=globalThis.DOMParser,yS=globalThis.Blob,wS=globalThis.FileReader,kS=(e,t)=>globalThis.fetch(e,t),vS=globalThis.crypto,xS=globalThis.TextDecoder,AS=globalThis.TextEncoder;function SS(e){return(e=e||{}).fetch=e.fetch||kS,e.frameFetch=e.frameFetch||e.fetch||kS,{getDoctypeString:TS,getFilenameExtension(e,t,n){const r=new gS(e).pathname.match(/(\.[^\\/.]*)$/);return(r&&r[1]&&this.getValidFilename(r[1],t,n)||"").toLowerCase()},getContentTypeExtension:e=>fS[e]||"",getContent:async function(t,n){let r,a,o,i;const s=e.fetch,l=e.frameFetch;if(n.blockMixedContent&&/^https:/i.test(n.baseURI)&&!/^https:/i.test(t))return ES(t,n);o=n.networkTimeout?new Promise(((e,t)=>{i=e,a=globalThis.setTimeout((()=>t(new Error("network timeout"))),n.networkTimeout)})):new Promise((e=>{i=e}));try{const e=n.acceptHeaders?n.acceptHeaders[n.expectedType]:"*/*";if(n.frameId)try{r=await Promise.race([l(t,{frameId:n.frameId,referrer:n.resourceReferrer,headers:{accept:e}}),o])}catch(n){r=await Promise.race([s(t,{headers:{accept:e}}),o])}else r=await Promise.race([s(t,{referrer:n.resourceReferrer,headers:{accept:e}}),o])}catch(e){return ES(t,n)}finally{i(),n.networkTimeout&&globalThis.clearTimeout(a)}let c;try{c=await r.arrayBuffer()}catch(e){return n.inline?{data:n.asBinary?Bo:"",resourceURL:t}:{resourceURL:t}}t=r.url||t;let u,d="";try{const e=new sk(r.headers.get("content-type"));d=e.type+"/"+e.subtype,u=e.parameters.get("charset")}catch(e){}d||(d=function(e,t){if("image"==e){if(n([255,255,255,255],[0,0,1,0]))return"image/x-icon";if(n([255,255,255,255],[0,0,2,0]))return"image/x-icon";if(n([255,255],[78,77]))return"image/bmp";if(n([255,255,255,255,255,255],[71,73,70,56,57,97]))return"image/gif";if(n([255,255,255,255,255,255],[71,73,70,56,59,97]))return"image/gif";if(n([255,255,255,255,0,0,0,0,255,255,255,255,255,255],[82,73,70,70,0,0,0,0,87,69,66,80,86,80]))return"image/webp";if(n([255,255,255,255,255,255,255,255],[137,80,78,71,13,10,26,10]))return"image/png";if(n([255,255,255],[255,216,255]))return"image/jpeg"}if("font"==e){if(n([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,76,80]))return"application/vnd.ms-fontobject";if(n([255,255,255,255],[0,1,0,0]))return"font/ttf";if(n([255,255,255,255],[79,84,84,79]))return"font/otf";if(n([255,255,255,255],[116,116,99,102]))return"font/collection";if(n([255,255,255,255],[119,79,70,70]))return"font/woff";if(n([255,255,255,255],[119,79,70,50]))return"font/woff2"}function n(e,n){let r=!0,a=0;if(t.byteLength>=n.length){const o=new Uint8Array(t,0,e.length);for(a=0;a<e.length&&r;a++)r=r&&(o[a]&e[a])==n[a];return r}}}(n.expectedType,c));!u&&n.charset&&(u=n.charset);if(n.asBinary){if(r.status>=400)return ES(t,n);try{return n.maxResourceSizeEnabled&&c.byteLength>n.maxResourceSize*dS?ES(t,n):ES(t,n,c,null,d)}catch(e){return ES(t,n)}}else{if(r.status>=400||n.validateTextContentType&&d&&!d.startsWith(hS))return ES(t,n);if(u||(u="utf-8"),n.maxResourceSizeEnabled&&c.byteLength>n.maxResourceSize*dS)return ES(t,n,null,u);try{return ES(t,n,c,u,d)}catch(e){return ES(t,n,null,u)}}},parseURL:(e,t)=>void 0===t?new gS(e):new gS(e,t),resolveURL(e,t){return this.parseURL(e,t).href},getSearchParams:e=>Array.from(new URLSearchParams(e)),getValidFilename:(e,t=pS,n=mS)=>(t.forEach((t=>e=e.replace(new RegExp("["+t+"]+","g"),n))),e=e.replace(/\.\.\//g,"").replace(/^\/+/,"").replace(/\/+/g,"/").replace(/\/$/,"").replace(/\.$/,"").replace(/\.\//g,"."+n).replace(/\/\./g,"/"+n)),parseDocContent(e,t){const n=(new bS).parseFromString(e,"text/html");n.head||n.documentElement.insertBefore(n.createElement("HEAD"),n.body);let r=n.querySelector("base");return r&&r.getAttribute("href")||(r&&r.remove(),r=n.createElement("base"),r.setAttribute("href",t),n.head.insertBefore(r,n.head.firstChild)),n},parseXMLContent:e=>(new bS).parseFromString(e,"text/xml"),parseSVGContent(e){const t=(new bS).parseFromString(e,"image/svg+xml");return t.querySelector("parsererror")?(new bS).parseFromString(e,"text/html"):t},async digest(e,t){try{return function(e){const t=[],n=new DataView(e);for(let e=0;e<n.byteLength;e+=4){const r="00000000",a=(r+n.getUint32(e).toString(16)).slice(-r.length);t.push(a)}return t.join("")}(await vS.subtle.digest(e,new AS("utf-8").encode(t)))}catch(e){return""}},getContentSize:e=>new yS([e]).size,formatFilename(e,t){return qv(e,t,this)},evalTemplate(e,t,n,r){return Bv(e,t,this,n,r)},minifyHTML:(e,t)=>kv(e,t),minifyCSSRules:(e,t,n)=>tv(e,t,n),removeUnusedFonts:(e,t,n,r)=>fk(e,t,n,r),getMediaAllInfo:(e,t,n)=>Ok(e,t,n),compressCSS:(e,t)=>ek(e,t),minifyMedias:e=>Jk(e),removeAlternativeImages:e=>iv(e),parseSrcset:e=>nk(e),preProcessDoc:(e,t,n)=>Vo(e,t,n),postProcessDoc(e,t,n){Xo(e,t,n)},serialize:(e,t)=>Iv(e,t),removeQuotes:e=>ri(e),appendInfobar:(e,t)=>Jo(e,t),ON_BEFORE_CAPTURE_EVENT_NAME:so,ON_AFTER_CAPTURE_EVENT_NAME:lo,WIN_ID_ATTRIBUTE_NAME:ko,REMOVED_CONTENT_ATTRIBUTE_NAME:mo,HIDDEN_CONTENT_ATTRIBUTE_NAME:fo,HIDDEN_FRAME_ATTRIBUTE_NAME:bo,IMAGE_ATTRIBUTE_NAME:vo,POSTER_ATTRIBUTE_NAME:xo,VIDEO_ATTRIBUTE_NAME:Ao,CANVAS_ATTRIBUTE_NAME:So,STYLE_ATTRIBUTE_NAME:Eo,INPUT_VALUE_ATTRIBUTE_NAME:To,SHADOW_ROOT_ATTRIBUTE_NAME:wo,PRESERVED_SPACE_ELEMENT_ATTRIBUTE_NAME:yo,STYLESHEET_ATTRIBUTE_NAME:Ro,SELECTED_CONTENT_ATTRIBUTE_NAME:zo,INVALID_ELEMENT_ATTRIBUTE_NAME:Io,COMMENT_HEADER:Ja,COMMENT_HEADER_LEGACY:Oo,SINGLE_FILE_UI_ELEMENT_CLASS:Fo,EMPTY_RESOURCE:Bo,INFOBAR_TAGNAME:qo,WAIT_FOR_USERSCRIPT_PROPERTY_NAME:Za,NO_SCRIPT_PROPERTY_NAME:eo}}async function ES(e,t,n,r,a){if(n)if(t.asBinary)if(t.inline){const e=new wS;e.readAsDataURL(new yS([n],{type:a+(t.charset?";charset="+t.charset:"")})),n=await new Promise(((t,n)=>{e.addEventListener("load",(()=>t(e.result)),!1),e.addEventListener("error",n,!1)}))}else n=new Uint8Array(n);else{const e=new Uint8Array(n.slice(0,4));132==e[0]&&49==e[1]&&149==e[2]&&51==e[3]?r="gb18030":255==e[0]&&254==e[1]?r="utf-16le":254==e[0]&&255==e[1]&&(r="utf-16be");try{n=new xS(r).decode(n)}catch(e){n=new xS(r="utf-8").decode(n)}n=n.replace(/\ufeff/gi,"")}else t.inline&&(n=t.asBinary?Bo:"");return{data:n,resourceURL:e,charset:r,contentType:a}}function TS(e){const t=e.doctype;let n="";return t&&(n="<!DOCTYPE "+t.nodeName,t.publicId?(n+=' PUBLIC "'+t.publicId+'"',t.systemId&&(n+=' "'+t.systemId+'"')):t.systemId&&(n+=' SYSTEM "'+t.systemId+'"'),t.internalSubset&&(n+=" ["+t.internalSubset+"]"),n+="> "),n}function CS(t){void 0===e.SingleFile&&(e.SingleFile=function(...e){return[DA]=e,NA}(SS(t)))}e.SingleFile=void 0,e.getPageData=async function(t={},n,r=globalThis.document,a=globalThis){const o=ss;let i;if(CS(n),r&&a){Wo(r);const e=[];if(!t.saveRawPage){let n;if(t.loadDeferredImages&&(n=yi(t),t.loadDeferredImagesBeforeFrames&&await n),!t.removeFrames&&o&&globalThis.frames){let n;n=t.loadDeferredImages?new Promise((e=>globalThis.setTimeout((()=>e(o.getAsync(t))),t.loadDeferredImagesBeforeFrames||!t.loadDeferredImages?0:t.loadDeferredImagesMaxIdleTime))):o.getAsync(t),t.loadDeferredImagesBeforeFrames?t.frames=await n:e.push(n)}t.loadDeferredImages&&!t.loadDeferredImagesBeforeFrames&&e.push(n)}t.loadDeferredImagesBeforeFrames||([t.frames]=await Promise.all(e)),i=t.frames&&t.frames.sessionId}t.doc=r,t.win=a,t.insertCanonicalLink=!0,t.onprogress=e=>{e.type===e.RESOURCES_INITIALIZED&&r&&a&&t.loadDeferredImages&&wi(t)};const s=new e.SingleFile(t);await s.run(),i&&o.cleanup(i);const l=await s.getPageData();if(t.compressContent){const e=await da(l,{insertTextBody:t.insertTextBody,url:t.url,createRootDirectory:t.createRootDirectory,selfExtractingArchive:t.selfExtractingArchive,extractDataFromPage:t.extractDataFromPage,insertCanonicalLink:t.insertCanonicalLink,insertMetaNoIndex:t.insertMetaNoIndex,password:t.password,zipScript:t.zipScript});delete l.resources;const n=new globalThis.FileReader;n.readAsArrayBuffer(e);const r=await new Promise(((e,t)=>{n.addEventListener("load",(()=>e(n.result)),!1),n.addEventListener("error",(e=>t(e.detail.error)),!1)}));l.content=Array.from(new Uint8Array(r))}return l},e.helper=si,e.init=CS,e.modules=Wv,e.processors=ls,e.vendor=lk,Object.defineProperty(e,"__esModule",{value:!0})}));